/* Mission control v2: the shared shell (docs/mission-ui.md, "Design tokens" and the page specs).
   Light by default; dark follows prefers-color-scheme unless the menu remembered a theme (html[data-theme]).
   Status colours mean states and nothing else; the river art behind the panels follows the season, never the state.
   Plain CSS, no images, no build step. The art's colours are set on :root by ui.js (art.setSeason). */

@property --art-a  { syntax: '<color>'; inherits: true; initial-value: #dde3ea; }
@property --art-b  { syntax: '<color>'; inherits: true; initial-value: #e6e8ec; }
@property --art-l1 { syntax: '<color>'; inherits: true; initial-value: #6f87a3; }
@property --art-l2 { syntax: '<color>'; inherits: true; initial-value: #8ea3bb; }

:root {
  color-scheme: light;
  --bg: #f4f1ea;                       /* warm paper */
  --panel: rgba(255, 255, 255, 0.9);   /* translucent panel over the art; contrast is measured against this */
  --panel-solid: #ffffff;              /* band, chips, buttons and sheets: fully opaque */
  --text: #1c2228;
  --muted: #566069;
  --line: rgba(28, 34, 40, 0.14);
  --accent: #1e5f7d; --accent-ink: #ffffff; --accent-soft: #e3eff5;
  --ok: #1b6e3a;    --ok-ink: #ffffff;   --ok-soft: #e1f1e6;   --ok-text: #155a2f;
  --warn: #f2b233;  --warn-ink: #1c2228; --warn-soft: #fff0cc; --warn-text: #6b4500;
  --down: #b9372a;  --down-ink: #ffffff; --down-soft: #fbe1dc; --down-text: #8a2419;
  --unk: #5c6670;   --unk-ink: #ffffff;  --unk-soft: #e8ebee;  --unk-text: #3c454e;
  /* the art: wash tints (a, b), flow-line colours (l1, l2); the unknown season's slate until ui.js sets them */
  --art-a: #dde3ea; --art-b: #e6e8ec; --art-l1: #6f87a3; --art-l2: #8ea3bb;
  --art-wash-alpha: 0.2; --art-line-alpha: 0.3; --art-ripple-alpha: 0.24;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.05), 0 8px 24px rgba(20, 30, 40, 0.06);
  --radius: 16px; --radius-btn: 12px;
  --header-h: 60px; --tabbar-h: 64px; --gutter: 16px; --gap: 12px;
  --blur: blur(14px);
  transition: --art-a 2s ease, --art-b 2s ease, --art-l1 2s ease, --art-l2 2s ease;   /* the 2 s fade between seasons */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e141a;                      /* deep water */
    --panel: rgba(22, 30, 38, 0.9);
    --panel-solid: #161e26;
    --text: #e4e9ee;
    --muted: #a9b4bf;
    --line: rgba(228, 233, 238, 0.14);
    --accent: #7cc3e8; --accent-ink: #0b1a24; --accent-soft: #1b3240;
    --ok: #2fae62;    --ok-ink: #06140b;   --ok-soft: #10301d;   --ok-text: #9fe0b7;
    --warn: #f0b429;  --warn-ink: #1d1500; --warn-soft: #3a2a06; --warn-text: #ffd87a;
    --down: #ef6a57;  --down-ink: #1e0905; --down-soft: #3f1711; --down-text: #ffb3a7;
    --unk: #8a949e;   --unk-ink: #10151a;  --unk-soft: #262d34;  --unk-text: #c3cbd3;
    --art-a: #172029; --art-b: #1a222c; --art-l1: #6f87a3; --art-l2: #8ea3bb;
    --art-wash-alpha: 0.22; --art-line-alpha: 0.22; --art-ripple-alpha: 0.18;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e141a;
  --panel: rgba(22, 30, 38, 0.9);
  --panel-solid: #161e26;
  --text: #e4e9ee;
  --muted: #a9b4bf;
  --line: rgba(228, 233, 238, 0.14);
  --accent: #7cc3e8; --accent-ink: #0b1a24; --accent-soft: #1b3240;
  --ok: #2fae62;    --ok-ink: #06140b;   --ok-soft: #10301d;   --ok-text: #9fe0b7;
  --warn: #f0b429;  --warn-ink: #1d1500; --warn-soft: #3a2a06; --warn-text: #ffd87a;
  --down: #ef6a57;  --down-ink: #1e0905; --down-soft: #3f1711; --down-text: #ffb3a7;
  --unk: #8a949e;   --unk-ink: #10151a;  --unk-soft: #262d34;  --unk-text: #c3cbd3;
  --art-a: #172029; --art-b: #1a222c; --art-l1: #6f87a3; --art-l2: #8ea3bb;
  --art-wash-alpha: 0.22; --art-line-alpha: 0.22; --art-ripple-alpha: 0.18;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* State classes: anything can carry a level; its children read --lv, --lv-ink, --lv-soft, --lv-text. */
.lv-ok      { --lv: var(--ok);   --lv-ink: var(--ok-ink);   --lv-soft: var(--ok-soft);   --lv-text: var(--ok-text); }
.lv-warning { --lv: var(--warn); --lv-ink: var(--warn-ink); --lv-soft: var(--warn-soft); --lv-text: var(--warn-text); }
.lv-down    { --lv: var(--down); --lv-ink: var(--down-ink); --lv-soft: var(--down-soft); --lv-text: var(--down-text); }
.lv-unknown { --lv: var(--unk);  --lv-ink: var(--unk-ink);  --lv-soft: var(--unk-soft);  --lv-text: var(--unk-text); }

/* ---- base and type: system sans, 1.45; body 16, secondary 15, floor 14 ---------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh; overflow-x: clip; overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: max(14px, 0.92em); }
h1, h2, h3, p, figure { margin: 0; }
small { font-size: 14px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.secondary { font-size: 15px; }
.eyebrow, .label, .ctl-h { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.sec { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 6px 4px 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sec .sub { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 14px; }
.lnk { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }   /* a standalone link: a 44 px target */
.state { font-size: 16px; font-weight: 700; color: var(--lv-text); }                       /* a state word, 16 px, never tinted smaller */
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- the river art: wash, flow lines, ripples; fixed behind everything, never under small text ---------------- */
.art { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.art .wash {
  position: absolute; inset: -10%; opacity: var(--art-wash-alpha);
  background:
    radial-gradient(60% 50% at 18% 14%, var(--art-a) 0%, transparent 70%),
    radial-gradient(55% 45% at 84% 74%, var(--art-b) 0%, transparent 70%);
}
.art svg.flow {
  position: absolute; left: -32px; right: -32px; top: 0; width: calc(100% + 64px); height: 100%;
  opacity: var(--art-line-alpha); animation: drift 120s ease-in-out infinite alternate;
}
.art svg.flow path { fill: none; stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.art svg.flow path:nth-child(odd)  { stroke: var(--art-l1); }
.art svg.flow path:nth-child(even) { stroke: var(--art-l2); }
.art .ripple {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(26px); opacity: var(--art-ripple-alpha);
  background: radial-gradient(circle, var(--art-l2) 0%, transparent 62%);
}
.art .ripple.r1 { left: -14vmax; top: 6vh;    animation: ripple1 46s ease-in-out infinite alternate; }
.art .ripple.r2 { right: -16vmax; top: 34vh;  animation: ripple2 58s ease-in-out infinite alternate; background: radial-gradient(circle, var(--art-l1) 0%, transparent 62%); }
.art .ripple.r3 { left: 20vw; bottom: -20vmax; animation: ripple3 70s ease-in-out infinite alternate; }
@keyframes drift   { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
@keyframes ripple1 { from { transform: translate(0, 0); } to { transform: translate(46px, 30px); } }
@keyframes ripple2 { from { transform: translate(0, 0); } to { transform: translate(-58px, 24px); } }
@keyframes ripple3 { from { transform: translate(0, 0); } to { transform: translate(40px, -56px); } }
@media (prefers-reduced-motion: reduce) {
  .art *, .spin, .flash, .mk.live { animation: none !important; }
  :root { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- header: wordmark, page title, the ticking age, the menu ------------------------------------------------- */
header.top {
  position: sticky; top: 0; z-index: 5; min-height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 6px var(--gutter);
  padding-top: calc(6px + env(safe-area-inset-top));
  background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.15; }
.brand .wordmark { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.brand .title { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.fresh { margin-left: auto; flex: 0 1 auto; min-width: 0; max-width: 46%; font-size: 14px; line-height: 1.25; color: var(--muted); text-align: right; font-weight: 600; }
.fresh.lv-warning, .fresh.warn { color: var(--warn-text); font-weight: 700; }
.fresh.lv-down, .fresh.bad { color: var(--down-text); font-weight: 700; }
.menu-btn {
  width: 48px; height: 48px; flex: none; border-radius: var(--radius-btn); border: 1px solid var(--line);
  background: var(--panel-solid); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; padding: 0;
}

/* ---- layout: one column, 16 px gutter, 12 px gaps; two sticky columns from 1100 px ----------------------------- */
main {
  position: relative; z-index: 1; max-width: 720px; margin: 0 auto;
  padding: var(--gap) var(--gutter) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
  display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr);
}
main > *, .col-a > *, .col-b > * { min-width: 0; }
.col-a, .col-b { display: grid; gap: var(--gap); align-content: start; grid-template-columns: minmax(0, 1fr); }
.card {
  background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px var(--gutter);
}
.card.tight { padding: 0; overflow: hidden; }
.stack { display: grid; gap: var(--gap); }
.row-btns { display: flex; flex-wrap: wrap; gap: var(--gap); }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.links a.btn { min-height: 48px; }

/* ---- marks and chips: word, then shape, then colour -------------------------------------------------------- */
.mk {
  display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  font-size: 13px; font-weight: 900; line-height: 1; color: var(--lv-ink); background: var(--lv);
  box-shadow: 0 0 0 1px var(--text);   /* the ring: an edge even for amber on a light panel */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mk.live { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; min-height: 32px;
  background: var(--lv); color: var(--lv-ink); font-weight: 800; font-size: 16px; letter-spacing: 0.01em; line-height: 1.2;
}
.chip.small { font-size: 14px; min-height: 28px; padding: 3px 10px 3px 4px; }
.stale .mk, .page-stale .mk { filter: grayscale(1); opacity: 0.7; }
.stale .state, .page-stale .state { color: var(--muted); }

/* ---- the verdict band: opaque, read at arm's length; four levels by class ------------------------------------ */
.band {
  background: var(--lv-soft); color: var(--text); border: 1px solid var(--line); border-left: 6px solid var(--lv);
  border-radius: var(--radius); padding: 16px var(--gutter) 14px; box-shadow: var(--shadow);
}
.band h1 { font-size: 27px; line-height: 1.18; margin: 12px 0 6px; font-weight: 800; letter-spacing: -0.012em; text-wrap: balance; }
.band .rest { font-size: 18px; line-height: 1.35; margin: 0 0 8px; font-weight: 600; }
.band .detail { font-size: 16px; line-height: 1.4; }
.band .call { display: inline-flex; align-items: center; min-height: 48px; font-size: 17px; font-weight: 800; color: var(--accent); text-decoration: none; }
.band .call:not([href]) { color: var(--text); }
.band .also { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.band .nothing { font-size: 17px; color: var(--muted); font-weight: 600; margin-top: 12px; }
.also-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px; text-align: left;
  background: transparent; border: 0; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text);
}
.check-line { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 0 12px; flex-wrap: wrap; margin-top: 8px; }
.check-line > span { flex: 1 1 220px; line-height: 1.35; }
.last-done { font-size: 14px; color: var(--muted); margin-top: 6px; }
.old, .age.old { color: var(--warn-text); font-weight: 700; }

/* WHAT TO DO: an amber box with the action in full text */
.todo {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  display: grid; gap: 4px;
}
.todo .label { color: var(--warn-text); }
.todo .action { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--text); }
.lv-ok .todo, .todo.quiet { background: transparent; border-color: var(--line); }
.lv-ok .todo .label, .todo.quiet .label { color: var(--muted); }

/* The lost-contact banner: grey, says since when, one sentence */
.banner {
  background: var(--unk-soft); color: var(--text); border: 1px solid var(--line); border-left: 6px solid var(--unk);
  border-radius: var(--radius); padding: 12px var(--gutter); display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.4;
}
.banner .mk { margin-top: 2px; }
.banner b { font-weight: 800; }

/* ---- buttons: 48 px targets, 12 px radius; the destructive one red-tinted ------------------------------------- */
.btn {
  min-height: 48px; padding: 10px 16px; border-radius: var(--radius-btn); border: 1px solid var(--line);
  background: var(--panel-solid); color: var(--text); font-weight: 650; font-size: 16px; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { background: var(--down-soft); color: var(--down-text); border-color: var(--down); font-weight: 750; }
.btn.danger.solid { background: var(--down); color: var(--down-ink); border-color: transparent; }
.btn.wide { width: 100%; }
.btn.link { background: transparent; border-color: transparent; color: var(--accent); padding: 6px 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.btn .spin { margin: 0; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; background: var(--panel-solid); }
.seg button {
  flex: 1 1 0; min-width: 0; min-height: 48px; border: 0; background: transparent; color: var(--text);
  font-weight: 650; font-size: 15px; padding: 8px 10px; cursor: pointer; line-height: 1.2;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.lit, .seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:disabled { opacity: 0.45; cursor: default; }
.seg button:focus-visible { outline-offset: -3px; }
.stepper { display: flex; align-items: center; gap: var(--gap); flex-wrap: wrap; }
.stepper .btn.step { width: 48px; padding: 0; font-size: 24px; flex: none; }
.stepper output { font-size: 20px; font-weight: 800; min-width: 64px; text-align: center; }
.readout { font-size: 15px; color: var(--muted); }
.readout b { color: var(--text); }

/* ---- tiles: eyebrow, mark + state word, the sentence ------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  text-align: left; min-height: 64px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--panel-solid);
  padding: 10px 12px; color: var(--text); display: flex; flex-direction: column; gap: 6px; align-items: stretch; cursor: pointer; min-width: 0; font: inherit;
}
.tile .eyebrow { font-size: 14px; }
.tile .tile-h { display: flex; align-items: center; gap: 8px; }
.tile .state { font-size: 16px; }
.tile .words { font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--text); }
.tile.wide { grid-column: 1 / -1; }

/* ---- cards that open: rows (collapsed / expanded), groups by cause, the fine list, the installer ------------- */
.group-h { display: flex; gap: 10px; align-items: flex-start; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: var(--lv-soft); }
.group-h b { font-size: 16px; }
.group-h .g-action { font-size: 15px; margin-top: 2px; }
details.row { border-top: 1px solid var(--line); }
details.row:first-child, .group-h + details.row { border-top: 0; }
details.row > summary {
  list-style: none; display: grid; grid-template-columns: 20px 1fr 20px; align-items: start; gap: 10px;
  padding: 12px var(--gutter); min-height: 56px; cursor: pointer;
}
details.row > summary::-webkit-details-marker { display: none; }
details.row > summary .mk { margin-top: 2px; }
.row .name { font-weight: 750; font-size: 16px; line-height: 1.3; }
.row .sum { font-size: 15px; line-height: 1.35; margin-top: 1px; }
.row .from { font-size: 14px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.row .since { font-size: 14px; color: var(--muted); font-weight: 600; }
.chev { color: var(--muted); font-size: 22px; line-height: 1; transition: transform 0.2s; }
details[open] > summary .chev { transform: rotate(90deg); }
.row-body { padding: 0 var(--gutter) 16px; display: grid; gap: var(--gap); }
.row-body .detail { font-size: 15px; line-height: 1.45; }
.fold .row-body details.row { border: 1px solid var(--line); border-radius: var(--radius-btn); }
.fold .row-body details.row + details.row { margin-top: 8px; }
.muted-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 12px var(--gutter); color: var(--muted); border-top: 1px solid var(--line); font-size: 15px; }
details.sub > summary, details.fine > summary, details.installer > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font-weight: 750; font-size: 16px;
}
details.sub > summary::-webkit-details-marker, details.fine > summary::-webkit-details-marker, details.installer > summary::-webkit-details-marker { display: none; }
details.sub > summary .chev, details.fine > summary .chev, details.installer > summary .chev { margin-left: auto; }
details.sub { border-top: 1px solid var(--line); margin-top: 12px; }
details.sub .sub-body { display: grid; gap: var(--gap); padding-bottom: 6px; }
details.fine { padding: 0 var(--gutter); }
details.fine > summary { min-height: 56px; }
details.fine > summary .fine-names { font-weight: 500; color: var(--muted); font-size: 14px; flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fine .fine-list { border-top: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)); }

/* Addresses and links (for Will): the engineer's lines, under a dashed rule */
.addr { font-size: 14px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 4px; }
.addr .label { font-size: 14px; }
.addr code { color: var(--text); }

/* The installer: hatched, a tool icon, never Colin's controls */
.installer {
  border-style: dashed; border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
  background-image: repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--warn) 10%, transparent) 12px 14px);
}
.installer > summary > span { white-space: nowrap; }
.installer > summary .tool { font-size: 18px; }
.installer > summary .note { font-size: 14px; color: var(--muted); font-weight: 500; white-space: normal; flex: 1; min-width: 0; }
.installer .body { display: grid; gap: var(--gap); padding-top: 10px; }

/* ---- controls: on the thing they change; before / confirm / pending / result / failure on themselves ------------ */
.ctl { border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 12px; background: var(--panel-solid); display: grid; gap: 10px; }
.ctl.off { opacity: 0.85; }
.ctl .effect, .ctl-before { font-size: 14px; color: var(--muted); line-height: 1.4; }
.ctl .effect b, .ctl-before b { color: var(--text); }
.ctl-why { font-size: 14px; color: var(--warn-text); font-weight: 700; }
.ctl-status { font-size: 15px; font-weight: 650; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; }
.ctl-status:empty { display: none; }
.ctl-status.pending { color: var(--accent); }
.ctl-status.done { color: var(--ok-text); }
.ctl-status.failed { color: var(--down-text); }
.spin { width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { border-right-color: currentColor; opacity: 0.6; } }

/* ---- the room / a still ------------------------------------------------------------------------------------ */
.still { position: relative; height: 132px; border-radius: var(--radius-btn); overflow: hidden; background: #22262b; border: 1px solid var(--line); cursor: pointer; }
.still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.still.old img { opacity: 0.5; filter: grayscale(0.5); }
.still .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px; display: flex; gap: 8px; align-items: center; background: rgba(0, 0, 0, 0.62); color: #f2f4f6; font-size: 14px; font-weight: 600; }
.still .cap .mk { box-shadow: 0 0 0 1px #f2f4f6; }
.still.none { display: flex; align-items: center; justify-content: center; padding: 12px; background: var(--unk-soft); cursor: default; }
.still.none .cap-none { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; color: var(--text); }

/* ---- footer and the tab bar ----------------------------------------------------------------------------------- */
footer.foot { font-size: 14px; color: var(--muted); padding: 8px 4px 0; line-height: 1.6; }
footer.foot a { display: inline-flex; min-height: 44px; align-items: center; }
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  display: flex; padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--line);
}
nav.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 700; min-height: 48px; line-height: 1.1;
}
nav.tabs a.on { color: var(--accent); }
nav.tabs a svg { width: 24px; height: 24px; }
nav.tabs a:focus-visible { outline-offset: -3px; border-radius: 8px; }

/* ---- sheets: the menu, confirm, contacts, a still; stacked full-width 48 px buttons --------------------------- */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; width: 100vw; margin: 0; max-height: 100dvh; height: 100dvh; color: var(--text); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog.sheet .sheet-in {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--panel-solid); color: var(--text); border-radius: 20px 20px 0 0;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
  display: grid; gap: var(--gap); max-height: 90dvh; overflow: auto;
}
dialog.sheet h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
dialog.sheet p { font-size: 16px; line-height: 1.45; }
dialog.sheet .stack .btn { width: 100%; }
dialog.sheet .contact { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; min-height: 56px; align-content: center; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
dialog.sheet .contact b { font-size: 16px; }
dialog.sheet .contact span { font-size: 14px; color: var(--muted); grid-column: 1; }
dialog.sheet .contact .tel { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent); font-weight: 700; font-size: 16px; }
dialog.sheet a.contact:hover b { text-decoration: underline; }
dialog.sheet img.still-img { width: 100%; height: auto; border-radius: var(--radius-btn); display: block; background: #000; }
dialog.sheet .recent { display: grid; gap: 0; }
dialog.sheet .recent .ev { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
dialog.sheet .recent .ev .when { color: var(--muted); font-size: 14px; white-space: nowrap; }
dialog.sheet .menu-row { display: grid; gap: 8px; }
dialog.sheet .menu-row .btn { justify-content: flex-start; }
dialog.sheet .menu-row .btn .chev { margin-left: auto; }
@media (min-width: 900px) {
  dialog.sheet .sheet-in { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 20px; max-height: 86vh; padding-bottom: 18px; }
}

/* ---- wider screens: the tab pill in the header from 900 px, two sticky columns from 1100 px ------------------- */
@media (min-width: 900px) {
  nav.tabs {
    position: fixed; top: 6px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%);
    height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel-solid);
  }
  nav.tabs a { flex-direction: row; gap: 8px; padding: 0 18px; min-height: 48px; font-size: 14px; white-space: nowrap; }
  nav.tabs a svg { width: 18px; height: 18px; }
  main { padding-bottom: 32px; }
}
@media (min-width: 1100px) {
  main { max-width: 1180px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; padding-top: 20px; }
  .col-a { position: sticky; top: calc(var(--header-h) + 16px); }
  .band h1 { font-size: 30px; }
}

/* ---- print: the words, nothing fancy ------------------------------------------------------------------------- */
@media print {
  .art, nav.tabs, .menu-btn, dialog, .fresh { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .band, .banner { box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  details { display: block; }
}
