:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-2: #ebe0d1;
  --ink: #15120e;
  --muted: #5f574f;
  --accent: #ff6b3d;
  --accent-2: #1f8a70;
  --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: 1120px;
}

* {
  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(31, 138, 112, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f2ea 0%, #f0e6d8 45%, #e8dbc9 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body.nav-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%);
}

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

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

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.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: 12px 16px;
  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;
}

.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: 22px 18px;
  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-links {
  display: grid;
  gap: 12px;
}

.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;
}

.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-icon {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

.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;
  gap: 8px;
  color: inherit;
}

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

.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;
}

.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-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.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;
}

.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;
}

.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 {
  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 8px 20px rgba(31, 138, 112, 0.18);
  transform: translateY(-1px);
}

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

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

.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;
}

.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(31, 138, 112, 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;
}

.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: 260px;
}

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

.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: 2 / 1;
  }

  .carousel-track {
    height: 100%;
  }

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

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

.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(31, 138, 112, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(31, 138, 112, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

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

.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;
}

.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;
}

.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: #1f8a70;
}

.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: 8px;
  justify-content: flex-start;
  margin-top: 12px;
}

.group-actions {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.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-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tab-button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.group-section + .group-section {
  margin-top: 24px;
}

.group-section h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.tab-button.is-active {
  background: #15120f;
  color: #fef7ec;
  border-color: #15120f;
}

.lock-pill {
  background: #efe0d0;
  color: #9b4b2f;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}

.member-predictions {
  display: grid;
  gap: 12px;
}

.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;
}

.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: #1f8a70;
}

.percent-seg.draw {
  background: #caa85a;
}

.percent-seg.away {
  background: #d8513c;
}

.percent-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.comparison-radar {
  margin-top: 12px;
}

.radar-wrap {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 16px;
  align-items: center;
}

.radar-chart {
  width: 100%;
  max-width: 180px;
  height: auto;
  overflow: visible;
}

.radar-grid polygon {
  fill: none;
  stroke: #eadfce;
  stroke-width: 1;
}

.radar-axes line {
  stroke: #eadfce;
  stroke-width: 1;
}

.radar-labels text,
.radar-label {
  font-size: 6.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  fill: #a28f78;
}

.radar-area {
  stroke-width: 2;
}

.radar-area.home {
  fill: rgba(31, 138, 112, 0.2);
  stroke: #1f8a70;
}

.radar-area.away {
  fill: rgba(216, 81, 60, 0.18);
  stroke: #d8513c;
}

.radar-legend {
  display: grid;
  gap: 10px;
}

.radar-key {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.radar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.radar-dot.home {
  background: #1f8a70;
}

.radar-dot.away {
  background: #d8513c;
}

.radar-list {
  display: grid;
  gap: 6px;
}

.radar-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.radar-values {
  display: flex;
  gap: 8px;
  font-weight: 600;
}

.radar-values .home {
  color: #1f8a70;
}

.radar-values .away {
  color: #d8513c;
}

.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-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.competition-meta .pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

.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(31, 138, 112, 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.is-active .pill-icon {
  background: white;
  color: var(--accent);
  border-color: transparent;
}

.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 {
  display: grid;
  gap: 12px;
  position: relative;
  padding: 16px;
}

.match-points {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  background: rgba(255, 107, 61, 0.12);
  color: #c24c2c;
}

.match-points.is-good {
  background: rgba(31, 138, 112, 0.14);
  color: #1f8a70;
}

.match-points.is-mid {
  background: rgba(255, 176, 32, 0.15);
  color: #b86f00;
}

.match-points.is-bad {
  background: rgba(214, 69, 69, 0.14);
  color: #c0392b;
}

.match-stage {
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.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(31, 138, 112, 0.15);
  color: var(--accent-2);
  border-color: #cfe6da;
}

.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;
}

.matches-sentinel {
  height: 1px;
  width: 100%;
}

.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;
}

.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;
}

.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(31, 138, 112, 0.15);
  color: var(--accent-2);
}

