/* The Crockpot: the Jersey Patch look.
   The crest made into a page: cream felt, navy type, rust and gold trim,
   stitched edges. Phone first: organizers fill this in from a group chat,
   one thumb. Light only. Fonts: Bevan (the crest's ribbon caps) for the
   name, Oswald for headings and numbers, Source Sans 3 for everything else. */

:root {
  --bg: #f4e9d4;
  --surface: #fffaf0;
  --surface-2: #efe1c6;
  --border: #d9c3a0;
  --text: #1f2d3d;
  --muted: #6b5a45;
  --accent: #9e3d26;
  --accent-text: #fff6e6;
  --navy: #1f2d3d;
  --gold: #c8923e;
  --cream: #f6e8d0;
  --none: #b9b0a6;
  --none-text: #1f2d3d;
  --invited: #4c6a8a;
  --invited-text: #ffffff;
  --tbd: #c8923e;
  --tbd-text: #1f2d3d;
  --in: #2f6b45;
  --in-text: #ffffff;
  --out: #8a7d72;
  --out-text: #ffffff;
  --ir: #9e3d26;
  --ir-text: #ffffff;
  --goalie: #1f2d3d;
  --goalie-text: #f6e8d0;
  --danger: #c9282e;
  --danger-text: #ffffff;
  --warn-bg: #f8e3bf;
  --warn-text: #6a3d10;
  --shadow: 0 10px 30px rgba(31, 45, 61, 0.18);
  --radius: 14px;
  --font-name: 'Bevan', Georgia, serif;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 var(--font-body);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 12px 16px 32px; }
h1 { font-size: 24px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---- top bar & footer */
.chrome { position: sticky; top: 0; z-index: 20; }
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar img { width: 36px; height: 36px; object-fit: contain; }
.topbar .brand { flex: 1; min-width: 0; line-height: 1.15; }
.topbar .brand strong { display: block; font-size: 17px; }
.topbar .brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
footer.site { text-align: center; padding: 18px 16px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
footer.site a, footer.site button.link { color: var(--muted); }

/* ---- buttons */
button, .btn {
  font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 8px 14px; min-height: 44px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 700; }
button.danger { background: var(--danger); color: var(--danger-text); border-color: transparent; }
button.ghost { background: transparent; border-color: transparent; }
button.link { background: none; border: none; color: var(--accent); padding: 4px; min-height: 0; }
button.block { width: 100%; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- forms */
label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; min-height: 44px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.notice { background: var(--warn-bg); color: var(--warn-text); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }

/* segmented choice: one of a few, big targets */
.seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.seg button { flex: 1; border: none; border-radius: 0; background: transparent; min-height: 40px; padding: 6px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-text); }
.seg.status button[aria-pressed='true'][data-v='none'] { background: var(--none); color: var(--none-text); }
.seg.status button[aria-pressed='true'][data-v='invited'] { background: var(--invited); color: var(--invited-text); }
.seg.status button[aria-pressed='true'][data-v='tbd'] { background: var(--tbd); color: var(--tbd-text); }
.seg.status button[aria-pressed='true'][data-v='in'] { background: var(--in); color: var(--in-text); }
.seg.status button[aria-pressed='true'][data-v='ir'] { background: var(--ir); color: var(--ir-text); }
.seg.status button[aria-pressed='true'][data-v='out'] { background: var(--out); color: var(--out-text); }
.toggle[aria-pressed='true'] { background: var(--goalie); color: var(--goalie-text); border-color: transparent; font-weight: 700; }

/* ---- counts */
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.count { border-radius: var(--radius); padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); }
.count .n { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.count .l { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 4px; }
.count.none { border-top: 5px solid var(--none); }
.count.invited { border-top: 5px solid var(--invited); }
.count.tbd { border-top: 5px solid var(--tbd); }
.count.in { border-top: 5px solid var(--in); }
.count.out { border-top: 5px solid var(--out); }
.count.ir { border-top: 5px solid var(--ir); }
.breakdown { font-size: 14px; color: var(--muted); margin: 6px 2px; }
.breakdown strong { color: var(--text); }

/* ---- add form */
.add { margin: 14px 0; }
.add .line { display: flex; gap: 8px; }
.add .line input { flex: 1; min-width: 0; font-size: 17px; }
.add .opts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.add .opts .seg { flex: 1; min-width: 220px; }

/* ---- list */
.filters { display: flex; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 160px; min-height: 40px; }
.filters .seg { flex: 1 1 260px; min-width: 0; }
.filters .seg button { padding: 6px 4px; }
.players { list-style: none; margin: 8px 0; padding: 0; }
.player {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 6px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-height: 56px;
}
.player .who { flex: 1; min-width: 0; text-align: left; background: none; border: none; padding: 4px 0; min-height: 0; display: block; color: var(--text); }
.player .who .nm { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.player .who .meta { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.player.is-ir .nm { color: var(--muted); }
.player.is-out .nm { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--out); }
.player .seg { flex: 0 0 auto; }
.player .seg button { min-height: 40px; padding: 4px 8px; min-width: 44px; font-size: 13px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: 0.02em; }
.tag.g { background: var(--goalie); color: var(--goalie-text); }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; }
@media (max-width: 720px) {
  .player { flex-wrap: wrap; }
  .player .seg { flex: 1 1 100%; }
}

/* ---- bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg); width: 100%; max-width: 720px; max-height: 94vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow);
}
@media (min-width: 760px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; } }
.sheet .sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sheet .sheet-head h2 { margin: 0; flex: 1; font-size: 20px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions > * { flex: 1; }

/* ---- toast */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 480px); }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 6px solid var(--accent); padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.toast.ok { border-left-color: var(--in); }
.toast.err { border-left-color: var(--danger); }

