:root {
  --bg: #0d184f;
  --bg-2: #12304f;
  --club-blue: #16237d;
  --club-sky: #7cb5de;
  --panel: rgba(248, 243, 229, 0.96);
  --ink: #112217;
  --muted: #5c7563;
  --line: rgba(17, 34, 23, 0.1);
  --accent: #f28c28;
  --accent-2: #d95d39;
  --success: #1e7f53;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 20px 48px rgba(3, 15, 9, 0.26);
  --font-display: "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
  --font-body: "Avenir Next", "Trebuchet MS", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(242, 140, 40, 0.16), transparent 24rem),
    radial-gradient(circle at top right, rgba(22, 35, 125, 0.28), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(124, 181, 222, 0.12), transparent 28rem),
    linear-gradient(160deg, var(--bg), var(--bg-2) 34%, #0f2838 62%, #091712 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 26px 26px;
}

.public-shell {
  min-height: 100vh;
  padding: 28px 16px 44px;
}

.public-hero {
  max-width: 1120px;
  margin: 0 auto 22px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
  color: #f6f1e2;
}

.eyebrow,
.small-note {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.public-hero h1,
.public-panel h2 {
  margin: 0;
  font-family: var(--font-display);
}

.public-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 42rem;
  margin: 10px 0 0;
  line-height: 1.45;
  color: rgba(246, 241, 226, 0.82);
}

.hero-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: start;
}

.public-hero-badge {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  clip-path: circle(46.5% at 50% 50%);
  filter: drop-shadow(0 14px 24px rgba(4, 11, 28, 0.22));
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(30, 127, 83, 0.15);
  color: #dff6ea;
}

.public-frame {
  max-width: 1120px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16%),
    linear-gradient(145deg, rgba(248, 243, 229, 0.94), rgba(247, 240, 221, 0.97));
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  padding: 24px;
}

.public-panel {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fffdf6;
}

.panel-head,
.stat-strip,
.double-grid,
.live-score-meta,
.live-score-line {
  display: flex;
  gap: 12px;
}

.panel-head,
.live-score-meta,
.live-score-line {
  justify-content: space-between;
  align-items: center;
}

.compact-head {
  margin-bottom: 10px;
}

.detail-top-grid {
  margin-top: 16px;
}

.detail-section + .detail-section {
  margin-top: 14px;
}

.stat-strip,
.double-grid {
  flex-wrap: wrap;
}

.double-grid > * {
  flex: 1 1 320px;
}

.mini-card {
  flex: 1 1 160px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.live-score-card {
  display: grid;
  gap: 14px;
}

.live-score-meta,
.live-score-line {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.live-score-line strong {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
}

.score-period {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.score-clock {
  font-size: 1.45rem;
  font-weight: 800;
  color: #9d471d;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(17, 34, 23, 0.08);
  color: var(--ink);
}

.chip.team {
  background: rgba(30, 127, 83, 0.14);
  color: var(--success);
}

.chip.public {
  background: rgba(242, 140, 40, 0.14);
  color: #a95422;
}

.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.lineup-grid,
.ladder-list,
.timeline-list,
.result-list,
.fixture-list,
.leader-list {
  display: grid;
  gap: 10px;
}

.ladder-head,
.ladder-row-desktop {
  display: grid;
  grid-template-columns: 44px minmax(0, 2.8fr) repeat(5, minmax(34px, 0.7fr)) minmax(48px, 0.8fr);
  gap: 10px;
  align-items: center;
}

.ladder-head {
  padding: 0 14px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-scroll-list {
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 34, 23, 0.22) transparent;
}

.leader-scroll-list {
  max-height: 188px;
}

.match-scroll-list {
  max-height: 252px;
}

#public-ladder-panel {
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(248, 243, 229, 0.94));
}

#public-ladder-panel .panel-head {
  margin-bottom: 8px;
}

#public-ladder-panel .ladder-list {
  max-height: 352px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 34, 23, 0.22) transparent;
}

#public-ladder-panel .ladder-list::-webkit-scrollbar {
  width: 8px;
}

#public-ladder-panel .ladder-list::-webkit-scrollbar-thumb {
  background: rgba(17, 34, 23, 0.18);
  border-radius: 999px;
}

.compact-scroll-list::-webkit-scrollbar {
  width: 8px;
}

.compact-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(17, 34, 23, 0.18);
  border-radius: 999px;
}

.lineup-row,
.timeline-row,
.result-row,
.fixture-row,
.leader-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.ladder-row {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.ladder-row-mobile {
  display: none;
}

a.result-row,
a.fixture-row {
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

a.result-row:hover,
a.fixture-row:hover {
  border-color: rgba(17, 34, 23, 0.22);
  transform: translateY(-1px);
}

a.result-row.is-selected,
a.fixture-row.is-selected {
  border-color: rgba(30, 127, 83, 0.35);
  box-shadow: inset 0 0 0 1px rgba(30, 127, 83, 0.16);
  background: rgba(30, 127, 83, 0.08);
}

.fixture-row.is-bye {
  background: rgba(17, 34, 23, 0.08);
}

.lineup-row strong,
.timeline-row strong,
.result-row strong,
.fixture-row strong,
.leader-row strong,
.ladder-row strong {
  font-size: 1rem;
}

.lineup-row span:first-child,
.timeline-time,
.leader-kicker {
  color: var(--muted);
  font-weight: 700;
}

.ladder-pos {
  font-weight: 900;
  color: var(--club-blue);
}

.ladder-team {
  line-height: 1.25;
}

.ladder-points {
  font-weight: 900;
}

.ladder-mobile-top {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ladder-mobile-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ladder-mobile-stat {
  display: grid;
  gap: 3px;
  text-align: center;
}

.ladder-mobile-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ladder-mobile-value {
  font-size: 0.98rem;
  font-weight: 800;
}

.ladder-mobile-stat-points .ladder-mobile-value {
  font-weight: 900;
}

.ladder-row.is-club {
  border-color: rgba(22, 35, 125, 0.24);
  background: rgba(22, 35, 125, 0.08);
}

.detail-row {
  align-items: flex-start;
}

.detail-value {
  max-width: 65%;
  text-align: right;
  color: var(--muted);
  line-height: 1.4;
}

.result-row .result-tag {
  font-weight: 900;
  color: var(--success);
}

.result-row .result-tag.loss {
  color: #c35a37;
}

.result-row .result-tag.draw {
  color: #268b67;
}

@media (max-width: 760px) {
  .public-hero {
    flex-direction: column;
  }

  .hero-meta {
    justify-items: start;
  }

  .public-hero-badge {
    width: 80px;
    height: 80px;
  }

  .public-frame {
    padding: 18px;
  }

  .leader-scroll-list {
    max-height: 186px;
  }

  .match-scroll-list {
    max-height: 356px;
  }

  .ladder-head {
    display: none;
  }

  .ladder-row {
    padding: 14px;
  }

  .ladder-row-desktop {
    display: none;
  }

  .ladder-row-mobile {
    display: grid;
    gap: 12px;
  }

  .ladder-mobile-top .ladder-team {
    font-size: 1rem;
    line-height: 1.2;
  }

  .detail-value {
    max-width: 100%;
  }

  .live-score-line {
    align-items: flex-start;
    flex-direction: column;
  }
}
