:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f2;
  --live: #dc2626;
  --ok: #15803d;
  --ok-soft: #e8f5ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --err: #b91c1c;
  --err-soft: #fdecec;
  --info: #1d4ed8;
  --info-soft: #e8eefc;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
p { margin: .4rem 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; }
.right { float: right; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem 1.2rem; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--accent); color: #fff; border-radius: 7px; padding: .1rem .35rem; font-size: .8rem; letter-spacing: .04em; }
.topnav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .92rem; }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

/* buttons & forms */
.btn, button.btn, input[type=submit] { display: inline-flex; align-items: center; gap: .35rem; background: var(--accent);
  color: var(--accent-ink); border: 1px solid var(--accent); padding: .5rem .9rem; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-ghost, button.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line-2); }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-ghost.btn-danger { background: var(--panel); color: var(--err); border-color: #f1b7b7; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=url], input[type=file], select, textarea {
  font: inherit; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  color: var(--ink); max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { width: 100%; }
label { font-weight: 600; font-size: .9rem; }
.field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.field input:not([type=checkbox]):not([type=radio]), .field select { width: 100%; max-width: 28rem; }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field .help { color: var(--muted); font-size: .82rem; font-weight: 400; }
.errorlist { color: var(--err); margin: .2rem 0; padding-left: 1rem; font-size: .85rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.row-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.row-form .field { margin-bottom: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .3rem; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
  box-shadow: var(--shadow); margin-bottom: 1rem; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.stat { font-size: 1.8rem; font-weight: 700; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* messages & badges */
.messages { margin-bottom: 1rem; }
.msg { padding: .6rem .9rem; border-radius: 8px; margin-bottom: .5rem; background: var(--info-soft); color: #1e3a8a; }
.msg-success { background: var(--ok-soft); color: #14532d; }
.msg-error { background: var(--err-soft); color: #7f1d1d; }
.msg-warning { background: var(--warn-soft); color: #78350f; }
.callout { padding: .7rem 1rem; border-radius: 8px; background: var(--warn-soft); color: #78350f; margin: .6rem 0; }
.callout.err { background: var(--err-soft); color: #7f1d1d; }
.callout.ok { background: var(--ok-soft); color: #14532d; }
.callout.info { background: var(--info-soft); color: #1e3a8a; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; background: #eef0f3; color: var(--ink-2); vertical-align: middle; }
.badge-live { background: #fde8e8; color: var(--live); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.dot-live::before { content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--live);
  border-radius: 50%; margin-right: .35rem; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* manage layout */
.manage { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 53px); }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 1rem .7rem; position: sticky; top: 53px;
  height: calc(100vh - 53px); overflow-y: auto; }
.side-head { padding: 0 .5rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.side-title { font-weight: 700; margin-bottom: .3rem; }
.side-meta { font-size: .8rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.side-nav a { display: flex; align-items: center; gap: .5rem; padding: .42rem .55rem; border-radius: 7px; color: var(--ink-2); font-size: .92rem; }
.side-nav a:hover { background: var(--bg); text-decoration: none; }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem .55rem .3rem; font-weight: 700; }
.tick { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 1.5px solid var(--line-2); display: inline-flex;
  align-items: center; justify-content: center; font-size: .7rem; flex: none; color: var(--muted); }
.step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.content { padding: 1.4rem 1.8rem 4rem; min-width: 0; }
@media (max-width: 860px) {
  .manage { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .content { padding: 1rem; }
}

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: #fafbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.qualify td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.flag td { background: #fffbeb; }
.standings td.team { font-weight: 600; }

/* games */
.game-list { display: flex; flex-direction: column; gap: .4rem; }
.game-row { display: grid; grid-template-columns: 4.2rem 6.5rem minmax(0, 1fr) auto; gap: .8rem; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; }
.game-row.conflict { border-color: #f59e0b; background: #fffbeb; }
.game-row .meta { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.game-row .num { font-weight: 700; color: var(--ink-2); font-size: .85rem; }
.matchup { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.side { display: flex; justify-content: space-between; gap: .6rem; }
.side .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .score { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 1.6rem; text-align: right; }
.side.win .name, .side.win .score { font-weight: 700; color: var(--ink); }
.side.loss .name, .side.loss .score { color: var(--muted); font-weight: 400; }
.placeholder { color: var(--muted); font-style: italic; }
.note { font-size: .8rem; color: var(--warn); }
@media (max-width: 640px) {
  .game-row { grid-template-columns: 1fr auto; }
  .game-row .when { grid-column: 1 / -1; display: flex; gap: .6rem; }
}

/* schedule grid */
.sched-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.sched-grid th { position: sticky; top: 0; z-index: 2; }
.sched-grid td { border-right: 1px solid var(--line); min-width: 170px; height: 64px; padding: 3px; vertical-align: top; }
.sched-grid td.time { min-width: 64px; width: 64px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; background: #fafbfc; }
.sched-grid td.drop-over, .tray.drop-over { background: var(--accent-soft); }
.card { background: #fff; border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 6px;
  padding: .3rem .45rem; font-size: .8rem; line-height: 1.25; cursor: grab; margin-bottom: 3px; box-shadow: var(--shadow); }
.card.done { border-left-color: var(--ok); opacity: .8; }
.card.conflict { border-left-color: #f59e0b; background: #fffbeb; }
.card.dragging { opacity: .4; }
.card .c-head { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.card .c-teams { font-weight: 600; }
.card .c-stage { color: var(--muted); font-size: .72rem; }
.tray { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 60px; padding: .5rem; border: 2px dashed var(--line-2); border-radius: 8px; }
.tray .card { width: 200px; }
.day-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .6rem; }
.day-tabs a { padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: .88rem; }
.day-tabs a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .5rem .9rem; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* brackets */
.bracket-section { margin: .8rem 0 1.4rem; }
.bracket-section > h4 { margin: 0 0 .5rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bracket { display: flex; gap: 1.6rem; overflow-x: auto; padding-bottom: .5rem; }
.bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: .8rem; min-width: 210px; }
.bracket .col-title { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.match { background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; font-size: .88rem; position: relative; box-shadow: var(--shadow); }
.match .m-head { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); padding: .2rem .5rem; border-bottom: 1px solid var(--line); }
.match .side { padding: .28rem .5rem; }
.match .side + .side { border-top: 1px solid var(--line); }
.match.bye { opacity: .55; }
.match.champion { border-color: var(--accent); }
.list-bracket { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }

/* dashboard */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.actions { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.actions a { display: block; padding: .55rem .8rem; border-radius: 8px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.actions a.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.activity { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.activity li { padding: .35rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; }
.activity .when { color: var(--muted); white-space: nowrap; font-size: .8rem; min-width: 7.5rem; }

/* format picker */
.format-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.format-options label { display: block; border: 1.5px solid var(--line-2); border-radius: 10px; padding: .7rem .8rem; cursor: pointer; background: #fff; font-weight: 600; }
.format-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format-options input { margin-right: .4rem; }
.format-options .desc { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .25rem; }
[data-for] { display: none; }
[data-for].show { display: flex; }

/* public site */
.public-hero { background: linear-gradient(135deg, #0f766e, #115e59); color: #fff; padding: 2rem 1.2rem 0; background-size: cover; background-position: center; }
.public-hero .inner, .public-main { max-width: 1100px; margin: 0 auto; }
.public-hero h1 { font-size: 2rem; }
.public-hero .sub { opacity: .9; }
.public-tabs { display: flex; gap: .2rem; margin-top: 1.4rem; overflow-x: auto; }
.public-tabs a { color: rgba(255,255,255,.85); padding: .6rem 1rem; border-radius: 8px 8px 0 0; font-weight: 600; white-space: nowrap; }
.public-tabs a.on { background: var(--bg); color: var(--ink); }
.public-tabs a:hover { text-decoration: none; color: #fff; }
.public-tabs a.on:hover { color: var(--ink); }
.public-main { padding: 1.4rem 1.2rem 4rem; }
.preview-bar { background: #fef3c7; color: #78350f; text-align: center; padding: .4rem; font-size: .9rem; }
.block { margin-bottom: 1rem; }
.block .body { white-space: pre-line; }
.block img { max-width: 100%; border-radius: 8px; }
.sponsors { display: flex; gap: .6rem; flex-wrap: wrap; }
.sponsors a, .sponsors span { padding: .4rem .8rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.champion-card { display: flex; align-items: center; gap: .8rem; }
.trophy { font-size: 2rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.team-list { columns: 3 220px; padding-left: 1.2rem; }
.qr svg { width: 220px; height: auto; background: #fff; padding: .5rem; border-radius: 8px; border: 1px solid var(--line); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.hero-home { max-width: 980px; margin: 2.5rem auto; padding: 0 1.2rem; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
.auth { max-width: 420px; margin: 3rem auto; }

/* queue board: courts + colour-coded pending games */
.tone-1 { --tone: #7c3aed; --tone-soft: #f3edfe; }  /* Advanced */
.tone-2 { --tone: #d97706; --tone-soft: #fdf3e2; }  /* Intermediate */
.tone-3 { --tone: #16a34a; --tone-soft: #e8f5ec; }  /* Beginner */
.tone-4 { --tone: #2563eb; --tone-soft: #e8eefc; }  /* Upper poule */
.tone-5 { --tone: #db2777; --tone-soft: #fce8f2; }  /* Lower poule */
.tone-6 { --tone: #0891b2; --tone-soft: #e3f5f9; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .12rem .55rem;
  border-radius: 999px; background: var(--tone-soft, #f1f2f4); color: var(--tone, var(--ink-2)); white-space: nowrap;
  border: 1px solid transparent; line-height: 1.4; }

.courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; }
.court { position: relative; display: flex; flex-direction: column; gap: .55rem; min-height: 168px; padding: .7rem .75rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: background .15s, border-color .15s, box-shadow .15s; }
.court.busy { border-top: 5px solid var(--tone, var(--accent)); }
.court.free { border: 2px dashed var(--line-2); background: #fbfcfd; box-shadow: none; }
.court-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.court-name { font-weight: 700; font-size: 1rem; }
.court-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  color: var(--muted); font-size: .85rem; }
.court-empty .plus { font-size: 1.6rem; line-height: 1; color: var(--line-2); font-weight: 300; }
.court-foot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-top: auto; }
.court-foot .btn-sm { padding: .25rem .55rem; }
.court.drop-over, body.picking .court.free { border-color: var(--accent); background: var(--accent-soft); }
body.picking .court.free { cursor: pointer; }
body.picking .court.free .plus { color: var(--accent); }
.court.drop-over { box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
.board-status { margin: .5rem 0 1.2rem; }

.filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip.filter { cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600; padding: .25rem .65rem; background: var(--panel);
  color: var(--ink-2); border-color: var(--line-2); }
.chip.filter .swatch { width: .6rem; height: .6rem; border-radius: 50%; background: var(--tone); }
.chip.filter .count { color: var(--muted); font-weight: 500; }
.chip.filter.on { background: var(--tone-soft, var(--ink)); color: var(--tone, #fff); border-color: var(--tone, var(--ink)); }
.chip.filter.on .count { color: inherit; }

.qlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .55rem; min-height: 3rem; border-radius: 10px; transition: background .15s; }
.qlist.drop-over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: 4px; }
.qcard { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--tone, var(--accent));
  border-radius: 9px; padding: .5rem .65rem .55rem; font-size: .86rem; line-height: 1.3; box-shadow: var(--shadow);
  user-select: none; transition: transform .1s, box-shadow .1s, opacity .1s; }
.qcard[draggable=true] { cursor: grab; }
.qcard[draggable=true]:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.qcard.dragging { opacity: .35; }
.qcard.selected { outline: 3px solid var(--tone, var(--accent)); outline-offset: 1px; background: var(--tone-soft, var(--accent-soft)); }
.qcard.hidden, .wait-row.hidden { display: none; }
.qcard .q-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.qcard .q-round { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.qcard .q-player { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard .q-player + .q-player::before { content: "vs "; color: var(--muted); font-weight: 400; font-size: .78rem; }
.qcard.on-court { border: 0; border-radius: 8px; padding: .45rem .55rem; background: var(--tone-soft); box-shadow: none; }
.qcard.on-court .chip { background: var(--panel); }
.empty-note { grid-column: 1 / -1; }

.wait-row, .done-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .1rem; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--ink); }
.wait-row:last-child, .done-row:last-child { border-bottom: 0; }
.wait-row > :nth-child(2) { flex: 1; }
.done-row:hover { text-decoration: none; background: #fafbfc; }
.done-teams { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-teams .win { font-weight: 700; }
.done-teams .loss { color: var(--muted); }
@media (max-width: 640px) {
  .courts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .court { min-height: 140px; padding: .55rem; }
  .qlist { grid-template-columns: 1fr; }
}

/* result form: one column per game */
.score-table { width: auto; }
.score-table th, .score-table td { padding: .3rem .4rem; vertical-align: middle; }
.score-table th.game-col { font-size: .78rem; color: var(--muted); font-weight: 600; text-align: center; white-space: nowrap; }
.score-table td.game-col input { width: 4.2rem; font-size: 1.2rem; text-align: center; }
.score-table .remove-game { color: var(--muted); font-size: 1rem; line-height: 1; }
.score-table .remove-game:hover { color: var(--err); }
.score-form .multi-note { display: none; }
.score-form.multi .multi-note { display: block; }
.sets { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* on/off switch (queue board auto-queue) */
.head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .8rem .45rem .55rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font: inherit; font-size: .9rem; cursor: pointer; }
.switch:hover { border-color: var(--accent); }
.switch .track { position: relative; width: 2.1rem; height: 1.2rem; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.switch .knob { position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { border-color: var(--accent); color: var(--ink); }
.switch.on .track { background: var(--accent); }
.switch.on .knob { transform: translateX(.9rem); }
.switch.on strong { color: var(--accent); }

.round-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.round-list li { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.round-list li:last-child { border-bottom: 0; }

/* advancement: banner + final check page */
.advance-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1rem; margin-bottom: 1rem; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid #b7ded8; border-left: 5px solid var(--accent); }
.flights { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.flight { border-top: 5px solid var(--tone, var(--accent)); }
.flight-head { display: flex; justify-content: space-between; align-items: baseline; }
.flight-head h2 { margin: 0; color: var(--tone, var(--ink)); }
.upper { text-transform: uppercase; letter-spacing: .05em; margin: .8rem 0 .4rem; }
.matchups { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.matchups li { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seed-line { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .5rem; align-items: center;
  padding: .3rem .55rem; font-size: .86rem; }
.seed-line + .seed-line { border-top: 1px solid var(--line); }
.seed-line .seed-no { font-weight: 700; color: var(--tone, var(--ink-2)); text-align: right; font-variant-numeric: tabular-nums; }
.seed-line .seed-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-line .seed-src { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.seed-line.tie { background: var(--warn-soft); }
.seed-line.bye { background: #fafbfc; }
.tie-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.confirm-bar { position: sticky; bottom: 0; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1.2rem;
  align-items: center; border-top: 3px solid var(--accent); z-index: 5; }
.check-line { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.check-line input { width: 1.1rem; height: 1.1rem; }
