/* Flat, and in colour. Two panels on a tinted plane, the plot and the team list, outlined rather than lifted:
   nothing on any page casts a shadow except what really floats (menus, tooltips, dialogs), and no button is
   raised or bevelled. What is chosen is a white chip on a grey track, edged by a hairline instead of a shadow.
   The blue stays where it always was, in small doses: the brand mark, the sweep, the tab underline, links, light
   blue washes. Colour inside the plot belongs to the curves alone. (On 2026-11-01 the pages went grey for an
   afternoon, then deep blue: chosen buttons filled solid with the accent read far heavier than the same blue in
   a mark or a line.) */
:root {
  color-scheme: light dark;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  /* DIN-style figures, as on meters and nameplates; ships with Windows, so no web font is fetched. */
  --font-num: Bahnschrift, "DIN Alternate", "Roboto Condensed", "Segoe UI", "Microsoft YaHei UI", sans-serif;

  --plane: #eef1f6;
  --aura: rgba(47, 84, 209, .13);
  --surface: #ffffff;
  --ink: #111a2c;
  --ink-2: #46516a;
  --muted: #6b7590;
  --grid: #eef1f6;
  --axis: #cdd4e0;
  --hairline: rgba(17, 26, 44, .09);
  --wash: rgba(17, 26, 44, .05);
  --track: rgba(17, 26, 44, .065);
  --band: rgba(250, 178, 25, .16);
  --brush: rgba(47, 84, 209, .1);
  --accent: #2f54d1;
  --accent-2: #12b5cb;
  --on-accent: #ffffff;
  /* Only menus, tooltips and dialogs float, and only they cast a shadow. */
  --shadow-pop: 0 10px 28px -10px rgba(17, 26, 44, .28);
  --row-tint: 7%;

  --good: #0ca30c;
  --warn: #fab219;
  --critical: #d03b3b;
  --up: #006300;
  --down: #c22f2f;
  /* For a small mark rather than a figure: --up is dark enough there to pass for black. */
  --mark-up: #0ca30c;

  /* Categorical order is fixed; it is what keeps neighbouring hues apart for colour-blind readers. */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
  /* One hue, light to dark, for how dense submissions are; the light end recedes into the surface. */
  --heat-lo: #e7f0fc;
  --heat-hi: #0d366b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --plane: #0a0e15;
    --aura: rgba(96, 128, 255, .17);
    --surface: #121823;
    --ink: #eef2fb;
    --ink-2: #b4bdd0;
    --muted: #808ba5;
    --grid: #1b2330;
    --axis: #303b4f;
    --hairline: rgba(255, 255, 255, .08);
    --wash: rgba(255, 255, 255, .06);
    --track: rgba(255, 255, 255, .07);
    --band: rgba(250, 178, 25, .13);
    --brush: rgba(127, 156, 255, .16);
    --accent: #7f9cff;
    --accent-2: #37d6e6;
    --on-accent: #0a0e15;
    --shadow-pop: 0 14px 36px -10px rgba(0, 0, 0, .8);
    --row-tint: 13%;
    --up: #35b535;
    --down: #ee6b6b;
    --mark-up: #35b535;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
    --heat-lo: #18243a;
    --heat-hi: #a9cdf7;
  }
}

* { box-sizing: border-box; }
/* On a phone the layout is the zoom level: panning only, so no pinch and no double-tap zoom. (Zooming into a
   focused field is a separate habit of iOS, dealt with at the end of this file.) */
