/* Fonts are hosted on this site (not Google Fonts): a blocked or slow third-party font
   service can otherwise keep the whole stylesheet from applying. Latin + Latin-extended. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/oswald-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/oswald-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --pitch: #0f3d2e;
  --pitch-dark: #0a2b20;
  --paper: #f2eee1;
  --paper-line: #ddd6bf;
  --ink: #1a1a16;
  --ink-soft: #55524a;
  --gold: #c89b3c;
  --gold-dark: #a67f2b;
  --correct: #3b7a57;
  --wrong: #a23e33;
  --radius: 3px;
  --max-width: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--pitch);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 120px);
  color: var(--paper);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--paper);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

a { color: var(--gold); }

button {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
}

input, select {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--pitch-dark);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--gold-dark); }
.btn.secondary {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(242,238,225,0.4);
}
.btn.secondary:hover { border-color: var(--paper); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ---- Top banner ---- */
.top-banner {
  width: 100%;
  background: var(--pitch-dark);
  border-bottom: 1px solid rgba(242,238,225,0.15);
  padding: 0.6rem 0;
  text-align: center;
}
.top-banner img { max-height: 60px; border-radius: var(--radius); }
.top-banner a { display: inline-block; }

/* ---- Header / nav ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 1rem;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.5rem;
}
.site-header .brand {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
}
.site-header .brand .dot { color: var(--gold); }
.site-header .brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.55rem; }
.site-header .brand img { width: 34px; height: 34px; border-radius: 7px; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem 1.2rem; }
.site-nav a {
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0.85;
}
.site-nav a:hover { opacity: 1; color: var(--gold); }

/* ---- Layout with side banners ---- */
.layout-with-sides {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.side-banner {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.side-banner img { width: 100%; border-radius: var(--radius); display: block; }
.top-banner img { max-width: 100%; height: auto; }
/* Pin each part to its column so the page stays centred even when a
   banner column is empty. */
#side-left { grid-column: 1; }
.layout-with-sides > div:not(.side-banner) { grid-column: 2; min-width: 0; }
#side-right { grid-column: 3; }
/* Narrow screens: one column, page content first, side banners underneath. */
@media (max-width: 980px) {
  .layout-with-sides { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #side-left, #side-right, .layout-with-sides > div:not(.side-banner) { grid-column: 1; }
  .layout-with-sides > div:not(.side-banner) { order: 1; }
  .side-banner:empty { display: none; }
  .side-banner {
    order: 2; flex-direction: row; flex-wrap: wrap; justify-content: center;
    position: static; padding: 0 1rem 1rem;
  }
  .side-banner img { width: 140px; max-height: 240px; object-fit: contain; }
}

/* ---- Coupon card (the pools-slip look) ---- */
.coupon {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.coupon::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 20px);
  border-radius: 6px 6px 0 0;
}
.coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px dashed var(--paper-line);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}
.coupon-header .week-label { color: var(--ink-soft); font-size: 0.9rem; }

/* ---- Game row ---- */
.game-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.game-row:last-child { border-bottom: none; }
.game-number {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  color: var(--ink-soft);
  text-align: center;
}
.game-teams { font-weight: 500; line-height: 1.3; }
.kick { display: flex; align-items: center; gap: 0.6rem; }
.kick-time { font-size: 0.78rem; color: var(--ink-soft); text-align: center; line-height: 1.15; min-width: 2.6rem; font-variant-numeric: tabular-nums; }
.kick-time span { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; }
.game-kickoff { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.15rem; }

.pick-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.pick-boxes { display: flex; gap: 0.35rem; }
.pick-box {
  width: 2.4rem;
  height: 2.4rem;
  border: 1.5px solid var(--ink);
  background: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: var(--radius);
}
.pick-box.selected { background: var(--gold); border-color: var(--gold-dark); }
.pick-box.correct { background: var(--correct); border-color: var(--correct); color: #fff; }
.pick-box.wrong { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.pick-kind { color: var(--gold-dark); font-weight: 600; }
.coupon-help { font-size: 0.85rem; color: var(--ink-soft); margin: -0.25rem 0 0.5rem; }

.quota-bar {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.quota-bar strong { color: var(--ink); }
.quota-bar .over { color: var(--wrong); font-weight: 600; }

/* ---- Standings table ---- */
table.standings {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
table.standings th, table.standings td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--paper-line);
}
table.standings th {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  background: var(--pitch-dark);
  color: var(--paper);
}
table.standings tr.leader td:first-child { color: var(--gold-dark); font-weight: 700; }
table.standings.compact th, table.standings.compact td { padding: 0.45rem 0.7rem; font-size: 0.88rem; }

/* ---- Forms ---- */
.form-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }

.friend-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.friend-row button.remove {
  background: none;
  color: var(--wrong);
  font-size: 1.2rem;
  padding: 0.2rem 0.5rem;
}

.message { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.message.error { background: #fbe4e1; color: var(--wrong); border: 1px solid var(--wrong); }
.message.success { background: #e3efe8; color: var(--correct); border: 1px solid var(--correct); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(242,238,225,0.7);
}

.group-list { display: flex; flex-direction: column; gap: 0.75rem; }
.group-card {
  background: rgba(242,238,225,0.06);
  border: 1px solid rgba(242,238,225,0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.group-card .meta { font-size: 0.85rem; color: rgba(242,238,225,0.65); }

.old-player { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; cursor: pointer; }
.old-player input { width: auto; margin: 0; }

/* Members page: star = picks done for the open week */
.pick-star { color: var(--gold); font-size: 1.05em; }

/* Public statistics page (/stats/): one card per game, % of picks, odds from partners */
.st-intro { color: rgba(242,238,225,0.8); max-width: 62ch; }
.st-h2 { color: var(--gold); margin-top: 1.6rem; }
.st-game { background: var(--paper); color: var(--ink); border-radius: 8px; padding: 0.9rem 1rem 0.6rem; margin-bottom: 0.8rem; }
.st-top, .st-row, .st-orow { display: grid; grid-template-columns: 1fr repeat(3, 4.2rem); gap: 0.5rem; align-items: center; }
.st-title { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; font-size: 1.05rem; }
.st-num { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--pitch); color: #fff; display: grid; place-items: center; font-size: 0.85rem; }
.st-meta { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); }
.st-box { text-align: center; border: 1px solid #bdb59a; border-radius: 4px; background: #fff; padding: 0.35rem 0; font-weight: 600; }
.st-row { margin-top: 0.6rem; padding: 0.45rem 0; border-top: 1px solid var(--paper-line); font-size: 0.9rem; }
.st-v { text-align: center; font-variant-numeric: tabular-nums; }
.st-few, .st-odds { border-top: 1px solid var(--paper-line); padding: 0.45rem 0 0.2rem; font-size: 0.88rem; }
.st-few { margin-top: 0.6rem; color: var(--ink-soft); }
.st-head { font-weight: 600; margin-bottom: 0.15rem; }
.st-orow { padding: 0.18rem 0; }
.st-orow .st-bk a { color: var(--ink); text-decoration: underline dotted; }
.st-best { font-weight: 700; }
.st-muted { color: var(--ink-soft); font-size: 0.8rem; }
@media (max-width: 520px) {
  .st-top, .st-row, .st-orow { grid-template-columns: 1fr repeat(3, 3.2rem); gap: 0.3rem; }
  .st-title { font-size: 0.95rem; }
}
/* Admin: at-a-glance numbers */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.stat { background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 0.7rem 0.9rem; }
.stat-num { font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--pitch-dark); }
.stat-label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.stat-sub { font-size: 0.74rem; color: var(--ink-soft); margin-top: 0.15rem; }

/* Blog posts (public pages and the admin preview) */
.blog-post h1, .blog-post h2, .blog-post h3 { color: var(--ink); }
.blog-post h2 { margin-top: 1.6rem; }
.blog-post table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.blog-post th, .blog-post td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--paper-line); }
.blog-post th { background: var(--pitch-dark); color: var(--paper); font-family: 'Oswald', sans-serif; }
.blog-item { padding: 0.75rem 0; border-bottom: 1px solid var(--paper-line); }
.blog-item h2 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.blog-admin textarea { width: 100%; font-family: monospace; font-size: 0.85rem; }

.past-leagues { margin-top: 1.5rem; }
.past-leagues summary { cursor: pointer; color: var(--gold); font-weight: 600; padding: 0.5rem 0; }
.past-leagues .group-list { margin-top: 0.5rem; }
.past-leagues .group-card { opacity: 0.8; }

.admin-section {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-section h3 { margin-bottom: 1rem; }

/* ---- Utilities & shared pieces ---- */
[hidden] { display: none !important; }

/* Headings and secondary buttons on the cream "paper" cards need dark ink
   (the defaults are cream, for the green background). */
.form-card h2, .form-card h3,
.admin-section h2, .admin-section h3,
.coupon h3 { color: var(--ink); }
.btn.secondary.dark,
.form-card .btn.secondary,
.admin-section .btn.secondary { color: var(--ink); border-color: rgba(26,26,22,0.35); }
.btn.secondary.dark:hover,
.form-card .btn.secondary:hover,
.admin-section .btn.secondary:hover { border-color: var(--ink); }
.btn.full { width: 100%; }

.narrow { max-width: 420px; margin: 2rem auto; }
.hint { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.25rem; }
.hint.small, .small { font-size: 0.8rem; }
.spaced { margin-top: 1.5rem; }
.footnote { font-size: 0.8rem; color: rgba(242,238,225,0.6); margin-top: 0.75rem; }

.page-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.1rem 0.45rem; border-radius: var(--radius);
  background: rgba(200,155,60,0.2); color: var(--gold); vertical-align: middle;
}
.tag.dark { color: var(--gold-dark); }

.checkbox {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.85rem; color: var(--ink-soft); margin: 0.25rem 0 1.1rem; cursor: pointer;
}
.checkbox input { margin-top: 0.2rem; }
.checkbox.inline { margin: 0; align-items: center; }

.password-wrap { position: relative; display: flex; }
.password-wrap input { flex: 1; padding-right: 2.6rem; }
.password-toggle {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; padding: 0.3rem; background: none; color: var(--ink-soft);
}
.password-toggle:hover { color: var(--ink); }

.auth-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 0; font-size: 0.88rem; }
.auth-links a { color: var(--gold-dark); }

.details { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 1rem 0 1.25rem; }
.details dt { font-weight: 600; color: var(--ink-soft); font-size: 0.85rem; }
.details dd { margin: 0; }

/* ---- Create league ---- */
.page-intro { color: rgba(242,238,225,0.8); margin: 0.4rem 0 0; }
.field-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.segmented { display: flex; border: 1px solid var(--paper-line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg {
  flex: 1; padding: 0.55rem 0.4rem; background: #fff; color: var(--ink);
  font-size: 0.92rem; font-weight: 600; border-radius: 0; border-right: 1px solid var(--paper-line);
}
.seg:last-child { border-right: none; }
.seg:hover { background: #faf7ee; }
.seg.active { background: var(--gold); color: var(--pitch-dark); }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
.focus-option {
  display: flex; align-items: center; gap: 0.6rem; text-align: left; padding: 0.55rem 0.7rem;
  background: #fff; color: var(--ink); border: 1.5px solid var(--paper-line); border-radius: 6px;
}
.focus-option:hover { border-color: var(--gold); }
.focus-option.active { border-color: var(--gold-dark); background: rgba(200,155,60,0.16); box-shadow: inset 0 0 0 1px var(--gold-dark); }
.focus-option span { display: flex; flex-direction: column; line-height: 1.2; }
.focus-option strong { font-size: 0.88rem; }
.focus-option small { font-size: 0.72rem; color: var(--ink-soft); }
.flag { flex: 0 0 auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
.season-summary {
  margin: 0 0 0.5rem; padding: 0.6rem 0.9rem; border-radius: var(--radius);
  background: rgba(200,155,60,0.14); color: var(--ink); font-size: 0.9rem;
}
.next-steps {
  margin: 1.5rem 0 1.25rem; padding: 0.9rem 1.1rem; border-left: 3px solid var(--gold);
  background: rgba(0,0,0,0.03); font-size: 0.88rem; color: var(--ink-soft);
}
.next-steps strong:first-child { color: var(--ink); }
.next-steps ol { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.next-steps li { margin-bottom: 0.2rem; }

/* ---- Members ---- */
.pending { color: var(--gold-dark); }
.row-actions { white-space: nowrap; text-align: right; }
.link-btn {
  background: none; padding: 0.2rem 0.4rem; font-size: 0.82rem; font-weight: 600;
  color: var(--gold-dark); text-decoration: underline;
}
.link-btn.danger { color: var(--wrong); }
.link-btn:disabled { opacity: 0.6; cursor: default; text-decoration: none; }
.invite-banner {
  margin: 0.75rem 0 0.25rem; padding: 0.6rem 0.9rem; border-radius: var(--radius);
  background: rgba(200,155,60,0.16); color: var(--ink); font-size: 0.92rem;
}

/* ---- Picks page ---- */
.week-picker { max-width: 280px; }
.week-picker label { color: rgba(242,238,225,0.75); }
.countdown {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap;
  background: var(--pitch-dark); border: 1px solid rgba(200,155,60,0.45); border-radius: 6px;
  padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.9rem;
}
.countdown-clock {
  font-family: 'Oswald', sans-serif; font-size: 1.35rem; font-weight: 600; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.countdown-clock.urgent { color: #f0a36b; }

.coupon-footer {
  margin-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem;
}
.coupon-footer .unsaved { color: var(--wrong); font-weight: 600; }
.coupon-status {
  margin-top: 1rem; padding: 0.6rem 0.9rem; border-radius: var(--radius);
  background: rgba(200,155,60,0.16); color: var(--ink); font-size: 0.88rem; font-weight: 600;
}
.coupon-status.ok { background: #e3efe8; color: var(--correct); }
/* Complete on screen but not yet saved: impossible to miss */
.coupon-status.warn { background: var(--gold); color: var(--pitch-dark); font-size: 0.95rem; }
.btn.attn { animation: attn-pulse 1.4s ease-in-out infinite; }
@keyframes attn-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,60,0.7); } 50% { box-shadow: 0 0 0 8px rgba(200,155,60,0); } }
@media (prefers-reduced-motion: reduce) { .btn.attn { animation: none; } }
.game-row.missing { box-shadow: inset 3px 0 0 var(--gold); padding-left: 0.5rem; }
.pick-chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 0.3rem;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 600;
}
.pick-chip.correct { background: var(--correct); border-color: var(--correct); color: #fff; }
.pick-chip.wrong { background: var(--wrong); border-color: var(--wrong); color: #fff; }
.score { color: var(--ink-soft); font-size: 0.8rem; }
.table-scroll { overflow-x: auto; }

/* Locked week's "everyone's picks" table: names stay put while you scroll down,
   and the game stays put while you scroll right. The table scrolls inside its own
   box (max-height) so the sticky header has something to stick to. */
.locked-table th.my-picks { color: var(--gold); }
.table-scroll.locked-table { max-height: 75vh; overflow: auto; border-radius: 6px; }
.locked-table table.standings { overflow: visible; border-collapse: separate; border-spacing: 0; }
.locked-table table.standings thead th { position: sticky; top: 0; z-index: 3; }
.locked-table table.standings th:nth-child(-n+2),
.locked-table table.standings td:nth-child(-n+2) { position: sticky; background: var(--paper); z-index: 2; }
.locked-table table.standings thead th:nth-child(-n+2) { background: var(--pitch-dark); z-index: 4; }
.locked-table table.standings th:first-child,
.locked-table table.standings td:first-child {
  left: 0; box-sizing: border-box; width: 2.4rem; min-width: 2.4rem; max-width: 2.4rem;
  padding-left: 0.3rem; padding-right: 0.3rem; text-align: center;
}
.locked-table table.standings th:nth-child(2),
.locked-table table.standings td:nth-child(2) { left: 2.4rem; box-shadow: 2px 0 0 var(--paper-line); }

/* ---- Admin: adding games ---- */
.mode-tabs { margin-bottom: 1rem; max-width: 560px; }
.spaced-sm { margin-top: 0.9rem; }
table.fixtures { margin: 0.5rem 0 1rem; }
table.fixtures td:first-child, table.fixtures th:first-child { width: 2.5rem; text-align: center; }
table.fixtures tr.picked td { background: rgba(200,155,60,0.18); }
table.fixtures tr.cancelled td { text-decoration: line-through; opacity: 0.6; }
table.fixtures input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
.count-ok { color: var(--correct); }
#fetch-results { margin-bottom: 1rem; }
.coupon-weekend { margin: 1.2rem 0 0.5rem; font-family: 'Oswald', sans-serif; }
.coupon-admin { border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.6rem; background: rgba(0,0,0,0.02); }
.coupon-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.coupon-admin details { margin-top: 0.5rem; font-size: 0.88rem; }
.coupon-admin summary { cursor: pointer; color: var(--gold-dark); }
.coupon-admin-games { margin: 0.4rem 0 0; padding-left: 1.4rem; }
.preset-row { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; }

/* ---- Admin ---- */
.narrow-field { max-width: 280px; }
.game-entry { align-items: flex-end; border-bottom: 1px solid var(--paper-line); padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.field-row .field.game-no { flex: 0 0 2rem; }
.field-row .field.w-90 { flex: 0 0 90px; }
.field-row .field.w-110 { flex: 0 0 110px; }
.field-row .field.w-120 { flex: 0 0 120px; }
.field-row .field.grow-2 { flex: 2; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.banner-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: rgba(0,0,0,0.03); border: 1px solid var(--paper-line); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 0.5rem;
}

/* ---- Landing page ---- */
.site-nav a.nav-btn { opacity: 1; padding: 0.4rem 1.1rem; font-size: 0.9rem; }
.site-nav a.nav-btn:hover { color: var(--paper); }

.next-lock {
  display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.9rem;
  margin: -0.75rem 0 1.5rem; padding: 0.5rem 1rem;
  background: var(--pitch-dark); border: 1px solid rgba(200,155,60,0.35); border-radius: 999px;
  font-size: 0.88rem; color: rgba(242,238,225,0.85); text-align: center;
}
.next-lock-clock {
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.next-lock-clock.urgent { color: #f0a36b; }

.btn.big { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
a.btn { text-decoration: none; }

.hero { text-align: center; padding: 2.5rem 0 3rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 0.5rem 0 1rem; }
.eyebrow {
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.8rem; font-weight: 600; margin: 0;
}
.hero-sub { max-width: 34rem; margin: 0 auto 1.75rem; color: rgba(242,238,225,0.8); font-size: 1.05rem; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3rem; }
.step {
  background: rgba(242,238,225,0.06); border: 1px solid rgba(242,238,225,0.15);
  border-radius: 6px; padding: 1.25rem;
}
.step h3 { margin: 0.6rem 0 0.35rem; }
.step p { margin: 0; font-size: 0.9rem; color: rgba(242,238,225,0.75); }
.step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: 50%; background: var(--gold); color: var(--pitch-dark);
  font-family: 'Oswald', sans-serif; font-weight: 700;
}

.showcase { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; margin-bottom: 3rem; }
.sample-coupon { transform: rotate(-1.2deg); }
.sample-coupon .pick-box { display: inline-flex; align-items: center; justify-content: center; }
.rules h2 { margin-bottom: 0.75rem; }
.rules ul { padding-left: 1.1rem; margin: 0 0 1.25rem; color: rgba(242,238,225,0.85); font-size: 0.93rem; }
.rules li { margin-bottom: 0.45rem; }
.rules li strong { color: var(--gold); }
.sample-table tr.you td { background: rgba(200,155,60,0.18); font-weight: 600; }

.final-cta {
  text-align: center; padding: 2.25rem 1rem; border-radius: 6px;
  background: var(--pitch-dark); border: 1px solid rgba(200,155,60,0.45);
}
.final-cta p { color: rgba(242,238,225,0.75); margin: 0.4rem 0 1.25rem; }

@media (max-width: 760px) {
  .steps, .showcase { grid-template-columns: 1fr; }
  .sample-coupon { transform: none; }
  .hero { padding: 1.5rem 0 2rem; }
}

/* ---- 18+ / responsible gambling ---- */
.badge-18 {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-width: 1.9rem; height: 1.9rem; padding: 0 0.2rem; border-radius: 50%;
  border: 2px solid var(--wrong); color: var(--paper); background: var(--wrong);
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.72rem; line-height: 1;
}
.rg-notice { display: flex; gap: 0.6rem; align-items: center; justify-content: center; max-width: 620px; margin: 0.6rem auto 0; text-align: left; }
.rg-notice a { color: rgba(242,238,225,0.75); }
footer.site-footer p { margin: 0; }
.ad-slot { display: inline-flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.side-banner .ad-slot { display: flex; }
.ad-label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; color: rgba(242,238,225,0.6); }
.ad-label .badge-18 { min-width: 1.35rem; height: 1.35rem; font-size: 0.58rem; border-width: 1.5px; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-top: 0.9rem; }
.footer-links a { color: rgba(242,238,225,0.7); }

/* ---- Information pages ---- */
.info-page { max-width: 760px; margin: 0 auto; }
.info-page h3 { margin: 1.3rem 0 0.4rem; }
.info-page p, .info-page li { font-size: 0.95rem; line-height: 1.6; }
.info-page ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.info-page a { color: var(--gold-dark); }

/* ---- App install / QR ---- */
.install-slot:empty { display: none; }
.install-slot { margin: 1.5rem 0 0; }
.hero .install-slot { max-width: 520px; margin: 2rem auto 0; text-align: left; }
.install-card {
  display: flex; gap: 1rem; align-items: center;
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: 1rem 1.1rem;
  border: 1px solid var(--paper-line);
}
.install-card strong { font-family: 'Oswald', sans-serif; font-size: 1.05rem; }
.install-card p { margin: 0.3rem 0 0; }
.install-card .qr { flex: 0 0 116px; width: 116px; height: 116px; background: #fff; border-radius: 4px; padding: 4px; }
.install-card .qr svg { width: 100%; height: 100%; display: block; }
.install-icon { flex: 0 0 56px; border-radius: 12px; }
.install-btn { margin-top: 0.6rem; }

/* ---- Standings: period winner stars (★1, ★2, ★3) ---- */
.section-title { margin: 2rem 0 0.75rem; }
.name-cell { white-space: nowrap; }
.period-star {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; margin-left: 0.35rem; vertical-align: middle;
}
.period-star svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--gold); stroke: var(--gold-dark); stroke-width: 1; }
.period-star span {
  position: relative; font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 0.85rem;
  color: var(--pitch-dark); margin-top: 0.18rem;
}
.star-legend { font-size: 0.85rem; color: rgba(242,238,225,0.75); margin-top: 0.9rem; line-height: 2; }
.star-legend .period-star { margin-left: 0; }
.focus-tag { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; font-size: 0.82rem; color: var(--gold); letter-spacing: 0.04em; }
.meta .flag { vertical-align: -2px; margin-right: 0.15rem; }

/* ---- Shop ---- */
.shop-hero { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.shop-hero p { margin: 0.3rem 0 0; color: rgba(242,238,225,0.8); }
.shop-hero img { border-radius: 10px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.shop-item {
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start;
}
.shop-thumb { align-self: stretch; display: flex; justify-content: center; padding: 1rem; background: #e4ebe6; border-radius: 4px; margin-bottom: 0.4rem; }

/* ---- Phones ---- */
@media (max-width: 640px) {
  .shell { padding: 0 1rem 2rem; }
  .site-header { flex-wrap: wrap; gap: 0.5rem; }
  .site-nav { justify-content: flex-start; gap: 0.4rem 1rem; }
  .field-row { flex-wrap: wrap; }
  .field-row .field { flex: 1 1 100%; }
  .field-row .field.w-90, .field-row .field.w-110, .field-row .field.w-120 { flex: 1 1 40%; }
  .field-row .field.game-no { flex: 0 0 100%; margin-bottom: 0; }
  .friend-row { grid-template-columns: 1fr; }
  .group-card { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .game-row { grid-template-columns: 1.5rem 1fr; }
  .game-row .pick-boxes { grid-column: 2; }
  .coupon, .form-card, .admin-section { padding: 1.1rem; }
  table.standings th, table.standings td { padding: 0.5rem 0.6rem; }
}

footer.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(242,238,225,0.5);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(242,238,225,0.15);
}
