:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-2: #ebe0d1;
  --ink: #15120e;
  --muted: #5f574f;
  --accent: #ff6b3d;
  --accent-2: #027b88;
  --accent-3: #f2bf5a;
  --surface: #fffdf8;
  --surface-2: #f9f1e6;
  --surface-3: #f4eadc;
  --card: var(--surface);
  --border: rgba(21, 18, 14, 0.12);
  --shadow-sm: 0 10px 24px rgba(21, 18, 14, 0.08);
  --shadow: 0 24px 60px rgba(21, 18, 14, 0.14);
  --shadow-lg: 0 32px 80px rgba(21, 18, 14, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --nav-bg: #151210;
  --nav-ink: #fef7ec;
  --nav-muted: rgba(254, 247, 236, 0.7);
  --max-width: 1360px;
}

/* Group detail hero redesign */
.group-detail-body .app-shell {
  grid-template-rows: 1fr;
}

.group-detail-body .top-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 45;
  background: linear-gradient(180deg, rgba(3, 12, 31, 0.58), rgba(3, 12, 31, 0));
  color: #fff;
  box-shadow: none;
  border: 0;
  padding: calc(12px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 12px;
}

.group-detail-body .top-brand {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.group-detail-body .top-brand-main img,
.group-detail-body .top-brand-legacy {
  display: none;
}

.group-detail-body .top-actions .side-notifications {
  display: none !important;
}

.group-detail-body .top-nav .back-button,
.group-menu-toggle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(220, 232, 255, 0.28);
  background: rgba(12, 30, 67, 0.54);
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.group-top-menu {
  position: relative;
}

.group-menu-toggle {
  display: inline-grid;
  place-items: center;
  gap: 3px;
}

.group-menu-toggle span {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.group-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 28px));
  border: 1px solid rgba(164, 192, 245, 0.44);
  border-radius: 18px;
  background: rgba(10, 28, 63, 0.94);
  color: #f4f8ff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  overflow: hidden;
  padding: 8px 14px;
}

.group-menu-panel::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 22px;
  width: 16px;
  height: 16px;
  border-left: 1px solid rgba(164, 192, 245, 0.44);
  border-top: 1px solid rgba(164, 192, 245, 0.44);
  background: rgba(10, 28, 63, 0.94);
  transform: rotate(45deg);
}

.group-menu-panel button {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(164, 192, 245, 0.22);
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 850;
  padding: 16px 4px;
  text-align: left;
}

.group-menu-panel button:last-child {
  border-bottom: 0;
}

.group-menu-panel button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.group-menu-panel button.is-danger {
  color: #ff554a;
}

.group-menu-panel button[data-group-leave]::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("/icons/exit.png") center / contain no-repeat;
  mask: url("/icons/exit.png") center / contain no-repeat;
}

.group-menu-panel button[data-group-leave] img {
  display: none;
}

.group-menu-panel button.is-danger img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(94%) saturate(3120%) hue-rotate(338deg) brightness(101%) contrast(102%);
}

.group-detail-body .page.group-page {
  max-width: none;
  padding: 0 0 80px;
}

.group-detail-body .app-main {
  background: transparent;
}

.group-detail-body .group-overview-card {
  position: relative;
  min-height: clamp(520px, 76vh, 760px);
  display: grid;
  align-content: end;
  width: 100%;
  margin: 0 0 22px;
  padding: clamp(120px, 16vh, 170px) clamp(16px, 6vw, 80px) 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #07162e;
  box-shadow: none;
}

.group-detail-body .group-hero {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 0;
}

.group-detail-body .group-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-detail-body .group-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.32) 0%, rgba(3, 12, 31, 0.7) 54%, rgba(3, 12, 31, 0.96) 100%),
    radial-gradient(circle at 50% 30%, rgba(28, 218, 199, 0.12), transparent 34%);
}

.group-detail-body .group-cash-badge.is-hero {
  top: calc(78px + env(safe-area-inset-top));
  z-index: 3;
}

.group-competition-medallion {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: clamp(118px, 20vw, 190px);
  height: clamp(118px, 20vw, 190px);
  border-radius: 999px;
  padding: 5px;
  background: linear-gradient(145deg, rgba(27, 218, 255, 0.95), rgba(2, 123, 136, 0.8));
  box-shadow: 0 0 0 7px rgba(4, 19, 45, 0.52), 0 22px 54px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.group-competition-medallion img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
}

.group-detail-body .group-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  width: min(860px, 100%);
  margin: 24px auto 0;
  color: #fff;
}

.group-hero-copy {
  min-width: 0;
}

.group-detail-body .group-title-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.group-detail-body .group-title-row h2 {
  max-width: min(620px, 100%);
  color: #f6f9ff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.58);
}

.group-admin-tag {
  min-height: 36px;
  border: 1px solid rgba(37, 199, 133, 0.55);
  border-radius: 999px;
  background: rgba(37, 199, 133, 0.22);
  color: #f7fff9;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 7px 14px;
  box-shadow: 0 0 24px rgba(37, 199, 133, 0.18);
}

.group-detail-body .group-description-wrap {
  display: none;
}

.group-detail-body .group-meta {
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}

.group-detail-body .group-meta .pill {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  background: rgba(8, 25, 55, 0.58);
  backdrop-filter: blur(8px);
}

.group-detail-body .group-meta .pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-detail-body .group-actions {
  width: auto;
  justify-content: flex-end;
  align-self: flex-end;
}

.group-detail-body .group-actions [data-group-join] {
  min-height: 36px;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
}

.group-detail-body .tab-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(980px, 100%);
  margin: 30px auto 0;
  padding: 6px;
  gap: 4px;
  overflow: visible;
  border-color: rgba(116, 163, 255, 0.3);
  background: rgba(6, 22, 54, 0.74);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  mask-image: none;
  -webkit-mask-image: none;
}

.group-detail-body .tab-button {
  min-width: 0;
  max-width: none;
  min-height: 58px;
  padding: 7px 4px 10px;
  color: #c7d5f4;
  font-size: clamp(0.62rem, 2.2vw, 0.82rem);
  white-space: normal;
}

.group-detail-body .tab-button-icon {
  width: clamp(13px, 4vw, 17px) !important;
  height: clamp(13px, 4vw, 17px) !important;
  max-width: 17px !important;
  max-height: 17px !important;
  flex-basis: clamp(13px, 4vw, 17px);
  filter: brightness(0) invert(1);
}

.group-detail-body .tab-button.is-active {
  color: #fff;
}

.group-details-modal-content {
  width: min(620px, 100%);
}

.group-details-body {
  display: grid;
  gap: 18px;
}

.group-details-section {
  display: grid;
  gap: 8px;
}

.group-details-section h4 {
  margin: 0;
}

.group-details-section p {
  margin: 0;
  max-width: none;
  color: var(--muted);
  line-height: 1.55;
}

.group-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-admin-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 10px;
}

.group-admin-list img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}

@media (max-width: 620px) {
  .group-detail-body .top-nav {
    padding-inline: 14px;
  }

  .group-detail-body .top-brand {
    font-size: 1.02rem;
  }

  .group-detail-body .top-nav .back-button,
  .group-menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .group-detail-body .group-overview-card {
    min-height: 640px;
    padding: calc(96px + env(safe-area-inset-top)) 14px 0;
  }

  .group-detail-body .group-hero-content {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .group-detail-body .group-title-row h2 {
    font-size: clamp(1.78rem, 8vw, 2.45rem);
  }

  .group-admin-tag {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  .group-detail-body .group-meta {
    gap: 5px;
  }

  .group-detail-body .group-meta .pill {
    min-height: 25px;
    padding: 3px 7px;
    font-size: 0.66rem;
  }

  .group-detail-body .group-meta .pill-icon {
    width: 12px;
    height: 12px;
  }

  .group-detail-body .tab-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 5px;
    margin-top: 24px;
    overflow: visible;
  }

  .group-detail-body .tab-button {
    min-height: 52px;
    padding-inline: 1px;
    gap: 3px;
    border-radius: 11px;
    font-size: clamp(0.52rem, 2.55vw, 0.66rem);
    line-height: 1.08;
  }

  .group-menu-panel {
    width: min(258px, calc(100vw - 24px));
  }
}

@media (max-width: 720px) {
  .group-detail-body [data-match-modal],
  .group-detail-body [data-match-predictions-modal],
  .group-detail-body [data-match-stats-modal],
  .group-detail-body [data-user-stats-modal] {
    padding-top: calc(34px + env(safe-area-inset-top)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    align-items: start !important;
  }

  .group-detail-body [data-match-modal] .modal-content,
  .group-detail-body [data-match-predictions-modal] .modal-content,
  .group-detail-body [data-match-stats-modal] .modal-content,
  .group-detail-body [data-user-stats-modal] .modal-content {
    max-height: calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  .group-detail-body [data-match-modal] .modal-header,
  .group-detail-body [data-match-predictions-modal] .modal-header,
  .group-detail-body [data-match-stats-modal] .modal-header,
  .group-detail-body [data-user-stats-modal] .modal-header {
    align-items: flex-start !important;
  }

  .group-detail-body [data-match-modal] .modal-header .icon-button,
  .group-detail-body [data-match-predictions-modal] .modal-header .icon-button,
  .group-detail-body [data-match-stats-modal] .modal-header .icon-button,
  .group-detail-body [data-user-stats-modal] .modal-header .icon-button {
    flex: 0 0 auto !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }
}

/* Compact cards for the More Active Challenges list. */
.global-challenge-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.global-challenge-list-header h3 {
  margin: 0;
  font-size: clamp(1.22rem, 3.2vw, 1.65rem);
  line-height: 1.1;
}

.global-challenge-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #126dff;
  padding: 0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.global-challenge-view-all svg {
  width: 18px;
  height: 18px;
}

.global-challenge-card-list {
  gap: 14px;
}

.global-challenge-card-list .global-challenge-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(58px, auto) 22px;
  gap: clamp(10px, 2vw, 18px);
  align-items: center;
  min-height: 128px;
  padding: clamp(14px, 2.4vw, 18px) clamp(14px, 2.7vw, 22px);
  border-radius: 20px;
  overflow: hidden;
}

.global-challenge-card-list .global-challenge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(255, 255, 255, 0.07), transparent 32%),
    radial-gradient(ellipse at 72% 50%, rgba(95, 151, 255, 0.1), transparent 42%);
  opacity: 0.7;
  mix-blend-mode: screen;
}

.global-challenge-card-list .global-challenge-card > * {
  position: relative;
  z-index: 1;
}

.global-challenge-card-list .global-challenge-card-copy {
  gap: 8px;
}

.global-challenge-card-list .global-challenge-card strong {
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  font-weight: 750;
  line-height: 1.12;
}

.global-challenge-card-list .global-challenge-meta {
  gap: 7px 10px;
  font-size: clamp(0.68rem, 1.85vw, 0.82rem);
  font-weight: 600;
}

.global-challenge-card-list .global-challenge-meta img,
.global-challenge-card-list .global-challenge-prize img {
  width: 15px;
  height: 15px;
}

.global-challenge-card-list .global-challenge-rule {
  border-radius: 10px;
  padding: 5px 9px;
  font-size: clamp(0.68rem, 1.9vw, 0.8rem);
  font-weight: 650;
  text-transform: none;
}

.global-challenge-card-list .global-challenge-rule b {
  color: var(--ink);
  font-weight: 750;
}

.global-challenge-card-list .global-challenge-prize {
  color: var(--ink);
  font-size: clamp(0.72rem, 2vw, 0.86rem);
  font-weight: 700;
  line-height: 1.22;
}

.global-challenge-card-list .global-challenge-joined {
  min-width: 58px;
  justify-items: start;
  color: #f5f8ff;
}

.global-challenge-card-list .global-challenge-joined b {
  font-size: clamp(0.94rem, 2.5vw, 1.08rem);
  font-weight: 800;
  line-height: 1.08;
}

.global-challenge-card-list .global-challenge-joined small {
  color: #b8c9ef;
  font-size: clamp(0.72rem, 1.9vw, 0.82rem);
  font-weight: 600;
  line-height: 1.12;
}

.global-challenge-card-list .global-challenge-arrow {
  justify-self: end;
  color: #f5f8ff;
  font-size: 2.15rem;
}

:root[data-theme="dark"] .global-challenge-card-list .global-challenge-card {
  border-color: rgba(57, 139, 255, 0.3);
  background: rgba(6, 22, 52, 0.72);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 232, 0.08);
}

:root[data-theme="dark"] .global-challenge-card-list .global-challenge-meta,
:root[data-theme="dark"] .global-challenge-card-list .global-challenge-meta span {
  color: #aebedf;
}

:root[data-theme="dark"] .global-challenge-card-list .global-challenge-rule {
  background: rgba(18, 109, 255, 0.14);
  color: #62a0ff;
}

:root[data-theme="dark"] .global-challenge-card-list .global-challenge-rule b,
:root[data-theme="dark"] .global-challenge-card-list .global-challenge-prize {
  color: #f5f8ff;
}

@media (max-width: 520px) {
  .global-challenge-list-header h3 {
    font-size: 1.12rem;
  }

  .global-challenge-view-all {
    font-size: 0.78rem;
  }

  .global-challenge-card-list .global-challenge-card {
    grid-template-columns: minmax(0, 1fr) minmax(48px, auto) 18px;
    min-height: 116px;
    padding: 12px;
    border-radius: 17px;
  }

  .global-challenge-card-list .global-challenge-card-copy {
    gap: 7px;
  }

  .global-challenge-card-list .global-challenge-card strong {
    font-size: 0.9rem;
  }

  .global-challenge-card-list .global-challenge-meta {
    gap: 5px 8px;
    font-size: 0.6rem;
  }

  .global-challenge-card-list .global-challenge-meta img,
  .global-challenge-card-list .global-challenge-prize img {
    width: 13px;
    height: 13px;
  }

  .global-challenge-card-list .global-challenge-rule {
    padding: 4px 7px;
    font-size: 0.62rem;
  }

  .global-challenge-card-list .global-challenge-prize {
    font-size: 0.64rem;
  }

  .global-challenge-card-list .global-challenge-joined {
    min-width: 48px;
  }

  .global-challenge-card-list .global-challenge-joined b {
    font-size: 0.82rem;
  }

  .global-challenge-card-list .global-challenge-joined small {
    font-size: 0.62rem;
  }

  .global-challenge-card-list .global-challenge-arrow {
    font-size: 1.8rem;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071733;
  --bg-2: #0c2147;
  --ink: #edf3ff;
  --muted: #a8b7da;
  --accent: #2e6bff;
  --accent-2: #2ab9c4;
  --accent-3: #83a8ff;
  --surface: #0f2248;
  --surface-2: #132c5a;
  --surface-3: #173567;
  --card: var(--surface);
  --border: rgba(165, 191, 255, 0.24);
  --shadow-sm: 0 10px 24px rgba(4, 10, 22, 0.45);
  --shadow: 0 24px 60px rgba(3, 8, 18, 0.55);
  --shadow-lg: 0 32px 80px rgba(2, 6, 14, 0.6);
  --nav-bg: #081631;
  --nav-ink: #edf3ff;
  --nav-muted: rgba(237, 243, 255, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(255, 107, 61, 0.16), transparent 55%),
    radial-gradient(circle at 15% 20%, rgba(2, 123, 136, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f2ea 0%, #f0e6d8 45%, #e8dbc9 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

:root[data-theme="dark"] body {
  background: radial-gradient(circle at top left, rgba(46, 107, 255, 0.22), transparent 55%),
    radial-gradient(circle at 15% 20%, rgba(42, 185, 196, 0.15), transparent 48%),
    linear-gradient(180deg, #071733 0%, #0a1c3b 46%, #0d2550 100%);
}

body.nav-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

html.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  z-index: -1;
  filter: blur(0px);
  opacity: 0.5;
}

body::before {
  top: -20vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(255, 107, 61, 0.2), transparent 70%);
}

:root[data-theme="dark"] body::before {
  background: radial-gradient(circle, rgba(46, 107, 255, 0.24), transparent 70%);
}

body::after {
  bottom: -25vw;
  left: -20vw;
  background: radial-gradient(circle, rgba(2, 123, 136, 0.18), transparent 70%);
}

:root[data-theme="dark"] body::after {
  background: radial-gradient(circle, rgba(42, 185, 196, 0.18), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px clamp(10px, 1.8vw, 18px) 80px;
}

.group-page {
  max-width: var(--max-width);
}

.page.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page.landing main {
  flex: 1;
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "top" "main";
  min-height: 100vh;
}

.top-nav {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--nav-bg);
  color: var(--nav-ink);
  position: sticky;
  top: 0;
  z-index: 35;
}

.top-brand {
  font-weight: 700;
  font-size: 1.05rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}



.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-back-icon {
  display: none;
}

.back-button svg {
  width: 22px;
  height: 22px;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 10, 0.5);
  display: none;
  z-index: 30;
}

.nav-backdrop.is-active {
  display: block;
}

.side-nav {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -280px;
  width: 260px;
  min-height: 100vh;
  padding: calc(22px + env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  z-index: 40;
  transition: left 0.25s ease;
  overflow-y: auto;
  background: linear-gradient(180deg, #171410 0%, #100d0b 100%);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.side-nav.is-open {
  left: 0;
}

.side-brand {
  font-size: 1.3rem;
  font-weight: 700;
}

.side-brand.app-brand {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.side-brand-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.side-brand-main img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.side-brand-legacy {
  max-width: 210px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.58rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.52),
    0 0 18px rgba(33, 231, 216, 0.24);
}

.side-links {
  display: grid;
  gap: 12px;
}

.side-icon-competitions {
  background: currentColor;
  object-fit: contain;
  -webkit-mask: url("/icons/compact/trophy-64.webp") center / contain no-repeat;
  mask: url("/icons/compact/trophy-64.webp") center / contain no-repeat;
}

.side-notifications {
  margin-top: 6px;
}

.side-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-actions .side-notifications {
  margin-top: 0;
}

.side-nav .notification-button {
  color: var(--nav-ink);
}

.side-nav .notifications-panel {
  left: 0;
  right: auto;
}

.side-nav .icon-button {
  background: rgba(255, 255, 255, 0.1);
}

.app-main {
  grid-area: main;
}

.view-context-strip {
  border-bottom: 1px solid rgba(21, 18, 14, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 247, 232, 0.94) 0%, rgba(247, 236, 220, 0.9) 100%);
  backdrop-filter: blur(4px);
}

.view-context-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #3f372f;
}

.view-context-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 42, 0.38);
  background: rgba(255, 92, 42, 0.12);
  color: #7d2e16;
  padding: 2px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.view-context-strip strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.view-context-strip span {
  font-size: 0.86rem;
}

.view-context-strip[data-view-kind="groups"] {
  background: linear-gradient(180deg, rgba(237, 251, 244, 0.94) 0%, rgba(226, 245, 235, 0.9) 100%);
}

.view-context-strip[data-view-kind="competitions"] {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.96) 0%, rgba(239, 249, 238, 0.9) 100%);
}

.view-context-strip[data-view-kind="matches"] {
  background: linear-gradient(180deg, rgba(235, 246, 255, 0.94) 0%, rgba(224, 237, 250, 0.9) 100%);
}

.view-context-strip[data-view-kind="gifts"] {
  background: linear-gradient(180deg, rgba(255, 246, 229, 0.94) 0%, rgba(249, 236, 210, 0.9) 100%);
}

.view-context-strip[data-view-kind="past-groups"] {
  background: linear-gradient(180deg, rgba(244, 241, 237, 0.94) 0%, rgba(236, 230, 220, 0.9) 100%);
}

.side-link {
  text-align: left;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.side-link.is-active,
.side-link:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.side-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.side-user {
  font-size: 0.9rem;
  color: var(--nav-muted);
}

.side-action {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
}

.side-action[data-logout] {
  border-color: rgba(255, 87, 87, 0.42);
  background: rgba(180, 35, 24, 0.16);
  color: #ffb7b7;
}

.side-action[data-logout]:hover,
.side-action[data-logout]:focus-visible {
  border-color: rgba(255, 87, 87, 0.68);
  background: rgba(180, 35, 24, 0.26);
  color: #ffffff;
}

.side-action[data-logout] .side-icon {
  filter: invert(49%) sepia(76%) saturate(1215%) hue-rotate(324deg) brightness(104%) contrast(102%);
}

.side-version {
  padding: 0 2px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.68rem;
  font-weight: 700;
}

.side-icon {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  object-fit: contain;
  flex: 0 0 16px;
  display: block;
}

.side-link img.side-icon,
.side-action img.side-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  justify-self: center;
  filter: brightness(0) invert(1);
}

.side-action[data-logout] .side-icon {
  filter: invert(49%) sepia(76%) saturate(1215%) hue-rotate(324deg) brightness(104%) contrast(102%);
}

.side-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-main {
  min-width: 0;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notifications {
  position: relative;
}

.notification-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  gap: 0;
  color: inherit;
}

.notification-button svg {
  width: 20px;
  height: 20px;
}

.notification-button svg.is-hidden {
  display: none;
}

.notification-bell-lottie {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.notification-bell-lottie.is-hidden {
  display: none;
}

.notification-bell-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  transform: scale(1.15);
  transform-origin: center center;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notifications-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: min(360px, 80vw);
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 19, 17, 0.16);
  z-index: 20;
  overflow: hidden;
}

@media (max-width: 720px) {
  .section.section-compact {
    margin-bottom: 28px;
  }

  .notifications-panel {
    position: fixed;
    top: 80px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }

  .admin-sidebar .notifications-panel {
    left: 12px;
    right: 12px;
  }
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #efe5d6;
  background: #fcf7f0;
}

.notifications-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notifications-push {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1e7d8;
  background: #fffdf8;
}

.notifications-push .button.is-push-disable {
  background: #b42318;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(180, 35, 24, 0.22);
}

.notifications-push .button.is-push-disable:hover {
  box-shadow: 0 14px 30px rgba(180, 35, 24, 0.3);
}

.notifications-push .button.is-push-enable {
  background: #15803d;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.22);
}

.notifications-push .button.is-push-enable:hover {
  box-shadow: 0 14px 30px rgba(21, 128, 61, 0.3);
}

.notification-push-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.notification-push-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.notifications-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f1e7d8;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.is-unread {
  background: #fff6ea;
}

.notification-item .notification-title {
  font-weight: 600;
}

.notification-item .notification-body {
  color: #3d372f;
  font-size: 0.9rem;
}

.notification-item .notification-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.notification-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.notification-action-status {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
  text-transform: capitalize;
}

.notification-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-loading-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 0;
  text-align: center;
}

.inline-loading-lottie {
  width: 92px;
  height: 92px;
}

.inline-loading-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7f1e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-notifications {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.profile-button {
  position: relative;
  z-index: 2;
  cursor: pointer;
  touch-action: manipulation;
}

.profile-button .user-avatar {
  width: 20px;
  height: 20px;
}

.profile-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7f1e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-predictions-button {
  white-space: nowrap;
}

.participants-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(74, 120, 205, 0.35);
  border-radius: 24px;
  padding: clamp(16px, 2.2vw, 28px);
  background:
    radial-gradient(circle at 92% 6%, rgba(46, 107, 255, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(8, 25, 58, 0.96), rgba(5, 15, 37, 0.98));
  color: #edf3ff;
  box-shadow: 0 26px 70px rgba(3, 8, 18, 0.35);
}

:root:not([data-theme="dark"]) .participants-panel {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(249, 241, 230, 0.92));
  color: var(--ink);
  box-shadow: var(--shadow);
}

.participants-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 16px;
  align-items: center;
}

.participants-hero h2 {
  margin: 0;
  color: currentColor;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1;
}

.participants-hero .muted {
  max-width: 620px;
  margin: 12px 0 0;
}

.participants-hero img {
  width: min(128px, 26vw);
  justify-self: end;
  opacity: 0.88;
  filter: brightness(0) saturate(100%) invert(86%) sepia(76%) saturate(741%) hue-rotate(43deg)
    brightness(103%) contrast(93%) drop-shadow(0 0 10px rgba(115, 243, 93, 0.5));
}

:root:not([data-theme="dark"]) .participants-hero img {
  opacity: 0.72;
  filter: brightness(0);
}

.participants-stats,
.participants-controls {
  display: grid;
  gap: 14px;
}

.participants-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.participants-stat {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(96, 131, 196, 0.36);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(13, 38, 82, 0.6);
}

:root:not([data-theme="dark"]) .participants-stat {
  background: rgba(255, 253, 248, 0.76);
}

.participants-stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(46, 107, 255, 0.16);
  border: 1px solid rgba(96, 131, 196, 0.36);
}

.participants-stat-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

:root:not([data-theme="dark"]) .participants-stat-icon img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(42%) saturate(2050%) hue-rotate(200deg)
    brightness(95%) contrast(95%);
}

.participants-stat-icon-live::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #73f35d;
  box-shadow: 0 0 0 9px rgba(115, 243, 93, 0.13);
}

.participants-stat strong,
.participants-stat small {
  display: block;
  min-width: 0;
}

.participants-stat strong {
  color: currentColor;
  font-size: 1.35rem;
  line-height: 1;
}

.participants-stat small {
  margin-top: 3px;
  color: #a8b7da;
  font-size: 0.86rem;
}

:root:not([data-theme="dark"]) .participants-stat small {
  color: var(--muted);
}

