/* MWT Picks phone app. Sunset on plum (Waj, 8 Nov): plum and soft white, one glow (pink to orange) for the
   main action, gold for wins and good news.
   Always dark (the founder's choice), whatever the phone's own setting. Mobile-first for 360 to 430 px wide. */
:root {
  --bg: #1E0B24; --surface: #2A1231; --surface-2: #34173C; --border: #46224D;
  --text: #F4E9F2; --muted: #B79AB5; --win: #FFD23D; --danger: #FF9AA8;
  --primary-bg: #FF5A4E; --primary-fg: #2B0A12;   /* the one main action; gold only ever means a win */
  --primary-grad: linear-gradient(100deg, #FF2E7E 0%, #FF7A2E 75%, #FF9A3A 100%);
  --glow: rgba(255, 46, 126, 0.32);
  --boost: #FBBF24; --live: #F43F5E;
  --tab-h: 56px; --radius: 12px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 2px; }
b { font-weight: 600; }

.app {
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 16px);
}
body.has-tabs .app { padding-bottom: calc(var(--safe-b) + var(--tab-h) + 24px); }
.screen { display: flex; flex-direction: column; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 600; min-height: 52px; padding: 0 20px; border-radius: var(--radius); width: 100%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.5; }
.btn-primary { background: var(--primary-grad); color: var(--primary-fg); border-color: transparent; box-shadow: 0 6px 22px var(--glow); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
.btn-small { min-height: 44px; width: auto; padding: 0 16px; }
.icon-btn {
  font: inherit; font-size: 30px; line-height: 1; width: 44px; height: 44px; margin-left: -10px; flex: none;
  border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 22px;
}
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Headings get focus on navigation (app.js focusHeading) so screen readers start there; they are not controls. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---------- welcome ---------- */
.screen-welcome { min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 32px); justify-content: space-between; padding-top: 12vh; }
.welcome { text-align: center; }
.welcome-icon { width: 96px; height: 96px; border-radius: 22px; display: block; margin: 0 auto 20px; }
.welcome-title { font-size: 32px; margin: 0 0 8px; letter-spacing: -0.01em; }
.welcome-tag { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.welcome-sub { color: var(--muted); margin: 0 auto; max-width: 300px; }
.welcome-league { margin: 14px auto 0; max-width: 320px; padding: 10px 14px; border-radius: 12px; background: var(--panel, rgba(255,255,255,.06)); font-weight: 600; }
.stack-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 32px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin: 8px 0 0; }
/* Links in small print still get a 44 px tall tap target; the negative margin keeps the sentence
   tight, so a full stop after a link never floats away from it ("BeGambleAware ."). */
.fine a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: 0 -6px; }
.fine a.tail { padding-right: 0; margin-right: 0; }   /* a link that ends a sentence keeps its full stop next to it */

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.bar-title { font-size: 22px; margin: 0; flex: 1; }
.chip { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.chip:empty { display: none; }   /* no empty pill in a header while there is nothing to say */
.muted { color: var(--muted); }
.small { font-size: 14px; }
.win { color: var(--win) !important; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; }
.field small { color: var(--muted); font-weight: 400; }
input[type=email], input[type=password], input[type=text], input[type=search] {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in */ min-height: 50px; padding: 0 14px; width: 100%;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
input:focus { outline: none; border-color: var(--text); }
.check { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--text); }
.form-error { margin: 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--danger); color: var(--danger); font-size: 15px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; min-width: 0; }
.form-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); min-height: 0; }
.form-note:empty { display: none; }
.form-title { font-size: 20px; margin: 0; }

