/* Scoresheet look: warm paper, ink rules, one gold signal colour, condensed athletic type. */

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

:root {
  --paper: #f2efe6;
  --paper-2: #e7e2d5;
  --field: #faf8f2;
  --ink: #161614;
  --ink-2: #4a4740;
  --muted: #868174;
  --rule: #d4cdbc;
  --gold: #f0b400;
  --gold-soft: #f7dd8a;
  --gold-text: #7a5a00;
  --red: #c2321b;
  --green: #2e7a3a;
  --team: var(--ink);
  --on-team: var(--paper);
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --r: 3px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --paper: #131311;
    --paper-2: #1d1c19;
    --field: #191815;
    --ink: #ece8dd;
    --ink-2: #bdb8aa;
    --muted: #888376;
    --rule: #34322c;
    --gold-soft: #4a3a08;
    --gold-text: #f5c53a;
    --red: #e2553b;
    --green: #5fae6a;
    color-scheme: dark;
  }
}
/* The scoreboard is always a dark arena board. */
.dark {
  --paper: #0e0e0d;
  --paper-2: #1a1a18;
  --field: #161614;
  --ink: #f1ede3;
  --ink-2: #c9c4b6;
  --muted: #7f7a6e;
  --rule: #2c2b27;
  --gold-text: #f5c53a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
::selection { background: var(--gold); color: #161614; }
.hidden { display: none !important; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--cond); text-transform: uppercase; margin: 0; line-height: 1; }
h1 { font-weight: 800; font-size: 34px; letter-spacing: -.005em; }
h2 { font-weight: 700; font-size: 21px; letter-spacing: .02em; }
h3 { font-weight: 600; font-size: 13px; letter-spacing: .14em; color: var(--muted); }
.label {
  display: block; font: 600 12px/1.1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.cond { font-family: var(--cond); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.quote { font-style: italic; color: var(--ink-2); }
p { margin: 0 0 10px; }
kbd { font: 600 12px var(--cond); letter-spacing: .06em; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: var(--r); padding: 1px 6px; }
code, .mono { font: 500 15px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- controls ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  font: 700 15px/1 var(--cond); letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink); border-radius: var(--r);
  cursor: pointer; user-select: none; touch-action: manipulation; text-decoration: none;
  transition: background-color .12s, color .12s;
}
button:hover, .btn:hover { background: var(--paper-2); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .35; cursor: default; transform: none; background: transparent; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #161614; }
.btn-gold:hover { background: #ffc61a; }
.btn-quiet { border-color: transparent; padding: 0 10px; }
.btn-quiet:hover { background: var(--paper-2); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--paper); }
.btn svg, button svg { width: 18px; height: 18px; flex: none; }

input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: 500 16px/1.2 var(--body); color: var(--ink);
  background: var(--field); border: 1px solid var(--rule); border-bottom: 2px solid var(--ink-2); border-radius: var(--r);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--gold); box-shadow: 0 2px 0 var(--gold); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="color"] { padding: 3px; width: 54px; cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--ink-2); }

