/* Dynasty Soccer — shared page styles (layered on top of /style-lab.css) */
/* Accent defaults to the lab green; club themes override these on <body data-club>. */
:root { --accent: var(--dos-green); --accent-glow: var(--dos-glow); --accent-border: rgba(51,255,51,0.4); --accent-soft: rgba(51,255,51,0.06); --accent-ink: #0c0e12; }
.wrap { width: min(960px, 100% - 48px); margin: 48px auto; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head h1 { margin: 0; font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; }
.head h1 span { font-size: 1.4rem; margin-right: 10px; }
.crumbs { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 10px; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text-main); }
.status { font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-dim); }
.status.ok { color: var(--accent); border-color: var(--accent-border); box-shadow: 0 0 12px var(--accent-glow); }
.status.err { color: #ff6b6b; border-color: rgba(255,107,107,0.4); }
.card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.card h2 { margin: 0 0 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--text-dim); font-weight: 600; }
.meta { color: var(--text-dim); font-size: 0.9rem; margin-top: 8px; }
.empty { color: var(--text-dim); padding: 16px 0; }
.hint { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }
.hint code, .empty code { color: var(--accent); font-family: "Perfect DOS VGA 437", ui-monospace, monospace; }
.back { display: inline-block; margin-top: 8px; color: var(--text-dim); text-decoration: none; font-size: 0.85rem; }
.back:hover { color: var(--text-main); }

/* roster table */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--glass-border); }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); font-weight: 600; }
td.num { width: 60px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* hub: season groups + team cards */
.season { margin-bottom: 32px; }
.season h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--text-dim); font-weight: 600; margin: 0 0 12px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.team-card { display: block; text-decoration: none; color: var(--text-main); background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 14px; padding: 20px 22px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.team-card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: 0 0 18px var(--accent-glow); }
.team-card .name { font-size: 1.25rem; font-weight: 600; margin: 0 0 6px; }
.team-card .sub { color: var(--text-dim); font-size: 0.85rem; }
.team-card .count { margin-top: 12px; font-size: 0.8rem; color: var(--accent); }
.team-card.inactive { opacity: 0.55; }

