/* ═══════════════════════════════════════════════════════════════════════════
   FERNLOOP — ORBITAL

   A growth instrument. The game is a vine reaching a fixed distance and
   stopping there, so the whole interface is built out of the one shape that
   already means "a distance from a centre": the ring.

   Rules this sheet keeps, without exception:
     · NOTHING IS A RECTANGLE. Every radius is 50% or 999px. If a shape has a
       corner it is wrong. The only exceptions are the two boxes the platform
       forces, the canvas host and the sheet, and both are radiused past the
       point where a corner is readable.
     · NO ELEVATION. There is not one drop shadow in this file. Depth is made
       by concentric strokes of different weight, drawn with inset and outset
       box-shadow rings, exactly the way a dial face is engraved.
     · Content is arranged AROUND A CENTRE, not stacked in boxes. Home is one
       focal ring with four satellites on its rim.
     · Every figure is set in the geometric display face and centred inside the
       ring it belongs to.
     · Every stroke is round-capped, so even a straight mark is a capsule.
     · Motion is rotation and arc sweep, 220ms. Things orbit into place.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Written from JS by applySafeArea(). 0 outside Telegram fullscreen, so
     every utility that reads them collapses on its own. */
  --tg-safe-top: 0px;
  --tg-safe-bottom: 0px;
  --safet: max(var(--tg-safe-top), env(safe-area-inset-top, 0px));
  --safeb: max(var(--tg-safe-bottom), env(safe-area-inset-bottom, 0px));

  /* Duplicated from brand.js so the splash paints correctly on frame one,
     before shell.js has stamped the palette onto <html>. */
  --bg:       #04120F;
  --surface:  #0A2320;
  --tint:     #0E2D29;
  --tint-2:   #143E38;
  --line:     #1E5750;
  --ink:      #E9F7F2;
  --ink-2:    #92B8B0;
  --ink-3:    #638A83;
  --accent:   #35E0A1;
  --accent-d: #7DF3C6;
  --good:     #A8EA6A;
  --warn:     #FF7D6E;

  --f-display: "Poppins", "Avenir Next", "Century Gothic", sans-serif;
  --f-text: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* the three engraving weights, used as box-shadow rings everywhere */
  --w-hair: 1.3px;
  --w-mid: 1.8px;
  --w-bold: 2.4px;

  --t: 220ms cubic-bezier(.34, .82, .28, 1);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Overlays set their own display, which outranks the UA rule for [hidden]. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--f-text);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }

/* ── glyphs ──────────────────────────────────────────────────────────────── */

.glyphs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 22px; height: 22px; flex: none;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-s { width: 17px; height: 17px; stroke-width: 1.9; }

/* ── the two press states: a disc shrinks, a capsule shrinks less ────────── */

.tap { transition: transform var(--t), background var(--t), color var(--t), box-shadow var(--t); }
.tap:active { transform: scale(.94); }

/* ── capsule and disc controls ───────────────────────────────────────────── */

.go {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--f-display);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
}
.go:disabled { opacity: .5; }

.ghost {
  width: 100%;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13.5px; font-weight: 500;
  box-shadow: inset 0 0 0 var(--w-hair) var(--line);
}
.ghost:active { color: var(--ink); }

.disc {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 var(--w-hair) var(--line);
}
.disc:active { color: var(--accent-d); }

.cap-btn {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--tint-2);
  color: var(--accent-d);
  font-size: 12.5px; font-weight: 700;
}

/* ── splash: the ring closes, then the name arrives ──────────────────────── */

