/* ScoutIQ — stadium-night palette, scoreboard type. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; 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"); }

:root {
  --bg: #f2f4f1;
  --surface: #ffffff;
  --sunken: #e6eae5;
  --ink: #17222e;
  --muted: #5a6875;
  --line: #cfd6d2;
  --run: #b88700;        /* goal-post yellow, darkened for text on light */
  --run-fill: #f2c230;
  --pass: #2f78ad;
  --pass-fill: #74b4de;
  --warn: #b5432c;
  --warn-bg: #fbe9e4;
  --ok: #2d7a4f;
  --focus: #2f78ad;
  --board: #13202c; --board-2: #1b2b3a; --board-ink: #f3f5f2; --board-muted: #a9b8c4; --board-line: #33475a;
  --radius-s: 4px;
  --radius-m: 8px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15212d; --surface: #1d2c3b; --sunken: #122030; --ink: #edf1ee; --muted: #9db0bf;
    --line: #2f4356; --run: #f2c230; --run-fill: #f2c230; --pass: #74b4de; --pass-fill: #74b4de;
    --warn: #f0937e; --warn-bg: #3a2522; --ok: #7fcf9f; --focus: #f2c230; color-scheme: dark;
    --board: #0c151e; --board-2: #142230; --board-line: #2a3d50;
  }
}
:root[data-theme="dark"] {
  --bg: #15212d; --surface: #1d2c3b; --sunken: #122030; --ink: #edf1ee; --muted: #9db0bf;
  --line: #2f4356; --run: #f2c230; --run-fill: #f2c230; --pass: #74b4de; --pass-fill: #74b4de;
  --warn: #f0937e; --warn-bg: #3a2522; --ok: #7fcf9f; --focus: #f2c230; color-scheme: dark;
    --board: #0c151e; --board-2: #142230; --board-line: #2a3d50;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0 0 .5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .75rem; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem;
  border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: .01em; text-decoration: none; }
.brand span { color: var(--run); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { padding: .4rem .75rem; border-radius: var(--radius-s); text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunken); }
.nav a:hover { color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--muted); }
.who select { font: inherit; }
main { padding: 1.25rem; max-width: 1800px; margin: 0 auto; }

/* controls */
button, .btn {
  font: inherit; font-weight: 600; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); padding: .5rem .9rem; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px;
}
button:hover { border-color: var(--muted); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.danger { color: var(--warn); border-color: var(--warn); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--pass); text-decoration: underline; font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: .45rem .6rem; min-height: 40px;
}
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
label { font-weight: 500; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field > span { font-size: .875rem; color: var(--muted); font-weight: 500; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-width: 3rem; justify-content: center; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* press box: game-cast layout — scoreboard strip, field left, information right */
.switch { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 0; }
.games-box { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); padding: .25rem .5rem; }
.games-box .season { font-weight: 600; font-size: .875rem; color: var(--muted); margin: .5rem 0 .2rem; }
.games-box label { display: flex; gap: .5rem; align-items: center; font-weight: 400; padding: .25rem 0; }
.games-box time { margin-left: auto; color: var(--muted); font-size: .875rem; white-space: nowrap; padding-left: .5rem; }

.gc { display: grid; gap: .9rem; }
.gc-bar { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; background: var(--board); color: var(--board-ink);
  border-radius: var(--radius-m); padding: .5rem .6rem; }
.gc-opp select { background: var(--board-2); color: var(--board-ink); border-color: var(--board-line); font-family: var(--display);
  font-weight: 600; font-size: 1.3rem; min-height: 44px; max-width: min(100%, 26rem); }
.gc-opp option { background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 1rem; }
.gc-sides { display: inline-flex; background: var(--board-2); border: 1px solid var(--board-line); border-radius: var(--radius-s); padding: 3px; gap: 3px; }
.gc-sides button { border: 0; background: transparent; color: var(--board-muted); min-height: 38px; font-family: var(--display);
  font-size: 1.1rem; letter-spacing: .03em; text-transform: uppercase; padding: .2rem .9rem; }
.gc-sides button:hover { color: var(--board-ink); }
.gc-sides button[aria-pressed="true"] { background: var(--run-fill); color: #14202b; }
.gc-chip { margin-left: auto; background: transparent; color: var(--board-ink); border-color: var(--board-line); font-weight: 500; }
.gc-fs { margin-left: 0; }
.gc-chip:hover { border-color: var(--board-muted); }

.gc-main { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); gap: 1rem; align-items: start; }
.gc-left, .gc-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; min-width: 0; }
.gc-board { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem 1.2rem;
  background: var(--board); color: var(--board-ink); padding: .6rem .8rem .55rem; }
