* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

:root {
  --site-header-height: 124px;
  --bg: #f7eef0;
  --bg-deep: #e4c4cb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #fff7f8;
  --ink: #261016;
  --muted: #74535c;
  --line: rgba(38, 16, 22, 0.12);
  --accent: #7a1f35;
  --accent-soft: rgba(122, 31, 53, 0.12);
  --accent-hover: #5e1728;
  --burgundy: #6b1a2e;
  --burgundy-line: rgba(107, 26, 46, 0.24);
  --green: #2f8f3a;
  --green-line: rgba(47, 143, 58, 0.28);
  --sky: #8eb8cc;
  --sky-hover: #6fa3bc;
  --tournament-name: #4f9fc4;
  --tournament-name-hover: #3d8eb5;
  --danger: #8b2e2e;
  --shadow: 0 10px 30px rgba(38, 16, 22, 0.07);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --radius: 14px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 8% -8%, #fbf4f6 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #d49aa8 0%, transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, #edd4da 42%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  padding-top: var(--site-header-height);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header {
  background: rgba(247, 238, 240, 0.88);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: rise-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-title {
  display: block;
  margin: 0;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  color: var(--ink);
  animation: pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .site-title {
    background: linear-gradient(120deg, #3f0e1a 0%, var(--accent) 48%, #a33a55 100%);
    background-size: 180% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation:
      pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both,
      brand-shine 4.5s ease-in-out 0.35s infinite;
  }
}

.back-btn {
  position: absolute;
  left: 12px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 2px solid var(--sky);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--sky);
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}

.back-btn-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.back-btn:hover {
  background: #fff;
  border-color: var(--sky-hover);
  color: var(--sky-hover);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(142, 184, 204, 0.28);
}

.back-btn:active {
  transform: translateX(-1px) scale(0.94);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  overflow-x: auto;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(122, 31, 53, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 11px 18px;
  border-radius: 999px;
  white-space: nowrap;
  text-align: center;
  font-weight: 600;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(42, 26, 18, 0.06);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:nth-child(1) {
  animation: pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.nav-links a:nth-child(2) {
  animation: pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.nav-links a:hover {
  color: var(--accent-hover);
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(122, 31, 53, 0.18);
  transform: translateY(-2px) scale(1.03);
}

.nav-links a:active {
  transform: translateY(0) scale(0.97);
}

.nav-links a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(122, 31, 53, 0.28);
}

.nav-links a.active:hover {
  color: #fff;
  background: var(--accent-hover);
}

main {
  padding: 18px 16px 28px;
  max-width: 1100px;
  margin: 0 auto;
  animation: rise-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

main > section > h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  margin-bottom: 12px;
  min-width: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: rise-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card:nth-child(1) { animation-delay: 0.04s; }
.card:nth-child(2) { animation-delay: 0.09s; }
.card:nth-child(3) { animation-delay: 0.14s; }
.card:nth-child(4) { animation-delay: 0.19s; }
.card:nth-child(5) { animation-delay: 0.24s; }
.card:nth-child(6) { animation-delay: 0.29s; }
.card:nth-child(n + 7) { animation-delay: 0.32s; }

a.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: 2px solid var(--burgundy);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

a.card-link:hover {
  border-color: var(--burgundy);
  box-shadow: 0 14px 32px rgba(122, 46, 62, 0.16);
  transform: translateY(-3px) scale(1.01);
}

a.card-link:active {
  transform: translateY(-1px) scale(0.995);
}

a.card-link h3,
#tournament-details .card > h3,
#tournament-details .card ul a {
  color: var(--tournament-name);
  transition: color 0.2s ease;
}

#tournament-details .card ul a {
  font-weight: 600;
  text-decoration: none;
}

a.card-link:hover h3,
#tournament-details .card ul a:hover {
  color: var(--tournament-name-hover);
}

#tournament-details .card ul a:hover {
  text-decoration: underline;
}

.grid-form {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

label,
fieldset {
  display: grid;
  gap: 6px;
}

input,
select,
button {
  padding: 8px 10px;
  font-size: 14px;
  font-family: var(--font-body);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

button {
  cursor: pointer;
  min-height: 40px;
  background: var(--surface-solid);
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(122, 31, 53, 0.12);
}

button:active {
  transform: translateY(0) scale(0.97);
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

#admin-content {
  display: none;
}

body.admin-page-authenticated {
  padding-top: var(--site-header-height);
}

body.admin-page-authenticated #admin-auth-section {
  display: none !important;
}

body.admin-page-authenticated #admin-content {
  display: block !important;
}

body.admin-page .admin-header .site-title {
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

body.admin-page .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

body.admin-page .admin-nav .admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid rgba(122, 31, 53, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(42, 26, 18, 0.06);
  cursor: pointer;
}

body.admin-page .admin-nav .admin-tab:hover {
  color: var(--accent-hover);
  background: #fff;
  border-color: var(--accent);
}

body.admin-page .admin-nav .admin-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body.admin-page .admin-layout--single {
  display: block;
}

body.admin-page .admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

body.admin-page .danger-btn {
  border-color: #a33;
  color: #a33;
  background: transparent;
}

body.admin-page .danger-btn:hover,
body.admin-page .danger-btn:focus-visible {
  background: #a33;
  color: #fff;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.open {
  display: flex;
  animation: fade-in 0.18s ease both;
}

.modal.open .modal-dialog {
  animation: pop-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 26, 18, 0.4);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: 0;
  background: #fff8f9;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header h3 {
  margin: 0;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  table-layout: fixed;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: background 0.18s ease;
}

tbody tr {
  animation: row-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

tbody tr:nth-child(1) { animation-delay: 0.05s; }
tbody tr:nth-child(2) { animation-delay: 0.08s; }
tbody tr:nth-child(3) { animation-delay: 0.11s; }
tbody tr:nth-child(4) { animation-delay: 0.14s; }
tbody tr:nth-child(5) { animation-delay: 0.17s; }
tbody tr:nth-child(6) { animation-delay: 0.2s; }
tbody tr:nth-child(7) { animation-delay: 0.23s; }
tbody tr:nth-child(8) { animation-delay: 0.26s; }
tbody tr:nth-child(n + 9) { animation-delay: 0.28s; }

tbody tr:hover td {
  background: rgba(122, 31, 53, 0.06);
}

th {
  background: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

.rating-table,
.standings-table,
.matches-table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rating-table {
  border: 2px solid var(--green);
}

.standings-table {
  border: 2px solid var(--burgundy);
}

.matches-table {
  border: 1px solid var(--burgundy);
}

.rating-table th,
.rating-table td {
  border: 1px solid var(--green-line);
  border-top: none;
  border-left: none;
}

.standings-table th,
.standings-table td,
.matches-table th,
.matches-table td {
  border: 1px solid var(--burgundy-line);
  border-top: none;
  border-left: none;
}

.rating-table tr > *:last-child,
.standings-table tr > *:last-child,
.matches-table tr > *:last-child {
  border-right: none;
}

.rating-table tbody tr:last-child > *,
.standings-table tbody tr:last-child > *,
.matches-table tbody tr:last-child > * {
  border-bottom: none;
}

.rating-table th {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: 14px;
  padding-bottom: 14px;
}

.rating-table td {
  font-size: 1rem;
  padding-top: 12px;
  padding-bottom: 12px;
}

.rank-col {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.standings-table .col-place {
  width: 54px;
  min-width: 54px;
  max-width: 58px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.matches-table .col-score {
  width: 64px;
  min-width: 64px;
  max-width: 72px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  white-space: nowrap;
}

.standings-table th {
  white-space: nowrap;
  font-size: 13px;
  padding-left: 4px;
  padding-right: 4px;
}

.standings-table .col-wl {
  width: 24px;
  min-width: 24px;
  max-width: 28px;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}

.standings-table .col-games {
  width: 76px;
  min-width: 76px;
  max-width: 84px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

.standings-table .col-participant,
.matches-table .col-participant {
  width: auto;
  min-width: 0;
  text-align: center;
}

.matches-table .col-action {
  width: 88px;
  min-width: 88px;
  max-width: 96px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matches-list {
  display: grid;
  gap: 10px;
}

.match-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--burgundy-line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.match-entry--admin {
  grid-template-rows: auto auto;
}

.match-entry-side {
  min-width: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.match-entry-side .link-btn {
  display: inline;
  white-space: normal;
}

.match-entry-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.match-entry-score--text {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.match-entry-score-sep {
  color: var(--ink);
  font-weight: 700;
}

.match-entry-score input[type="number"] {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  padding: 10px 4px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

.match-entry-save {
  grid-column: 1 / -1;
  width: 100%;
  white-space: nowrap;
  min-height: 44px;
}

.participant-pair {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.participant-pair-line {
  display: block;
  white-space: nowrap;
}

.matches-table .participant-pair {
  width: fit-content;
  margin: 0 auto;
  justify-items: center;
}

.muted {
  color: var(--muted);
}

.warn {
  color: var(--danger);
  font-weight: 700;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.65);
  animation: pop-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.pill:hover {
  transform: scale(1.04);
  border-color: rgba(122, 31, 53, 0.35);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.18s ease;
  display: inline-block;
}

.link-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  transform: translateX(2px);
}

.selected-row {
  background: var(--accent-soft);
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  min-width: 0;
}

.admin-sidebar {
  align-self: start;
  display: grid;
  gap: 8px;
}

.admin-tab {
  text-align: left;
}

.admin-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.nested-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.45);
}

.search-field {
  position: relative;
  margin-bottom: 10px;
}

.search-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff8f9;
  box-shadow: 0 10px 28px rgba(42, 26, 18, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.search-results.open {
  display: grid;
  gap: 0;
  animation: drop-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.search-results-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

.search-result-item {
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  min-height: 40px;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateX(3px);
}

.selected-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-card h4 {
  margin: 0 0 6px;
}

.pill button {
  border: 0;
  background: transparent;
  padding: 0 0 0 6px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes brand-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  :root {
    --site-header-height: 132px;
  }

  .header {
    padding: 12px 12px 14px;
  }

  .site-title {
    font-size: 1.85rem;
  }

  .back-btn {
    top: 12px;
    left: 10px;
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .back-btn-icon {
    width: 19px;
    height: 19px;
  }

  main {
    padding: 12px 10px 20px;
  }

  .card {
    padding: 12px;
    border-radius: 12px;
  }

  .auth-row {
    grid-template-columns: 1fr;
  }

  .checkbox-list {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .row-between {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-template-columns: 1fr 1fr;
    position: sticky;
    top: calc(var(--site-header-height) + 8px);
    z-index: 4;
  }

  body.admin-page-authenticated .admin-sidebar {
    top: 8px;
  }

  .match-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  table {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  input,
  select,
  button {
    font-size: 16px;
    min-height: 44px;
  }

  .nav-links a {
    flex: 1;
    min-width: 0;
    max-width: 160px;
    padding: 11px 10px;
    border-radius: 999px;
    font-size: 1.05rem;
    line-height: 1.2;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  a,
  span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* —— Landing —— */
body.landing-page {
  padding-top: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: #fff;
}

body.landing-page.menu-open {
  overflow: hidden;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 64px;
  padding: 12px 16px;
  background: transparent;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.landing-page.is-scrolled:not(.menu-open) .landing-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.menu-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.landing-brand {
  justify-self: center;
  margin: 0;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(20, 6, 10, 0.55);
}

.menu-backdrop[hidden],
.site-menu[hidden] {
  display: none !important;
}

.site-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 140;
  width: min(300px, 86vw);
  height: 100dvh;
  padding: 88px 22px 28px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: linear-gradient(180deg, #5c1628 0%, #3a0e1a 100%);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.28);
  animation: drop-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-menu-label {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-menu a {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  transition: background 0.18s ease;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.landing-hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  padding: 76px 24px 48px;
  overflow: hidden;
  background: #4a1222 url("../assets/images/logo.png") center / cover no-repeat;
}

.landing-social {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.landing-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1.5px solid #f0c14d;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.landing-social-btn svg {
  width: 26px;
  height: 26px;
}

.landing-social-btn:hover,
.landing-social-btn:focus-visible {
  background: rgba(240, 193, 77, 0.12);
  border-color: #ffd76a;
  transform: translateY(-1px);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(58, 12, 26, 0.86);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin-top: clamp(8px, 2.5vh, 24px);
  text-align: center;
  animation: rise-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-hero-content h1 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(1.85rem, 6.5vw, 2.85rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

.landing-hero-content p {
  margin: 0 auto;
  max-width: 28em;
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 2.8vw, 1.1rem);
  line-height: 1.4;
  font-weight: 400;
  font-style: italic;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.landing-cta {
  display: grid;
  gap: 14px;
  width: min(360px, 100%);
  margin: 28px auto 0;
}

.landing-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 28px;
  border: 3px solid #e06a22;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 3vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.landing-cta-btn:hover,
.landing-cta-btn:focus-visible {
  background: #fff8f2;
  border-color: #c95512;
  color: #111;
  transform: translateY(-2px);
}

.landing-below {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  background: transparent;
}

.landing-video-section {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.landing-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  border: 0;
  outline: none;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%) scale(1.12);
  pointer-events: none;
}

.landing-levels {
  background: #f7eef0;
  color: var(--ink);
  padding: clamp(48px, 8vh, 88px) 20px clamp(40px, 6vh, 64px);
}

.landing-levels h2 {
  width: min(720px, 100%);
  margin: 0 auto 18px;
  text-align: left;
  text-transform: uppercase;
  font-family: "Unbounded", var(--font-body), sans-serif;
  font-size: clamp(1.2rem, 3.6vw, 1.65rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #111;
}

.levels-chart {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  padding-top: 88px;
  overflow: visible;
}

.levels-tooltip {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  min-width: 168px;
  max-width: min(220px, calc(100vw - 24px));
  padding: 14px 18px;
  border-radius: 18px;
  background: #111;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  pointer-events: none;
  --arrow-x: 50%;
}

.levels-tooltip::after {
  content: "";
  position: absolute;
  left: var(--arrow-x, 50%);
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #111;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}

.levels-tooltip-ntrp {
  margin: 0 0 4px;
  color: #f0c14d;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.1;
}

.levels-tooltip-desc {
  margin: 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
}

.levels-bars {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 1.1fr 1.2fr 1fr 0.95fr 0.9fr;
  align-items: end;
  gap: clamp(10px, 2.2vw, 16px);
  height: clamp(360px, 62vw, 480px);
}

.level-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.level-bar-fill {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: var(--level-h, 50%);
  padding: 10px 0 8px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--level-color);
  box-shadow: none;
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.level-bar-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  max-height: calc(100% - 8px);
  color: #261016;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 3.1vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.92;
  text-align: center;
  text-shadow: none;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}

.level-bar:nth-child(n + 3) .level-bar-label {
  color: #f7eef0;
}

.level-bar:hover .level-bar-fill,
.level-bar.is-active .level-bar-fill {
  filter: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(38, 16, 22, 0.18);
}

.level-bar.is-active .level-bar-label {
  font-weight: 800;
}

@media (max-width: 420px) {
  .levels-chart {
    padding-top: 76px;
  }

  .levels-bars {
    gap: 7px;
    height: clamp(320px, 78vw, 420px);
    grid-template-columns: 1.4fr 1.1fr 1.1fr 1.25fr 1fr 0.95fr 0.9fr;
  }

  .level-bar-label {
    font-size: 0.82rem;
    letter-spacing: 0;
    line-height: 0.9;
  }
}

.landing-level-cards {
  background: #f4f1f2;
  color: var(--ink);
  padding: clamp(28px, 5vh, 48px) 20px clamp(36px, 6vh, 56px);
}

.level-cards {
  display: grid;
  gap: 14px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.level-card {
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(38, 16, 22, 0.04);
}

.level-card h3 {
  margin: 0 0 6px;
  color: #111;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 3.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.level-card-ntrp {
  margin: 0 0 12px;
  color: #111;
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 2.6vw, 1.02rem);
  font-weight: 700;
  line-height: 1.35;
}

.level-card-text {
  margin: 0 0 18px;
  color: #222;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 400;
  line-height: 1.45;
}

.level-card-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.level-card-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e6d7db;
}

.level-card-dots span.is-on {
  background: var(--burgundy);
}

/* —— Players page —— */
body.players-page {
  padding-top: 0;
  background: #fff;
  color: #111;
}

body.players-page main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(200px, 34vh, 280px) 0 110px;
}

.players-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  min-height: clamp(200px, 34vh, 280px);
  padding: 18px 20px 28px;
  overflow: hidden;
  color: #fff;
}

.players-hero-bg {
  position: absolute;
  inset: -12px;
  z-index: 0;
  background: #3a1a12 url("../assets/images/ball.jpg") center / cover no-repeat;
  filter: blur(3.5px);
  transform: scale(1.06);
}

.players-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(28, 10, 14, 0.58);
  pointer-events: none;
}

.players-hero-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.players-hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  text-transform: lowercase;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, transform 0.18s ease;
}

.players-hero-link:hover,
.players-hero-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.players-brand {
  position: relative;
  z-index: 2;
  align-self: center;
  margin: 28px 0 8px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-family: "Unbounded", var(--font-body), sans-serif;
  font-size: clamp(1.55rem, 5.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.players-list-section {
  background: #fff;
  padding: 22px 16px 24px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.players-empty {
  margin: 24px 0;
  color: #333;
  text-align: center;
  font-size: 1.05rem;
}

.players-board {
  width: 100%;
  color: #111;
}

.players-board-head,
.players-row {
  display: grid;
  grid-template-columns: 36px 40px minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
}

.players-board-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--burgundy);
  color: #111;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.players-row {
  border-bottom: 1px solid var(--burgundy);
  color: #111;
  text-decoration: none;
  transition: background 0.15s ease;
}

.players-row:hover,
.players-row:focus-visible {
  background: rgba(107, 26, 46, 0.04);
}

.players-rank {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111;
}

.players-avatar,
.players-avatar-spacer {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  justify-self: center;
}

.players-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2a2a2a;
  color: #fff;
  flex-shrink: 0;
}

.players-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.players-avatar--initials {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.players-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: #111;
}

.players-level {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: italic;
  font-weight: 500;
  color: #111;
}

.players-board-head .players-level {
  font-style: normal;
  font-weight: 700;
}

.players-scores {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.players-score-single {
  color: #111;
}

.players-score-double {
  color: #e06a22;
}

@media (max-width: 420px) {
  .players-board-head,
  .players-row {
    grid-template-columns: 28px 34px minmax(0, 1fr) minmax(0, 0.85fr) auto;
    gap: 6px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .players-name,
  .players-level {
    font-size: 0.92rem;
  }

  .players-scores {
    gap: 8px;
    font-size: 0.9rem;
  }
}

.players-filters {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.players-filters::-webkit-scrollbar {
  display: none;
}

.players-filter-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid #1f4d28;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.players-filter-btn:hover,
.players-filter-btn:focus-visible {
  background: #f3faf4;
  transform: translateY(-1px);
}

.players-filter-btn.is-active {
  background: #1f4d28;
  border-color: #1f4d28;
  color: #fff;
}

/* —— Tournaments page —— */
body.tournaments-page {
  padding-top: 0;
  background: #fff;
  color: #111;
}

body.tournaments-page main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(200px, 34vh, 280px) 0 48px;
}

.tournaments-hero-bg {
  background: #1a2a3a url("../assets/images/tournaments-hero.jpg") center / cover no-repeat;
  filter: blur(2.5px);
}

.tournaments-main {
  background: #fff;
}

.tournaments-list-section {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px 16px 24px;
}

/* —— Profile page —— */
body.profile-page {
  padding-top: 0;
  background: #fff;
  color: #111;
}

body.profile-page main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(200px, 34vh, 280px) 0 48px;
}

.profile-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  min-height: clamp(200px, 34vh, 280px);
  padding: 18px 20px 28px;
  overflow: hidden;
  color: #fff;
}

.profile-hero-bg {
  position: absolute;
  inset: -12px;
  z-index: 0;
  background: #3a1a12 url("../assets/images/profile-hero.png") center / cover no-repeat;
  filter: blur(2.5px);
  transform: scale(1.06);
}

.profile-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 8, 10, 0.62);
  pointer-events: none;
}

.profile-main {
  background: #fff;
}

#player-profile-page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 24px 16px 8px;
}

.profile-card {
  color: #111;
}

.profile-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
  background: #2a2a2a;
  display: block;
}

.profile-photo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.profile-top-meta {
  min-width: 0;
}

.profile-name {
  margin: 0 0 6px;
  color: #111;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 4.8vw, 2.05rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.profile-level-line {
  margin: 0 0 12px;
  color: #666;
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
}

.profile-rating-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.profile-badge--single {
  background: rgba(107, 26, 46, 0.1);
  color: var(--burgundy);
}

.profile-badge--double {
  background: rgba(224, 106, 34, 0.12);
  color: #e06a22;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 12px;
  margin-bottom: 30px;
}

.profile-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-metric-value {
  color: #111;
  font-size: clamp(0.98rem, 2.8vw, 1.12rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-metric-label {
  color: #777;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}

.profile-history h2 {
  margin: 0 0 12px;
  color: #111;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 800;
}

.profile-history-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-history-table th,
.profile-history-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(107, 26, 46, 0.18);
  text-align: left;
  color: #111;
}

.profile-history-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-history-table a.link-btn {
  color: var(--tournament-name);
  font-weight: 700;
  text-decoration: none;
}

.profile-history-table a.link-btn:hover {
  color: var(--tournament-name-hover);
  text-decoration: underline;
}

.profile-empty {
  margin: 0;
  color: #666;
}

@media (max-width: 520px) {
  .profile-top {
    grid-template-columns: 96px 1fr;
    gap: 14px;
  }

  .profile-photo {
    width: 96px;
    height: 96px;
  }

  .profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }
}

.landing-atmosphere {
  background: #fff;
  color: var(--ink);
  padding: clamp(40px, 7vh, 72px) 0 clamp(36px, 6vh, 56px);
}

.atmosphere-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: min(960px, calc(100% - 40px));
  margin: 0 auto 22px;
}

.atmosphere-head h2 {
  margin: 0;
  max-width: 14ch;
  text-align: left;
  text-transform: uppercase;
  font-family: "Unbounded", var(--font-body), sans-serif;
  font-size: clamp(1.2rem, 3.6vw, 1.65rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #111;
}

.atmosphere-nav {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 2px;
}

.atmosphere-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid rgba(38, 16, 22, 0.28);
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.atmosphere-nav-btn svg {
  width: 20px;
  height: 20px;
}

.atmosphere-nav-btn:hover,
.atmosphere-nav-btn:focus-visible {
  border-color: var(--burgundy);
  color: var(--burgundy);
  background: #fff7f8;
  transform: translateY(-1px);
}

.atmosphere-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.atmosphere-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 20px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.atmosphere-track::-webkit-scrollbar {
  display: none;
}

.atmosphere-card {
  position: relative;
  flex: 0 0 auto;
  width: min(72vw, 280px);
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #ead7dc;
  scroll-snap-align: start;
}

.atmosphere-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 720px) {
  .atmosphere-card {
    width: min(38vw, 320px);
    border-radius: 32px;
  }
}

.landing-footer {
  background: #fff;
  padding: 28px 20px 48px;
}

.landing-footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.landing-footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid rgba(38, 16, 22, 0.2);
  border-radius: 50%;
  background: #fff;
  color: #111;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.landing-footer-social-btn svg {
  width: 22px;
  height: 22px;
}

.landing-footer-social-btn:hover,
.landing-footer-social-btn:focus-visible {
  border-color: var(--burgundy);
  background: #fff7f8;
  color: var(--burgundy);
  transform: translateY(-2px);
}

.scroll-top-btn {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2f8f3a;
  color: #fff;
  box-shadow: 0 8px 22px rgba(47, 143, 58, 0.35);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s ease;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn svg {
  width: 24px;
  height: 24px;
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  background: #267a30;
}