.participants-controls {
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.participants-search,
.participants-sort {
  position: relative;
  display: grid;
  min-width: 0;
}

.participants-search input,
.participants-sort select {
  min-height: 54px;
  border-radius: 16px;
  border-color: rgba(96, 131, 196, 0.42);
  background: rgba(8, 26, 59, 0.78);
  color: #edf3ff;
  font-size: 0.92rem;
  box-shadow: none;
}

:root:not([data-theme="dark"]) .participants-search input,
:root:not([data-theme="dark"]) .participants-sort select {
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
}

.participants-search input {
  padding-left: 46px;
}

.participants-sort select {
  padding-left: 42px;
  padding-right: 34px;
  font-weight: 800;
  background-color: rgba(8, 26, 59, 0.78);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23DCE8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 15px 15px !important;
}

:root:not([data-theme="dark"]) .participants-sort select {
  background-color: rgba(255, 253, 248, 0.9);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%231C3C75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.participants-search-icon,
.participants-sort-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #a8b7da;
  pointer-events: none;
  z-index: 1;
}

.participants-search-icon::before {
  content: "";
  position: absolute;
  inset: 1px 5px 5px 1px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.participants-search-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.participants-sort-icon::before,
.participants-sort-icon::after {
  content: "";
  position: absolute;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.participants-sort-icon::before {
  top: 3px;
  width: 18px;
  box-shadow: 0 7px 0 currentColor;
}

.participants-sort-icon::after {
  top: 17px;
  width: 11px;
}

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

.participant-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(57, 109, 205, 0.34);
  border-radius: 18px;
  background: rgba(6, 21, 50, 0.74);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.participant-card:focus-visible,
.participant-card:hover {
  border-color: rgba(33, 231, 216, 0.72);
  box-shadow: 0 14px 34px rgba(9, 39, 88, 0.22);
  outline: none;
}

.participant-card:active {
  transform: translateY(1px);
}

:root:not([data-theme="dark"]) .participant-card {
  background: rgba(255, 253, 248, 0.84);
  border-color: rgba(46, 107, 255, 0.16);
}

.participant-card.is-rank-1 {
  border-color: rgba(242, 180, 61, 0.78);
  box-shadow: inset 0 0 0 1px rgba(242, 180, 61, 0.18);
}

.participant-card.is-rank-2 {
  border-color: rgba(210, 224, 243, 0.72);
}

.participant-card.is-rank-3 {
  border-color: rgba(225, 138, 66, 0.68);
}

.participant-rank {
  align-self: stretch;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  color: #dce8ff;
  font-size: 1.55rem;
  font-weight: 900;
  background: rgba(46, 107, 255, 0.08);
  border-right: 1px solid rgba(96, 131, 196, 0.16);
}

:root:not([data-theme="dark"]) .participant-rank {
  color: #1c3c75;
  background: rgba(46, 107, 255, 0.06);
}

.participant-card.is-rank-1 .participant-rank {
  color: #ffe29b;
  background: linear-gradient(90deg, rgba(242, 180, 61, 0.22), rgba(242, 180, 61, 0.06));
}

.participant-card.is-rank-2 .participant-rank {
  color: #dce8ff;
  background: linear-gradient(90deg, rgba(210, 224, 243, 0.18), rgba(210, 224, 243, 0.04));
}

.participant-card.is-rank-3 .participant-rank {
  color: #ffc58f;
  background: linear-gradient(90deg, rgba(225, 138, 66, 0.2), rgba(225, 138, 66, 0.04));
}

.participant-rank-medal {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(242, 180, 61, 0.34));
}

.participant-rank-medal-2,
.participant-rank-medal-3 {
  position: relative;
  display: inline-block;
  border-radius: 999px;
}

.participant-rank-medal-2 {
  background: linear-gradient(135deg, #f5f8ff, #8fa7cf);
}

.participant-rank-medal-3 {
  background: linear-gradient(135deg, #ffcc95, #b96925);
}

.participant-rank-medal-2::before,
.participant-rank-medal-3::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 7px;
  width: 10px;
  height: 10px;
  border-radius: 0 0 3px 3px;
  background: currentColor;
  opacity: 0.62;
}

.participant-card .user-avatar {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.participant-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.participant-main strong {
  min-width: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 1.1rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-joined {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a8b7da;
  font-size: 0.9rem;
}

:root:not([data-theme="dark"]) .participant-joined {
  color: var(--muted);
}

.participant-last-seen {
  min-width: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #21e7d8;
  font-size: 0.82rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root:not([data-theme="dark"]) .participant-last-seen {
  color: #027b88;
}

.participant-last-seen img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: brightness(0) saturate(100%) invert(78%) sepia(78%) saturate(1577%) hue-rotate(123deg)
    brightness(101%) contrast(83%);
}

:root:not([data-theme="dark"]) .participant-last-seen img {
  filter: brightness(0) saturate(100%) invert(38%) sepia(43%) saturate(897%) hue-rotate(137deg)
    brightness(91%) contrast(91%);
}

.participant-joined img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

:root:not([data-theme="dark"]) .participant-joined img {
  filter: brightness(0) saturate(100%) invert(30%) sepia(15%) saturate(772%) hue-rotate(179deg)
    brightness(91%) contrast(88%);
}

.participant-card .member-predictions-button {
  min-height: 34px;
  margin-right: 16px;
  padding: 0 14px;
  border-color: rgba(46, 133, 255, 0.8);
  color: #edf3ff;
  font-size: 0.76rem;
  font-weight: 800;
}

:root:not([data-theme="dark"]) .participant-card .member-predictions-button {
  color: #124ab8;
}

.participant-card.is-rank-1 .member-predictions-button {
  background: linear-gradient(135deg, #2e6bff, #0877ff);
  border-color: transparent;
  color: #fff;
}

.participants-empty {
  margin: 0;
  border: 1px solid rgba(96, 131, 196, 0.26);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

@media (max-width: 720px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .participants-panel {
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
  }

  .participants-hero {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .participants-hero h2 {
    font-size: 2.65rem;
  }

  .participants-hero .muted {
    margin-top: 8px;
    font-size: 1.05rem;
  }

  .participants-hero img {
    width: 82px;
  }

  .participants-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .participants-stat {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 58px;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .participants-stat-icon {
    width: 32px;
    height: 32px;
  }

  .participants-stat-icon img {
    width: 15px;
    height: 15px;
  }

  .participants-stat strong {
    font-size: 0.96rem;
  }

  .participants-stat small {
    font-size: 0.62rem;
  }

  .participants-controls {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 8px;
  }

  .participants-search input,
  .participants-sort select {
    min-height: 42px;
    border-radius: 13px;
    font-size: 16px;
  }

  .participants-search input {
    padding-left: 36px;
  }

  .participants-sort select {
    padding-left: 30px;
    padding-right: 22px;
    background-position: right 8px center !important;
    background-size: 12px 12px !important;
  }

  .participants-search-icon {
    left: 13px;
    width: 15px;
    height: 15px;
  }

  .participants-sort-icon {
    left: 10px;
    width: 14px;
    height: 14px;
  }

  .participants-sort-icon::before {
    width: 14px;
    box-shadow: 0 5px 0 currentColor;
  }

  .participants-sort-icon::after {
    top: 13px;
    width: 8px;
  }

  .participant-card {
    grid-template-columns: 42px 40px minmax(0, 1fr) minmax(88px, auto);
    gap: 8px;
    padding-right: 8px;
    border-radius: 15px;
  }

  .participant-rank {
    min-height: 66px;
    font-size: 1.05rem;
  }

  .participant-rank-medal {
    width: 20px;
    height: 20px;
  }

  .participant-card .user-avatar {
    width: 40px;
    height: 40px;
  }

  .participant-main strong {
    font-size: 0.9rem;
  }

  .participant-joined {
    gap: 5px;
    font-size: 0.7rem;
  }

  .participant-joined img {
    width: 10px;
    height: 10px;
  }

  .participant-last-seen {
    gap: 4px;
    font-size: 0.64rem;
  }

  .participant-last-seen img {
    width: 10px;
    height: 10px;
  }

  .participant-card .member-predictions-button {
    grid-column: auto;
    width: auto;
    min-height: 28px;
    margin: 0;
    padding: 0 7px;
    font-size: 0.64rem;
  }
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 12px;
}

.avatar-actions {
  display: flex;
  justify-content: flex-start;
}

.avatar-option {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.avatar-option img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #f7f1e8;
  display: block;
}

.avatar-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 123, 136, 0.18), 0 8px 20px rgba(2, 123, 136, 0.18);
  transform: translateY(-1px);
}

:root[data-theme="dark"] .avatar-option.is-selected {
  border-color: #f2bf5a;
  box-shadow: 0 0 0 3px rgba(242, 191, 90, 0.34), 0 12px 28px rgba(242, 191, 90, 0.22);
}

:root[data-theme="dark"] .avatar-option.is-selected img {
  box-shadow: 0 0 0 2px rgba(242, 191, 90, 0.72);
}

.turnstile-shell {
  margin-top: 10px;
}

.profile-form .field .muted {
  font-size: 0.85rem;
}

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

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-3));
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.theme-switch input:checked + .theme-switch-track {
  background: linear-gradient(135deg, #2e6bff 0%, #3b8cff 100%);
  border-color: rgba(123, 167, 255, 0.8);
}

.theme-switch input:checked + .theme-switch-track::after {
  transform: translateX(20px);
}

.theme-switch input:focus-visible + .theme-switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-view {
  display: grid;
  gap: 18px;
}

.profile-hero-card,
.profile-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.profile-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.profile-hero-avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  padding: 4px;
  background: linear-gradient(145deg, #f2bf5a, #fffdf8);
  box-shadow: 0 14px 28px rgba(21, 18, 14, 0.12);
}

.profile-hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
  background: #f7f1e8;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-kicker {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.profile-hero-copy h2 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.4rem);
}

.profile-hero-stats {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-hero-theme {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: grid;
  gap: 4px;
}

.profile-hero-theme .muted {
  font-size: 0.85rem;
}

.profile-hero-stats div,
.profile-hero-theme,
.profile-stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 12px;
}

.profile-hero-stats strong,
.profile-stat-card strong {
  display: block;
  font-size: 1.3rem;
  color: var(--ink);
}

.profile-hero-stats span,
.profile-stat-card span,
.profile-stat-card small {
  color: var(--muted);
  font-weight: 750;
  font-size: 0.82rem;
}

.profile-tab-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(75, 131, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-tab-bar::-webkit-scrollbar {
  display: none;
}

.profile-tab-bar button {
  position: relative;
  flex: 1 1 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  padding: 7px 4px 10px;
  box-shadow: none;
  white-space: nowrap;
}

.profile-tab-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
  filter: brightness(0) saturate(100%) invert(34%) sepia(14%) saturate(732%) hue-rotate(349deg)
    brightness(89%) contrast(86%);
}

.profile-tab-bar button span {
  min-width: 0;
  max-width: 100%;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
}

.profile-tab-bar button.is-hidden {
  display: none;
}

.profile-tab-bar button.is-active {
  color: var(--accent-2);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.profile-tab-bar button.is-active::after {
  content: "";
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.profile-tab-bar button.is-active .profile-tab-icon {
  filter: brightness(0) saturate(100%) invert(31%) sepia(94%) saturate(1006%) hue-rotate(148deg)
    brightness(93%) contrast(98%);
}

[data-user-profile-id] {
  cursor: pointer;
}

[data-user-profile-id]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 12px;
}

.profile-tab-panel {
  display: grid;
  gap: 16px;
}

.profile-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.profile-card h3 {
  margin: 0;
}

.profile-level-track {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.profile-level-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #027b88, #2e6bff);
  transition: width 0.24s ease;
}

.profile-section-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.profile-section-title h3 {
  margin: 0 0 4px;
}

.profile-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px;
}

.profile-badge-item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 144px;
  border: 1px solid rgba(2, 123, 136, 0.52);
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 8px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(2, 123, 136, 0.12) inset, 0 0 22px rgba(2, 123, 136, 0.15);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-badge-item:hover {
  border-color: rgba(2, 123, 136, 0.82);
  box-shadow: 0 0 0 1px rgba(2, 123, 136, 0.18) inset, 0 0 28px rgba(2, 123, 136, 0.24);
  transform: translateY(-1px);
}

.profile-badge-item:focus-visible {
  outline: 3px solid rgba(2, 123, 136, 0.24);
  outline-offset: 3px;
}

.profile-badge-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: transparent;
  overflow: hidden;
}

.profile-badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-badge-icon span {
  font-size: 1.1rem;
  font-weight: 900;
}

.profile-badge-item strong {
  font-size: 0.86rem;
  line-height: 1.15;
}

.profile-badge-item small,
.profile-mini-row small {
  color: var(--muted);
  font-weight: 700;
}

.profile-badge-modal-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.profile-badge-modal-share img {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
}

.profile-badge-modal-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.profile-badge-modal-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(2, 123, 136, 0.56);
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(2, 123, 136, 0.14) inset, 0 0 28px rgba(2, 123, 136, 0.2);
}

.profile-badge-modal-icon img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.profile-badge-modal-main.is-locked .profile-badge-modal-icon {
  filter: grayscale(1);
}

.profile-badge-modal-copy {
  display: grid;
  gap: 6px;
}

.profile-badge-modal-copy h4,
.profile-badge-modal-copy p {
  margin: 0;
}

.profile-badge-modal-copy span {
  color: var(--accent-2);
  font-weight: 850;
}

[data-profile-badge-modal].modal.sheet {
  align-items: end;
  justify-items: center;
  place-items: end center;
  padding: 20px 20px max(0px, env(safe-area-inset-bottom));
}

[data-profile-badge-modal] .profile-badge-modal-content.modal-content.sheet {
  align-self: end;
  justify-self: center;
  width: min(560px, 100%);
  max-height: min(85vh, 620px);
  margin: auto 0 0;
  border-radius: 18px 18px 0 0;
  transform-origin: bottom center;
  animation: sheetSlideUp 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-profile-badge-modal].is-closing .profile-badge-modal-content.modal-content.sheet {
  animation: sheetSlideDown 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-badge-item.is-locked {
  opacity: 0.72;
}

.profile-badge-item.is-locked .profile-badge-icon {
  filter: grayscale(1);
}

.profile-badge-item.is-locked:hover {
  transform: none;
}

.profile-target-list,
.profile-award-list {
  display: grid;
  gap: 10px;
}

.profile-mini-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.profile-mini-row strong,
.profile-mini-row small {
  display: block;
}

.profile-mini-medal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--muted);
  font-weight: 900;
  filter: grayscale(1);
}

.profile-mini-medal img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.profile-mini-medal.is-earned {
  filter: none;
  color: #15120e;
  background: linear-gradient(145deg, #f2bf5a, #fff3c2);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.is-profile-view .nav-menu-icon {
  display: none !important;
}

body.is-profile-view .nav-back-icon {
  display: block !important;
}

:root[data-theme="dark"] .profile-hero-card,
:root[data-theme="dark"] .profile-card {
  border-color: rgba(82, 132, 219, 0.48);
  background: linear-gradient(180deg, rgba(7, 25, 62, 0.96), rgba(5, 20, 50, 0.98));
  box-shadow: 0 0 0 1px rgba(46, 107, 255, 0.18), 0 24px 70px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .profile-hero-stats div,
:root[data-theme="dark"] .profile-hero-theme,
:root[data-theme="dark"] .profile-stat-card,
:root[data-theme="dark"] .profile-tab-bar {
  border-color: rgba(82, 132, 219, 0.48);
  background: linear-gradient(145deg, rgba(13, 41, 93, 0.82), rgba(8, 29, 70, 0.78));
}

:root[data-theme="dark"] .profile-tab-bar button {
  color: #b9c9ec;
}

:root[data-theme="dark"] .profile-tab-icon {
  filter: brightness(0) invert(1) opacity(0.82);
}

:root[data-theme="dark"] .profile-tab-bar button.is-active {
  color: #fff;
  border-color: transparent;
  background: transparent;
}

:root[data-theme="dark"] .profile-tab-bar button.is-active .profile-tab-icon {
  filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(37, 199, 133, 0.45));
}

:root[data-theme="dark"] .profile-badge-item,
:root[data-theme="dark"] .profile-stat-card strong,
:root[data-theme="dark"] .profile-hero-stats strong {
  color: #edf3ff;
}

:root[data-theme="dark"] .profile-badge-item {
  border-color: rgba(27, 218, 199, 0.48);
  box-shadow: 0 0 0 1px rgba(27, 218, 199, 0.12) inset, 0 0 26px rgba(27, 218, 199, 0.16);
}

:root[data-theme="dark"] .profile-badge-item:hover {
  border-color: rgba(27, 218, 199, 0.74);
  box-shadow: 0 0 0 1px rgba(27, 218, 199, 0.18) inset, 0 0 34px rgba(27, 218, 199, 0.24);
}

:root[data-theme="dark"] .profile-badge-modal-icon {
  border-color: rgba(27, 218, 199, 0.52);
  box-shadow: 0 0 0 1px rgba(27, 218, 199, 0.14) inset, 0 0 30px rgba(27, 218, 199, 0.18);
}

:root[data-theme="dark"] .profile-level-track,
:root[data-theme="dark"] .profile-mini-medal {
  background: rgba(69, 112, 203, 0.32);
}

:root[data-theme="dark"] .profile-level-fill {
  background: linear-gradient(90deg, #1bdac7, #4b83ff);
}

@media (max-width: 760px) {
  .profile-panel-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-badge-modal-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-badge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .profile-hero-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
}

.nav a {
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

:root[data-theme="dark"] .nav a {
  opacity: 0.9;
  color: #d7e5ff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(21, 18, 14, 0.16);
}

.button:focus-visible {
  outline: 2px solid rgba(2, 123, 136, 0.4);
  outline-offset: 2px;
}

.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button[disabled]:hover {
  transform: none;
  box-shadow: none;
}

.button.primary {
  background: linear-gradient(135deg, #ff6b3d 0%, #ff8a5a 100%);
  color: white;
  border-color: transparent;
}

:root[data-theme="dark"] .button.primary {
  background: linear-gradient(135deg, #2e6bff 0%, #3f86ff 100%);
}

:root[data-theme="dark"] .button.primary:hover {
  box-shadow: 0 18px 40px rgba(46, 107, 255, 0.34);
}

:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .prediction-success-overlay {
  background: rgba(2, 9, 22, 0.6);
}

:root[data-theme="dark"] .side-nav {
  background: linear-gradient(180deg, #0a1936 0%, #07142d 100%);
}

:root[data-theme="dark"] .coupon-preview,
:root[data-theme="dark"] .gift-card-code,
:root[data-theme="dark"] .reward-code-block,
:root[data-theme="dark"] .rules-icon,
:root[data-theme="dark"] .match-detail,
:root[data-theme="dark"] .accordion,
:root[data-theme="dark"] .accordion.is-warm,
:root[data-theme="dark"] .h2h-panel,
:root[data-theme="dark"] .prediction-panel,
:root[data-theme="dark"] .h2h-item,
:root[data-theme="dark"] .pill-button.competition-see-all,
:root[data-theme="dark"] .pill-button.competition-see-all .pill-icon {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink);
}

:root[data-theme="dark"] .h2h-logo,
:root[data-theme="dark"] .reward-qr,
:root[data-theme="dark"] .coupon-preview img,
:root[data-theme="dark"] .coupon-image-placeholder {
  background: #0a1a38;
  border-color: var(--border);
}

:root[data-theme="dark"] .competition-pill-row {
  background: rgba(10, 24, 52, 0.82);
  box-shadow: 0 10px 18px rgba(3, 8, 18, 0.45);
}

:root[data-theme="dark"] .share-button {
  background: rgba(14, 35, 75, 0.92);
  border: 1px solid var(--border);
}

:root[data-theme="dark"] .share-button img {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .prediction-bar,
:root[data-theme="dark"] .h2h-bar,
:root[data-theme="dark"] .match-gift-preview,
:root[data-theme="dark"] .api-predictions,
:root[data-theme="dark"] .accordion.odds-accordion,
:root[data-theme="dark"] .pre-match-odds-market,
:root[data-theme="dark"] .pre-match-odd,
:root[data-theme="dark"] .prediction-row,
:root[data-theme="dark"] .prediction-stage-toggle,
:root[data-theme="dark"] .prediction-stage-card,
:root[data-theme="dark"] .matchup-mini {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink);
}

:root[data-theme="dark"] .accordion.odds-accordion {
  background:
    linear-gradient(180deg, rgba(33, 231, 216, 0.08), rgba(33, 231, 216, 0.02) 70%),
    var(--surface-2);
  border-color: rgba(33, 231, 216, 0.42);
}

:root[data-theme="dark"] .pre-match-odds-market {
  background: rgba(8, 24, 54, 0.68);
  border-color: rgba(90, 125, 191, 0.58);
}

:root[data-theme="dark"] .pre-match-odd {
  background: rgba(9, 30, 70, 0.76);
  border-color: rgba(67, 125, 230, 0.58);
}

:root[data-theme="dark"] .accordion-label-icon.is-odds img {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .prediction-table-head {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .timeline-prediction-tags > span,
:root[data-theme="dark"] .timeline-prediction-tags > button {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

:root[data-theme="dark"] .timeline-prediction-tags .timeline-bonus-goal {
  border-color: rgba(33, 231, 216, 0.52);
  background: rgba(33, 231, 216, 0.14);
  color: #7ff8ef;
}

:root[data-theme="dark"] .timeline-prediction-tags .timeline-bonus-assist {
  border-color: rgba(82, 137, 255, 0.5);
  background: rgba(46, 107, 255, 0.18);
  color: #a9c5ff;
}

:root[data-theme="dark"] .timeline-prediction-tags .timeline-bonus-winner {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(251, 191, 36, 0.16);
  color: #ffd979;
}

:root[data-theme="dark"] .timeline-prediction-tags .timeline-bonus-tag.is-correct {
  border-color: rgba(37, 199, 133, 0.58);
  background: rgba(37, 199, 133, 0.18);
  color: #8cf0c0;
}

:root[data-theme="dark"] .timeline-prediction-tags .timeline-bonus-tag.is-wrong {
  border-color: rgba(255, 87, 87, 0.58);
  background: rgba(255, 87, 87, 0.16);
  color: #ffb3b3;
}

:root[data-theme="dark"] .member-predictions .timeline-prediction-row {
  background: var(--surface-2);
  border-color: var(--border);
}

:root[data-theme="dark"] .timeline-score.is-hidden-score {
  background: rgba(46, 107, 255, 0.14);
}

:root[data-theme="dark"] .notifications-panel {
  background: #0f2248;
  color: var(--ink);
  border-color: var(--border);
  box-shadow: 0 20px 44px rgba(2, 8, 20, 0.62);
}

:root[data-theme="dark"] .notifications-header {
  background: #142d5f;
  border-bottom-color: var(--border);
}

:root[data-theme="dark"] .notifications-push {
  background: #102653;
  border-bottom-color: var(--border);
}

:root[data-theme="dark"] .notification-item {
  border-bottom-color: var(--border);
}

:root[data-theme="dark"] .notification-item:hover {
  background: rgba(46, 107, 255, 0.12);
}

:root[data-theme="dark"] .notification-item.is-unread {
  background: rgba(46, 107, 255, 0.18);
}

:root[data-theme="dark"] .notification-item .notification-title {
  color: #eaf1ff;
}

:root[data-theme="dark"] .notification-item .notification-body,
:root[data-theme="dark"] .notification-push-meta,
:root[data-theme="dark"] .notification-item .notification-meta,
:root[data-theme="dark"] .notification-empty {
  color: #b7c7eb;
}

:root[data-theme="dark"] .chip-title,
:root[data-theme="dark"] .prediction-row .muted,
:root[data-theme="dark"] .matchup-vs,
:root[data-theme="dark"] .matchup-name {
  color: #b7c7eb;
}

:root[data-theme="dark"] .prediction-row strong,
:root[data-theme="dark"] .prediction-row .prediction-score,
:root[data-theme="dark"] .prediction-row .prediction-scoreline,
:root[data-theme="dark"] .prediction-row .prediction-score-value,
:root[data-theme="dark"] .prediction-row .prediction-team-name,
:root[data-theme="dark"] .matchup-score {
  color: var(--ink);
}

:root[data-theme="dark"] .prediction-row .prediction-score-sep {
  color: #9db2de;
}

:root[data-theme="dark"] .prediction-points.is-danger {
  color: #ff8585;
}

:root[data-theme="dark"] .leaderboard-panel {
  background:
    radial-gradient(circle at 12% 8%, rgba(46, 107, 255, 0.26), transparent 50%),
    radial-gradient(circle at 88% 18%, rgba(42, 185, 196, 0.2), transparent 48%),
    linear-gradient(180deg, #06152f 0%, #0b224b 100%);
  border-color: rgba(46, 107, 255, 0.46);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(141, 180, 255, 0.08);
}

:root[data-theme="dark"] .leaderboard-panel::after {
  background-image: radial-gradient(rgba(190, 214, 255, 0.28) 1px, transparent 0);
  opacity: 0.12;
}

:root[data-theme="dark"] .leaderboard-panel-title,
:root[data-theme="dark"] .leaderboard-panel .muted,
:root[data-theme="dark"] .leaderboard-table thead th {
  color: #b8c9ee;
}

:root[data-theme="dark"] .leaderboard-tab {
  color: #dce8ff;
}

:root[data-theme="dark"] .leaderboard-tab.is-active {
  background: linear-gradient(135deg, #0b5cff 0%, #0641c4 100%);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(46, 107, 255, 0.36);
}

:root[data-theme="dark"] .leaderboard-tabs {
  background: rgba(4, 16, 36, 0.76);
  border-color: rgba(85, 133, 255, 0.28);
}

:root[data-theme="dark"] .leaderboard-filter select {
  background:
    linear-gradient(180deg, rgba(5, 18, 41, 0.96), rgba(9, 30, 66, 0.98));
  border-color: rgba(85, 133, 255, 0.42);
  color: #f2f7ff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .leaderboard-filter select option,
:root[data-theme="dark"] .leaderboard-filter select optgroup {
  background: #091e42;
  color: #f2f7ff;
}

:root[data-theme="dark"] .view-context-strip {
  border-bottom-color: rgba(133, 170, 255, 0.3);
  background: linear-gradient(180deg, rgba(7, 23, 51, 0.98) 0%, rgba(12, 33, 71, 0.94) 100%);
}

:root[data-theme="dark"] .view-context-strip-inner {
  color: #dce9ff;
}

:root[data-theme="dark"] .view-context-kicker {
  border-color: rgba(46, 107, 255, 0.55);
  background: rgba(46, 107, 255, 0.24);
  color: #d5e4ff;
}

:root[data-theme="dark"] .view-context-strip[data-view-kind="groups"] {
  background: linear-gradient(180deg, rgba(10, 52, 40, 0.95) 0%, rgba(12, 62, 46, 0.92) 100%);
}

:root[data-theme="dark"] .view-context-strip[data-view-kind="competitions"] {
  background: linear-gradient(180deg, rgba(8, 35, 72, 0.96) 0%, rgba(7, 26, 58, 0.94) 100%);
}

:root[data-theme="dark"] .view-context-strip[data-view-kind="matches"] {
  background: linear-gradient(180deg, rgba(8, 36, 63, 0.95) 0%, rgba(11, 46, 78, 0.92) 100%);
}

:root[data-theme="dark"] .view-context-strip[data-view-kind="gifts"] {
  background: linear-gradient(180deg, rgba(56, 38, 11, 0.95) 0%, rgba(66, 45, 14, 0.92) 100%);
}

:root[data-theme="dark"] .view-context-strip[data-view-kind="past-groups"] {
  background: linear-gradient(180deg, rgba(36, 34, 30, 0.96) 0%, rgba(47, 43, 36, 0.92) 100%);
}

:root[data-theme="dark"] .leaderboard-table tbody tr {
  background:
    linear-gradient(180deg, rgba(8, 29, 63, 0.92), rgba(6, 23, 50, 0.94));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .leaderboard-clickable-row:hover {
  background:
    linear-gradient(180deg, rgba(12, 42, 87, 0.98), rgba(8, 32, 72, 0.98));
}

:root[data-theme="dark"] .leaderboard-row-first {
  background:
    linear-gradient(180deg, rgba(44, 35, 10, 0.96), rgba(18, 36, 66, 0.96));
  box-shadow:
    0 0 0 1px rgba(212, 155, 0, 0.62),
    0 18px 44px rgba(212, 155, 0, 0.16);
}

:root[data-theme="dark"] .leaderboard-table tbody td,
:root[data-theme="dark"] .leaderboard-table tbody td:first-child {
  color: #e9f2ff;
}

:root[data-theme="dark"] .leaderboard-table tbody td:last-child {
  color: #3c8dff;
}

:root[data-theme="dark"] .match-stage-chip {
  color: #e8f1ff;
  text-shadow: 0 1px 1px rgba(5, 12, 28, 0.5);
}

.button.primary:hover {
  box-shadow: 0 18px 40px rgba(255, 107, 61, 0.28);
}

.button.danger {
  background: #b42318;
  color: white;
  border-color: transparent;
}

.button.danger:hover {
  box-shadow: 0 8px 24px rgba(180, 35, 24, 0.28);
}

.button.ghost {
  background: transparent;
  box-shadow: none;
}

.button.small {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
  margin-bottom: 80px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 0 0 16px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 520px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.meta {
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

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

.hero-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 107, 61, 0.14), transparent 55%);
  pointer-events: none;
}

.hero-carousel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  min-height: 240px;
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(21, 18, 14, 0.08), transparent 60%);
  pointer-events: none;
}

.leaderboard-view-hero {
  margin-bottom: 24px;
}

.leaderboard-view-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(126, 76, 27, 0.24);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 92, 42, 0.2), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(2, 123, 136, 0.2), transparent 42%),
    linear-gradient(145deg, #fff4de 0%, #f3e1c8 100%);
  box-shadow: 0 20px 48px rgba(50, 35, 18, 0.16);
}

.leaderboard-view-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 55%
    ),
    radial-gradient(rgba(80, 57, 37, 0.12) 1px, transparent 0);
  background-size:
    100% 100%,
    12px 12px;
  opacity: 0.28;
  pointer-events: none;
}

.leaderboard-view-hero-card > * {
  position: relative;
  z-index: 1;
}

.leaderboard-view-hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.leaderboard-view-hero-card .lead {
  margin-bottom: 18px;
  max-width: 62ch;
}

.leaderboard-view-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.leaderboard-view-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(21, 18, 14, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #44382c;
  padding: 6px 12px;
  font-size: 0.83rem;
  font-weight: 600;
}

:root[data-theme="dark"] .leaderboard-view-hero-card {
  border-color: rgba(125, 159, 238, 0.32);
  background:
    radial-gradient(circle at 16% 16%, rgba(46, 107, 255, 0.32), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(42, 185, 196, 0.26), transparent 42%),
    linear-gradient(145deg, #10244a 0%, #0d1d3b 100%);
  box-shadow: 0 20px 48px rgba(4, 10, 22, 0.42);
}

:root[data-theme="dark"] .leaderboard-view-hero-card::after {
  background-image: linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0) 56%
    ),
    radial-gradient(rgba(164, 198, 255, 0.2) 1px, transparent 0);
}

:root[data-theme="dark"] .leaderboard-view-hero-chip {
  border-color: rgba(145, 183, 255, 0.28);
  background: rgba(17, 42, 83, 0.7);
  color: #deebff;
}

.leaderboard-view-hero[data-view-kind="groups"] .leaderboard-view-hero-card {
  border-color: rgba(55, 130, 101, 0.3);
  background:
    radial-gradient(circle at 12% 18%, rgba(2, 123, 136, 0.22), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(255, 181, 92, 0.16), transparent 42%),
    linear-gradient(145deg, #ecf8ef 0%, #dceedd 100%);
}

.leaderboard-view-hero[data-view-kind="matches"] .leaderboard-view-hero-card {
  border-color: rgba(61, 119, 184, 0.3);
  background:
    radial-gradient(circle at 12% 18%, rgba(85, 153, 224, 0.24), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(88, 110, 220, 0.16), transparent 42%),
    linear-gradient(145deg, #e9f3ff 0%, #d9e8f9 100%);
}

.leaderboard-view-hero[data-view-kind="gifts"] .leaderboard-view-hero-card {
  border-color: rgba(188, 121, 24, 0.3);
  background:
    radial-gradient(circle at 12% 18%, rgba(242, 191, 90, 0.24), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(255, 148, 84, 0.2), transparent 42%),
    linear-gradient(145deg, #fff4dd 0%, #f5e4bf 100%);
}

.leaderboard-view-hero[data-view-kind="past-groups"] .leaderboard-view-hero-card {
  border-color: rgba(124, 106, 85, 0.28);
  background:
    radial-gradient(circle at 12% 18%, rgba(141, 117, 89, 0.2), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(96, 137, 105, 0.16), transparent 42%),
    linear-gradient(145deg, #f2eee8 0%, #e8dfd2 100%);
}

:root[data-theme="dark"] .leaderboard-view-hero[data-view-kind="groups"] .leaderboard-view-hero-card {
  border-color: rgba(80, 181, 143, 0.35);
  background:
    radial-gradient(circle at 16% 16%, rgba(50, 153, 124, 0.34), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(34, 108, 84, 0.3), transparent 42%),
    linear-gradient(145deg, #102d28 0%, #0d241f 100%);
}

:root[data-theme="dark"] .leaderboard-view-hero[data-view-kind="matches"] .leaderboard-view-hero-card {
  border-color: rgba(113, 166, 237, 0.36);
  background:
    radial-gradient(circle at 16% 16%, rgba(58, 124, 210, 0.38), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(39, 82, 158, 0.3), transparent 42%),
    linear-gradient(145deg, #102946 0%, #0d1f37 100%);
}

:root[data-theme="dark"] .leaderboard-view-hero[data-view-kind="gifts"] .leaderboard-view-hero-card {
  border-color: rgba(216, 165, 79, 0.4);
  background:
    radial-gradient(circle at 16% 16%, rgba(198, 146, 58, 0.35), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(151, 102, 33, 0.3), transparent 42%),
    linear-gradient(145deg, #3c2b12 0%, #2f220e 100%);
}

:root[data-theme="dark"] .leaderboard-view-hero[data-view-kind="past-groups"] .leaderboard-view-hero-card {
  border-color: rgba(166, 151, 128, 0.32);
  background:
    radial-gradient(circle at 16% 16%, rgba(125, 110, 93, 0.35), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(91, 121, 98, 0.26), transparent 42%),
    linear-gradient(145deg, #2d2923 0%, #23201b 100%);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

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

.carousel-slide {
  min-width: 100%;
  scroll-snap-align: center;
  position: relative;
  aspect-ratio: 16 / 9;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-link {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.carousel-placeholder-content {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.carousel-placeholder-content .pill {
  background: var(--surface-3);
  color: var(--ink);
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(21, 18, 14, 0.28);
  backdrop-filter: blur(6px);
}

.carousel-dots.is-hidden {
  display: none;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

@media (max-width: 720px) {
  .hero-carousel {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }

  .carousel-track {
    height: 100%;
  }

  .carousel-slide {
    height: 100%;
    aspect-ratio: 16 / 9;
    background: var(--card);
  }

  .carousel-slide img {
    object-fit: cover;
  }
}

.pwa-banner {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  background: var(--nav-bg);
  color: var(--nav-ink);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.pwa-banner.is-hidden {
  display: none;
}

.pwa-banner-copy {
  display: grid;
  gap: 6px;
  max-width: 520px;
}

.pwa-banner-copy p {
  margin: 0;
  color: rgba(254, 247, 236, 0.85);
  font-size: 0.9rem;
}

.pwa-banner-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pwa-banner-hint {
  font-size: 0.82rem;
  color: rgba(254, 247, 236, 0.75);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 18px;
}

.pill {
  background: rgba(2, 123, 136, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(2, 123, 136, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

button.pill {
  font: inherit;
  cursor: pointer;
}

.gift-pill {
  background: rgba(255, 196, 77, 0.2);
  color: #7a4f00;
  border: 1px solid rgba(255, 196, 77, 0.5);
}

:root[data-theme="dark"] .gift-pill {
  background: rgba(255, 196, 77, 0.2);
  color: #ffd88c;
  border-color: rgba(255, 196, 77, 0.6);
}

.gift-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.stage-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fixture {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.fixture:last-of-type {
  border-bottom: none;
}

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

.panel-footer {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.section {
  margin-bottom: 70px;
}

.group-page .group-overview-card {
  margin-bottom: 28px;
}

.group-page [data-tab-panel="matches"] {
  margin-bottom: 46px;
}

.section.section-compact {
  margin-bottom: 32px;
}

[data-view-panel="home"] .section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.live-indicator {
  position: relative;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 6px;
}

.live-indicator.is-hidden {
  display: none;
}

.live-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
}

.live-line::before,
.live-line::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: currentColor;
  opacity: 0.65;
  animation: livePulse 1.4s ease-in-out infinite;
}

.live-line::before {
  left: 0;
  transform-origin: left center;
}

.live-line::after {
  right: 0;
  transform-origin: right center;
  animation-delay: 0.2s;
}

@keyframes livePulse {
  0% {
    transform: scaleX(0.2);
    opacity: 0.2;
  }
  50% {
    transform: scaleX(1);
    opacity: 0.8;
  }
  100% {
    transform: scaleX(0.2);
    opacity: 0.2;
  }
}

.competition-tools {
  margin-top: 10px;
}

.standings-section {
  margin-top: 12px;
}

.standings-list {
  display: grid;
  gap: 16px;
}

.standings-accordion .accordion-toggle {
  margin-top: 12px;
}

.standings-accordion.is-open .standings-preview {
  display: none;
}

.standings-accordion {
  overflow: visible;
}

.standings-accordion .accordion-panel {
  overflow: visible;
}

.standings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.standings-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.standings-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}

.standings-table th,
.standings-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(21, 18, 14, 0.08);
  text-align: left;
}

.standings-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  box-shadow: 0 2px 0 rgba(21, 18, 14, 0.08);
}

.standings-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.standings-team img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.standings-form {
  display: inline-flex;
  gap: 4px;
}

.standings-page {
  display: grid;
  gap: 14px;
}

.standings-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.standings-page-header h2,
.standings-page-header p {
  margin: 0;
}

.standings-page-header h2 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.standings-page-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.standings-page-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(27%) sepia(99%) saturate(1045%) hue-rotate(152deg)
    brightness(92%) contrast(98%);
}

.standings-page-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.standings-page-tabs.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.standings-page-tabs button {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.standings-page-tabs button + button {
  border-left: 1px solid var(--border);
}

.standings-page-tabs.is-single button + button {
  border-left: 0;
}

.standings-page-tabs button.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 72%, transparent);
}

.standings-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.standings-page-filter,
.standings-page-status {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.standings-page-filter {
  color: var(--accent);
}

.standings-page-filter svg {
  width: 18px;
  height: 18px;
}

.standings-page-status {
  color: var(--muted);
}

.standings-page-status > span:first-child,
.standings-live-chip > span,
.standings-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent);
}

.standings-page-content {
  min-width: 0;
}

.standings-group-list {
  display: grid;
  gap: 12px;
}

.loading-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  padding: 18px;
  font-size: 0.9rem;
  font-weight: 800;
}

.standings-group-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.standings-group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}

.standings-group-card-header h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}

.standings-group-card-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.standings-group-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.standings-group-matches-button {
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.standings-group-matches-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.standings-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.standings-live-chip.is-live {
  color: var(--accent);
}

.standings-live-chip:not(.is-live) > span {
  background: var(--muted);
  box-shadow: none;
}

.standings-page-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings-page-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.standings-page-table th,
.standings-page-table td {
  padding: 9px 10px;
  text-align: left;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.standings-page-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.standings-page-table td:not(:nth-child(2)),
.standings-page-table th:not(:nth-child(2)) {
  text-align: center;
}

.standings-page-table tr.is-qualified {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.standings-position {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.standings-page-table tr.is-qualified .standings-position {
  border-color: color-mix(in srgb, var(--accent) 74%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.standings-page-team,
.knockout-team-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.standings-team-name-short {
  display: none;
}

.standings-team-badge {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface-3) 80%, transparent);
}

.standings-team-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.standings-team-badge-placeholder {
  font-size: 0.62rem;
  font-weight: 900;
  color: var(--accent);
}

.standings-legend,
.standings-page-footer {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

.standings-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.standings-legend i:not(.is-qualified) {
  background: color-mix(in srgb, var(--muted) 42%, transparent);
  box-shadow: none;
}

.player-stats-page {
  display: grid;
  gap: 20px;
}

.player-stats-page-header h2,
.player-stats-page-header p {
  margin: 0;
}

.player-stats-page-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.04;
}

.player-stats-tabs {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.player-stats-tabs button {
  min-height: 50px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 760;
  cursor: pointer;
}

.player-stats-tabs button:first-child {
  border-left: 0;
}

.player-stats-tabs button.is-active {
  background: linear-gradient(135deg, #11c5b9, #2f7df6);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.player-stats-tabs img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.player-stats-tabs img[src="/icons/football.png"],
.player-stats-top-icon img[src="/icons/football.png"] {
  filter: brightness(0);
}

.player-stats-content {
  display: grid;
  gap: 18px;
}

.player-stats-top-card {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.player-stats-top-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  display: grid;
  place-items: center;
}

.player-stats-top-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.player-stats-top-copy,
.player-stats-player {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.player-stats-top-copy span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 760;
}

.player-stats-top-copy strong {
  color: var(--ink);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.1;
}

.player-stats-top-copy small,
.player-stats-player small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 450;
}

.player-stats-country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.player-stats-country-flag {
  flex: 0 0 auto;
  font-size: 0.9em;
  line-height: 1;
}

.player-stats-top-value {
  min-width: 96px;
  border-left: 1px solid var(--border);
  padding-left: 22px;
  text-align: center;
  display: grid;
  gap: 2px;
}

.player-stats-top-value strong {
  color: var(--accent);
  font-size: 2.2rem;
  line-height: 1;
}

.player-stats-top-value span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 520;
}

.player-stats-table {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.player-stats-table-head,
.player-stats-row {
  display: grid;
  grid-template-columns: 70px 74px minmax(0, 1fr) 96px;
  align-items: center;
}

.player-stats-table-head {
  min-height: 54px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  border-bottom: 1px solid var(--border);
}

.player-stats-table-head span:nth-child(2) {
  grid-column: 2 / 4;
}

.player-stats-table-head span:first-child {
  justify-self: center;
}

.player-stats-table-head span:last-child {
  grid-column: 4;
  justify-self: center;
  text-align: center;
}

.player-stats-row {
  min-height: 76px;
  border-bottom: 1px solid var(--border);
}

.player-stats-row:last-child {
  border-bottom: 0;
}

.player-stats-rank {
  justify-self: center;
  color: var(--accent);
  font-size: 1.22rem;
  font-weight: 820;
}

.player-stats-avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 840;
}

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

.player-stats-player strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-stats-value {
  justify-self: center;
  color: var(--accent);
  font-size: 1.45rem;
}

.player-stats-footer {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 500;
}

.player-stats-footer span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid currentColor;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
}

.knockout-bracket {
  --knockout-column-gap: 28px;
  --knockout-slot-height: 116px;
  display: grid;
  grid-template-columns: repeat(var(--round-count), minmax(190px, 1fr));
  column-gap: var(--knockout-column-gap);
  row-gap: 14px;
  overflow-x: auto;
  padding: 2px 10px 8px 2px;
  -webkit-overflow-scrolling: touch;
}

.knockout-round {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.knockout-round header {
  min-height: 44px;
  display: grid;
  align-content: center;
  text-align: center;
  color: var(--ink);
}

.knockout-round header strong {
  font-size: 0.82rem;
}

.knockout-round header span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.knockout-round-matches {
  min-height: 100%;
  display: grid;
  grid-template-rows: repeat(var(--bracket-slots), var(--knockout-slot-height));
  align-content: start;
  gap: 14px;
}

.knockout-match-card {
  position: relative;
  grid-row: var(--bracket-row) / span var(--bracket-span);
  align-self: center;
  min-height: 106px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.knockout-match-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * (var(--knockout-column-gap) - 8px));
  width: calc(var(--knockout-column-gap) - 16px);
  border-top: 2px solid color-mix(in srgb, var(--accent) 42%, var(--border));
}

.knockout-round:last-child .knockout-match-card::after {
  display: none;
}

.knockout-team-line {
  width: 100%;
  justify-content: flex-start;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.knockout-team-line + .knockout-team-line {
  margin-top: 7px;
}

.knockout-team-line span:not(.standings-team-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .standings-page .standings-team-name-full,
  .group-matches-modal-content .standings-team-name-full {
    display: none;
  }

  .standings-page .standings-team-name-short,
  .group-matches-modal-content .standings-team-name-short {
    display: inline;
  }

  .player-stats-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .player-stats-tabs button {
    min-width: 0;
    min-height: 42px;
    gap: 4px;
    padding: 0 4px;
    font-size: 0.64rem;
    line-height: 1.05;
    flex: initial;
  }

  .player-stats-tabs img {
    width: 15px;
    height: 15px;
  }

  .player-stats-top-card {
    grid-template-columns: auto minmax(0, 1fr) minmax(58px, auto);
    padding: 16px;
    gap: 12px;
  }

  .player-stats-top-icon {
    width: 58px;
    height: 58px;
  }

  .player-stats-top-icon img {
    width: 34px;
    height: 34px;
  }

  .player-stats-top-value {
    grid-column: auto;
    border-left: 1px solid var(--border);
    border-top: 0;
    padding: 0 0 0 12px;
    min-width: 58px;
  }

  .player-stats-top-value strong {
    font-size: 1.7rem;
  }

  .player-stats-top-value span {
    font-size: 0.66rem;
  }

  .player-stats-table-head,
  .player-stats-row {
    grid-template-columns: 42px 54px minmax(0, 1fr) 52px;
  }

  .player-stats-row {
    min-height: 68px;
  }

  .player-stats-avatar {
    width: 42px;
    height: 42px;
  }

  .player-stats-player strong {
    font-size: 0.88rem;
  }

  .player-stats-player small {
    font-size: 0.68rem;
  }

  .player-stats-value,
  .player-stats-rank {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .player-stats-top-card {
    grid-template-columns: auto minmax(0, 1fr) minmax(48px, auto);
    gap: 8px;
    padding: 14px 12px;
  }

  .player-stats-top-icon {
    width: 46px;
    height: 46px;
  }

  .player-stats-top-icon img {
    width: 28px;
    height: 28px;
  }

  .player-stats-top-copy strong {
    font-size: 1rem;
  }

  .player-stats-top-copy small,
  .player-stats-player small {
    font-size: 0.66rem;
  }

  .player-stats-top-value {
    min-width: 48px;
    padding-left: 8px;
  }

  .player-stats-top-value strong {
    font-size: 1.35rem;
  }

  .player-stats-top-value span {
    font-size: 0.58rem;
  }

  .player-stats-tabs button {
    min-height: 38px;
    gap: 3px;
    padding: 0 3px;
    font-size: 0.56rem;
  }

  .player-stats-tabs img {
    width: 13px;
    height: 13px;
  }
}

.knockout-team-line strong {
  margin-left: auto;
  color: var(--ink);
}

.knockout-team-line.is-winner {
  color: var(--ink);
}

.knockout-team-line.is-winner .standings-team-badge {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 54%, transparent);
}

.knockout-match-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.group-matches-modal-content {
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 980px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 22px;
}

.group-matches-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}

.group-matches-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.group-matches-title-row h3,
.group-matches-title-row p {
  margin: 0;
}

.group-matches-title-row h3 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.group-matches-modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.group-matches-modal-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.group-matches-close {
  flex: 0 0 auto;
}

.group-matches-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 4px 18px 0;
  display: grid;
  gap: 18px;
  -webkit-overflow-scrolling: touch;
}

.group-matchday {
  display: grid;
  gap: 10px;
}

.group-matchday header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.group-matchday h4 {
  margin: 0;
  color: var(--accent);
  font-size: 1.08rem;
}

.group-matchday header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.group-matchday header img,
.group-match-meta-row img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  opacity: 0.72;
}

.group-matchday header img[src*="calendar"],
.group-match-meta-row img[src*="calendar"] {
  filter: brightness(0) invert(1);
}

.group-matchday-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.group-match-row + .group-match-row {
  border-top: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}

.group-match-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(54px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px 10px;
}

.group-match-team {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.group-match-team.is-away {
  justify-content: flex-end;
  text-align: right;
}

.group-match-team strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.group-match-score {
  justify-self: center;
  color: var(--accent);
  font-size: 1.18rem;
  min-width: 50px;
  text-align: center;
}

.group-match-status {
  min-width: 58px;
  min-height: 30px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.group-match-status.is-ft {
  background: color-mix(in srgb, #29b86f 14%, transparent);
  color: #138754;
}

.group-match-status.is-live {
  background: color-mix(in srgb, #ff4e5f 14%, transparent);
  color: #d72d3e;
}

.group-match-status.is-scheduled {
  background: color-mix(in srgb, #2f7df6 13%, transparent);
  color: #276bd6;
}

.group-match-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0 16px 12px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 0.68rem;
  font-weight: 400;
}

.group-match-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.group-matches-legend {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 14px;
  font-size: 0.78rem;
  font-weight: 750;
}

.group-matches-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.group-matches-legend i {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: inline-block;
}

.group-matches-legend i.is-ft {
  background: color-mix(in srgb, #29b86f 16%, transparent);
}

.group-matches-legend i.is-live {
  background: color-mix(in srgb, #ff4e5f 16%, transparent);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, #ff4e5f 64%, transparent);
}

.group-matches-legend i.is-scheduled {
  background: color-mix(in srgb, #2f7df6 16%, transparent);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, #2f7df6 64%, transparent);
}

:root[data-theme="dark"] .group-matches-modal-content {
  background: rgba(6, 21, 50, 0.98);
  border-color: rgba(33, 231, 216, 0.28);
}

:root[data-theme="dark"] .group-matches-modal-icon {
  background: rgba(9, 91, 101, 0.32);
  border-color: rgba(33, 231, 216, 0.52);
}

:root[data-theme="dark"] .group-matchday-card,
:root[data-theme="dark"] .group-matches-legend {
  border-color: rgba(33, 231, 216, 0.2);
  background: rgba(9, 28, 62, 0.72);
}

:root[data-theme="dark"] .group-match-status.is-ft {
  background: rgba(20, 139, 101, 0.18);
  color: #22dfbd;
  border: 1px solid rgba(33, 231, 216, 0.28);
}

:root[data-theme="dark"] .group-match-status.is-live {
  background: rgba(255, 78, 95, 0.14);
  color: #ff6f7d;
  border: 1px solid rgba(255, 78, 95, 0.28);
}

:root[data-theme="dark"] .group-match-status.is-scheduled {
  background: rgba(47, 125, 246, 0.14);
  color: #6fa7ff;
  border: 1px solid rgba(47, 125, 246, 0.28);
}

:root[data-theme="dark"] .standings-page-tabs,
:root[data-theme="dark"] .standings-page-filter,
:root[data-theme="dark"] .standings-page-status,
:root[data-theme="dark"] .standings-group-card,
:root[data-theme="dark"] .knockout-match-card,
:root[data-theme="dark"] .standings-legend,
:root[data-theme="dark"] .standings-page-footer {
  border-color: rgba(33, 231, 216, 0.26);
  background: rgba(6, 21, 50, 0.74);
}

:root[data-theme="dark"] .standings-page-tabs button.is-active {
  background: rgba(9, 91, 101, 0.46);
  box-shadow: inset 0 0 0 1px rgba(33, 231, 216, 0.72);
}

:root[data-theme="dark"] .player-stats-tabs,
:root[data-theme="dark"] .player-stats-table {
  background: rgba(6, 21, 50, 0.76);
  border-color: rgba(83, 126, 190, 0.36);
  box-shadow: none;
}

:root[data-theme="dark"] .player-stats-tabs button {
  border-color: rgba(83, 126, 190, 0.34);
}

:root[data-theme="dark"] .player-stats-tabs button.is-active {
  background: linear-gradient(135deg, #12c8d4, #2f7df6);
  color: #fff;
}

:root[data-theme="dark"] .player-stats-tabs img[src="/icons/football.png"],
:root[data-theme="dark"] .player-stats-top-icon img[src="/icons/football.png"] {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .player-stats-top-card {
  background: rgba(6, 28, 64, 0.78);
  border-color: rgba(33, 231, 216, 0.32);
}

:root[data-theme="dark"] .player-stats-top-icon,
:root[data-theme="dark"] .player-stats-avatar {
  background: rgba(9, 91, 101, 0.28);
  border-color: rgba(33, 231, 216, 0.34);
}

:root[data-theme="dark"] .player-stats-row,
:root[data-theme="dark"] .player-stats-table-head,
:root[data-theme="dark"] .player-stats-top-value {
  border-color: rgba(83, 126, 190, 0.32);
}

:root[data-theme="dark"] .standings-page-icon img,
:root[data-theme="dark"] .competition-card-menu img {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .group-matchday header img[src*="calendar"],
:root[data-theme="dark"] .group-match-meta-row img[src*="calendar"],
:root[data-theme="dark"] .group-match-meta-row img[src*="stadium"] {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .standings-group-matches-button {
  background: rgba(9, 91, 101, 0.34);
  border-color: rgba(33, 231, 216, 0.5);
  color: var(--accent);
}

.form-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.form-dot.win {
  background: #027b88;
}

.form-dot.draw {
  background: #b1a79a;
}

.form-dot.loss {
  background: #e34a36;
}
.section h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 12px;
}

.section p {
  color: var(--muted);
  max-width: 620px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  align-items: flex-end;
}

.field.inline {
  min-width: 200px;
}

.field.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: auto;
}

.field.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  margin-top: 10px;
}

.group-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: brightness(0) saturate(100%) invert(34%) sepia(14%) saturate(732%) hue-rotate(349deg)
    brightness(89%) contrast(86%);
}

:root[data-theme="dark"] .pill-icon {
  filter: brightness(0) invert(1);
}

.group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.group-actions [data-group-join] {
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.group-actions [data-group-leave] {
  min-height: 34px;
  padding: 5px 10px;
  line-height: 1;
  white-space: nowrap;
}

.group-rules-button {
  min-height: 34px;
  gap: 6px;
  padding: 5px 10px;
  border-color: rgba(2, 123, 136, 0.24);
  color: #027b88;
  line-height: 1;
  white-space: nowrap;
}

.group-rules-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(30%) sepia(86%) saturate(955%) hue-rotate(148deg)
    brightness(90%) contrast(98%);
}

:root[data-theme="dark"] .group-rules-button {
  border-color: rgba(27, 218, 255, 0.34);
  color: #dce8ff;
}

:root[data-theme="dark"] .group-rules-button img {
  filter: brightness(0) invert(1);
}

@media (max-width: 620px) {
  .group-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .group-actions [data-group-join] {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.62rem;
  }

  .group-actions [data-group-leave] {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.62rem;
  }

  .group-rules-button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.66rem;
  }

  .group-rules-button img {
    width: 14px;
    height: 14px;
  }
}

.group-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.group-title-row h2 {
  margin: 0;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  background: #fff;
}

.share-button img {
  width: 20px;
  height: 20px;
  display: block;
}

.group-description-wrap {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  max-width: 680px;
}

.group-description {
  margin: 0;
}

.group-description.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group-description-toggle {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.group-description-toggle.is-hidden {
  display: none;
}

.group-overview-card {
  padding: 20px;
  border: 1px solid rgba(115, 147, 211, 0.28);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.94), rgba(249, 241, 230, 0.88)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .group-overview-card {
  border-color: rgba(75, 131, 255, 0.34);
  background:
    linear-gradient(145deg, rgba(14, 35, 77, 0.94), rgba(6, 20, 49, 0.96)),
    var(--surface);
  box-shadow: 0 20px 60px rgba(2, 8, 24, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.group-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.tab-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 6px;
  margin-top: 16px;
  padding: 6px;
  border: 1px solid rgba(75, 131, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 7px 8px 10px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}

.tab-button-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
  flex: 0 0 16px;
  filter: brightness(0) saturate(100%) invert(34%) sepia(14%) saturate(732%) hue-rotate(349deg)
    brightness(89%) contrast(86%);
}

.tab-button-icon--feed {
  filter: brightness(0);
}

.tab-button.is-active {
  background: linear-gradient(145deg, #1a55f4, #4b83ff);
  color: #fff;
  border-color: rgba(91, 137, 255, 0.95);
  box-shadow: 0 12px 30px rgba(46, 107, 255, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tab-button.is-active::after {
  content: "";
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.78);
}

.tab-button.is-active .tab-button-icon {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .tab-bar {
  border-color: rgba(27, 218, 255, 0.78);
  background: rgba(5, 18, 45, 0.74);
  box-shadow: 0 0 0 1px rgba(46, 107, 255, 0.36), 0 0 28px rgba(27, 218, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .tab-button {
  color: #c7d5f4;
}

:root[data-theme="dark"] .tab-button-icon {
  filter: brightness(0) invert(1);
}

.group-lock-countdown {
  --lock-progress: 0%;
  --lock-accent: #18c8bb;
  --lock-accent-2: #48f2de;
  --lock-border: rgba(24, 200, 187, 0.68);
  --lock-surface: rgba(236, 255, 252, 0.9);
  --lock-ink: #082c31;
  --lock-muted: #427178;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--lock-border);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(230, 255, 251, 0.74)),
    var(--lock-surface);
  color: var(--lock-ink);
  box-shadow: 0 16px 36px rgba(19, 94, 107, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.group-lock-countdown.is-hidden {
  display: none;
}

.group-lock-countdown.is-game-lock {
  --lock-accent: #316dff;
  --lock-accent-2: #7d94ff;
  --lock-border: rgba(76, 105, 255, 0.66);
  --lock-surface: rgba(240, 245, 255, 0.92);
  --lock-ink: #112762;
  --lock-muted: #526497;
}

:root[data-theme="dark"] .group-lock-countdown {
  --lock-surface: rgba(5, 21, 52, 0.9);
  --lock-ink: #eaf3ff;
  --lock-muted: #a9bde5;
  background:
    linear-gradient(135deg, rgba(13, 38, 83, 0.94), rgba(4, 16, 41, 0.96)),
    var(--lock-surface);
  box-shadow: 0 18px 46px rgba(3, 9, 24, 0.46), 0 0 30px color-mix(in srgb, var(--lock-accent) 22%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.group-lock-visual {
  display: grid;
  place-items: center;
}

.group-lock-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: conic-gradient(var(--lock-accent-2) var(--lock-progress), rgba(101, 122, 158, 0.58) 0);
  box-shadow: 0 0 24px color-mix(in srgb, var(--lock-accent) 28%, transparent);
}

.group-lock-ring::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--lock-accent) 38%, transparent);
  background: color-mix(in srgb, var(--lock-surface) 86%, transparent);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.group-lock-ring::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lock-accent) 28%, transparent);
}

:root[data-theme="dark"] .group-lock-ring::before {
  background: rgba(2, 11, 30, 0.72);
}

.group-lock-ring img {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.86))
    drop-shadow(0 0 14px color-mix(in srgb, var(--lock-accent-2) 58%, transparent)) !important;
}

.group-lock-ring img[data-lock-countdown-icon] {
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.92))
    drop-shadow(0 0 16px color-mix(in srgb, var(--lock-accent-2) 66%, transparent)) !important;
}

.group-lock-content {
  min-width: 0;
}

.group-lock-title {
  color: var(--lock-accent);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.1;
}

.group-lock-eyebrow,
.group-lock-detail,
.group-lock-meta {
  color: var(--lock-muted);
  font-weight: 700;
}

.group-lock-eyebrow {
  margin-top: 6px;
  font-size: 0.88rem;
}

.group-lock-time {
  margin-top: 6px;
  color: var(--lock-accent);
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.group-lock-detail {
  margin-top: 8px;
  font-size: 0.84rem;
}

.group-lock-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.group-lock-meta::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.world-cup-winner-pick {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  position: relative;
  width: min(920px, 100%);
  margin: 18px auto 0;
  border: 1px solid rgba(19, 191, 182, 0.76);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.88), rgba(255, 248, 232, 0.66)),
    rgba(255, 253, 248, 0.78);
  color: #17233f;
  box-shadow: 0 18px 38px rgba(21, 18, 14, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.world-cup-winner-pick.is-hidden {
  display: none;
}

.winner-pick-art {
  display: grid;
  place-items: center;
  min-height: 196px;
  padding: 16px 10px 14px 18px;
  background:
    radial-gradient(circle at 48% 68%, rgba(19, 191, 182, 0.24), transparent 26%),
    radial-gradient(circle at 50% 58%, rgba(255, 190, 62, 0.2), transparent 44%);
}

.winner-pick-art img {
  width: min(150px, 100%);
  height: auto;
  object-fit: contain;
}

.winner-pick-content {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 22px 20px 18px 4px;
}

.winner-pick-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.winner-pick-heading h3 {
  margin: 0;
  color: #17233f;
  font-size: clamp(1rem, 2.7vw, 1.26rem);
  line-height: 1.12;
  font-weight: 850;
}

.winner-pick-verified {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.winner-pick-verified img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(50%) sepia(91%) saturate(603%) hue-rotate(129deg) brightness(92%) contrast(91%);
}

.winner-pick-lock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid rgba(206, 185, 148, 0.72);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: #027b88;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.winner-pick-content p {
  margin: 0;
  color: #556173;
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 650;
}

.winner-pick-select-wrap {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid rgba(206, 185, 148, 0.7);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.72);
}

.winner-pick-select-wrap:focus-within {
  border-color: rgba(15, 158, 153, 0.85);
  box-shadow: 0 0 0 1px rgba(15, 158, 153, 0.18);
}

.winner-pick-select-wrap img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}

.winner-pick-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 32px 0 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px 16px;
  color: #17233f;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 760;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.winner-pick-select-wrap select:focus,
.winner-pick-select-wrap select:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.winner-pick-save {
  min-height: 46px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 780;
}

.winner-pick-status {
  min-height: 16px;
  color: #027b88;
  font-size: 0.74rem;
  font-weight: 700;
}

.winner-pick-status.is-error {
  color: #b42318;
}

.winner-pick-status.is-success {
  color: #027b88;
}

.winner-pick-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border-top: 1px solid rgba(206, 185, 148, 0.5);
  color: #556173;
  font-size: 0.78rem;
  font-weight: 700;
}

.winner-pick-note span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.winner-pick-note strong,
.winner-pick-note em {
  font: inherit;
  font-style: normal;
}

:root[data-theme="dark"] .world-cup-winner-pick {
  border-color: rgba(33, 231, 216, 0.88);
  background:
    linear-gradient(135deg, rgba(8, 31, 66, 0.86), rgba(3, 14, 36, 0.94)),
    rgba(5, 17, 42, 0.9);
  color: #f5f8ff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 26px rgba(33, 231, 216, 0.18);
}

:root[data-theme="dark"] .winner-pick-art {
  background:
    radial-gradient(circle at 50% 70%, rgba(33, 231, 216, 0.28), transparent 28%),
    radial-gradient(circle at 48% 58%, rgba(49, 132, 255, 0.22), transparent 48%);
}

:root[data-theme="dark"] .winner-pick-heading h3 {
  color: #f5f8ff;
}

:root[data-theme="dark"] .winner-pick-verified img {
  filter: invert(76%) sepia(93%) saturate(494%) hue-rotate(124deg) brightness(99%) contrast(93%);
}

:root[data-theme="dark"] .winner-pick-lock-chip {
  border-color: rgba(33, 231, 216, 0.22);
  background: rgba(33, 231, 216, 0.1);
  color: #31d8c8;
}

:root[data-theme="dark"] .winner-pick-content p,
:root[data-theme="dark"] .winner-pick-note {
  color: #a9b8d8;
}

:root[data-theme="dark"] .winner-pick-select-wrap {
  border-color: rgba(33, 231, 216, 0.66);
  background: rgba(5, 17, 42, 0.62);
}

:root[data-theme="dark"] .winner-pick-select-wrap:focus-within {
  border-color: rgba(33, 231, 216, 0.9);
  box-shadow: 0 0 0 1px rgba(33, 231, 216, 0.18);
}

:root[data-theme="dark"] .winner-pick-select-wrap select {
  color: #f5f8ff;
}

:root[data-theme="dark"] .winner-pick-status {
  color: #31d8c8;
}

:root[data-theme="dark"] .winner-pick-status.is-error {
  color: #ff8a80;
}

:root[data-theme="dark"] .winner-pick-note {
  border-top-color: rgba(137, 161, 208, 0.16);
}

@media (max-width: 640px) {
  .world-cup-winner-pick {
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: 16px;
  }

  .winner-pick-art {
    min-height: 154px;
    padding: 12px 0 10px 10px;
  }

  .winner-pick-art img {
    width: 86px;
  }

  .winner-pick-content {
    gap: 6px;
    padding: 16px 12px 12px 4px;
  }

  .winner-pick-heading {
    flex-wrap: wrap;
    gap: 6px;
  }

  .winner-pick-lock-chip {
    margin-left: 0;
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .winner-pick-content p {
    font-size: 0.76rem;
  }

  .winner-pick-select-wrap {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 42px;
    gap: 8px;
    padding: 0 10px;
  }

  .winner-pick-select-wrap img {
    width: 24px;
    height: 24px;
  }

  .winner-pick-select-wrap select,
  .winner-pick-save {
    font-size: 0.82rem;
  }

  .winner-pick-save {
    min-height: 42px;
  }

  .winner-pick-note {
    min-height: 38px;
    gap: 7px;
    font-size: 0.7rem;
  }

  .group-lock-countdown {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .group-lock-ring {
    width: 74px;
    box-shadow: 0 0 18px color-mix(in srgb, var(--lock-accent) 24%, transparent);
  }

  .group-lock-ring::before {
    inset: 5px;
  }

  .group-lock-ring::after {
    border-width: 3px;
  }

  .group-lock-ring img {
    width: 34px;
    height: 34px;
  }

  .group-lock-title {
    font-size: 0.98rem;
  }

  .group-lock-time {
    font-size: clamp(1.6rem, 8.4vw, 2.18rem);
  }

  .group-lock-detail,
  .group-lock-meta {
    font-size: 0.74rem;
  }
}

@media (max-width: 430px) {
  .group-lock-countdown {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .group-lock-ring {
    width: 62px;
  }

  .group-lock-ring::before {
    inset: 4px;
  }

  .group-lock-ring::after {
    border-width: 3px;
  }

  .group-lock-ring img {
    width: 28px;
    height: 28px;
  }

  .group-lock-time {
    font-size: clamp(1.28rem, 7.3vw, 1.74rem);
  }
}

@media (max-width: 360px) {
  .group-lock-countdown {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px;
  }

  .group-lock-ring {
    width: 52px;
  }

  .group-lock-ring img {
    width: 24px;
    height: 24px;
  }

  .group-lock-time {
    font-size: clamp(1.08rem, 6.8vw, 1.36rem);
  }
}

.global-stats-shell {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.global-stats-header h2 {
  margin: 0 0 4px;
}

.global-stats-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.global-stats-tabs::-webkit-scrollbar {
  display: none;
}

.global-stats-tabs button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 60px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.global-stats-tabs button.is-active {
  color: #fff;
  border-color: rgba(46, 107, 255, 0.8);
  background: linear-gradient(145deg, #1a55f4, #4b83ff);
  box-shadow: 0 10px 24px rgba(46, 107, 255, 0.28);
}

.global-stats-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 1.2rem;
  line-height: 1;
}

.global-icon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--global-icon-url) center / contain no-repeat;
  mask: var(--global-icon-url) center / contain no-repeat;
}

.global-icon--diagram {
  --global-icon-url: url("/icons/diagram.png");
}

.global-icon--outcomes {
  --global-icon-url: url("/icons/stats.png");
}

.global-icon--target {
  --global-icon-url: url("/icons/target_goal.png");
}

.global-icon--fire {
  --global-icon-url: url("/icons/fire-flame.png");
}

.global-icon--lightning {
  --global-icon-url: url("/icons/lightning-strike.png");
}

.global-icon--shield {
  --global-icon-url: url("/icons/shield.png");
}

.global-stats-tabs .global-icon--diagram,
.global-stats-tabs .global-icon--outcomes,
.global-stats-tabs .global-icon--target {
  color: #7fa7ff;
}

.global-stats-tabs .global-icon--fire::before {
  background: linear-gradient(180deg, #ffcf63 0%, #ff7a32 48%, #f04438 100%);
}

.global-stats-tabs .global-icon--shield {
  color: #25c785;
}

.global-stats-tabs button.is-active .global-icon--diagram,
.global-stats-tabs button.is-active .global-icon--outcomes,
.global-stats-tabs button.is-active .global-icon--target,
.global-stats-tabs button.is-active .global-icon--shield {
  color: #fff;
}

.global-stats-tabs button.is-active .global-icon--fire::before {
  background: #fff;
}

.global-stats-content,
.global-stats-list {
  display: grid;
  gap: 14px;
}

.global-stats-panel,
.global-stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.global-stats-panel {
  padding: 14px;
}

.global-stats-panel--wide {
  grid-column: 1 / -1;
}

.global-stats-panel h3,
.global-stat-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.global-stats-panel h3 span,
.global-stats-panel-title h3 span {
  color: var(--muted);
  font-weight: 500;
}

.global-stats-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.global-stats-panel-title p {
  margin: 4px 0 0;
}

.global-stats-link {
  border: 1px solid rgba(37, 199, 133, 0.42);
  border-radius: 999px;
  background: rgba(37, 199, 133, 0.12);
  color: #25c785;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.global-stats-info {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.global-outcome-grid,
.global-stats-card-grid,
.global-goals-grid,
.global-stats-two-col {
  display: grid;
  gap: 12px;
}

.global-outcome-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.global-outcome-item {
  display: grid;
  gap: 5px;
  padding: 0 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.global-outcome-item:last-child {
  border-right: none;
}

.global-outcome-item span,
.global-goals-grid span,
.global-stat-card p,
.global-completion p span,
.global-points-bar em {
  color: var(--muted);
}

.global-outcome-item strong {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1;
}

.global-outcome-item em,
.global-points-bar em {
  font-style: normal;
}

.global-outcome-item--green strong,
.is-green {
  color: #25c785;
}

.global-outcome-item--purple strong {
  color: #8b6cff;
}

.global-outcome-item--blue strong,
.is-blue {
  color: #3f7cff;
}

.global-outcome-track,
.global-stats-mini-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(21, 18, 14, 0.12);
}

.global-outcome-track i,
.global-stats-mini-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #25c785;
}

.global-outcome-item--purple .global-outcome-track i {
  background: #8b6cff;
}

.global-outcome-item--blue .global-outcome-track i,
.global-stats-list--blue .global-stats-mini-track span {
  background: #3f7cff;
}

.global-stats-card-grid,
.global-stats-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.global-stat-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.global-stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
  line-height: 1;
}

.global-stat-card--green strong,
.global-stage-row strong {
  color: #25c785;
}

.global-stat-card--blue strong {
  color: #3f7cff;
}

.global-stat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(46, 107, 255, 0.14);
  color: #2e6bff;
  font-size: 1.3rem;
}

.global-stat-icon::before {
  width: 24px;
  height: 24px;
}

.global-stat-card--green .global-stat-icon {
  background: rgba(37, 199, 133, 0.14);
  color: #027b88;
}

.global-stat-card--blue .global-stat-icon {
  color: #3f7cff;
}

.global-heading-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: -3px;
}

.global-heading-icon.global-icon--fire::before {
  background: linear-gradient(180deg, #ffcf63 0%, #ff7a32 48%, #f04438 100%);
}

.global-heading-icon.global-icon--lightning::before {
  background: #ffd84d;
}

.global-heading-icon.global-icon--shield::before {
  background: #25c785;
}

.global-goals-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
}

.global-goals-grid div + div {
  border-left: 1px solid var(--border);
}

.global-goals-grid strong {
  display: block;
  font-size: 1.45rem;
}

.global-stats-list {
  margin-top: 14px;
}

.global-stats-list-row {
  display: grid;
  gap: 6px;
}

.global-stats-list-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
}

.global-stats-list-row strong {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.global-stats-list--red .global-stats-mini-track span {
  background: #ff5269;
}

.global-completion {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.global-donut {
  --value: 0;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#25c785 calc(var(--value) * 1%), rgba(21, 18, 14, 0.12) 0);
}

.global-donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 58px;
  height: 58px;
  border-radius: inherit;
  background: var(--surface-2);
}

.global-donut span {
  grid-area: 1 / 1;
  z-index: 1;
  font-weight: 900;
}

.global-completion p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.global-points-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  min-height: 170px;
  gap: 12px;
  margin-top: 12px;
}

.global-points-bar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  height: 150px;
  text-align: center;
}

.global-points-bar span {
  align-self: end;
  min-height: 8px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #8b6cff, #3f52c8);
}

.global-points-bar strong,
.global-points-bar em {
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .global-points-bars {
    gap: 7px;
  }

  .global-points-bar {
    height: 130px;
  }

  .global-points-bar strong,
  .global-points-bar em {
    font-size: 0.72rem;
  }
}

.global-stage-table {
  display: grid;
  margin-top: 12px;
}

.global-stage-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.5fr) repeat(3, minmax(70px, 0.7fr));
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.global-stage-row:last-child {
  border-bottom: none;
}

.global-stage-head {
  color: var(--muted);
  font-size: 0.78rem;
}

.global-stage-head span {
  font-weight: 600;
}

.global-trend-chart {
  width: 100%;
  min-height: 180px;
  margin-top: 12px;
  overflow: visible;
}

.global-trend-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 10px;
  scrollbar-width: thin;
}

.global-trend-inner {
  min-width: 0;
}

.global-trend-chart line {
  stroke: var(--border);
  stroke-width: 1;
}

.global-trend-chart polyline {
  fill: none;
  stroke: #25c785;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-trend-chart circle {
  fill: #25c785;
  stroke: var(--surface-2);
  stroke-width: 2;
}

.global-trend-chart text {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.global-trend-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
}

.accuracy-trend-modal-content {
  width: min(1100px, 100%);
}

.accuracy-trend-modal-shell {
  display: grid;
  gap: 14px;
}

.accuracy-trend-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.accuracy-trend-toolbar > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.accuracy-trend-stage-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: min(100%, 190px);
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 9px;
  box-shadow: none;
}

.accuracy-trend-stage-filter img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.accuracy-trend-stage-filter select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  max-width: 128px;
  min-width: 88px;
  height: 24px;
  border: 0 !important;
  border-radius: 0;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23F4F8FF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0 center !important;
  background-size: 13px 13px !important;
  box-shadow: none !important;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  outline: 0;
  padding: 0 18px 0 0 !important;
}

:root:not([data-theme="dark"]) .global-stats-link {
  border-color: rgba(2, 123, 136, 0.36);
  background: rgba(2, 123, 136, 0.1);
  color: #027b88;
}

:root:not([data-theme="dark"]) .global-trend-chart polyline {
  stroke: #027b88;
}

:root:not([data-theme="dark"]) .global-trend-chart circle {
  fill: #027b88;
}

:root:not([data-theme="dark"]) .accuracy-trend-stage-filter img {
  filter: brightness(0);
}

:root:not([data-theme="dark"]) .accuracy-trend-stage-filter select {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2315120E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

@media (max-width: 520px) {
  .accuracy-trend-toolbar {
    align-items: center;
    flex-direction: row;
  }

  .accuracy-trend-stage-filter {
    max-width: 170px;
  }
}

:root[data-theme="dark"] .global-stats-shell {
  border-color: rgba(27, 218, 255, 0.38);
  background: linear-gradient(180deg, rgba(7, 25, 62, 0.96), rgba(5, 20, 50, 0.98));
  box-shadow: 0 0 0 1px rgba(46, 107, 255, 0.18), 0 24px 70px rgba(0, 0, 0, 0.32);
}

:root[data-theme="dark"] .global-stats-tabs,
:root[data-theme="dark"] .global-stats-panel,
:root[data-theme="dark"] .global-stat-card {
  border-color: rgba(82, 132, 219, 0.48);
  background: linear-gradient(145deg, rgba(13, 41, 93, 0.82), rgba(8, 29, 70, 0.78));
  box-shadow: inset 0 0 22px rgba(42, 185, 196, 0.04);
}

:root[data-theme="dark"] .global-stats-tabs button {
  color: #b9c9ec;
}

:root[data-theme="dark"] .global-stats-tabs button.is-active {
  color: #fff;
  border-color: rgba(66, 129, 255, 0.96);
  background: linear-gradient(145deg, #1d5cff, #4f86ff);
  box-shadow: 0 12px 28px rgba(46, 107, 255, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

:root[data-theme="dark"] .global-stats-panel-title,
:root[data-theme="dark"] .global-outcome-item,
:root[data-theme="dark"] .global-goals-grid div + div,
:root[data-theme="dark"] .global-stage-row {
  border-color: rgba(104, 145, 220, 0.36);
}

:root[data-theme="dark"] .global-outcome-track,
:root[data-theme="dark"] .global-stats-mini-track {
  background: rgba(69, 112, 203, 0.32);
}

:root[data-theme="dark"] .global-donut {
  background: conic-gradient(#25db8b calc(var(--value) * 1%), rgba(69, 112, 203, 0.32) 0);
}

:root[data-theme="dark"] .global-donut::before {
  background: #0b2558;
}

:root[data-theme="dark"] .global-trend-chart line {
  stroke: rgba(104, 145, 220, 0.32);
}

@media (max-width: 720px) {
  .global-stats-shell {
    padding: 12px;
    border-radius: 16px;
  }

  .global-stats-tabs {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
  }

  .global-stats-tabs button {
    min-height: 54px;
    font-size: 0.76rem;
  }

  .global-outcome-grid,
  .global-goals-grid,
  .global-stats-card-grid,
  .global-stats-two-col {
    grid-template-columns: 1fr;
  }

  .global-outcome-item,
  .global-goals-grid div + div {
    border-right: none;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 12px 0 0;
  }

  .global-outcome-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .global-stage-row {
    grid-template-columns: minmax(100px, 1.2fr) repeat(3, minmax(54px, 0.7fr));
    gap: 7px;
    font-size: 0.74rem;
  }

  .global-completion {
    align-items: flex-start;
  }
}

.modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.member-stats-open-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.member-stats-open-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(45%) sepia(97%) saturate(2925%) hue-rotate(213deg)
    brightness(101%) contrast(101%);
}

:root[data-theme="dark"] .member-stats-open-button img {
  filter: brightness(0) invert(1);
}

.user-stats-modal-content {
  width: min(720px, 100%);
}

.user-stats-body,
.user-stats-shell,
.user-stats-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.user-stats-shell {
  color: var(--text);
}

.user-stats-hero,
.user-stats-tabs,
.user-stats-panel,
.user-stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.user-stats-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.user-stats-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-stats-identity .user-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 2px solid #25c785;
}

.user-stats-identity h4 {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.user-stats-identity h4 span {
  border: 1px solid rgba(46, 107, 255, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
  color: #3f7cff;
  font-size: 0.72rem;
  font-weight: 800;
}

.user-stats-identity p,
.user-stats-rank span,
.user-stats-rank em,
.user-stat-card em,
.user-stats-panel h4 span,
.user-stats-panel p,
.user-best-copy span,
.user-stats-highlight span,
.user-stats-hit em,
.user-form-footer,
.user-stage-head,
.user-stage-row span:last-child {
  color: var(--muted);
}

.user-stats-identity p,
.user-stats-rank em,
.user-stat-card em,
.user-stats-highlight span,
.user-stats-hit em,
.user-best-copy span {
  margin: 0;
  font-style: normal;
}

.user-stats-identity p {
  font-size: 0.72rem;
  line-height: 1.25;
}

.user-stats-rank {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  min-width: 132px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
}

.user-stats-rank strong {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #8bff7b;
  font-size: 1.45rem;
  line-height: 1;
}

.user-stats-rank-value .participant-rank-medal {
  width: 24px;
  height: 24px;
}

.user-stats-rank-value .participant-rank-medal-2,
.user-stats-rank-value .participant-rank-medal-3 {
  width: 24px;
  height: 24px;
}

.user-stats-rank-value--top-1 {
  color: #ffe29b;
}

.user-stats-rank-value--top-2 {
  color: #dce8ff;
}

.user-stats-rank-value--top-3 {
  color: #ffc58f;
}

.user-stats-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.user-stats-tabs::-webkit-scrollbar {
  display: none;
}

.user-stats-tabs button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.user-stats-tabs button.is-active {
  border-color: rgba(46, 107, 255, 0.8);
  background: linear-gradient(145deg, #243bb2, #407dff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(46, 107, 255, 0.26);
}

.user-stats-grid,
.user-stats-two-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.user-stats-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-stat-card,
.user-stats-panel {
  padding: 14px;
}

.user-stat-card {
  min-height: 114px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.user-stat-card span,
.user-stats-panel h4 {
  font-weight: 800;
}

.user-stat-card strong {
  color: var(--text);
  font-size: 1.9rem;
  line-height: 1;
}

.user-stat-card--green strong {
  color: #8bff7b;
}

.user-stat-card--purple strong {
  color: #8b6cff;
}

.user-stat-card--donut {
  gap: 8px;
}

.user-stats-donut {
  --value: 0;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#25c785 calc(var(--value) * 1%), rgba(21, 18, 14, 0.12) 0);
}

.user-stats-donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 48px;
  height: 48px;
  border-radius: inherit;
  background: var(--surface-2);
}

.user-stats-donut strong {
  grid-area: 1 / 1;
  z-index: 1;
  color: var(--text);
  font-size: 1rem;
}

.user-stats-panel {
  display: grid;
  gap: 12px;
}

.user-stats-panel--wide {
  grid-column: 1 / -1;
}

.user-stats-panel h4 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.user-stats-panel h4 strong {
  color: #8bff7b;
  font-size: 0.9rem;
}

.user-form-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.user-form-chip {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.user-form-chip--win,
.user-form-dot--win {
  background: linear-gradient(145deg, #25c785, #117b65);
}

.user-form-chip--draw,
.user-form-dot--draw {
  background: linear-gradient(145deg, #8b6cff, #4b39b9);
}

.user-form-chip--loss,
.user-form-dot--loss {
  background: linear-gradient(145deg, #ef5148, #b92731);
}

.user-form-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 0.84rem;
}

.user-form-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-form-footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.user-form-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
}

.user-outcome-bias {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.user-outcome-donut {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: conic-gradient(
    #25c785 0 calc(var(--home) * 1%),
    #8b6cff calc(var(--home) * 1%) calc((var(--home) + var(--draw)) * 1%),
    #3f7cff calc((var(--home) + var(--draw)) * 1%) 100%
  );
  box-shadow: inset 0 0 0 12px rgba(7, 25, 62, 0.9);
}

.user-outcome-list {
  display: grid;
  gap: 9px;
}

.user-outcome-list span,
.user-comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.user-outcome-list span:nth-child(1) strong {
  color: #25c785;
}

.user-outcome-list span:nth-child(2) strong {
  color: #8b6cff;
}

.user-outcome-list span:nth-child(3) strong {
  color: #3f7cff;
}

.user-risk-gauge {
  --value: 50;
  position: relative;
  width: min(190px, 100%);
  height: 96px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
}

.user-risk-gauge::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 190px;
  border-radius: 190px 190px 0 0;
  background: conic-gradient(from 270deg, #ffd84d 0 30deg, #ff9138 30deg 86deg, #ef5148 86deg 180deg, transparent 180deg);
  z-index: 0;
}

.user-risk-gauge::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -70px;
  height: 142px;
  border-radius: 142px 142px 0 0;
  background: var(--surface-2);
  z-index: 1;
}

.user-risk-gauge span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 5px;
  height: 78px;
  border-radius: 999px;
  background: #edf3ff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.34);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(calc(-90deg + (var(--value) * 1.8deg)));
  z-index: 3;
}

.user-risk-gauge span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #edf3ff;
  box-shadow: 0 0 0 4px rgba(237, 243, 255, 0.18);
  transform: translateX(-50%);
}

.user-stats-highlight,
.user-stats-hit,
.user-best-copy {
  display: grid;
  gap: 7px;
  margin: 0;
}

.user-stats-highlight strong,
.user-stats-hit strong,
.user-best-copy strong {
  font-size: 1.45rem;
  line-height: 1.1;
}

.user-stats-hit span {
  color: #25c785;
  font-weight: 900;
}

.user-comparison-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.user-comparison-heading h4 {
  display: block;
}

.user-comparison-heading div {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.user-comparison-heading span,
.user-comparison-track i {
  display: inline-block;
  height: 6px;
  border-radius: 999px;
}

.user-comparison-heading span {
  width: 22px;
}

.user-comparison-heading .is-user,
.user-comparison-track .is-user {
  background: #25c785;
}

.user-comparison-heading .is-group,
.user-comparison-track .is-group {
  background: #5c84ff;
}

.user-comparison-list {
  display: grid;
  gap: 12px;
}

.user-comparison-row {
  grid-template-columns: minmax(140px, 1fr) 64px minmax(110px, 1.15fr) 64px;
  font-size: 0.9rem;
}

.user-comparison-row strong {
  color: #25c785;
}

.user-comparison-row em {
  color: #5c84ff;
  font-style: normal;
  text-align: right;
}

.user-comparison-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 18, 14, 0.12);
  overflow: hidden;
}

.user-comparison-track i {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}

.user-stage-table {
  display: grid;
}

.user-stage-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.4fr) repeat(3, minmax(64px, 0.7fr));
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.user-stage-row:last-child {
  border-bottom: none;
}

.user-stage-head {
  font-size: 0.78rem;
}

.user-stage-row strong {
  color: #25c785;
}

:root[data-theme="dark"] .user-stats-hero,
:root[data-theme="dark"] .user-stats-tabs,
:root[data-theme="dark"] .user-stats-panel,
:root[data-theme="dark"] .user-stat-card {
  border-color: rgba(82, 132, 219, 0.48);
  background: linear-gradient(145deg, rgba(13, 41, 93, 0.86), rgba(8, 29, 70, 0.8));
  box-shadow: inset 0 0 24px rgba(42, 185, 196, 0.04);
}

:root[data-theme="dark"] .user-stats-rank,
:root[data-theme="dark"] .user-form-footer,
:root[data-theme="dark"] .user-stage-row {
  border-color: rgba(104, 145, 220, 0.36);
}

:root[data-theme="dark"] .user-stats-donut {
  background: conic-gradient(#25db8b calc(var(--value) * 1%), rgba(69, 112, 203, 0.32) 0);
}

:root[data-theme="dark"] .user-stats-donut::before,
:root[data-theme="dark"] .user-risk-gauge::after {
  background: #0b2558;
}

:root[data-theme="dark"] .user-comparison-track {
  background: rgba(69, 112, 203, 0.32);
}

:root:not([data-theme="dark"]) .user-outcome-donut {
  box-shadow: inset 0 0 0 12px #fffdf8;
}

@media (max-width: 720px) {
  .modal-header-actions {
    gap: 8px;
  }

  .user-stats-modal-content {
    padding: 14px;
  }

  .user-stats-hero,
  .user-form-footer,
  .user-comparison-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .user-stats-hero {
    display: grid;
  }

  .user-stats-rank {
    width: 100%;
  }

  .user-stats-tabs {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }

  .user-stats-tabs button {
    font-size: 0.78rem;
  }

  .user-stats-grid,
  .user-stats-two-col {
    grid-template-columns: 1fr;
  }

  .user-outcome-bias {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .user-comparison-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .user-comparison-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .user-comparison-row em {
    text-align: left;
  }

  .user-stage-row {
    grid-template-columns: minmax(100px, 1.2fr) repeat(3, minmax(54px, 0.7fr));
    gap: 7px;
    font-size: 0.74rem;
  }
}

.group-section + .group-section {
  margin-top: 24px;
}

.group-section h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid rgba(122, 157, 219, 0.45);
  background: rgba(28, 48, 86, 0.72);
  color: #d6e4ff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.lock-pill.is-locked {
  border-color: rgba(255, 87, 87, 0.48);
  background: rgba(95, 24, 38, 0.72);
  color: #ffb4b4;
}

.lock-pill-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex: 0 0 12px;
  filter: invert(45%) sepia(92%) saturate(2198%) hue-rotate(331deg) brightness(103%) contrast(103%)
    drop-shadow(0 0 6px rgba(255, 87, 87, 0.45));
}

:root:not([data-theme="dark"]) .lock-pill {
  border-color: rgba(74, 124, 255, 0.32);
  background: rgba(46, 107, 255, 0.1);
  color: #2558c7;
}

:root:not([data-theme="dark"]) .lock-pill.is-locked {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(220, 38, 38, 0.1);
  color: #b42318;
}

.member-predictions {
  display: grid;
  gap: 12px;
}

.member-predictions .timeline-prediction-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fcf7f0;
  box-shadow: var(--shadow-sm);
}

.member-predictions .timeline-prediction-row:last-child {
  border-bottom: 1px solid var(--border);
}

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

.winner-picks-share {
  display: grid;
  gap: 10px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(19, 191, 182, 0.28);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.76);
}

.winner-picks-share.is-hidden {
  display: none;
}

.winner-pick-share-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #027b88;
  font-size: 0.78rem;
  font-weight: 850;
}

.winner-pick-share-title span {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: conic-gradient(#027b88 0 26%, rgba(2, 123, 136, 0.18) 0);
}

.winner-pick-share-title span::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--surface);
}

.winner-pick-share-scroll {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.winner-pick-share-card {
  flex: 0 0 84px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 8px 7px;
  border: 1px solid rgba(2, 123, 136, 0.22);
  border-radius: 10px;
  background: rgba(245, 251, 250, 0.78);
  color: #17233f;
}

.winner-pick-share-logo {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  line-height: 1;
}

.winner-pick-share-logo img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.winner-pick-share-logo span {
  font-size: 1.12rem;
  line-height: 1;
}

.winner-pick-share-card strong {
  color: #13bfb6;
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 900;
}

.winner-pick-share-card > span:last-child {
  max-width: 100%;
  overflow: hidden;
  color: #556173;
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-pick-share-card.is-empty {
  border-color: rgba(85, 97, 115, 0.24);
  background: rgba(239, 244, 248, 0.74);
}

.winner-pick-share-card.is-empty strong,
.winner-pick-share-card.is-empty > span:last-child {
  color: #8a95a5;
}

.winner-pick-share-empty {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #8a95a5;
  font-size: 0.9rem;
  font-weight: 900;
}

:root[data-theme="dark"] .winner-picks-share {
  border-color: rgba(33, 231, 216, 0.24);
  background: rgba(5, 17, 42, 0.58);
}

:root[data-theme="dark"] .winner-pick-share-title {
  color: #21e7d8;
}

:root[data-theme="dark"] .winner-pick-share-title span {
  background: conic-gradient(#21e7d8 0 26%, rgba(137, 161, 208, 0.2) 0);
}

:root[data-theme="dark"] .winner-pick-share-card {
  border-color: rgba(137, 161, 208, 0.28);
  background: rgba(9, 29, 66, 0.7);
  color: #f5f8ff;
}

:root[data-theme="dark"] .winner-pick-share-card strong {
  color: #21e7d8;
}

:root[data-theme="dark"] .winner-pick-share-card > span:last-child {
  color: #a9b8d8;
}

:root[data-theme="dark"] .winner-pick-share-card.is-empty {
  border-color: rgba(137, 161, 208, 0.2);
  background: rgba(15, 30, 58, 0.58);
}

:root[data-theme="dark"] .winner-pick-share-card.is-empty strong,
:root[data-theme="dark"] .winner-pick-share-card.is-empty > span:last-child,
:root[data-theme="dark"] .winner-pick-share-empty {
  color: #8fa0c2;
}

.winner-picks-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.winner-picks-user,
.winner-picks-team {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.winner-picks-user span,
.winner-picks-team strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-picks-user span {
  color: var(--ink);
  font-weight: 760;
}

.winner-picks-team {
  justify-self: end;
  max-width: min(230px, 42vw);
}

.winner-picks-team-logo {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
}

.winner-picks-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-picks-team-logo span {
  font-size: 1.25rem;
  line-height: 1;
}

.winner-picks-team strong {
  color: #13bfb6;
  font-weight: 850;
}

.winner-picks-team.is-empty {
  justify-self: end;
  color: var(--muted);
  font-weight: 760;
}

@media (max-width: 520px) {
  .winner-picks-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .winner-picks-team,
  .winner-picks-team.is-empty {
    justify-self: start;
    max-width: 100%;
    padding-left: 44px;
  }
}

.prediction-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcf7f0;
}

.prediction-match {
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.prediction-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  width: 100%;
}

.prediction-team {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.prediction-team-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
}

.prediction-team.away {
  justify-content: flex-end;
  text-align: right;
}

.prediction-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-name-full {
  display: inline;
}

.team-name-short {
  display: none;
}

.prediction-team-tag {
  display: block;
  min-height: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.prediction-scoreline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
  justify-self: center;
}

.prediction-score-value {
  min-width: 14px;
  text-align: center;
}

.prediction-score-sep {
  color: var(--muted);
}

.prediction-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-weight: 700;
}

.prediction-points {
  color: var(--accent);
  font-weight: 700;
}

.prediction-points.is-danger {
  color: #b42318;
}

.prediction-stage-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(21, 18, 15, 0.04);
}

.prediction-stage-toggle button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.prediction-stage-toggle button.is-active {
  background: linear-gradient(135deg, #0b5cff 0%, #0641c4 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 92, 255, 0.28);
}

.prediction-stage-toggle button:disabled {
  opacity: 0.45;
}

.prediction-timeline {
  display: grid;
  gap: 16px;
}

.prediction-stage-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(252, 247, 240, 0.95));
  box-shadow: var(--shadow-sm);
}

.prediction-stage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
}

.prediction-stage-card-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prediction-stage-card-header > span {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.prediction-stage-icon {
  color: var(--accent);
}

.prediction-table-head,
.timeline-prediction-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(150px, 1.6fr) minmax(72px, auto) minmax(54px, auto);
  gap: 10px;
  align-items: center;
}

.prediction-table-head {
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(21, 18, 15, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prediction-stage-rows {
  display: grid;
}

.timeline-prediction-row {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.timeline-prediction-row:last-child {
  border-bottom: 0;
}

.timeline-prediction-row.is-prediction-hidden {
  background: rgba(21, 18, 15, 0.025);
}

.timeline-prediction-row.has-no-prediction {
  opacity: 0.72;
}

.timeline-predictor,
.timeline-team,
.timeline-match-teams,
.timeline-points {
  display: flex;
  align-items: center;
}

.timeline-predictor {
  gap: 8px;
  min-width: 0;
  font-weight: 700;
}

.timeline-predictor span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-match {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.timeline-match-teams {
  gap: 8px;
  min-width: 0;
  font-size: 0.85rem;
}

.timeline-team {
  gap: 5px;
  min-width: 0;
}

.timeline-team .team-name-full,
.timeline-team .team-name-short {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-vs,
.timeline-date,
.timeline-prediction-tags {
  color: var(--muted);
  font-size: 0.76rem;
}

.timeline-prediction-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.timeline-prediction-tags > span,
.timeline-prediction-tags > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.timeline-prediction-tags > button {
  appearance: none;
  margin: 0;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.timeline-prediction-tags > button.is-clickable:hover,
.timeline-prediction-tags > button.is-clickable:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(33, 231, 216, 0.18);
}

.timeline-prediction-tags .timeline-bonus-goal {
  border-color: rgba(33, 231, 216, 0.48);
  background: rgba(33, 231, 216, 0.16);
  color: #027b88;
}

.timeline-prediction-tags .timeline-bonus-assist {
  border-color: rgba(46, 107, 255, 0.42);
  background: rgba(46, 107, 255, 0.12);
  color: #1f55c9;
}

.timeline-prediction-tags .timeline-bonus-winner {
  border-color: rgba(217, 148, 13, 0.44);
  background: rgba(251, 191, 36, 0.14);
  color: #9a6700;
}

.timeline-prediction-tags .timeline-bonus-tag.is-correct {
  border-color: rgba(37, 199, 133, 0.48);
  background: rgba(37, 199, 133, 0.15);
  color: #027b88;
}

.timeline-prediction-tags .timeline-bonus-tag.is-wrong {
  border-color: rgba(220, 38, 38, 0.42);
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
}

.timeline-bonus-result {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.timeline-bonus-tag.is-correct .timeline-bonus-result {
  background: #25c785;
  color: #ffffff;
}

.timeline-bonus-tag.is-wrong .timeline-bonus-result {
  background: #dc2626;
  color: #ffffff;
}

.timeline-prediction-tags .is-hidden-bonus {
  color: transparent;
  text-shadow: 0 0 8px var(--muted);
  filter: blur(2px);
  user-select: none;
}

.timeline-score {
  justify-self: end;
  padding: 6px 10px;
  border: 1px solid rgba(2, 123, 136, 0.45);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.timeline-score.is-hidden-score {
  min-width: 56px;
  text-align: center;
  color: transparent;
  text-shadow: 0 0 9px var(--accent);
  filter: blur(2.5px);
  user-select: none;
}

.timeline-score.is-empty {
  border-color: var(--border);
  color: var(--muted);
}

.timeline-points {
  justify-content: flex-end;
  gap: 3px;
  color: #d49b00;
  font-weight: 800;
}

.api-predictions {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff8ef;
}

.predictions-panel {
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.percent-bar {
  display: flex;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0e6d9;
  border: 1px solid var(--border);
}

.percent-seg {
  display: block;
  height: 100%;
}

.percent-seg.home {
  background: #16aef2;
}

.percent-seg.draw {
  background: #c2a46a;
}

.percent-seg.away {
  background: #78e800;
}

.percent-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.comparison-radar {
  margin-top: 14px;
}

.comparison-radar-button {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.comparison-radar-button:hover,
.comparison-radar-button:focus-visible {
  border-color: rgba(22, 174, 242, 0.5);
  outline: none;
  box-shadow: 0 14px 34px rgba(22, 174, 242, 0.16);
}

.prediction-comparison-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.prediction-comparison-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: end;
}

.prediction-comparison-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.prediction-comparison-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.prediction-comparison-value {
  font-weight: 900;
  line-height: 1;
}

.prediction-comparison-value.home {
  color: #16aef2;
}

.prediction-comparison-value.away {
  color: #78e800;
  text-align: right;
}

.prediction-comparison-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95, 87, 79, 0.13);
  background: color-mix(in srgb, var(--muted) 13%, transparent);
}

.prediction-comparison-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  max-width: 100%;
}

.prediction-comparison-fill.home {
  left: 0;
  border-radius: 999px 0 0 999px;
  background: #16aef2;
}

.prediction-comparison-fill.away {
  right: 0;
  border-radius: 0 999px 999px 0;
  background: #78e800;
}

.radar-wrap {
  display: grid;
  justify-items: center;
}

.radar-wrap-large {
  justify-items: center;
}

.radar-chart {
  width: 100%;
  max-width: 220px;
  height: auto;
  overflow: visible;
}

.radar-wrap-large .radar-chart {
  max-width: 390px;
}

.radar-grid polygon {
  fill: none;
  stroke: rgba(95, 87, 79, 0.24);
  stroke: color-mix(in srgb, var(--muted) 24%, transparent);
  stroke-width: 1;
}

.radar-axes line {
  stroke: rgba(95, 87, 79, 0.24);
  stroke: color-mix(in srgb, var(--muted) 24%, transparent);
  stroke-width: 1;
}

.radar-labels text,
.radar-label {
  font-size: 7px;
  text-transform: uppercase;
  fill: var(--muted);
  font-weight: 800;
}

.radar-wrap-large .radar-label {
  font-size: 11px;
}

.radar-tick {
  fill: rgba(95, 87, 79, 0.82);
  fill: color-mix(in srgb, var(--muted) 82%, transparent);
  font-size: 9px;
  font-weight: 700;
}

.radar-area {
  stroke-width: 2;
}

.radar-area.home {
  fill: rgba(22, 174, 242, 0.34);
  stroke: #16aef2;
}

.radar-area.away {
  fill: rgba(120, 232, 0, 0.28);
  stroke: #78e800;
}

.radar-marker {
  stroke: var(--surface);
  stroke-width: 1;
}

.radar-marker.home {
  fill: #16aef2;
}

.radar-marker.away {
  fill: #78e800;
}

.prediction-radar-modal-content {
  width: min(980px, 100%);
}

.predictions-grid {
  display: grid;
  gap: 8px;
}

.predictions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.predictions-row span {
  color: var(--muted);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.comparison-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.comparison-card strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.competition-pill-row {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  gap: 14px;
  padding: 10px 4px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.competition-pill-row::-webkit-scrollbar {
  display: none;
}

.pill-button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.pill-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.pill-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.pill-title {
  font-weight: 600;
}

.pill-subtext {
  font-size: 0.8rem;
  color: var(--muted);
}

.pill-button.is-active {
  background: var(--accent-2);
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(2, 123, 136, 0.28);
}

.pill-button.is-active .pill-subtext {
  color: rgba(255, 255, 255, 0.78);
}

.pill-button .pill-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  overflow: hidden;
  flex: 0 0 auto;
}

.pill-initials {
  display: block;
  text-transform: uppercase;
}

.pill-button .pill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pill-button.competition-card {
  flex: 0 0 154px;
  min-height: 184px;
  border-radius: 18px;
  padding: 10px;
  display: grid;
  grid-template-rows: 92px auto minmax(22px, auto);
  gap: 8px;
  align-content: start;
  text-align: left;
  scroll-snap-align: start;
}

.pill-button.competition-card .pill-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(21, 18, 14, 0.12);
  background: #fff;
  padding: 10px;
}

.pill-button.competition-card .pill-text {
  display: grid;
  gap: 4px;
}

.pill-button.competition-card .pill-title {
  font-size: 0.86rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill-button.competition-card .pill-subtext {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.competition-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
  align-items: start;
}

.competition-card-tags span,
.competition-tag-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(2, 123, 136, 0.1);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.pill-button.is-active .competition-card-tags span {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.pill-button.is-active .pill-icon {
  background: white;
  color: var(--accent);
  border-color: transparent;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-brand.app-brand {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.top-brand-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-brand-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-brand-legacy {
  max-width: min(360px, 48vw);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.58rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(33, 231, 216, 0.28);
  white-space: normal;
}

.app-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  flex: 0 0 auto;
}

.top-nav {
  justify-content: flex-start;
  padding: calc(18px + env(safe-area-inset-top)) clamp(20px, 3vw, 34px) 18px;
}

.top-brand {
  margin-right: auto;
  color: inherit;
  font-size: 1.36rem;
}

.top-actions {
  margin-left: auto;
}

.top-nav .nav-toggle,
.top-nav .notification-button,
.top-nav .profile-button {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.home-hero-section {
  margin-bottom: 34px;
}

.home-hero-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(280px, 1.4fr);
  align-items: center;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 50%, var(--border));
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-2) 78%, transparent));
  box-shadow: var(--shadow-sm);
}

.home-hero-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
}

.home-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-img-dark {
  display: none;
}

:root[data-theme="dark"] .home-hero-img-light {
  display: none;
}

:root[data-theme="dark"] .home-hero-img-dark {
  display: block;
}

.home-hero-copy {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 48px);
}

.home-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.1vw, 2.55rem);
  line-height: 1.08;
}

.home-hero-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.5;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.home-hero-actions .button {
  min-height: 58px;
  border-radius: 14px;
  padding-inline: 24px;
  font-size: 1rem;
  gap: 12px;
}

.home-hero-primary {
  position: relative;
  overflow: visible;
}

.home-hero-primary img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(1);
}

.home-hero-new-tag {
  position: absolute;
  top: -10px;
  right: -8px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ff8a00;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(255, 138, 0, 0.32);
  transform: rotate(45deg);
}

.home-hero-secondary svg,
.view-all-link svg,
.competition-card-action svg,
.all-competition-action svg,
.app-back-button svg,
.home-search-input svg,
.home-filter-settings svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.view-all-link,
.app-back-button {
  border: none;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-competitions-section .section-header,
.home-joined-section .section-header,
.home-activity-section .section-header,
.home-recommended-section .section-header {
  align-items: center;
}

.competition-pill-row {
  margin-top: 18px;
  gap: 18px;
}

.pill-button.competition-card {
  flex-basis: 332px;
  min-height: 292px;
  border-radius: 16px;
  padding: 0;
  grid-template-rows: 142px 1fr auto;
  overflow: hidden;
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
}

.pill-button.competition-card .competition-image,
.all-competition-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 142px;
  overflow: hidden;
  background: var(--surface-3);
}

.pill-button.competition-card .competition-image img,
.all-competition-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-button.competition-card .pill-initials,
.all-competition-image > span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-2) 20%, var(--surface));
  color: var(--accent-2);
  font-size: 1.4rem;
  font-weight: 800;
}

.pill-button.competition-card .competition-card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
}

.pill-button.competition-card .pill-text {
  padding: 14px 18px 4px;
}

.competition-card-meta,
.all-competition-meta,
.home-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.competition-card-meta span,
.all-competition-meta span,
.home-group-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.competition-card-meta img,
.all-competition-meta img,
.home-group-meta img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

:root[data-theme="dark"] .all-competition-meta img {
  filter: brightness(0) invert(1);
}

.competition-card-action {
  margin: 8px 18px 16px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 700;
}

.home-group-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 16px;
}

.home-search-input {
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
}

.home-search-input input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

.home-search-input input:focus,
.home-search-input input:focus-visible {
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.home-filter-settings,
.home-filter-chip {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  cursor: pointer;
}

.home-filter-settings {
  width: 62px;
  min-height: 62px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.home-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.home-filter-chip {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-weight: 700;
}

.home-filter-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.home-filter-chip[data-home-group-filter="popular"] img {
  display: none;
}

.home-filter-chip[data-home-group-filter="popular"]::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #ffd36a 0%, #ff8a1f 42%, #ef3b16 100%);
  -webkit-mask: url("/icons/fire-flame.png") center / contain no-repeat;
  mask: url("/icons/fire-flame.png") center / contain no-repeat;
}

:root[data-theme="dark"] .home-filter-chip img,
:root[data-theme="dark"] .home-group-privacy img,
:root[data-theme="dark"] .home-group-type img,
:root[data-theme="dark"] .home-group-meta img {
  filter: brightness(0) invert(1);
}

.home-filter-chip.is-active {
  color: var(--accent-2);
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
}

.home-recommend-list {
  margin-top: 18px;
}

.home-activity-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-activity-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(196, 166, 120, 0.34);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(249, 241, 230, 0.88));
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 18, 14, 0.06);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.home-activity-item:hover,
.home-activity-item:focus-visible {
  border-color: rgba(2, 123, 136, 0.52);
  box-shadow: 0 14px 28px rgba(21, 18, 14, 0.1);
  outline: none;
  transform: translateY(-1px);
}

:root[data-theme="dark"] .home-activity-item {
  border-color: rgba(165, 191, 255, 0.18);
  background: rgba(13, 34, 73, 0.8);
  box-shadow: 0 14px 30px rgba(2, 6, 14, 0.28);
}

:root[data-theme="dark"] .home-activity-item:hover,
:root[data-theme="dark"] .home-activity-item:focus-visible {
  border-color: rgba(42, 185, 196, 0.46);
  box-shadow: 0 16px 34px rgba(2, 6, 14, 0.38);
}

.home-activity-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-activity-main strong,
.home-activity-main span,
.home-activity-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-activity-main strong {
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 800;
}

.home-activity-main span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.home-activity-main small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.home-activity-reactions {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.home-activity-empty {
  border: 1px dashed rgba(196, 166, 120, 0.42);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: rgba(255, 253, 248, 0.62);
}

:root[data-theme="dark"] .home-activity-empty {
  border-color: rgba(165, 191, 255, 0.2);
  background: rgba(13, 34, 73, 0.42);
}

.home-activity-empty strong {
  display: block;
  margin-bottom: 4px;
}

.home-group-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(128px, 180px);
  gap: 18px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.home-group-banner {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 800;
  font-size: 1.4rem;
}

.home-group-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-group-privacy {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.home-group-privacy img,
.home-group-type img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.home-group-privacy.is-public,
.home-group-type.is-public {
  color: #10b981;
}

.home-group-privacy.is-private,
.home-group-type.is-private {
  color: #9255ff;
}

.home-group-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.home-group-main strong {
  display: block;
  font-size: 1.14rem;
  line-height: 1.2;
}

.home-group-main p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-group-side {
  display: grid;
  justify-items: stretch;
  gap: 20px;
}

.home-group-type {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.home-group-side .button {
  min-height: 52px;
  border-radius: 12px;
}

.group-preview-modal {
  background: rgba(2, 8, 23, 0.64);
}

.group-preview-sheet {
  width: min(620px, 100%) !important;
  max-height: 88vh;
  padding: 14px 14px 18px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.sheet-grip {
  justify-self: center;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
  cursor: grab;
  touch-action: none;
}

.group-preview-header {
  padding-inline: 2px;
  touch-action: none;
}

.group-preview-body {
  display: grid;
  gap: 16px;
}

.group-preview-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
}

.group-preview-banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.group-preview-summary {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.group-preview-avatar {
  width: 82px;
  aspect-ratio: 1 / 1;
  margin-top: -44px;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.group-preview-avatar img,
.group-preview-avatar span {
  width: 100%;
  height: 100%;
}

.group-preview-avatar img {
  display: block;
  object-fit: cover;
}

.group-preview-avatar span {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
  font-size: 1.3rem;
}

.group-preview-summary h4,
.group-preview-section h4,
.group-preview-details h4 {
  margin: 0;
}

.group-preview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.group-preview-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.group-preview-pills img,
.group-preview-details img,
.group-preview-access-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.group-preview-section,
.group-preview-details {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.group-preview-section p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.group-preview-details {
  display: grid;
  gap: 0;
}

.group-preview-details h4 {
  margin-bottom: 8px;
}

.group-preview-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.group-preview-details > div:first-of-type {
  border-top: 0;
}

.group-preview-details span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.group-preview-details strong {
  text-align: right;
}

.group-preview-access-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.group-preview-access-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.group-preview-access-card .button {
  min-width: 0;
}

.group-preview-access-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 10px;
  width: 100%;
}

.group-preview-access-actions .button {
  width: 100%;
}

.group-preview-access-card > .button:only-of-type {
  grid-column: 1 / -1;
  width: 100%;
}

.group-preview-access-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.group-preview-access-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.group-preview-access-card.is-public .group-preview-access-icon {
  background: rgba(2, 123, 136, 0.18);
}

.group-preview-access-card.is-private .group-preview-access-icon {
  background: rgba(146, 85, 255, 0.16);
}

:root[data-theme="dark"] .group-preview-sheet {
  background: rgba(7, 20, 49, 0.98);
}

:root[data-theme="dark"] .group-preview-pills img,
:root[data-theme="dark"] .group-preview-details img,
:root[data-theme="dark"] .group-preview-access-icon img {
  filter: brightness(0) invert(1);
}

@media (min-width: 901px) {
  .group-preview-modal.modal.sheet {
    place-items: center !important;
    padding: 24px;
  }

  .group-preview-modal .group-preview-sheet.modal-content.sheet {
    width: min(720px, 92vw) !important;
    max-height: min(860px, 88vh);
    margin: 0;
    border-radius: 20px;
    animation: modalPop 200ms ease-out both;
  }

  .group-preview-modal.is-closing .group-preview-sheet.modal-content.sheet {
    animation: modalPopOut 200ms ease-in both;
  }

  .group-preview-modal .sheet-grip {
    display: none;
  }
}

.access-note-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}

.access-note-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 900;
}

.access-note-card h3,
.access-note-card p {
  margin: 0;
}

.access-note-card p {
  color: var(--muted);
  margin-top: 4px;
}

.access-note-art {
  display: flex;
  align-items: center;
  gap: 10px;
}

.access-note-art img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.app-list-view {
  margin-top: 0;
}

.app-list-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.app-list-header h1,
.app-list-header h2,
.app-list-header p {
  margin: 0;
}

.app-back-button {
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.all-competition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.all-competition-card {
  min-width: 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  overflow: hidden;
  padding: 0;
  display: grid;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.all-competition-image {
  aspect-ratio: 16 / 8;
}

.all-competition-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.all-competition-body strong {
  font-size: 1.1rem;
}

.all-competition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.all-competition-tags span {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  color: var(--accent-2);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.all-competition-action {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent);
  font-weight: 800;
}

.competitions-directory {
  display: grid;
  gap: 22px;
}

.competitions-directory-header {
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, var(--border));
  border-radius: 18px;
  padding: 20px;
  background:
    radial-gradient(circle at 96% 18%, rgba(21, 128, 61, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(249, 241, 230, 0.9));
  box-shadow: var(--shadow-sm);
}

.competitions-directory-header .eyebrow,
.competitions-directory-header h2,
.competitions-directory-header p {
  margin: 0;
}

.competitions-directory-header h2 {
  margin-top: 4px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.competitions-directory-header p {
  margin-top: 8px;
}

.competition-directory-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  margin-top: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 10px 0 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.competition-directory-list::-webkit-scrollbar {
  display: none;
}

.competitions-directory-groups-section {
  display: grid;
  gap: 10px;
}

.competitions-directory-groups-section .section-header {
  align-items: center;
}

.competitions-directory-groups-section h3,
.competitions-directory-groups-section p {
  margin: 0;
}

.competitions-directory-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 58px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 24%, var(--border));
  border-radius: 16px;
  padding: 4px;
  background: rgba(255, 253, 248, 0.72);
}

.competitions-directory-tabs button {
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.competition-tab-icon {
  width: 12px;
  height: 12px;
  max-width: 12px;
  max-height: 12px;
  display: inline-block;
  flex: 0 0 12px;
  background: #171717;
}

.competition-tab-icon.is-past {
  -webkit-mask: url("/icons/past-competitions.png") center / contain no-repeat;
  mask: url("/icons/past-competitions.png") center / contain no-repeat;
}

.competitions-directory-tabs button.is-active {
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  box-shadow: 0 12px 26px rgba(21, 128, 61, 0.24);
}

.competition-directory-card {
  min-width: 0;
}

.competition-directory-main {
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) minmax(130px, 180px);
  align-items: stretch;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 241, 230, 0.92));
  border-color: rgba(21, 18, 14, 0.12);
}

.competition-directory-main .all-competition-image {
  aspect-ratio: auto;
  min-height: 142px;
}

.competition-directory-main .all-competition-action {
  border-top: 0;
  border-left: 1px solid var(--border);
  align-self: stretch;
  color: #f97316;
  font-size: 0.84rem;
  font-weight: 700;
}

.competition-directory-main .all-competition-body {
  gap: 7px;
}

.competition-directory-main .all-competition-body strong {
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.18;
}

.competition-directory-main .all-competition-meta {
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
}

.competition-directory-main .all-competition-meta span {
  gap: 5px;
}

.competition-directory-main .all-competition-meta img {
  width: 14px;
  height: 14px;
}

.competition-directory-status {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  font-weight: 700;
}

.competition-directory-status.is-active {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}

.competition-directory-status.is-past {
  background: rgba(249, 115, 22, 0.13);
  color: #c2410c;
}

:root[data-theme="dark"] .competitions-directory-header {
  border-color: rgba(85, 133, 255, 0.32);
  background:
    radial-gradient(circle at 96% 18%, rgba(42, 185, 196, 0.16), transparent 35%),
    linear-gradient(135deg, rgba(11, 31, 68, 0.96), rgba(7, 22, 50, 0.95));
}

:root[data-theme="dark"] .competitions-directory-tabs {
  border-color: rgba(85, 133, 255, 0.32);
  background: rgba(7, 22, 50, 0.72);
}

:root[data-theme="dark"] .competitions-directory-tabs button.is-active {
  background: linear-gradient(135deg, #1d5eff, #2e6bff);
  box-shadow:
    0 0 0 1px rgba(124, 174, 255, 0.38),
    0 14px 28px rgba(46, 107, 255, 0.34);
}

:root[data-theme="dark"] .competition-tab-icon {
  background: #ffffff;
}

:root[data-theme="dark"] .competition-directory-main {
  background:
    linear-gradient(180deg, rgba(12, 33, 71, 0.94), rgba(8, 25, 56, 0.96));
  border-color: rgba(165, 191, 255, 0.18);
}

:root[data-theme="dark"] .competition-directory-main .all-competition-action {
  color: #83a8ff;
}

:root[data-theme="dark"] .competition-directory-status.is-active {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

:root[data-theme="dark"] .competition-directory-status.is-past {
  background: rgba(249, 115, 22, 0.16);
  color: #fdba74;
}

@media (max-width: 860px) {
  .home-hero-card {
    grid-template-columns: 1fr;
  }

  .home-hero-media {
    min-height: 220px;
    order: -1;
  }

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

  .competition-directory-main {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .competition-directory-main .all-competition-image {
    min-height: 100%;
  }

  .competition-directory-main .all-competition-action {
    grid-column: 1 / -1;
    min-height: 46px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .home-group-side {
    grid-template-columns: 1fr;
  }

  .home-group-type {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .top-nav {
    padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  }

  .app-brand img {
    width: 36px;
    height: 36px;
  }

  .top-brand {
    font-size: 1.16rem;
  }

  .top-nav .nav-toggle,
  .top-nav .notification-button,
  .top-nav .profile-button {
    width: 50px;
    height: 50px;
  }

  .home-hero-actions .button,
  .home-group-search,
  .app-list-header,
  .access-note-card {
    grid-template-columns: 1fr;
  }

  .home-hero-actions .button,
  .home-filter-settings {
    width: 100%;
  }

  .pill-button.competition-card {
    flex-basis: min(86vw, 332px);
  }

  .access-note-art {
    display: none;
  }
}

/* Home redesign hard overrides: keep hero inline and cards square across breakpoints. */
.home-hero-card {
  grid-template-columns: minmax(112px, 38%) minmax(0, 1fr) !important;
  min-height: clamp(218px, 28vw, 330px);
}

.home-hero-media {
  min-height: 100% !important;
  order: 0 !important;
}

.home-hero-media img {
  object-position: center;
}

.home-hero-copy {
  min-width: 0;
  padding: clamp(16px, 3vw, 42px);
  gap: clamp(8px, 1.6vw, 18px);
}

.home-hero-copy h1 {
  font-size: clamp(1.15rem, 3vw, 2.5rem);
}

.home-hero-copy p {
  font-size: clamp(0.78rem, 1.65vw, 1.18rem);
}

.home-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 14px);
}

.home-hero-actions .button {
  width: 100%;
  min-height: clamp(38px, 5vw, 58px);
  border-radius: 12px;
  padding-inline: clamp(10px, 2vw, 22px);
  font-size: clamp(0.72rem, 1.55vw, 1rem);
  white-space: nowrap;
  gap: clamp(6px, 1.2vw, 12px);
}

.home-hero-primary img,
.home-hero-secondary svg {
  width: clamp(16px, 2.2vw, 22px);
  height: clamp(16px, 2.2vw, 22px);
}

.home-hero-new-tag {
  width: clamp(28px, 3.5vw, 34px);
  height: clamp(28px, 3.5vw, 34px);
  font-size: clamp(0.58rem, 1.05vw, 0.68rem);
}

.competition-pill-row {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  padding: 10px 0 14px !important;
  margin-top: 18px !important;
  gap: 18px !important;
}

.pill-button.competition-card {
  position: relative;
  flex: 0 0 clamp(190px, 28vw, 320px) !important;
  width: clamp(190px, 28vw, 320px);
  min-height: 0 !important;
  aspect-ratio: 1 / 1;
  display: block !important;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 16px !important;
  background: #071733;
  scroll-snap-align: start;
}

.pill-button.competition-card .competition-image {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100%;
  border-radius: inherit;
  z-index: 0;
}

.pill-button.competition-card .competition-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 9, 24, 0.08) 0%, rgba(3, 9, 24, 0.18) 34%, rgba(3, 9, 24, 0.88) 100%),
    linear-gradient(90deg, rgba(3, 9, 24, 0.38) 0%, transparent 48%);
  z-index: 1;
}

.pill-button.competition-card .competition-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-button.competition-card .pill-initials {
  width: 84px;
  height: 84px;
  z-index: 0;
}

.pill-button.competition-card .competition-card-tags {
  z-index: 2;
}

.pill-button.competition-card .competition-card-tags span {
  background: rgba(3, 18, 45, 0.72);
  border-color: rgba(82, 142, 255, 0.58);
  color: #dce8ff;
}

.pill-button.competition-card .pill-text {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 78px;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 0 !important;
  color: #fff;
}

.pill-button.competition-card .pill-title {
  font-size: clamp(1rem, 2vw, 1.34rem);
  line-height: 1.12;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.pill-button.competition-card .competition-card-meta {
  gap: 10px;
  color: rgba(237, 243, 255, 0.9);
  font-size: clamp(0.72rem, 1.45vw, 0.92rem);
}

.pill-button.competition-card .competition-card-meta img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.pill-button.competition-card .competition-card-action {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  min-height: 46px;
  color: #dce8ff;
  background: rgba(18, 52, 111, 0.78);
  border-color: rgba(82, 142, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.competition-directory-list .pill-button.competition-card .pill-title {
  font-size: clamp(0.96rem, 1.75vw, 1.18rem);
  font-weight: 750;
}

.competition-directory-list .pill-button.competition-card .competition-card-meta {
  gap: 8px;
  font-size: clamp(0.66rem, 1.25vw, 0.78rem);
  font-weight: 500;
  line-height: 1.25;
}

.competition-directory-list .pill-button.competition-card .competition-card-meta span {
  gap: 5px;
}

.competition-directory-list .pill-button.competition-card .competition-card-meta img {
  width: 14px;
  height: 14px;
}

.competition-directory-list .pill-button.competition-card .competition-card-tags span {
  border-color: rgba(21, 128, 61, 0.38);
  background: rgba(21, 128, 61, 0.76);
  color: #f2fff7;
  font-size: 0.68rem;
  font-weight: 700;
}

.competition-directory-list .pill-button.competition-card .competition-card-tags span.is-past {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(67, 48, 43, 0.86);
  color: #ffd39c;
}

.competition-card-menu-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.competition-card-menu-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(220, 232, 255, 0.32);
  border-radius: 10px;
  background: rgba(3, 18, 45, 0.42);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.competition-card-menu-button span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.competition-card-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 138px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--ink);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  display: none;
}

.competition-card-menu.is-open {
  display: grid;
}

.competition-card-menu [role="menuitem"] {
  min-height: 34px;
  border-radius: 9px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.competition-card-menu [role="menuitem"]:hover,
.competition-card-menu [role="menuitem"]:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.competition-card-menu svg,
.competition-card-menu img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
}

.competition-card-menu img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(99%) saturate(1045%) hue-rotate(152deg)
    brightness(92%) contrast(98%);
}

:root:not([data-theme="dark"]) .competition-card-menu-button {
  background: rgba(255, 252, 246, 0.84);
  border-color: rgba(203, 177, 139, 0.72);
  color: #13213a;
}

:root[data-theme="dark"] .competition-card-menu {
  background: #0a1b3b;
  border-color: rgba(33, 231, 216, 0.38);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.36);
}

@media (max-width: 620px) {
  .home-hero-card {
    grid-template-columns: minmax(106px, 38%) minmax(0, 1fr) !important;
    min-height: 220px;
  }

  .home-hero-copy {
    padding: 14px;
  }

  .home-hero-actions {
    grid-template-columns: 1fr;
  }

  .home-hero-actions .button {
    min-height: 38px;
  }

  .pill-button.competition-card {
    flex-basis: min(74vw, 230px) !important;
    width: min(74vw, 230px);
  }

  .pill-button.competition-card .pill-text {
    left: 14px;
    right: 14px;
    bottom: 68px;
  }

  .pill-button.competition-card .competition-card-action {
    left: 14px;
    right: 14px;
    bottom: 14px;
    min-height: 42px;
    font-size: 0.86rem;
  }

  .competition-card-menu-button {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .standings-page-header {
    align-items: flex-start;
  }

  .standings-page-icon {
    width: 30px;
    height: 30px;
  }

  .standings-page-tabs button {
    min-height: 42px;
    font-size: 0.78rem;
  }

  .standings-page-toolbar {
    align-items: stretch;
  }

  .standings-group-card-header {
    align-items: flex-start;
  }

  .standings-group-header-actions {
    gap: 7px;
  }

  .standings-group-matches-button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .standings-page-filter,
  .standings-page-status {
    min-height: 34px;
    font-size: 0.74rem;
  }

  .knockout-bracket {
    grid-template-columns: repeat(var(--round-count), minmax(170px, 180px));
  }

  .group-matches-modal-content {
    width: min(94vw, 720px);
    border-radius: 18px;
  }

  .group-matches-title-row {
    gap: 10px;
  }

  .group-matches-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .group-matches-modal-icon img {
    width: 25px;
    height: 25px;
  }

  .group-matchday header {
    align-items: flex-start;
  }

  .group-match-score-row {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 10px 9px;
  }

  .group-match-team {
    gap: 6px;
  }

  .group-match-team strong {
    font-size: 0.78rem;
  }

  .group-match-score {
    min-width: 38px;
    font-size: 0.98rem;
  }

  .group-match-status {
    min-width: 42px;
    min-height: 26px;
    padding: 0 6px;
    font-size: 0.62rem;
  }

  .group-match-meta-row {
    padding: 0 10px 11px;
    gap: 8px 12px;
    font-size: 0.7rem;
  }

  .group-matches-legend {
    justify-content: flex-start;
    gap: 10px;
    font-size: 0.68rem;
  }
}

.match-list,
.group-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.match-card,
.group-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-card:hover,
.group-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.match-card {
  --stage-accent: #c7b8a7;
  --stage-bg: rgba(95, 87, 79, 0.08);
  display: grid;
  gap: 12px;
  position: relative;
  padding: 16px;
  border-left: 4px solid var(--stage-accent);
  background:
    linear-gradient(90deg, var(--stage-bg) 0, var(--stage-bg) 28px, transparent 80px),
    var(--surface);
}

.match-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--stage-accent, #21e7d8) 48%, transparent);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--stage-accent, #21e7d8) 24%, transparent), transparent 72%),
    color-mix(in srgb, var(--stage-accent, #21e7d8) 14%, rgba(5, 18, 44, 0.72));
  color: var(--stage-accent, #21e7d8);
  white-space: nowrap;
  box-shadow:
    0 0 18px color-mix(in srgb, var(--stage-accent, #21e7d8) 28%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--stage-accent, #21e7d8) 14%, transparent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--stage-accent, #21e7d8) 58%, transparent);
}

.predictions-section-header {
  align-items: flex-start;
  gap: 12px;
}

.prediction-filter-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.prediction-filter-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(82, 137, 255, 0.48);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(7, 24, 58, 0.74);
  color: #f2f6ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.prediction-filter-button img {
  width: 16px;
  height: 16px;
  filter: invert(1);
}

.prediction-filter-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  min-width: 150px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(82, 137, 255, 0.42);
  border-radius: 10px;
  background: rgba(8, 27, 62, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.prediction-filter-options button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dce7ff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  padding: 0 10px;
}

.prediction-filter-options button.is-active,
.prediction-filter-options button:hover {
  background: linear-gradient(135deg, #1555e8, #1f6cff);
  color: #fff;
}

.match-points.is-good {
  color: var(--stage-accent, #21e7d8);
}

.match-points.is-mid {
  color: var(--stage-accent, #21e7d8);
}

.match-points.is-bad {
  color: var(--stage-accent, #21e7d8);
}

.match-stage {
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.match-stage-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid var(--stage-accent);
  background: var(--stage-bg);
  color: #3f352d;
}

.match-card--stage-group {
  --stage-accent: #027b88;
  --stage-bg: rgba(2, 123, 136, 0.13);
}

.match-card--stage-r32 {
  --stage-accent: #f2bf5a;
  --stage-bg: rgba(242, 191, 90, 0.18);
}

.match-card--stage-r16 {
  --stage-accent: #ff9d4d;
  --stage-bg: rgba(255, 157, 77, 0.18);
}

.match-card--stage-quarter {
  --stage-accent: #ff6b3d;
  --stage-bg: rgba(255, 107, 61, 0.18);
}

.match-card--stage-semi {
  --stage-accent: #027b88;
  --stage-bg: rgba(2, 123, 136, 0.17);
}

.match-card--stage-third {
  --stage-accent: #8f6b44;
  --stage-bg: rgba(143, 107, 68, 0.17);
}

.match-card--stage-final {
  --stage-accent: #d14c3c;
  --stage-bg: rgba(209, 76, 60, 0.19);
}

.match-card--stage-knockout {
  --stage-accent: #5d6d7e;
  --stage-bg: rgba(93, 109, 126, 0.15);
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  font-weight: 600;
}

.team-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff8ef;
  box-sizing: border-box;
  padding: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.team-logo.large {
  width: 96px;
  height: 96px;
  padding: 20px;
}

.team-logo.small {
  width: 24px;
  height: 24px;
  padding: 4px;
}

.team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.team-logo.placeholder {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: #f6ede1;
}

.team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.team-block.home {
  justify-self: start;
  align-items: flex-start;
  text-align: left;
}

.team-block.away {
  justify-self: end;
  align-items: flex-end;
  text-align: right;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: inherit;
}

.match-row {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.matchup-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff8ef;
  margin-bottom: 12px;
  font-weight: 600;
}

.matchup-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.matchup-side.home {
  justify-content: flex-start;
}

.matchup-side.away {
  justify-content: flex-end;
  text-align: right;
}

.matchup-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.matchup-vs {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.matchup-center {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.matchup-score {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .team-name-full {
    display: none;
  }

  .team-name-short {
    display: inline;
  }
}

.match-score {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 64px;
}

.match-status-short {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6efe6;
  color: #6c5f55;
}

.match-status-short.status-live {
  background: rgba(2, 123, 136, 0.15);
  color: var(--accent-2);
  border-color: #cfe6da;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  text-transform: none;
}

.match-status-live-stack {
  display: inline-grid;
  justify-items: center;
  gap: 5px;
}

.match-live-minute {
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  min-width: 26px;
  padding-bottom: 5px;
  position: relative;
}

.match-live-line {
  bottom: 0;
  height: 1px;
}

.live-status-lottie {
  width: 30px;
  height: 12px;
  display: inline-block;
  pointer-events: none;
}

.live-status-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.match-status-short.status-finished {
  background: rgba(90, 82, 71, 0.16);
  color: #5a5247;
  border-color: #e0d6cb;
}

.match-status-short.status-scheduled {
  background: #f3ede5;
  color: var(--muted);
  border-color: #e6d9cd;
}

.match-status-short.status-postponed {
  background: rgba(245, 158, 11, 0.12);
  color: #8a5200;
  border-color: rgba(245, 158, 11, 0.3);
}

.match-status-short.status-suspended {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b00;
  border-color: rgba(245, 158, 11, 0.38);
}

.match-status-short.status-abandoned {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.42);
}

.matches-sentinel {
  min-height: 1px;
  width: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.matches-sentinel.is-loading {
  min-height: 34px;
}

.match-core {
  display: grid;
  gap: 12px;
}

.match-footer {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: grid;
  gap: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
}

.match-footer-grid {
  display: grid;
  gap: 10px;
}

.prediction-bar,
.h2h-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.prediction-bar {
  background: #e9f4ee;
  border-color: #cfe6da;
}

.match-gift-preview {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.match-gift-preview:hover {
  opacity: 0.94;
  border-color: rgba(2, 123, 136, 0.45);
}

.match-gift-preview .coupon-preview {
  margin-top: 2px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.match-gift-preview .coupon-preview img,
.match-gift-preview .coupon-preview .coupon-image-placeholder {
  width: 100%;
  height: clamp(120px, 22vw, 190px);
  border-radius: 10px;
}

.chip-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.match-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.match-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pill {
  background: rgba(255, 92, 42, 0.12);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}

.status-pill.status-live {
  background: rgba(2, 123, 136, 0.15);
  color: var(--accent-2);
}

.status-pill.status-finished {
  background: rgba(90, 82, 71, 0.16);
  color: #5a5247;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.match-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  overflow-x: auto;
  padding: 1px 0 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.match-filter-bar::-webkit-scrollbar {
  display: none;
}

.match-filter-pill,
.match-filter-select select,
.match-filter-stage select {
  min-height: 38px;
  border: 1px solid rgba(115, 147, 211, 0.42);
  border-radius: 999px;
  background-color: rgba(7, 21, 49, 0.5);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.match-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

.match-filter-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
}

.match-filter-stage .match-filter-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  pointer-events: none;
  filter: brightness(0) invert(1);
}

.matches-empty-state {
  min-height: 34vh;
  display: grid;
  align-content: start;
  padding: 24px 4px 80px;
}

.match-filter-pill.is-active {
  color: #fff;
  border-color: rgba(91, 137, 255, 0.95);
  background: linear-gradient(135deg, #1a55f4, #4b83ff);
  box-shadow: 0 0 24px rgba(64, 125, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.match-filter-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.match-filter-pill > img.match-filter-icon {
  filter: brightness(0) invert(1);
}

.match-filter-live-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ff5757;
  box-shadow: 0 0 0 5px rgba(255, 87, 87, 0.14), 0 0 16px rgba(255, 87, 87, 0.5);
}

.match-filter-select select,
.match-filter-stage select {
  width: 100%;
  min-width: 132px;
  height: 38px;
  min-height: 38px;
  padding: 0 32px 0 14px;
  line-height: 1;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23F4F8FF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.match-filter-stage select {
  min-width: 168px;
  padding-left: 42px;
  cursor: pointer;
}

.legacy-past-toggle {
  display: none !important;
}

.match-list {
  gap: 20px;
}

.match-card {
  --stage-accent: #21e7d8;
  --stage-bg: rgba(33, 231, 216, 0.12);
  --card-border: rgba(104, 139, 205, 0.52);
  --card-ink-soft: #a9bbdf;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 26px;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--stage-accent);
  overflow: hidden;
  background:
    radial-gradient(circle at 0 45%, rgba(33, 231, 216, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(8, 26, 61, 0.94), rgba(5, 17, 42, 0.98));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  color: #f4f8ff;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.28), 0 0 28px rgba(33, 231, 216, 0.16);
}

.match-card-topline,
.match-card-actions,
.match-card-meta,
.match-prediction-values {
  display: flex;
  align-items: center;
}

.match-card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.match-card-lock-slot {
  justify-self: center;
  min-width: 0;
}

.match-card-lock-slot:empty {
  display: none;
}

.match-card-points-slot:empty {
  display: none;
}

.match-card-topline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.match-card .match-stage {
  margin: 0;
  min-width: 0;
}

.match-card .match-stage-chip {
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--stage-accent);
  background: rgba(33, 231, 216, 0.1);
  border-color: rgba(33, 231, 216, 0.42);
  font-size: 0.76rem;
  font-weight: 900;
}

.match-stage-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(33, 231, 216, 0.22);
  color: #dffcff;
  font-size: 0.8rem;
}

.match-stage-icon-img,
.match-card-status-icon,
.match-card-action-icon,
.match-meta-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: invert(38%) sepia(17%) saturate(531%) hue-rotate(182deg) brightness(91%) contrast(89%);
  opacity: 0.95;
}

:root[data-theme="dark"] .match-stage-icon-img,
:root[data-theme="dark"] .match-card-status-icon,
:root[data-theme="dark"] .match-card-action-icon,
:root[data-theme="dark"] .match-meta-icon {
  filter: invert(76%) sepia(17%) saturate(491%) hue-rotate(184deg) brightness(94%) contrast(89%);
}

.match-card-status-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  filter: invert(38%) sepia(17%) saturate(531%) hue-rotate(182deg) brightness(91%) contrast(89%)
    drop-shadow(0 0 8px rgba(80, 131, 255, 0.32));
}

:root[data-theme="dark"] .match-card-status-icon {
  filter: invert(76%) sepia(17%) saturate(491%) hue-rotate(184deg) brightness(94%) contrast(89%)
    drop-shadow(0 0 8px rgba(80, 131, 255, 0.32));
}

.match-status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff5757;
  box-shadow: 0 0 0 4px rgba(255, 87, 87, 0.14), 0 0 12px rgba(255, 87, 87, 0.5);
}

.match-status-done-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid currentColor;
  flex: 0 0 13px;
}

.match-status-done-icon::after {
  content: "";
  width: 4px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.match-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid rgba(74, 124, 255, 0.45);
  background: rgba(37, 88, 255, 0.16);
  color: #4f83ff;
}

.match-card-status-badge.status-live {
  padding: 2px;
  color: #ff6868;
  border-color: rgba(255, 74, 74, 0.35);
  background: rgba(130, 18, 31, 0.2);
  box-shadow: 0 0 22px rgba(255, 61, 61, 0.2);
}

.match-card-status-badge.status-live .live-status-lottie {
  width: 50px;
  height: 20px;
}

.match-card-status-badge.status-finished {
  color: #c6d5f4;
  border-color: rgba(180, 198, 235, 0.4);
  background: rgba(119, 141, 184, 0.12);
}

.match-card-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 5vw, 46px);
  margin: 4px auto 18px;
  max-width: 760px;
}

.match-card-team {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
}

.match-card .team-logo.large {
  width: clamp(112px, 18vw, 150px);
  height: clamp(112px, 18vw, 150px);
  padding: 18px;
  border: 2px solid var(--stage-accent);
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.98), rgba(237, 241, 250, 0.92));
  box-shadow: 0 0 0 10px rgba(26, 96, 214, 0.18), 0 18px 38px rgba(0, 0, 0, 0.24);
}

.match-card-team.away .team-logo.large {
  border-color: #4f8dff;
}

.match-card .team-name {
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.12;
  font-weight: 900;
  color: #f5f8ff;
  text-align: center;
}

.match-events-accordion {
  width: 100%;
  max-width: none;
  margin: 0 auto 16px;
  border: 1px solid rgba(33, 231, 216, 0.62);
  border-radius: 14px;
  background: rgba(5, 17, 42, 0.26);
  overflow: hidden;
}

.match-events-toggle {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #f5f8ff;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.match-events-toggle-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.match-events-toggle-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.match-events-count {
  min-width: 28px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(33, 231, 216, 0.42);
  border-radius: 999px;
  color: #21e7d8;
  font-size: 0.76rem;
  line-height: 1;
}

.match-events-arrow {
  width: 13px;
  height: 13px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.match-events-toggle[aria-expanded="true"] .match-events-arrow {
  transform: translateY(4px) rotate(225deg);
}

.match-events-panel {
  border-top: 1px solid rgba(137, 161, 208, 0.18);
}

.match-events-scroll {
  max-height: 390px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 231, 216, 0.72) transparent;
}

.match-events-scroll::-webkit-scrollbar {
  width: 6px;
}

.match-events-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.match-events-scroll::-webkit-scrollbar-thumb {
  background: rgba(33, 231, 216, 0.72);
  border-radius: 999px;
}

.match-events-timeline {
  position: relative;
  display: grid;
  gap: 8px;
}

.match-events-timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 39px;
  width: 1px;
  background: rgba(210, 188, 158, 0.72);
}

.match-event-row {
  --event-color: #027b88;
  --event-soft: rgba(2, 123, 136, 0.12);
  --event-border: rgba(2, 123, 136, 0.46);
  position: relative;
  display: grid;
  grid-template-columns: 34px 10px 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
}

.match-event-row--goal {
  --event-color: #027b88;
  --event-soft: rgba(2, 123, 136, 0.14);
  --event-border: rgba(2, 123, 136, 0.48);
}

.match-event-row--own-goal {
  --event-color: #ff6b2d;
  --event-soft: rgba(255, 107, 45, 0.14);
  --event-border: rgba(255, 107, 45, 0.5);
}

.match-event-row--missed-penalty,
.match-event-row--red-card {
  --event-color: #ff342e;
  --event-soft: rgba(255, 52, 46, 0.14);
  --event-border: rgba(255, 52, 46, 0.55);
}

.match-event-row--yellow-card {
  --event-color: #f5b400;
  --event-soft: rgba(245, 180, 0, 0.16);
  --event-border: rgba(245, 180, 0, 0.54);
}

.match-event-row--second-yellow {
  --event-color: #eba000;
  --event-soft: rgba(235, 160, 0, 0.16);
  --event-border: rgba(235, 160, 0, 0.54);
}

.match-event-row--penalty-awarded {
  --event-color: #7c4dff;
  --event-soft: rgba(124, 77, 255, 0.14);
  --event-border: rgba(124, 77, 255, 0.52);
}

.match-event-row--substitution {
  --event-color: #1677ff;
  --event-soft: rgba(22, 119, 255, 0.14);
  --event-border: rgba(22, 119, 255, 0.5);
}

.match-event-row--var {
  --event-color: #8a5cf6;
  --event-soft: rgba(138, 92, 246, 0.14);
  --event-border: rgba(138, 92, 246, 0.52);
}

.match-event-minute {
  color: #f5f8ff;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.match-event-marker {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #f5f8ff;
  background: var(--event-color);
  box-shadow: 0 0 0 2px rgba(5, 17, 42, 0.85);
}

.match-event-icon-wrap {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--event-border);
  background: var(--event-soft);
}

.match-event-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.match-event-row--goal .match-event-icon {
  filter: invert(27%) sepia(98%) saturate(1236%) hue-rotate(151deg) brightness(92%) contrast(98%);
}

.match-event-row--own-goal .match-event-icon {
  filter: invert(50%) sepia(96%) saturate(1905%) hue-rotate(346deg) brightness(101%) contrast(101%);
}

.match-event-row--missed-penalty .match-event-icon {
  filter: invert(31%) sepia(95%) saturate(2717%) hue-rotate(345deg) brightness(105%) contrast(106%);
}

.match-event-row--var .match-event-icon {
  filter: invert(46%) sepia(83%) saturate(2179%) hue-rotate(229deg) brightness(100%) contrast(94%);
}

.match-event-card {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(137, 161, 208, 0.16);
  border-radius: 10px;
  background: rgba(11, 31, 69, 0.58);
}

.match-event-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--event-border);
  border-radius: 7px;
  background: var(--event-soft);
  color: var(--event-color);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.match-event-chip.is-assist {
  --event-color: #77a7ff;
  --event-soft: rgba(35, 99, 255, 0.14);
  --event-border: rgba(119, 167, 255, 0.44);
}

.match-event-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #d9e5ff;
}

.match-event-player {
  color: #f8fbff;
  font-size: 0.95rem;
  font-weight: 950;
}

.match-event-note {
  color: #c8d6f4;
  font-size: 0.84rem;
  font-weight: 700;
}

.match-event-team {
  color: #c8d6f4;
  font-size: 0.74rem;
  font-weight: 400;
}

.match-event-tags {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.match-event-sub-lines {
  display: grid;
  gap: 2px;
  color: #f8fbff;
  font-size: 0.84rem;
  font-weight: 800;
}

.match-event-sub-lines span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.match-event-sub-lines b {
  color: #24e092;
  font-size: 0.75rem;
}

.match-event-sub-lines span + span b {
  color: #ff342e;
}

.match-card-score {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-width: 96px;
}

.match-card-score-pending,
.match-card-score-live {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.02em;
  color: #f8fbff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
}

.match-card-score-live span {
  color: #f8fbff;
}

.score-value,
.match-card-score-live {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em;
  white-space: nowrap;
}

.score-separator {
  margin: 0 8px;
}

.score-penalty {
  font-size: 0.42em;
  font-weight: 850;
  color: color-mix(in srgb, currentColor 68%, var(--muted));
  letter-spacing: 0;
  margin-left: 0.04em;
}

.match-card .match-status-short {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(53, 69, 100, 0.76);
  border-color: rgba(142, 167, 215, 0.28);
  color: #f1f6ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.match-card .match-status-short.status-live {
  background: rgba(16, 124, 71, 0.24);
  border-color: rgba(41, 228, 124, 0.55);
  color: #6dffad;
  box-shadow: 0 0 0 1px rgba(41, 228, 124, 0.12), 0 0 18px rgba(34, 222, 110, 0.3);
  font-weight: 900;
  text-transform: none;
}

.match-card .match-status-short.status-suspended {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffd08a;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1), 0 0 18px rgba(245, 158, 11, 0.18);
}

.match-card .match-status-short.status-postponed {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.38);
  color: #f8c878;
}

.match-card .match-status-short.status-abandoned {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.58);
  color: #fecaca;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12), 0 0 18px rgba(239, 68, 68, 0.2);
}

.match-card .match-status-live-stack {
  min-height: 38px;
  align-content: start;
}

.match-card .match-live-minute {
  color: #8dffc0;
  font-size: 0.68rem;
  text-shadow: 0 0 10px rgba(41, 228, 124, 0.34);
}

.match-card-meta {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: 720px;
  margin: 0 auto 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(137, 161, 208, 0.22);
  border-bottom: 1px solid rgba(137, 161, 208, 0.22);
  color: var(--card-ink-soft);
  font-weight: 700;
}

.match-card-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  min-height: 24px;
  white-space: nowrap;
}

.match-card-meta span + span {
  border-left: 1px solid rgba(137, 161, 208, 0.2);
}

.match-card-stat-meta {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.match-card-stat-meta span {
  flex: 1 1 0;
  min-width: 0;
}

.match-card-stat-meta + .match-card-meta {
  margin-top: -1px;
}

.match-card-stat-meta .match-meta-icon {
  filter: brightness(0);
}

:root[data-theme="dark"] .match-card-stat-meta .match-meta-icon {
  filter: brightness(0) invert(1);
}

.match-card-actions {
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 760px;
}

.match-card-action,
.match-card-actions .button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(117, 150, 211, 0.55);
  background: rgba(5, 17, 42, 0.48);
  color: #f5f8ff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: none;
}

.match-card-action-primary {
  border-color: rgba(52, 116, 255, 0.88);
  background: linear-gradient(135deg, #1555e8, #1f6cff);
  box-shadow: 0 10px 24px rgba(22, 92, 235, 0.26);
}

.match-card-action-primary .match-card-action-icon {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .match-card-action-primary .match-card-action-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.match-card-action-stats {
  border-color: rgba(33, 231, 216, 0.64);
  background: rgba(8, 37, 72, 0.52);
  color: #eafcff;
}

.match-card-action-stats .match-card-action-icon {
  filter: invert(86%) sepia(42%) saturate(754%) hue-rotate(124deg) brightness(97%) contrast(92%);
}

.match-stats-modal-content {
  width: min(1040px, 100%);
}

.match-stats-shell {
  display: grid;
  gap: 16px;
}

.match-stats-hero,
.match-stat-card {
  border: 1px solid rgba(91, 128, 196, 0.38);
  background: rgba(8, 27, 62, 0.66);
  border-radius: 16px;
}

.match-stats-hero {
  display: grid;
  gap: 18px;
  padding: 16px 18px 18px;
}

.match-stats-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.match-stats-lock-slot {
  justify-self: center;
}

.match-stats-hero-top .match-stats-count {
  justify-self: end;
}

.match-stats-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding-top: 4px;
}

.match-stats-team {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.match-stats-team .team-logo.large {
  width: 82px;
  height: 82px;
  padding: 14px;
  border-color: rgba(33, 231, 216, 0.72);
  box-shadow: 0 0 0 6px rgba(33, 231, 216, 0.12);
}

.match-stats-team:last-child .team-logo.large {
  border-color: rgba(63, 124, 255, 0.78);
  box-shadow: 0 0 0 6px rgba(63, 124, 255, 0.14);
}

.match-stats-team strong {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-stats-score {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #fff;
}

.match-stats-score > strong {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.match-stats-hero p,
.match-stat-card p,
.match-bonus-list em {
  margin: 0;
  color: var(--muted);
}

.match-stats-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid rgba(33, 231, 216, 0.46);
  background: rgba(33, 231, 216, 0.12);
  color: #21e7d8;
  font-weight: 900;
  white-space: nowrap;
}

.match-stats-count-icon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.match-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.match-stat-card {
  padding: 16px;
}

.match-stat-card--wide {
  grid-column: 1 / -1;
}

.match-stat-card h4 {
  margin: 0 0 12px;
  color: #f4f8ff;
  font-size: 1rem;
}

.match-stat-card--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.match-stat-card--donut {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

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

.match-scoreline-row {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.match-scoreline-row.is-open {
  border-color: rgba(37, 199, 133, 0.72);
  background: rgba(12, 42, 86, 0.48);
  box-shadow: 0 0 0 1px rgba(37, 199, 133, 0.08), 0 0 18px rgba(37, 199, 133, 0.12);
}

.match-scoreline-toggle {
  width: 100%;
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 6px 0;
  text-align: left;
}

.match-scoreline-row.is-open .match-scoreline-toggle {
  padding: 12px 14px 8px;
}

.match-scoreline-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  gap: 10px;
  align-items: center;
}

.match-scoreline-label {
  color: #f4f8ff;
  font-size: 0.95rem;
  font-weight: 850;
}

.match-scoreline-main strong {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.match-scoreline-row.is-open .match-scoreline-main strong {
  color: #25c785;
}

.match-scoreline-chevron {
  width: 11px;
  height: 11px;
  justify-self: center;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s ease, color 0.18s ease;
}

.match-scoreline-row.is-open .match-scoreline-chevron {
  color: #f4f8ff;
  transform: rotate(45deg);
}

.match-scoreline-panel {
  margin: 0 14px 14px;
  border: 1px solid rgba(91, 128, 196, 0.28);
  border-radius: 12px;
  background: rgba(5, 20, 48, 0.42);
  padding: 12px;
}

.match-scoreline-panel-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.match-scoreline-panel-head strong {
  color: #f4f8ff;
  font-size: 0.95rem;
}

.match-scoreline-panel-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.match-scoreline-predictors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.match-scoreline-predictor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(91, 128, 196, 0.32);
  border-radius: 999px;
  background: rgba(36, 64, 112, 0.46);
  padding: 4px 9px 4px 4px;
}

.match-scoreline-predictor .user-avatar {
  width: 26px;
  height: 26px;
  border-width: 1px;
}

.match-scoreline-predictor span {
  min-width: 0;
  overflow: hidden;
  color: #eaf2ff;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-points-bars {
  min-height: 150px;
  display: flex;
  align-items: end;
  gap: 12px;
}

.match-points-bars div {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.match-points-bars span {
  width: 100%;
  max-width: 46px;
  height: var(--bar);
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #23e7d7, #19a99f);
}

.match-points-bars strong,
.match-points-bars em {
  font-size: 0.78rem;
  font-style: normal;
  color: #eaf2ff;
}

.match-bonus-list {
  display: grid;
  gap: 12px;
}

.match-bonus-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
}

.match-bonus-list span {
  color: var(--muted);
}

.match-bonus-list strong {
  grid-column: 1;
  color: #f4f8ff;
}

.match-bonus-player {
  display: inline-flex;
  grid-column: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.match-bonus-player .bonus-picker-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.match-bonus-player strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-bonus-list em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-weight: 800;
}

.match-predictability {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.match-predictability--gauge {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.match-predictability--gauge .user-risk-gauge {
  width: min(190px, 100%);
  margin: 0 auto 4px;
}

.match-predictability strong {
  font-size: 2rem;
  color: #21e7d8;
}

.match-predictability span {
  color: #d9e5fb;
}

.match-participant-hits {
  display: grid;
  gap: 8px;
}

.match-participant-hits-head,
.match-participant-hit-row {
  display: grid;
  grid-template-columns: 30px 42px minmax(0, 1fr) 94px 68px;
  gap: 8px;
  align-items: center;
}

.match-participant-hits-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.match-participant-hits-head span:nth-child(4),
.match-participant-hits-head span:nth-child(5) {
  text-align: center;
}

.match-participant-hit-row .user-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(33, 231, 216, 0.82);
}

.match-participant-rank {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 64, 112, 0.62);
  color: #c7d6f2;
  font-size: 0.78rem;
  font-weight: 950;
}

.match-participant-hit-row:nth-of-type(2) .match-participant-rank {
  background: linear-gradient(135deg, #ffd84d, #f6a91f);
  color: #06173a;
}

.match-participant-hit-row:nth-of-type(3) .match-participant-rank {
  background: linear-gradient(135deg, #f4f8ff, #b8c8dc);
  color: #17345c;
}

.match-participant-hit-row:nth-of-type(4) .match-participant-rank {
  background: linear-gradient(135deg, #ffbd7a, #d9823d);
  color: #06173a;
}

.match-participant-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4f8ff;
  font-weight: 900;
}

.match-participant-prediction {
  justify-self: center;
  border: 1px solid rgba(33, 231, 216, 0.34);
  border-radius: 8px;
  min-width: 62px;
  padding: 4px 8px;
  background: rgba(33, 231, 216, 0.1);
  color: #21e7d8;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.match-participant-points {
  justify-self: end;
  color: #21e7d8;
  font-size: 0.95rem;
  font-weight: 950;
  white-space: nowrap;
}

.match-card-prediction {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 24px);
  max-width: 760px;
  margin: 0 auto;
  padding: 12px clamp(14px, 3vw, 22px);
  border: 1px solid rgba(106, 142, 205, 0.38);
  border-radius: 16px;
  background: rgba(8, 27, 62, 0.62);
}

.match-card-prediction .chip-title {
  color: var(--stage-accent);
  font-size: 0.76rem;
  margin: 0;
  letter-spacing: 0.1em;
}

.match-prediction-values {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
}

.match-prediction-score,
.match-prediction-detail {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(108, 143, 205, 0.45);
  border-radius: 10px;
  background: rgba(3, 17, 43, 0.36);
  color: #f6f9ff;
  font-weight: 900;
  padding: 0 12px;
  font-size: 0.82rem;
  line-height: 1;
}

.match-prediction-score {
  min-width: 118px;
  color: var(--stage-accent);
  font-size: 1.28rem;
}

.match-prediction-detail span {
  color: var(--stage-accent);
  margin-right: 6px;
}

.match-prediction-detail--flag {
  min-width: 66px;
  padding: 0 9px;
}

.match-prediction-detail--wide {
  max-width: 100%;
}

.match-prediction-empty {
  color: var(--card-ink-soft);
  font-weight: 800;
}

.match-card-gifts {
  max-width: 760px;
  margin: 14px auto 0;
}

.group-page .group-overview-card,
.group-page [data-tab-panel] {
  width: 100%;
}

.match-card-teams,
.match-events-accordion,
.match-card-meta,
.match-card-actions,
.match-card-prediction,
.match-card-gifts {
  width: 100%;
  max-width: none;
}

:root:not([data-theme="dark"]) .match-filter-pill,
:root:not([data-theme="dark"]) .match-filter-select select,
:root:not([data-theme="dark"]) .match-filter-stage select {
  border-color: rgba(21, 18, 14, 0.14);
  background-color: #2f5fe3;
  color: #fff;
  box-shadow: 0 8px 18px rgba(21, 18, 14, 0.08);
}

:root:not([data-theme="dark"]) .match-filter-pill.is-active {
  border-color: rgba(31, 92, 219, 0.96);
  background: linear-gradient(135deg, #1a55f4, #4b83ff);
  color: #fff;
}

:root:not([data-theme="dark"]) .match-filter-stage .match-filter-icon {
  filter: brightness(0) invert(1);
}

:root:not([data-theme="dark"]) .match-filter-select select {
  background-color: #fffdf8;
  color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2315120E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root:not([data-theme="dark"]) .match-card {
  --stage-accent: #027b88;
  --stage-bg: rgba(2, 123, 136, 0.12);
  --card-border: rgba(2, 123, 136, 0.28);
  --card-ink-soft: var(--muted);
  background:
    linear-gradient(90deg, var(--stage-bg) 0, var(--stage-bg) 30px, transparent 96px),
    var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

:root:not([data-theme="dark"]) .match-card:hover {
  box-shadow: var(--shadow);
}

:root:not([data-theme="dark"]) .match-card .match-stage-chip {
  background: var(--stage-bg);
  border-color: var(--stage-accent);
  color: var(--stage-accent);
}

:root:not([data-theme="dark"]) .match-stage-icon {
  background: var(--stage-bg);
  color: var(--stage-accent);
}

:root:not([data-theme="dark"]) .match-card-status-badge {
  border-color: rgba(46, 107, 255, 0.28);
  background: rgba(46, 107, 255, 0.08);
  color: #2455c7;
}

:root:not([data-theme="dark"]) .match-card-status-badge.status-live {
  color: #c52f2f;
  border-color: rgba(197, 47, 47, 0.22);
  background: rgba(255, 87, 87, 0.06);
  box-shadow: 0 0 18px rgba(255, 61, 61, 0.1);
}

:root:not([data-theme="dark"]) .match-card-status-badge.status-finished {
  color: #5f574f;
  border-color: rgba(21, 18, 14, 0.14);
  background: rgba(21, 18, 14, 0.05);
}

:root:not([data-theme="dark"]) .match-points {
  border-color: rgba(2, 123, 136, 0.5);
  background:
    radial-gradient(circle at 50% 0, rgba(2, 123, 136, 0.16), transparent 72%),
    rgba(255, 253, 248, 0.94);
  color: #026773;
  box-shadow:
    0 8px 18px rgba(19, 94, 107, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.66);
  text-shadow: none;
}

:root:not([data-theme="dark"]) .match-points.is-good,
:root:not([data-theme="dark"]) .match-points.is-mid {
  border-color: rgba(2, 123, 136, 0.56);
  background:
    radial-gradient(circle at 50% 0, rgba(2, 123, 136, 0.18), transparent 72%),
    rgba(232, 250, 246, 0.94);
  color: #026773;
}

:root:not([data-theme="dark"]) .match-points.is-bad {
  border-color: rgba(173, 44, 31, 0.38);
  background:
    radial-gradient(circle at 50% 0, rgba(173, 44, 31, 0.12), transparent 72%),
    rgba(255, 241, 235, 0.96);
  color: #9f261b;
}

:root:not([data-theme="dark"]) .match-card .team-logo.large {
  background: radial-gradient(circle at 50% 38%, #fff, #f7f1e8);
  box-shadow: 0 0 0 8px rgba(2, 123, 136, 0.1), 0 14px 30px rgba(21, 18, 14, 0.12);
}

:root:not([data-theme="dark"]) .match-card-team.away .team-logo.large {
  border-color: var(--stage-accent);
}

:root:not([data-theme="dark"]) .match-card .team-name,
:root:not([data-theme="dark"]) .match-card-score-pending,
:root:not([data-theme="dark"]) .match-card-score-live,
:root:not([data-theme="dark"]) .match-card-score-live span {
  color: var(--ink);
  text-shadow: none;
}

:root:not([data-theme="dark"]) .match-events-accordion {
  border-color: rgba(2, 123, 136, 0.38);
  background: rgba(255, 253, 248, 0.7);
}

:root:not([data-theme="dark"]) .match-events-toggle {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-events-toggle-icon {
  filter: invert(26%) sepia(76%) saturate(1516%) hue-rotate(153deg) brightness(91%) contrast(98%);
}

:root:not([data-theme="dark"]) .match-events-count {
  color: #027b88;
  border-color: rgba(2, 123, 136, 0.38);
}

:root:not([data-theme="dark"]) .match-events-panel {
  border-top-color: rgba(21, 18, 14, 0.1);
}

:root:not([data-theme="dark"]) .match-events-timeline::before {
  background: rgba(210, 188, 158, 0.9);
}

:root:not([data-theme="dark"]) .match-event-minute {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-event-marker {
  border-color: #fffdf8;
  box-shadow: 0 0 0 2px rgba(210, 188, 158, 0.55);
}

:root:not([data-theme="dark"]) .match-event-card {
  border-color: rgba(21, 18, 14, 0.08);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 8px 20px rgba(21, 18, 14, 0.05);
}

:root:not([data-theme="dark"]) .match-event-main,
:root:not([data-theme="dark"]) .match-event-team,
:root:not([data-theme="dark"]) .match-event-note {
  color: var(--muted);
}

:root:not([data-theme="dark"]) .match-event-player,
:root:not([data-theme="dark"]) .match-event-sub-lines {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-card .match-status-short {
  background: rgba(21, 18, 14, 0.08);
  border-color: rgba(21, 18, 14, 0.14);
  color: var(--muted);
}

:root:not([data-theme="dark"]) .match-card .match-status-short.status-live {
  background: rgba(2, 123, 136, 0.12);
  border-color: rgba(2, 123, 136, 0.35);
  color: #027b88;
  box-shadow: 0 0 0 1px rgba(2, 123, 136, 0.08), 0 0 16px rgba(2, 123, 136, 0.18);
}

:root:not([data-theme="dark"]) .match-card .match-live-minute {
  color: #027b88;
  text-shadow: 0 0 10px rgba(2, 123, 136, 0.18);
}

:root:not([data-theme="dark"]) .match-card-meta {
  border-top-color: rgba(21, 18, 14, 0.12);
  border-bottom-color: rgba(21, 18, 14, 0.12);
  color: var(--muted);
}

:root:not([data-theme="dark"]) .match-card-meta span + span {
  border-left-color: rgba(21, 18, 14, 0.12);
}

:root:not([data-theme="dark"]) .match-card-action,
:root:not([data-theme="dark"]) .match-card-actions .button {
  border-color: rgba(21, 18, 14, 0.13);
  background: var(--surface-2);
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-card-action-primary {
  border-color: rgba(31, 92, 219, 0.72);
  background: linear-gradient(135deg, #1a55f4, #4b83ff);
  color: #fff;
}

:root:not([data-theme="dark"]) .match-card-action-primary .match-card-action-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

:root:not([data-theme="dark"]) .match-card-action-stats .match-card-action-icon {
  filter: brightness(0);
  opacity: 1;
}

:root:not([data-theme="dark"]) .match-card-prediction {
  border-color: rgba(2, 123, 136, 0.22);
  background: rgba(249, 241, 230, 0.82);
}

:root:not([data-theme="dark"]) .match-prediction-score,
:root:not([data-theme="dark"]) .match-prediction-detail {
  border-color: rgba(2, 123, 136, 0.32);
  background: #fffdf8;
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-card-prediction .chip-title,
:root:not([data-theme="dark"]) .match-prediction-score,
:root:not([data-theme="dark"]) .match-prediction-detail span {
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-stats-hero,
:root:not([data-theme="dark"]) .match-stat-card {
  border-color: rgba(21, 18, 14, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(249, 241, 230, 0.96)),
    var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(21, 18, 14, 0.08);
}

:root:not([data-theme="dark"]) .match-stats-hero .match-stage-chip {
  border-color: rgba(2, 123, 136, 0.35);
  background: rgba(2, 123, 136, 0.1);
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-stats-hero .match-stage-icon {
  background: rgba(2, 123, 136, 0.13);
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-stats-team strong,
:root:not([data-theme="dark"]) .match-stats-score,
:root:not([data-theme="dark"]) .match-stat-card h4,
:root:not([data-theme="dark"]) .match-participant-name {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-stats-score > strong {
  text-shadow: none;
}

:root:not([data-theme="dark"]) .match-stats-count {
  border-color: rgba(2, 123, 136, 0.42);
  background: rgba(2, 123, 136, 0.12);
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-stat-card p,
:root:not([data-theme="dark"]) .match-bonus-list em,
:root:not([data-theme="dark"]) .match-bonus-list span,
:root:not([data-theme="dark"]) .match-participant-hits-head,
:root:not([data-theme="dark"]) .match-predictability span,
:root:not([data-theme="dark"]) .match-points-bars strong,
:root:not([data-theme="dark"]) .match-points-bars em,
:root:not([data-theme="dark"]) .match-stat-card .global-stats-list-row strong {
  color: var(--muted);
}

:root:not([data-theme="dark"]) .match-stat-card .global-stats-list-row > div:first-child span,
:root:not([data-theme="dark"]) .match-bonus-list strong {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-stat-card .global-stats-mini-track {
  background: rgba(21, 18, 14, 0.1);
}

:root:not([data-theme="dark"]) .match-stat-card .global-stats-mini-track span,
:root:not([data-theme="dark"]) .match-points-bars span {
  background: linear-gradient(145deg, #027b88, #23c7d6);
  box-shadow: 0 8px 20px rgba(2, 123, 136, 0.22);
}

:root:not([data-theme="dark"]) .match-scoreline-row.is-open {
  border-color: rgba(2, 123, 136, 0.42);
  background: rgba(2, 123, 136, 0.08);
  box-shadow: 0 12px 24px rgba(21, 18, 14, 0.08);
}

:root:not([data-theme="dark"]) .match-scoreline-label,
:root:not([data-theme="dark"]) .match-scoreline-panel-head strong {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-scoreline-row.is-open .match-scoreline-main strong {
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-scoreline-row.is-open .match-scoreline-chevron {
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-scoreline-panel {
  border-color: rgba(2, 123, 136, 0.18);
  background: rgba(255, 255, 255, 0.58);
}

:root:not([data-theme="dark"]) .match-scoreline-predictor {
  border-color: rgba(2, 123, 136, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

:root:not([data-theme="dark"]) .match-scoreline-predictor span {
  color: var(--ink);
}

:root:not([data-theme="dark"]) .match-stat-card .user-stats-donut {
  background: conic-gradient(#027b88 calc(var(--value) * 1%), rgba(21, 18, 14, 0.12) 0);
}

:root:not([data-theme="dark"]) .match-stat-card .user-stats-donut::before,
:root:not([data-theme="dark"]) .match-stat-card .user-risk-gauge::after {
  background: #fff7ea;
}

:root:not([data-theme="dark"]) .match-stat-card .user-stats-donut strong,
:root:not([data-theme="dark"]) .match-predictability strong,
:root:not([data-theme="dark"]) .match-participant-prediction,
:root:not([data-theme="dark"]) .match-participant-points {
  color: #027b88;
}

:root:not([data-theme="dark"]) .match-participant-prediction {
  border-color: rgba(2, 123, 136, 0.24);
  background: rgba(2, 123, 136, 0.1);
}

:root:not([data-theme="dark"]) .match-participant-rank {
  background: rgba(31, 68, 119, 0.1);
  color: #32506d;
}

@media (max-width: 720px) {
  .modal {
    place-items: start center;
    padding: 10px;
  }

  .modal-content,
  .modal-content.wide {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px;
    border-radius: 20px;
  }

  .modal-header {
    gap: 10px;
  }

  .modal-header h3 {
    font-size: 1.15rem;
    line-height: 1.2;
  }

  .prediction-panel {
    padding: 12px;
  }

  .prediction-panel .form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .bonus-picks-panel {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .bonus-picks-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .bonus-picks-header h4 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .bonus-picks-header span {
    font-size: 0.78rem;
  }

  .bonus-player-card {
    flex-basis: 70px;
    font-size: 0.72rem;
  }

  .bonus-player-avatar {
    width: 52px;
    height: 52px;
  }

  .match-filter-bar {
    grid-template-columns: repeat(3, max-content);
    gap: 8px;
    margin-left: -2px;
    margin-right: -2px;
  }

  .match-filter-pill,
  .match-filter-select select,
  .match-filter-stage select {
    height: 36px;
    min-height: 36px;
    font-size: 0.84rem;
  }

  .match-filter-pill {
    padding: 0 11px;
  }

  .match-filter-select select {
    padding-left: 11px;
    padding-right: 30px;
    background-position: right 10px center;
  }

  .match-filter-stage select {
    min-width: 160px;
    padding-left: 38px;
    padding-right: 28px;
    background-position: right 9px center;
  }

  .match-filter-stage .match-filter-icon {
    left: 12px;
  }

  .match-filter-select {
    width: 132px;
  }

  .match-card {
    padding: 16px 14px 18px;
    border-radius: 22px;
  }

  .match-card-topline {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .match-card .match-stage-chip,
  .match-card-status-badge {
    padding: 4px 7px;
    font-size: 0.66rem;
  }

  .lock-pill {
    min-height: 20px;
    padding: 2px 8px;
    font-size: 0.6rem;
  }

  .match-card-teams {
    gap: 12px;
    margin-bottom: 14px;
  }

  .match-card .team-logo.large {
    width: 86px;
    height: 86px;
    padding: 14px;
    box-shadow: 0 0 0 7px rgba(26, 96, 214, 0.16), 0 14px 28px rgba(0, 0, 0, 0.2);
  }

  .match-card .team-name {
    font-size: 1.15rem;
  }

  .match-events-accordion {
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .match-events-toggle {
    min-height: 46px;
    gap: 8px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .match-events-toggle-icon {
    width: 16px;
    height: 16px;
  }

  .match-events-count {
    min-width: 24px;
    min-height: 22px;
    font-size: 0.7rem;
  }

  .match-events-scroll {
    max-height: 310px;
    padding: 8px;
  }

  .match-events-timeline {
    gap: 7px;
  }

  .match-events-timeline::before {
    left: 32px;
  }

  .match-event-row {
    grid-template-columns: 28px 10px 34px minmax(0, 1fr);
    gap: 7px;
    min-height: 46px;
  }

  .match-event-minute {
    font-size: 0.75rem;
  }

  .match-event-icon-wrap {
    width: 32px;
    height: 32px;
  }

  .match-event-icon {
    width: 17px;
    height: 17px;
  }

  .match-event-card {
    min-height: 44px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
    padding: 8px;
  }

  .match-event-chip {
    width: fit-content;
    min-height: 24px;
    padding: 2px 8px;
    font-size: 0.74rem;
  }

  .match-event-main {
    gap: 7px;
  }

  .match-event-player {
    font-size: 0.84rem;
  }

  .match-event-note,
  .match-event-sub-lines {
    font-size: 0.76rem;
  }

  .match-event-team {
    font-size: 0.68rem;
  }

  .match-event-tags {
    justify-content: flex-start;
  }

  .match-card-score {
    min-width: 54px;
  }

  .match-card-score-pending,
  .match-card-score-live {
    font-size: 2.1rem;
  }

  .match-card .match-status-short {
    min-width: 34px;
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .match-card-meta {
    flex-wrap: nowrap;
    justify-content: center;
    overflow: hidden;
  }

  .match-card-meta span {
    gap: 6px;
    min-width: 0;
    padding: 0 8px;
    font-size: clamp(0.72rem, 2.6vw, 0.82rem);
  }

  .match-meta-icon {
    width: 14px;
    height: 14px;
  }

  .match-card-actions {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .match-card-action,
  .match-card-actions .button {
    min-height: 42px;
    flex: 1 1 0;
    flex-basis: 0;
    padding: 0 6px;
    border-radius: 12px;
    font-size: clamp(0.62rem, 2.55vw, 0.78rem);
    gap: 5px;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
  }

  .match-card-action-icon {
    width: 15px;
    height: 15px;
  }

  .match-card-prediction {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .predictions-section-header {
    display: flex;
    align-items: flex-start;
  }

  .prediction-filter-button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.74rem;
  }

  .prediction-filter-button img {
    width: 14px;
    height: 14px;
  }

  .match-stats-hero {
    display: grid;
    padding: 12px;
  }

  .match-stats-hero-top {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }

  .match-stats-hero-top .match-stage-chip,
  .match-stats-hero-top .lock-pill,
  .match-stats-count {
    min-height: 26px;
    padding: 2px 7px;
    font-size: clamp(0.52rem, 2.2vw, 0.64rem);
  }

  .match-stats-count-icon {
    width: 13px;
    height: 13px;
  }

  .match-stats-scoreboard {
    gap: 8px;
  }

  .match-stats-team .team-logo.large {
    width: 58px;
    height: 58px;
    padding: 9px;
    box-shadow: 0 0 0 4px rgba(33, 231, 216, 0.11);
  }

  .match-stats-team:last-child .team-logo.large {
    box-shadow: 0 0 0 4px rgba(63, 124, 255, 0.13);
  }

  .match-stats-team strong {
    font-size: clamp(0.72rem, 2.9vw, 0.88rem);
  }

  .match-stats-score > strong {
    font-size: clamp(1.9rem, 8.5vw, 2.8rem);
  }

  .match-stats-grid,
  .match-stat-card--split {
    grid-template-columns: 1fr;
  }

  .match-participant-hits-head,
  .match-participant-hit-row {
    grid-template-columns: 24px 32px minmax(0, 1fr) 58px 52px;
    gap: 5px;
  }

  .match-participant-hits-head {
    font-size: 0.62rem;
  }

  .match-participant-hit-row .user-avatar {
    width: 30px;
    height: 30px;
  }

  .match-participant-rank {
    width: 22px;
    height: 22px;
    font-size: 0.66rem;
  }

  .match-participant-name {
    font-size: 0.76rem;
  }

  .match-participant-prediction {
    min-width: 50px;
    padding: 3px 5px;
    font-size: 0.72rem;
  }

  .match-participant-points {
    font-size: 0.72rem;
  }

  .match-prediction-values {
    justify-content: center;
    gap: 5px;
    max-width: 188px;
  }

  .match-prediction-score,
  .match-prediction-detail {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .match-prediction-score {
    min-width: 104px;
    font-size: 1.08rem;
  }

  .match-prediction-detail--flag {
    min-width: 55px;
  }
}

.is-hidden {
  display: none !important;
}

.group-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.group-privacy-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(90, 82, 71, 0.1);
  color: #5a5247;
  border: 1px solid rgba(90, 82, 71, 0.25);
  z-index: 2;
}

.group-privacy-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.group-privacy-badge.is-public {
  background: rgba(2, 123, 136, 0.12);
  color: #027b88;
  border-color: rgba(2, 123, 136, 0.35);
}

.group-privacy-badge.is-private {
  background: rgba(178, 59, 59, 0.12);
  color: #b23b3b;
  border-color: rgba(178, 59, 59, 0.35);
}

.group-card-body {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  flex-wrap: wrap;
}

.group-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.group-card-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-card-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.privacy-pill.is-public {
  background: rgba(2, 123, 136, 0.12);
  color: #027b88;
}

.privacy-pill.is-private {
  background: rgba(178, 59, 59, 0.12);
  color: #b23b3b;
}

.group-banner {
  width: 100%;
  aspect-ratio: 16 / 5;
  background: var(--surface-3);
  overflow: hidden;
  position: relative;
}

.group-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-hero {
  width: 100%;
  aspect-ratio: 16 / 5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-3);
  margin-bottom: 16px;
  position: relative;
}

.group-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-cash-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(21, 18, 14, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(21, 18, 14, 0.2);
  z-index: 2;
}

.group-cash-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.group-cash-badge.is-hero {
  width: 32px;
  height: 32px;
  top: 12px;
  left: 12px;
}

.group-cash-badge.is-hero img {
  width: 16px;
  height: 16px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel-card h3 {
  margin-top: 0;
}

.panel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.todo-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.todo-main {
  display: grid;
  gap: 6px;
}

.todo-group {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.todo-teams {
  font-weight: 600;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.todo-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.todo-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.todo-empty {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.stage-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.stage-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stage-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stage-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.stage-title {
  font-weight: 600;
}

.stage-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.stage-progress {
  display: grid;
  gap: 6px;
}

.stage-progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(21, 18, 14, 0.16);
  background: rgba(21, 18, 14, 0.12);
}

.stage-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #027b88 0%, #2e6bff 100%);
  box-shadow: 0 0 12px rgba(2, 123, 136, 0.28);
  width: 0;
}

:root[data-theme="dark"] .stage-progress-bar {
  border-color: rgba(165, 191, 255, 0.3);
  background: rgba(237, 243, 255, 0.16);
}

:root[data-theme="dark"] .stage-progress-fill {
  background: linear-gradient(90deg, #2ab9c4 0%, #83a8ff 100%);
  box-shadow: 0 0 14px rgba(42, 185, 196, 0.38);
}

.stage-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.stage-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pill.is-urgent {
  background: rgba(216, 81, 60, 0.12);
  color: #d8513c;
}

.group-summary-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.group-summary-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  flex: 1;
}

.group-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.group-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.group-summary-status {
  font-weight: 600;
}

.group-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-summary-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.stat-card {
  min-height: auto;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.hall-preview {
  display: grid;
  gap: 14px;
}

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

.hall-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.hall-preview-rank {
  width: 24px;
  font-weight: 700;
}

.hall-preview-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hall-preview-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-preview-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.hall-preview-actions {
  display: flex;
  justify-content: flex-end;
}

.leaderboard-panel {
  position: relative;
  overflow: hidden;
  padding: 30px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(249, 241, 230, 0.92));
  border: 1px solid rgba(46, 107, 255, 0.28);
  box-shadow: 0 24px 60px rgba(12, 33, 71, 0.12);
}

.leaderboard-panel-compact {
  padding: 24px;
}

.leaderboard-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(46, 107, 255, 0.18) 1px, transparent 0);
  background-size: 12px 12px;
  opacity: 0.2;
  pointer-events: none;
}

.leaderboard-panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.leaderboard-panel .hall-preview-meta {
  text-align: center;
  margin-top: 10px;
}

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

.leaderboard-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--muted);
}

.leaderboard-panel-title::before,
.leaderboard-panel-title::after {
  content: "";
  width: clamp(42px, 10vw, 100px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.leaderboard-panel-title::after {
  background: linear-gradient(90deg, var(--accent), transparent);
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 520px);
  padding: 6px;
  border-radius: 18px;
  background: rgba(46, 107, 255, 0.08);
  border: 1px solid rgba(46, 107, 255, 0.18);
}

.leaderboard-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
}

.leaderboard-tab.is-active {
  background: linear-gradient(135deg, #0b5cff 0%, #0641c4 100%);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 12px 26px rgba(46, 107, 255, 0.28);
}

.leaderboard-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 420px);
}

.leaderboard-filter select {
  min-width: min(260px, 100%);
  min-height: 54px;
  border-radius: 18px;
  border-color: rgba(46, 107, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.98));
  box-shadow: 0 12px 28px rgba(12, 33, 71, 0.12);
  font-weight: 700;
}

.leaderboard-table-wrap {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.leaderboard-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 2px;
}

.leaderboard-table thead th:first-child {
  width: 62px;
}

.leaderboard-table thead th:last-child {
  text-align: right;
}

.leaderboard-table tbody tr {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 247, 255, 0.9));
  box-shadow: 0 12px 28px rgba(12, 33, 71, 0.08);
}

.leaderboard-clickable-row {
  cursor: pointer;
}

.leaderboard-clickable-row:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(230, 241, 255, 0.96));
}

.leaderboard-row-first {
  background:
    linear-gradient(180deg, rgba(255, 246, 219, 0.96), rgba(255, 251, 236, 0.92));
  box-shadow:
    0 0 0 1px rgba(212, 155, 0, 0.45),
    0 18px 36px rgba(212, 155, 0, 0.14);
}

.leaderboard-row-rank-2 {
  box-shadow:
    0 0 0 1px rgba(133, 151, 180, 0.26),
    0 12px 28px rgba(12, 33, 71, 0.08);
}

.leaderboard-row-rank-3 {
  box-shadow:
    0 0 0 1px rgba(205, 127, 50, 0.26),
    0 12px 28px rgba(12, 33, 71, 0.08);
}

.leaderboard-table tbody td {
  padding: 16px;
  border-top: 1px solid rgba(46, 107, 255, 0.16);
  border-bottom: 1px solid rgba(46, 107, 255, 0.16);
}

.leaderboard-table tbody td:first-child {
  width: 62px;
  font-weight: 900;
  color: var(--muted);
  border-left: 1px solid rgba(46, 107, 255, 0.16);
  border-radius: 18px 0 0 18px;
}

.leaderboard-rank-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 1.1rem;
}

.leaderboard-row-rank-1 .leaderboard-rank-cell {
  color: #d49b00;
}

.leaderboard-row-rank-2 .leaderboard-rank-cell {
  color: #8a98ad;
}

.leaderboard-row-rank-3 .leaderboard-rank-cell {
  color: #c67835;
}

.leaderboard-crown-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.leaderboard-table tbody td:last-child {
  text-align: right;
  font-weight: 900;
  color: var(--accent);
  border-right: 1px solid rgba(46, 107, 255, 0.16);
  border-radius: 0 18px 18px 0;
  font-size: 1.05rem;
}

.leaderboard-table .user-cell {
  gap: 14px;
  font-weight: 800;
  color: var(--ink);
}

.leaderboard-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.leaderboard-user-name {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.leaderboard-rank-movement {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.15;
}

.leaderboard-user-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-rank-movement strong {
  font-size: 0.76rem;
  font-weight: 700;
}

.leaderboard-rank-movement.is-up strong {
  color: #18d94f;
}

:root:not([data-theme="dark"]) .leaderboard-rank-movement.is-up strong {
  color: #027b88;
}

.leaderboard-rank-movement.is-down strong {
  color: #ff3d2e;
}

.leaderboard-rank-movement.is-same strong {
  color: var(--muted);
}

.leaderboard-rank-movement-caption {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.leaderboard-best-climber {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(49, 132, 255, 0.28);
  background: rgba(49, 132, 255, 0.08);
  color: #3184ff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.leaderboard-best-climber img {
  width: 10px;
  height: 10px;
  object-fit: contain;
  filter: brightness(0);
}

:root[data-theme="dark"] .leaderboard-best-climber {
  border-color: rgba(49, 132, 255, 0.42);
  background: rgba(49, 132, 255, 0.16);
  color: #3184ff;
}

:root[data-theme="dark"] .leaderboard-best-climber img {
  filter: brightness(0) invert(1);
}

.leaderboard-table .user-cell .user-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(46, 107, 255, 0.38);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.75),
    0 0 22px rgba(46, 107, 255, 0.18);
}

.leaderboard-row-first .user-cell .user-avatar {
  border-color: rgba(212, 155, 0, 0.78);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.86),
    0 0 26px rgba(212, 155, 0, 0.28);
}

.leaderboard-points-content {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #0b5cff;
  text-shadow: 0 0 18px rgba(46, 107, 255, 0.22);
}

.cash-icon-chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(21, 18, 14, 0.2);
  background: rgba(255, 253, 249, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cash-icon-chip img {
  width: 10px;
  height: 10px;
  object-fit: contain;
  display: block;
}

.leaderboard-empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px 0 6px;
}

.activity-feed-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(196, 166, 120, 0.35);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(249, 241, 230, 0.92));
  box-shadow: 0 18px 40px rgba(21, 18, 14, 0.08);
}

:root[data-theme="dark"] .activity-feed-panel {
  border-color: rgba(42, 185, 196, 0.28);
  background: linear-gradient(180deg, rgba(12, 33, 71, 0.92), rgba(8, 22, 49, 0.94));
  box-shadow: 0 20px 46px rgba(2, 6, 14, 0.4);
}

.activity-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activity-feed-header h2 {
  margin: 0 0 4px;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
}

.activity-feed-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 0 0 2px;
  overflow-x: auto;
  padding: 1px 0 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.activity-feed-filters::-webkit-scrollbar {
  display: none;
}

.activity-feed-filters button {
  min-height: 30px;
  border: 1px solid rgba(196, 166, 120, 0.42);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.activity-feed-filters button.is-active {
  border-color: rgba(2, 123, 136, 0.55);
  background: #027b88;
  color: #fff;
}

:root[data-theme="dark"] .activity-feed-filters button {
  border-color: rgba(165, 191, 255, 0.22);
  background: rgba(10, 26, 58, 0.74);
  color: #dce8ff;
}

:root[data-theme="dark"] .activity-feed-filters button.is-active {
  border-color: rgba(49, 132, 255, 0.8);
  background: #2e6bff;
  color: #fff;
}

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

.activity-feed-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(196, 166, 120, 0.34);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.92);
}

.activity-feed-item.is-highlighted {
  border-color: rgba(2, 123, 136, 0.58);
}

:root[data-theme="dark"] .activity-feed-item {
  border-color: rgba(165, 191, 255, 0.18);
  background: rgba(13, 34, 73, 0.8);
}

.activity-feed-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 0 18px rgba(255, 255, 255, 0.16);
}

.activity-feed-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255, 255, 255, 0.82));
}

.activity-feed-icon--milestone {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.activity-feed-icon--achievement {
  background: linear-gradient(135deg, #d99612, #f2bf5a);
}

.activity-feed-icon--ranking {
  background: linear-gradient(135deg, #027b88, #22c55e);
}

.activity-feed-icon--group_activity {
  background: linear-gradient(135deg, #2e6bff, #2ab9c4);
}

.activity-feed-icon--match_result {
  background: linear-gradient(135deg, #ff6b3d, #f59e0b);
}

.activity-feed-content {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.activity-feed-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.activity-feed-title-row h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 800;
}

.activity-feed-title-row time {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

.activity-feed-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.activity-feed-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  align-items: center;
}

.activity-reactions-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #027b88;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.activity-reactions-view-all span:last-child {
  font-size: 1rem;
  line-height: 1;
}

.activity-reaction-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.activity-reaction-trigger:focus-visible {
  outline: 2px solid rgba(2, 123, 136, 0.5);
  outline-offset: 3px;
  border-radius: 999px;
}

.activity-reaction-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  border: 1px solid rgba(196, 166, 120, 0.38);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(249, 241, 230, 0.72);
  font-size: 0.7rem;
}

.activity-reaction-summary.is-active {
  border-color: rgba(2, 123, 136, 0.48);
  color: #027b88;
}

.activity-reaction-prompt {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(21, 18, 14, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.52);
}

.activity-reaction-prompt img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0);
}

.is-latest-activity .activity-reaction-prompt {
  animation: activityReactionCue 900ms ease-out 1 420ms;
}

@keyframes activityReactionCue {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(2, 123, 136, 0);
  }
  35% {
    transform: scale(1.14);
    box-shadow: 0 0 0 5px rgba(2, 123, 136, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(2, 123, 136, 0);
  }
}

:root[data-theme="dark"] .activity-reaction-summary {
  border-color: rgba(165, 191, 255, 0.2);
  background: rgba(8, 22, 49, 0.72);
}

:root[data-theme="dark"] .activity-reaction-summary.is-active {
  border-color: rgba(42, 185, 196, 0.5);
  color: #2ab9c4;
}

:root[data-theme="dark"] .activity-reactions-view-all {
  color: #2ee6da;
}

:root[data-theme="dark"] .activity-reaction-trigger:focus-visible {
  outline-color: rgba(42, 185, 196, 0.7);
}

:root[data-theme="dark"] .activity-reaction-prompt {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(8, 22, 49, 0.48);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .activity-reaction-prompt img {
  filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(255, 255, 255, 0.68));
}

:root[data-theme="dark"] .is-latest-activity .activity-reaction-prompt {
  animation-name: activityReactionCueDark;
}

@keyframes activityReactionCueDark {
  0% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  }
  35% {
    transform: scale(1.14);
    box-shadow:
      0 0 14px rgba(255, 255, 255, 0.34),
      0 0 0 5px rgba(42, 185, 196, 0.16);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
  }
}

.activity-feed-empty,
.activity-feed-loading {
  padding: 28px 16px;
  text-align: center;
  border: 1px dashed rgba(196, 166, 120, 0.42);
  border-radius: 14px;
}

.activity-feed-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border: 1px solid rgba(2, 123, 136, 0.24);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 10px 24px rgba(21, 18, 14, 0.08);
}

.activity-feed-empty-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0);
}

:root[data-theme="dark"] .activity-feed-empty,
:root[data-theme="dark"] .activity-feed-loading {
  border-color: rgba(165, 191, 255, 0.2);
}

:root[data-theme="dark"] .activity-feed-empty-icon {
  border-color: rgba(42, 185, 196, 0.36);
  background: rgba(8, 22, 49, 0.72);
  box-shadow: 0 0 22px rgba(42, 185, 196, 0.16);
}

:root[data-theme="dark"] .activity-feed-empty-icon img {
  filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255, 255, 255, 0.68));
}

.activity-feed-empty h3 {
  margin: 0 0 6px;
}

.activity-feed-load-more {
  justify-self: center;
}

.activity-reaction-popover {
  position: fixed;
  z-index: 2500;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(196, 166, 120, 0.44);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 42px rgba(21, 18, 14, 0.16);
  scrollbar-width: none;
  touch-action: pan-x;
}

.activity-reaction-popover::-webkit-scrollbar {
  display: none;
}

:root[data-theme="dark"] .activity-reaction-popover {
  border-color: rgba(165, 191, 255, 0.24);
  background: rgba(8, 22, 49, 0.98);
  box-shadow: 0 18px 44px rgba(2, 6, 14, 0.5);
}

.activity-reaction-popover button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
}

.activity-reaction-popover button.is-active,
.activity-reaction-popover button:hover {
  border-color: rgba(2, 123, 136, 0.38);
  background: rgba(2, 123, 136, 0.1);
}

:root[data-theme="dark"] .activity-reaction-popover button.is-active,
:root[data-theme="dark"] .activity-reaction-popover button:hover {
  border-color: rgba(42, 185, 196, 0.42);
  background: rgba(42, 185, 196, 0.13);
}

.activity-reactions-sheet-modal {
  z-index: 2700;
}

.activity-reactions-sheet {
  display: grid;
  gap: 12px;
  max-height: min(76vh, 620px);
  padding: 14px 16px 18px;
  border-color: rgba(196, 166, 120, 0.32);
  background: rgba(255, 253, 248, 0.98);
}

.activity-reactions-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-reactions-sheet-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 800;
}

.activity-reactions-sheet-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.activity-reactions-sheet-header .icon-button {
  width: 30px;
  height: 30px;
  border-color: rgba(21, 18, 14, 0.14);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}

.activity-reactions-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.activity-reactions-filters::-webkit-scrollbar {
  display: none;
}

.activity-reactions-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(196, 166, 120, 0.38);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.activity-reactions-filter strong {
  color: #027b88;
  font-weight: 800;
}

.activity-reactions-filter.is-active {
  border-color: rgba(49, 132, 255, 0.58);
  background: #2e6bff;
  color: #fff;
}

.activity-reactions-filter.is-active strong {
  color: #7ff6ed;
}

.activity-reactions-users {
  display: grid;
  max-height: min(48vh, 430px);
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(249, 241, 230, 0.48);
}

.activity-reaction-user {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(21, 18, 14, 0.08);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
}

.activity-reaction-user:last-child {
  border-bottom: 0;
}

.activity-reaction-user .user-avatar {
  width: 30px;
  height: 30px;
}

.activity-reaction-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-reaction-user strong {
  font-size: 1.05rem;
  line-height: 1;
}

.activity-reactions-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

:root[data-theme="dark"] .activity-reactions-sheet {
  border-color: rgba(165, 191, 255, 0.2);
  background: rgba(8, 22, 49, 0.98);
}

:root[data-theme="dark"] .activity-reactions-sheet-header h3 {
  color: #f5f8ff;
}

:root[data-theme="dark"] .activity-reactions-sheet-header .icon-button {
  border-color: rgba(165, 191, 255, 0.18);
  color: #a9b8d8;
}

:root[data-theme="dark"] .activity-reactions-filter {
  border-color: rgba(165, 191, 255, 0.22);
  background: rgba(10, 26, 58, 0.72);
  color: #c8d6f2;
}

:root[data-theme="dark"] .activity-reactions-filter strong {
  color: #2ee6da;
}

:root[data-theme="dark"] .activity-reactions-filter.is-active {
  border-color: rgba(49, 132, 255, 0.78);
  background: #2e6bff;
  color: #fff;
}

:root[data-theme="dark"] .activity-reactions-users {
  background: rgba(4, 15, 36, 0.46);
}

:root[data-theme="dark"] .activity-reaction-user {
  border-bottom-color: rgba(165, 191, 255, 0.12);
  color: #edf4ff;
}

.discover-panel {
  display: grid;
  gap: 16px;
}

@media (max-width: 900px) {
  .leaderboard-panel {
    padding: 22px;
  }
}

@media (max-width: 540px) {
  .leaderboard-panel {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .leaderboard-panel-title {
    letter-spacing: 0.26em;
  }

  .leaderboard-panel-title::before,
  .leaderboard-panel-title::after {
    width: 34px;
  }

  .leaderboard-tabs {
    grid-template-columns: 1fr;
  }

  .leaderboard-filter {
    align-items: stretch;
    flex-direction: column;
    text-align: left;
  }

  .leaderboard-filter select {
    width: 100%;
  }

  .leaderboard-table {
    table-layout: fixed;
    border-spacing: 0 10px;
  }

  .leaderboard-table thead th,
  .leaderboard-table tbody td {
    padding: 12px 8px;
    font-size: 0.84rem;
  }

  .leaderboard-table thead th {
    letter-spacing: 0.1em;
  }

  .leaderboard-table thead th:first-child,
  .leaderboard-table tbody td:first-child {
    width: 42px;
  }

  .leaderboard-table thead th:last-child,
  .leaderboard-table tbody td:last-child {
    width: 82px;
  }

  .leaderboard-table tbody td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .leaderboard-table .user-cell {
    gap: 8px;
  }

  .leaderboard-table .user-cell .user-avatar {
    width: 38px;
    height: 38px;
  }

  .leaderboard-crown-icon {
    width: 18px;
    height: 18px;
  }
}

.discover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.recommend-list {
  display: grid;
  gap: 12px;
}

.recommend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommend-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.table-wrap {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #eee3d4;
}

.data-table th {
  background: #fcf7f0;
  color: var(--muted);
}

.pagination {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
}

.pagination button {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.push-reminder {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 6, 0.35);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
}

.push-reminder-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  width: min(420px, 92vw);
  display: grid;
  gap: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.push-reminder-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.push-reminder-text {
  margin: 0;
  color: var(--muted);
}

.push-reminder-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 6, 0.4);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal.sheet {
  place-items: end center;
  animation: sheetFadeIn 180ms ease-out both;
}

.modal.is-closing {
  animation: sheetFadeOut 200ms ease-in both;
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  width: min(560px, 100%);
  min-width: 0;
  display: grid;
  gap: 16px;
  max-height: 88vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  box-shadow: var(--shadow-lg);
  animation: modalPop 200ms ease-out both;
}

.modal-content.sheet {
  width: min(560px, 100%);
  border-radius: 18px 18px 0 0;
  margin-top: auto;
  max-height: 85vh;
  animation: sheetSlideUp 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

.player-detail-modal {
  background: rgba(2, 8, 23, 0.72);
  place-items: end center;
}

.player-detail-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: 94vh;
  padding: 0;
  overflow: hidden auto;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(46, 107, 255, 0.24), transparent 32%),
    linear-gradient(160deg, #061a3c 0%, #0b2c5b 52%, #061a3c 100%);
  border-color: rgba(96, 131, 196, 0.42);
  color: #eef5ff;
}

.player-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  background: rgba(12, 37, 82, 0.9);
  color: #fff;
  border-color: rgba(96, 131, 196, 0.5);
}

.player-detail-body {
  display: grid;
  gap: 14px;
  padding: 24px 16px 18px;
}

.player-detail-hero {
  min-height: 236px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 12px;
  align-items: end;
  border-bottom: 1px solid rgba(96, 131, 196, 0.24);
}

.player-detail-identity {
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 24px 0;
}

.player-detail-loading {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 2px 0 8px;
  text-align: center;
}

.player-detail-loading .inline-loading-lottie {
  width: 78px;
  height: 78px;
}

.player-detail-number {
  color: #21e7d8;
  font-size: 1.8rem;
  font-weight: 900;
}

.player-detail-identity h3 {
  margin: 0;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1.1;
}

.player-detail-meta-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #c7d9f5;
  font-size: 0.88rem;
}

:root:not([data-theme="dark"]) .player-detail-meta-line {
  color: #3f506a;
}

.player-detail-status {
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(28, 209, 189, 0.16);
  color: #4ff0e5;
  font-size: 0.76rem;
  font-weight: 800;
}

.player-detail-photo {
  align-self: end;
  justify-self: end;
  width: min(178px, 40vw);
  max-height: 236px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
}

.player-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(96, 131, 196, 0.42);
  border-radius: 12px;
  background: rgba(9, 29, 66, 0.68);
}

.player-detail-actions button {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #eef5ff;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.player-detail-actions button > span:last-child {
  display: grid;
  gap: 2px;
}

.player-detail-actions button small {
  color: #a8b7da;
  font-size: 0.72rem;
  font-weight: 800;
}

.player-detail-actions button strong {
  color: currentColor;
  font-size: 0.92rem;
}

.player-detail-actions button + button {
  border-left: 1px solid rgba(96, 131, 196, 0.42);
}

.player-detail-actions button:hover {
  background: rgba(46, 107, 255, 0.22);
}

.player-detail-tabs {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.player-detail-tabs button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 6px;
  background: transparent;
  color: #c7d9f5;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.player-detail-tabs button:hover,
.player-detail-tabs button:focus-visible,
.player-detail-tabs button.is-active:first-child,
.player-detail-tabs button.is-active {
  color: #21e7d8;
  border-bottom: 2px solid #21e7d8;
}

.player-detail-icon,
.player-detail-action-icon {
  flex: 0 0 auto;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--player-detail-icon-url) center / contain no-repeat;
  mask: var(--player-detail-icon-url) center / contain no-repeat;
}

.player-detail-action-icon {
  width: 18px;
  height: 18px;
  color: #eef5ff;
}

.player-detail-icon {
  width: 20px;
  height: 20px;
  color: #1877c9;
}

:root[data-theme="dark"] .player-detail-icon {
  color: #43d7ff;
}

:root:not([data-theme="dark"]) .player-detail-actions {
  background: rgba(255, 253, 248, 0.86);
  border-color: rgba(21, 18, 14, 0.14);
}

:root:not([data-theme="dark"]) .player-detail-actions button {
  color: #15120e;
}

:root:not([data-theme="dark"]) .player-detail-actions button small {
  color: #5f574f;
}

:root:not([data-theme="dark"]) .player-detail-actions button + button {
  border-left-color: rgba(21, 18, 14, 0.12);
}

:root:not([data-theme="dark"]) .player-detail-action-icon {
  color: #15120e;
}

.player-detail-icon--profile {
  --player-detail-icon-url: url("/icons/soccer-player.png");
}

.player-detail-icon--stats {
  --player-detail-icon-url: url("/icons/stats.png");
}

.player-detail-icon--transfer {
  --player-detail-icon-url: url("/icons/man-with-dollar-symbol.png");
}

.player-detail-icon--injury {
  --player-detail-icon-url: url("/icons/leg_injury.png");
}

.player-detail-icon--calendar {
  --player-detail-icon-url: url("/icons/calendar.png");
}

.player-detail-action-icon--target {
  --player-detail-icon-url: url("/icons/target_goal.png");
}

.player-detail-action-icon--assist {
  --player-detail-icon-url: url("/icons/send_paper.png");
}

.player-detail-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(96, 131, 196, 0.32);
  border-radius: 14px;
  padding: 12px;
  background: rgba(7, 26, 59, 0.55);
}

.player-detail-section h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
}

:root:not([data-theme="dark"]) .player-detail-section h4 {
  color: #15120e;
}

.player-detail-source {
  margin: -4px 0 0;
  font-size: 0.86rem;
}

.player-profile-grid,
.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(96, 131, 196, 0.26);
  border-radius: 10px;
  overflow: hidden;
}

.player-profile-grid div,
.player-stats-grid div {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid rgba(96, 131, 196, 0.22);
  border-bottom: 1px solid rgba(96, 131, 196, 0.22);
}

.player-profile-grid span,
.player-stats-grid span {
  color: #9fb4d6;
  font-size: 0.72rem;
}

.player-profile-grid strong,
.player-stats-grid strong {
  color: #fff;
  font-size: 1rem;
}

.player-stats-grid strong {
  color: #43d7ff;
  font-size: 1.18rem;
}

.player-profile-grid small,
.player-detail-row small {
  color: #9fb4d6;
  font-size: 0.72rem;
}

.player-detail-list {
  display: grid;
  gap: 8px;
}

.player-detail-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(96, 131, 196, 0.24);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(9, 29, 66, 0.48);
}

.player-detail-row > span {
  color: #9fb4d6;
  font-size: 0.72rem;
}

.player-detail-row strong {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eef5ff;
  font-size: 0.82rem;
}

.player-detail-row.is-injury {
  border-color: rgba(255, 89, 117, 0.32);
  background: rgba(74, 21, 47, 0.3);
}

.player-detail-mini-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.player-detail-footnote {
  margin: 0;
  color: #9fb4d6;
  text-align: center;
  font-size: 0.74rem;
}

.player-detail-empty {
  margin: 0;
  border: 1px solid rgba(96, 131, 196, 0.24);
  border-radius: 10px;
  padding: 14px;
  background: rgba(9, 29, 66, 0.35);
}

.modal.is-closing .modal-content {
  animation: modalPopOut 200ms ease-in both;
}

.modal.is-closing .modal-content.sheet {
  animation: sheetSlideDown 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sheetFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheetFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes sheetSlideUp {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheetSlideDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(80px);
  }
}

.modal-content.dialog-modal {
  width: min(440px, 100%);
}

.modal-content.wide {
  width: min(920px, 100%);
}

.modal.match-edit-modal {
  place-items: center;
}

@media (max-width: 720px) {
  .modal.match-edit-modal {
    place-items: center;
    padding: 10px;
  }

  .match-edit-modal .modal-content.wide {
    max-height: calc(100dvh - 20px);
  }
}

.prediction-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 6, 0.5);
  display: grid;
  place-items: center;
  z-index: 3;
  padding: 24px;
}

.prediction-success-card {
  width: min(280px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.prediction-success-lottie {
  width: 132px;
  height: 132px;
}

.prediction-success-text {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalPopOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header .icon-button {
  align-self: flex-start;
}

.modal-body {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.rules-modal-content {
  width: min(780px, 100%);
}

.rules-modal-body {
  gap: 16px;
}

.rules-section {
  display: grid;
  gap: 10px;
}

.rules-section h4 {
  margin: 0;
}

.rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rules-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.gift-rules {
  display: grid;
  gap: 10px;
}

.gift-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.gift-rules-list li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.gift-rules-list li::before {
  content: "•";
  color: var(--accent);
}

.coupon-preview {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf4ec;
}

.coupon-preview.is-poster {
  display: block;
  padding: 8px;
  background: #faf4ec;
}

.coupon-preview.is-poster .coupon-poster-full {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.coupon-poster-fallback {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  font-size: 2rem;
}

.coupon-preview img,
.coupon-image-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff4dc;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.coupon-preview-body {
  display: grid;
  gap: 4px;
}

.coupon-title {
  font-weight: 600;
}

.coupon-company {
  color: var(--muted);
  font-size: 0.9rem;
}

.coupon-meta {
  font-size: 0.85rem;
  color: #a16207;
}

.coupon-description {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.gift-list {
  display: grid;
  gap: 14px;
}

.gift-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex-wrap: wrap;
}

.gift-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gift-card-media {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.gift-card-media img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.gift-card-media .coupon-image-placeholder {
  width: 56px;
  height: 56px;
}

.gift-card-title {
  font-weight: 600;
}

.gift-card-company {
  color: var(--muted);
  font-size: 0.9rem;
}

.gift-card-meta {
  font-size: 0.85rem;
  color: #a16207;
}

.gift-card-code {
  font-weight: 600;
  font-size: 0.9rem;
  background: #f7efe3;
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px dashed var(--border);
  word-break: break-all;
}

.gift-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 42px;
}

.gift-button-lottie {
  width: 20px;
  height: 20px;
  display: inline-block;
  pointer-events: none;
}

.gift-button-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.reward-code-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fffaf0;
  text-align: center;
}

.reward-code-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
}

.reward-code-value {
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
}

.reward-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
}

.gift-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 16px;
}

.gift-tab {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.gift-tab:last-child {
  border-right: 0;
}

.gift-tab img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0);
}

.gift-tab.is-active {
  color: var(--accent);
  background: rgba(255, 138, 90, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 90, 0.18);
}

:root[data-theme="dark"] .gift-tab.is-active {
  color: #2e86ff;
  background: rgba(46, 107, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.42);
}

.gift-voucher-card {
  display: grid;
  grid-template-columns: minmax(160px, 24%) minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  cursor: default;
}

.gift-voucher-card.is-used .gift-voucher-image img,
.gift-voucher-card.is-expired .gift-voucher-image img,
.reward-modal-image.is-muted img {
  filter: grayscale(1);
}

.gift-voucher-image {
  width: 100%;
  height: 100%;
  min-height: 136px;
  background: #f7efe3;
}

.gift-voucher-image img,
.gift-voucher-image .coupon-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 136px;
  border-radius: 0;
  object-fit: cover;
}

.gift-voucher-body {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}

.gift-voucher-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reward-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 0;
  flex-wrap: wrap;
}

.reward-teams > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gift-status-badge,
.reward-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 138, 90, 0.1);
  white-space: nowrap;
}

.gift-status-badge.is-used,
.gift-status-badge.is-expired,
.reward-status-pill.is-used,
.reward-status-pill.is-expired {
  color: var(--muted);
  background: rgba(122, 112, 103, 0.1);
}

.gift-voucher-challenges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-challenge-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--accent);
  background: rgba(255, 138, 90, 0.08);
  font-size: 0.84rem;
  font-weight: 500;
}