.add .opts .seg.add-as { flex: 1 1 300px; min-width: 0; }
.player.is-invited .nm, .player.is-tbd .nm { font-style: italic; }
.player.is-none .nm { color: var(--muted); }
@media (max-width: 380px) { .count { padding: 8px; } .count .n { font-size: 24px; } }
textarea {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; min-height: 160px; resize: vertical;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- page tabs */
.pages { display: flex; gap: 4px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pages a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.pages a[aria-current='page'] { color: var(--text); border-bottom-color: var(--accent); }
main.wide { max-width: 1100px; }
button.big { min-height: 60px; font-size: 19px; margin: 16px 0 8px; }

/* ---- draft setup */
.order { list-style: none; margin: 8px 0; padding: 0; }
.order li {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 6px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-height: 56px;
}
.order li.dragging { box-shadow: var(--shadow); border-color: var(--accent); opacity: 0.92; }
.order .handle { cursor: grab; touch-action: none; user-select: none; font-size: 22px; color: var(--muted); padding: 6px 6px; line-height: 1; }
.order .slot { font-weight: 800; font-size: 18px; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.order .team-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; justify-content: flex-start; background: none; border: none; padding: 4px; text-align: left; color: var(--text); }
.order .cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order .moves { display: flex; }
.order .moves button { min-width: 40px; padding: 4px; }
.jersey {
  display: inline-block; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.jersey.big { font-size: 18px; padding: 4px 12px; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatch { font-weight: 700; font-size: 13px; min-height: 44px; border: 2px solid transparent; }
.swatch[aria-pressed='true'] { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- draft board: the podium */
.podium {
  margin: 10px 0 14px; padding: 12px 14px; background: var(--surface);
  border: 2px solid var(--navy); border-left: 10px solid var(--accent); border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--gold);
}
.podium .label { font: 600 12px/1.2 var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.podium .big { font: 400 26px/1.15 var(--font-name); text-transform: uppercase; letter-spacing: 0.02em; color: var(--navy); margin: 6px 0 8px; }
.podium .big .name { color: var(--accent); }
.podium .sub { color: var(--muted); font-size: 14px; margin: 4px 0; }
.podium .deck { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.podium .deck strong { color: var(--text); }
.podium-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.podium-actions > * { flex: 1; min-width: 120px; }
.podium.idle { border-left-color: var(--gold); }
.podium.done { border-left-color: var(--in); }
.podium.done .big { color: var(--in); }
.podium.mine { background: #fff3d6; border-color: var(--gold); border-left-color: var(--gold) !important; animation: podium-glow 1.6s ease-in-out infinite; }
.podium.mine .big { font-size: 34px; color: var(--accent); }
@keyframes podium-glow { 50% { box-shadow: inset 0 0 0 3px #fff3d6, inset 0 0 0 4px var(--gold), 0 0 0 5px rgba(200, 146, 62, 0.35); } }
@media (prefers-reduced-motion: reduce) { .podium.mine { animation: none; } }
.your-turn {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; gap: 12px; align-items: baseline; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow), 0 0 0 3px var(--gold);
  white-space: nowrap;
}
.your-turn strong { font: 400 17px var(--font-name); text-transform: uppercase; letter-spacing: 0.04em; }
.your-turn span { font: 600 13px var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
main.has-turn-bar { padding-bottom: 90px; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); }

/* ---- draft board: tabs */
.subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--navy); margin: 6px 0 12px; }
.subtabs button { border: none; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); font: 600 15px var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 14px; min-height: 42px; }
.subtabs button[aria-selected='true'] { background: var(--navy); color: var(--cream); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.live-grid aside { position: sticky; top: 110px; max-height: calc(100vh - 130px); overflow-y: auto; }
.live-grid aside h2 { margin-top: 0; }
.live-grid aside .team-cards { grid-template-columns: 1fr; }

/* ---- draft board: players */
.players-view h2 { display: flex; align-items: center; gap: 8px; }
.count-pill { font: 600 13px var(--font-head); background: var(--navy); color: var(--cream); border-radius: 999px; padding: 1px 9px; letter-spacing: 0.04em; }
.watch { background: #fff3d6; border: 2px solid var(--gold); border-radius: var(--radius); padding: 2px 12px 8px; margin: 12px 0; }
.watch h2 { color: var(--accent); }
.plist { list-style: none; margin: 6px 0 12px; padding: 0; }
.prow {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin: 6px 0; min-height: 56px;
  background: var(--surface); border: 1.5px solid var(--navy); border-radius: 12px;
}
.prow .rank { min-width: 18px; text-align: center; font: 700 15px var(--font-head); color: var(--accent); }
.prow .star { flex: none; width: 44px; min-height: 44px; padding: 0; font-size: 24px; line-height: 1; background: none; border: none; color: var(--muted); }
.prow .star[aria-pressed='true'] { color: var(--gold); }
.prow .pinfo { flex: 1; min-width: 0; display: block; text-align: left; background: none; border: none; padding: 6px 0; min-height: 0; color: var(--text); }
.prow .pn { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.prow .draft-btn { flex: none; min-height: 40px; padding: 4px 16px; }
.prow.starred { border-color: var(--gold); }
.taken { margin: 14px 0; background: var(--surface-2); border: 1.5px solid var(--navy); border-radius: var(--radius); padding: 4px 12px; }
.taken summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font: 700 18px var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); list-style: none; }
.taken summary::-webkit-details-marker { display: none; }
.taken summary::before { content: '\25B8'; color: var(--accent); }
.taken[open] summary::before { content: '\25BE'; }
.taken h3 { font: 600 13px var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 10px 0 2px; }
.taken ol { list-style: none; margin: 0; padding: 0; }
.taken li { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--border); }
.taken li .no { min-width: 30px; font: 600 13px var(--font-head); color: var(--muted); }
.taken li .pn { font-weight: 700; }
.taken li .by { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.taken li.skip .pn { color: var(--muted); font-style: italic; font-weight: 600; }
.taken li.fresh { background: #fff3d6; border-radius: 6px; }

/* ---- draft board: the full board */
.board-scroll { overflow-x: auto; }
.board { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.board th { font: 600 13px var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; }
.board thead th small { display: block; margin-top: 3px; text-transform: none; letter-spacing: 0; font: 600 13px var(--font-body); color: var(--text); }
.board tbody th, .board thead th:first-child { width: 34px; }
.board tbody th { color: var(--accent); }
.board td { padding: 0; }
.board .cell {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; min-height: 58px;
  padding: 6px 10px; border-radius: 10px; border: 1.5px dashed var(--border); background: var(--surface); text-align: left; color: var(--text);
}
.board .cell small { color: var(--muted); font: 600 11px var(--font-head); letter-spacing: 0.06em; }
.board .cell b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.board td.made .cell { border: 1.5px solid var(--navy); }
.board td.skipped .cell b { color: var(--muted); font-style: italic; font-weight: 600; }
.board td.now .cell { background: #fff3d6; border: 2px solid var(--gold); }
.board td.now .cell b { color: var(--accent); }
.board .cell .go { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ---- draft board: teams */
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.team-cards.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.team-card { background: var(--surface); border: 2px solid var(--navy); border-radius: var(--radius); overflow: hidden; padding-bottom: 8px; }
.team-card.mine { box-shadow: 0 0 0 3px var(--gold); }
.team-card header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 3px solid var(--gold); }
.team-card header strong { font: 400 19px/1.1 var(--font-name); text-transform: uppercase; letter-spacing: 0.03em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.team-card header span { font: 600 12px var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; white-space: nowrap; }
.team-card header .rename { min-height: 32px; padding: 0 6px; font-size: 16px; }
.team-card ol { list-style: none; margin: 0; padding: 0 12px; }
.team-card li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.team-card .row-btn { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; padding: 7px 0; min-height: 40px; background: none; border: none; border-radius: 0; text-align: left; justify-content: flex-start; color: var(--text); }
.team-card button.row-btn:hover { background: var(--surface-2); }
.team-card .no { min-width: 26px; color: var(--muted); font: 600 12px var(--font-head); }
.team-card .pn { font-weight: 700; }
.team-card li.cap .no { color: var(--accent); }
.team-card > p, .team-card > button { margin: 6px 12px 0; }
.tag.ok { background: var(--in); color: var(--in-text); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.controls { margin: 16px 0; }
.controls button { flex: 1; min-width: 140px; }


/* ====================================================== Jersey Patch trim */


/* header: navy band, gold stitch line */
.topbar { background: var(--navy); border-bottom: 0; padding: 8px 16px; }
.topbar img { width: 46px; height: 46px; }
.topbar .brand strong { font-family: var(--font-name); font-weight: 400; font-size: 23px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cream); line-height: 1.1; }
.topbar .brand span { color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-head); font-size: 11px; }
.topbar button.ghost { color: var(--cream); }
.pages { background: var(--navy); border-bottom: 4px solid var(--gold); box-shadow: 0 3px 0 -1px var(--accent); }
.pages a { color: #b8c2cc; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.pages a[aria-current='page'] { color: var(--cream); border-bottom-color: var(--accent); }

h1, h2 {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); font-weight: 700;
}
h1 { font-size: 28px; display: flex; align-items: center; gap: 12px; }
h1::after { content: ''; flex: 1; height: 3px; background: linear-gradient(var(--gold), var(--gold)) top / 100% 1px no-repeat, linear-gradient(var(--gold), var(--gold)) bottom / 100% 1px no-repeat; }

/* stitched cards */
.panel, .player, .order li {
  border: 2px solid var(--navy); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--gold);
}
.player, .order li { box-shadow: none; border-width: 1.5px; }
.count { border: 2px solid var(--navy); border-top-width: 2px; background: var(--surface); text-align: center; box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--gold); }
.count .n { font-family: var(--font-head); font-size: 34px; color: var(--navy); }
.count .l { font-family: var(--font-head); font-weight: 600; letter-spacing: 0.12em; }
.count.none { background: linear-gradient(var(--none), var(--none)) top / 100% 6px no-repeat, var(--surface); }
.count.invited { background: linear-gradient(var(--invited), var(--invited)) top / 100% 6px no-repeat, var(--surface); }
.count.tbd { background: linear-gradient(var(--tbd), var(--tbd)) top / 100% 6px no-repeat, var(--surface); }
.count.in { background: linear-gradient(var(--in), var(--in)) top / 100% 6px no-repeat, var(--surface); }
.count.out { background: linear-gradient(var(--out), var(--out)) top / 100% 6px no-repeat, var(--surface); }
.count.ir { background: linear-gradient(var(--ir), var(--ir)) top / 100% 6px no-repeat, var(--surface); }

button.primary { background: var(--accent); color: var(--accent-text); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; box-shadow: 0 0 0 2px var(--navy); }
.seg { border: 1.5px solid var(--navy); }
.seg button[aria-pressed='true'] { background: var(--navy); color: var(--cream); }
.tag { background: var(--surface-2); color: var(--navy); border: 1px solid var(--border); }
.tag.g { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.player .who .nm { font-weight: 700; }
footer.site { background: var(--navy); color: #b8c2cc; border-top: 4px solid var(--gold); }
footer.site button.link { color: var(--cream); }

/* ---- setup page */
.panel + .panel { margin-top: 14px; }
.panel h2 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
.edit-list { list-style: none; margin: 8px 0; padding: 0; }
.edit-list li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.edit-list input { flex: 1; min-width: 0; }
.teams-2 { gap: 14px; }
.team-edit { border: 1.5px solid var(--navy); border-radius: 12px; padding: 10px; background: var(--bg); }
.team-edit .row { flex-wrap: nowrap; }
.team-edit .colour { flex: none; width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 10px; border: 2px solid var(--navy); font-size: 16px; }
.team-edit .pin-row { margin-top: 10px; justify-content: space-between; }
.swatch.custom { position: relative; display: inline-flex; align-items: center; justify-content: center; margin: 0; border-radius: 10px; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--text); cursor: pointer; border: 2px dashed var(--border); }
.swatch.custom[aria-pressed='true'] { outline: 3px solid var(--accent); outline-offset: 2px; border-style: solid; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
a.btn { color: var(--text); }
a.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; font-weight: 700; }

/* ---- entry: the crest fills the screen, pulses for 3 s, then fades into the site (js/intro.js) */
html.intro body { overflow: hidden; }
/* Until the overlay is in, keep the page from flashing. */
html.intro body:not(:has(#intro)) { background: var(--navy); }
html.intro body:not(:has(#intro)) > * { visibility: hidden; }
#intro {
  display: flex; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #2a3b4f 0%, var(--navy) 70%);
  animation: intro-out 0.6s ease-in 3s forwards; cursor: pointer;
}
#intro img { width: min(72vw, 420px); height: auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55)); animation: intro-pulse 3s ease-in-out both; }
@keyframes intro-pulse {
  0% { transform: scale(0.82); opacity: 0; }
  15% { transform: scale(1); opacity: 1; }
  32% { transform: scale(1.07); }
  48% { transform: scale(0.99); }
  64% { transform: scale(1.07); }
  80% { transform: scale(0.99); }
  100% { transform: scale(1.03); }
}
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  #intro { animation: intro-out 0.4s ease-in 1.2s forwards; }
  #intro img { animation: none; }
}

/* ---- roll call: heading with Copy list */
.list-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; }
.list-head h2 { margin: 0; flex: 1; }
.list-head button { min-height: 40px; }
