/* Crownd – styles. No external resources (CSP: 'self' only).
   Club color comes from /theme.css as --accent, --accent-dark, --on-accent;
   team colors as .team-<id> { --team, --team-dark, --on-team }. */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --accent: #0B5FA8;
  --accent-dark: #08467C;
  --on-accent: #FFFFFF;
  --gold: #F2B705;
  --gold-light: #FFD95A;
  --gold-dark: #A87C00;
  --gold-ink: #3D2C00;
  --ink: #111A2B;
  --ink-2: #39475A;
  --muted: #5B6878;
  --line: #DDE3EA;
  --line-strong: #B8C3CF;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --night: #0C1322;
  --ok-bg: #E1F4E7; --ok-ink: #1B6B3A;
  --warn-bg: #FFF1C7; --warn-ink: #6B4A00;
  --err-bg: #FDE8E6; --err-ink: #9E2418;
  --info-bg: #E6F0FA; --info-ink: #0B4A82;
  --radius: 14px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --team: var(--accent);
  --team-dark: var(--accent-dark);
  --on-team: var(--on-accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }

.h1 { font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: .01em; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; }
.h3 { font-weight: 700; font-size: 1.05rem; }
.lead { color: var(--ink-2); font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.1rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink-2); }
.btn--gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--gold-ink); border-color: var(--gold-dark); }
.btn--gold:hover { background: var(--gold); }
.btn--danger { background: var(--surface); color: var(--err-ink); border-color: #E7B4AE; }
.btn--danger:hover { background: var(--err-bg); }
.btn--stop { background: #B42318; color: #fff; }
.btn--stop:hover { background: #8F1C13; }
.btn--big { min-height: 56px; font-size: 1.15rem; padding: .8rem 1.5rem; }
.btn--block { width: 100%; }
.btn--small { min-height: 34px; padding: .3rem .8rem; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
.link-btn--danger { color: var(--err-ink); }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Notices */
.notice { padding: .8rem 1rem; border-radius: 10px; background: var(--info-bg); color: var(--info-ink); }
.notice--success { background: var(--ok-bg); color: var(--ok-ink); }
.notice--warning { background: var(--warn-bg); color: var(--warn-ink); }
.notice--error { background: var(--err-bg); color: var(--err-ink); }
.notice + .notice { margin-top: .5rem; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label, .label { font-weight: 600; }
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=url], .field input[type=number],
.field input[type=datetime-local], .field input[type=file], .field select, .field textarea {
  font: inherit; padding: .65rem .8rem; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; min-height: 46px;
}
.field input[type=file] { padding: .5rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
.field__help { color: var(--muted); font-size: .875rem; }
.field__error { color: var(--err-ink); font-size: .9rem; font-weight: 600; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--err-ink); }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--accent); flex: none; }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset > legend { padding: 0; margin-bottom: .75rem; }
.input-color { display: flex; gap: .75rem; align-items: center; }
.input-color input[type=color] { width: 56px; height: 46px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 3px; background: var(--surface); }
.color-sample { padding: .5rem .9rem; border-radius: 999px; font-weight: 600; background: var(--accent); color: var(--on-accent); }

/* Cards and tables */
.card { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 1px 2px rgba(17,26,43,.06), 0 0 0 1px rgba(17,26,43,.04); }
@media (min-width: 640px) { .card { padding: 1.5rem; } }
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge--draft { background: var(--info-bg); color: var(--info-ink); }
.badge--open { background: #D8F5E1; color: #136B33; }
.badge--open::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #1FA34A; margin-right: .35rem; vertical-align: .05rem; animation: pulse 1.6s ease-in-out infinite; }
.badge--closed { background: #ECEEF1; color: var(--ink-2); }
.badge--muted { background: #ECEEF1; color: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }

/* Avatars and logos */
.avatar { --size: 48px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--team), var(--team-dark)); color: var(--on-team); font-family: var(--font-display); font-weight: 700; font-size: calc(var(--size) * .38); letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { --size: 36px; }
.avatar--lg { --size: 72px; }
.avatar--xl { --size: 132px; }
.logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.logo--sm { width: 32px; height: 32px; }
.logo--lg { width: 72px; height: 72px; }
.logo-ph { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--team); color: var(--on-team); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.logo-ph--sm { width: 32px; height: 32px; font-size: .8rem; border-radius: 8px; }
.logo-ph--lg { width: 72px; height: 72px; font-size: 1.6rem; border-radius: 16px; }
.number { font-family: var(--font-display); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ───────────── Public (voters, mobile first) ───────────── */
.page-public { background: var(--bg); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pub-head { background: var(--accent); color: var(--on-accent); padding: .9rem 1rem; }
.pub-head__inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; }
.pub-head__logo { height: 40px; width: auto; max-width: 120px; object-fit: contain; }
.pub-head__club { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; }
.pub-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem 7rem; }
.pub-main--plain { padding-bottom: 2rem; }
.pub-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem 2rem; }
.pub-foot a { color: var(--muted); }
.pub-foot__links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.hero { text-align: center; padding: 1.25rem .5rem .5rem; }
.hero__kicker { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--gold-dark); }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.05; margin-top: .25rem; }
.hero__text { color: var(--ink-2); margin-top: .5rem; }
.crown { color: var(--gold); width: 1.4em; height: 1.4em; }
.crown--big { width: 72px; height: 72px; filter: drop-shadow(0 4px 10px rgba(242,183,5,.35)); }

.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; background: var(--surface); border-radius: var(--radius); padding: 1rem .75rem; box-shadow: 0 1px 2px rgba(17,26,43,.06); margin-top: 1rem; }
.matchup__team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; min-width: 0; }
.matchup__name { font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.matchup__vs { font-family: var(--font-display); font-weight: 700; color: var(--muted); font-size: 1.1rem; }
.matchup__meta { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .25rem; }

.ballot-team { margin-top: 1.5rem; }
.ballot-team__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.ballot-team__title { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.ballot-team__title small { display: block; font-family: var(--font); font-weight: 500; font-size: .85rem; color: var(--muted); }

.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 560px) { .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; padding: .9rem .5rem .8rem; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); transition: border-color .12s, box-shadow .12s, transform .12s; height: 100%; }
.pick__card .avatar { --size: 72px; }
.pick__name { font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.pick__meta { font-size: .8rem; color: var(--muted); }
.pick__check { position: absolute; top: .45rem; right: .45rem; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }
.pick input:checked + .pick__card { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,183,5,.35), 0 6px 16px rgba(17,26,43,.12); transform: translateY(-2px); }
.pick input:checked + .pick__card .pick__check { opacity: 1; transform: scale(1); }
.pick input:focus-visible + .pick__card { outline: 3px solid var(--accent); outline-offset: 2px; }