.status-pill.status-finished {
  background: rgba(90, 82, 71, 0.16);
  color: #5a5247;
}

.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(31, 138, 112, 0.12);
  color: #1f8a70;
  border-color: rgba(31, 138, 112, 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(31, 138, 112, 0.12);
  color: #1f8a70;
}

.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 var(--border);
  background: #f0e6d9;
}

.stage-progress-fill {
  height: 100%;
  background: var(--accent-2);
  width: 0;
}

.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: 28px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 92, 42, 0.12), transparent 50%),
    radial-gradient(circle at 88% 18%, rgba(31, 138, 112, 0.12), transparent 48%),
    linear-gradient(180deg, #fff6ea 0%, #f2e2d1 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.leaderboard-panel-compact {
  padding: 22px;
}

.leaderboard-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 19, 17, 0.08) 1px, transparent 0);
  background-size: 10px 10px;
  opacity: 0.18;
  pointer-events: none;
}

.leaderboard-panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.leaderboard-panel .hall-preview-meta {
  text-align: center;
  margin-top: 10px;
}

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

.leaderboard-panel-title {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.leaderboard-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: none;
}

.leaderboard-tab {
  border: 1px solid var(--border);
  background: #fffdf9;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(20, 19, 17, 0.08);
}

.leaderboard-tab.is-active {
  background: var(--accent);
  color: #fff7ed;
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(255, 92, 42, 0.2);
}

.leaderboard-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-filter select {
  min-width: 200px;
}

.leaderboard-table-wrap {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.leaderboard-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px;
}

.leaderboard-table thead th:first-child {
  width: 46px;
}

.leaderboard-table thead th:last-child {
  text-align: right;
}

.leaderboard-table tbody tr {
  background: #fffdf9;
}

.leaderboard-clickable-row {
  cursor: pointer;
}

.leaderboard-clickable-row:hover {
  background: #fff7ef;
}

.leaderboard-row-first {
  background: #fff2e6;
}

.leaderboard-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.leaderboard-table tbody td:first-child {
  width: 46px;
  font-weight: 700;
  color: var(--muted);
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
}

.leaderboard-rank-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.leaderboard-crown-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.leaderboard-table tbody td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--accent);
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0;
}

.leaderboard-points-content {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.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;
}

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

@media (max-width: 900px) {
  .leaderboard-panel {
    padding: 22px;
  }
}

@media (max-width: 540px) {
  .leaderboard-table {
    table-layout: fixed;
  }

  .leaderboard-table thead th,
  .leaderboard-table tbody td {
    padding: 10px 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: 34px;
  }

  .leaderboard-table thead th:last-child,
  .leaderboard-table tbody td:last-child {
    width: 76px;
  }

  .leaderboard-table tbody td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.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%);
  display: grid;
  gap: 16px;
  max-height: 88vh;
  overflow-y: auto;
  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;
}

.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%);
}

@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;
}

.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 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;
  gap: 6px;
}

.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;
}

.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 {
  background: #faf4ec;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.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-toggle {
  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;
}

.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;
}

.accordion.is-open .accordion-arrow {
  transform: rotate(-135deg);
}

.h2h-panel,
.prediction-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.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;
  }

  .todo-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .todo-actions {
    width: 100%;
    justify-items: stretch;
    text-align: left;
  }

  .todo-actions .button {
    width: 100%;
  }

  .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 12px 12px;
    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 {
    border-radius: 16px;
    padding: 12px 14px;
    min-width: 200px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
  }

  .pill-button.competition-card .pill-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .pill-button.competition-card .pill-text {
    display: grid;
    gap: 4px;
  }

  .pill-button.competition-card .pill-subtext {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .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;
}

.section-title {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input,
select,
textarea {
  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);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 138, 112, 0.3);
  outline-offset: 2px;
  box-shadow: 0 10px 30px rgba(31, 138, 112, 0.16);
}

.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);
}

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;
  }

.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: 22px 18px;
    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 {
    overflow-x: auto;
  }

  .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;
  }

  .reward-qr {
    width: 180px;
    height: 180px;
  }
}

@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;
  }
}