.gift-voucher-card .gift-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.gift-voucher-card .gift-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--ink);
  font-size: 0.94rem;
}

.gift-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gift-card-meta img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: brightness(0);
}

.gift-voucher-actions {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 14px;
  padding: 16px;
  min-width: 190px;
}

.gift-voucher-actions .button {
  min-width: 150px;
}

.gift-voucher-actions span {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
}

.reward-reveal-modal {
  width: min(760px, 100%);
}

.reward-reveal-modal .modal-header {
  align-items: flex-start;
  gap: 12px;
}

.reward-voucher-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.reward-modal-image {
  min-height: 150px;
  background: #f7efe3;
}

.reward-modal-image .coupon-poster-full,
.reward-modal-image .coupon-poster-fallback {
  width: 100%;
  height: 150px;
  max-height: 150px;
  object-fit: cover;
  border-radius: 0;
}

.reward-modal-summary {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 16px 18px;
  text-align: center;
}

.reward-modal-summary h4,
.reward-modal-summary p {
  margin: 0;
}

.reward-modal-summary h4 {
  font-size: 1.35rem;
  font-weight: 600;
}

.reward-modal-summary p {
  color: var(--muted);
}

.reward-code-block,
.reward-otp-block {
  position: relative;
  border: 1px dashed var(--border);
  background: rgba(255, 138, 90, 0.06);
}