/* ---------- lists ---------- */
.search input { background: var(--surface-2); }
.search input:focus { outline: 2px solid var(--text); outline-offset: 2px; border-color: var(--text); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fixture {
  font: inherit; color: var(--text); text-align: left; width: 100%; min-height: 64px; padding: 12px 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: center; gap: 2px; touch-action: manipulation;
}
.fixture:active { background: var(--surface-2); }
.fixture-teams { font-weight: 600; font-size: 17px; }
.fixture-when { font-size: 14px; color: var(--muted); }
.fixture-when.is-live { color: #FDA4AF; font-weight: 600; }
.fixture-when.is-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: var(--live, #F43F5E); vertical-align: 1px; }
.empty { color: var(--muted); text-align: center; margin: 24px 0; }
.banner { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 15px; }

/* ---------- panels (history, settings) ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.panel-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
/* A folded panel (Bonuses, Friend leagues): one row, tap to open. Extras stay out of the way until wanted. */
.fold-btn { width: 100%; font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; touch-action: manipulation; min-height: 44px; }
/* The arrow alone turns (a space inside the turning box swung it onto the last letter when open, 7 Nov). */
.fold-btn .fold-sum::after { content: '›'; display: inline-block; margin-left: 0.3em; transition: transform 0.2s ease; }
.fold-btn[aria-expanded="true"] .fold-sum::after { transform: rotate(90deg); }
.fold-body { margin-top: 10px; }
.fold-body .sub { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 10px; }
.fold-body .sub:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.panel p { margin: 0; }
#t-locked { display: block; }   /* one sentence, not three flex rows */
#t-tonight > .panel-row { flex-wrap: wrap; }   /* phones: the note drops under the title instead of squeezing it */
#t-tonight > .panel-row > :first-child { white-space: nowrap; }
.vs { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.vs b { display: block; font-size: 28px; }
.vs span { font-size: 13px; color: var(--muted); }
.chart { width: 100%; height: 80px; display: block; }
.chart path { fill: none; stroke: var(--text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart .chart-area { fill: rgba(255, 255, 255, 0.06); stroke: none; }
.pick { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pick-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-q { font-weight: 600; }
.pick-meta { font-size: 13px; color: var(--muted); }
.pick-profit { font-weight: 600; font-size: 17px; white-space: nowrap; color: var(--muted); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.toggle input {
  -webkit-appearance: none; appearance: none; width: 52px; height: 32px; border-radius: 16px; margin: 0; flex: none;
  background: var(--border); position: relative; cursor: pointer; transition: background 0.2s;
}
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: var(--text); transition: transform 0.2s, background 0.2s; }
.toggle input:checked { background: var(--text); }
.toggle input:checked::after { transform: translateX(20px); background: var(--bg); }
/* The folded rows (Bonuses, Friend leagues) are a full 44 px thumb target, text centred in the row. */
.fold-btn { min-height: 44px; align-items: center; }
/* "Tonight's table" stays on one line; the note beside it wraps instead. */
#t-tonight > .panel-row > span:first-child { flex: none; }
#t-tonight > .panel-row > span:last-child { text-align: right; }
.confirm { display: flex; flex-direction: column; gap: 10px; }

/* ---------- live: see css/live.css ---------- */

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex;
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: var(--bg); border-top: 1px solid var(--border);
}
.tabbar button {
  flex: 1; height: var(--tab-h); font: inherit; font-size: 14px; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; cursor: pointer; touch-action: manipulation;
}
.tabbar button[aria-current="page"] { color: var(--text); font-weight: 700; }
/* The "N open" badge hangs under the label without moving it, so all four labels stay on one line. */
.tabbar button { position: relative; }
.tabbar .tab-badge { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); margin: 0; padding: 0 6px; font-size: 11px; line-height: 16px; white-space: nowrap; }

@media (min-width: 481px) { .tabbar { max-width: 480px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.who { overflow-wrap: anywhere; }
.who:empty { display: none; }
#sync-state:empty { display: none; }


/* Top 10 and invites (js/top.js) */
.board { gap: 6px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.board-row.you { border-color: var(--text); }
.board-rank { width: 24px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.board-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.board-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-badges { font-weight: 500; }
.season-badge { margin-left: 6px; font-size: 12px; color: #FBBF24; white-space: nowrap; }
#t-you-badges .season-badge:first-child { margin-left: 0; }
.board-meta { font-size: 13px; color: var(--muted); }
.board-pts { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.invite-link { font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; user-select: all; }
.invite-note { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 15px; }

/* Feedback form (Settings) */
select, textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 12px 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); -webkit-appearance: none; appearance: none;
}
select { min-height: 50px; }
textarea { resize: vertical; min-height: 110px; }
select:focus, textarea:focus { outline: none; border-color: var(--text); }

/* Your picks on a real match (js/app.js renderPicks) */
.my-picks { margin-top: 14px; text-align: left; }
.my-picks-title { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.my-picks-title .muted { font-weight: 400; margin-left: 6px; }   /* "Tonight's table" and its player count read as two things */
.my-picks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.my-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.my-pick-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.my-pick-q { font-weight: 600; font-size: 15px; }
.my-pick-meta { font-size: 13px; color: var(--muted); }
.my-pick-res { font-weight: 600; font-size: 15px; white-space: nowrap; color: var(--muted); }
.my-pick.open .my-pick-res { font-weight: 500; }
/* Cash out on an open pick (js/cashout.js): outlined violet; tapped once it fills in and asks "Take N pts?" */
.my-pick-cash { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--primary-bg); background: transparent; color: var(--primary-bg); cursor: pointer; touch-action: manipulation; }
.my-pick-cash.confirm { background: var(--primary-grad); color: var(--primary-fg); }
/* No offer right now: a quiet status line, not an outlined button that does nothing when tapped. */
.my-pick-cash:disabled { border-color: transparent; color: var(--muted); font-weight: 500; cursor: default; }
.my-pick.cashed .my-pick-res { color: var(--text); }

/* Remind me on upcoming real matches (js/remind.js) */
.list li.has-remind { display: flex; gap: 8px; align-items: stretch; }
.list li.has-remind .fixture { flex: 1; min-width: 0; }
.remind { font: inherit; font-size: 14px; font-weight: 600; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.remind:disabled { color: var(--muted); cursor: default; }
/* Notify me during this match (PlayRemind.followButton) */
.follow-btn { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; touch-action: manipulation; }
.follow-btn[aria-pressed="true"] { border-color: var(--primary-bg); color: var(--text); }
.follow-btn:disabled { color: var(--muted); cursor: default; }
.share-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; margin-left: 8px; border-radius: 999px;
  border: 1px solid var(--win); color: var(--win); background: transparent; cursor: pointer; white-space: nowrap; min-height: 44px; }
.share-btn:disabled { opacity: 0.5; }
.age-gate { margin-top: 16px; }

/* Match list sections (app.js renderFixtures) */
.list-head { font-size: 14px; font-weight: 600; color: var(--muted); margin: 8px 0 0; }

/* Settings groups: a small heading over each set of panels */
.set-group { display: flex; flex-direction: column; gap: 12px; }
.set-head { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 10px 2px -4px; }
.none-live { font-size: 15px; }
.tip { display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.tip span { flex: 1; }
.tip-x { font: inherit; font-size: 22px; line-height: 1; width: 44px; height: 44px; flex: none; border: 0; border-radius: 22px;
  background: transparent; color: var(--muted); cursor: pointer; }
.empty-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-box .empty { margin: 16px 0 8px; }

/* Full-time summary on the live screen */
.ft { margin-top: 12px; text-align: left; }

/* Toast (js/notices.js): at the top so it never covers a card; taps go through it. Empty means hidden.
   Neutral by default, like the win banner's shell: violet stays the one main action, green only ever
   means a win and a lost pick stays grey. */
.toast {
  position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 8px); z-index: 20; pointer-events: none;
  max-width: 448px; margin: 0 auto; width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--radius);
  background: var(--primary-grad); color: var(--primary-fg); font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.toast[data-tone="win"] { border-color: var(--win); color: var(--win); box-shadow: 0 8px 30px rgba(74, 222, 128, 0.22); }
.toast[data-tone="loss"] { color: var(--muted); }
.toast:empty { display: none; }
.tab-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text); }
.bonus-info { gap: 6px; }
.bonus-info b { color: var(--text); }
.bonus-info .founders-note b { color: #FFB3C9; }

/* First-time tour (js/tour.js) */
.tour { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.7); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.tour-box { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center; animation: tour-in 0.3s ease; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--border); }
.tour-dots span.on { width: 18px; background: #FF2E7E; }
.tour-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.tour-title { font-size: 20px; margin: 0 0 6px; outline: none; }
.tour-text { color: var(--muted); margin: 0 0 18px; font-size: 16px; line-height: 1.4; }
.tour-row { display: flex; gap: 8px; justify-content: space-between; }
.tour-row .btn-primary { flex: 1; }
.tour-paces { display: flex; flex-direction: column; gap: 8px; }
.tour-pace { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; min-height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: inherit; font: inherit; text-align: left; }
.tour-pace span { color: var(--muted); font-size: 14px; }
.tour-pace.on { border-color: #FF2E7E; }
.tour-pace:active { transform: scale(0.98); }
@keyframes tour-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tour-box { animation: none; } }

/* Founder's Club and quests (js/top.js) */
.founder { display: flex; align-items: center; gap: 12px; }
.founder-badge { flex: none; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid #FF2E7E; color: #FFB3C9; background: rgba(255, 46, 126, 0.12); }
.quests { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.quest { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.quest-title { font-size: 15px; }
.quest-pts { font-weight: 700; color: #FFB3C9; }
.quest-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.quest-fill { display: block; height: 100%; background: #FF2E7E; }
.quest-count { font-size: 13px; color: var(--muted); }
.quest.done .quest-title { color: var(--muted); }
.quest.done .quest-fill { background: var(--primary-grad); }
/* Game-style spotlight: the dim comes from the spotlight's huge shadow, so the control itself stays lit. */
.tour.lit { background: transparent; align-items: flex-start; }
.tour-spot { display: none; position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 2px #FF2E7E, 0 0 24px rgba(255, 46, 126, 0.6); transition: all 0.3s ease; pointer-events: none; }
.tour.lit .tour-spot { display: block; }
.tour.lit .tour-box { position: fixed; left: 16px; right: 16px; width: auto; max-width: none; margin: 0 auto; padding-bottom: 20px; text-align: left; }
.tour.lit .tour-dots { justify-content: flex-start; }
/* Guided first pick: the dim and the light let every tap through, so the card stays pickable */
.tour.guide { background: transparent; pointer-events: none; }
.tour.guide .tour-box { pointer-events: auto; }

/* Win banner (js/win.js): slides in at the top on any screen; Share on a big win. Void is neutral grey. */
.win-banner { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 8px); z-index: 40; max-width: 448px; width: calc(100% - 32px);
  margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 4px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--win); box-shadow: 0 8px 30px rgba(255, 210, 61, 0.22); transform: translateY(calc(-100% - 24px)); opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease; }
.win-banner.in { transform: none; opacity: 1; }
.win-banner.void { border-color: var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.win-banner-text { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; text-align: left; overflow: hidden; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; cursor: pointer; }
.win-banner.void .win-banner-text { color: var(--muted); font-weight: 500; }
.win-banner .btn { width: auto; min-height: 44px; padding: 0 14px; flex: none; }
@media (prefers-reduced-motion: reduce) { .win-banner { transform: none; transition: none; } }
body.touring .toast { display: none; }
.hot { margin: 8px 0 0; font-weight: 700; color: #FDBA74; }
/* Tablet and desktop: a panel's main button is sized to its words, not a 600-760 px bar across the column. */
@media (min-width: 700px) {
  #s-top .panel > .btn, #s-settings .panel > .btn { width: auto; min-width: 240px; align-self: flex-start; }
  #s-history .empty-box > .btn { width: auto; min-width: 240px; }
}

/* Friend leagues (js/leagues.js) */
.leagues { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.league { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.league-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; min-height: 48px;
  border: 0; background: var(--surface-2); color: inherit; font: inherit; text-align: left; }
.league-name { font-weight: 600; }
.league-board { list-style: none; margin: 0; padding: 4px 12px; }
.league-board li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.league-board li.you { color: #FFB3C9; font-weight: 600; }
.league-actions { padding: 8px 12px 12px; gap: 8px; flex-wrap: wrap; }
.lg-form { display: flex; gap: 8px; margin-top: 8px; }
.lg-form input { flex: 1; min-width: 0; }

/* Weekend 6 (js/w6.js) */
.w6-banner { display: block; width: 100%; text-align: left; border: 1px solid #FF2E7E; background: rgba(255, 46, 126, 0.12); color: var(--text); font: inherit; cursor: pointer; }
.w6-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.w6-match { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.w6-teams { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w6-score { display: flex; align-items: center; gap: 6px; }
.w6-goals { min-width: 52px; min-height: 44px; font-size: 18px; text-align: center; }
.w6-pts { grid-column: 1 / -1; font-weight: 700; color: var(--muted); }
.w6-pts.win { color: var(--win); }

/* Password boxes with a show/hide eye; account settings (js/account-ui.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 52px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 44px; min-height: 44px; border: 0; background: transparent;
  color: var(--muted); font-size: 18px; cursor: pointer; opacity: 0.6; }
.pw-eye.on { opacity: 1; color: #FFB3C9; }
.acct-more { margin-top: 10px; border-top: 1px solid var(--border); }
/* display:flex drops the default marker, so these rows looked like headings: give them their own chevron. */
.acct-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; list-style: none; }
.acct-more summary::-webkit-details-marker { display: none; }
.acct-more summary::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 22px; line-height: 1;
  transform: rotate(90deg); transition: transform 0.15s ease; }
.acct-more[open] summary::after { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .acct-more summary::after { transition: none; } }
.form-note.bad { color: var(--danger); }

/* Won/lost totals on History (js/screens.js drawTotals) */
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.total { display: flex; flex-direction: column; gap: 2px; }
.total b { font-size: 26px; font-variant-numeric: tabular-nums; }
.total b.win { color: var(--win); }
.total b.loss { color: var(--muted); }
#m-ft-line.win { color: var(--win); font-weight: 700; }

/* Continue with Google and the name step */
.btn-google { gap: 10px; }
.g-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4285F4; font-weight: 800; font-size: 14px; }
.name-gate { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.72); }
.name-gate[hidden] { display: none; }
.name-gate .panel { width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; }
.ng-title { margin: 0 0 4px; font-size: 22px; }
body.gate-open { overflow: hidden; }
/* Tonight's table on the match screen and the league lines at full time (js/tables.js). */
.match-table { padding: 0; }
.match-table li { grid-template-columns: 28px 1fr auto; }
#m-table-sum { font-weight: 400; }
#m-table-sum:not(:empty)::before { content: "· "; }   /* "Tonight's table · 2 players in this match", not one run-on line */
.ft-leagues:empty { display: none; }
.ft-league { margin: 6px 0; font-weight: 600; }
.ft-leagues .btn { margin: 4px 0 8px; }
.league-head.is-static { cursor: default; }
.league-last { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: 14px; }

