/* Visual language follows kimi.coastguard.nz: a light glass UI floating over a
   full-bleed map, one warm accent, generous radii, heavy backdrop blur.
   Tokens below mirror the ones that site publishes. Identity is deliberately
   ours -- the patterns are borrowed, the branding is not. */

:root {
  --color-bg:        #f3f5f7;
  --color-surface:   #ffffffd1;
  --color-solid:     #ffffff;
  --color-border:    #00000014;
  --color-text:      #000e2d;
  --color-text-dim:  #000e2d8c;
  --color-accent:    #f04123;
  --color-data:      #1d99d4;
  --color-hover:     #0000000a;
  --radius-pill:     16px;
  --radius-card:     24px;
  --blur-glass:      blur(48px) saturate(1.9);
  --font-ui:         "Inter", system-ui, -apple-system, sans-serif;
  --font-heading:    "Anton", "Inter", system-ui, sans-serif;
  --font-mono:       "JetBrains Mono", ui-monospace, monospace;
  --shadow:          0 2px 8px #0000000f, 0 8px 32px #00000014;
  /* The two ends of a search pattern. Shared with the canvas, which is why
     they are tokens and not literals in one file or the other. */
  --pattern-start:   #12d17c;
  --pattern-end:     #f04123;
}

* { box-sizing: border-box; }
/* Our layout rules set display on these, which would otherwise defeat the
   `hidden` attribute the JS toggles. Keep `hidden` authoritative. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  overflow: hidden;
}

/* ---------- map ---------- */
#mapwrap { position: fixed; inset: 0; background: var(--color-bg); }
#mapwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A hand by default: the chart is for looking at, and a click must not move
   anything. Crosshair only while something is being placed or drawn. */
#cOver { cursor: grab; }
#cOver.panning { cursor: grabbing; }
#mapwrap.picking #cOver, #mapwrap.placing #cOver { cursor: crosshair; }

/* ---------- glass ---------- */
.card, .sheet, .pill, .icon, #zoom button {
  background: var(--color-surface);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

/* ---------- top bar ---------- */
/* What the run *is* -- brand, mode, field -- stays centred above the chart. */
#topbar {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; z-index: 20;
}

/* What you reach for sits to the right, with its panels directly beneath, so
   the middle of the chart -- where the drift is -- stays clear. */
#tools {
  position: fixed; top: 14px; right: 14px;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  align-items: center; z-index: 20;
}
.pill, .icon {
  height: 34px; border-radius: var(--radius-pill);
  font: inherit; color: var(--color-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.pill { padding: 0 14px; }

/* Round, and half again as large as the pills: these are the things reached
   for on a boat, and a 34 px target was a 34 px target. */
.icon {
  width: 51px; height: 51px; border-radius: 50%;
  padding: 0; color: var(--color-text-dim);
  transition: background .12s, color .12s, border-color .12s;
}
.icon svg {
  width: 23px; height: 23px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.icon svg .fill { fill: currentColor; stroke: none; }

/* Partner logos under the tools, each in a box of its own. On white whatever
   the theme: they are artwork drawn for a white page, and a JPEG has no
   transparency to lean on. Under the panels (z-index 19), which open over the
   same corner. */
#logos {
  position: fixed; top: 79px; right: 14px; z-index: 18;
  display: flex; gap: 8px; align-items: stretch;
}
#logos .logo {
  display: flex; align-items: center; padding: 6px 10px;
  border-radius: var(--radius-card);
  background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow);
}
#logos a.logo { transition: border-color .12s; }
#logos a.logo:hover { border-color: var(--color-accent); }
#logos img { display: block; height: 40px; width: auto; }

.pill:hover, .icon:hover { background: var(--color-solid); }
.icon:hover { color: var(--color-text); }
.pill.on, .icon.on { background: var(--color-solid); border-color: #00000026; }
.icon.on { color: var(--color-accent); }

h3.sub {
  font: 500 10px/1 var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-text-dim);
  margin: 14px 0 8px;
}
.brand {
  font-family: var(--font-heading); letter-spacing: .04em; font-size: 17px;
  color: var(--color-accent); padding: 0 15px;
}
#datasetPill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #21c07a; flex: none;
}
#datasetPill.stale .dot { background: var(--color-accent); }
#datasetName { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sheets ---------- */
/* Directly under the tools, at the same right edge, whichever icon opens it:
   one place to look, and the same place every time. `top` clears the 51 px
   icon row and its margin. */
