:root {
  --bg: #f4f6f3;
  --card: #ffffff;
  --text: #15201a;
  --muted: #5c6a62;
  --faint: #66726a;   /* still readable: 4.6:1 or better on every background */
  --border: #e2e7e2;
  --brand: #0f6b47;
  --brand-ink: #ffffff;
  --brand-soft: #e3f2ea;
  --side-a: #d98e14;
  --side-a-soft: #fbefd9;
  --side-b: #2c6bd1;
  --side-b-soft: #e2ecfb;
  --good: #137a43;
  --bad: #b8322a;
  --warn-soft: #fde9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 24, 0.06), 0 1px 1px rgba(16, 32, 24, 0.04);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1411;
    --card: #151f1a;
    --text: #e6eee8;
    --muted: #9fb0a6;
    --faint: #8b9b91;
    --border: #25322b;
    --brand: #35c28a;
    --brand-ink: #062317;
    --brand-soft: #173326;
    --side-a: #f0ae3a;
    --side-a-soft: #3a2c12;
    --side-b: #5b95f2;
    --side-b-soft: #172840;
    --good: #43c983;
    --bad: #f07a70;
    --warn-soft: #3b1d1a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.hidden { display: none !important; }

/* ---------- layout ---------- */

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }

.center-screen {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px 16px; text-align: center;
}