.reward-code-value {
  font-size: clamp(1.35rem, 6vw, 2.5rem);
  color: var(--accent);
  letter-spacing: 0.08em;
}

.reward-copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.reward-otp-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
}

.reward-otp-block.is-disabled {
  opacity: 0.72;
}

.reward-otp-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 78px));
  justify-content: center;
  gap: 16px;
}

.reward-otp-inputs input {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.6rem;
  text-align: center;
}

.reward-otp-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.reward-redeem-button,
.reward-copy-wide,
.reward-close-button {
  width: 100%;
}

.reward-redeem-button img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.reward-success {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 500;
}

.reward-success-lottie {
  width: 96px;
  height: 96px;
}

:root[data-theme="dark"] .gift-voucher-image,
:root[data-theme="dark"] .reward-modal-image {
  background: #0a1a38;
}

:root[data-theme="dark"] .reward-challenge-badge,
:root[data-theme="dark"] .reward-code-block,
:root[data-theme="dark"] .reward-otp-block,
:root[data-theme="dark"] .gift-status-badge,
:root[data-theme="dark"] .reward-status-pill {
  background: rgba(46, 107, 255, 0.12);
}

:root[data-theme="dark"] .reward-code-value,
:root[data-theme="dark"] .reward-copy-button,
:root[data-theme="dark"] .reward-challenge-badge,
:root[data-theme="dark"] .gift-voucher-actions span,
:root[data-theme="dark"] .reward-success {
  color: #2e86ff;
}