html { touch-action: pan-x pan-y; }
[hidden] { display: none !important; }
body {
  margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(960px 440px at 10% -12%, var(--aura), transparent 70%) fixed, var(--plane);
  color: var(--ink); font: 12px/1.45 var(--font-ui);
}
button, input { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
button { border: 0; padding: 0; background: none; cursor: pointer; }
button, a, summary, .picker-option { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p, ol, dl, dd { margin: 0; padding: 0; }
ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }
.num, .value, .gap, time { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }


/* Header: brand, the contest on show, one tab per problem, collector status. */
.bar { flex: none; height: 44px; padding: 0 10px 0 14px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font: 600 14px var(--font-num); letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); fill: none; stroke: var(--on-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* Chips in the bar, flat on the plane: the contest switch and the links to the other pages. */
.contest, .bar-link { display: inline-flex; align-items: center; height: 26px; border: 1px solid var(--hairline); border-radius: 13px; background: var(--surface); white-space: nowrap; transition: background-color .15s, color .15s; }
.contest:hover { background: var(--brush); }
/* The contest's name is also the way to the others. */
.contest { gap: 5px; max-width: 250px; padding: 0 6px 0 10px; font-weight: 600; }
.contest span { overflow: hidden; text-overflow: ellipsis; }
.chevron { flex: none; width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contest:hover .chevron, .contest-line:hover .chevron { stroke: var(--ink); }
/* Both belong to phones, where the name has no room in the bar: the mark stands in for it there, and the name
   itself heads the plot. */
.contest-mark, .contest-line { display: none; }
/* When the tabs outgrow the bar they scroll sideways: by wheel, by touch, or with the arrow that shows at
   whichever end has more. The tabs fade out under an arrow. */
.strip { position: relative; min-width: 0; height: 100%; display: flex; align-items: center; }
.tabs {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 1px; height: 100%; padding: 0 2px;
  overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 34px;
  mask-image: linear-gradient(90deg, transparent, #000 var(--fade-left, 0px), #000 calc(100% - var(--fade-right, 0px)), transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.strip[data-more~="left"] .tabs { --fade-left: 46px; }
.strip[data-more~="right"] .tabs { --fade-right: 46px; }
.strip-arrow { position: absolute; top: 50%; z-index: 1; width: 22px; height: 22px; margin-top: -11px; display: grid; place-items: center; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); color: var(--ink-2); }
.strip-arrow:first-child { left: 0; }
.strip-arrow:last-child { right: 0; }
.strip-arrow:hover { color: var(--ink); }
.strip-arrow svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button { flex: none; height: 26px; padding: 1px 8px 0; border-radius: 5px; font: 12.5px var(--font-num); font-stretch: semi-condensed; color: var(--ink-2); white-space: nowrap; transition: background-color .15s, color .15s; }
.tabs button:hover { background: var(--wash); color: var(--ink); }
.tabs button[aria-current="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); }
.bar-end { display: flex; align-items: center; gap: 6px; }
.bar-link { flex: none; padding: 0 10px; border-color: transparent; background: var(--brush); color: var(--accent); font-size: 11.5px; font-weight: 600; text-decoration: none; }
.bar-link:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
/* The collector: a small dot and the time of the last cycle; words only when something is wrong. */
.status { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 3px; font: 11px var(--font-num); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.status i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status[data-state="warn"], .status[data-state="down"] { color: var(--ink); font-family: var(--font-ui); }
.status[data-state="ok"] i { background: var(--good); color: var(--good); }
.status[data-state="warn"] i { background: var(--warn); color: var(--warn); }
.status[data-state="down"] i { background: var(--critical); color: var(--critical); }

.menu { position: relative; }
.menu summary { list-style: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; font-size: 16px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--wash); color: var(--ink); }
.menu-list { position: absolute; right: 0; top: 32px; z-index: 20; min-width: 168px; padding: 4px; background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; box-shadow: var(--shadow-pop); }
.menu-list a, .menu-list button { display: block; width: 100%; padding: 6px 10px; border-radius: 5px; text-align: left; text-decoration: none; white-space: nowrap; }
.menu-list a:hover, .menu-list button:hover { background: var(--wash); }

.banner { flex: none; padding: 7px 14px; font-size: 11.5px; background: var(--band); border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }

/* The plot takes everything the window has left: the chrome stays small, the curves get the room. */
.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-width, 380px); gap: 10px; padding: 0 10px 10px; }
.plot, .side { min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.plot { position: relative; min-width: 0; }
/* One sweep along the top edge per collection cycle: the page's only unprompted motion, and its countdown. */
.sweep { position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .75; transform: scaleX(0); transform-origin: left; transition: transform 1s linear; }
.sweep.rewind { transition: none; }
@media (prefers-reduced-motion: reduce) { .sweep { display: none; } }
.plot-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; padding: 12px 12px 4px 16px; }
.plot-title { min-width: 0; }
h1 { font-size: 15px; font-weight: 650; line-height: 1.3; }
.plot-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.text-button { padding: 3px 4px; font-size: 11.5px; color: var(--accent); }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* A row of choices, one of them on: a grey track, the chosen one a white chip edged by a hairline. The same on every page. */
.seg { display: inline-flex; gap: 1px; padding: 2px; border-radius: 8px; background: var(--track); }
.seg button { min-height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); font-weight: 600; }

.chart { position: relative; flex: 1; min-height: 200px; margin: 0 2px 4px 4px; user-select: none; }
.chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-overlay { cursor: crosshair; touch-action: pan-y; }
/* The time bar under the plot: the observed range as a track, the span on show as a window in it. The window's
   ends are dragged to stretch or shrink the span, its middle to move it. It belongs to touch layouts (see the
   end of this file), where dragging across the plot reads the curves; a mouse zooms by dragging across the plot. */
.timebar { display: none; flex: none; height: 26px; margin: 0 2px 0 4px; touch-action: pan-y; user-select: none; cursor: ew-resize; }
.timebar-track { position: relative; height: 14px; margin-top: 6px; border-radius: 7px; background: var(--track); }
.timebar-window { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: color-mix(in srgb, var(--muted) 20%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 55%, transparent); }
.timebar-window::before, .timebar-window::after { content: ""; position: absolute; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--muted); }
.timebar-window::before { left: 4px; }
.timebar-window::after { right: 4px; }
.timebar.zoomed .timebar-window { background: color-mix(in srgb, var(--accent) 20%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.timebar.zoomed .timebar-window::before, .timebar.zoomed .timebar-window::after { background: var(--accent); }
/* The grip under the plot, shown where the plot has a height of its own: dragged, it makes the plot taller or shorter. */
.grip { display: none; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 24px; text-align: center; color: var(--muted); pointer-events: none; }

.tooltip {
  position: absolute; z-index: 5; left: 0; top: 0; min-width: 176px; max-width: 260px; padding: 7px 10px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--axis); border-radius: 6px; box-shadow: var(--shadow-pop);
  font-size: 11.5px; line-height: 1.7;
}
.tooltip-time { font-family: var(--font-num); color: var(--muted); }
.tooltip-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 7px; color: var(--ink-2); }
.tooltip-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tooltip-row b { font: 600 11.5px var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink); }
.tooltip-row.near span { color: var(--ink); font-weight: 600; }
.tooltip-more { color: var(--muted); }