#splash {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--bg);
  transition: opacity 320ms ease;
}
#splash.out { opacity: 0; }
.sp-ring {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 var(--w-hair) var(--line), 0 0 0 8px var(--bg), 0 0 0 9.3px var(--tint-2);
  animation: orbit-in 620ms cubic-bezier(.34, .82, .28, 1) both;
}
.sp-ring .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.sp-name {
  font-family: var(--f-display);
  font-size: 25px; font-weight: 600; letter-spacing: 0.04em;
  animation: orbit-in 520ms cubic-bezier(.34, .82, .28, 1) 180ms both;
}
.sp-sub {
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: lowercase;
  animation: orbit-in 520ms cubic-bezier(.34, .82, .28, 1) 300ms both;
}
@keyframes orbit-in {
  from { transform: rotate(-22deg) scale(.78); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── frame ───────────────────────────────────────────────────────────────── */

#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* One light source, directly overhead and circular, so the whole page reads as
   lit from the centre out. Painted once, never animated. */
#app::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 34% at 50% 6%, rgba(53, 224, 161, .11), transparent 70%),
    radial-gradient(90% 46% at 50% 104%, rgba(1, 8, 6, .8), transparent 74%);
}

.crown, main, .orbit { position: relative; z-index: 1; }

/* The top element carries the fullscreen top inset, so the crown clears
   Telegram's floating Close / ⋯ row. */
.crown {
  flex: none;
  padding: 8px 14px 6px;
  padding-top: calc(8px + var(--safet));
}
/* Fullscreen already reserves the chrome inset; trim a cosmetic sliver so the
   crown does not read as a gap, floored at the inset itself. */
[data-fullscreen="1"] .crown {
  padding-top: max(var(--tg-safe-top), calc(8px + var(--safet) - 1.4vh));
}
/* Left open on purpose: the focal ring below is the only thing on Home allowed
   to read as a filled shape. */
.crown-in {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 6px;
}
.crown-mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--accent);
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}
.crown-name {
  font-family: var(--f-display);
  font-size: 16px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.crown-rank {
  margin-left: auto;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--accent-d);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}

/* ── navigation: four discs in one capsule, standard bottom position ─────── */

.orbit {
  flex: none; position: relative;
  display: flex; justify-content: space-around; align-items: center;
  padding: 9px 20px;
  padding-bottom: calc(9px + var(--safeb));
}
.orbit::before {
  content: ""; position: absolute;
  left: 12px; right: 12px; top: 4px; bottom: calc(4px + var(--safeb));
  border-radius: 999px;
  background: var(--surface);
}
.ot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.ot-d {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  transition: color var(--t), background var(--t), box-shadow var(--t);
}
.ot i {
  font-style: normal;
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color var(--t);
}
.ot.is-on .ot-d {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.2px var(--accent);
}
.ot.is-on i { color: var(--accent-d); }
.ot:active .ot-d { transform: scale(.92); }

/* Play is the game and nothing else. */
[data-screen="play"] .crown,
[data-screen="play"] .orbit { display: none; }

/* ── screens ─────────────────────────────────────────────────────────────── */

main { flex: 1; min-height: 0; position: relative; }