:root[data-theme="dark"] .gift-tab img,
:root[data-theme="dark"] .gift-card-meta img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.rules-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f6efe6;
  border: 1px solid var(--border);
  font-size: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.match-detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #faf4ec;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.match-detail::before,
.match-detail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.match-detail::before {
  background: url("/icons/stadium_bg.webp") center / cover no-repeat;
  opacity: 0.08;
}

.match-detail::after {
  background: rgba(46, 107, 255, 0.13);
}

:root:not([data-theme="dark"]) .match-detail::after {
  background: rgba(249, 241, 230, 0.72);
}

.match-detail > * {
  position: relative;
  z-index: 1;
}

.match-detail .match-row {
  margin-top: 10px;
}

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}

.accordion.is-warm {
  background: #fff8ef;
}

.accordion.odds-accordion {
  position: relative;
  overflow: visible;
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%),
    var(--surface);
}

.accordion-toggle {
  position: relative;
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 16px;
  font: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.odds-accordion .accordion-toggle {
  padding-right: 46px;
}

.odds-new-tag {
  top: -14px;
  right: -12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  font-size: 0.6rem;
}

.odds-accordion .accordion-arrow {
  margin-right: 0;
}

.accordion-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.accordion-label-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  background: #fff !important;
  background-color: #fff !important;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.92;
}