/* A short stroke in the curve's colour: the legend, wherever a team is named. */
.key { flex: none; width: 14px; height: 2.5px; border-radius: 2px; background: var(--c, var(--muted)); }
.key.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.key.dot { background: repeating-linear-gradient(90deg, var(--c) 0 1.5px, transparent 1.5px 4px); }
.key.faint { opacity: .6; }
.key.off { width: 6px; height: 6px; margin: 0 4px; border: 1.5px solid var(--axis); border-radius: 50%; background: none; }
.hue-0 { --c: var(--series-1); }
.hue-1 { --c: var(--series-2); }
.hue-2 { --c: var(--series-3); }
.hue-3 { --c: var(--series-4); }
.hue-4 { --c: var(--series-5); }
.hue-5 { --c: var(--series-6); }
.hue-6 { --c: var(--series-7); }
.hue-7 { --c: var(--series-8); }

/* The list's left edge drags it wider for long team names; a short bar shows where to take hold. */
.side { position: relative; }
.side-grip { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 8px; cursor: col-resize; touch-action: none; }
.side-grip::after { content: ""; position: absolute; top: 50%; left: 2px; width: 3px; height: 40px; margin-top: -20px; border-radius: 2px; background: var(--axis); opacity: 0; transition: opacity .15s; }
.side-grip:hover::after, .side-grip:focus-visible::after { opacity: 1; }
.side-grip.dragging::after { opacity: 1; background: var(--accent); }
.side-grip:focus-visible { outline: 0; }
.side-tabs { flex: none; display: flex; gap: 6px; padding: 2px 12px 0; border-bottom: 1px solid var(--hairline); }
.side-tabs button { height: 34px; padding: 0 5px; font-size: 12.5px; color: var(--ink-2); background: linear-gradient(90deg, var(--accent), var(--accent-2)) bottom / 0 2px no-repeat; }
.side-tabs button:hover { color: var(--ink); }
.side-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; background-size: 100% 2px; }
.side-tabs .num { font-weight: 400; color: var(--muted); }
.badge { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent) !important; font-size: 10.5px; font-weight: 600 !important; line-height: 16px; text-align: center; }
.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.filter { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 8px 0 10px; }
/* Fields and the custom menus' triggers: outlined, the same height, the same corners. */
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.search svg { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.icon { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; font-size: 13px; line-height: 1; color: var(--muted); }
.icon:hover { background: var(--wash); color: var(--ink); }
.icon[aria-pressed="true"] { color: #e8a317; }
.presets { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 2px; padding: 7px 8px 5px 12px; font-size: 11.5px; color: var(--muted); }
.presets > * { white-space: nowrap; }
.presets span { margin-right: auto; }
.presets button { padding: 2px 6px; border-radius: 4px; color: var(--ink-2); }
.presets button:hover { background: var(--wash); color: var(--ink); }
.presets button[aria-pressed="true"] { background: var(--brush); color: var(--accent); font-weight: 600; }

.rows { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 6px; scrollbar-width: thin; }
.rows .empty { padding: 28px 18px; text-align: center; line-height: 1.8; color: var(--muted); }
/* The end of what is written so far: scrolling near it, or a click, brings the next hundred rows. */
.rows .more { padding: 8px 7px 14px; text-align: center; }
/* Any change in the side panel, a count or a button's state, used to lay out every row of the list again: 24–56 ms
   with the 450 teams of the 杭厦 board. Rows out of sight are skipped (the 26px stands in until a row has been
   seen), and beside the plot, where the list scrolls in a box of its own, the box is sealed off from the rest of
   the panel: about 1 ms. Stacked on a phone the page itself scrolls and the list takes its contents' height, so
   it cannot be sealed. */
.rows > li { content-visibility: auto; contain-intrinsic-size: auto 26px; }
@media (min-width: 861px) { .rows { contain: strict; } }
.team { display: grid; grid-template-columns: minmax(0, 1fr) 22px 22px 22px; align-items: center; padding-right: 3px; border-radius: 7px; }
/* A charted team's row carries a faint wash of its curve's colour, so the list reads as the legend. */
.team[class*="hue-"] { background: color-mix(in srgb, var(--c) var(--row-tint), transparent); }
.team.lit, .team.pinned { background: var(--wash); }
.team[class*="hue-"].lit, .team[class*="hue-"].pinned { background: color-mix(in srgb, var(--c) calc(var(--row-tint) * 2), transparent); }
/* Pinned, with the highlight button beside the star: the curve stays picked out until the button is pressed
   again. Meanwhile the row wears a bar, and the button its ring, in the curve's colour. */
.team.pinned { box-shadow: inset 2.5px 0 0 var(--c, var(--accent)); }
.pin svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.pin .core { fill: currentColor; stroke: none; }
.icon.pin[aria-pressed="true"] { color: var(--c, var(--accent)); }
.pin[aria-pressed="true"] svg { fill: color-mix(in srgb, currentColor 24%, transparent); stroke-width: 2; }
/* Hover belongs to a mouse. On a touch screen it sticks to the last row tapped and passes for a mark. */
@media (hover: hover) {
  .team:hover, .event:hover { background: var(--wash); }
  .team[class*="hue-"]:hover { background: color-mix(in srgb, var(--c) calc(var(--row-tint) * 2), transparent); }
}
.team-main { display: grid; grid-template-columns: 14px 20px minmax(0, 1fr) auto 33px auto; align-items: center; gap: 7px; height: 26px; padding: 0 3px 0 7px; text-align: left; color: var(--ink-2); }
.team-main[aria-pressed="true"] { color: var(--ink); }
.team-main:focus-visible, .event-main:focus-visible { outline-offset: -2px; }
.rank { justify-self: end; font: 11.5px var(--font-num); font-variant-numeric: tabular-nums; color: var(--muted); }
/* Podium places wear a flat gold, silver or bronze disc. (Until 2026-11-01 the discs had a sheen and a shadow.) */
.medal-1 .rank, .medal-2 .rank, .medal-3 .rank { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700; color: #3a2a05; }
.medal-1 .rank { background: #f2c14e; }
.medal-2 .rank { background: #cfd6e1; }
.medal-3 .rank { background: #e0a878; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-main[aria-pressed="true"] .name { font-weight: 600; }
/* How long since the team last submitted; within the hour it stands out. Ahead of it, at the column's left edge so
   the arrows line up down the list, whether that submission scored above or below the one it replaced. */
.age { justify-self: stretch; display: flex; align-items: center; justify-content: flex-end; font: 10.5px var(--font-num); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.age.recent { color: var(--accent); font-weight: 600; }
.step { margin-right: auto; font-size: 9px; font-style: normal; line-height: 1; }
/* An arrow is a mark, not a figure: the green the figures are written in (--up) is dark enough to pass for black
   on a mark this small, so on a light page the arrow takes the status light's green. (It shipped at 7.5px in --up
   on 2026-11-11.) */
.step.up { color: var(--mark-up); }
.value { min-width: 42px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink); }
/* A team holding its score back: the tag gives its place in the other ordering, the number beside it its score there. */
.marks { display: inline-flex; align-items: center; gap: 4px; }
.gap { font-size: 10.5px; color: var(--down); white-space: nowrap; }
/* Solid for a team its best result brings into the top five from below, since that is the team to look at first. */
.past { padding: 0 4px; border-radius: 4px; background: var(--down); color: var(--surface); font: 600 10.5px/16px var(--font-num); white-space: nowrap; }
.past.soft { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.pending { padding: 0 5px; border-radius: 4px; background: var(--wash); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
/* Records that left the official board: below the ranked teams, under a heading, without a place. */
.rows .divider { margin-top: 6px; padding: 9px 7px 4px; border-top: 1px solid var(--hairline); font-size: 11px; color: var(--muted); }
.team.left .team-main, .team.left .value { color: var(--muted); }
.team.left .value { font-weight: 400; }
.team .icon { width: 22px; height: 22px; visibility: hidden; }
.team:hover .icon, .team:focus-within .icon, .team .icon[aria-pressed="true"] { visibility: visible; }

.event { border-radius: 7px; }
.event-main { display: block; width: 100%; padding: 5px 7px; text-align: left; user-select: none; -webkit-user-select: none; }
.member { user-select: none; -webkit-user-select: none; }
/* The row a double click on a change lands on: a ring that fades, so the eye finds it in the middle of the list. */
.team.found { animation: found 1.6s ease-out; }
@keyframes found { 0%, 45% { outline: 2px solid var(--accent); outline-offset: -2px; } 100% { outline: 2px solid transparent; outline-offset: -2px; } }
@media (prefers-reduced-motion: reduce) { .team.found { animation: none; outline: 2px solid var(--accent); outline-offset: -2px; } }
.event-top { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.event-top .name { font-weight: 600; }
.event-top b { font: 600 12.5px var(--font-num); font-variant-numeric: tabular-nums; }
.event-sub { display: flex; gap: 9px; margin: 1px 0 0 21px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.event-sub .what { color: var(--ink-2); }
.event-sub .where { overflow: hidden; text-overflow: ellipsis; }
.event-sub time { margin-left: auto; }
.event-sub .drift { font-family: var(--font-num); }
.event.fresh .event-top .name::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
/* A reference update folded into one entry; opened, it lists the teams it moved. */
.group summary { list-style: none; cursor: pointer; }
.group summary::-webkit-details-marker { display: none; }
.group summary .key.off { width: 0; height: 0; margin: 0 4px 0 5px; border: 4px solid transparent; border-right-width: 0; border-left-color: var(--muted); border-radius: 0; transition: transform .15s; }
.group details[open] summary .key.off { transform: rotate(90deg); }
.members { padding: 0 0 4px 21px; }
.member { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 50px; align-items: center; gap: 7px; width: 100%; height: 22px; padding-right: 7px; border-radius: 6px; text-align: left; font-size: 11.5px; color: var(--ink-2); }
.member:hover { background: var(--wash); }
.member .num { font-size: 11px; color: var(--muted); }
.member b { text-align: right; font: 600 11.5px var(--font-num); font-variant-numeric: tabular-nums; }
.side-foot { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 7px 12px; white-space: nowrap; border-top: 1px solid var(--hairline); font-size: 11px; color: var(--muted); }
.side-foot .num { color: var(--ink-2); font-weight: 600; }

dialog { width: min(720px, 92vw); max-height: 92vh; padding: 0; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12.5px; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(8, 12, 20, .4); }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
h2 { font-size: 15px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.dialog-body { padding: 12px 18px 18px; }
/* A team's totals, read along one line rather than set out as tiles. */
.figures { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 12px; }
.figures div { display: flex; align-items: baseline; gap: 6px; }
.figures dt { font-size: 11.5px; color: var(--muted); }
.figures dd { font: 600 14px var(--font-num); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 5px 9px; border-bottom: 1px solid var(--axis); font-size: 11px; font-weight: 400; color: var(--muted); text-align: right; }
td { padding: 6px 9px; border-bottom: 1px solid var(--grid); font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
th:first-child, td:first-child, th:last-child, td:last-child { text-align: left; }
th:first-child, td:first-child { padding-left: 2px; }
td button, td a { color: var(--accent); text-underline-offset: 3px; }
td a { text-decoration: none; }
td button:hover, td a:hover { text-decoration: underline; }
.dialog-note { margin: 12px 0 14px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.dialog-actions { display: flex; gap: 8px; margin-top: 14px; }
/* Buttons are flat: outlined, and the one that does the main thing a light blue wash with blue words. Neither is raised. */
.button { min-height: 30px; padding: 0 12px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); color: var(--ink); font-weight: 600; transition: background-color .15s; }
.button:hover { background: var(--wash); }
.button:disabled { color: var(--muted); background: none; cursor: default; }
.button.primary { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--brush); color: var(--accent); }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
#contest-dialog { width: min(640px, 92vw); }
.contest-list { display: grid; gap: 2px; }
.contest-list .empty { padding: 18px; text-align: center; color: var(--muted); }
.contest-head { margin: 14px 0 4px 10px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.contest-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 4px; padding-right: 5px; border-radius: 6px; }
.contest-row:hover { background: var(--wash); }
.contest-row[aria-current="true"] { background: var(--brush); }
.contest-row .icon { grid-column: 3; text-decoration: none; }
.contest-main { display: block; min-width: 0; padding: 7px 10px; text-align: left; }
.contest-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.contest-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; overflow: hidden; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chip { flex: none; padding: 0 5px; border-radius: 4px; background: var(--wash); font-size: 10.5px; line-height: 16px; color: var(--ink-2); }
.chip[data-phase="collecting"] { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--up); }
.chip[data-phase="failing"], .chip[data-phase="frozen"] { background: var(--band); color: var(--ink); }
.contest-add { display: flex; gap: 6px; margin-top: 14px; }
.contest-add input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); }
.contest-add input:focus-visible { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.contest-add input::placeholder { color: var(--muted); }
.contest-add #contest-token { flex: 0 1 120px; }
.contest-message { min-height: 18px; margin-top: 8px; font-size: 11.5px; color: var(--ink-2); }
/* Reading width comes from the dialog itself. A ch-based cap is sized for Latin text: Chinese characters
   are about twice as wide, so it squeezed the copy into the left 60% of the box. */
#method-dialog { width: min(600px, 92vw); }
.prose h3 { margin: 14px 0 2px; font-size: 12.5px; font-weight: 650; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); line-height: 1.75; }

/* The invite gate: one field in the middle of the page. */
.gate { align-items: center; justify-content: center; padding: 16px; background: var(--plane); }
.gate-card { width: min(340px, 100%); display: grid; gap: 12px; padding: 22px 22px 14px; background: var(--surface); border: 1px solid var(--axis); border-radius: 8px; }
.gate-lead { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.gate-input { height: 34px; padding: 0 11px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); font-size: 13px; }
.gate-input:focus-visible { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: -2px; }
.gate-card .button { height: 34px; font-size: 13px; }
.gate-message { min-height: 18px; font-size: 12px; color: var(--down); }
.gate .brand span { display: inline; }

/* Secondary pages: the same bar, a row of controls, then each section under a one-line head, divided by
   hairlines. Figures are read along a line of text; nothing is set out as a tile. */
body.act { height: auto; min-height: 100dvh; overflow: visible; background: var(--surface); }
.act-bar { grid-template-columns: auto minmax(0, 1fr) auto; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.act-title { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-back { display: inline-flex; align-items: center; min-height: 36px; white-space: nowrap; text-decoration: none; }
/* One column no wider than the window: a long problem name in a menu is cut short instead of widening the page. */
.act-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 20px 24px; transition: opacity .2s; }
.act-main.loading { opacity: .72; }
.act-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 0; }
.act-field { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; gap: 8px; font-size: 11.5px; color: var(--muted); }
.act-field > span { flex: none; }
.act-status { margin-left: auto; font-size: 11px; color: var(--muted); padding-block: 8px; }
.act-main > .act-status { margin-left: 0; }
.act-card { min-width: 0; padding: 14px 0 16px; border-top: 1px solid var(--hairline); }
.act-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 0 0 10px; }
.act-card h2 { font-size: 13px; font-weight: 650; }
.act-caption { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
/* The section's figures in one line of text under its head. */
.act-readout { display: flex; flex-wrap: wrap; gap: 3px 22px; margin: -2px 0 12px; font-size: 12px; color: var(--ink-2); }
.act-readout:empty { display: none; }
.act-readout b { font: 600 13px var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink); }
.act-readout small { font-size: 11px; color: var(--muted); }
.picker { min-width: 0; max-width: 380px; }
.picker-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 28px; padding: 3px 8px 3px 9px; border: 1px solid var(--axis); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; text-align: left; touch-action: manipulation; }
.picker-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger:hover { background: var(--wash); }
.picker-trigger[aria-expanded="true"] { border-color: var(--ink-2); }
.picker-trigger:disabled { color: var(--muted); background: none; cursor: default; }
.picker-options { position: fixed; z-index: 100; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 4px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.picker-option { position: relative; padding: 8px 28px 8px 10px; min-height: 34px; border-radius: 5px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.picker-option.active, .picker-option:hover { background: var(--wash); }
.picker-option[aria-selected="true"] { color: var(--accent); background: var(--brush); font-weight: 600; }
.picker-option[aria-selected="true"]::after { content: '✓'; position: absolute; right: 9px; top: 8px; }
.preset-picker { display: inline-flex; flex: none; }
.presets .picker-trigger { min-height: 22px; height: auto; padding: 0 4px 0 6px; gap: 5px; font-size: 11px; }
.act-chart { position: relative; min-height: 60px; }
.act-chart svg { display: block; overflow: visible; touch-action: pan-y; }
.act-empty { padding: 40px 0; text-align: center; color: var(--muted); }
.viz-grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-base, .viz-tick { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz-label { fill: var(--muted); font: 10.5px var(--font-num); font-variant-numeric: tabular-nums; }
/* Labels that sit over marks get a halo of the surface, so the bars behind them do not cut the letters. */
.viz-note, .viz-now-label { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.viz-note { fill: var(--ink-2); }
.viz-bar { transition: opacity .12s; }
.viz-bar.thin { opacity: .38; }
.viz-bar.on { opacity: 1; filter: brightness(1.18) saturate(1.1); }
.viz-average { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.viz-now { stroke: var(--accent); stroke-width: 1.25; }
.viz-now-label { fill: var(--accent); }
.viz-hatch { stroke: var(--axis); stroke-width: 1.2; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-cursor { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.tip-value { color: var(--ink-2); }
.tip-value b { font: 600 15px var(--font-num); color: var(--ink); }
.tip-sub { color: var(--muted); }
#act-tip { position: absolute; z-index: 30; }
.act-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 4px 0; font: 10.5px var(--font-num); color: var(--muted); }
.act-ramp { display: inline-flex; }
.act-ramp i { width: 16px; height: 10px; }
.act-ramp i:first-child { border-radius: 3px 0 0 3px; }
.act-ramp i:last-child { border-radius: 0 3px 3px 0; }
.act-nodata { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; }
.act-nodata i { width: 16px; height: 10px; border-radius: 3px; background: repeating-linear-gradient(45deg, var(--axis) 0 1.2px, transparent 1.2px 3.5px); }
.act-card > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 28px; font-weight: 600; list-style: none; }
.act-card > summary::-webkit-details-marker { display: none; }
.act-card > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); }
.act-card[open] > summary::before { transform: rotate(45deg); }
/* At 5-minute slots the table runs to 288 rows: it scrolls inside its own box, header row held in place,
   instead of stretching the page. */
.act-table .table-scroll { max-height: min(420px, 60vh); margin-top: 8px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.act-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.act-method p { margin-top: 8px; max-width: 100ch; }
.act-method p + p { margin-top: 8px; }

/* The case page: the tbest of every case, then every team against every case. Both tables scroll inside their
   own box, the header held at the top and the rank and team columns at the left, so a 17-case board on a phone
   still reads as a table. */
.muted { color: var(--muted); }
.case-box { max-height: min(640px, 72vh); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.case-box thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
/* tbest lies on its side: a column per case, the row names held at the left while it scrolls sideways. */
.tbest-table { width: auto; }
.tbest-table th, .tbest-table td { text-align: left; }
.tbest-table .stick { position: sticky; left: 0; z-index: 1; padding-left: 2px; background: var(--surface); box-shadow: 1px 0 0 var(--hairline); }
.tbest-table thead .stick { z-index: 3; }
.tbest-table tbody th { border-bottom-color: var(--grid); }
.tbest-table thead th:not(.stick) { color: var(--ink); font-weight: 600; }
.tbest-table th, .tbest-table td { padding: 5px 8px; }
.tbest-table td { min-width: 60px; }
.tbest-table .row-tbest td { font-weight: 600; }
.tbest-table .row-since td { line-height: 1.35; }
.tbest-table .row-since .muted { display: block; font-size: 10.5px; }
.tbest-table .row-who td { max-width: 88px; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-ui); }
.tbest-table .row-owner td { max-width: 88px; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-ui); }
.tbest-moves .who { font-family: var(--font-ui); }
.tbest-history:empty { display: none; }
.tbest-history { display: grid; gap: 8px; margin-top: 10px; font-size: 11.5px; }
.tbest-moves ol { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-top: 3px; list-style: none; }
.tbest-moves li { display: flex; gap: 8px; }
.hidden-case td, th.hidden-case { color: var(--muted); }
.case-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.case-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-tools .search { flex: 0 1 220px; }
.case-table th, .case-table td { padding: 4px 7px; text-align: right; }
.case-table th button { color: inherit; white-space: nowrap; }
.case-table th button:hover { color: var(--ink); }
.case-table th[aria-sort] { color: var(--ink); font-weight: 600; }
.case-table thead tr:first-child { height: 26px; }
.case-table .tbest-row th { top: 26px; z-index: 2; font: 11px var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink-2); border-bottom-color: var(--axis); }
.case-table .stick { position: sticky; z-index: 1; background: var(--surface); text-align: left; }
.case-table thead .stick { z-index: 3; }
.case-table .rank-col { left: 0; width: 50px; min-width: 50px; max-width: 50px; }
.case-table .name-col { left: 50px; max-width: 168px; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-ui); box-shadow: 1px 0 0 var(--hairline); }
.case-table td.total { font-weight: 600; }
.case-table .cell { min-width: 52px; line-height: 1.2; }
.case-table .cell b { display: block; font-weight: 500; }
.case-table .cell small { display: block; font-size: 10.5px; color: var(--muted); }
.case-table .cell.s1 { background: color-mix(in srgb, var(--series-1) 6%, transparent); }
.case-table .cell.s2 { background: color-mix(in srgb, var(--series-1) 11%, transparent); }
.case-table .cell.s3 { background: color-mix(in srgb, var(--series-1) 17%, transparent); }
.case-table .cell.s4 { background: color-mix(in srgb, var(--series-1) 24%, transparent); }
.case-table .cell.best { box-shadow: inset 0 0 0 1.5px var(--accent); }
.case-table .cell.borrowed { outline: 1px dashed var(--ink-2); outline-offset: -3px; }
.case-table .cell.best small { color: var(--accent); }
.case-table .cell.bad { color: var(--down); font-family: var(--font-ui); font-size: 11px; }
.case-table .cell.hidden-cell { color: var(--muted); font-family: var(--font-ui); font-size: 11px; background: repeating-linear-gradient(45deg, var(--wash) 0 3px, transparent 3px 7px); }
.case-table tr.focus td { background-color: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.case-table tbody tr:hover td.stick { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.case-table .empty { padding: 28px 0; text-align: center; color: var(--muted); }
.case-pager { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 10px; color: var(--muted); }
.case-pager button { min-height: 30px; }
.case-pager button:disabled { opacity: .4; cursor: default; }

/* Narrow windows: the plot keeps most of the first screen, the list follows and the page scrolls. */
@media (max-width: 860px) {
  body { height: auto; min-height: 100dvh; overflow: visible; font-size: 13px; }
  .bar { position: sticky; top: 0; z-index: 10; padding: 0 6px 0 10px; gap: 10px; background: var(--plane); }
  .act .act-bar { background: var(--surface); }
  .brand span, .status span { display: none; }
  .contest { max-width: 38vw; }
  .status { padding: 0 6px; }
  .stage { display: block; padding: 0 8px 8px; }
  /* The plot's height is measured against the smallest the window gets (toolbars showing), so it keeps still
     when the browser's toolbars slide away; --plot-height is the height the viewer dragged it to. */
  .plot { height: var(--plot-height, 80vh); min-height: 400px; margin-bottom: 8px; }
  @supports (height: 1svh) { .plot { height: var(--plot-height, 80svh); } }
  .grip { flex: none; display: flex; justify-content: center; }
  .grip button { width: 112px; height: 18px; display: grid; place-items: center; touch-action: none; cursor: ns-resize; }
  .grip button::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--axis); }
  .grip button:active::before { background: var(--muted); }
  .rows { overflow: visible; }
  .side-grip { display: none; }
  .team { grid-template-columns: minmax(0, 1fr) 30px 30px 30px; }
  .team-main { height: 38px; }
  .rows > li { contain-intrinsic-size: auto 38px; }
  /* No edge to drag here: a long name takes a second line instead of being cut. */
  .team-main .name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .team .icon { width: 30px; height: 30px; visibility: visible; }
  .pin svg { width: 16px; height: 16px; }
  .search { height: 32px; }
  .filter .seg button { min-height: 28px; }
}

/* Phones: the bar belongs to the problems. The contest's switch shrinks to the mark and its name moves to the
   head of the plot; the tabs take the freed width, swiped rather than paged with arrows, long names cut short. */
@media (max-width: 640px) {
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; padding: 0 4px 0 8px; }
  .bar > .brand, #contest-name { display: none; }
  .contest { height: 30px; padding: 0 5px 0 4px; gap: 3px; border-radius: 10px; }
  .contest-mark { display: block; flex: none; }
  .contest-line { display: flex; align-items: center; gap: 3px; max-width: 100%; margin-bottom: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
  .contest-line span { overflow: hidden; text-overflow: ellipsis; }
  .status { padding: 0 6px; }
  .bar-link { height: 30px; padding: 0 9px; }
  /* Two characters each, so the problems keep the width. */
  .bar-link .wide { display: none; }
  .strip-arrow { display: none; }
  .tabs { padding: 0; scroll-padding-inline: 0; }
  .strip[data-more~="left"] .tabs { --fade-left: 22px; }
  .strip[data-more~="right"] .tabs { --fade-right: 22px; }
  .tabs button { height: 30px; max-width: 25vw; padding-inline: 7px; overflow: hidden; text-overflow: ellipsis; }
  /* "取消高亮" takes the free end of the contest's line: a row of its own would come out of the plot's height. */
  .plot-head { position: relative; }
  #unpin, #reset-zoom { position: absolute; top: 8px; right: 10px; }
  .plot-head:has(#unpin:not([hidden])) #reset-zoom { right: 70px; }
  .plot-head:has(#unpin:not([hidden])) .contest-line { max-width: calc(100% - 68px); }
  .plot-head:has(#reset-zoom:not([hidden])) .contest-line { max-width: calc(100% - 92px); }
  .plot-head:has(#unpin:not([hidden])):has(#reset-zoom:not([hidden])) .contest-line { max-width: calc(100% - 152px); }
  .act-bar > .brand { display: flex; }
  .act-status { margin-left: 0; }
  .act-main { padding: 0 12px 16px; }
  .act-filters { gap: 8px 16px; padding: 12px 0; }
  .act-field { width: 100%; }
  .act-field .picker { flex: 1; max-width: none; }
  .act .seg { flex-wrap: wrap; }
  .act .seg button { min-height: 32px; padding-inline: 8px; }
  .act-readout { gap: 3px 16px; }
  .act-card { padding: 12px 0 14px; }
  .act-title { font-size: 13px; }
  .picker-trigger { min-height: 36px; font-size: 13px; }
  .picker-option { min-height: 44px; padding-block: 11px; font-size: 13px; }
  .picker-option[aria-selected="true"]::after { top: 11px; }
  .presets .picker-trigger { min-height: 30px; }
}

/* Touch screens. The row's buttons cannot wait for a hover, and iOS zooms the page into any field it finds set
   smaller than 16px. */
@media (hover: none) {
  .team .icon { visibility: visible; }
}
@media (max-width: 860px), (hover: none) {
  .timebar { display: block; }
  .search input, .contest-add input, .gate-input { font-size: 16px; }
}