.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px 26px;
  text-align: center;
}
.screen.is-active { display: flex; animation: swing-in 260ms cubic-bezier(.34, .82, .28, 1) both; }
@keyframes swing-in {
  from { transform: scale(.965); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.screen.play { overflow: hidden; padding: 6px 12px 10px; animation: none; }

.sect {
  margin: 20px 0 10px;
  font-family: var(--f-display);
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.screen > .sect:first-child { margin-top: 12px; }

.note {
  margin: 22px auto 0;
  max-width: 300px;
  font-size: 11.5px; line-height: 1.6;
  color: var(--ink-3);
}

/* ── home: one focal ring, four satellites on its rim ────────────────────── */

.orrery {
  position: relative;
  flex: none;
  height: 268px;
  margin: 6px auto 0;
  width: 100%;
  max-width: 300px;
}

/* The 216-unit viewBox is drawn once and scaled by CSS, so every arc, lip and
   tip on it stays exactly where the geometry put it at any size. */
.orrery-ring {
  position: absolute; left: 50%; top: 20px;
  width: 232px; height: 232px;
  transform: translateX(-50%);
  overflow: visible;
}
.tr-base {
  fill: none; stroke: var(--tint-2); stroke-width: 6; stroke-linecap: round;
}
/* The vine: grown from the root at the bottom, all the way round, stopped
   dead in the notch. This is the game at rest. */
.tr-grown {
  fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round;
  animation: grow-round 900ms cubic-bezier(.34, .82, .28, 1) both;
}
@keyframes grow-round {
  from { stroke-dasharray: 0 609.5; }
  to   { stroke-dasharray: 304.7 304.7; }
}
.tr-lip { fill: none; stroke: var(--accent-d); stroke-width: 3; stroke-linecap: round; }
.tr-tip { fill: var(--accent-d); stroke: none; }
.tr-halo { display: none; }

/* Set to clear the tip above it and the core below it: the figure gets the
   band of ring interior between the notch and the play target, and nothing
   in this composition is allowed to touch anything else. */
.dial {
  position: absolute; left: 0; right: 0; top: 41px;
  display: flex; flex-direction: column; align-items: center;
}
.dial-num {
  font-family: var(--f-display);
  font-size: 36px; font-weight: 600; line-height: 1;
  letter-spacing: -0.01em;
}
.dial-lbl {
  margin-top: 3px;
  font-size: 8px; font-weight: 700; line-height: 1.3; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Play is the core of the system. */
.core {
  position: absolute; left: 50%; top: 136px;
  width: 84px; height: 84px;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 6.3px var(--tint-2);
}
.core:active { transform: translate(-50%, -50%) scale(.93); }
.core-ic { width: 25px; height: 25px; stroke-width: 2.2; }
.core-lbl {
  font-family: var(--f-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sat {
  position: absolute;
  width: 60px; height: 60px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 var(--w-hair) var(--line);
}
.sat b {
  font-family: var(--f-display);
  font-size: 18px; font-weight: 600; line-height: 1;
}
.sat i {
  margin-top: 3px;
  font-style: normal;
  font-size: 7.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* 97px out from the centre on each diagonal, which puts every satellite three
   pixels clear of the rim of the focal ring, on the rim, not beside it. */
.sat--nw { left: calc(50% - 127px); top: 9px; }
.sat--ne { left: calc(50% + 67px);  top: 9px; }
.sat--sw { left: calc(50% - 127px); top: 203px; }
.sat--se { left: calc(50% + 67px);  top: 203px; }

.lede {
  margin: 22px auto 0;
  max-width: 290px;
  font-size: 13.5px; line-height: 1.6;
  color: var(--ink-2);
}

/* ── today, as an arc that fills ─────────────────────────────────────────── */

.cycle {
  margin: 24px auto 0;
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.cycle-goal {
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.cycle-track {
  width: 100%; height: 5px;
  border-radius: 999px;
  background: var(--tint);
  overflow: hidden;
}
.cycle-fill {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--t);
}
.cycle-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.cycle-state {
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}
.cycle-state.is-done { color: var(--good); box-shadow: inset 0 0 0 var(--w-hair) var(--good); }

/* ── the notch closes: this game's own module ────────────────────────────── */

.closes { margin-top: 30px; }
.closes-h {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-size: 17px; font-weight: 600; letter-spacing: 0.01em;
}
.closes-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 320px; margin: 0 auto;
}
.cl { display: flex; flex-direction: column; align-items: center; }
.cl-ring { width: 100%; max-width: 56px; height: auto; display: block; }
.cl-tr { fill: none; stroke: var(--line); stroke-width: 2.6; stroke-linecap: round; }
.cl-lip { fill: var(--accent-d); stroke: none; }
.cl-n {
  margin-top: 6px;
  font-family: var(--f-display);
  font-size: 13px; font-weight: 600; line-height: 1;
}
.cl-t {
  margin-top: 2px;
  font-style: normal;
  font-size: 9.5px; font-weight: 500;
  color: var(--ink-3);
}
.closes-cap {
  margin: 16px auto 0;
  max-width: 300px;
  font-size: 12px; line-height: 1.6;
  color: var(--ink-3);
}

/* ── the offer, one capsule ──────────────────────────────────────────────── */

.offer {
  margin: 26px auto 0;
  width: 100%; max-width: 320px;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 9px 9px 20px;
  border-radius: 999px;
  background: var(--surface);
  text-align: left;
}
.offer-tx { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.offer-tx b { font-size: 13px; font-weight: 700; }
.offer-tx i { font-style: normal; font-size: 11px; color: var(--ink-2); }
.cap:empty { display: none; }
.cap:not(:empty)::before { content: " · "; }

/* ── play ────────────────────────────────────────────────────────────────── */

.deck {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px 0;
}
/* The count dial. The stopping window is the hairline under the figure and it
   carries no label, because the notch itself is drawn at true size on the
   field a couple of centimetres below it. */
.gauge {
  width: 104px; height: 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 var(--w-mid) var(--tint-2), 0 0 0 5px var(--bg), 0 0 0 6.3px var(--tint);
}
.gauge-n {
  font-family: var(--f-display);
  font-size: 34px; font-weight: 600; line-height: 1;
}
.tick {
  width: 52px; height: 4px;
  border-radius: 999px;
  background: var(--tint-2);
  overflow: hidden;
}
.tick i {
  display: block; height: 100%; width: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--t), background var(--t);
}
.tick i.is-low { background: var(--warn); }

.tags {
  flex: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 24px;
  margin-top: 6px;
}
.tag {
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em;
}
.tag--combo {
  background: var(--accent); color: var(--bg);
  opacity: 0;
  transition: opacity var(--t), transform var(--t);
  transform: scale(.86);
}
.tag--combo.is-on { opacity: 1; transform: none; }
.tag--combo:empty { display: none; }
.tag--shield { color: var(--accent-d); box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2); }

.field {
  flex: 1; min-height: 0; position: relative;
  margin-top: 8px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: inset 0 0 0 var(--w-hair) var(--line);
}
#stage { display: block; width: 100%; height: 100%; touch-action: none; }

.brief {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(3, 14, 11, .84);
}
.brief-in { width: 100%; max-width: 292px; text-align: center; }
.brief-mark {
  width: 60px; height: 60px; margin: 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--accent);
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2), 0 0 0 6px var(--bg), 0 0 0 7.3px var(--tint-2);
}
.brief-mark .ic { width: 28px; height: 28px; }
.brief-h {
  margin: 16px 0 16px;
  font-family: var(--f-display);
  font-size: 19px; font-weight: 600;
}
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.step { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.step-n {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: 12px; font-weight: 600;
  color: var(--accent-d);
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}
.step-tx { display: flex; flex-direction: column; min-width: 0; }
.step-tx b { font-size: 13.5px; font-weight: 700; }
.step-tx i { font-style: normal; font-size: 12px; line-height: 1.45; color: var(--ink-2); margin-top: 1px; }

/* ── rank ────────────────────────────────────────────────────────────────── */

.seg {
  display: flex; gap: 4px;
  margin: 12px auto 0;
  padding: 4px;
  width: 100%; max-width: 260px;
  border-radius: 999px;
  background: var(--surface);
}
.seg-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--t), background var(--t);
}
.seg-btn.is-on { background: var(--tint-2); color: var(--accent-d); }

.board { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rw {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  background: var(--surface);
}
.rw-pos {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: 10.5px; font-weight: 600;
  color: var(--ink-3);
}
.rw-av {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  /* shell.js hands each name a hue; hold the saturation right down so the
     board reads as instrument brass and green stays the one loud colour. */
  background: hsl(var(--h) 11% 20%);
  color: hsl(var(--h) 20% 72%);
  font-family: var(--f-display);
  font-size: 14px; font-weight: 600;
}
.rw-nm {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rw-sc {
  font-family: var(--f-display);
  font-size: 15px; font-weight: 600;
}
.rw--top .rw-pos { color: var(--accent-d); box-shadow: inset 0 0 0 var(--w-hair) var(--accent); }
.rw--me { background: var(--tint); box-shadow: inset 0 0 0 var(--w-mid) var(--accent); }
.rw--me .rw-nm { font-weight: 700; }
.rw--me .rw-sc { color: var(--accent-d); }
.board:empty::after {
  content: "No climbs recorded yet. The first one goes here.";
  display: block; padding: 26px 0; text-align: center;
  font-size: 12.5px; color: var(--ink-3);
}

/* ── more ────────────────────────────────────────────────────────────────── */

.prefs { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.pref, .link {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 50px; padding: 0 20px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px; font-weight: 500;
  text-align: left;
}
.pref > span, .link > span { flex: 1; min-width: 0; }
.link > .ic { color: var(--ink-3); }
.link:active { background: var(--tint); }

/* The switch is already a capsule, which is the only reason it survives. */
.sw {
  appearance: none; -webkit-appearance: none;
  flex: none;
  width: 46px; height: 27px;
  border-radius: 999px;
  background: var(--tint-2);
  position: relative;
  transition: background var(--t);
}
.sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform var(--t), background var(--t);
}
.sw:checked { background: var(--accent); }
.sw:checked::after { transform: translateX(19px); background: var(--bg); }

/* ── overlays ────────────────────────────────────────────────────────────── */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(1, 9, 7, .76); }

.sheet {
  position: fixed; z-index: 45;
  left: 10px; right: 10px;
  bottom: calc(10px + var(--safeb));
  max-height: 78vh;
  display: flex; flex-direction: column;
  border-radius: 34px;
  background: var(--surface);
  animation: rise 260ms cubic-bezier(.34, .82, .28, 1);
}
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 10px 24px;
}
.sheet-title {
  flex: 1; min-width: 0;
  font-family: var(--f-display);
  font-size: 17px; font-weight: 600;
}
.sheet-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 2px 24px 6px;
  font-size: 13.5px; line-height: 1.62;
  color: var(--ink-2);
}
.sheet-body p { margin: 0 0 12px; }
.sheet-body ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.sheet-body li { position: relative; padding-left: 20px; margin-bottom: 9px; }
.sheet-body li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.4px var(--accent);
}
.sheet-body b { font-weight: 700; color: var(--ink); }
.sheet-foot { flex: none; padding: 12px 18px 18px; }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 18px;
}
.pod {
  width: 100%; max-width: 330px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 22px 22px;
  border-radius: 36px;
  background: var(--surface);
  text-align: center;
  animation: orbit-in 300ms cubic-bezier(.34, .82, .28, 1);
}
.tagline {
  padding: 4px 15px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-d);
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}
.pod-ring {
  width: 138px; height: 138px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 var(--w-mid) var(--accent), 0 0 0 6px var(--surface), 0 0 0 7.3px var(--tint-2);
}
.pod-num {
  font-family: var(--f-display);
  font-size: 46px; font-weight: 600; line-height: 1;
}
.pod-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pod-mark {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--accent-d);
  box-shadow: inset 0 0 0 var(--w-hair) var(--tint-2);
}
.pod-h {
  margin: 0;
  font-family: var(--f-display);
  font-size: 19px; font-weight: 600;
}
.pod-sub { margin: 0; font-size: 13px; color: var(--ink-2); }
.pod-acts { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.ad {
  width: 100%;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 22px;
  border-radius: 26px;
  background: var(--tint);
  text-align: left;
}
.ad b { font-size: 13.5px; font-weight: 700; color: var(--accent-d); }
.ad i { font-style: normal; font-size: 11px; color: var(--ink-2); }
.ad i:empty { display: none; }

/* ── the continue countdown ──────────────────────────────────────────────── */

.count {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  pointer-events: none;
}
.count span {
  display: grid; place-items: center;
  width: 136px; height: 136px;
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--f-display);
  font-size: 62px; font-weight: 600; color: var(--accent);
  box-shadow: inset 0 0 0 var(--w-bold) var(--accent), 0 0 0 8px var(--bg), 0 0 0 9.3px var(--tint-2);
  animation: orbit-in 220ms cubic-bezier(.34, .82, .28, 1);
}