.accordion-label-icon.is-head-to-head {
  -webkit-mask: url("/icons/head_to_head.png") center / contain no-repeat;
  mask: url("/icons/head_to_head.png") center / contain no-repeat;
}

.accordion-label-icon.is-globe {
  -webkit-mask: url("/icons/globe.png") center / contain no-repeat;
  mask: url("/icons/globe.png") center / contain no-repeat;
}

.accordion-label-icon.is-odds {
  background: transparent !important;
  background-color: transparent !important;
  display: inline-grid;
  place-items: center;
}

.accordion-label-icon.is-odds img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  filter: brightness(0);
}

.accordion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.accordion-arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

.accordion-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.accordion-body {
  padding: 0 16px 16px;
}

.accordion.is-open .accordion-panel {
  opacity: 1;
  max-height: none !important;
}

.accordion.is-open .accordion-arrow {
  transform: rotate(-135deg);
}

.pre-match-odds {
  display: grid;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
}

.pre-match-odds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.pre-match-odds-markets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pre-match-odds-market {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.pre-match-odds-market h5 {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.pre-match-odds-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 7px;
}

.pre-match-odd {
  min-width: 0;
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 10px;
  padding: 7px 8px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  color: var(--muted);
  line-height: 1.1;
}

.pre-match-odd span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 500;
}