.sheet {
  position: fixed; top: 79px; right: 14px;
  width: 340px; max-height: calc(100vh - 170px); overflow-y: auto;
  border-radius: var(--radius-card); padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 11px; z-index: 19;
}
.sheet h2 {
  font-family: var(--font-heading); font-weight: 400; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-dim);
  margin: 4px 0 0; display: flex; align-items: center; gap: 8px;
}
.sheet h2:first-child { margin-top: 0; }

label { display: block; font-size: 12px; color: var(--color-text-dim); }
.row { display: flex; align-items: center; gap: 10px; }
.row > span:first-child { flex: 0 0 84px; }
/* A label too long to sit beside its field (Start time, with its UTC offset):
   on its own line above it. */
.row.stack { flex-direction: column; align-items: stretch; gap: 4px; }
.row.stack > span:first-child { flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--color-text); }

input[type=number], input[type=datetime-local], input[type=text], select {
  width: 100%; min-width: 0; padding: 7px 9px; font: inherit;
  color: var(--color-text); background: var(--color-solid);
  border: 1px solid var(--color-border); border-radius: 10px;
}
/* A coordinate that does not parse. Marked rather than corrected: rewriting a
   field while it is being typed in fights the person typing. */
input.bad { border-color: var(--color-accent); }
input.num { width: 68px; flex: none; text-align: right; }
/* The unit after a slider's number box: grey and small, as the readouts were. */
.row .unit {
  flex: 0 0 44px; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--color-text-dim); white-space: nowrap;
}
input[type=range] { flex: 1; min-width: 0; accent-color: var(--color-accent); }
input[type=checkbox] { accent-color: var(--color-accent); width: 15px; height: 15px; }
output { font-family: var(--font-mono); font-size: 11px; flex: 0 0 78px; text-align: right; white-space: nowrap; }
select { cursor: pointer; }

/* One staged forecast domain: name and grid on the first line, the period it
   covers on the second. Priority order is the stack order, so it is kept. */
.domain { padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.domain:last-child { border-bottom: 0; }
.domain .top { display: flex; align-items: baseline; gap: 8px; }
.domain .nm { font-weight: 600; color: var(--color-text); }
.domain .grid {
  margin-left: auto; font-family: var(--font-mono); font-size: 9.5px;
  color: var(--color-text-dim);
}
.domain .when {
  font-family: var(--font-mono); font-size: 10px; color: var(--color-text-dim);
  margin-top: 2px;
}

.note {
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.65;
  color: var(--color-text-dim); white-space: pre-wrap; word-break: break-word;
}

/* A saved pattern, as a layer: shown or hidden, renamed in place, removed.
   The name is an input rather than a label behind an edit button -- there is
   nothing to confirm, and a plan gets renamed more often than it gets made. */
.saved .row { gap: 8px; padding: 3px 0; }
.saved .row > span:first-child { flex: none; }
.saved input[type=text] {
  flex: 1; min-width: 0; padding: 5px 8px; font-size: 12px; border-radius: 8px;
  background: transparent; border-color: transparent;
}
.saved input[type=text]:hover { border-color: var(--color-border); }
.saved input[type=text]:focus { background: var(--color-solid); border-color: var(--color-border); }
.saved .drop {
  flex: none; width: 24px; height: 24px; padding: 0; line-height: 1;
  border: 0; border-radius: 50%; cursor: pointer;
  color: var(--color-text-dim); background: transparent;
}
.saved .drop:hover { color: var(--color-accent); background: var(--color-hover); }
/* A saved run's colour, which is also its checkbox: tick it and the layer in
   that colour appears. */
.saved .swatch {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 14, 45, 0.55);
}

/* Which end of the track is which. The two ends are the only points on a
   search pattern a crew has to pick out by eye, so they are named here in the
   colours they are drawn in. */
.legend { display: flex; gap: 14px; margin-top: 2px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend .dot {
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 14, 45, 0.75);
}
.legend .dot.start { background: var(--pattern-start); }
.legend .dot.end { background: var(--pattern-end); }

