/* Bankers Cup — banknote / security-print matchday look.
   Light by design: pitchside phones are read in direct sun. */
:root {
  --paper: #E6EEE8;
  --card: #FAFCF9;
  --card-2: #F1F6F2;
  --ink: #13233A;
  --ink-2: #44546A;
  --ink-3: #6F7D8E;
  --line: rgba(19, 35, 58, .12);
  --line-2: rgba(19, 35, 58, .22);
  --note: #0A7D55;
  --note-deep: #075E40;
  --note-wash: #DCEFE5;
  --stamp: #C8312B;
  --stamp-wash: #FBE4E1;
  --seal: #9A6F16;
  --yellow: #D9A21B;
  --red: #C8312B;
  --warn-wash: #FFF3D6;
  --display: 'Barlow Condensed', 'Roboto Condensed', 'sans-serif-condensed', 'Arial Narrow', sans-serif;
  --body: 'Source Sans 3', 'Roboto', 'Segoe UI', system-ui, sans-serif;
  --r-s: 6px;
  --r-m: 12px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--note-deep); }
img { max-width: 100%; display: block; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid #2B6CB0; outline-offset: 2px; border-radius: 4px; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 10px calc(14px + env(safe-area-inset-left, 0px));
  background: var(--ink);
  color: #fff;
}
.appbar .seal { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff; }
.appbar .title { flex: 1; min-width: 0; line-height: 1.1; }
.appbar .title b { display: block; font: 600 21px/1.05 var(--display); letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .title span { font-size: 12.5px; color: #B9C6D6; }
.appbar .back { background: none; border: 0; color: #fff; width: 36px; height: 36px; margin-left: -6px; display: grid; place-items: center; border-radius: 50%; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #B9C6D6; background: rgba(255,255,255,.08); padding: 4px 9px; border-radius: 99px; border: 0; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: #7B8898; }
.conn.on i { background: #3DDC97; }
.conn.wait i { background: #F2B84B; }
.conn.off i { background: #FF6B5E; }
.locpill { text-decoration: none; background: #fff; color: var(--ink); font: 600 14px var(--display); border: 0; border-radius: 99px; padding: 5px 11px; display: inline-flex; gap: 5px; align-items: center; }
.locpill .badge { background: var(--stamp); color: #fff; border-radius: 99px; min-width: 18px; height: 18px; font-size: 12px; display: inline-grid; place-items: center; padding: 0 5px; }

/* ---------- Ticker ---------- */
.ticker { background: #0F1C2E; color: #E8EEF5; overflow: hidden; white-space: nowrap; font: 500 15px var(--display); border-top: 1px solid rgba(255,255,255,.06); }
.ticker .track { display: inline-flex; gap: 28px; padding: 7px 0 7px 14px; animation: tick 45s linear infinite; }
.ticker .track > a:last-child { margin-right: 28px; }
.ticker a { color: inherit; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.ticker .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #FF5A4F; }
.ticker .min { color: #FF8A80; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } .ticker { overflow-x: auto; } }

/* ---------- Layout ---------- */
#view { padding: 14px 14px calc(var(--tabbar-h) + var(--safe-b) + 24px); max-width: 760px; margin: 0 auto; }
.section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section h2 { font: 600 22px/1.1 var(--display); margin: 0; letter-spacing: .2px; }
.section a, .section button.link { font-size: 14px; font-weight: 600; color: var(--note-deep); text-decoration: none; background: none; border: 0; padding: 0; }
h1.page { font: 600 30px/1.05 var(--display); margin: 6px 0 4px; }
p.lede { margin: 0 0 12px; color: var(--ink-2); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); }
.panel.pad { padding: 14px; }
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; text-decoration: none; color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.rows > .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .grow span { font-size: 13.5px; color: var(--ink-3); }
.row .chev { color: var(--ink-3); }
.empty { padding: 26px 18px; text-align: center; color: var(--ink-2); }
.empty b { display: block; font: 600 19px var(--display); color: var(--ink); margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* ---------- Banknote hero (the signature piece) ---------- */
.note {
  position: relative; display: block; color: var(--ink); text-decoration: none;
  background-color: var(--card);
  background-image: var(--guilloche);
  background-size: cover; background-position: center;
  border-radius: 14px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px rgba(10,125,85,.35);
  overflow: hidden;
}
.note .serial { position: absolute; top: 12px; right: 16px; font: 500 14px var(--display); color: var(--stamp); letter-spacing: 1.5px; }
.note .stage { font-size: 13.5px; color: var(--ink-2); padding-right: 70px; }
.note .face { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 14px 0 8px; }
.note .side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.note .side .nm { font: 600 17px/1.1 var(--display); }
.note .score { font: 600 64px/0.9 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -1px; display: flex; align-items: center; gap: 8px; }
.note .score .sep { font-size: 40px; color: var(--ink-3); }
.note .score.pending { font-size: 34px; color: var(--ink-2); letter-spacing: 0; }
.note .status { text-align: center; margin-top: 2px; }
.note .scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.note .scorers div:last-child { text-align: right; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--display); padding: 3px 10px; border-radius: 99px; background: var(--card-2); color: var(--ink-2); letter-spacing: .3px; }
.pill.live { background: var(--stamp); color: #fff; }
.pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.pill.live.paused { background: #F2B705; color: #13233A; }
.pill.live.paused::before { animation: none; width: 7px; height: 9px; border-radius: 0; background: none; border-left: 2.5px solid #13233A; border-right: 2.5px solid #13233A; box-sizing: border-box; }
.pill.ft { background: var(--ink); color: #fff; }
.pill.ht { background: var(--warn-wash); color: #7A5308; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pill.live::before { animation: none; } }

/* ---------- Crests ---------- */
.crest { flex: none; display: inline-block; }
.crest svg { display: block; width: 100%; height: 100%; }

/* ---------- Match rows ---------- */
.mrow { display: grid; grid-template-columns: 64px 1fr auto 1fr; align-items: center; gap: 8px; padding: 11px 12px; color: inherit; text-decoration: none; }
.mrow .when { font: 500 14px/1.1 var(--display); color: var(--ink-2); text-align: center; }
.mrow .when small { display: block; font-size: 12px; color: var(--ink-3); }
.mrow .when.live { color: var(--stamp); font-weight: 600; }
.mrow .venue { grid-column: 2 / -1; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; margin-top: -3px; font-size: 12.5px; line-height: 1.25; color: var(--ink-3); }
.mrow .venue span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .venue svg { flex: none; }
.mrow .when .to { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }

/* Pitch graphic on the match page */
.pitchcard { container-type: inline-size; position: relative; isolation: isolate; aspect-ratio: 8 / 5; max-width: 640px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #237F48; color: #fff; box-shadow: 0 12px 26px rgba(6, 40, 22, .28); }
.pitchcard .pc-grass { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.pc-venue { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; max-width: 86%; padding: 5px 12px; border-radius: 99px; background: rgba(6, 26, 15, .64); font: 600 clamp(12.5px, 2.5cqw, 17px)/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.pc-venue span { overflow: hidden; text-overflow: ellipsis; }
.pc-venue svg, .pc-foot svg { flex: none; }
.pc-team { position: absolute; top: 51%; width: 34%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pc-team.home { left: 24%; }
.pc-team.away { left: 76%; }
.pc-team .crest { width: clamp(46px, 15cqw, 96px) !important; height: clamp(46px, 15cqw, 96px) !important; padding: 7px; background: #fff; border-radius: 50%; box-shadow: 0 5px 14px rgba(0, 0, 0, .32); }
.pc-team .crest.logo img { width: 100%; height: 100%; }
.pc-team b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 clamp(15px, 3.3cqw, 24px)/1.1 var(--display); letter-spacing: .04em; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.pc-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.pc-vs { font: 700 clamp(18px, 3.8cqw, 28px) var(--display); letter-spacing: .1em; }
.pc-score { padding: 2px 12px 4px; border-radius: 12px; background: rgba(6, 26, 15, .5); font: 700 clamp(28px, 6.4cqw, 46px)/1 var(--display); font-variant-numeric: tabular-nums; }
.pc-live { padding: 1px 9px; border-radius: 99px; background: var(--stamp); font: 600 13px/1.5 var(--display); text-shadow: none; }
.pc-ft { font: 600 12px var(--display); letter-spacing: .05em; opacity: .9; }
.pc-foot { position: absolute; left: 0; right: 0; bottom: 7%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 10px; }
.pc-foot span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; background: rgba(6, 26, 15, .64); font-size: clamp(12px, 2.3cqw, 15px); font-weight: 600; white-space: nowrap; }

.ap { font-size: .68em; font-weight: 600; margin-left: .2em; letter-spacing: .03em; }
.mrow .t { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.mrow .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .t.away { flex-direction: row-reverse; text-align: right; }
.mrow .sc { font: 600 22px var(--display); font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; background: var(--card-2); border-radius: 8px; padding: 2px 8px; }
.mrow .sc.live { background: var(--stamp-wash); color: var(--stamp); }
.mrow .sc.vs { font-size: 15px; color: var(--ink-3); background: none; }
.mrow .win { color: var(--ink); }
.mrow .lose { color: var(--ink-3); font-weight: 500; }
.dayhead { font: 600 16px var(--display); color: var(--ink-2); margin: 18px 2px 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- Chips & segments ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 4px -14px 10px; padding: 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line-2); background: var(--card); border-radius: 99px; padding: 6px 13px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(19,35,58,.15); }

/* ---------- Standings ---------- */
.standings { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.standings th { font: 600 13px var(--display); color: var(--ink-3); text-align: center; padding: 8px 2px; letter-spacing: .4px; border-bottom: 1px solid var(--line-2); }
.standings th.team { text-align: left; padding-left: 8px; }
.standings td { text-align: center; padding: 9px 2px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings tr:last-child td { border-bottom: 0; }
.standings td.pos { width: 28px; font: 600 15px var(--display); color: var(--ink-2); position: relative; }
.standings tr.q td.pos::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--note); }
.standings td.team { text-align: left; padding-left: 8px; }
.standings td.team a { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.standings td.pts { font: 700 17px var(--display); }
.standings .opt { display: none; }
@media (min-width: 420px) { .standings .opt { display: table-cell; } }
.form { display: inline-flex; gap: 3px; }
.form i { width: 15px; height: 15px; border-radius: 3px; display: inline-grid; place-items: center; font: 700 10px var(--display); font-style: normal; color: #fff; }
.form i.W { background: var(--note); } .form i.D { background: #8A96A6; } .form i.L { background: var(--stamp); }
.legend-q { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 10px 12px 2px; }
.legend-q::before { content: ''; width: 3px; height: 14px; background: var(--note); border-radius: 2px; }

/* ---------- Leaders ---------- */
.leader { width: 168px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.leader .k { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.leader .v { font: 600 38px/1 var(--display); }
.leader .who { font-weight: 600; line-height: 1.2; }
.leader .who span { display: block; font-weight: 400; font-size: 13px; color: var(--ink-3); }

/* ---------- Stat lists ---------- */
.rank { width: 26px; text-align: center; font: 600 17px var(--display); color: var(--ink-3); flex: none; }
.rank.top { color: var(--seal); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--card-2); display: grid; place-items: center; font: 600 16px var(--display); color: var(--ink-2); overflow: hidden; border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.val { font: 600 24px var(--display); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.cardpair { display: inline-flex; gap: 8px; align-items: center; font: 600 18px var(--display); }
.ycard, .rcard, .y2card { display: inline-block; width: 11px; height: 15px; border-radius: 2px; vertical-align: -2px; }
.ycard { background: var(--yellow); }
.rcard { background: var(--red); }
.y2card { background: linear-gradient(135deg, var(--yellow) 0 50%, var(--red) 50% 100%); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding: 6px 0; }
.ev { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; gap: 6px; padding: 7px 10px; }
.ev .m { text-align: center; font: 600 15px var(--display); color: var(--ink-2); background: var(--card-2); border-radius: 99px; padding: 2px 0; }
.ev .d { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
.ev .d.away { flex-direction: row-reverse; text-align: right; }
.ev .d small { display: block; color: var(--ink-3); font-size: 12.5px; }
.ev .ic { flex: none; width: 22px; height: 22px; display: grid; place-items: center; }
.ev.break { grid-template-columns: 1fr; text-align: center; color: var(--ink-3); font: 600 14px var(--display); }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; font-size: 15.5px; background: var(--note); color: #fff; text-decoration: none; min-height: 46px; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); }
.btn.danger { background: var(--stamp); }
.btn.ink { background: var(--ink); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow > .btn { flex: 1; }
.field { display: block; margin-bottom: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--note); }
.check small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; min-height: 46px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--note); border-color: transparent; }
.field .hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colorpick { display: flex; gap: 8px; align-items: center; }
.colorpick input[type=color] { width: 52px; padding: 2px; }
.note-box { border-radius: 10px; padding: 11px 13px; font-size: 14.5px; margin: 10px 0; background: var(--warn-wash); color: #5E4206; border: 1px solid #F0D48C; }
.note-box.info { background: var(--note-wash); color: #0B4A33; border-color: #A9D8C0; }
.note-box.err { background: var(--stamp-wash); color: #7E1D17; border-color: #F2B5AE; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line-2); display: flex; padding-bottom: var(--safe-b); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tabbar-h); text-decoration: none; color: var(--ink-3); font-size: 12.5px; font-weight: 600; position: relative; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--note); }
.tabbar svg { width: 24px; height: 24px; }

/* ---------- Sheets / dialogs ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 18, 30, .5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 8px 16px calc(18px + var(--safe-b)); animation: up .18s ease-out; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 10px; }
.sheet h3 { font: 600 24px var(--display); margin: 2px 0 10px; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.picker button { border: 1px solid var(--line-2); background: #fff; border-radius: 10px; padding: 8px 6px; text-align: center; min-height: 64px; }
.picker button b { display: block; font: 600 22px var(--display); }
.picker button span { font-size: 12.5px; color: var(--ink-2); line-height: 1.15; display: block; }
.picker button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.picker button[aria-pressed="true"] span { color: #D5DEE9; }
.teampick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.teampick button { display: flex; align-items: center; gap: 8px; justify-content: center; border: 1px solid var(--line-2); background: #fff; border-radius: 10px; padding: 10px; font-weight: 700; }
.teampick button[aria-pressed="true"] { outline: 3px solid var(--ink); }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(10,18,30,.25); max-width: 520px; animation: up .2s ease-out; }
.toast.goal { background: var(--note); font: 600 19px var(--display); letter-spacing: .3px; }
.toast.err { background: var(--stamp); }

/* ---------- Admin ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; min-height: 104px; position: relative; }
.tile svg { width: 26px; height: 26px; color: var(--note-deep); }
.tile b { font: 600 19px/1.1 var(--display); }
.tile span { font-size: 13px; color: var(--ink-3); }
.tile .badge { position: absolute; top: 12px; right: 12px; background: var(--stamp); color: #fff; border-radius: 99px; padding: 1px 8px; font: 600 14px var(--display); }
.who-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; margin-bottom: 12px; }
.who-bar .grow { flex: 1; min-width: 0; }
.req { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; margin-bottom: 12px; position: relative; }
.req h4 { margin: 0 0 2px; font: 600 19px var(--display); }
.req .meta { font-size: 13px; color: var(--ink-3); }
.diff { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.diff td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.diff td:first-child { color: var(--ink-3); width: 30%; }
.diff del { color: var(--stamp); text-decoration: line-through; }
.diff ins { color: var(--note-deep); text-decoration: none; font-weight: 700; }
.stamps { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.stamp { border: 2px solid currentColor; border-radius: 6px; padding: 4px 9px; font: 700 13px/1.15 var(--display); letter-spacing: 1px; transform: rotate(-3deg); color: var(--note-deep); text-transform: uppercase; background: rgba(255,255,255,.5); }
.stamp small { display: block; font: 500 11.5px/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.stamp.rej { color: var(--stamp); transform: rotate(2deg); }
.stamp.wait { color: var(--ink-3); border-style: dashed; transform: none; }
.audit-row { padding: 10px 12px; font-size: 14px; }
.audit-row .top { display: flex; justify-content: space-between; gap: 8px; }
.audit-row .act { font-weight: 700; }
.audit-row pre { white-space: pre-wrap; word-break: break-word; background: var(--card-2); border-radius: 8px; padding: 8px; font-size: 12px; margin: 6px 0 0; max-height: 260px; overflow: auto; }
.hash { font-size: 11.5px; color: var(--ink-3); word-break: break-all; }
.tagimg { width: 100%; max-width: 340px; margin: 0 auto; border-radius: 12px; box-shadow: 0 6px 22px rgba(19,35,58,.18); }
.big-check { text-align: center; padding: 18px 14px; border-radius: var(--r-m); }
.big-check.ok { background: var(--note-wash); border: 2px solid var(--note); }
.big-check.bad { background: var(--stamp-wash); border: 2px solid var(--stamp); }
.big-check.warn { background: var(--warn-wash); border: 2px solid var(--yellow); }
.big-check h2 { font: 700 30px var(--display); margin: 6px 0; letter-spacing: .5px; }
.big-check .photo { width: 120px; height: 120px; border-radius: 12px; margin: 8px auto; overflow: hidden; background: var(--card-2); display: grid; place-items: center; font: 600 40px var(--display); color: var(--ink-2); }
.big-check .photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--body); fill: var(--ink-2); }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .1s; }
.chart .tip.on { opacity: 1; }
.chart-legend { display: flex; gap: 14px; font-size: 13.5px; color: var(--ink-2); margin: 2px 0 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart-card { padding: 14px 14px 10px; margin-bottom: 12px; }
.chart-card h3 { font: 600 19px var(--display); margin: 0 0 2px; }
.chart-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- Pull to refresh ---------- */
.ptr { height: 0; overflow: hidden; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; transition: height .15s; }

/* ---------- Print: ID tag sheets ---------- */
#print-area { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  .print-sheet { display: grid; grid-template-columns: repeat(3, 54mm); gap: 6mm 8mm; justify-content: center; }
  .print-sheet img { width: 54mm; height: 85.6mm; break-inside: avoid; outline: 0.2mm dashed #999; outline-offset: 1mm; }
}

/* ---------- Team roles ---------- */
.rolebadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--ink); color: #fff; font: 700 12px/1 var(--display); vertical-align: 2px; letter-spacing: .3px; }
.rolebadge.c { background: var(--seal); }
.rolepill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--ink); color: #fff; font: 600 15px var(--display); letter-spacing: .4px; }
.rolepill.c { background: var(--seal); }

/* ---------- Logos ---------- */
.league-logo { display: block; }
.league-logo.center { margin: 0 auto; }
.crest.logo { background: #fff; border-radius: 24%; box-shadow: inset 0 0 0 1px var(--line); display: inline-grid; place-items: center; overflow: hidden; }
.crest.logo img { width: 86%; height: 86%; object-fit: contain; }
.logo-preview { width: 72px; height: 72px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); }
.logo-preview img { width: 88%; height: 88%; object-fit: contain; }

/* ---------- Share buttons ---------- */
.sharebtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--note-deep); border-radius: 99px; padding: 5px 12px; font: 600 14px var(--body); min-height: 34px; }
.sharebtn:active { transform: translateY(1px); }

/* ---------- Password fields ---------- */
.pwfield { position: relative; display: block; }
.pwfield input { padding-right: 52px; }
.pwtoggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; border-radius: 8px; }
.pwtoggle[aria-pressed="true"] { color: var(--note-deep); }

/* ---------- In-page QR scanner (website / iPhone) ---------- */
html.scanning, html.scanning body { overflow: hidden; }
.scanner { position: fixed; inset: 0; z-index: 100; background: #05080D; color: #fff; overflow: hidden; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .scan-frame { position: absolute; left: 50%; top: 46%; width: 68vmin; height: 68vmin; max-width: 420px; max-height: 420px; transform: translate(-50%, -50%); pointer-events: none;
  border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(5, 8, 13, .58); }
.scanner .scan-frame i { position: absolute; width: 22%; height: 22%; border: 4px solid #F2C14E; }
.scanner .scan-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scanner .scan-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scanner .scan-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scanner .scan-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanner .scan-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #F2C14E; box-shadow: 0 0 12px #F2C14E; animation: scanline 2.2s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 12%; } to { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .scanner .scan-line { animation: none; } }
.scanner .scan-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; background: linear-gradient(rgba(5,8,13,.75), transparent); font-weight: 600; font-size: 16px; }
.scanner .scan-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 30px; line-height: 1; }
.scanner .scan-msg { position: absolute; left: 16px; right: 16px; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); text-align: center; background: rgba(5,8,13,.82); border-radius: 12px; padding: 12px 14px; font-size: 15px; opacity: 0; transition: opacity .2s; }
.scanner .scan-msg.show { opacity: 1; }
.scanner .scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(5,8,13,.8)); }
.scanner .scan-photo { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 99px; background: #fff; color: #13233A; font-weight: 700; cursor: pointer; }
.scanner.nocam .scan-frame { box-shadow: none; }
.scanner.nocam .scan-line { display: none; }

/* ---------- Self-registration, captain's corner, bank logins ----------
   Every screen takes its colour from the bank: --bc (main) and --bc2 (second). */
.caps { text-transform: uppercase; }
.empty.slim { padding: 14px; background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--r-m); font-size: 14.5px; }
.pill.ok { background: var(--note-wash); color: var(--note-deep); }
.pill.bad { background: var(--stamp-wash); color: #7E1D17; }
.btn.gold { background: #F2B705; color: #13233A; }
.btnrow.wrap > .btn { flex: 1 1 auto; }

.join-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 20px 16px 22px; margin: 0 -4px 14px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--bc) 0%, var(--bc) 28%, #0F2A4F 100%); box-shadow: 0 10px 24px -14px var(--bc); }
.join-hero::before, .join-hero::after { content: ''; position: absolute; top: -40px; right: 34px; width: 34px; height: 220px; background: #2E9E4F; transform: rotate(28deg); opacity: .9; }
.join-hero::after { right: -6px; width: 16px; background: #F2B705; }
.join-hero .crest { position: relative; z-index: 1; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.9); }
.jh-text { position: relative; z-index: 1; min-width: 0; }
.jh-cup { font: 600 14px var(--display); letter-spacing: .6px; color: #F2C14E; }
.join-hero h1 { font: 700 32px/1 var(--display); margin: 2px 0 3px; }
.join-hero p { margin: 0; opacity: .9; font-size: 14.5px; }
.jh-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.jh-stats span { background: rgba(255,255,255,.16); border-radius: 99px; padding: 3px 10px; font-size: 13px; }
.jh-stats b { font: 700 16px var(--display); }
.join-lock { display: flex; gap: 8px; align-items: flex-start; }
.join-lock svg { flex: none; margin-top: 2px; }

.jcard { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--bc); border-radius: var(--r-m); padding: 14px; margin-bottom: 12px; }
.jcard h2 { display: flex; align-items: center; gap: 10px; font: 600 21px var(--display); margin: 0 0 12px; }
.jcard h2 i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bc); color: #fff; font: 700 17px var(--display); flex: none; }
.jnote { font-size: 14px; color: var(--ink-2); margin: -4px 0 10px; }

.jphoto { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.jphoto-img { width: 104px; height: 124px; flex: none; border-radius: 14px; border: 2px dashed var(--bc, #0A7D55); background: var(--card-2);
  display: grid; place-items: center; align-content: center; gap: 4px; color: var(--bc, #0A7D55); overflow: hidden; }
.jphoto-img em { font-style: normal; font-weight: 700; font-size: 13px; }
.jphoto-img img { width: 100%; height: 100%; object-fit: cover; }
.jphoto-img:has(img) { border-style: solid; }
.jphoto-tip { font-size: 14px; color: var(--ink-2); }
.jphoto-tip b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 2px; }
.jphoto.small { margin-bottom: 14px; }
.jphoto.small .jphoto-img { width: 76px; height: 90px; }

.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { position: relative; }
.pchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pchip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; transition: background .12s, color .12s; }
.pchip input:checked + span { background: var(--bc, var(--note)); border-color: var(--bc, var(--note)); color: #fff; }
.pchip input:focus-visible + span { outline: 3px solid #F2B705; outline-offset: 2px; }
.pchips.two { margin-bottom: 12px; }
.pchips.two .pchip { flex: 1; }
.pchips.two .pchip span { width: 100%; justify-content: center; }
.pchip.ok input:checked + span { background: var(--note); border-color: var(--note); }
.pchip.no input:checked + span { background: var(--stamp); border-color: var(--stamp); }
.loc-form .reason { display: none; }
.loc-form.is-reject .reason { display: block; }
.loc-form:has(input[value=reject]:checked) .reason { display: block; }

.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.jn { position: relative; }
.jn input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.jn span { display: grid; place-items: center; height: 46px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line-2); font: 700 20px var(--display); color: var(--ink); transition: transform .12s, background .12s; }
.jn input:checked + span { background: var(--bc); border-color: var(--bc); color: #fff; transform: scale(1.1); box-shadow: 0 6px 14px -6px var(--bc); }
.jn input:focus-visible + span { outline: 3px solid #F2B705; outline-offset: 2px; }
.jn.taken span { background: repeating-linear-gradient(135deg, var(--card-2) 0 5px, #E3E9E5 5px 10px); color: var(--ink-3); border-style: dashed; text-decoration: line-through; }
.jn.taken input { cursor: not-allowed; }
.of-note { display: none; }
.join-form.is-of .jersey-block { display: none; }
.join-form:has(input[name=position][value=OF]:checked) .jersey-block { display: none; }
.join-form.is-of .of-note { display: block; margin: 0 4px 12px; }
.join-form:has(input[name=position][value=OF]:checked) .of-note { display: block; margin: 0 4px 12px; }
.jconfirm { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 4px 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); font-size: 15px; }
.jconfirm input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--bc); flex: none; }
.jsend { min-height: 56px; font-size: 18px; background: var(--bc); box-shadow: 0 10px 20px -12px var(--bc); }

.jdone { text-align: center; padding: 6px 6px 10px; }
.jtick { width: 86px; height: 86px; margin: 6px auto 8px; border-radius: 50%; background: var(--bc); color: #fff; display: grid; place-items: center; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; box-shadow: 0 0 0 8px rgba(19, 35, 58, .08); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .jtick { animation: none; } .jn span, .pchip span { transition: none; } }
.jdone h2 { font: 700 30px var(--display); margin: 4px 0 12px; }
.jdone p { color: var(--ink-2); max-width: 460px; margin: 12px auto 16px; }
.jdone-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--bc); border-radius: var(--r-m); padding: 10px 12px; }
.jdone-card img { width: 52px; height: 62px; object-fit: cover; border-radius: 8px; flex: none; }
.jdone-card div { flex: 1; min-width: 0; }
.jdone-card b { display: block; }
.jdone-card span { font-size: 14px; color: var(--ink-3); }
.jdone-card .jdone-no, .reg-no { font: 700 30px/1 var(--display); color: var(--bc); min-width: 44px; text-align: center; flex: none; }

.cap-hero { text-align: center; margin: 8px 0 14px; }
.cap-hero .league-logo { margin: 0 auto 6px; }
.cap-hero h1 { font: 700 32px var(--display); margin: 0; }
.cap-hero p { margin: 4px 0 0; color: var(--ink-2); }
.cap-head { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px; border-radius: var(--r-m); color: #fff;
  background: linear-gradient(120deg, var(--bc) 30%, #0F2A4F); }
.cap-head .crest { box-shadow: 0 0 0 3px rgba(255,255,255,.9); flex: none; }
.cap-head .grow { flex: 1; min-width: 0; }
.cap-head small { display: block; font: 600 13px var(--display); letter-spacing: .5px; color: #F2C14E; }
.cap-head b { font: 700 21px/1.1 var(--display); }
.cap-head .btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.cap-status { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 12px; }
.cap-status .grow { flex: 1; min-width: 0; }
.cap-status b { display: block; }
.cap-status span { font-size: 13.5px; color: var(--ink-2); }
.cap-count { text-align: center; flex: none; }
.cap-count b { font-size: 42px; line-height: .9; color: var(--note-deep); }
.cap-count span { font-size: 13px; }
.cap-bar { height: 8px; border-radius: 99px; background: var(--card-2); margin: 6px 0; overflow: hidden; }
.cap-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--note), #F2B705); border-radius: inherit; }
.cap-status.locked { background: #0F2A4F; color: #fff; border-color: #0F2A4F; align-items: flex-start; }
.cap-status.locked > svg { color: #F2C14E; flex: none; margin-top: 2px; }
.cap-status.locked span { color: rgba(255,255,255,.82); }
.cap-share { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--bc); }
.cap-share b { display: block; }
.cap-link, .acc-link { font-size: 13.5px; word-break: break-all; }

.reg-card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--bc); border-radius: var(--r-m); padding: 12px; margin-bottom: 10px; }
.reg-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.reg-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.reg-top .grow b { font-size: 16px; }
.reg-photo { width: 58px; height: 70px; border-radius: 10px; object-fit: cover; flex: none; background: var(--card-2); }
.reg-photo.none { display: grid; place-items: center; color: var(--ink-3); }
.reg-edit { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 8px; }
.reg-edit .field { margin-bottom: 10px; }
.reg-edit .field > span { font-size: 12.5px; }
.btn.approve { background: var(--note); }
.btn.ghost.danger { background: var(--card); color: var(--stamp); border-color: #F2B5AE; }
@media (max-width: 380px) { .reg-edit { grid-template-columns: 1fr 1fr; } .reg-edit .field:last-child { grid-column: 1 / -1; } }

.kind-tag { align-self: flex-start; display: inline-block; font: 700 12.5px var(--display); letter-spacing: .4px; padding: 2px 8px; border-radius: 6px; margin-bottom: 2px; }
.kind-tag.k-new { background: var(--note-wash); color: var(--note-deep); }
.kind-tag.k-change { background: #DDE9F8; color: #1B4F94; }
.kind-tag.k-remove { background: var(--stamp-wash); color: #7E1D17; }
.req-details { border-top: 1px dashed var(--line-2); padding-top: 8px; margin-bottom: 8px; }
.req-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 3px 0; }
.req-line > span { color: var(--ink-3); flex: none; }
.req-line > b { text-align: right; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.req-line s { color: var(--ink-3); font-weight: 400; }
.req-photos img { width: 40px; height: 48px; object-fit: cover; border-radius: 6px; }
.req-sum { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.req-sum b { font-size: 18px; }
.req-sum > span:last-child { color: var(--ink-3); font-size: 14px; }
.loc-steps { display: flex; gap: 8px; margin: 4px 0 10px; }
.loc-step { flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 9px; border: 1.5px dashed var(--line-2); font-size: 13px; color: var(--ink-3); min-width: 0; }
.loc-step i { font: 700 13px var(--display); font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; }
.loc-step em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-step.done { border-style: solid; border-color: #A9D8C0; background: var(--note-wash); color: var(--note-deep); font-weight: 600; }
.loc-step.done svg { flex: none; }
.other-loc, .danger-zone { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.other-loc summary, .danger-zone summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.danger-zone summary { color: var(--stamp); }

.sq-no { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 20px var(--display); color: #fff; background: var(--bc); }
.sq-link { display: flex; gap: 8px; align-items: flex-start; text-decoration: none; }
.sq-link svg { flex: none; margin-top: 2px; }

.acc-list { display: grid; gap: 10px; }
.acc-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--bc); border-radius: var(--r-m); padding: 12px; }
.acc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acc-top .grow { flex: 1; min-width: 0; }
.acc-top b { display: block; }
.acc-top span { font-size: 13.5px; color: var(--ink-3); }
.lock-badge { width: 28px; height: 28px; border-radius: 50%; background: #0F2A4F; color: #F2C14E; display: grid; place-items: center; flex: none; }
.acc-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; font-size: 14px; margin-bottom: 12px; }
.acc-grid > span { color: var(--ink-3); }
.acc-grid code { font: 600 16px ui-monospace, Menlo, Consolas, monospace; background: var(--card-2); padding: 2px 8px; border-radius: 6px; justify-self: start; }
.acc-grid code.pw { background: #FFF3D6; color: #5E4206; }
.acc-grid em { font-size: 13px; color: var(--ink-3); }

.btn svg { flex: none; }
.cap-share .btnrow .btn { white-space: nowrap; padding: 6px 10px; }

.officials { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; margin: 0 0 12px; font-weight: 600; }
.officials span { display: flex; flex-direction: column; min-width: 0; }
.officials small { font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.officials .btn { margin-left: auto; }

.mrow .venue.comm { margin-top: -6px; color: var(--ink-2); font-weight: 600; }

/* Player picker on the match desk: number on the left, full name beside it */
.picker.players { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.picker.players button { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 56px; padding: 8px 10px; }
.picker.players button b { flex: none; min-width: 30px; text-align: center; font-size: 22px; }
.picker.players button span { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.picker.players button[aria-pressed="true"] span { color: #fff; }

/* ---------- Knockout: teams still to be decided ---------- */
.crest.tbd { border: 1.5px dashed var(--line-2); border-radius: 50%; background: var(--card-2); }
.mrow .t.tbd span, .note .side .nm.tbd { color: var(--ink-3); font-style: italic; font-weight: 500; }
.mrow .venue.ko { color: var(--seal); font-weight: 600; }
.ko-plan .row { padding: 7px 2px; font-size: 14.5px; }
.ko-teams { margin-bottom: 12px; background: var(--card-2); }

/* ---------- Knockout bracket ---------- */
.bracket-wrap { overflow-x: auto; margin: 0 -4px 4px; padding: 2px 4px 10px; -webkit-overflow-scrolling: touch; }
.bracket { --gap: 14px; display: grid; grid-template-columns: repeat(var(--cols), minmax(100px, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(80px, auto); column-gap: var(--gap); min-width: calc(var(--cols) * 100px + (var(--cols) - 1) * 14px); }
.br-head { grid-row: 1; font: 600 14px var(--display); color: var(--ink-2); text-align: center; padding-bottom: 6px; letter-spacing: .02em; }
.br-cell { position: relative; display: flex; align-items: center; padding: 4px 0; }
.br-cell.join::before { content: ''; position: absolute; left: calc(-1 * var(--gap)); width: calc(var(--gap) / 2); top: 25%; bottom: 25%; border: 2px solid var(--line-2); border-left: 0; border-radius: 0 8px 8px 0; }
.br-cell.join::after { content: ''; position: absolute; left: calc(-1 * var(--gap) / 2); width: calc(var(--gap) / 2); top: 50%; border-top: 2px solid var(--line-2); }
.br-m { display: block; width: 100%; padding: 5px 7px 6px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.br-m.live { border-color: var(--stamp); box-shadow: inset 0 0 0 1px var(--stamp); }
.br-m.final { border-color: var(--seal); box-shadow: inset 0 0 0 1px var(--seal); background: linear-gradient(180deg, #FFF8E6, var(--card) 60%); }
.br-k { display: flex; justify-content: space-between; gap: 4px; font: 600 11.5px var(--display); color: var(--ink-3); margin-bottom: 3px; white-space: nowrap; }
.br-k em { font-style: normal; }
.br-k .lv { color: var(--stamp); }
.br-m.final .br-k > span:first-child { color: var(--seal); }
.br-t { display: flex; align-items: center; gap: 5px; min-height: 22px; font: 600 15px/1.2 var(--display); }
.br-t b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.br-t i { font-style: normal; font-variant-numeric: tabular-nums; min-width: 14px; text-align: right; }
.br-t.tbd b { color: var(--ink-3); font-weight: 500; font-style: italic; }
.br-t.win b, .br-t.win i { font-weight: 700; }
.br-t.lose { color: var(--ink-3); }
.br-x { display: block; margin-top: 2px; font: 600 12px var(--display); color: var(--note-deep); }
.br-third { max-width: 220px; margin: 2px auto 8px; }
.br-third::before { content: 'Third place'; display: block; text-align: center; font: 600 14px var(--display); color: var(--ink-2); margin-bottom: 6px; }

/* ---------- Penalty shoot-out ---------- */
.shoot { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.shoot b { font: 600 15px var(--display); color: var(--ink); }
.shoot .pk { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 5px; }
.shoot .pk span:first-child { text-align: right; }
.shoot .pk span:last-child { text-align: left; }
.shoot i, .pk-dots i { display: inline-block; width: 11px; height: 11px; margin: 0 2px; border-radius: 50%; vertical-align: middle; }
.shoot i.ok, .pk-dots i.ok { background: var(--note); }
.shoot i.miss, .pk-dots i.miss { background: transparent; box-shadow: inset 0 0 0 2px var(--stamp); }
.ev.break.shoot { display: block; }
.pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); }
.pk-side.next { border-color: var(--note); box-shadow: inset 0 0 0 1px var(--note); background: var(--note-wash); }
.pk-side b { font: 600 18px var(--display); }
.pk-n { font-size: 40px; line-height: 1; font-weight: 600; }
.pk-dots { min-height: 15px; display: flex; flex-wrap: wrap; justify-content: center; }
.pk-dots i { width: 13px; height: 13px; }
.pk-side .btnrow { justify-content: center; margin-top: 4px; gap: 6px; flex-wrap: wrap; }
.br-x.muted { color: var(--ink-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