.pre-match-odd strong {
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
}

.pre-match-odds-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.h2h-panel,
.prediction-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-width: 0;
}

.prediction-score-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.prediction-score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.prediction-score-vs {
  align-self: end;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 44px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.knockout-fields {
  display: grid;
  gap: 10px;
}

.knockout-fields > p {
  margin: 0;
  font-size: 0.84rem;
}

.knockout-row {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) minmax(62px, 1fr) minmax(0, 6fr);
  align-items: end;
  gap: 10px;
}

.knockout-row .checkbox-field {
  min-height: 48px;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  box-shadow: none;
  justify-content: center;
  white-space: nowrap;
}

.knockout-row .checkbox-field input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(21, 18, 14, 0.35);
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.knockout-row .checkbox-field input:checked {
  background: #fff;
  border-color: rgba(21, 18, 14, 0.58);
}

.knockout-row .checkbox-field input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #101828;
  border-bottom: 2px solid #101828;
  transform: rotate(45deg);
}

.penalty-winner-field {
  gap: 6px;
}

.penalty-winner-field span {
  color: var(--muted);
  font-size: 0.86rem;
}

.penalty-winner-field select {
  min-height: 48px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.h2h-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.h2h-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7efe5;
  font-size: 0.9rem;
}

.h2h-date {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.h2h-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.h2h-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-width: 0;
}

.h2h-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h2h-name-short {
  display: none;
}

.h2h-team--away {
  justify-content: flex-end;
  text-align: right;
}