/* schedule */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.chip { font: inherit; font-size: 0.85rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--glass-border); background: transparent; color: var(--text-dim); cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text-main); border-color: rgba(255,255,255,0.3); }
.chip.on { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
.filters .spacer { flex: 1; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-dim); cursor: pointer; }
.toggle input { accent-color: var(--accent); }
table.schedule td { vertical-align: top; }
table.schedule td.date { white-space: nowrap; width: 110px; }
table.schedule td.time { white-space: nowrap; color: var(--text-dim); width: 150px; font-variant-numeric: tabular-nums; }
table.schedule td.team a { color: var(--text-main); text-decoration: none; border-bottom: 1px dotted var(--text-dim); }
table.schedule td.loc, table.schedule td.notes { color: var(--text-dim); }
table.schedule td.loc, table.schedule td.team { white-space: nowrap; }
table.schedule tr.past { opacity: 0.4; }
table.schedule tr.next td { background: var(--accent-soft); }
table.schedule tr.next td.date { color: var(--accent); font-weight: 600; }
table.schedule tr.today td.date::after { content: ' · today'; color: var(--accent); font-size: 0.75rem; }
.pill { display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--glass-border); color: var(--text-dim); }
.pill.game { color: #ffd166; border-color: rgba(255,209,102,0.4); }
.pill.training_game { color: #7ad0ff; border-color: rgba(122,208,255,0.4); }
.pill.practice { color: var(--text-dim); }
.pill.bye { color: #ff9b9b; border-color: rgba(255,155,155,0.35); }
.opp { margin-left: 6px; }

/* coach mode */
.head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coach-badge { font-size: 0.8rem; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.pin-form { display: flex; align-items: center; gap: 8px; }
.pin-form input { width: 90px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--glass-border); background: #12151b; color: var(--text-main); font: inherit; letter-spacing: 4px; text-align: center; }
.pin-msg { font-size: 0.8rem; color: #ff6b6b; }
.chip.small { padding: 3px 10px; font-size: 0.75rem; }
.chip.danger { color: #ff9b9b; border-color: rgba(255,155,155,0.35); }
table.roster select, table.roster input.pos { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--glass-border); background: #12151b; color: var(--text-main); font: inherit; font-size: 0.9rem; }
table.roster input.pos { width: 70px; text-transform: uppercase; }
table.roster select.skill { width: 60px; }
table.roster td.pname { white-space: nowrap; }
table.roster .saved { margin-left: 8px; font-size: 0.75rem; color: var(--accent); }
table.roster td.note-cell { max-width: 320px; }
table.roster .latest { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 4px; }
.dim { color: var(--text-dim); }
tr.notes-row > td { padding: 0 8px 14px; background: rgba(255,255,255,0.02); }
.notes-panel { padding: 12px 4px 0; }
.note-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.note-form textarea { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: #12151b; color: var(--text-main); font: inherit; font-size: 0.9rem; resize: vertical; }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--glass-border); font-size: 0.9rem; }
.note-list .when { color: var(--accent); white-space: nowrap; font-size: 0.8rem; min-width: 90px; }
.note-list .text { flex: 1; white-space: pre-wrap; }
.del { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 4px; }
.del:hover { color: #ff6b6b; }

/* scores + results */
.score { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--glass-border); font-variant-numeric: tabular-nums; white-space: nowrap; }
.score.live { color: #ffd166; border-color: rgba(255,209,102,0.5); animation: pulse 1.6s infinite; }
.score.final.W { color: var(--accent); border-color: var(--accent-border); }
.score.final.L { color: #ff9b9b; border-color: rgba(255,155,155,0.4); }
.score.final.T { color: var(--text-dim); }
.score-link { text-decoration: none; margin-left: 8px; }
.score-link.start { font-size: 0.75rem; color: var(--accent); border: 1px dashed var(--accent-border); padding: 2px 8px; border-radius: 6px; }
@keyframes pulse { 50% { opacity: 0.55; } }
.record { margin-left: 10px; color: var(--accent); letter-spacing: 1px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { border-top: 1px solid var(--glass-border); }
.results li:first-child { border-top: none; }
.results a { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; padding: 10px 0; color: var(--text-main); text-decoration: none; }
.results .scorers { color: var(--text-dim); font-size: 0.85rem; }
.results .empty { padding: 8px 0; }

/* match page */
.scoreboard .teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; text-align: center; }
.scoreboard .tname { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); margin-bottom: 6px; }
.scoreboard .big { font-size: 4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.scoreboard .side.us .big { color: var(--accent); text-shadow: 0 0 18px var(--accent-glow); }
.scoreboard .period { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); }
.scoreboard .clock { font-size: 2.4rem; font-weight: 600; font-variant-numeric: tabular-nums; font-family: "Perfect DOS VGA 437", ui-monospace, monospace; letter-spacing: 2px; }
.scoreboard .clock.running { color: var(--accent); }
.scoreboard .clock.over { color: #ffd166; }
.controls { margin-top: 20px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.big-btn { font: inherit; font-weight: 600; font-size: 1rem; padding: 14px 22px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-main); cursor: pointer; flex: 1; min-width: 140px; transition: all .15s; }
.big-btn:hover { border-color: rgba(255,255,255,0.3); }
.big-btn.go { color: var(--accent); border-color: var(--accent-border); box-shadow: 0 0 14px var(--accent-glow); }
.big-btn.goal.us { color: var(--accent); border-color: var(--accent-border); font-size: 1.1rem; padding: 18px 22px; }
.big-btn.goal.them { color: #ff9b9b; border-color: rgba(255,155,155,0.4); font-size: 1.1rem; padding: 18px 22px; }
.sheet .field-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.sheet label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-dim); }
.sheet select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: #12151b; color: var(--text-main); font: inherit; min-width: 200px; }
.sheet .toggle { flex-direction: row; margin-bottom: 12px; }
.goal-list { list-style: none; margin: 0; padding: 0; }
.goal-list li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--glass-border); flex-wrap: wrap; }
.goal-list li:first-child { border-top: none; }
.goal-list .gtime { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 0.85rem; min-width: 80px; }
.goal-list .gside { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; min-width: 110px; }
.goal-list li.us .gside { color: var(--accent); }
.goal-list li.them .gside { color: #ff9b9b; }
.goal-list .gwho { flex: 1; }
@media (max-width: 600px) {
  .scoreboard .big { font-size: 3rem; }
  .scoreboard .clock { font-size: 1.8rem; }
}

/* practice planner links + tool cards */
.practice-links a { text-decoration: none; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 32px; }
.team-card .name .crest { vertical-align: -6px; }

/* ---------------------------------------------------------------- lineup builder */
.setup-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.setup-row label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-dim); flex: 1; min-width: 200px; }
.setup-row select, .setup-row input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--glass-border); background: #12151b; color: var(--text-main); font: inherit; }

.pitch-wrap { display: flex; justify-content: center; }
.pitch { width: 100%; max-width: 520px; }
.pitch-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pitch-svg .turf { fill: #12341c; }
.pitch-svg .stripe { fill: rgba(255,255,255,0.022); }
.pitch-svg .line, .pitch-svg .line-box { fill: none; stroke: rgba(255,255,255,0.32); stroke-width: 0.5; }
.pitch-svg .dot { fill: rgba(255,255,255,0.32); }
.pitch-svg .goal-label { fill: var(--text-dim); font-size: 3.4px; text-anchor: middle; text-transform: uppercase; letter-spacing: 0.6px; }

.pitch-svg .slot { cursor: pointer; }
.pitch-svg .slot .bubble { fill: #0c0e12; stroke: rgba(255,255,255,0.35); stroke-width: 0.6; transition: all .15s; }
.pitch-svg .slot.filled .bubble { fill: var(--accent); stroke: #fff; stroke-width: 0.7; }
.pitch-svg .slot.open .bubble { stroke-dasharray: 1.6 1.4; }
.pitch-svg .slot .ini { fill: var(--text-dim); font-size: 5.4px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.pitch-svg .slot.filled .ini { fill: var(--accent-ink, #0c0e12); }
.pitch-svg .slot .pos { fill: rgba(255,255,255,0.8); font-size: 3.6px; font-weight: 600; text-anchor: middle; letter-spacing: 0.4px; }
.pitch-svg .slot .who { fill: #fff; font-size: 3.5px; text-anchor: middle; }
/* dark halo so labels stay readable over pitch markings */
.pitch-svg .slot .pos, .pitch-svg .slot .who {
  paint-order: stroke; stroke: rgba(0,0,0,0.8); stroke-width: 1.3px; stroke-linejoin: round;
}
.pitch-svg .slot:hover .bubble, .pitch-svg .slot:focus .bubble { stroke: #fff; r: 8.1; }
.pitch-svg .slot.targetable.open .bubble { stroke: var(--accent); stroke-dasharray: none; }
.pitch-svg .slot:focus { outline: none; }

.bench { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; cursor: pointer; }
.player-chip .ini-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text-main); font-size: 0.75rem; font-weight: 700; }
.player-chip .pc-name { color: var(--text-main); }
.player-chip .pc-pos { font-size: 0.72rem; letter-spacing: 1px; color: var(--accent); }
.player-chip .pc-skill { font-size: 0.7rem; color: var(--text-dim); border: 1px solid var(--glass-border); border-radius: 4px; padding: 1px 5px; }
.player-chip.picked { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 14px var(--accent-glow); }
.player-chip.picked .ini-badge { background: var(--accent); color: var(--accent-ink, #0c0e12); }

table.roster select.pos { width: 92px; }
@media (max-width: 600px) {
  .setup-row label { min-width: 100%; }
  .pitch-svg .slot .who { display: none; }
}
.filters a.chip { text-decoration: none; }

/* ---------------------------------------------------------------- practice planner */
.block-label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 12px; }
.block-label textarea, .plan-item textarea {
  width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; font-size: 0.9rem; resize: vertical;
}
.planner-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }

.plan-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.plan-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--glass-border); }
.plan-item:first-child { border-top: none; }
.plan-item .bnum { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.plan-item.text .bnum { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.plan-item .bmain { flex: 1; min-width: 0; }
.plan-item .bhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.plan-item .bt { font-weight: 600; }
.plan-item .bt-input { flex: 1; min-width: 140px; padding: 6px 9px; border-radius: 6px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; font-weight: 600; }
.plan-item .mins { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
.plan-item .mins input { width: 54px; padding: 5px 6px; border-radius: 6px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; font-size: 0.85rem; text-align: right; }
.plan-item .bsum { margin: 0 0 6px; color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; }
.plan-item .bmeta { margin: 6px 0 0; color: var(--text-dim); font-size: 0.8rem; line-height: 1.5; }
.plan-item .bmeta a { color: var(--accent); }
.plan-item .mini.warn { color: #ff9b9b; border-color: rgba(255,155,155,0.4); }
.plan-item .bctl { display: flex; flex-direction: column; gap: 4px; flex: none; }
.plan-item .bctl button { width: 28px; height: 26px; border-radius: 6px; border: 1px solid var(--glass-border);
  background: transparent; color: var(--text-dim); cursor: pointer; font-size: 0.9rem; line-height: 1; }
.plan-item .bctl button:hover:not(:disabled) { color: var(--text-main); border-color: rgba(255,255,255,0.3); }
.plan-item .bctl button:disabled { opacity: 0.25; cursor: default; }
.plan-item .bctl button[data-act="del"]:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.5); }

.tools-mini { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; margin-bottom: 10px; }
.tools-mini input, .tools-mini select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; font-size: 0.9rem; }
.quick-mini { gap: 6px; margin-bottom: 6px; }
.quick-mini .chip { padding: 4px 10px; font-size: 0.78rem; }
.browse-list { max-height: 620px; overflow-y: auto; padding-right: 4px; }
.browse-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--glass-border); }
.browse-item:first-child { border-top: none; }
.browse-item h3 { margin: 0 0 4px; font-size: 0.98rem; }
.browse-item p { margin: 0 0 6px; color: var(--text-dim); font-size: 0.86rem; line-height: 1.45; }
.add-btn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--accent-border);
  background: var(--accent-soft); color: var(--accent); font-size: 1.15rem; line-height: 1; cursor: pointer; transition: all .15s; }
.add-btn:hover { background: var(--accent); color: var(--accent-ink, #0c0e12); }
.mini { display: inline-flex; align-items: center; min-height: 22px; border: 1px solid var(--glass-border); border-radius: 6px;
  padding: 2px 7px; color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }
.mini.level-beginner { color: var(--accent); border-color: var(--accent-border); }
.mini.level-advanced { color: #7ad0ff; border-color: rgba(122,208,255,0.4); }
.mini.level-expert { color: #ffd166; border-color: rgba(255,209,102,0.4); }

@media (max-width: 900px) { .planner-cols { grid-template-columns: 1fr; } .browse-list { max-height: 420px; } }

/* ---------------------------------------------------------------- printed plan */
.print-doc { display: none; }
.print-doc .paper { background: #fff; color: #111; padding: 0; }
.print-doc .doc-title { font-size: 17pt; font-weight: 800; }
.print-doc .doc-sub { font-size: 10pt; color: #555; margin-top: 2mm; }
.print-doc .doc-head { border-bottom: 2px solid #111; padding-bottom: 3mm; margin-bottom: 4mm; }
.print-doc .doc-notes { font-size: 10pt; color: #333; margin: 0 0 5mm; padding: 3mm; border-left: 3px solid #bbb; background: #f6f6f6; }
.print-doc .doc-table { width: 100%; border-collapse: collapse; }
.print-doc .doc-table th { text-align: left; font-size: 8pt; text-transform: uppercase; letter-spacing: 1px; color: #666;
  border-bottom: 1px solid #999; padding: 0 2mm 1.5mm; }
.print-doc .doc-table td { border-bottom: 1px solid #ddd; padding: 2.5mm 2mm; vertical-align: top; font-size: 10pt; page-break-inside: avoid; }
.print-doc .pn { width: 8mm; color: #888; font-weight: 700; }
.print-doc .pm { width: 16mm; color: #111; font-weight: 600; white-space: nowrap; }
.print-doc .pk { width: 10mm; }
.print-doc tbody .pk::after { content: ''; display: block; width: 5mm; height: 5mm; border: 1px solid #999; border-radius: 1px; }
.print-doc .pt { font-weight: 700; margin-bottom: 1mm; }
.print-doc .doc-table p { margin: 0 0 1.5mm; line-height: 1.4; }
.print-doc .pnote { color: #111; }
.print-doc .pmeta { font-size: 8.5pt; color: #555; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { background: #fff !important; }
  body { display: block; }
  .no-print, .team-band, .back { display: none !important; }
  .wrap { width: 100%; margin: 0; padding: 0; }
  .print-doc { display: block; }
  #builder .card { display: none; }
}
.browse-item.in-plan { opacity: 0.72; }
.browse-item.in-plan .add-btn { background: transparent; }
.in-badge { margin-left: 8px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent);
  border: 1px solid var(--accent-border); border-radius: 5px; padding: 1px 6px; vertical-align: middle; font-weight: 600; }

/* ---------------------------------------------------------------- attendance grid */
/* Tiles are 4-up on a phone and never smaller than Apple's 44pt minimum target;
   at 375px wide that lands each tile around 82x92, comfortable with a glove on. */
.att-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.att-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 92px; padding: 10px 4px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  color: var(--text-main); font: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
  transition: background .18s, border-color .18s, opacity .18s, transform .12s;
}
.att-tile:active { transform: scale(0.95); }
.att-ini {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.5px;
  background: rgba(255,255,255,0.08); color: var(--text-main);
}
.att-nm { font-size: 0.74rem; line-height: 1.15; text-align: center; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-state { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }

.att-tile.in { border-color: var(--accent-border); background: var(--accent-soft); }
.att-tile.in .att-ini { background: var(--accent); color: var(--accent-ink, #0c0e12); }
.att-tile.in .att-state { color: var(--accent); }

.att-tile.maybe { border-color: rgba(255,209,102,0.5); background: rgba(255,209,102,0.08); }
.att-tile.maybe .att-ini { background: #ffd166; color: #0c0e12; }
.att-tile.maybe .att-state { color: #ffd166; }

.att-tile.out { opacity: 0.45; border-color: rgba(255,107,107,0.35); background: transparent; }
.att-tile.out .att-ini { background: rgba(255,107,107,0.18); color: #ff9b9b; }
.att-tile.out .att-nm { text-decoration: line-through; }
.att-tile.out .att-state { color: #ff6b6b; }

@media (min-width: 700px) {
  .att-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .att-tile { min-height: 104px; }
  .att-ini { width: 44px; height: 44px; font-size: 0.95rem; }
  .att-nm { font-size: 0.8rem; }
}

.out-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--glass-border); }
.out-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: #ff6b6b; }
.player-chip.out { opacity: 0.55; text-decoration: line-through; cursor: default; }
.pc-maybe { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: #ffd166; }
.att-badge { font-size: 0.7rem; padding: 1px 7px; border-radius: 5px; border: 1px solid rgba(255,107,107,0.45); color: #ff6b6b; white-space: nowrap; }
.att-link { font-size: 0.75rem; color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted var(--text-dim); white-space: nowrap; }
.att-link:hover { color: var(--text-main); }

/* ---------------------------------------------------------------- game day strip */
.card.gameday { border-top-width: 3px; }
.gameday-list { display: flex; flex-direction: column; gap: 12px; }
.gd-item { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); }
.gd-item[data-club="arsenal"] { border-left: 4px solid #EF0107; }
.gd-item[data-club="cardiff-city"] { border-left: 4px solid #0070B5; }
.gd-when { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 88px; }
.gd-what { flex: 1; min-width: 160px; }
.gd-team { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gd-team .crest { width: 22px; height: 22px; margin: 0; }
.gd-sub { color: var(--text-dim); font-size: 0.88rem; margin-top: 2px; }
.gd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; white-space: nowrap;
  border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text-main); text-decoration: none;
  font-size: 0.92rem; font-weight: 600; transition: all .15s; }
.gd-btn:hover { border-color: rgba(255,255,255,0.35); }
.gd-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #0c0e12); box-shadow: 0 4px 16px var(--accent-glow); }
.gd-btn.primary:hover { filter: brightness(1.08); }
@media (max-width: 620px) {
  .gd-item { gap: 8px; }
  .gd-when { min-width: 0; font-size: 1rem; }
  .gd-actions { width: 100%; }
  .gd-actions .gd-btn { flex: 1; padding: 0 8px; font-size: 0.86rem; }
}

/* ---------------------------------------------------------------- floating nav */
/* Score / Lineup / Check-in stay visible at all times — they are the game-day
   utilities. Everything else sits behind the ⋯ menu. */
.app-nav {
  position: sticky; top: 12px; z-index: 1000;
  display: flex; justify-content: center; align-items: center; gap: 6px;
  width: fit-content; max-width: calc(100vw - 20px);
  margin: 12px auto 0; padding: 7px;
  background: rgba(15, 18, 24, 0.78); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 50px;
}
.app-nav .an-item {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  min-height: 44px; padding: 0 16px; border-radius: 50px; text-decoration: none;
  color: var(--text-dim); font-size: 0.88rem; font-weight: 600;
  border: 1px solid transparent; background: transparent;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: all .18s;
}
.app-nav .an-item:hover { color: var(--text-main); background: rgba(255,255,255,0.07); }
.app-nav .an-item.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.app-nav .an-item:active { transform: scale(0.96); }
.app-nav .an-icon { font-size: 1.05rem; line-height: 1; }

/* ⋯ menu */
.an-more { position: relative; display: inline-flex; }
.an-more-btn { cursor: pointer; font-size: 1.2rem; letter-spacing: 1px; padding: 0 14px; font-family: inherit; }
.an-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px;
  display: none; flex-direction: column; padding: 6px;
  background: rgba(15, 18, 24, 0.97); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.an-more.open .an-menu { display: flex; }
.an-menu-item {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; text-decoration: none; color: var(--text-dim); font-size: 0.9rem; white-space: nowrap;
}
.an-menu-item:hover { color: var(--text-main); background: rgba(255,255,255,0.07); }
.an-menu-item.active { color: var(--accent); background: var(--accent-soft); }

/* live match banner — its own centred bar under the nav, on every page */
.live-bar { position: sticky; top: 66px; z-index: 999; display: flex; justify-content: center;
  margin: 8px auto 0; width: fit-content; max-width: calc(100vw - 20px); }
.an-live {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none;
  min-height: 44px; padding: 0 18px; border-radius: 50px;
  background: rgba(255,107,107,0.16); border: 1px solid rgba(255,107,107,0.65); color: #ff9b9b;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.4px;
  backdrop-filter: blur(16px); box-shadow: 0 6px 22px rgba(255,107,107,0.18);
}
.an-live:hover { background: rgba(255,107,107,0.26); color: #fff; }
.lb-tag { font-size: 0.72rem; letter-spacing: 1.5px; }
.lb-score { font-size: 1.05rem; color: #fff; font-variant-numeric: tabular-nums; }
.lb-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.25); }
.lb-half { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.lb-clock { font-family: "Perfect DOS VGA 437", ui-monospace, monospace; font-size: 1rem;
  color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.an-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; animation: livepulse 1.3s infinite; }
@keyframes livepulse { 50% { opacity: 0.25; } }

@media (max-width: 620px) {
  .app-nav { top: 8px; padding: 5px; gap: 3px; max-width: calc(100vw - 12px); }
  .app-nav .an-item { padding: 0 11px; font-size: 0.8rem; gap: 5px; }
  .app-nav .an-icon { font-size: 1rem; }
  .live-bar { top: 60px; }
  .an-live { padding: 0 13px; font-size: 0.8rem; gap: 7px; }
  .lb-score { font-size: 0.95rem; }
  .lb-clock { font-size: 0.9rem; }
  .an-menu { right: -4px; }
}
@media (max-width: 400px) {
  .app-nav .an-item .an-label { display: none; }
  .app-nav .an-item.active .an-label { display: inline; }
  .app-nav .an-item { padding: 0 10px; }
}
@media print { .app-nav { display: none !important; } }

/* ---------------------------------------------------------------- stopwatch */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sw-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); transition: all .2s; }
.sw-card.done { border-color: var(--accent-border); }
.sw-card.running { border-color: #ffd166; box-shadow: 0 0 22px rgba(255,209,102,0.28); background: rgba(255,209,102,0.06); }
.sw-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sw-name { font-weight: 600; font-size: 0.95rem; }
.sw-rank { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim);
  border: 1px solid var(--glass-border); border-radius: 5px; padding: 1px 6px; }
.sw-rank.gold { color: #ffd166; border-color: rgba(255,209,102,0.5); }
.sw-time { font-family: "Perfect DOS VGA 437", ui-monospace, monospace; font-size: 1.9rem; font-variant-numeric: tabular-nums;
  letter-spacing: 1px; color: var(--text-dim); line-height: 1.1; }
.sw-card.done .sw-time { color: var(--accent); }
.sw-card.running .sw-time { color: #ffd166; }
.sw-btn { min-height: 46px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-bg);
  color: var(--text-main); font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all .15s; }
.sw-btn.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #0c0e12); }
.sw-btn.stop { background: #ffd166; border-color: #ffd166; color: #0c0e12; }
.sw-btn:hover { filter: brightness(1.08); }
.sw-tries { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.74rem; color: var(--text-dim);
  font-variant-numeric: tabular-nums; }
.sw-tries span { border: 1px solid var(--glass-border); border-radius: 4px; padding: 1px 5px; }
.sw-tries span.b { color: var(--accent); border-color: var(--accent-border); }
.sw-clear { margin-left: auto; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; line-height: 1; }
.sw-clear:hover { color: #ff6b6b; }
.pin-msg { color: var(--text-dim); }
.pin-msg.bad { color: #ff6b6b; }
.pin-form input:disabled { opacity: 0.6; }

/* Tighter headers on a phone so the working area is above the fold —
   it matters most on check-in, where the grid should be reachable without scrolling. */
@media (max-width: 620px) {
  .team-band { padding: 24px 0 16px; margin-bottom: 18px; }
  .team-band h1 { font-size: 1.35rem; }
  .team-band h1 .crest { width: 32px; height: 32px; margin-right: 8px; }
  .team-band .crumbs { font-size: 0.78rem; margin-bottom: 6px; }
  .team-band .meta { font-size: 0.82rem; }
  .head { gap: 10px; margin-bottom: 12px; }
  .wrap { margin: 20px auto; }
  .card { padding: 16px 15px; }
  .card h2 { margin-bottom: 10px; }
}
.half-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-dim); white-space: nowrap; }
.half-pick select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; font-size: 0.88rem; }
.half-pick.dim { opacity: 0.55; }

/* actual half durations */
.timing { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--glass-border); }
.half-stat { font-size: 0.84rem; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.half-stat b { font-weight: 600; color: var(--text-main); margin-right: 5px; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 1px; }
.half-stat em { font-style: normal; margin-left: 5px; font-size: 0.78rem; }
.half-stat em.ok { color: var(--accent); }
.half-stat em.off { color: #ffd166; }
.results .played { color: var(--text-dim); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

/* scorer picker (tap a name to log the goal) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pick-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 76px; padding: 8px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text-main); font: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: all .15s; }
.pick-tile:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.pick-tile:active { transform: scale(0.95); }
.pick-tile.alt { opacity: 0.75; }
.pick-ini { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.09); font-size: 0.8rem; font-weight: 700; }
.pick-nm { font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pick-assist { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pick-assist label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-dim); }
.pick-assist select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-border);
  background: #12151b; color: var(--text-main); font: inherit; min-width: 200px; }
.g-edit { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 0.95rem; padding: 0 4px; }
.g-edit:hover { color: var(--accent); }

/* ---------------------------------------------------------------- laws of the game */
.law-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.law { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 14px; overflow: hidden; }
.law summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none;
  flex-wrap: wrap; -webkit-tap-highlight-color: transparent; }
.law summary::-webkit-details-marker { display: none; }
.law summary:hover { background: rgba(255,255,255,0.03); }
.law-no { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.law-title { font-weight: 600; font-size: 1.02rem; flex: 1; min-width: 140px; }
.law-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.law[open] .law-no { background: var(--accent); color: var(--accent-ink, #0c0e12); }
.law-body { padding: 0 18px 18px; border-top: 1px solid var(--glass-border); }
.law-main { margin: 14px 0 0; line-height: 1.6; font-size: 0.97rem; }
.law-youth { margin: 12px 0 0; padding: 11px 13px; border-radius: 10px; background: rgba(255,255,255,0.035);
  border-left: 3px solid var(--accent); color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; }
.law-youth strong { color: var(--text-main); }
.law-sits { margin-top: 14px; }
.law-sits h4 { margin: 0 0 8px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); font-weight: 600; }
.sit { border-top: 1px solid var(--glass-border); padding: 9px 0; }
.sit-q { margin: 0 0 3px; font-size: 0.92rem; }
.sit-q::before { content: '›'; color: var(--accent); margin-right: 7px; font-weight: 700; }
.sit-a { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; padding-left: 16px; }
@media print {
  .law { break-inside: avoid; border-color: #ccc; background: #fff; }
  .law-body { border-color: #ddd; }
  .law-no { background: #eee; color: #111; }
  body, .law-main, .sit-q { color: #111 !important; }
}

/* learning stages */
.stage-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.stage-btn { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 11px 13px; cursor: pointer;
  border-radius: 11px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03);
  color: var(--text-main); font: inherit; min-height: 60px; transition: all .15s; }
.stage-btn:hover { border-color: rgba(255,255,255,0.28); }
.stage-btn.on { border-color: var(--accent-border); background: var(--accent-soft); }
.st-name { font-weight: 700; font-size: 0.88rem; }
.stage-btn.on .st-name { color: var(--accent); }
.st-who { font-size: 0.72rem; color: var(--text-dim); line-height: 1.35; }
.stage-target { margin: 12px 0 0; font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }
.stage-target strong { color: var(--text-main); }

/* per-law prompt + high-school callouts */
.law-prompt { margin-top: 14px; padding: 12px 14px; border-radius: 11px;
  background: var(--accent-soft); border: 1px solid var(--accent-border); }
.law-prompt h4 { margin: 0 0 6px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); font-weight: 700; }
.pr-ask { margin: 0 0 5px; font-size: 0.94rem; }
.pr-exp { margin: 0; font-size: 0.9rem; color: var(--text-dim); }
.pr-exp::before { content: '→ '; color: var(--accent); }
.law-nfhs { margin: 12px 0 0; padding: 11px 13px; border-radius: 10px; background: rgba(122,208,255,0.06);
  border-left: 3px solid #7ad0ff; color: var(--text-dim); font-size: 0.9rem; line-height: 1.55; }
.law-nfhs strong { color: #7ad0ff; }
.mini.hs { color: #7ad0ff; border-color: rgba(122,208,255,0.45); }
#hs-card { border-left: 3px solid #7ad0ff; }

/* printable prompt cards */
.card-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.cut-card { border: 1px dashed #999; padding: 5mm; min-height: 34mm; page-break-inside: avoid; }
.cut-card .cc-law { font-size: 7.5pt; text-transform: uppercase; letter-spacing: 1px; color: #666; margin-bottom: 2mm; }
.cut-card .cc-ask { font-size: 10pt; font-weight: 600; margin-bottom: 2.5mm; line-height: 1.35; }
.cut-card .cc-exp { font-size: 9pt; color: #333; line-height: 1.35; }
.cut-card .cc-exp::before { content: '→ '; color: #888; }
.stage-hint { margin: 0 0 12px; padding: 10px 13px; border-radius: 10px;
  background: rgba(122,208,255,0.06); border-left: 3px solid #7ad0ff; }

/* ---------------------------------------------------------------- laws quiz */
.q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-stage { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-weight: 700; }
.q-stat { font-size: 0.78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.q-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 20px; }
.q-bar > div { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.q-prompt { font-size: 1.18rem; line-height: 1.45; margin: 0 0 18px; font-weight: 600; }
.q-choices { display: flex; flex-direction: column; gap: 10px; }
.q-choice { text-align: left; padding: 16px 18px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 1rem;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04); color: var(--text-main);
  min-height: 56px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: all .15s; }
.q-choice:hover:not(:disabled) { border-color: var(--accent-border); background: var(--accent-soft); }
.q-choice:active:not(:disabled) { transform: scale(0.985); }
.q-choice:disabled { cursor: default; opacity: 0.6; }
.q-choice.right { border-color: var(--accent); background: var(--accent-soft); color: var(--text-main); opacity: 1; }
.q-choice.right::after { content: ' ✓'; color: var(--accent); font-weight: 700; }
.q-choice.wrong { border-color: rgba(255,107,107,0.6); background: rgba(255,107,107,0.1); opacity: 1; }
.q-choice.wrong::after { content: ' ✕'; color: #ff6b6b; font-weight: 700; }

.q-feedback { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.qf-verdict { margin: 0 0 6px; font-weight: 700; font-size: 1.05rem; }
.qf-verdict.ok { color: var(--accent); }
.qf-verdict.no { color: #ff6b6b; }
.qf-why { margin: 0 0 10px; color: var(--text-dim); line-height: 1.55; }
.qf-law { display: inline-block; margin-bottom: 14px; font-size: 0.85rem; color: var(--accent); text-decoration: none;
  border-bottom: 1px dotted var(--accent-border); }
.grad-msg { font-size: 1.05rem; line-height: 1.6; margin: 0 0 16px; }

.pg-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.pg-row.locked { opacity: 0.4; }
.pg-name { font-size: 0.86rem; min-width: 92px; }
.pg-bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.pg-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.pg-num { font-size: 0.78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.pg-weak { margin-top: 12px; }
.pg-weak a { color: var(--accent); }
@media (max-width: 600px) { .q-prompt { font-size: 1.06rem; } .pg-name { min-width: 74px; font-size: 0.8rem; } }