.welcome { max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.welcome .logo { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto; }
.welcome .lead { color: var(--muted); font-size: 17px; }

/* ---------- landing page (before sign-in) ---------- */

.landing { --navy: #091d41; --navy2: #0b2a4f; --forest: #0c4a36; --leaf: #7be08d; }

/* The top: a dark "floodlit stadium" band with a curved edge. */
.l-hero { position: relative; color: #fff; overflow: hidden; padding: 20px 20px 72px;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0) 7%),
    radial-gradient(circle at 78% 10%, rgba(180, 220, 255, 0.28) 0, rgba(180, 220, 255, 0) 34%),
    radial-gradient(ellipse at 100% 100%, rgba(52, 194, 138, 0.55) 0, rgba(52, 194, 138, 0) 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy2) 55%, var(--forest) 100%); }
.l-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 44px; background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.l-hero-in { max-width: 1040px; margin: 0 auto; position: relative; z-index: 1; }
.l-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.l-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
.l-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.landing h1 { font-size: 36px; font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
.landing h1 span { display: block; }
.landing h1 .accent { color: var(--leaf); }
.l-lead { font-size: 18px; color: rgba(255, 255, 255, 0.88); max-width: 30em; }
.l-note { font-size: 13px; color: rgba(255, 255, 255, 0.82); }
.l-copy .l-google { margin-top: 4px; }
@media (min-width: 760px) {
  .l-copy .l-google { background: linear-gradient(90deg, #35d07f, #0f9d58); color: #fff; padding: 10px 22px 10px 12px; min-width: 0; gap: 14px; box-shadow: 0 8px 22px rgba(15, 157, 88, 0.45); }
  .l-copy .l-google:hover { filter: brightness(1.07); background: linear-gradient(90deg, #35d07f, #0f9d58); }
  .l-copy .l-google .gmark { width: 22px; height: 22px; padding: 6px; background: #fff; border-radius: 50%; box-sizing: content-box; }
  .l-copy .l-google::after { content: "\2192"; font-weight: 700; }
}
.l-google { width: auto; min-width: 260px; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #15201a; border: 0; border-radius: 999px; font-weight: 700; padding: 14px 28px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); cursor: pointer; }
.l-google:hover { background: #f1f5f2; }
.l-google .gmark { flex: none; }
.l-copy form { width: 100%; max-width: 340px; color: #fff; }
.l-copy .or { color: rgba(255, 255, 255, 0.7); width: 100%; max-width: 340px; }
.l-copy label { color: rgba(255, 255, 255, 0.85); }
.l-main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 8px; display: flex; flex-direction: column; gap: 20px; }
.l-h2 { display: flex; align-items: center; gap: 16px; font-size: 26px; font-weight: 800; text-align: center; margin: 4px 0 16px; }
.l-h2::before, .l-h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.step-body { flex: 1; min-width: 0; }
.step h3 { font-size: 18px; margin-bottom: 4px; }
.step p + p { margin-top: 6px; }
.step sup { color: var(--brand); font-weight: 700; }
.step .example { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.step-ic { flex: none; width: 64px; height: 64px; align-self: center; }
.step-ic svg { width: 100%; height: 100%; display: block; }
.landing .footnote { margin: 8px 4px 0; }

.l-two { display: grid; grid-template-columns: 1fr; gap: 16px; }
.l-card { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.l-card h2 { font-size: 19px; font-weight: 700; }
.l-scoring { background: var(--card); border: 1px solid var(--border); }
.l-scoring h2 { background: #0c4a36; color: #fff; padding: 14px 18px; }
.l-scoring-in { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.l-scoring dl { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.l-scoring dl div { display: flex; justify-content: space-between; gap: 12px; background: var(--brand-soft); border-radius: 8px; padding: 8px 12px; }
.l-scoring dt { font-weight: 600; }
.l-scoring dd { margin: 0; font-weight: 700; }
.l-scoring p { font-size: 14px; color: var(--muted); }
.l-board { background: #0b2247; color: #fff; padding: 14px 18px 12px; }
.l-board-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.l-board table { width: 100%; border-collapse: collapse; font-size: 15px; }
.l-board th { text-align: left; font-weight: 600; font-size: 13px; color: rgba(255, 255, 255, 0.75); padding: 6px 8px; }
.l-board td { padding: 9px 8px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.l-board th:nth-child(n+3), .l-board td:nth-child(n+3) { text-align: right; }
.l-board td:first-child { color: #f2b632; font-weight: 700; width: 28px; }
.l-board tr.me td { background: #1d6b4a; border-top-color: transparent; }
.l-board tr.me td:first-child { border-radius: 8px 0 0 8px; }
.l-board tr.me td:last-child { border-radius: 0 8px 8px 0; }

.l-help { display: flex; align-items: center; gap: 14px; background: var(--brand-soft); border: 1px solid var(--border); border-radius: 16px; padding: 16px; flex-wrap: wrap; }
.l-q { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.l-help > div { flex: 1; min-width: 200px; }
.l-help h2 { font-size: 18px; }
.l-help p { font-size: 15px; color: var(--muted); }
.l-help-btn { margin-left: 54px; text-decoration: none; border-radius: 999px; color: var(--brand); border-color: var(--brand); font-weight: 700; }

.l-foot { margin-top: 24px; padding: 40px 20px 36px; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: radial-gradient(ellipse at 20% 0%, rgba(52, 194, 138, 0.35) 0, rgba(52, 194, 138, 0) 60%), linear-gradient(160deg, var(--navy2), var(--forest)); }
.l-foot .fine { color: rgba(255, 255, 255, 0.85); }
.l-foot a { color: #fff !important; }

.l-art { position: absolute; z-index: 0; right: 0; pointer-events: none; top: 150px; width: 72%; max-width: 320px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 45%), linear-gradient(to bottom, transparent 0, #000 14%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 45%), linear-gradient(to bottom, transparent 0, #000 14%, #000 80%, transparent 100%); mask-composite: intersect; }
.l-art::after { content: ""; position: absolute; inset: 0; background: url(hero-streaks.svg) 0 0 / 100% 100% no-repeat; display: none; }
.l-photo { display: block; width: 100%; height: auto; }
@media (max-width: 759px) {
  .landing h1 { font-size: 34px; text-shadow: 0 2px 14px rgba(5, 15, 40, 0.55); }
  .l-lead { max-width: 60%; font-size: 17px; text-shadow: 0 1px 10px rgba(5, 15, 40, 0.6); }
  .l-note { max-width: 62%; }
  .l-hero { padding-bottom: 96px; min-height: 470px; }
  .l-copy { position: static; }
  .l-grid { position: static; }
  .l-copy .l-google { position: absolute; top: 2px; right: 0; min-width: 0; padding: 6px 12px; font-size: 13px; gap: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
  .l-copy .l-google .gmark { width: 18px; height: 18px; }
  .l-brand { max-width: 52%; }
  .landing h1 { font-size: clamp(26px, 9vw, 34px); }
  .l-grid { margin-top: 36px; }
}
.l-brand { position: relative; z-index: 1; }
.l-grid { z-index: 1; }

@media (max-width: 389px) {
  .l-brand { font-size: 17px; }
  .l-copy .l-google { position: static; font-size: 15px; padding: 12px 20px; }
  .l-copy .l-google .gmark { width: 20px; height: 20px; }
}

/* Tablets and laptops. */
@media (min-width: 760px) {
  .l-help-btn { margin-left: 0; }
  .l-hero { padding: 28px 32px 96px; }
  .l-grid { grid-template-columns: 1fr; margin-top: 44px; }
  .l-copy { max-width: 560px; }
  .l-hero { min-height: 560px; }
  /* A long, gentle fade from the dark page into the photo. */
  .l-art { top: 0; width: 58%; max-width: 900px; height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,0.04) 8%, rgba(0,0,0,0.14) 17%, rgba(0,0,0,0.3) 27%, rgba(0,0,0,0.52) 38%, rgba(0,0,0,0.76) 50%, rgba(0,0,0,0.93) 62%, #000 72%);
    mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,0.04) 8%, rgba(0,0,0,0.14) 17%, rgba(0,0,0,0.3) 27%, rgba(0,0,0,0.52) 38%, rgba(0,0,0,0.76) 50%, rgba(0,0,0,0.93) 62%, #000 72%);
    -webkit-mask-composite: source-over; mask-composite: add; }
  .l-photo { height: 100%; object-fit: cover; object-position: 72% 30%; }
  .landing h1 { font-size: 52px; }
  .l-lead { font-size: 20px; }
  .l-main { padding: 8px 32px; gap: 28px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps .step { padding: 20px; align-items: center; }
  .step-ic { width: 96px; height: 96px; }
  .step p.run { display: inline; }
  .step p.run + p.run { margin: 0; }
  .steps .step:last-child { grid-column: 1 / -1; }
  .l-two { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .l-board { display: flex; flex-direction: column; justify-content: center; }
}

.stack { display: flex; flex-direction: column; gap: 10px; text-align: left; }

.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-inner { max-width: 640px; margin: 0 auto; padding: 10px 16px 0; }
.top-row { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 18px; flex: 1; min-width: 0; }
.brand img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--good); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.me-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); font-weight: 700; font-size: 13px; cursor: pointer; flex: none;
}

.tabs { display: flex; gap: 4px; margin-top: 8px; }
.tab {
  flex: 1 1 auto; border: 0; background: none; padding: 10px 2px 11px; cursor: pointer; white-space: nowrap;
  font-weight: 600; font-size: 15px; color: var(--muted); border-bottom: 2.5px solid transparent;
}
.tab.active { color: var(--text); border-bottom-color: var(--brand); }

.menu { padding: 12px 0 14px; border-top: 1px solid var(--border); margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.menu form { display: flex; gap: 8px; align-items: flex-end; }
.menu form .field { flex: 1; }
.link.name-suggest { padding: 6px 0; }
.name-rule { margin: 4px 0 0; }

/* ---------- cards ---------- */

.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 26px 2px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.section-title:first-child { margin-top: 8px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card h2 { margin-bottom: 4px; }

.banner {
  background: var(--brand-soft); border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px;
}
.banner b { font-weight: 700; }

.empty { text-align: center; padding: 28px 16px; }
.empty p + p { margin-top: 6px; }

/* ---------- match card ---------- */

.meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.meta .when { min-width: 0; }

/* Match cards read like a scorecard: centred, except the countdown and
   the tally, which run edge to edge. */
.match { text-align: center; }
/* The tag (e.g. "Kerala won") always sits on its own line under the date, however short the date line is. */
.match .meta { flex-direction: column; align-items: center; justify-content: center; }
.match .teams { justify-content: center; }
.match .btn-row { justify-content: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--border);
}
.chip.soon { background: var(--warn-soft); color: var(--bad); border-color: transparent; }
.chip.good { background: var(--brand-soft); color: var(--good); border-color: transparent; }

.teams { margin: 6px 0 12px; font-size: 22px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.teams .vs { font-size: 14px; font-weight: 500; color: var(--faint); }
.teams .won::after { content: " ✓"; color: var(--good); }

.tally-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.dot.a { background: var(--side-a); margin-right: 6px; }
.dot.b { background: var(--side-b); margin-left: 6px; }

.bar { display: flex; gap: 3px; height: 10px; margin: 6px 0 6px; }
.bar > div { border-radius: 5px; transition: flex-grow 0.5s ease; min-width: 0; }
.bar .a { background: var(--side-a); }
.bar .b { background: var(--side-b); }
.bar .none { background: var(--border); flex: 1; }

.pool { font-size: 13px; color: var(--muted); }

/* Countdown to the start: calm at first, red in the last 15 minutes,
   solid red in the last 2. */
.countdown {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  background: var(--brand-soft); color: var(--good);
  transition: background 0.3s, color 0.3s;
}
.cd-label { font-size: 14px; font-weight: 650; }
.cd-time { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.countdown.soon { background: var(--warn-soft); color: var(--bad); }
.countdown.urgent { background: var(--bad); color: var(--card); animation: cd-pulse 1.4s ease-out infinite; }
@keyframes cd-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 50%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pick {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-align: center; padding: 12px 6px 11px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: var(--card); min-height: 74px;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.pick:active { transform: scale(0.98); }
.pick[disabled] { opacity: 0.6; cursor: progress; }
.pick-team { font-weight: 750; font-size: 17px; line-height: 1.2; word-break: break-word; }
.pick-pay { font-size: 12px; color: var(--muted); }
.pick-pay .pos, .pick-pay .neg { font-weight: 650; }
.pick-pay .amt { white-space: nowrap; }
.pick-pay.two .sep { display: none; }
.pick-pay.two .amt { display: block; }
.pick-mine { display: none; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.pick.a.selected { border-color: var(--side-a); background: var(--side-a-soft); }
.pick.b.selected { border-color: var(--side-b); background: var(--side-b-soft); }
.pick.selected .pick-mine { display: block; }
.pick-hint { display: none; font-size: 11.5px; color: var(--muted); }
.pick.selected .pick-hint { display: block; }
.pick.a.selected .pick-mine { color: var(--side-a); }
.pick.b.selected .pick-mine { color: var(--side-b); }

.card .fine { margin-top: 10px; }

.my-line { margin-top: 12px; font-size: 15px; }
.my-line b { font-weight: 700; }

.names { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.names h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 650; }
.names ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.names li { padding: 1px 0; word-break: break-word; }
.names li.me { font-weight: 700; }

/* ---------- buttons and forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; min-height: 40px;
}
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--brand); }
.btn-lg { padding: 13px 18px; font-size: 16px; border-radius: 12px; min-height: 50px; }
.btn-sm { padding: 6px 10px; font-size: 13.5px; min-height: 34px; border-radius: 9px; }
.btn-danger { color: var(--bad); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

label, .label { font-size: 14px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%; border: 1px solid var(--border); background: var(--card); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.code-input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; text-align: center; font-size: 20px !important; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.field { min-width: 0; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 8px 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }

/* ---------- leaderboard ---------- */

.board { width: 100%; border-collapse: collapse; margin-top: 2px; font-variant-numeric: tabular-nums; }
.board th {
  font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0 3px 8px; text-align: left; white-space: nowrap;
}
.board td { padding: 10px 3px; border-top: 1px solid var(--border); font-size: 14px; }
.board .rank { width: 22px; text-align: center; font-weight: 750; color: var(--muted); }
.board td.name { width: 100%; max-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.board .you { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.board .num { text-align: right; white-space: nowrap; padding-left: 7px; }
.board td.num { color: var(--muted); }
.board td.pts { font-weight: 750; font-size: 15px; color: var(--text); }
.board td.pts.pos { color: var(--good); }
.board td.pts.neg { color: var(--bad); }
.board tr.me td { background: var(--brand-soft); border-top-color: transparent; }
.board tr.me + tr td { border-top-color: transparent; }
.board tr.me td:first-child { border-radius: 10px 0 0 10px; }
.board tr.me td:last-child { border-radius: 0 10px 10px 0; }
/* Notes under the leaderboard: one per line. */
.notes { margin: 12px 0 0; padding-left: 18px; line-height: 1.45; }
.notes li + li { margin-top: 4px; }

input[readonly] { background: var(--bg); color: var(--muted); }
.code-big { font-size: 30px; font-weight: 800; letter-spacing: 0.18em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--good); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
/* Lines only break between whole parts ("ILT20 · Started Tue, Nov 24 at 8:00 PM"),
   and a status tag always gets its own line, so every row looks the same. */
.nw { white-space: nowrap; }
.tag-line { margin: 4px 0 3px; line-height: 1.2; }
.tag-line .badge { margin-left: 0; }
.chip { white-space: nowrap; }
/* Reminders: the question at the top of Matches, and the switch in the menu. */
.card.remind { margin: 8px 0 4px; }
.card.remind p { margin: 0 0 8px; }
.card.remind .btn-row { margin: 0; }
.menu-rem { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#menu-rem { display: contents; }
.card.remind a, .menu-rem a { color: var(--brand); font-weight: 600; }
.badge.grey { background: var(--bg); color: var(--muted); }
.preview { margin-top: 10px; font-size: 14px; }
.preview ul { margin: 6px 0 0; padding-left: 18px; }
.preview .err { color: var(--bad); }

/* ---------- series buttons, admin sections ---------- */

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 8px -16px 2px; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar, .subtabs::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip-btn.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip-btn .fin { font-weight: 500; opacity: 0.75; }

/* Admin sections wrap onto a second line on narrow phones, so all of them show. */
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 4px; }
.subtab { flex: none; border: 0; background: none; padding: 8px 11px; font-weight: 650; font-size: 14px; color: var(--muted); border-radius: 9px; cursor: pointer; white-space: nowrap; }
.subtab.on { background: var(--brand-soft); color: var(--good); }
.subtab .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }

.admin-note { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 14px; }
.card > .admin-note:first-child { margin-top: 0; }
/* Admin lists: one row per match or player, the details line smaller and grey. */
.adm-row { padding: 12px 0; border-top: 1px solid var(--border); }
.adm-row:first-of-type { border-top: 0; padding-top: 0; }
.adm-row .t { font-weight: 650; }
.adm-row .s { font-size: 13px; color: var(--muted); margin-top: 1px; }
.adm-row .btn-row { margin-top: 8px; }
.bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; }
.sel-all { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.adm-row .sel, .sel-all input { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; accent-color: var(--brand); cursor: pointer; flex: none; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; flex-direction: column; gap: 1px; padding: 9px 0; border-top: 1px solid var(--border); }
.activity li:first-child { border-top: 0; padding-top: 0; }
.activity .what { font-size: 14.5px; word-break: break-word; }
.activity .who { font-size: 12.5px; color: var(--muted); }
.series-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.series-row .nm { font-weight: 700; font-size: 17px; min-width: 0; word-break: break-word; }
.series-row .badge { flex: none; }
.series-card .s { font-size: 13.5px; }
.movebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; }
.movebar select { width: auto; flex: 1; min-width: 120px; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.badge.warn { background: var(--warn-soft); color: var(--bad); }
.banner-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.banner { flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 14px 12px; }
.banner-lines { font-size: 15px; }
.banner-top { display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 13px; margin-bottom: -6px; }
.banner-top .link { min-height: 40px; padding: 8px 12px 8px 0; color: var(--brand); text-decoration: none; font-weight: 600; font-size: 14px; }

/* ---------- misc ---------- */

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 15px; font-weight: 550;
  max-width: calc(100vw - 32px); width: max-content; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 50; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 380px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .teams { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Live scores from CricketData, team logos, and the line under your own pick
   while the other team has no bids. */
.tlogo { width: 22px; height: 22px; object-fit: contain; vertical-align: -3px; margin-right: 6px; border-radius: 4px; }
.score { margin: -4px 0 10px; text-align: center; }
.score-line { margin: 0; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.score-status { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.card .score .fine { margin-top: 4px; }
.pick-none { font-size: 11.5px; color: var(--muted); }
.pick-none:empty { display: none; }
.suggest { margin: 8px 0 0; font-size: 14px; }
.link-box { margin-top: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.link-box .label { margin: 0 0 6px; }
.link-opts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.link-opt { text-align: left; white-space: normal; }
.link-opt.on { border-color: var(--good); }
.bad-text { color: var(--bad); }

/* Finished tournaments: winner, fireworks, past tournaments link */
.winner { margin: 8px 0 10px; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(135deg, #fff3c9, #ffe08a); color: #4a3500; font-size: 16px; text-align: center; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.winner-me { margin: 8px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.winner-me + .winner { margin-top: 6px; }
@media (prefers-color-scheme: dark) { .winner { background: linear-gradient(135deg, #4a3a0c, #6b5214); color: #ffe9a6; } }
.past-row { margin: 4px 0 0; }
#fw { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* In between phone and laptop: keep the photo clear of the headline. */
@media (min-width: 430px) and (max-width: 759px) {
  .l-hero { min-height: 540px; }
  .l-art { top: 140px; }
}
@media (min-width: 760px) and (max-width: 1023px) {
  .l-art { opacity: 0.7; }
}

@media (min-width: 760px) {
  .l-art { top: 0; left: auto; right: 0; width: min(100%, 1350px); max-width: none; height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, transparent 30%, rgba(0,0,0,0.04) 34%, rgba(0,0,0,0.14) 38%, rgba(0,0,0,0.3) 43%, rgba(0,0,0,0.52) 48%, rgba(0,0,0,0.76) 53%, rgba(0,0,0,0.93) 58%, #000 63%);
    mask-image: linear-gradient(to right, transparent 0, transparent 30%, rgba(0,0,0,0.04) 34%, rgba(0,0,0,0.14) 38%, rgba(0,0,0,0.3) 43%, rgba(0,0,0,0.52) 48%, rgba(0,0,0,0.76) 53%, rgba(0,0,0,0.93) 58%, #000 63%); }
  .l-art picture { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 1376 / 768; transform: translateX(5.16%); display: block; }
  .l-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: none; }
  .l-art::after { display: block; inset: 0 0 0 auto; width: min(100%, 720px); background-size: auto 100%; background-position: right top; }
}

@media (min-width: 760px) and (max-width: 1119px) {
  .l-art picture { transform: translateX(26%); }
}