.h2h-score {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.h2h-logo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .h2h-item {
    padding: 10px 12px;
  }

  .h2h-name-full {
    display: none;
  }

  .h2h-name-short {
    display: inline;
  }

  .h2h-score {
    font-size: 0.95rem;
  }

  .h2h-logo {
    width: 22px;
    height: 22px;
  }

  .pre-match-odds {
    font-size: 0.78rem;
  }

  .pre-match-odds-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    font-size: 0.68rem;
  }

  .pre-match-odds-markets {
    grid-template-columns: 1fr;
  }

  .pre-match-odds-market {
    padding: 9px;
  }

  .pre-match-odds-values {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
  }

  .pre-match-odd {
    min-height: 42px;
    padding: 6px 7px;
  }

  .pre-match-odd span {
    font-size: 0.66rem;
  }

  .pre-match-odd strong {
    font-size: 0.86rem;
  }

  .todo-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .todo-actions {
    width: 100%;
    justify-items: stretch;
    text-align: left;
  }

  .todo-actions .button {
    width: 100%;
  }

  .member-predictions-button {
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .prediction-stage-toggle {
    border-radius: 16px;
  }

  .prediction-stage-toggle button {
    padding: 10px 8px;
    font-size: 0.88rem;
  }

  .prediction-stage-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .prediction-table-head {
    display: none;
  }

  .timeline-prediction-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "predictor points"
      "match score";
    gap: 8px 10px;
  }

  .timeline-predictor {
    grid-area: predictor;
  }

  .timeline-match {
    grid-area: match;
  }

  .timeline-score {
    grid-area: score;
    align-self: start;
    justify-self: end;
    padding: 5px 8px;
  }

  .timeline-points {
    grid-area: points;
  }

  .timeline-match-teams {
    flex-wrap: wrap;
    gap: 6px;
  }

  .timeline-team .team-name-full {
    display: none;
  }

  .timeline-team .team-name-short {
    display: inline;
  }

  .timeline-prediction-tags {
    gap: 4px;
  }

  .group-summary-actions,
  .stage-card-actions,
  .hall-preview-actions {
    justify-content: flex-start;
  }

  .recommend-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .pill-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 12px;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .pill-row > p {
    flex: 0 0 100%;
  }

  .pill-row::after {
    content: "";
    flex: 0 0 12px;
  }

  .pill-row::-webkit-scrollbar {
    display: none;
  }

  .competition-pill-row {
    position: -webkit-sticky;
    position: sticky;
    top: calc(76px + env(safe-area-inset-top));
    z-index: 30;
    background: rgba(244, 239, 230, 0.82);
    margin-top: 12px;
    padding: 8px 10px 10px;
    border-radius: 18px;
    box-shadow: 0 10px 18px rgba(21, 18, 14, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .pill-button.competition-card {
    flex: 0 0 138px;
    min-height: 168px;
    border-radius: 16px;
    padding: 9px;
    grid-template-rows: 80px auto auto;
    gap: 7px;
  }

  .pill-button.competition-card .pill-icon {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    padding: 8px;
  }

  .pill-button.competition-see-all {
    border-style: dashed;
    color: var(--muted);
    background: #fff8ef;
  }

  .pill-button.competition-see-all .pill-icon {
    border-style: dashed;
    background: #fff;
    font-size: 1.1rem;
  }

  .group-list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .group-list > p {
    flex: 0 0 100%;
  }

  .group-list::-webkit-scrollbar {
    display: none;
  }

  .group-list .group-card {
    flex: 0 0 78%;
    max-width: 320px;
  }
}

.icon-button {
  border: none;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.card-grid.home-group-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-grid.home-group-scroll::-webkit-scrollbar {
  display: none;
}

.card-grid.home-group-scroll > p {
  flex: 0 0 100%;
}

.card-grid.home-group-scroll .group-card {
  flex: 0 0 78%;
  max-width: 320px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 18px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card strong {
  font-size: 1.05rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.login-shell {
  max-width: 460px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-shell h1 {
  margin: 0 0 8px;
}

.auth-success-lottie {
  width: 118px;
  height: 118px;
  justify-self: center;
  margin: 2px 0 -4px;
}

.auth-success-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

:root[data-theme="dark"] .login-shell {
  background: linear-gradient(180deg, #11264e 0%, #102248 100%);
  border-color: rgba(165, 191, 255, 0.3);
  color: var(--ink);
}

:root[data-theme="dark"] .login-shell .lead,
:root[data-theme="dark"] .login-shell .field,
:root[data-theme="dark"] .login-shell .muted,
:root[data-theme="dark"] .login-shell .status,
:root[data-theme="dark"] .login-shell .auth-links span {
  color: #bfd0f2;
}

:root[data-theme="dark"] .login-shell .auth-links a {
  color: #7fb2ff;
}

:root[data-theme="dark"] .login-shell .auth-links a:hover {
  color: #9ec3ff;
}

:root[data-theme="dark"] .login-shell .auth-divider {
  color: #9fb5e2;
}

:root[data-theme="dark"] .login-shell .auth-divider::before,
:root[data-theme="dark"] .login-shell .auth-divider::after {
  background: rgba(165, 191, 255, 0.32);
}

:root[data-theme="dark"] .login-shell .avatar-option {
  background: #162f61;
  border-color: rgba(165, 191, 255, 0.3);
}

:root[data-theme="dark"] .login-shell .avatar-option img {
  background: #102248;
}

:root[data-theme="dark"] .login-shell .password-toggle {
  color: #9fb5e2;
}

:root[data-theme="dark"] .login-shell .password-toggle:hover {
  color: #cfe0ff;
}

.section-title {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  min-width: 0;
}

.social-auth {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.social-auth[hidden] {
  display: none;
}

.google-auth-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  line-height: 0;
}

.google-auth-button iframe {
  border-radius: 999px !important;
}

.social-auth[aria-busy="true"] {
  opacity: 0.72;
  pointer-events: none;
}

.auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 46px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2367788F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
}

:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23DCE8FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input::placeholder,
textarea::placeholder {
  color: #8797ba;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #9cb2de;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(2, 123, 136, 0.3);
  outline-offset: 2px;
  box-shadow: 0 10px 30px rgba(2, 123, 136, 0.16);
}

select:focus,
select:focus-visible {
  outline: 0;
  box-shadow: none;
  -webkit-focus-ring-color: transparent;
}

.winner-pick-select-wrap select,
.accuracy-trend-stage-filter select {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.score-stepper {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.score-stepper input {
  border: none;
  box-shadow: none;
  border-radius: 0;
  min-width: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
}

.score-stepper input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.score-stepper input[type="number"]::-webkit-outer-spin-button,
.score-stepper input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.score-stepper input:focus {
  outline-offset: -2px;
  box-shadow: none;
}

.score-stepper-actions {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--border);
}

.score-stepper-actions button {
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0;
  cursor: pointer;
  min-height: 0;
  padding: 0;
}

.score-stepper-actions button::before {
  content: "";
  width: 12px;
  height: 12px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  border-radius: 2px;
}

.score-stepper-actions button[data-score-step="up"]::before {
  transform: translateY(3px) rotate(45deg);
}

.score-stepper-actions button[data-score-step="down"]::before {
  transform: translateY(-3px) rotate(225deg);
}

.score-stepper-actions button + button {
  border-top: 1px solid var(--border);
}

.score-stepper-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bonus-picks-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(2, 123, 136, 0.42);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(2, 123, 136, 0.12), rgba(38, 109, 211, 0.08));
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.bonus-picks-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.bonus-picks-header h4 {
  margin: 0;
}

.bonus-picks-header span {
  color: var(--teal);
  font-weight: 800;
  font-size: 0.85rem;
}

.bonus-team-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}

.bonus-team-tabs button {
  min-width: 0;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-team-tabs button.is-active {
  background: rgba(2, 123, 136, 0.18);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(2, 123, 136, 0.5);
}

.bonus-player-strip {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px 12px;
  border-bottom: 1px solid var(--border);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.bonus-player-card {
  flex: 0 0 78px;
  display: grid;
  justify-items: center;
  gap: 6px;
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
}

.bonus-player-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.bonus-player-card:focus-visible {
  outline: 2px solid #21e7d8;
  outline-offset: 4px;
  border-radius: 12px;
}

.bonus-player-info {
  position: absolute;
  right: 5px;
  top: 32px;
  z-index: 4;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  display: grid;
  place-items: center;
  background: rgba(8, 28, 63, 0.88);
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.bonus-player-info:hover,
.bonus-player-info:focus-visible {
  background: #21e7d8;
  color: #052331;
}

.bonus-player-card.is-selected .bonus-player-avatar {
  border-color: #2e6bff;
  box-shadow: 0 0 0 4px rgba(46, 107, 255, 0.2), 0 0 22px rgba(46, 107, 255, 0.28);
}

.bonus-player-card.is-goal .bonus-player-avatar {
  border-color: #21e7d8;
  background: rgba(33, 231, 216, 0.16);
  box-shadow: 0 0 0 4px rgba(33, 231, 216, 0.22), 0 0 22px rgba(33, 231, 216, 0.34);
}

.bonus-player-card.is-dual .bonus-player-avatar {
  border-color: #21e7d8;
  box-shadow:
    0 0 0 4px rgba(33, 231, 216, 0.18),
    0 0 0 7px rgba(46, 107, 255, 0.16),
    0 0 24px rgba(46, 107, 255, 0.28);
}

.bonus-selection-badge {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 46px;
  min-height: 20px;
  display: none;
  place-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #2e6bff;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
}

.bonus-selection-badge[hidden] {
  display: none;
}

.bonus-player-card.is-selected .bonus-selection-badge:not([hidden]) {
  display: grid;
}

.bonus-selection-badge.is-goal-badge {
  top: 0;
  background: #21e7d8;
  color: #052331;
}

.bonus-selection-badge.is-assist-badge {
  top: 42px;
  background: #2e6bff;
  color: #fff;
}

.bonus-player-card:not(.is-dual).is-goal .bonus-selection-badge.is-goal-badge {
  top: 42px;
}

.bonus-player-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(2, 123, 136, 0.65);
  background: #eef4ff;
}

.bonus-player-avatar.placeholder {
  display: grid;
  place-items: center;
}

.bonus-player-number {
  position: absolute;
  top: -2px;
  left: 4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.bonus-player-position {
  position: absolute;
  top: -2px;
  right: 4px;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.bonus-player-field {
  position: relative;
}

.bonus-player-field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.bonus-player-field-label .muted {
  font-size: 0.74rem;
}

.bonus-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bonus-player-picker {
  position: relative;
}

.bonus-picker-toggle,
.bonus-picker-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid rgba(96, 131, 196, 0.5);
  background: rgba(10, 31, 68, 0.42);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.bonus-picker-toggle {
  min-height: 58px;
  border-radius: 16px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.bonus-picker-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.bonus-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.bonus-picker-chevron {
  font-size: 1.25rem;
  line-height: 1;
}

.bonus-picker-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.bonus-picker-avatar.is-empty {
  font-weight: 900;
}

.bonus-picker-menu {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(96, 131, 196, 0.58);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bonus-picker-option {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  background: transparent;
  cursor: pointer;
}

.bonus-picker-option:hover,
.bonus-picker-option.is-selected {
  background: rgba(46, 107, 255, 0.12);
}

.bonus-picker-option .bonus-picker-avatar {
  width: 34px;
  height: 34px;
}

.bonus-picker-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.bonus-picker-saved-label {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(28, 209, 189, 0.14);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.bonus-picks-note {
  margin: 0;
  font-size: 0.85rem;
}

:root[data-theme="dark"] .score-stepper,
:root[data-theme="dark"] .prediction-score-card,
:root[data-theme="dark"] .bonus-team-tabs {
  background: rgba(11, 24, 51, 0.84);
  border-color: rgba(90, 125, 191, 0.72);
}

:root[data-theme="dark"] .knockout-row .checkbox-field input {
  background: rgba(7, 19, 43, 0.96);
  border-color: rgba(90, 125, 191, 0.88);
}

:root[data-theme="dark"] .knockout-row .checkbox-field input:checked {
  background: linear-gradient(135deg, #1d64ff, #27a7ff);
  border-color: rgba(138, 181, 255, 0.96);
}

:root[data-theme="dark"] .knockout-row .checkbox-field input:checked::after {
  border-color: #fff;
}

:root[data-theme="dark"] .score-stepper-actions {
  border-left-color: rgba(90, 125, 191, 0.72);
}

:root[data-theme="dark"] .score-stepper-actions button + button {
  border-top-color: rgba(90, 125, 191, 0.72);
}

:root[data-theme="dark"] .bonus-picks-panel {
  background: linear-gradient(145deg, rgba(28, 209, 189, 0.12), rgba(40, 116, 240, 0.14));
  border-color: rgba(28, 209, 189, 0.58);
}

:root[data-theme="dark"] .bonus-team-tabs button.is-active {
  background: rgba(28, 209, 189, 0.16);
  color: #2eead7;
  box-shadow: inset 0 0 0 1px rgba(28, 209, 189, 0.62);
}

:root[data-theme="dark"] .bonus-player-strip {
  border-bottom-color: rgba(90, 125, 191, 0.5);
}

:root[data-theme="dark"] .bonus-player-avatar {
  background: rgba(13, 29, 63, 0.92);
  border-color: rgba(28, 209, 189, 0.7);
}

:root[data-theme="dark"] .bonus-picker-toggle,
:root[data-theme="dark"] .bonus-picker-option {
  background: rgba(12, 30, 66, 0.72);
  border-color: rgba(90, 125, 191, 0.72);
  color: var(--ink);
}

:root[data-theme="dark"] .bonus-picker-menu {
  background: #102653;
  border-color: rgba(90, 125, 191, 0.72);
}

:root[data-theme="dark"] .bonus-picker-option:hover,
:root[data-theme="dark"] .bonus-picker-option.is-selected {
  background: rgba(46, 107, 255, 0.22);
}

@media (max-width: 720px) {
  .prediction-score-card {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .prediction-score-grid {
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    gap: 8px;
  }

  .prediction-score-grid .field {
    gap: 6px;
    font-size: 0.82rem;
  }

  .prediction-score-vs {
    min-width: 30px;
    height: 42px;
    font-size: 0.68rem;
  }

  .score-stepper {
    grid-template-columns: minmax(0, 1fr) 34px;
    border-radius: 12px;
  }

  .score-stepper input {
    padding: 8px 6px;
    font-size: 1.35rem;
  }

  .score-stepper-actions button::before {
    width: 10px;
    height: 10px;
    border-top-width: 3px;
    border-left-width: 3px;
  }

  .knockout-row {
    grid-template-columns: minmax(44px, 1fr) minmax(52px, 1fr) minmax(0, 6fr);
    gap: 8px;
  }

  .knockout-row .checkbox-field {
    min-height: 42px;
    padding: 8px 9px;
    font-size: 0.78rem;
    gap: 6px;
  }

  .knockout-row .checkbox-field input {
    width: 18px;
    height: 18px;
  }

  .penalty-winner-field span {
    font-size: 0.74rem;
  }

  .penalty-winner-field select {
    min-height: 42px;
    padding: 8px 34px 8px 10px;
    font-size: 0.82rem;
    background-position: right 12px center;
  }
}

.input-with-icon {
  position: relative;
  display: grid;
}

.input-with-icon input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.password-toggle:hover {
  color: var(--accent);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
}

.status {
  min-height: 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-links {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.auth-links a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-links a:hover {
  color: #d4461f;
}

.auth-links span {
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

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

.card,
.panel-card,
.match-card,
.group-card,
.stage-card,
.recommend-card,
.comparison-card {
  animation: float-in 0.45s ease both;
}

.card-grid > *:nth-child(1) {
  animation-delay: 0.04s;
}

.card-grid > *:nth-child(2) {
  animation-delay: 0.08s;
}

.card-grid > *:nth-child(3) {
  animation-delay: 0.12s;
}

.card-grid > *:nth-child(4) {
  animation-delay: 0.16s;
}

.card-grid > *:nth-child(5) {
  animation-delay: 0.2s;
}

.card-grid > *:nth-child(6) {
  animation-delay: 0.24s;
}

.group-list .group-card:nth-child(1) {
  animation-delay: 0.04s;
}

.group-list .group-card:nth-child(2) {
  animation-delay: 0.08s;
}

.group-list .group-card:nth-child(3) {
  animation-delay: 0.12s;
}

.group-list .group-card:nth-child(4) {
  animation-delay: 0.16s;
}

.group-list .group-card:nth-child(5) {
  animation-delay: 0.2s;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

html.auth-checking body > .page {
  opacity: 0;
}

body.is-ready .reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "main";
  }

  .top-nav {
    display: flex;
  }

  .view-context-strip-inner {
    padding: 10px 16px;
  }

  .leaderboard-view-hero-card {
    border-radius: 22px;
  }

.top-nav .icon-button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: var(--nav-ink);
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.top-nav .notification-button {
  color: var(--nav-ink);
}

.top-nav .icon-button:hover {
  transform: none;
  box-shadow: none;
}

  .side-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 260px;
    min-height: 100vh;
    padding: calc(22px + env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
    z-index: 40;
    transition: left 0.25s ease;
    overflow-y: auto;
  }

  .side-nav.is-open {
    left: 0;
  }

  .side-links {
    width: 100%;
    display: grid;
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  .side-footer {
    width: 100%;
    display: grid;
    gap: 10px;
  }

  .group-meta {
    justify-content: flex-start;
  }

  .tab-bar {
    position: relative;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-right: 22vw;
    scroll-padding-inline: 6px 22vw;
    mask-image: linear-gradient(90deg, #000 calc(100% - 42px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 42px), transparent);
  }

  .tab-button {
    flex: 0 0 30vw;
    min-width: 106px;
    max-width: 132px;
  }

  .radar-wrap {
    grid-template-columns: 1fr;
  }

  .app-main {
    background: transparent;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .gift-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .gift-voucher-card {
    grid-template-columns: 1fr;
  }

  .gift-voucher-image,
  .gift-voucher-image img,
  .gift-voucher-image .coupon-image-placeholder {
    min-height: 128px;
    max-height: 150px;
  }

  .gift-voucher-actions {
    width: 100%;
    justify-items: stretch;
    min-width: 0;
    padding-top: 0;
  }

  .gift-voucher-actions .button {
    width: 100%;
  }

  .reward-otp-inputs {
    grid-template-columns: repeat(4, minmax(48px, 64px));
    gap: 10px;
  }

  .reward-qr {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 540px) {
  .player-detail-body {
    padding: 22px 12px 16px;
  }

  .player-detail-hero {
    grid-template-columns: minmax(0, 1fr) 132px;
    min-height: 214px;
  }

  .player-detail-photo {
    width: 132px;
  }

  .player-profile-grid,
  .player-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-detail-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .player-detail-row small {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .button,
  .card,
  .panel-card,
  .match-card,
  .group-card,
  .stage-card,
  .recommend-card,
  .comparison-card {
    transition: none;
    animation: none;
  }

  .modal,
  .modal.is-closing,
  .modal-content,
  .modal.sheet,
  .modal-content.sheet {
    animation: none;
  }
}

/* Keep the mobile PWA in portrait, including iOS where manifest orientation is not always enforced. */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
  body {
    background: linear-gradient(135deg, #071331 0%, #0d2f73 100%);
  }

  body > * {
    display: none !important;
  }

  body::before {
    content: "Please rotate your phone to portrait mode.";
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: #e6eeff;
    font-size: clamp(1rem, 2.6vw, 1.25rem);
    font-weight: 600;
    letter-spacing: 0.02em;
  }
}

/* Final home layout overrides. Keep these after legacy responsive rules. */
.home-hero-card {
  grid-template-columns: minmax(112px, 38%) minmax(0, 1fr) !important;
}

.home-hero-media {
  order: 0 !important;
  min-height: 100% !important;
}

.competition-pill-row {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  padding: 10px 0 14px !important;
}

.pill-button.competition-card {
  position: relative !important;
  flex: 0 0 clamp(190px, 28vw, 320px) !important;
  width: clamp(190px, 28vw, 320px) !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.pill-button.competition-card .competition-image {
  position: absolute !important;
  inset: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
}

.pill-button.competition-card .pill-icon {
  width: auto;
  height: auto;
}

.pill-button.competition-card .pill-text {
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 78px !important;
  z-index: 2 !important;
  padding: 0 !important;
}

.pill-button.competition-card .competition-card-action {
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 16px !important;
  z-index: 2 !important;
  margin: 0 !important;
}

@media (max-width: 620px) {
  .home-hero-card {
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr) !important;
  }

  .home-hero-actions {
    grid-template-columns: 1fr !important;
  }

  .pill-button.competition-card {
    flex-basis: min(74vw, 230px) !important;
    width: min(74vw, 230px) !important;
  }

  .pill-button.competition-card .pill-text {
    left: 14px !important;
    right: 14px !important;
    bottom: 68px !important;
  }

  .pill-button.competition-card .competition-card-action {
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
}

@media (max-width: 860px) {
  .home-group-row,
  .all-groups-list .home-group-row {
    grid-template-columns: 96px minmax(0, 1fr) 104px !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px !important;
  }

  .home-group-banner {
    aspect-ratio: 1 / 1 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
  }

  .home-group-privacy {
    top: 6px !important;
    left: 6px !important;
    gap: 4px !important;
    padding: 3px 6px !important;
    font-size: 0.62rem !important;
  }

  .home-group-privacy img,
  .home-group-type img {
    width: 13px !important;
    height: 13px !important;
  }

  .home-group-main {
    gap: 5px !important;
  }

  .home-group-main strong {
    font-size: 0.9rem !important;
    line-height: 1.12 !important;
  }

  .home-group-main p {
    margin-top: 2px !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .home-group-meta {
    gap: 6px !important;
    font-size: 0.68rem !important;
  }

  .home-group-meta img {
    width: 13px !important;
    height: 13px !important;
  }

  .home-group-side {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    justify-items: stretch !important;
  }

  .home-group-type {
    justify-self: end !important;
    gap: 4px !important;
    font-size: 0.72rem !important;
  }

  .home-group-side .button {
    min-height: 34px !important;
    border-radius: 9px !important;
    padding: 6px 8px !important;
    font-size: 0.7rem !important;
    white-space: normal !important;
  }
}

@media (max-width: 430px) {
  .home-group-row,
  .all-groups-list .home-group-row {
    grid-template-columns: 78px minmax(0, 1fr) 82px !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 12px !important;
  }

  .home-group-main strong {
    font-size: 0.82rem !important;
  }

  .home-group-main p {
    font-size: 0.66rem !important;
  }

  .home-group-meta,
  .home-group-type {
    font-size: 0.62rem !important;
  }

  .home-group-side .button {
    min-height: 32px !important;
    font-size: 0.64rem !important;
  }

  .group-preview-sheet {
    padding: 12px;
  }

  .group-preview-summary {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .group-preview-avatar {
    width: 70px;
    margin-top: -38px;
    border-radius: 14px;
  }

  .group-preview-access-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .group-preview-access-card .button {
    min-height: 36px;
    padding-inline: 10px;
  }
}

body.is-standalone-list .nav-menu-icon {
  display: none !important;
}

body.is-standalone-list .nav-back-icon {
  display: block !important;
}

body.is-standalone-list .nav-toggle {
  color: var(--nav-ink);
}

.home-search-input svg,
.home-hero-secondary svg {
  margin-right: 2px;
}

.home-hero-section,
.home-competitions-section,
[data-view-panel="home"] .home-joined-section,
[data-view-panel="home"] .home-activity-section,
[data-view-panel="home"] .home-find-section,
[data-view-panel="home"] .home-recommended-section,
[data-view-panel="home"] .home-access-note {
  margin-bottom: 22px !important;
}

.home-hero-section {
  margin-bottom: 24px !important;
}

.home-competitions-section .section-header,
.home-joined-section .section-header,
.home-activity-section .section-header,
.home-find-section .section-header,
.home-recommended-section .section-header {
  margin-bottom: 6px;
}

.home-competitions-section .section-title-row {
  gap: 8px;
}

.home-competitions-section .section-title-row h2,
.home-competitions-section [data-competitions-hint] {
  margin: 0;
}

.competition-pill-row {
  margin-top: 4px !important;
}

.home-group-search,
.home-filter-row,
.home-activity-list,
.home-recommend-list {
  margin-top: 10px !important;
}

.view-all-link {
  gap: 5px !important;
  min-height: 30px !important;
  padding: 2px 0 !important;
  font-size: 0.82rem !important;
  white-space: nowrap !important;
}

.view-all-link svg {
  width: 16px !important;
  height: 16px !important;
}

.home-filter-row {
  gap: 8px !important;
}

.home-filter-chip {
  min-height: 34px !important;
  padding: 0 14px !important;
  gap: 6px !important;
  font-size: 0.82rem !important;
}

.home-filter-chip img,
.home-filter-chip[data-home-group-filter="popular"]::before {
  width: 15px !important;
  height: 15px !important;
}

.home-group-row {
  cursor: pointer;
}

.home-find-section,
.home-joined-section,
.home-activity-section,
.home-recommended-section,
.home-access-note {
  padding-top: 0 !important;
}

@media (max-width: 620px) {
  .home-hero-section,
  .home-competitions-section,
  [data-view-panel="home"] .home-joined-section,
  [data-view-panel="home"] .home-activity-section,
  [data-view-panel="home"] .home-find-section,
  [data-view-panel="home"] .home-recommended-section,
  [data-view-panel="home"] .home-access-note {
    margin-bottom: 16px !important;
  }

  .home-group-search {
    grid-template-columns: minmax(0, 1fr) 46px !important;
    gap: 8px !important;
  }

  .section-header {
    gap: 8px !important;
  }

  .home-competitions-section .section-header {
    margin-bottom: 4px !important;
  }

  .home-competitions-section [data-competitions-hint] {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
  }

  .competition-pill-row {
    margin-top: 2px !important;
  }

  .view-all-link {
    font-size: 0.72rem !important;
    min-height: 26px !important;
  }

  .view-all-link svg {
    width: 14px !important;
    height: 14px !important;
  }

  .home-filter-row {
    gap: 6px !important;
  }

  .home-filter-chip {
    min-height: 30px !important;
    padding: 0 10px !important;
    gap: 5px !important;
    font-size: 0.72rem !important;
  }

  .home-filter-chip img,
  .home-filter-chip[data-home-group-filter="popular"]::before {
    width: 13px !important;
    height: 13px !important;
  }

  .home-activity-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .home-activity-item .activity-feed-icon {
    width: 34px;
    height: 34px;
    border-radius: 13px;
  }

  .home-activity-reactions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .home-search-input {
    min-height: 48px !important;
    gap: 9px !important;
    padding: 0 12px !important;
  }

  .home-search-input input {
    font-size: 16px !important;
  }

  .home-filter-settings {
    width: 46px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
  }

  .home-filter-settings svg,
  .home-search-input svg {
    width: 19px !important;
    height: 19px !important;
  }

  .app-list-header {
    grid-template-columns: 1fr !important;
  }

  .access-note-card {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px 16px !important;
  }

  .access-note-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    font-size: 1rem !important;
  }

  .access-note-card h3 {
    font-size: 0.95rem !important;
    line-height: 1.15 !important;
  }

  .access-note-card p {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
  }
}

/* Final group detail overrides: keep these after legacy mobile rules. */
.group-detail-body .group-fixed-nav {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 90 !important;
  min-height: calc(58px + env(safe-area-inset-top)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: calc(10px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 8px !important;
  background: transparent !important;
  color: #fff !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  transform: translateZ(0) !important;
}

.group-detail-body .group-fixed-nav-left,
.group-detail-body .group-fixed-nav-actions,
.group-detail-body .group-top-menu {
  display: flex !important;
  align-items: center !important;
  pointer-events: auto !important;
}

.group-detail-body .group-fixed-nav-brand {
  display: none !important;
}

.group-detail-body .group-fixed-nav .back-button,
.group-detail-body .group-fixed-nav .group-menu-toggle {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(220, 232, 255, 0.24) !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto !important;
}

.group-detail-body .group-fixed-nav .back-button svg {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
}

.group-detail-body .group-fixed-nav .group-menu-toggle {
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.group-detail-body .group-fixed-nav .group-menu-toggle span {
  flex: 0 0 auto !important;
  width: 4px !important;
  height: 4px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: currentColor !important;
}

.group-detail-body .group-fixed-nav .group-menu-panel {
  z-index: 100 !important;
}

.group-detail-body .top-nav {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  z-index: 90 !important;
  min-height: calc(58px + env(safe-area-inset-top)) !important;
  padding: calc(10px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 8px !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

.group-detail-body .top-brand.app-brand {
  display: none !important;
}

.group-detail-body .top-actions .side-notifications {
  display: none !important;
}

.group-detail-body .top-nav-left,
.group-detail-body .top-actions,
.group-detail-body .group-top-menu {
  pointer-events: auto !important;
}

.group-detail-body .top-nav .back-button,
.group-detail-body .top-nav .group-menu-toggle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(220, 232, 255, 0.28) !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto !important;
}

.group-detail-body .top-nav .back-button {
  justify-content: center !important;
  align-items: center !important;
}

.group-detail-body .top-nav .back-button svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
}

.group-detail-body .group-competition-medallion img {
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
}

.group-detail-body .page.group-page {
  max-width: none !important;
  padding: 0 0 80px !important;
}

.group-detail-body .group-overview-card {
  position: relative !important;
  width: 100% !important;
  min-height: clamp(360px, 48vh, 500px) !important;
  margin: 0 0 22px !important;
  padding: clamp(76px, 10vh, 112px) clamp(16px, 6vw, 80px) 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #07162e !important;
  box-shadow: none !important;
}

.group-detail-body .group-hero-shade {
  background:
    linear-gradient(0deg, rgba(23, 22, 19, 0.96) 0%, rgba(52, 48, 40, 0.8) 52%, rgba(86, 79, 64, 0.5) 100%),
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.08), transparent 36%) !important;
}

:root[data-theme="dark"] .group-detail-body .group-hero-shade {
  background:
    linear-gradient(0deg, rgba(1, 8, 27, 0.98) 0%, rgba(3, 21, 58, 0.86) 52%, rgba(8, 51, 96, 0.58) 100%),
    radial-gradient(circle at 50% 28%, rgba(28, 218, 199, 0.14), transparent 36%) !important;
}

.group-detail-body .group-competition-medallion {
  box-shadow:
    0 0 0 5px rgba(2, 123, 136, 0.34),
    0 0 22px rgba(2, 123, 136, 0.72),
    0 0 48px rgba(28, 218, 199, 0.35),
    0 20px 46px rgba(0, 0, 0, 0.42) !important;
}

:root[data-theme="dark"] .group-detail-body .group-competition-medallion {
  box-shadow:
    0 0 0 5px rgba(37, 199, 133, 0.28),
    0 0 24px rgba(37, 199, 133, 0.72),
    0 0 54px rgba(28, 218, 199, 0.36),
    0 22px 50px rgba(0, 0, 0, 0.5) !important;
}

.group-detail-body .group-hero-content {
  display: grid !important;
  justify-items: center !important;
  align-content: end !important;
  text-align: center !important;
  margin-top: 16px !important;
}

.group-detail-body .group-title-row {
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
}

.group-detail-body .group-title-row h2 {
  font-size: clamp(1.82rem, 4.4vw, 2.9rem) !important;
}

.group-detail-body .group-admin-tag {
  min-height: 26px !important;
  padding: 4px 9px !important;
  font-size: 0.66rem !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.group-detail-body .group-meta {
  justify-content: center !important;
  margin-top: 14px !important;
}

.group-hero-members {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 18px;
}

.group-hero-members .user-avatar,
.group-hero-members-more {
  width: 42px;
  height: 42px;
  margin-left: -7px;
  border: 2px solid #027b88;
  border-radius: 999px;
  background: rgba(12, 30, 67, 0.86);
  box-shadow: 0 0 0 2px rgba(4, 19, 45, 0.7), 0 10px 26px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.group-hero-members .user-avatar:first-child {
  margin-left: 0;
}

.group-hero-members .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-hero-members-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dce8ff;
  font-size: 0.86rem;
  font-weight: 900;
}

:root[data-theme="dark"] .group-hero-members .user-avatar,
:root[data-theme="dark"] .group-hero-members-more {
  border-color: #25c785;
}

.group-detail-body .group-hero {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.group-detail-body .tab-bar {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  justify-items: stretch !important;
  column-gap: 0 !important;
  width: min(1040px, calc(100% - clamp(12px, 3vw, 28px))) !important;
  margin: 0 auto 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 0 !important;
  padding-right: 0 !important;
  scroll-padding-inline: 0 !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.group-detail-body .tab-button {
  flex: initial !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  min-height: 54px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  padding: 6px 2px 10px !important;
  text-align: center !important;
}

.group-detail-body .tab-button .tab-button-icon {
  width: 22px !important;
  height: 22px !important;
}

.group-detail-body .tab-button .tab-button-icon {
  filter: brightness(0) saturate(100%) invert(11%) sepia(22%) saturate(969%) hue-rotate(175deg) brightness(91%) contrast(90%) !important;
}

:root[data-theme="dark"] .group-detail-body .tab-button .tab-button-icon {
  filter: brightness(0) invert(1) opacity(0.82) !important;
}

.group-detail-body .tab-button.is-active {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-2) !important;
}

.group-detail-body .tab-button.is-active::after {
  left: 28% !important;
  right: 28% !important;
  bottom: 0 !important;
  height: 2px !important;
  background: currentColor !important;
  box-shadow: none !important;
}

.group-detail-body .tab-button.is-active .tab-button-icon {
  filter: brightness(0) saturate(100%) invert(31%) sepia(94%) saturate(1006%) hue-rotate(148deg) brightness(93%) contrast(98%) !important;
}

:root[data-theme="dark"] .group-detail-body .tab-button.is-active .tab-button-icon {
  filter: brightness(0) invert(1) drop-shadow(0 0 7px rgba(37, 199, 133, 0.45)) !important;
}

.group-detail-body .group-menu-toggle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 2px !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.group-detail-body .group-menu-toggle span {
  flex: 0 0 auto !important;
  width: 3px !important;
  height: 3px !important;
  margin: 0 !important;
}

.group-detail-body .group-menu-panel {
  z-index: 100 !important;
  border-color: rgba(206, 185, 148, 0.62) !important;
  background: rgba(250, 244, 236, 0.96) !important;
  color: #151515 !important;
}

.group-detail-body .group-menu-panel::before {
  border-left-color: rgba(206, 185, 148, 0.62) !important;
  border-top-color: rgba(206, 185, 148, 0.62) !important;
  background: rgba(250, 244, 236, 0.96) !important;
}

.group-detail-body .group-menu-panel button {
  border-bottom-color: rgba(35, 35, 35, 0.16) !important;
}

.group-detail-body .group-menu-panel button img {
  filter: brightness(0) saturate(100%) !important;
}

.group-detail-body .group-menu-panel button.is-danger img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(94%) saturate(3120%) hue-rotate(338deg) brightness(101%) contrast(102%) !important;
}

:root[data-theme="dark"] .group-detail-body .group-menu-panel {
  border-color: rgba(164, 192, 245, 0.44) !important;
  background: rgb(13, 46, 85) !important;
  color: #f4f8ff !important;
}

:root[data-theme="dark"] .group-detail-body .group-menu-panel::before {
  border-left-color: rgba(164, 192, 245, 0.44) !important;
  border-top-color: rgba(164, 192, 245, 0.44) !important;
  background: rgb(13, 46, 85) !important;
}

:root[data-theme="dark"] .group-detail-body .group-menu-panel button {
  border-bottom-color: rgba(164, 192, 245, 0.22) !important;
}

:root[data-theme="dark"] .group-detail-body .group-menu-panel button img {
  filter: brightness(0) invert(1) !important;
}

:root[data-theme="dark"] .group-detail-body .group-menu-panel button.is-danger img {
  filter: brightness(0) saturate(100%) invert(47%) sepia(94%) saturate(3120%) hue-rotate(338deg) brightness(101%) contrast(102%) !important;
}

.group-detail-body .group-lock-countdown:not(.is-hidden) {
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  align-items: center !important;
  justify-self: center !important;
  width: min(520px, 100%) !important;
  margin: 16px auto 0 !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  background: rgba(3, 16, 41, 0.72) !important;
  color: #eaf3ff !important;
  backdrop-filter: blur(14px) !important;
}

.group-detail-body .world-cup-winner-pick:not(.is-hidden) {
  position: relative !important;
  z-index: 2 !important;
  width: min(920px, 100%) !important;
  margin: 18px auto 0 !important;
}

.group-detail-body .group-lock-ring {
  width: 48px !important;
}

.group-detail-body .group-lock-ring img {
  width: 22px !important;
  height: 22px !important;
}

.group-detail-body .group-lock-title,
.group-detail-body .group-lock-time {
  color: var(--accent-2) !important;
}

.group-detail-body .group-lock-title {
  font-size: 0.82rem !important;
}

.group-detail-body .group-lock-eyebrow,
.group-detail-body .group-lock-detail,
.group-detail-body .group-lock-meta {
  color: rgba(234, 243, 255, 0.78) !important;
  font-size: 0.68rem !important;
}

.group-detail-body .group-lock-time {
  margin-top: 3px !important;
  font-size: clamp(1.18rem, 4vw, 1.72rem) !important;
}

.group-detail-body .group-page > [data-tab-panel] {
  width: min(var(--max-width), 100%) !important;
  margin-inline: auto !important;
  padding-inline: clamp(14px, 4vw, 42px) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-admin-tag {
  border-color: rgba(2, 123, 136, 0.48) !important;
  background: rgba(255, 253, 248, 0.66) !important;
  color: #027b88 !important;
  box-shadow: 0 8px 18px rgba(19, 94, 107, 0.1) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-meta .pill {
  border: 1px solid rgba(206, 185, 148, 0.58) !important;
  background: rgba(255, 253, 248, 0.72) !important;
  color: #027b88 !important;
  box-shadow: 0 8px 18px rgba(21, 18, 14, 0.06) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-meta .pill-icon {
  filter: brightness(0) saturate(100%) invert(20%) sepia(22%) saturate(749%) hue-rotate(177deg)
    brightness(92%) contrast(89%) !important;
  opacity: 0.88 !important;
}

:root:not([data-theme="dark"]) .group-hero-members .user-avatar,
:root:not([data-theme="dark"]) .group-hero-members-more {
  border-color: #13bfb6 !important;
  background: rgba(255, 253, 248, 0.94) !important;
  color: #0d2f43 !important;
  box-shadow: 0 0 0 2px rgba(255, 253, 248, 0.88), 0 8px 18px rgba(19, 94, 107, 0.18) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-countdown:not(.is-hidden) {
  border: 1px solid rgba(206, 185, 148, 0.62) !important;
  background: rgba(255, 253, 248, 0.72) !important;
  color: #18233a !important;
  box-shadow: 0 18px 34px rgba(21, 18, 14, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-ring {
  background: rgba(236, 250, 246, 0.9) !important;
  box-shadow: 0 10px 22px rgba(19, 94, 107, 0.16) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-ring::before {
  border-color: rgba(206, 185, 148, 0.34) !important;
  background: rgba(255, 253, 248, 0.82) !important;
  box-shadow: inset 0 0 14px rgba(19, 94, 107, 0.1) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-ring::after {
  border-color: rgba(2, 123, 136, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(2, 123, 136, 0.18) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-ring img,
:root:not([data-theme="dark"]) .group-detail-body .group-lock-ring img[data-lock-countdown-icon] {
  filter: brightness(0) saturate(100%) invert(19%) sepia(21%) saturate(923%) hue-rotate(178deg)
    brightness(91%) contrast(91%) !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-title,
:root:not([data-theme="dark"]) .group-detail-body .group-lock-time {
  color: #17233f !important;
}

:root:not([data-theme="dark"]) .group-detail-body .group-lock-eyebrow,
:root:not([data-theme="dark"]) .group-detail-body .group-lock-detail,
:root:not([data-theme="dark"]) .group-detail-body .group-lock-meta {
  color: #556173 !important;
}

@media (max-width: 620px) {
  .group-detail-body .tab-button {
    min-width: 0 !important;
    max-width: none !important;
    min-height: 56px !important;
    font-size: clamp(0.64rem, 3vw, 0.78rem) !important;
    padding-bottom: 11px !important;
  }

  .group-detail-body .tab-button .tab-button-icon {
    width: 23px !important;
    height: 23px !important;
  }

  .group-detail-body .group-overview-card {
    min-height: 430px !important;
    padding: calc(68px + env(safe-area-inset-top)) 14px 20px !important;
  }

  .group-detail-body .group-title-row h2 {
    font-size: clamp(1.55rem, 7.2vw, 2.05rem) !important;
  }

  .group-detail-body .group-menu-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .group-detail-body .group-lock-countdown:not(.is-hidden) {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 9px 10px !important;
  }

  .group-detail-body .group-lock-ring {
    width: 40px !important;
  }

  .group-detail-body .group-lock-ring img {
    width: 19px !important;
    height: 19px !important;
  }

  .group-detail-body .world-cup-winner-pick:not(.is-hidden) {
    margin-top: 12px !important;
  }

  .group-hero-members .user-avatar,
  .group-hero-members-more {
    width: 36px;
    height: 36px;
    margin-left: -6px;
  }

  .group-hero-members-more {
    font-size: 0.72rem;
  }
}
/* Global challenges */
.global-challenges-page {
  width: 100%;
  max-width: min(980px, 100%);
  margin-inline: auto;
  overflow-x: clip;
}

.global-challenges-page,
.global-challenges-page *,
.global-challenge-detail,
.global-detail-grid,
.global-detail-card,
.global-detail-tabs,
.global-challenge-card,
.global-challenge-match-card,
.global-reward-card,
.global-participant-list {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.global-challenge-tabs,
.global-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.global-detail-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 8px;
}

.global-challenge-tabs button,
.global-detail-tabs button {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.global-challenge-tabs button.is-active,
.global-detail-tabs button.is-active {
  border-color: #126dff;
  background: #126dff;
  color: #fff;
}

.global-challenge-featured-wrap,
.global-challenge-card,
.global-detail-hero,
.global-detail-card,
.global-detail-tabs {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-sm);
}

.global-challenge-featured-wrap {
  padding: 16px;
  margin-bottom: 28px;
}

.global-challenge-card-list {
  display: grid;
  gap: 14px;
}

.global-challenge-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  color: var(--ink);
  text-align: left;
  padding: 42px 20px 18px;
  cursor: pointer;
  position: relative;
}

.global-challenge-card.is-featured {
  min-height: 270px;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 240px);
  overflow: hidden;
  background:
    linear-gradient(110deg, color-mix(in srgb, #126dff 10%, var(--surface)), color-mix(in srgb, #f2bf5a 18%, var(--surface)));
}

.global-challenge-card-copy {
  display: grid;
  gap: 12px;
}

.global-challenge-card strong {
  font-size: clamp(1.05rem, 2.8vw, 1.55rem);
}

.global-challenge-company {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 3;
  max-width: min(46%, 260px);
  border-radius: 999px;
  background: color-mix(in srgb, #126dff 14%, var(--surface));
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
  padding: 6px 10px;
  text-align: right;
}

.global-challenge-company b {
  color: var(--ink);
  font-weight: 900;
}

.global-challenge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
}

.global-challenge-meta span,
.global-challenge-prize,
.global-detail-facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.global-challenge-meta img,
.global-challenge-prize img,
.global-detail-facts img,
.global-glance-list img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0);
}

.global-challenge-badge,
.global-challenge-rule {
  width: fit-content;
  border-radius: 10px;
  padding: 6px 10px;
  background: color-mix(in srgb, #126dff 13%, var(--surface));
  color: #126dff;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.global-challenge-rule {
  text-transform: none;
  font-size: 0.9rem;
}

.global-challenge-prize {
  font-weight: 800;
}

.global-challenge-art {
  position: relative;
  min-height: 180px;
}

.global-challenge-art img {
  width: min(260px, 100%);
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  object-fit: contain;
  filter: none;
}

.global-challenge-art-dark {
  display: none;
}

.global-challenge-art-light {
  display: block;
}

.global-challenge-art-dark {
  display: none;
}

.global-challenge-joined {
  display: grid;
  justify-items: center;
  color: var(--ink);
  min-width: 72px;
}

.global-challenge-joined small {
  color: var(--muted);
}

.global-challenge-arrow {
  font-size: 2.4rem;
  color: var(--muted);
  line-height: 1;
}

.global-challenge-join,
.global-predict-card .button {
  width: 100%;
  margin-top: 10px;
  min-height: 50px;
}

.global-challenge-detail {
  display: grid;
  gap: 16px;
}

.global-challenge-back {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.global-detail-title {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.global-detail-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.global-detail-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 28px;
}

.global-team {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 1.35rem;
}

.global-team img,
.global-team span {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  object-fit: contain;
  font-size: 3rem;
  border: 3px solid #1bd7cb;
  background: var(--surface);
}

.global-team:last-child img,
.global-team:last-child span {
  border-color: #126dff;
}

.global-vs {
  font-weight: 900;
  font-size: 1.7rem;
}

.global-detail-facts {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  color: var(--muted);
}

.global-avatar-stack {
  display: inline-flex;
  align-items: center;
}

.global-avatar-stack img,
.global-avatar-stack span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  margin-left: -8px;
  object-fit: cover;
  background: var(--surface-2);
}

.global-avatar-stack img:first-child {
  margin-left: 0;
}

.global-avatar-stack span {
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
}

.global-detail-grid {
  display: grid;
  gap: 16px;
}

.global-detail-card {
  padding: 20px;
}

.global-detail-card h3 {
  margin: 0 0 16px;
}

.global-challenge-match-card {
  margin: 0;
}

.global-challenge-match-card .match-card-meta {
  justify-content: center;
  text-align: center;
}

.global-challenge-match-card .match-card-meta span {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
}

.global-challenge-match-card .match-card-prediction {
  margin-top: 0;
}

.global-challenge-match-card .match-prediction-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.global-challenge-match-card .match-prediction-values span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.global-glance-list {
  display: grid;
}

.global-glance-list p {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.global-glance-list p:last-child {
  border-bottom: 0;
}

.global-glance-list b {
  display: block;
}

.global-reward-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 24px;
  align-items: center;
}

.global-reward-image,
.global-reward-placeholder {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #151210;
}

.global-reward-placeholder {
  display: grid;
  place-items: center;
  color: #f2bf5a;
  font-weight: 900;
}

.global-match-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 900;
}

.global-match-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--muted);
  padding: 14px 0;
  border-block: 1px solid var(--border);
  margin: 14px 0;
}

.global-score-inputs {
  display: grid;
  grid-template-columns: 54px minmax(64px, 100px) 54px 24px 54px minmax(64px, 100px) 54px;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
}

.global-score-inputs button,
.global-score-inputs input {
  height: 48px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 12px;
  text-align: center;
  font: inherit;
  font-weight: 900;
}

.global-score-inputs span {
  text-align: center;
  font-weight: 900;
}

.global-prediction-success {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #027b88;
}

.global-prediction-lottie {
  width: 96px;
  height: 96px;
}

.global-participants-header {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.global-participants-header h3,
.global-participants-header p {
  margin: 0;
}

.global-participant-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.global-participant-list > .muted {
  padding: 12px;
  margin: 0;
}

.global-participant-list .timeline-prediction-row {
  grid-template-columns: minmax(120px, 1.1fr) minmax(150px, 1.4fr) minmax(66px, auto) minmax(42px, auto);
}

.global-participant-match-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.global-participant-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
}

.global-participant-team-chip > span:last-child {
  min-width: 0;
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-participant-flag {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  font-size: 0.9rem;
}

.global-participant-flag img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}


.timeline-prediction-row.is-gift-winner {
  border-color: color-mix(in srgb, #f2bf5a 36%, var(--border));
  background: color-mix(in srgb, #f2bf5a 8%, var(--surface));
}

.timeline-predictor .global-winner-gift {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.timeline-predictor .global-winner-gift img {
  width: 14px;
  height: 14px;
}

.global-winner-gift {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(in srgb, #f2bf5a 18%, var(--surface));
  border: 1px solid color-mix(in srgb, #f2bf5a 52%, var(--border));
}

.global-winner-gift img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: none;
}

:root[data-theme="dark"] .global-challenge-featured-wrap,
:root[data-theme="dark"] .global-challenge-card,
:root[data-theme="dark"] .global-detail-hero,
:root[data-theme="dark"] .global-detail-card,
:root[data-theme="dark"] .global-detail-tabs {
  border-color: rgba(99, 150, 230, 0.34);
  background: rgba(8, 24, 55, 0.82);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .global-challenge-card.is-featured {
  background: linear-gradient(110deg, rgba(9, 38, 91, 0.95), rgba(6, 27, 61, 0.9));
}

:root[data-theme="dark"] .global-challenge-art-light {
  display: none;
}

:root[data-theme="dark"] .global-challenge-art-dark {
  display: block;
}

:root[data-theme="dark"] .global-challenge-tabs button,
:root[data-theme="dark"] .global-detail-tabs button,
:root[data-theme="dark"] .global-score-inputs button,
:root[data-theme="dark"] .global-score-inputs input {
  background: rgba(10, 28, 63, 0.9);
  color: #f5f8ff;
  border-color: rgba(99, 150, 230, 0.34);
}

:root[data-theme="dark"] .global-challenge-rule,
:root[data-theme="dark"] .global-challenge-badge {
  background: rgba(18, 109, 255, 0.18);
  color: #62a0ff;
}

:root[data-theme="dark"] .global-challenge-meta img,
:root[data-theme="dark"] .global-challenge-prize img,
:root[data-theme="dark"] .global-detail-facts img,
:root[data-theme="dark"] .global-glance-list img {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .global-team img,
:root[data-theme="dark"] .global-team span,
:root[data-theme="dark"] .global-avatar-stack img,
:root[data-theme="dark"] .global-avatar-stack span {
  background: #081837;
}

@media (max-width: 720px) {
  .global-challenges-page {
    display: block;
    margin-inline: 0;
    padding-inline: 0;
    overflow-x: hidden;
  }

  .global-challenge-tabs,
  .global-detail-tabs {
    gap: 8px;
  }

  .global-challenge-card,
  .global-challenge-card.is-featured,
  .global-detail-hero,
  .global-reward-card > div {
    grid-template-columns: 1fr;
  }

  .global-challenge-art {
    display: block;
    min-height: 128px;
    order: 2;
  }

  .global-challenge-art img {
    position: static;
    display: block;
    width: min(210px, 82%);
    margin-inline: auto;
    transform: none;
  }

  .global-detail-facts {
    display: grid;
  }

  .global-detail-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .global-detail-card {
    padding: 16px;
  }

  .global-challenge-match-card {
    padding: 14px 10px 16px;
    border-left-width: 2px;
  }

  .global-challenge-match-card .match-card-topline {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "stage actions"
      "lock lock";
    justify-items: stretch;
    gap: 8px;
  }

  .global-challenge-match-card .match-stage {
    grid-area: stage;
    justify-self: stretch;
    justify-content: flex-start;
  }

  .global-challenge-match-card .match-card-topline-actions {
    grid-area: actions;
    justify-self: end;
    justify-content: flex-end;
  }

  .global-challenge-match-card .match-card-lock-slot {
    grid-area: lock;
    justify-self: center;
    justify-content: center;
  }

  .global-challenge-match-card .match-stage {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .global-challenge-match-card .match-card-teams {
    grid-template-columns: minmax(0, 1fr) minmax(64px, max-content) minmax(0, 1fr);
    gap: 6px;
    width: 100%;
  }

  .global-challenge-match-card .team-logo.large {
    width: clamp(58px, 18vw, 72px);
    height: clamp(58px, 18vw, 72px);
    padding: 8px;
  }

  .global-challenge-match-card .team-name {
    font-size: clamp(0.82rem, 4vw, 1rem);
  }

  .global-challenge-match-card .match-card-score {
    min-width: 64px;
  }

  .global-challenge-match-card .match-card-score-pending,
  .global-challenge-match-card .match-card-score-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 7vw, 1.65rem);
    white-space: nowrap;
  }

  .global-challenge-match-card .match-card-score-live span {
    margin: 0 5px;
  }

  .global-challenge-match-card .match-card-meta {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    text-align: center;
  }

  .global-challenge-match-card .match-card-meta span {
    padding: 0;
    white-space: normal;
    font-size: 0.74rem;
    font-weight: 500;
  }

  .global-challenge-match-card .match-card-prediction {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    justify-items: start;
    gap: 8px;
    padding: 10px;
  }

  .global-challenge-match-card .match-prediction-values {
    justify-content: flex-start;
    gap: 7px;
  }

  .global-challenge-match-card .match-prediction-values span {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .global-predict-card .prediction-score-card {
    padding: 10px;
  }

  .global-predict-card .prediction-score-grid {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 5px;
  }

  .global-predict-card .prediction-score-vs {
    min-width: 24px;
  }

  .global-predict-card .score-stepper {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .global-score-inputs {
    grid-template-columns: 34px minmax(40px, 1fr) 34px 10px 34px minmax(40px, 1fr) 34px;
    gap: 5px;
  }

  .global-match-meta {
    flex-wrap: wrap;
  }

  .global-participant-list .timeline-prediction-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .global-participant-list .timeline-match {
    grid-column: 1 / -1;
  }

  .global-participant-list .timeline-score,
  .global-participant-list .timeline-points {
    justify-self: end;
  }

  .global-participant-team-chip > span:last-child {
    max-width: 54px;
  }
}

@media (max-width: 430px) {
  html,
  body,
  .app-shell,
  .app-main,
  .page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .top-nav {
    gap: 7px;
    padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
  }

  .top-nav-left,
  .top-actions {
    gap: 6px;
    min-width: 0;
  }

  .top-brand.app-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .top-brand-main {
    gap: 7px;
    max-width: 100%;
  }

  .top-brand-main span {
    max-width: 148px;
    font-size: 1rem;
    line-height: 1.05;
  }

  .top-brand-legacy {
    max-width: 148px;
    font-size: 0.48rem;
    line-height: 1.12;
  }

  .app-brand img {
    width: 32px;
    height: 32px;
  }

  .top-nav .nav-toggle,
  .top-nav .notification-button,
  .top-nav .profile-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex: 0 0 42px;
  }

  .notification-count {
    min-width: 17px;
    height: 17px;
    font-size: 0.68rem;
  }

  .global-challenges-page {
    width: 100%;
    max-width: 100%;
  }

  .global-challenges-page .section-header {
    display: grid;
    gap: 8px;
  }

  .global-challenges-page .section-header h2 {
    font-size: clamp(1.75rem, 10vw, 2.35rem);
    line-height: 1.04;
  }

  .global-challenges-page .section-header .muted {
    font-size: clamp(0.98rem, 5vw, 1.18rem);
    line-height: 1.35;
    max-width: 100%;
  }

  .global-challenge-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 16px 0 20px;
  }

  .global-challenge-tabs button {
    min-width: 0;
    min-height: 46px;
    padding: 0 6px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1;
  }

  .global-challenge-featured-wrap {
    padding: 10px;
    border-radius: 18px;
  }

  .global-challenge-card,
  .global-challenge-card.is-featured {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .global-challenge-card strong {
    font-size: clamp(1rem, 6vw, 1.24rem);
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .global-challenge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 500;
  }

  .global-challenge-meta span,
  .global-challenge-prize {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .global-challenge-rule {
    max-width: 100%;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }

  .global-challenge-joined {
    justify-items: start;
  }

  .global-challenge-arrow {
    justify-self: start;
    font-size: 2rem;
  }

  .global-challenge-join {
    min-height: 46px;
    border-radius: 18px;
  }
}

@media (max-width: 370px) {
  .top-nav {
    gap: 6px;
    padding-inline: 8px;
  }

  .app-brand img {
    width: 28px;
    height: 28px;
  }

  .top-brand-main span,
  .top-brand-legacy {
    max-width: 88px;
  }

  .top-nav .nav-toggle,
  .top-nav .notification-button,
  .top-nav .profile-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .global-challenge-tabs button {
    font-size: 0.78rem;
  }
}

/* Final featured challenge card layout. */
.global-challenge-featured-wrap {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3.2vw, 32px);
  border-radius: 26px;
  overflow: hidden;
}

.global-challenge-featured-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(ellipse at 62% 22%, rgba(146, 185, 255, 0.11), transparent 34%),
    radial-gradient(ellipse at 45% 64%, rgba(255, 255, 255, 0.045), transparent 38%);
  opacity: 0.8;
  mix-blend-mode: screen;
}

.global-challenge-featured-wrap > * {
  position: relative;
  z-index: 1;
}

.global-challenge-featured-wrap .global-challenge-card.is-featured {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 40%);
  gap: clamp(18px, 3.5vw, 36px);
  align-items: center;
  padding: 0;
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.global-challenge-featured-wrap .global-challenge-card.is-featured:hover {
  transform: none;
  box-shadow: none;
}

.global-challenge-featured-wrap .global-challenge-card-copy {
  gap: clamp(12px, 2vw, 18px);
  align-self: stretch;
}

.global-challenge-featured-wrap .global-challenge-badge {
  border-radius: 13px;
  padding: 8px 14px;
  background: #126dff;
  color: #eaf2ff;
  font-size: clamp(0.76rem, 1.8vw, 0.98rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.global-challenge-featured-wrap .global-challenge-card strong {
  font-size: clamp(1.45rem, 4.3vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
}

.global-challenge-featured-wrap .global-challenge-company {
  top: 0;
  right: 0;
  max-width: min(44%, 310px);
  background: rgba(18, 109, 255, 0.22);
  color: #bfd3f5;
  font-size: clamp(0.76rem, 1.8vw, 0.92rem);
}

.global-challenge-featured-wrap .global-challenge-company b {
  color: #ffffff;
}

.global-challenge-featured-wrap .global-challenge-meta {
  gap: 12px 20px;
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-weight: 700;
}

.global-challenge-featured-wrap .global-challenge-meta img,
.global-challenge-featured-wrap .global-challenge-prize img {
  width: 20px;
  height: 20px;
}

.global-challenge-featured-wrap .global-challenge-rule {
  border-radius: 13px;
  padding: 9px 13px;
  background: rgba(18, 109, 255, 0.18);
  color: #6fa6ff;
  font-size: clamp(0.95rem, 2.5vw, 1.14rem);
  font-weight: 800;
}

.global-challenge-featured-wrap .global-challenge-prize {
  color: var(--ink);
  font-size: clamp(0.94rem, 2.5vw, 1.08rem);
  font-weight: 700;
}

.global-challenge-joined-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(116, 159, 230, 0.18);
  color: #f4f8ff;
  font-weight: 700;
}

.global-challenge-joined-row b {
  font-weight: 800;
}

.global-challenge-featured-wrap .global-avatar-stack img,
.global-challenge-featured-wrap .global-avatar-stack span {
  width: 36px;
  height: 36px;
  border-color: rgba(8, 24, 55, 0.92);
}

.global-challenge-featured-wrap .global-challenge-art {
  min-height: clamp(190px, 29vw, 270px);
}

.global-challenge-featured-wrap .global-challenge-art img {
  width: min(330px, 108%);
  max-width: none;
  right: clamp(-20px, -2vw, -6px);
  top: 53%;
}

.global-challenge-featured-wrap .global-challenge-arrow {
  display: none;
}

.global-challenge-featured-wrap .global-challenge-join {
  margin-top: 0;
  min-height: clamp(56px, 7vw, 72px);
  border-radius: 18px;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  font-weight: 800;
}

:root[data-theme="dark"] .global-challenge-featured-wrap {
  border-color: rgba(57, 139, 255, 0.42);
  background:
    radial-gradient(circle at 78% 18%, rgba(28, 101, 221, 0.52), transparent 30%),
    linear-gradient(135deg, rgba(6, 23, 55, 0.98), rgba(5, 24, 57, 0.94));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-card.is-featured {
  background: transparent;
}

:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-meta,
:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-meta span {
  color: #b8c9ef;
}

:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-prize {
  color: #f4f8ff;
}

:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-meta img,
:root[data-theme="dark"] .global-challenge-featured-wrap .global-challenge-prize img {
  filter: brightness(0) invert(1);
}

@media (max-width: 720px) {
  .global-challenge-featured-wrap {
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  .global-challenge-featured-wrap .global-challenge-card.is-featured {
    grid-template-columns: minmax(0, 1fr) minmax(116px, 36%);
    gap: 6px;
    align-items: start;
  }

  .global-challenge-featured-wrap .global-challenge-card-copy {
    gap: 8px;
  }

  .global-challenge-featured-wrap .global-challenge-badge {
    border-radius: 10px;
    padding: 5px 9px;
    font-size: 0.64rem;
    font-weight: 750;
  }

  .global-challenge-featured-wrap .global-challenge-card strong {
    font-size: clamp(0.95rem, 4.5vw, 1.16rem);
    font-weight: 750;
    line-height: 1.12;
  }

  .global-challenge-featured-wrap .global-challenge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 9px;
    font-size: 0.64rem;
    font-weight: 600;
  }

  .global-challenge-featured-wrap .global-challenge-meta img,
  .global-challenge-featured-wrap .global-challenge-prize img {
    width: 14px;
    height: 14px;
  }

  .global-challenge-featured-wrap .global-challenge-rule {
    border-radius: 10px;
    padding: 5px 8px;
    font-size: 0.7rem;
    font-weight: 750;
  }

  .global-challenge-featured-wrap .global-challenge-prize {
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.25;
  }

  .global-challenge-featured-wrap .global-challenge-art {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    order: 0;
    align-self: stretch;
  }

  .global-challenge-featured-wrap .global-challenge-art img {
    position: static;
    display: block;
    width: min(148px, 118%);
    max-width: none;
    margin: 8px -8px 0 0;
    transform: none;
  }

  .global-challenge-joined-row {
    gap: 10px;
    margin-top: 3px;
    padding-top: 9px;
    font-size: 0.72rem;
    font-weight: 650;
  }

  .global-challenge-featured-wrap .global-avatar-stack img,
  .global-challenge-featured-wrap .global-avatar-stack span {
    width: 25px;
    height: 25px;
    margin-left: -6px;
  }

  .global-challenge-featured-wrap .global-avatar-stack img:first-child {
    margin-left: 0;
  }

  .global-challenge-featured-wrap .global-challenge-join {
    min-height: 42px;
    border-radius: 13px;
    font-size: 0.8rem;
    font-weight: 750;
  }
}

/* Final global challenge detail/share overrides. */
.global-detail-title {
  gap: 12px;
  margin-bottom: 16px;
}

.global-detail-title-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
}

.global-detail-title-actions .global-challenge-badge {
  margin-bottom: 0;
}

.global-challenge-share {
  min-height: 36px;
  border-radius: 12px;
  padding: 8px 12px;
  gap: 8px;
  border-color: rgba(98, 160, 255, 0.42);
  color: #15120e;
  background: rgba(18, 109, 255, 0.13);
}

.global-challenge-share img {
  width: 16px;
  height: 16px;
  filter: brightness(0);
}

:root[data-theme="dark"] .global-challenge-share {
  color: #dce8ff;
}

:root[data-theme="dark"] .global-challenge-share img {
  filter: brightness(0) invert(1);
}

.global-challenge-detail .global-challenge-match-card {
  margin-top: 0;
  margin-bottom: 20px;
}

.global-challenge-detail .global-detail-grid {
  margin-top: 4px;
}

.global-challenge-match-card .match-card-meta {
  gap: 0;
}

.global-challenge-match-card .match-card-meta span {
  gap: 10px;
}

.global-glance-list p {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .global-detail-title {
    gap: 10px;
    margin-bottom: 14px;
  }

  .global-detail-title-actions {
    gap: 10px;
    padding-bottom: 6px;
  }

  .global-challenge-share {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .global-challenge-match-card .match-card-meta {
    gap: 0;
  }

  .global-challenge-detail .global-challenge-match-card {
    margin-bottom: 16px;
  }

  .global-challenge-match-card .match-card-meta span {
    gap: 8px;
    padding: 0 10px;
  }

  .global-glance-list p {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
  }
}

.global-challenge-access {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
}

.global-challenge-access input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 12px 14px;
  font: inherit;
}

.global-challenge-access input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: rgba(37, 99, 235, 0.7);
}

:root[data-theme="dark"] .global-challenge-access input {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(96, 165, 250, 0.28);
  color: #f8fafc;
}

@media (max-width: 560px) {
  .global-challenge-access {
    align-items: stretch;
    flex-direction: column;
  }
}


.global-challenge-code-card {
  max-width: 560px;
  margin: 0 auto;
}

.global-challenge-code-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.global-challenge-code-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 13px 15px;
  font: inherit;
}

.global-code-error {
  margin: 10px 0 0;
  color: #fca5a5;
  font-weight: 800;
}

:root[data-theme="dark"] .global-challenge-code-form input {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(96, 165, 250, 0.28);
  color: #f8fafc;
}

.global-challenge-card-list .global-challenge-card {
  padding-top: clamp(44px, 6vw, 52px);
}

.global-challenge-card-list .global-challenge-company {
  position: absolute;
  top: 14px;
  right: 18px;
  left: auto;
  z-index: 3;
  max-width: min(48%, 300px);
  justify-self: auto;
  text-align: right;
}

@media (max-width: 520px) {
  .global-challenge-card-list .global-challenge-card {
    padding-top: 50px;
  }

  .global-challenge-card-list .global-challenge-company {
    top: 10px;
    right: 12px;
    max-width: calc(100% - 24px);
    font-size: 0.68rem;
  }
}

.global-challenge-title {
  color: #9fc1ff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.global-challenge-featured-wrap + .global-challenge-featured-wrap {
  margin-top: 18px;
}

.global-challenge-featured-wrap .global-challenge-title {
  color: #8fbaff;
  font-size: clamp(0.82rem, 1.9vw, 0.98rem);
}

.global-challenge-card-list .global-challenge-title {
  max-width: calc(100% - 260px);
}

@media (max-width: 520px) {
  .global-challenge-card-list .global-challenge-title {
    max-width: 100%;
  }
}