.gc-sit { min-width: 11rem; align-self: center; }
.gc-dd { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: .95; text-transform: uppercase; white-space: nowrap; }
.gc-spot { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--board-muted); margin-top: .2rem; }
.gc-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: .55rem .7rem; flex: 1 1 32rem; }
.gc-tool { display: flex; flex-direction: column; gap: .2rem; }
.gc-tool-l { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--board-muted); font-weight: 600; }
.gc-board .seg { display: flex; background: var(--board-2); border-color: var(--board-line); }
.gc-board .seg button { background: transparent; color: var(--board-ink); min-height: 40px; min-width: 2.5rem; padding: 0 .5rem;
  font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.gc-board .seg button + button { border-left-color: var(--board-line); }
.gc-board .seg button:hover { background: #ffffff12; }
.gc-board .seg button[aria-pressed="true"] { background: var(--run-fill); color: #14202b; }
.gc-board input { background: var(--board-2); color: var(--board-ink); border-color: var(--board-line); min-height: 40px; }
.gc-board input::placeholder { color: var(--board-muted); }
.gc-board datalist { display: none; }
.gc-tool input[type="search"] { width: 9rem; }
.gc-dist { display: grid; grid-template-columns: 36px 3.2rem 36px; }
.gc-dist button { justify-content: center; font-size: 1.25rem; padding: 0; min-height: 40px; background: var(--board-2); color: var(--board-ink);
  border-color: var(--board-line); border-radius: var(--radius-s) 0 0 var(--radius-s); }
.gc-dist button:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.gc-dist input { border-radius: 0; border-left: 0; border-right: 0; text-align: center; font-family: var(--display); font-size: 1.3rem;
  font-weight: 600; width: 100%; padding: 0; -moz-appearance: textfield; }
.gc-dist input::-webkit-inner-spin-button, .gc-dist input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gc-acts { display: flex; gap: .45rem; align-items: flex-end; }
.gc-reset { background: transparent; color: var(--board-muted); border-color: var(--board-line); min-height: 40px; }
.gc-reset:hover { color: var(--board-ink); border-color: var(--board-muted); }
.gc-go { background: var(--run-fill); color: #14202b; border-color: var(--run-fill); min-height: 40px; min-width: 3.6rem; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .04em; }
.gc-go:hover { filter: brightness(1.08); border-color: var(--run-fill); }
.gc-field { background: var(--board); padding: .6rem .6rem .5rem; }
.gc-field-svg { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 534; cursor: crosshair; touch-action: pan-y;
  border-radius: 6px; user-select: none; -webkit-user-select: none; }
.gc-field-svg:focus-visible { outline: 3px solid var(--run-fill); outline-offset: 3px; }

/* the field drawing (colors stay grass green in both themes) */
.f-grass { fill: #2f7d45; }
.f-stripe { fill: #358a4c; }
.f-ez { fill: #245f36; }
.f-ez-text { fill: #ffffffd0; font-family: var(--display); font-weight: 700; font-size: 58px; letter-spacing: 6px; text-anchor: middle; dominant-baseline: middle; }
.f-line { stroke: #ffffffa8; stroke-width: 2.5; }
.f-tick { stroke: #ffffffb0; stroke-width: 2; }
.f-goal { stroke: #fff; stroke-width: 5; }
.f-edge { fill: none; stroke: #fff; stroke-width: 3; }
.f-num { fill: #ffffffd8; font-family: var(--display); font-weight: 600; font-size: 52px; text-anchor: middle; }
.f-arrow { fill: #ffffffb8; }
.f-band { fill: #ffffff14; visibility: hidden; pointer-events: none; }
.f-ghost { stroke: #ffffffd0; stroke-width: 3; stroke-dasharray: 10 8; visibility: hidden; pointer-events: none; }
.f-ghost-tag { fill: #fff; font-family: var(--display); font-weight: 600; font-size: 30px; text-anchor: middle; paint-order: stroke;
  stroke: #173b28; stroke-width: 6px; visibility: hidden; pointer-events: none; }
.f-los { stroke: #3d8bfd; stroke-width: 6; pointer-events: none; }
.f-fd { stroke: #f2c230; stroke-width: 6; }
.f-fd-tab rect { fill: #f2c230; }
.f-fd-tab text { fill: #14202b; font-family: var(--display); font-weight: 700; font-size: 24px; text-anchor: middle; }
.f-fd-hit { fill: transparent; cursor: ew-resize; }
.f-fd-tab { cursor: ew-resize; }
.f-ball { pointer-events: none; }
.f-ball ellipse { fill: #8a4a1c; stroke: #fff; stroke-width: 3; }
.f-laces { stroke: #fff; stroke-width: 2.5; }

/* information panel */
.gc-tabs { display: flex; background: var(--board); }
.gc-tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; color: var(--board-muted); min-height: 46px;
  border-bottom: 3px solid transparent; justify-content: center; font-family: var(--display); font-size: 1.1rem; letter-spacing: .05em; text-transform: uppercase; }
.gc-tabs button:hover { color: var(--board-ink); }
.gc-tabs button[aria-selected="true"] { color: var(--board-ink); border-bottom-color: var(--run-fill); }
.gc-pane { padding: .2rem 1rem 1rem; }
.gc-info.busy .gc-pane { opacity: .6; transition: opacity .15s; }
.gc-head { padding: .75rem 0 .1rem; }
.gc-head-title { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.gc-sec { margin-top: .85rem; }
.gc-sec > h3 { margin: 0 -1rem .55rem; padding: .35rem 1rem; background: var(--sunken); font-size: .95rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rp-row { display: grid; grid-template-columns: 7.2rem auto minmax(3rem, 1fr) auto; align-items: center; gap: .6rem; padding: .35rem 0; }
.rp-name { font-weight: 600; display: flex; flex-direction: column; line-height: 1.15; }
.rp-name span { font-weight: 400; font-size: .825rem; color: var(--muted); }
.rp-range { color: var(--pass); font-weight: 500; margin: .1rem 0 .3rem; }
.rp-name .badge { align-self: start; margin-top: .2rem; font-size: .72rem; color: var(--warn); font-weight: 600; }
.rp-run, .rp-pass { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.rp-pass { text-align: right; }
.rp-run b, .rp-pass b { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.rp-run b { color: var(--run); }
.rp-pass b { color: var(--pass); }
.rp-row.big .rp-run b, .rp-row.big .rp-pass b { font-size: 2.3rem; }
.rp-row .bar { margin: 0; }
.rp-row.big .bar { height: 18px; border-radius: 9px; }
.rp-none { grid-column: 2 / -1; font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--muted); }
.rp-none.plain { font-family: var(--font); font-size: .9rem; font-weight: 400; }
.bk-tabs { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .4rem; }
.bk-tabs button { min-height: 34px; padding: .2rem .65rem; font-size: .85rem; white-space: nowrap; border-radius: 999px; font-weight: 500; }
.bk-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gc-bk td:first-child { overflow-wrap: anywhere; }
.gc-bk td.share { width: 22%; position: relative; }
.gc-bk .meter { display: block; margin: .25rem 0 0 auto; height: 5px; }
.gc-notes { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.gc-notes p { margin: 0 0 .35rem; }
.gc-notes summary { cursor: pointer; }
.gc-inc { list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .925rem; }
.gc-inc li { display: flex; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.gc-inc time { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .45rem; border-radius: var(--radius-s); background: var(--warn-bg); color: var(--warn); }
.bar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; background: var(--sunken); margin-bottom: .35rem; }
.bar .r { background: var(--run-fill); }
.bar .p { background: var(--pass-fill); }
.empty { padding: 1.5rem 0; font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: .925rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; }
td.num, th.num { text-align: right; }
.meter { display: inline-block; height: 8px; background: var(--muted); opacity: .35; border-radius: 4px; vertical-align: middle; }

@media (min-width: 1100px) and (min-height: 820px) {
  .gc-left { position: sticky; top: 4.4rem; }
}
@media (max-width: 1000px) {
  .gc-main { grid-template-columns: minmax(0, 1.3fr) minmax(290px, 1fr); gap: .6rem; }
  main { padding: .75rem; }
}
@media (max-width: 700px) {
  .gc-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .gc-tools { justify-content: flex-start; }
  .gc-tool input[type="search"] { width: 7rem; }
  .gc-chip { margin-left: 0; }
  .gc-bar { padding: .5rem; }
  .gc-opp, .gc-opp select { width: 100%; max-width: none; }
  .gc-sides { width: 100%; }
  .gc-sides button { flex: 1; padding: .2rem .4rem; }
  .rp-row { grid-template-columns: auto minmax(2rem, 1fr) auto; gap: .2rem .5rem; }
  .rp-name { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
  .rp-none { grid-column: 1 / -1; }
  .rp-row.big .rp-run b, .rp-row.big .rp-pass b { font-size: 1.8rem; }
  .gc-board { padding: .5rem .7rem; }
  .gc-field { padding: .4rem; }
}

/* alerts */
.alert { border: 1px solid var(--warn); background: var(--warn-bg); color: var(--ink); border-radius: var(--radius-m); padding: .75rem 1rem; margin-bottom: 1rem; }
.alert.ok { border-color: var(--ok); background: transparent; }
.alert strong { display: block; margin-bottom: .2rem; }
.blocking { list-style: none; padding: 0; margin: .3rem 0 0; }
.blocking li { padding: .3rem 0; border-top: 1px solid var(--line); }
.blocking li:first-child { border-top: 0; }

/* import */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.section > h2 { display: flex; gap: .6rem; align-items: baseline; }
.step { font-family: var(--display); color: var(--muted); font-weight: 600; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 2rem; text-align: center; }
.drop.over { border-color: var(--ink); background: var(--sunken); }
.group { border-top: 1px solid var(--line); padding: 1rem 0; }
.group:first-of-type { border-top: 0; }
.group-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.group-head h3 { margin: 0; }
.counts { font-size: .9rem; color: var(--muted); }
.gnote { font-size: .875rem; color: var(--warn); margin: .3rem 0; }
.game { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto auto; gap: .75rem; align-items: end; padding: .6rem 0; }
.game .lbl { font-weight: 600; }
.conflict { grid-column: 1 / -1; border: 1px solid var(--warn); border-radius: var(--radius-s); padding: .6rem .75rem; background: var(--warn-bg); }
.conflict.info { border-color: var(--ok); background: transparent; }
.conflict label { display: flex; gap: .5rem; align-items: center; font-weight: 400; padding: .15rem 0; }
.rows-table { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: .5rem; }
.rows-table table { font-size: .85rem; }
.rows-table thead th { position: sticky; top: 0; background: var(--surface); }
.rows-table tr.hint td { border-top: 2px solid var(--run-fill); }
.hint-tag { font-size: .75rem; color: var(--run); font-weight: 600; display: block; }
.summary-table td, .summary-table th { white-space: nowrap; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.receipt dt { font-weight: 600; }
.receipt dd { margin: 0 0 .5rem; }
.toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: var(--radius-m); z-index: 20; }

@media (max-width: 900px) {
  .game { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  main { padding: .75rem 16px; }
  .topbar { flex-wrap: wrap; gap: .5rem; padding: .5rem 16px; }
  .who { margin-left: 0; width: 100%; }
  .game { grid-template-columns: 1fr; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar { position: static; padding-top: max(.15rem, env(safe-area-inset-top)); padding-bottom: .15rem; gap: .75rem; }
  .brand { font-size: 1.15rem; }
  .nav a { padding: .2rem .5rem; font-size: .875rem; }
  main { padding-top: .4rem; padding-bottom: max(.4rem, env(safe-area-inset-bottom)); }
  .gc { gap: .4rem; }
  .gc-bar { padding: .25rem .35rem; gap: .3rem .5rem; flex-wrap: nowrap; }
  .gc-opp { min-width: 0; flex: 1 1 auto; }
  .gc-opp select { font-size: 1rem; min-height: 32px; width: 100%; }
  .gc-sides { padding: 2px; }
  .gc-sides button { min-height: 28px; font-size: .95rem; padding: .1rem .55rem; }
  .gc-chip { min-height: 32px; padding: .2rem .55rem; font-size: .85rem; white-space: nowrap; }
  .gc-main { gap: .4rem; }
  .gc-board { padding: .3rem .4rem; gap: .3rem .5rem; align-items: center; justify-content: flex-start; }
  .gc-sit { min-width: 0; display: flex; align-items: baseline; gap: .4rem; }
  .gc-dd { font-size: 1.35rem; }
  .gc-spot { display: none; }
  .gc-tools { gap: .3rem .35rem; justify-content: flex-start; flex: 1 1 auto; }
  .gc-tool-l { display: none; }
  .gc-board .seg button, .gc-dist button, .gc-board input, .gc-go, .gc-reset { min-height: 32px; }
  .gc-board .seg button { min-width: 1.85rem; padding: 0 .3rem; font-size: .95rem; }
  .gc-dist { grid-template-columns: 28px 2.3rem 28px; }
  .gc-dist input { font-size: 1.05rem; }
  .gc-tool input[type="search"] { width: 5.5rem; }
  .gc-go { min-width: 2.8rem; font-size: 1.05rem; padding: 0 .5rem; }
  .gc-reset { padding: 0 .5rem; font-size: .85rem; }
  .gc-field { padding: .25rem; }
  /* the tendencies scroll on their own so the field stays in view */
  .gc-info { max-height: calc(100dvh - 5.6rem); overflow-y: auto; }
  .gc-tabs { position: sticky; top: 0; z-index: 1; }
  .gc-tabs button { min-height: 34px; font-size: .95rem; }
  /* Press box sideways on a phone: the field needs the height; turn upright for the menu. */
  body[data-route="press"] .topbar { display: none; }
  body[data-route="press"] main { padding-top: max(.4rem, env(safe-area-inset-top)); }
  .gc-info { max-height: calc(100dvh - 3.6rem); }
}
/* Home-screen app: keep clear of the notch and the home indicator. */
.topbar { padding-top: max(.6rem, env(safe-area-inset-top)); padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }
main { padding-left: max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
@media (max-width: 1000px) { main { padding-left: max(.75rem, env(safe-area-inset-left)); padding-right: max(.75rem, env(safe-area-inset-right)); } }
.install-help { max-width: 460px; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); }
.install-help ol { padding-left: 1.2rem; }
.install-help li { margin-bottom: .45rem; }