.vote-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); z-index: 20; }
.vote-bar__inner { max-width: 760px; margin: 0 auto; }
.vote-bar__status { text-align: center; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }

.thanks { text-align: center; padding: 2rem 1rem 1rem; }
.thanks__title { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; margin-top: .5rem; }
.choice-list { display: grid; gap: .6rem; margin-top: 1.25rem; text-align: left; }
.choice { display: flex; align-items: center; gap: .75rem; background: var(--surface); border-radius: var(--radius); padding: .75rem 1rem; }
.choice__team { font-size: .85rem; color: var(--muted); }
.choice__name { font-weight: 700; }

.waiting { text-align: center; padding: 2.5rem 1rem 1rem; }
.waiting__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.05; margin-top: .75rem; }
.waiting__text { color: var(--ink-2); margin-top: .75rem; max-width: 30rem; margin-left: auto; margin-right: auto; }
.admin-box { margin-top: 1.5rem; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 1rem; text-align: center; background: var(--surface); }

/* ───────────── Results ───────────── */
.results { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .results { grid-template-columns: 1fr 1fr; } }
.results__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.live-dot { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: #136B33; }
.live-dot::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #1FA34A; animation: pulse 1.6s ease-in-out infinite; }

.team-result { background: var(--surface); border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: 0 1px 2px rgba(17,26,43,.06), 0 0 0 1px rgba(17,26,43,.04); }
.team-result__head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; background: var(--team); color: var(--on-team); }
.team-result__name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.team-result__count { font-size: .85rem; opacity: .9; white-space: nowrap; }
.team-result__head .logo { background: #fff; border-radius: 10px; padding: 3px; }

/* The MVP card: the one thing to see at a glance */
.mvp { position: relative; margin: 1rem; padding: 1.25rem 1rem 1.1rem; border-radius: var(--radius); text-align: center; color: var(--gold-ink);
  background: radial-gradient(120% 90% at 50% 0%, #FFF6D6 0%, #FFE58A 55%, #F7C72C 100%); box-shadow: inset 0 0 0 2px rgba(168,124,0,.35), 0 10px 24px rgba(168,124,0,.18); }
.mvp__label { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; background: rgba(61,44,0,.08); padding: .2rem .7rem; border-radius: 999px; }
.mvp__label .crown { color: var(--gold-dark); width: 1.2em; height: 1.2em; }
.mvp__people { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: .9rem; }
.mvp__person { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 0; max-width: 220px; }
.mvp__crown { color: var(--gold-dark); width: 46px; height: 46px; margin-bottom: -18px; position: relative; z-index: 1; filter: drop-shadow(0 2px 2px rgba(255,255,255,.6)); }
.mvp .avatar { --size: 132px; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--gold), 0 10px 22px rgba(61,44,0,.25); }
.mvp__people--tie .avatar { --size: 96px; }
.mvp__name { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1.05; margin-top: .3rem; overflow-wrap: anywhere; }
.mvp__number { font-weight: 600; opacity: .8; }
.mvp__score { display: flex; justify-content: center; align-items: baseline; gap: .5rem; margin-top: .35rem; }
.mvp__percent { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.mvp__votes { font-weight: 600; }
.mvp__tie { display: inline-block; margin-top: .6rem; font-weight: 700; background: var(--gold-ink); color: var(--gold-light); padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.mvp--empty { background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); color: var(--muted); }
.mvp--empty .avatar { --size: 96px; background: #E1E6EC; color: var(--muted); box-shadow: none; }

.ranking { list-style: none; margin: 0; padding: 0 1rem 1rem; }
.ranking__item { display: grid; grid-template-columns: 1.6rem auto 1fr auto; align-items: center; gap: .65rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.ranking__rank { font-family: var(--font-display); font-weight: 700; color: var(--muted); text-align: center; }
.ranking__body { min-width: 0; }
.ranking__name { font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.ranking__name .number { margin-right: .3rem; }
.ranking__value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking__value strong { display: block; font-size: 1.05rem; }
.ranking__value span { font-size: .8rem; color: var(--muted); }
.ranking__item.is-winner .ranking__rank { color: var(--gold-dark); }
.bar { display: block; width: 100%; height: 8px; margin-top: .3rem; border-radius: 999px; overflow: hidden; }
.bar__bg { fill: #E9EDF2; }
.bar__fill { fill: var(--team); }
.is-winner .bar__fill { fill: var(--gold); }

/* Projector view */
.page-present { background: var(--night); color: #fff; min-height: 100vh; }
.present { padding: 2rem clamp(1rem, 3vw, 3rem); max-width: 1600px; margin: 0 auto; }
.present__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.present__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3.5rem); display: flex; align-items: center; gap: .75rem; }
.present__title .crown { width: 1.1em; height: 1.1em; }
.present__tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.present .results { grid-template-columns: 1fr 1fr; gap: 2rem; }
.present .team-result { background: #151F33; box-shadow: none; }
.present .team-result__name { font-size: 2rem; }
.present .mvp .avatar { --size: 200px; }
.present .mvp__name { font-size: 2.6rem; }
.present .mvp__percent { font-size: 3.4rem; }
.present .ranking__item { border-color: #26324A; }
.present .ranking__name { color: #fff; }
.present .ranking__value span, .present .ranking__rank { color: #9AA8BC; }
.present .bar__bg { fill: #26324A; }
.present .results__meta { color: #9AA8BC; }
.present .btn--secondary { background: transparent; color: #fff; border-color: #4A5872; }
@media (max-width: 820px) { .present .results { grid-template-columns: 1fr; } }

/* ───────────── Admin ───────────── */
.page-admin { background: var(--bg); }
.topbar { background: var(--night); color: #fff; position: sticky; top: 0; z-index: 30; }
.topbar__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; }
.topbar__brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }
.topbar__brand .crown { width: 1.3em; height: 1.3em; }
.topbar__nav { display: flex; gap: .15rem; overflow-x: auto; flex: 1; scrollbar-width: none; }
.topbar__nav::-webkit-scrollbar { display: none; }
.topbar__link { color: #C9D2E0; text-decoration: none; padding: .5rem .75rem; border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.topbar__link:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar__link.is-active { color: var(--night); background: var(--gold); }
.topbar__account { display: flex; align-items: center; gap: .5rem; }
.topbar__account form { margin: 0; }
.topbar__logout { background: none; border: 1px solid #3A4862; color: #C9D2E0; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; }
.topbar__logout:hover { color: #fff; border-color: #6A7A98; }
@media (max-width: 760px) {
  .topbar__inner { flex-wrap: wrap; row-gap: .35rem; }
  .topbar__nav { order: 3; flex-basis: 100%; }
  .topbar__account { margin-left: auto; }
}
.admin-main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.admin-main > * + * { margin-top: 1.25rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head .lead { margin-top: .35rem; }
.breadcrumb { font-size: .9rem; margin-bottom: .35rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.layout-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .layout-2 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }

.team-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.team-tile { display: flex; align-items: center; gap: .9rem; padding: 1rem; background: var(--surface); border-radius: var(--radius); text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(17,26,43,.06), 0 0 0 1px rgba(17,26,43,.04); border-left: 5px solid var(--team); }
.team-tile:hover { box-shadow: 0 4px 12px rgba(17,26,43,.1); }
.team-tile__name { font-weight: 700; font-size: 1.1rem; }
.team-tile.is-archived { opacity: .6; }

.player-row { display: flex; align-items: center; gap: .75rem; }
.player-row__name { font-weight: 600; }
.player-row__sub { font-size: .85rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { font-size: .75rem; background: var(--info-bg); color: var(--info-ink); padding: .1rem .5rem; border-radius: 999px; font-weight: 600; }

.lineup { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.lineup__item { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.lineup__item input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); flex: none; }
.lineup__item:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.lineup__name { font-weight: 600; line-height: 1.2; }
.lineup__tools { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: .75rem 0; }

.match-tile { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; padding: 1rem; background: var(--surface); border-radius: var(--radius); text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(17,26,43,.06), 0 0 0 1px rgba(17,26,43,.04); }
.match-tile:hover { box-shadow: 0 4px 12px rgba(17,26,43,.1); }
.match-tile__teams { display: flex; align-items: center; gap: .5rem; font-weight: 700; flex-wrap: wrap; }
.match-tile__meta { color: var(--muted); font-size: .9rem; }
.match-list { display: grid; gap: .6rem; }

.control { border-radius: calc(var(--radius) + 4px); padding: 1.25rem; background: var(--night); color: #fff; }
.control__status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.control__big { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; margin: .75rem 0 .2rem; font-variant-numeric: tabular-nums; }
.control__sub { color: #9AA8BC; font-size: .95rem; }
.control__actions { display: grid; gap: .6rem; margin-top: 1rem; }
.control .btn--secondary { background: transparent; color: #fff; border-color: #4A5872; }
.control .muted { color: #9AA8BC; }

.qr { width: 100%; max-width: 220px; image-rendering: pixelated; border-radius: 8px; background: #fff; }
.copy-field { display: flex; gap: .5rem; }
.copy-field input { flex: 1; min-width: 0; font: inherit; padding: .55rem .7rem; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--bg); }

.checklist { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.checklist li { counter-increment: step; display: flex; gap: .75rem; align-items: flex-start; }
.checklist li::before { content: counter(step); flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }

.dangerzone { border: 1.5px solid #F1C7C2; }
details.disclosure > summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "＋ "; }
details.disclosure[open] > summary::before { content: "－ "; }
details.disclosure[open] > summary { margin-bottom: .75rem; }

/* Auth & install */
.page-auth { background: var(--night); min-height: 100vh; }
.auth { max-width: 440px; margin: 0 auto; padding: 2.5rem 1rem; }
.page-auth--wide .auth { max-width: 680px; }
.auth__brand { display: flex; align-items: center; justify-content: center; gap: .6rem; color: #fff; margin-bottom: 1.25rem; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.auth__brand .crown { width: 1.4em; height: 1.4em; }
.auth__logo { height: 44px; width: auto; }
.auth__footer { text-align: center; color: #8592A6; font-size: .85rem; margin-top: 1rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.checks__item { display: flex; gap: .5rem; align-items: center; }
.checks__icon { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.is-ok .checks__icon { background: var(--ok-bg); color: var(--ok-ink); }
.is-fail .checks__icon { background: var(--err-bg); color: var(--err-ink); }
.debug { white-space: pre-wrap; background: var(--bg); padding: .75rem; border-radius: 8px; font-size: .85rem; }

/* Poster */
.poster { background: #fff; max-width: 720px; margin: 0 auto; padding: 2.5rem 2rem; text-align: center; border-radius: var(--radius); }
.poster__logo { height: 90px; width: auto; }
.poster__title { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: 1; margin-top: 1rem; }
.poster__text { font-size: 1.25rem; color: var(--ink-2); margin-top: 1rem; }
.poster__qr { width: 70%; max-width: 420px; margin-top: 1.5rem; image-rendering: pixelated; }
.poster__url { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin-top: .5rem; overflow-wrap: anywhere; }
.poster .crown { width: 64px; height: 64px; }
@media print {
  .no-print, .topbar, .pub-foot { display: none !important; }
  body, .page-admin { background: #fff; }
  .admin-main { padding: 0; }
  .poster { box-shadow: none; padding: 1cm; }
}