button.ghost {
  padding: 8px 12px; font: inherit; border-radius: 10px; cursor: pointer;
  color: var(--color-text); background: var(--color-solid);
  border: 1px solid var(--color-border);
}
button.ghost:hover { background: var(--color-hover); }
button.ghost:disabled { opacity: .4; cursor: default; }
button.small { padding: 6px 10px; font-size: 12px; }
button.ghost.primary {
  background: var(--color-accent); color: #fff; border-color: transparent;
}
button.ghost.primary:hover { background: #d9381c; }
.sheet input[readonly] { color: var(--color-text-dim); background: var(--color-hover); }

/* The guided set-up after a new datum: where you are, and the way out. */
.guide {
  display: flex; align-items: center; gap: 8px;
  padding: 0 0 10px; border-bottom: 1px solid var(--color-border);
  font: 500 10.5px/1.3 var(--font-mono); color: var(--color-text-dim);
}
.guide span { flex: 1; }
.actions { display: flex; gap: 8px; }
.actions > * { flex: 1; }

/* Short names over a segmented control, one per button. */
.seglabels {
  display: flex; margin-bottom: -6px; font-family: var(--font-mono);
  font-size: 10px; color: var(--color-text-dim);
}
.seglabels span { flex: 1; text-align: center; }
/* The release's state, under its heading: a note, read first, so larger. */
.hint {
  font-family: var(--font-mono); font-size: 12.6px; line-height: 1.5;
  color: var(--color-text-dim);
}
.seg { display: flex; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; }
.seg button {
  flex: 1; padding: 7px 6px; font: inherit; font-size: 12px; cursor: pointer;
  background: var(--color-solid); color: var(--color-text-dim); border: 0;
}
.seg button.on { background: var(--color-accent); color: #fff; }
/* Options one below the other, for labels too long to sit side by side. */
.seg.stack { flex-direction: column; }
/* Tide mode's typed wind, set apart from the choice of what it pushes, and
   that choice set apart from its settings below. */
#windUniform, #windMode { margin-bottom: 18px; }
.seg.stack button + button { border-top: 1px solid var(--color-border); }
/* A mode the server reports as unimplemented: visibly present so the shape of
   the API is legible, visibly unavailable so nobody waits for a result. */
.seg button[disabled] { opacity: 0.38; cursor: not-allowed; }
.seg button[disabled]:hover { background: none; }

.disabled { opacity: .42; pointer-events: none; }
.compass { display: flex; justify-content: center; }

/* ---------- floating furniture ---------- */
/* One column in the top-left corner, opposite the tools: the colour scale,
   then the cursor readout beneath it. A column rather than two fixed positions because the legend
   changes height -- a second bar appears with the wind layer, and a warning
   line with a stale one -- and the readout has to follow it. */
#readouts {
  position: fixed; left: 14px; top: 14px; z-index: 15;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  pointer-events: none;
}
#hud {
  padding: 9px 12px;
  border-radius: var(--radius-pill); font-size: 11px; line-height: 1.7;
  white-space: pre; pointer-events: none;
}
#legend {
  padding: 9px 12px;
  border-radius: var(--radius-pill); font-size: 10.5px;
  color: var(--color-text-dim); pointer-events: none;
}
#legend .bar { height: 6px; border-radius: 3px; margin: 6px 0 3px; width: 168px; }
#legend .ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); }
#legend .sub { font-family: var(--font-mono); font-size: 9.5px; opacity: .75; margin-top: 2px; }
#legend .gap { height: 10px; }
#legend .warn { color: var(--color-accent); }
/* Bottom-left stack, from the floor up: the scale bar (drawn on the map, 26px
   up), measure + zoom (146px tall) above it, then the stats card. All clear
   the centred timeline. */
#stats {
  position: fixed; left: 14px; bottom: 212px; padding: 9px 12px;
  border-radius: var(--radius-pill); font-size: 11px; line-height: 1.7;
  white-space: pre; z-index: 15;
}
.mono { font-family: var(--font-mono); }

#zoom {
  position: fixed; left: 14px; bottom: 48px; display: flex; flex-direction: column; gap: 6px; z-index: 15;
}
#zoom button {
  width: 32px; height: 32px; border-radius: 10px; font: inherit; font-size: 15px;
  color: var(--color-text); cursor: pointer;
}
#zoom button:hover { background: var(--color-solid); }
#zoom button svg { display: block; margin: auto; }
#zoom button[aria-pressed="true"] { background: var(--color-accent); color: #fff; }
#cOver.measuring:not(.panning) { cursor: crosshair; }

#attribution {
  position: fixed; right: 14px; bottom: 8px; z-index: 14;
  font-size: 9.5px; color: var(--color-text-dim);
  background: #ffffffb0; padding: 2px 7px; border-radius: 5px;
}

/* ---------- timeline ---------- */
/* Styled after seascope_oceanfronts: round play button, the clock beside it,
   and type 1.25x what it was. */
