
  /* The phone page: the tablet's panel in a hand. Its palette, its glass, its rule
     that colour means something is on, and the iPhone's own type. The board serves
     it (session 12); until then the fake board on a Mac does (phone/fake-board.mjs). */
  :root {
    --text: #F2F2F7;
    --muted: #8E8E93;
    --dim: #6E6E75;
    --faint: #48484A;
    --green: #30D158;
    --blue: #0A84FF;
    --red: #FF453A;
    --amber: #FF9F0A;
    --ember: #FF7A3D;
    --cool: #8FB8D8;
    --ice: #64D2FF;
    --raised: #3A3A3C;
    --knob: #636366;
    --deep-amber: #9A5B00;
    --sheet: #1C1C1E;
    --card: #2C2C2E;
    --hair: #3A3A3C;
    /* Each tank's own liquid, as the panel draws it (devices/Tank.kt). A test keeps them in step. */
    --water: #4AA8FF;
    --gas: #FFD60A;
    --waste: #AC8E68;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
    --st: env(safe-area-inset-top, 0px);
    --sb: env(safe-area-inset-bottom, 0px);
    --sl: env(safe-area-inset-left, 0px);
    --sr: env(safe-area-inset-right, 0px);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  [hidden] { display: none !important; }
  html { height: 100%; background: #000; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
  body {
    height: 100%; overflow: hidden; overscroll-behavior: none; background: #000; color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  button { font: inherit; color: inherit; background: none; border: 0; text-align: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
  svg { display: block; }
  .tnum { font-variant-numeric: tabular-nums; }

  /* ---- the page: top line, the battery, the buttons. On its side with a battery, the battery takes a column ---- */
  #app {
    position: fixed; inset: 0;
    padding: calc(var(--st) + 6px) calc(var(--sr) + 16px) calc(var(--sb) + 12px) calc(var(--sl) + 16px);
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top" "hero" "tanks" "tiles" "tip";
    transform-origin: 50% 20%; will-change: transform;
  }
  body.side.battery #app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top tiles" "hero tiles" "tanks tiles" "tip tip"; column-gap: 20px;
  }
  /* On its side an iPhone has no status bar, so the buttons would start at the very top edge. */
  body.side #app { padding-top: calc(var(--st) + 16px); }

  .top { grid-area: top; display: flex; align-items: center; gap: 8px; min-height: 44px; }
  .line { flex: 1; min-width: 0; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 300ms ease; }
  .line.good { color: var(--green); }
  .line.warn { color: var(--amber); }
  .line.alert { color: var(--red); }
  .corner { flex: none; display: flex; align-items: center; margin-right: -10px; }
  .gauge { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); transition: color 160ms ease, transform 160ms var(--ease-out); }
  .gauge svg { width: 24px; height: 24px; }
  .gauge:active { color: var(--text); transform: scale(0.92); }
  /* The board: blue is connected, grey on its way, red lost. One dot, because it's right nearly all the time. */
  .dot { width: 44px; height: 44px; display: grid; place-items: center; }
  .dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: background-color 300ms ease, box-shadow 300ms ease; }
  .dot.up i { background: var(--blue); }
  .dot.lost i { background: var(--red); box-shadow: 0 0 0 6px rgba(255, 69, 58, 0.24); }

  /* ---- the battery: the percentage is the hero ---- */
  .hero {
    grid-area: hero; display: grid; width: 100%; padding: 0 0 18px; column-gap: 12px;
    grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "pct slot" "bar bar"; align-items: end;
  }
  body.side .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pct" "bar" "slot"; align-items: start; }
  .pct { grid-area: pct; font-size: clamp(64px, 23vw, 104px); font-weight: 200; letter-spacing: -0.05em; line-height: 0.84; margin-left: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 300ms ease; }
  body.side .pct { font-size: clamp(56px, 10vw, 84px); }
  .pct small { font-size: 0.34em; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 0.08em; }
  .pct.stale { color: var(--muted); }
  .pct.warn { color: var(--amber); }
  .pct.alert { color: var(--red); }
  .slot { grid-area: slot; min-width: 0; text-align: right; padding-bottom: 3px; transition: opacity 300ms ease; }
  body.side .slot { text-align: left; padding: 16px 0 0; }
  .slot .main { font-size: 27px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .slot .main.dim { color: var(--muted); }
  .slot .main u { text-decoration: none; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
  .slot .cap { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; }
  body.side .slot .cap { justify-content: flex-start; }
  .slot .cap i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
  /* All spans, because a button may only hold phrasing content, so each says it's a block. */
  .slot .main, .barwrap, .bar, .bar i, .tile .icw { display: block; }
  .tile .icw { line-height: 0; }
  .barwrap { grid-area: bar; position: relative; margin-top: 16px; }
  .bar { height: 10px; border-radius: 5px; background: #1C1C20; overflow: hidden; }
  .bar i { display: block; height: 100%; border-radius: 5px; background: #C7CCDB; clip-path: inset(0 100% 0 0 round 5px); transition: clip-path 600ms var(--ease-out), background-color 300ms ease; }
  .bar i.charging { background: var(--green); }
  .mark { position: absolute; top: -4px; bottom: -4px; left: 0; width: 3px; margin-left: -1.5px; border-radius: 2px; background: rgba(242, 242, 247, 0.9); transition: transform 600ms var(--ease-out), opacity 300ms ease; }
  .mark.warn { background: var(--amber); }
  .mark.alert { background: var(--red); }

  /* ---- the tanks: a name, its figure and a thin bar of its own liquid, the same everywhere.
     Upright, up to three across under the charge bar; on its side, stacked at the foot of the battery's column ---- */
  .tanks { grid-area: tanks; display: grid; grid-template-columns: repeat(var(--across, 1), minmax(0, 1fr)); gap: 14px; width: 100%; min-height: 0; padding: 0 0 18px; margin-top: -2px; }
  body.side .tanks { grid-template-columns: minmax(0, 1fr); align-content: end; padding: 0; margin: 0; }
  .tanks .tk, .tanks .tb, .tanks .tb i { display: block; }
  .tanks .tt { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
  .tanks .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tanks .fig { flex: none; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; transition: color 300ms ease; }
  .tanks .fig.warn { color: var(--amber); }
  .tanks.stale .fig, .tanks .fig.unheard { color: var(--muted); }
  .tanks .tb { height: 5px; border-radius: 3px; background: #1C1C20; margin-top: 7px; overflow: hidden; }
  .tanks .tb i { height: 100%; border-radius: 3px; background: var(--ink); clip-path: inset(0 100% 0 0 round 3px); transition: clip-path 600ms var(--ease-out); }

  /* ---- the buttons: the panel's glass, laid out by the panel's own rules ---- */
  .tiles { grid-area: tiles; position: relative; min-height: 0; }
  .tile { position: absolute; left: 0; top: 0; contain: layout; }
  .tile .glass {
    position: absolute; inset: 0; border-radius: 26px; padding: 16px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(180deg, #1B1B1E, #141416); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
    transition: transform 300ms var(--ease-out);
  }
  /* On is a change of material, not a glow: the lit layer fades in over the dark one. */
  .tile .glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--on-bg); opacity: 0; transition: opacity 220ms ease; }
  .tile.on .glass::before { opacity: 1; }
  .tile .glass > * { position: relative; }
  .tile.down .glass { transform: scale(0.955); transition-duration: 110ms; }
  .tile .ic { width: 32px; height: 32px; flex: none; color: #A1A1A8; transition: color 220ms ease; }
  .tile .words { display: block; min-width: 0; }
  /* A name takes one or two lines and a caption one or two, as the tile has room (fitNames sets each's lines). */
  .tile .nm { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; font-size: 17px; line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; color: #A1A1A8; overflow: hidden; overflow-wrap: anywhere; transition: color 220ms ease; }
  .tile .cap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; margin-top: 2px; font-size: 13px; line-height: 1.2; color: #6E6E75; overflow: hidden; overflow-wrap: anywhere; transition: color 220ms ease; }
  .tile.on .ic { color: var(--accent); }
  .tile.on .nm { color: var(--ink-on); }
  .tile.on .cap { color: var(--cap-on); }
  /* With the board away nothing can switch, so the off ones dim, and a lit one is a little less sure of itself,
     as the panel draws a state the board hasn't confirmed. */
  .tile.away:not(.on) .ic, .tile.away:not(.on) .nm { color: #55555B; }
  .tile.away:not(.on) .cap { color: #45454A; }
  .tile.on.away .glass::before { opacity: 0.8; }
  .tile .cap.late { color: var(--amber); }
  .tile.on.bright .cap.late { color: var(--deep-amber); }
  .tile.large .ic { width: 38px; height: 38px; }
  .tile.large .nm { font-size: 19px; }
  .tile.small .glass { border-radius: 20px; padding: 13px; }
  .tile.small .ic { width: 26px; height: 26px; }
  .tile.small .nm { font-size: 14.5px; }
  .tile.small .cap { font-size: 12px; }
  /* A short wide tile has no room for the icon over the words, so they sit in a row, as iOS lays out its small tiles. */
  .tile.row .glass { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
  .tile.small.row .ic { width: 23px; height: 23px; }
  .tile .ring { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; transform: rotate(-90deg); opacity: 0; transition: opacity 150ms ease; }
  .tile.holding .ring { opacity: 1; }
  .ring .track { stroke: rgba(255, 255, 255, 0.22); }
  .ring .prog { stroke: #fff; stroke-dasharray: 59.7; stroke-dashoffset: 59.7; transition: stroke-dashoffset 200ms var(--ease-out); }
  .tile.holding .ring .prog { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms linear; }
  .tile.on.bright .ring .track { stroke: rgba(28, 28, 30, 0.18); }
  .tile.on.bright .ring .prog { stroke: #1C1C1E; }
  .tone-warm { --on-bg: linear-gradient(180deg, #F6F2E9, #E7E2D6); --accent: #E08A00; --ink-on: #1C1C1E; --cap-on: rgba(28, 28, 30, 0.6); }
  .tone-cool { --on-bg: linear-gradient(180deg, #EDF2F9, #D9E2ED); --accent: #0A6CE0; --ink-on: #1C1C1E; --cap-on: rgba(28, 28, 30, 0.6); }
  .tone-ice, .tone-teal, .tone-green, .tone-ember, .tone-own { --on-bg: linear-gradient(180deg, #333336, #262629); --ink-on: #fff; --cap-on: rgba(255, 255, 255, 0.7); }
  .tone-ice { --accent: #64D2FF; }
  .tone-teal { --accent: #5AC8C8; }
  .tone-green { --accent: #30D158; }
  .tone-ember { --accent: #FF7A3D; }
  .empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; border-radius: 26px; border: 1.5px dashed #3A3A3F; padding: 24px; }
  .empty b { font-size: 20px; font-weight: 600; }
  .empty span { font-size: 15px; color: var(--muted); line-height: 1.4; }

  /* ---- the tip, once, until it's added to the Home Screen ---- */
  .tip { grid-area: tip; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 6px 12px 16px; border-radius: 16px; background: var(--sheet); font-size: 14px; line-height: 1.35; color: var(--muted); }
  .tip b { color: var(--text); font-weight: 600; }
  .tip svg { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; color: var(--blue); }
  .tip .x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; color: var(--dim); }

  /* ---- can't reach the board: what to check, in order. In place of the buttons if none have ever
     come; otherwise a bar at the foot opens the same list in the sheet, so the buttons' last word stays in view ---- */
  .guide { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 10px 4px 12px; scrollbar-width: none; transition: opacity 300ms ease, transform 300ms var(--ease-out); }
  .guide::-webkit-scrollbar { display: none; }
  .guide > * { max-width: 520px; } /* on its side the space is wide; lines that long are hard to follow */
  .guide h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
  .guide .glede { margin-top: 6px; font-size: 15px; line-height: 1.4; color: var(--muted); }
  .checks { list-style: none; counter-reset: check; display: grid; gap: 16px; margin-top: 8px; }
  .guide .checks { margin-top: 22px; }
  .checks li { counter-increment: check; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; }
  .checks li::before { content: counter(check); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
  .checks li > * { grid-column: 2; }
  .checks .ck { font-size: 16px; font-weight: 600; line-height: 26px; }
  .checks .cx { font-size: 14px; line-height: 1.4; color: var(--muted); }
  .checks .cx b { font-weight: 600; color: var(--text); }
  .retry { display: block; width: 100%; height: 50px; margin-top: 24px; border-radius: 14px; background: var(--card); text-align: center; font-size: 17px; font-weight: 600; transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
  .retry:active { transform: scale(0.98); background: #3A3A3C; }
  .retry:disabled { color: var(--muted); }
  .gfoot { margin: 12px 4px 0; text-align: center; font-size: 13px; line-height: 1.4; color: var(--dim); }
  .lostbar { grid-area: tip; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 12px; padding: 0 10px 0 16px; border-radius: 16px; background: var(--sheet); font-size: 15px; transition: transform 140ms var(--ease-out), opacity 240ms ease, background-color 160ms ease; }
  .lostbar i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
  .lostbar b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lostbar span { flex: none; display: flex; align-items: center; gap: 2px; color: var(--blue); }
  .lostbar svg { width: 16px; height: 16px; }
  .lostbar:active { transform: scale(0.98); }
  /* Both arrive after four seconds of trying, so they rise a little rather than pop. */
  @starting-style { .guide, .lostbar { opacity: 0; transform: translateY(8px); } }

  /* ---- the sheet: readings, or the demo's controls ---- */
  .scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.55); opacity: 0; }
  .sheet {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 600px;
    max-height: calc(100% - var(--st) - 28px); display: flex; flex-direction: column;
    background: var(--sheet); border-radius: 24px 24px 0 0; transform: translate3d(0, 100%, 0);
    padding: 0 0 var(--sb); touch-action: none; will-change: transform; outline: none;
  }
  .sheet-head { flex: none; padding: 8px calc(var(--sr) + 20px) 12px calc(var(--sl) + 20px); }
  .grab { width: 36px; height: 5px; border-radius: 3px; background: #545458; margin: 0 auto 12px; }
  .shead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .shead h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
  .sstatus { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 14px; color: var(--muted); }
  .sstatus i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
  .closer { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #3A3A3C; display: grid; place-items: center; color: #AEAEB2; transition: transform 140ms var(--ease-out); }
  .closer:active { transform: scale(0.9); }
  .closer svg { width: 12px; height: 12px; }
  .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 0 calc(var(--sr) + 16px) 20px calc(var(--sl) + 16px); scrollbar-width: none; }
  .sheet-body::-webkit-scrollbar { display: none; }
  .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { min-width: 0; background: var(--card); border-radius: 20px; padding: 14px 15px 13px; display: flex; flex-direction: column; }
  .card.wide { grid-column: 1 / -1; }
  /* The name, and what it's doing to the right. A phone's half card is narrow, so when both won't fit on one line the
     word goes under the name, rather than either being cut short. */
  .card .ct { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 8px; row-gap: 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
  .card .ct span { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .ct span:last-child:not(:first-child) { margin-left: auto; }
  .card .cv { margin-top: 10px; font-size: 40px; font-weight: 200; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .cv u { text-decoration: none; font-size: 18px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 3px; }
  .card .cs { margin-top: 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
  /* Two lines at most: a half-width card is narrow, and "Unplugged, or out of range" should still read whole. */
  .card .cd { margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .card.dim .cv, .card.dim .cd { opacity: 0.55; }
  .good { color: var(--green); }
  .warn { color: var(--amber); }
  .alert { color: var(--red); }
  .menu > * + * { margin-top: 10px; }
  .level { background: var(--card); border-radius: 20px; padding: 15px 16px 14px; }
  .level + .level { margin-top: 10px; }
  .level .lt { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 600; }
  .level .lb { position: relative; height: 8px; border-radius: 4px; background: #3A3A3C; margin-top: 11px; overflow: hidden; }
  .level .lb i { display: block; height: 100%; border-radius: 4px; background: var(--text); }
  .level .lb i.good, .level .lb i.charging { background: var(--green); }
  .level .lb i.warn { background: var(--amber); }
  .level .ld { margin-top: 9px; font-size: 13px; color: var(--muted); }
  /* The outlook: where the pack is heading, as the tablet's sheet opens with it. Only with solar. */
  .outlook { background: var(--card); border-radius: 20px; padding: 16px 16px 12px; }
  .outlook .oh { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
  .outlook .oh i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
  .outlook .oh i.warn { background: var(--amber); }
  .outlook .oh i.alert { background: var(--red); }
  .outlook .od { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--muted); }
  .oplot { position: relative; height: 112px; margin: 18px 40px 0 2px; }
  .oplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .oplot .onow { position: absolute; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--text); }
  .oplot .oy { position: absolute; left: calc(100% + 8px); transform: translateY(-50%); font-size: 12px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
  .oticks { position: relative; height: 16px; margin: 8px 40px 0 2px; font-size: 12px; line-height: 16px; color: var(--muted); }
  .oticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
  .oticks span.first { transform: none; }
  .outlook .orows { margin-top: 10px; }
  .outlook .orows .rowl { padding-right: 0; }
  .outlook .ofoot { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--muted); }
  .outlook.waiting .od { margin-top: 6px; }
  .rows { background: var(--card); border-radius: 20px; padding: 0 0 0 16px; }
  .rowl { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px 10px 0; font-size: 16px; }
  .rowl + .rowl { box-shadow: 0 -0.5px 0 var(--hair); }
  .rowl span:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
  .rowl span:last-child.good { color: var(--green); }
  .rowl span:last-child.warn { color: var(--amber); }
  .rowl span:last-child.alert { color: var(--red); }
  .rowl small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
  .sheet-foot { margin: 16px 4px 0; font-size: 13px; line-height: 1.4; color: var(--dim); }
  .devlist { display: grid; gap: 8px; }
  .devb { display: block; width: 100%; padding: 15px 16px; border-radius: 16px; background: var(--card); font-size: 16px; font-weight: 500; transition: transform 140ms var(--ease-out), background-color 160ms ease; }
  .devb:active { transform: scale(0.98); background: #3A3A3C; }


  /* ---- the heater, lights and fridge sheets: the tablet's own, upright. Every control gives way a little under a finger. ---- */
  .press { transition: transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
  .press:active:not(:disabled) { transform: scale(0.97); }
  .press:disabled { opacity: 0.4; cursor: default; }
  .csheet { display: grid; gap: 10px; }
  .cc { background: var(--card); border-radius: 20px; padding: 14px 16px; transition: opacity 260ms ease; }
  .cc h3 { font-size: 17px; font-weight: 600; }
  .cc p { margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--muted); }
  .cc.row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; }
  .cc.stack .seg { margin-top: 10px; }
  .csheet.quiet .needs { opacity: 0.42; }
  .cnote { min-height: 20px; padding: 0 4px; font-size: 15px; line-height: 1.35; color: var(--muted); }
  .cnote.warn { color: var(--amber); }
  .cnote.alert { color: var(--red); }
  .cfoot { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--dim); }
  .seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; background: var(--sheet); border-radius: 12px; padding: 3px; }
  .seg .knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 9px; background: var(--knob); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 260ms var(--ease-out), opacity 200ms ease; }
  .seg.unset .knob { opacity: 0; }
  .seg button { position: relative; z-index: 1; min-height: 44px; padding: 9px 12px; font-size: 16px; text-align: center; color: var(--muted); white-space: nowrap; transition: color 200ms ease, transform 140ms var(--ease-out), opacity 200ms ease; }
  .seg button[aria-checked="true"] { color: var(--text); font-weight: 600; }
  .seg button:active:not(:disabled) { transform: scale(0.97); }
  .seg button:disabled { opacity: 0.4; cursor: default; }
  .step { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; }
  .step svg { width: 22px; height: 22px; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; fill: none; }
  .step.small { width: 48px; height: 48px; }
  .hcard { background: var(--card); border-radius: 20px; padding: 12px 16px 16px; display: grid; justify-items: center; gap: 14px; }
  .hbig { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .hval { min-width: 0; text-align: center; }
  .hlbl { display: block; min-height: 20px; font-size: 15px; color: var(--muted); }
  .hnum { display: block; font-size: 68px; font-weight: 200; letter-spacing: -0.04em; line-height: 1.02; font-variant-numeric: tabular-nums; }
  .hpower { position: relative; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
  .hpower .pbg { position: absolute; inset: 8px; border-radius: 50%; background: var(--raised); transition: background-color 200ms ease; }
  .hpower.on .pbg { background: var(--ember); }
  .hpower.on { color: #1C1C1E; }
  .hpower .pic { position: relative; width: 32px; height: 32px; }
  .pring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 4; stroke-linecap: round; }
  .ptrack { stroke: rgba(255, 255, 255, 0.1); }
  .pprog { stroke: var(--ember); stroke-dasharray: 251.33; stroke-dashoffset: 251.33; opacity: 0; transition: stroke-dashoffset 1s linear, opacity 200ms ease; }
  .pprog.live { opacity: 1; }
  .pprog.cool { stroke: var(--cool); }
  .hplabel { min-height: 20px; margin-top: -4px; font-size: 15px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
  .cstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--card); border-radius: 20px; padding: 12px 6px; transition: opacity 260ms ease; }
  .cstrip.stale { opacity: 0.5; }
  .cstrip .rcell { min-width: 0; text-align: center; }
  .cstrip .rl { display: block; font-size: 12px; color: var(--muted); }
  .cstrip .rv { display: block; margin-top: 3px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ftemps { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 30px; }
  .fz { display: grid; }
  .fz .lbl { font-size: 15px; font-weight: 500; color: var(--muted); }
  .fbig { font-size: 76px; font-weight: 250; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; transition: color 400ms ease; }
  .fmid { font-size: 40px; font-weight: 300; letter-spacing: -0.025em; line-height: 1.05; font-variant-numeric: tabular-nums; transition: color 400ms ease; }
  .fsub { margin-top: 2px; font-size: 13px; color: var(--dim); }
  .fline { display: flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 22px; font-size: 16px; color: var(--muted); }
  .fline i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); transition: background-color 300ms ease; }
  .fline.running i { background: var(--ice); }
  .cc .cnote, .hcard .cnote { padding: 0; }
  .cc .cnote { margin-top: 6px; }
  .hcard .cnote { margin-top: -8px; text-align: center; }
  .hcard .cnote[hidden] { display: none; }
  .csheet.dimmed .fbig, .csheet.dimmed .fmid { color: var(--dim); }
  .fstep { display: flex; align-items: center; gap: 6px; }
  .fstep output { min-width: 72px; text-align: center; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .lrow { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x pan-y; }
  .lrow::-webkit-scrollbar { display: none; }
  .lch { flex: 1 1 0; min-width: 76px; display: grid; justify-items: center; gap: 10px; padding: 14px 8px 10px; background: var(--card); border-radius: 20px; transition: opacity 260ms ease; }
  .lch.quiet { opacity: 0.42; }
  .lname { max-width: 100%; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lsl { position: relative; width: 58px; height: min(34vh, 230px); min-height: 150px; border-radius: 18px; background: var(--raised); overflow: hidden; touch-action: none; cursor: grab; outline: none; }
  .lsl:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
  .lsl .lfill { position: absolute; inset: 0; background: #F6F2E9; clip-path: inset(var(--top, 100%) 0 0 0); }
  .lsl.off .lfill { background: #8E8E93; }
  .lsl.quiet { pointer-events: none; }
  .lfig { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
  .lon { width: 100%; min-height: 44px; border-radius: 14px; background: var(--raised); font-size: 16px; font-weight: 600; text-align: center; color: var(--muted); }
  .lon.on { background: #F2F2F7; color: #1C1C1E; }

  @media (hover: hover) and (pointer: fine) {
    .gauge:hover { color: var(--text); }
    .devb:hover { background: #343437; }
    .retry:hover { background: #343437; }
    .lostbar:hover { background: #232325; }
    .step:hover:not(:disabled) { background: #48484A; }
    .lon:not(.on):hover:not(:disabled) { background: #48484A; }
  }
  @media (prefers-reduced-motion: reduce) {
    .guide, .lostbar { transition-property: opacity, background-color; }
    .tile .glass, .tile.down .glass { transition: none; }
    .tile.down .glass { transform: none; opacity: 0.8; }
    .bar i, .mark, .tanks .tb i { transition: none; }
    .seg .knob, .pprog { transition: none; }
  }