/* ---------- frame ---------- */
.mast {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 8px 20px;
  background: var(--paper); border-bottom: 2px solid var(--ink);
}
.mast .grow { flex: 1; min-width: 0; }
.mast .back { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; text-decoration: none; border-radius: var(--r); }
.mast .back:hover { background: var(--paper-2); }
.mast .back svg { width: 22px; height: 22px; }
.mast nav { display: flex; gap: 4px; align-items: center; }
.mast nav a { font: 700 15px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 10px; border-radius: var(--r); }
.mast nav a:hover { background: var(--paper-2); }
.mast-title { font: 800 22px/1 var(--cond); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mast-sub { font: 600 13px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 23px/1 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.wordmark svg { width: 28px; height: 28px; }
.wordmark i { font-style: normal; color: var(--gold-text); }

.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }
.conn.on { background: var(--green); }

.page { max-width: 1180px; margin: 0 auto; padding: 22px 20px 64px; }
.section { border-top: 2px solid var(--ink); padding-top: 14px; margin-top: 34px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.notice { border-left: 4px solid var(--gold); background: var(--paper-2); padding: 14px 16px; margin-bottom: 20px; }
.notice a { font-weight: 600; }
.fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.fields > * { flex: 1 1 160px; }
.fields > .fit { flex: 0 0 auto; }
.fields .label { margin-bottom: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split > .section { margin-top: 0; }
@media (max-width: 900px) {
  /* Phone: the log matters more than tap entry, so it moves up. */
  .split { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .split > div:first-child { display: contents; }
  .split > .section { margin-top: 34px; order: 2; }
  .split .late { order: 3; }
}

/* ---------- tables (box score) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th {
  font: 600 12px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 8px 8px 9px; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
td { padding: 9px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.num { text-align: right; }
td.num { font: 600 17px/1 var(--cond); }
tr.total td { border-top: 1.5px solid var(--ink); border-bottom: none; font-weight: 700; }
tr.total td.num { font-weight: 800; }
td .zero { color: var(--rule); }
tbody tr:hover td { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px;
  background: var(--ink); color: var(--paper); border-radius: var(--r);
  font: 500 15px/1.35 var(--body); box-shadow: 0 6px 24px rgb(0 0 0 / .18);
}
.toast.err { background: var(--red); color: #fff; }

/* ---------- home ---------- */
.strip { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 6px 0 22px; }
.strip-team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.strip-team.right { flex-direction: row-reverse; text-align: right; }
.strip-team .swatch { width: 10px; align-self: stretch; min-height: 54px; background: var(--c, var(--ink)); flex: none; }
.strip-team .nm { font: 800 clamp(26px, 4vw, 44px)/1 var(--cond); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-team .sets { font: 600 14px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.strip-score { font: 800 clamp(56px, 9vw, 96px)/.9 var(--cond); letter-spacing: -.01em; white-space: nowrap; }
.strip-score span { color: var(--muted); padding: 0 .08em; }
.strip-meta { grid-column: 1 / -1; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 12px; }
.strip-meta .label { color: var(--ink-2); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 1px; animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.doors { display: grid; grid-template-columns: 1fr 1.25fr 1fr; border: 2px solid var(--ink); }
.door {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 34px;
  min-height: 250px; padding: 22px 22px 20px; text-decoration: none; color: var(--ink);
  border-left: 2px solid var(--ink); transition: background-color .12s;
}
.door:first-child { border-left: none; }
.door:hover { background: var(--paper-2); }
.door::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--c, transparent); }
.door .big { font: 800 clamp(34px, 4.4vw, 54px)/.92 var(--cond); text-transform: uppercase; overflow-wrap: anywhere; }
.door .go { display: flex; justify-content: space-between; align-items: center; font: 700 15px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.door .go svg { width: 22px; height: 22px; transition: transform .15s; }
.door:hover .go svg { transform: translateX(4px); }
.door.center { background: var(--ink); color: var(--paper); }
.door.center:hover { background: var(--ink-2); }
.door.center .label { color: var(--gold); }
.door.center .go { color: var(--gold); }
@media (max-width: 760px) {
  .strip { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .strip-team, .strip-team.right { flex-direction: row; justify-content: center; }
  .strip-team .swatch { min-height: 30px; width: 8px; }
  .doors { grid-template-columns: 1fr; }
  .door { border-left: none; border-top: 2px solid var(--ink); min-height: 150px; gap: 18px; }
  .door:first-child { border-top: none; }
  .door.center { order: -1; border-top: none; }
  .door.center + .door { border-top: none; }
}
.addr { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.addr a { font-weight: 600; }

/* ---------- scoreboard ---------- */
.board { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.side { position: relative; display: flex; flex-direction: column; padding: 22px 26px 0; border-top: 12px solid var(--c, var(--ink)); }
.side + .side { border-left: 1px solid var(--rule); }
.side-head { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.side-name { font: 800 clamp(22px, 3vw, 34px)/1 var(--cond); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serve { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); flex: none; visibility: hidden; box-shadow: 0 0 0 4px rgb(240 180 0 / .22); }
.side.serving .serve { visibility: visible; }
.pts { font: 800 clamp(130px, 27vw, 360px)/.82 var(--cond); letter-spacing: -.03em; padding: 18px 0 14px; }
.pips { display: flex; gap: 6px; align-items: center; margin-bottom: 22px; }
.pip { width: 26px; height: 8px; background: var(--rule); }
.pip.won { background: var(--c, var(--ink)); }
.plus {
  min-height: 112px; margin: 0 -26px; border: none; border-radius: 0;
  background: var(--c, var(--ink)); color: var(--on-c, var(--paper));
  font: 800 30px/1 var(--cond); letter-spacing: .08em;
}
.plus:hover { background: var(--c, var(--ink)); filter: brightness(1.08); }
.plus:disabled { opacity: .3; background: var(--c, var(--ink)); }
.side.right .plus { margin-left: -26px; }
.board-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.board-bar .sep { flex: 1; }
.sets-line { display: flex; gap: 18px; flex-wrap: wrap; font: 700 16px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.sets-line span b { font-weight: 800; color: var(--ink); }
.sets-line span { color: var(--muted); }
.banner { background: var(--gold); color: #161614; padding: 14px 20px; font: 700 18px/1.2 var(--cond); letter-spacing: .04em; text-transform: uppercase; text-align: center; }
@media (max-width: 640px) { .keys-hint { display: none; } }
.clock-big { font: 800 30px/1 var(--cond); letter-spacing: .02em; }
@media (max-width: 640px) {
  .side { padding: 14px 14px 0; }
  .plus { margin: 0 -14px; min-height: 96px; font-size: 24px; }
  .side.right .plus { margin-left: -14px; }
  .pts { padding: 10px 0 8px; }
}

/* ---------- feed / log ---------- */
.log { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.log li {
  display: grid; grid-template-columns: 50px 52px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline;
  padding: 11px 6px 11px 10px; border-bottom: 1px solid var(--rule); cursor: pointer; position: relative;
}
.log li:hover { background: var(--paper-2); }
.log li.review::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); }
.log li.flash { animation: stamp .9s ease-out; }
@keyframes stamp { from { background: var(--gold-soft); } }
.log .t { font: 600 14px/1 var(--cond); color: var(--muted); }
.log .sc { font: 700 17px/1 var(--cond); }
.log .what { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .what .no { font: 700 15px var(--cond); color: var(--muted); margin-right: 4px; }
.log .res { font: 800 20px/1 var(--cond); text-transform: uppercase; text-align: right; }
.log .meta { grid-column: 3 / 5; display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--muted); min-width: 0; }
.log .meta .quote { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font: 700 11px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); padding: 3px 5px 2px; border-radius: 2px; flex: none; }
.tag.check { color: #161614; background: var(--gold); border-color: var(--gold); }
.tag.team { color: var(--on-c, var(--paper)); background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); }
.log li.empty { display: block; cursor: default; }
.empty { padding: 26px 10px; color: var(--muted); font-style: italic; border-bottom: 1px solid var(--rule); }

/* ---------- stat taker ---------- */
.score-mini { text-align: right; line-height: 1; }
.score-mini .s { font: 800 34px/1 var(--cond); }
.score-mini .s span { color: var(--muted); }
.team-chip { display: inline-block; width: 12px; height: 12px; background: var(--team); margin-right: 8px; vertical-align: 1px; }

.listen {
  width: 100%; min-height: 84px; justify-content: space-between; padding: 0 24px;
  font-size: 22px; letter-spacing: .08em;
  background: var(--gold); border-color: var(--gold); color: #161614;
}
.listen:hover { background: #ffc61a; }
.listen.hold { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.voice-opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.seg { display: inline-flex; flex: 1 1 220px; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.seg button { flex: 1; min-height: 42px; border: none; border-radius: 0; font-size: 14px; padding: 0 10px; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.engine-note { margin: 10px 0 0; }
.warn-inline { color: var(--gold-text); font-weight: 600; }
#micOff { margin-top: 6px; padding: 0; min-height: 32px; font-size: 13px; color: var(--muted); }
.listen svg { width: 30px; height: 30px; }
.listen.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.listen { position: relative; overflow: hidden; }
.listen::after { content: ""; position: absolute; left: 0; bottom: 0; height: 6px; width: calc(var(--level, 0) * 100%); background: rgb(22 22 20 / .45); transition: width .08s linear; }
.listen.on::after { background: var(--red); }
.listen .rec { display: inline-flex; align-items: center; gap: 12px; }
.listen .rec::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); display: none; }
.listen.on .rec::before { display: block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.heard { min-height: 92px; padding: 16px 0 14px; border-bottom: 1px solid var(--rule); }
.heard .text { font: 500 23px/1.3 var(--body); margin-top: 8px; overflow-wrap: anywhere; }
.heard .text.interim { color: var(--muted); font-style: italic; }
.heard .text s { color: var(--muted); text-decoration-thickness: 1.5px; }
.heard .hint { font-size: 15px; color: var(--muted); margin-top: 8px; }

.slip { display: grid; grid-template-columns: 1.4fr 1fr .8fr auto; margin-top: 16px; border: 2px solid var(--ink); position: relative; }
.slip .cell { padding: 10px 14px 12px; border-left: 1.5px solid var(--ink); min-width: 0; }
.slip .cell:first-child { border-left: none; }
.slip .cell .v { font: 800 28px/1.05 var(--cond); text-transform: uppercase; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slip .cell.need { background: var(--gold-soft); }
.slip .cell.need .v { color: var(--gold-text); }
.slip .x { border: none; border-left: 1.5px solid var(--ink); border-radius: 0; min-height: 0; padding: 0 16px; }
.slip .timer { position: absolute; left: 0; bottom: -2px; height: 3px; background: var(--gold); animation: drain linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0; } }
.slip.idle { border-color: var(--rule); }
.slip.idle .cell { border-color: var(--rule); }
.slip.idle .v { color: var(--muted); }
.slip.saved { border-color: var(--ink); }

.type-row { display: flex; gap: 10px; margin-top: 16px; }
.type-row input { flex: 1; }
.opts { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.warn-line { color: var(--red); font-size: 15px; }
.warn-line:not(:empty) { margin-top: 10px; }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.roster button {
  flex-direction: column; gap: 4px; min-height: 76px; padding: 8px 4px;
  border: 1.5px solid var(--rule); background: var(--field); text-transform: none; letter-spacing: 0;
}
.roster button .n { font: 800 32px/.9 var(--cond); }
.roster button .nm { font: 500 13px/1.1 var(--body); color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster button.sel { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.roster button.sel .nm { color: var(--paper); opacity: .8; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.keys button { flex: 1 1 88px; border-width: 1.5px; }
.keys button.sel { background: var(--ink); color: var(--paper); }
.keys.results button { flex: 1 1 64px; min-height: 60px; font-size: 26px; font-weight: 800; background: var(--gold); border-color: var(--gold); color: #161614; }
.keys.results button.sel { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.step { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 8px; }
.step:first-child { margin-top: 0; }

.help table td { white-space: normal; font-size: 15px; }
.help td:first-child { font: 600 16px var(--cond); letter-spacing: .02em; width: 46%; }
details.help > summary { cursor: pointer; list-style: none; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary h2::after { content: " +"; color: var(--muted); }
details.help[open] > summary h2::after { content: " −"; }

/* ---------- sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgb(14 14 13 / .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(680px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-top: 6px solid var(--team); padding: 22px 22px 26px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule); }
.sheet-actions .sep { flex: 1; }
@media (min-width: 760px) { .sheet-bg { align-items: center; } .sheet { border: 2px solid var(--ink); border-top-width: 6px; border-top-color: var(--team); } }

.more-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.more-row button { flex: none; }

/* ---------- setup ---------- */
.team-block { border-top: 2px solid var(--ink); margin-top: 34px; padding-top: 14px; position: relative; }
.team-block::before { content: ""; position: absolute; left: 0; top: -2px; width: 120px; height: 6px; background: var(--c); }
.team-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.team-head input.name { font: 800 30px/1 var(--cond); text-transform: uppercase; border: none; border-bottom: 2px solid transparent; background: transparent; padding: 6px 0; }
.team-head input.name:hover { border-bottom-color: var(--rule); }
.team-head input.name:focus { border-bottom-color: var(--gold); box-shadow: none; }
table.sheet-table td { padding: 2px 4px; }
table.sheet-table input, table.sheet-table select {
  border: 1px solid transparent; background: transparent; min-height: 44px; border-radius: 0;
}
table.sheet-table input:hover, table.sheet-table select:hover { border-color: var(--rule); }
table.sheet-table input:focus, table.sheet-table select:focus { background: var(--field); border-color: var(--rule); border-bottom: 2px solid var(--gold); box-shadow: none; }
table.sheet-table input.no { font: 800 22px/1 var(--cond); text-align: center; }
table.sheet-table tr.add td { padding-top: 10px; border-bottom: none; }
table.sheet-table tr.add input, table.sheet-table tr.add select { background: var(--field); border-color: var(--rule); border-bottom: 2px solid var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 14px; background: var(--field); }
.chip button { min-height: 26px; padding: 0 8px; border: none; font-size: 13px; }

/* ---------- report ---------- */
.box-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.box-head .swatch { width: 12px; height: 30px; background: var(--c); }
.set-scores { display: flex; gap: 0; border: 1.5px solid var(--ink); width: max-content; max-width: 100%; overflow-x: auto; }
.set-scores div { padding: 8px 14px; border-left: 1px solid var(--rule); text-align: center; }
.set-scores div:first-child { border-left: none; }
.set-scores .v { font: 800 22px/1 var(--cond); margin-top: 4px; white-space: nowrap; }
.legend { columns: 3 220px; column-gap: 28px; font-size: 14px; color: var(--ink-2); margin-top: 16px; }
.legend div { break-inside: avoid; padding: 2px 0; }
.legend b { font: 700 14px var(--cond); letter-spacing: .06em; display: inline-block; min-width: 56px; color: var(--ink); }

/* ---------- login ---------- */
.login { max-width: 420px; margin: 0 auto; padding: 14vh 22px 40px; }
.login .wordmark { font-size: 40px; margin-bottom: 34px; }
.login .wordmark svg { width: 40px; height: 40px; }