#timeline {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px;
  width: min(820px, calc(100vw - 220px)); height: 140px;
  border-radius: var(--radius-card); padding: 10px 16px 10px;
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; z-index: 16;
}
.tl-head { display: flex; align-items: center; gap: 12px; font-size: 13.75px; color: var(--color-text-dim); }
.tl-head select { width: auto; padding: 4px 8px; font-size: 13.75px; }
#clock { color: var(--color-text); font-size: 21px; font-weight: 500; white-space: nowrap; flex: none; }
#clock:has(.utc) { display: inline-flex; flex-direction: column; line-height: 1.15; }
#clock .utc { font-size: 12px; font-weight: 400; opacity: 0.7; }
#startUtc { margin-top: -4px; text-align: right; }
#tideval { margin-left: auto; font-size: 13.75px; }
#tideToggle { padding: 2px 8px; line-height: 1; font-size: 16px; }
.play {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--color-border);
  background: var(--color-solid); cursor: pointer; font-size: 13.75px; color: var(--color-text);
  flex: none; padding: 0;
}
.play:disabled { opacity: .4; cursor: default; }
.play.step { width: 28px; height: 28px; font-size: 11px; }
.play svg { display: block; margin: auto; fill: currentColor; }
/* The plain slider: shown only when there is no curve (class set in JS). */
.tl-track { display: none; position: relative; height: 34px; }
.tl-track input { position: absolute; inset: 0 0 auto 0; width: 100%; margin: 0; height: 18px;
  z-index: 2; accent-color: var(--color-accent); cursor: ew-resize; }
.tl-track canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; }
#timeline.noCurve { height: auto; }
#timeline.noCurve #cTide { display: none; }
#timeline.noCurve .tl-track { display: block; }
#timeline.collapsed .tl-track { display: none; }
/* Folded: the head row alone -- play and the clock -- with the curve, the
   station and its level put away. The toggle keeps its place on the right. */
#timeline.collapsed { height: auto; grid-template-rows: auto; }
#timeline.collapsed #cTide, #timeline.collapsed #gauge,
#timeline.collapsed #tideval { display: none; }
#timeline.collapsed #tideToggle { margin-left: auto; }
/* No tide model in this region: the curve is the forecast's own sea-surface
   height at the release point, so there is no station to pick. */
#timeline.tideless #gauge { display: none; }
/* A tide model with no stations: the plain slider, nothing to pick or fold. */
#timeline.noGauge #gauge, #timeline.noGauge #tideToggle { display: none; }
#cTide { display: block; width: 100%; height: 100%; min-height: 0; cursor: ew-resize; touch-action: none; }
/* While dragging, keep the grab cursor even as the pointer leaves the strip --
   pointer capture keeps the scrub alive, so the cursor should agree. */
#cTide.scrubbing { cursor: grabbing; }

/* ---------- FABs ---------- */
.fab {
  position: fixed; right: 22px; bottom: 36px; width: 56px; height: 56px;
  border-radius: 50%; border: 0; cursor: pointer; z-index: 22;
  background: var(--color-accent); color: #fff; font-size: 19px;
  box-shadow: 0 4px 14px #f0412359, 0 2px 6px #00000026;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease;
}
.fab:hover { transform: scale(1.05); }
/* The Run triangle, half again the size of the old glyph. Its centroid is
   the middle of the viewBox, so it reads as centred in the circle. */
#run svg { width: 30px; height: 30px; fill: currentColor; stroke: currentColor;
  stroke-width: 1.2; stroke-linejoin: round; }
.fab:disabled { opacity: .45; cursor: default; transform: none; }
/* Save sits directly above Run. Pause (while playing) and clear (after) are
   never shown together, so they share the slot above it. */
.fab.savefab { right: 24px; bottom: 102px; width: 52px; height: 52px;
  background: var(--color-solid); color: var(--color-text);
  border: 1px solid var(--color-border); box-shadow: var(--shadow); }