.toast {
  position: fixed; z-index: 70;
  left: 50%; bottom: calc(96px + var(--safeb));
  transform: translateX(-50%);
  max-width: 88vw;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--tint-2);
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  text-align: center;
  animation: rise 220ms cubic-bezier(.34, .82, .28, 1);
}

/* ── reduced motion: everything still arrives, nothing sweeps ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
[data-reduce-motion="1"] .screen.is-active,
[data-reduce-motion="1"] .tr-grown,
[data-reduce-motion="1"] .pod,
[data-reduce-motion="1"] .sheet,
[data-reduce-motion="1"] .toast,
[data-reduce-motion="1"] .count span { animation: none; }
[data-reduce-motion="1"] .tap:active,
[data-reduce-motion="1"] .core:active { transform: none; }

/* ── short viewports: the ring is the first thing that gives ─────────────── */

@media (max-height: 700px) {
  .orrery { height: 232px; }
  .orrery-ring { width: 200px; height: 200px; top: 18px; }
  .dial { top: 31px; }
  .dial-num { font-size: 32px; }
  .dial-lbl { font-size: 7.5px; }
  .core { top: 118px; width: 76px; height: 76px; }
  .core-ic { width: 23px; height: 23px; }
  .core-lbl { font-size: 11px; }
  .sat { width: 52px; height: 52px; }
  .sat b { font-size: 16px; }
  .sat--nw { left: calc(50% - 110px); top: 8px; }
  .sat--ne { left: calc(50% + 58px);  top: 8px; }
  .sat--sw { left: calc(50% - 110px); top: 176px; }
  .sat--se { left: calc(50% + 58px);  top: 176px; }
  .gauge { width: 92px; height: 92px; gap: 7px; }
  .gauge-n { font-size: 30px; }
}