.fab.savefab svg { width: 31px; height: 31px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fab.secondary { right: 28px; bottom: 164px; width: 44px; height: 44px; font-size: 13px;
  background: var(--color-solid); color: var(--color-text);
  border: 1px solid var(--color-border); box-shadow: var(--shadow); }
.fab.ghostfab { right: 28px; bottom: 164px; width: 44px; height: 44px; font-size: 15px;
  background: var(--color-solid); color: var(--color-text-dim);
  border: 1px solid var(--color-border); box-shadow: var(--shadow); }
/* Run details: above the pause / clear slot, while a run is on screen. */
.fab.infofab { bottom: 218px; }
.fab.infofab svg { width: 26px; height: 26px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; }
.runinfo table { width: 100%; border-collapse: collapse; margin: 0 0 4px; }
.runinfo td { padding: 3px 0; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.runinfo td:first-child { width: 38%; padding-right: 12px; color: var(--color-text-dim); }
.runinfo .note { margin-top: 14px; }

/* ---------- loading ---------- */
#loading {
  position: fixed; inset: 0; z-index: 40; display: grid; place-content: center;
  /* Was a near-opaque wash over the whole map. A run takes seconds and what it
     is running over is worth seeing, so this is now barely a tint. */
  background: #f3f5f724;
  color: var(--color-text-dim); font-size: 12px;
}
#loading .panel {
  padding: 12px 14px; border-radius: var(--radius-card); min-width: 260px;
}
#loading .bar { height: 3px; background: #00000014; border-radius: 2px; overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 0; background: var(--color-accent); transition: width .18s linear; }
#loading .line {
  display: flex; align-items: baseline; gap: 10px; margin-top: 9px;
}
#loading #loadingElapsed { margin-left: auto; font-size: 10.5px; opacity: .8; }
#loading.hidden { display: none; }

/* ---------- context menu, toast, save dialog ---------- */
#ctxMenu {
  position: fixed; z-index: 45; min-width: 184px; padding: 5px;
  border-radius: 12px; display: flex; flex-direction: column;
}
#ctxMenu button {
  text-align: left; padding: 8px 11px; font: inherit; border: 0;
  border-radius: 8px; background: transparent; color: var(--color-text);
  cursor: pointer;
}
#ctxMenu button:hover, #ctxMenu button:focus-visible {
  background: var(--color-hover); outline: none;
}
#toast {
  position: fixed; z-index: 46; padding: 6px 11px; border-radius: 10px;
  font-size: 11px; pointer-events: none;
}
#saveDialog, .modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center;
  background: #00000024;
}
.about {
  position: relative; width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 26px 30px 24px; border-radius: var(--radius-card);
  background: var(--color-solid); font-size: 13.5px; line-height: 1.6;
}
/* Headings as the panels set theirs: the title in Anton like the brand, the
   sections like a panel's h2. The prose stays in Inter, as panel text does. */
.about { font-family: var(--font-ui); }
.about h1 {
  font-family: var(--font-heading); font-weight: 400; letter-spacing: .04em;
  font-size: 22px; color: var(--color-accent); margin: 0 0 12px;
}
.about h2 {
  font-family: var(--font-heading); font-weight: 400; font-size: 14.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-dim);
  margin: 20px 0 8px;
}
.about p { margin: 0 0 10px; }
.about a { color: var(--color-accent); font-weight: 600; }
.about ul { margin: 0 0 12px; padding-left: 18px; }
.about li { margin: 0 0 8px; }
.about li::marker { color: var(--color-accent); }
.about .close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  font-size: 18px; color: var(--color-text-dim);
}
.about .close:hover { background: var(--color-hover); color: var(--color-accent); }
#aboutGuide { margin-top: 6px; }

/* The quick guide: one row per control, its real icon on the left. */
.guidecard { width: min(640px, calc(100vw - 32px)); }
.guidecard .lead { color: var(--color-text-dim); }
#guideList { list-style: none; padding: 0; margin: 4px 0 14px; }
#guideList li {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  padding: 7px 0; border-bottom: 1px solid var(--color-border); margin: 0;
}
#guideList li:last-child { border-bottom: 0; }
.gicon {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-solid); border: 1px solid var(--color-border);
  color: var(--color-text); font: 600 10px/1 var(--font-ui);
}
.gicon svg { width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gicon svg .fill { fill: currentColor; stroke: none; }
.gicon.red { background: var(--color-accent); color: #fff; border-color: transparent; }
.gicon.red svg { fill: currentColor; }
.gicon.brand { font-family: var(--font-heading); color: var(--color-accent); font-size: 13px; }
.guidefoot { display: flex; align-items: center; gap: 12px; }
.guidefoot .check { flex: 1; font-size: 12.5px; }
#saveDialog .panel {
  width: min(360px, calc(100vw - 32px)); padding: 16px 18px;
  border-radius: var(--radius-card); display: flex; flex-direction: column;
  gap: 12px; background: var(--color-solid);
}
#saveDialog h2 {
  font-family: var(--font-heading); font-weight: 400; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-dim);
  margin: 0;
}

@media (max-width: 900px) {
  #timeline { width: calc(100vw - 28px); }
  .sheet { width: calc(100vw - 28px); }
  #stats { display: none; }
}
