/* App layer on top of tokens.css + components.css (the design pack). */

#view { position: relative; z-index: 1; display: block; outline: none;
  padding: calc(var(--safe-top) + 6px) 18px calc(var(--safe-bottom) + 150px); max-width: 560px; margin: 0 auto; }
p { margin: 0 0 .5em; }
a { color: var(--ink); }
button { font-family: var(--f-ui); color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; z-index: 99; } .skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px; }
:focus-visible { outline: 2px solid var(--h-violet); outline-offset: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack > * + * { margin-top: 14px; }
.stack-s > * + * { margin-top: 8px; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.mt { margin-top: 14px; } .mt-l { margin-top: 26px; }
.signal-text { color: var(--signal); }
.lead { font-size: 16px; line-height: 1.5; }
.serif-i { font-family: var(--f-display); font-style: italic; }

/* ---------- overrides of pack components for tap targets ---------- */
.icon-btn { width: 44px; height: 44px; color: var(--ink); cursor: pointer; font-size: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; text-decoration: none; transition: transform .12s var(--ease-out); }
.btn:active, .chip:active, .craving-btn:active, .scale-btn:active, .region-btn:active { transform: scale(.97); }
.btn-block { display: flex; width: 100%; }
.btn-signal { background: var(--signal); color: #fff; }
.btn-paper { background: var(--card); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.chip { min-height: 44px; cursor: pointer; color: var(--ink); font-family: var(--f-ui); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chip.signal[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg .chip { justify-content: center; padding: 8px 6px; }
.chips-static { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips-static li { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink-2); }
.evidence { display: inline-block; vertical-align: 2px; margin-left: 4px; }
.spec.signal::before, .spec.signal::after { border-color: var(--signal); }
.spec.quiet { background: transparent; border-style: dashed; }
.spec.quiet::before, .spec.quiet::after { display: none; }
.spec + .spec, .foil + .spec, .spec + .foil, .statgrid + .spec, .spec + .statgrid { margin-top: 14px; }

/* ---------- top bar & header counter ---------- */
.topbar .mono { text-align: right; }
.counter { margin-top: 8px; }
.counter .num { font-size: 112px; }
.counter .unit .display { font-size: 30px; }
.ticker b { font-weight: 400; }

/* ---------- brain stage ---------- */
.stage .tag { left: 0; top: 0; will-change: transform; transition: opacity .3s; pointer-events: none; }
.stage .tag.flip { flex-direction: row-reverse; padding: 5px 6px 5px 9px; }
.stage .tag .dot.sig { background: var(--signal); animation: none; }
.stage .up { font-family: var(--f-display); font-style: italic; font-size: 20px; letter-spacing: 0; text-transform: none; }

/* ---------- stat grid ---------- */
.statgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.statgrid > div { padding: 12px; border-left: 1px dashed var(--line-strong); min-width: 0; }
.statgrid > div:first-child { border-left: 0; }
.statgrid .v { font-family: var(--f-display); font-size: 30px; line-height: 1; margin-top: 6px; white-space: nowrap; }
.statgrid .v i { font-size: 15px; font-style: normal; font-family: var(--f-ui); color: var(--ink-3); margin-left: 2px; }
.roast .statgrid { background: #1F1F24; border-color: rgba(255,255,255,.1); }

/* ---------- region rows as buttons ---------- */
.region-btn { all: unset; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 12px 0; border-top: 1px dashed var(--line-strong); cursor: pointer; box-sizing: border-box; }
.region-btn:first-of-type { border-top: 0; }
.region-btn:focus-visible { outline: 2px solid var(--h-violet); outline-offset: 2px; }
.region-btn .code { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); }
.region-btn .name { font-weight: 600; font-size: 14.5px; }
.region-btn .sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.region-btn .val { font-family: var(--f-display); font-style: italic; font-size: 26px; }
.bar.ink > i { background: var(--ink); }

/* ---------- dock (craving pill + nav) ---------- */
.dock { left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 8px); max-width: 536px; margin: 0 auto; }
.craving-btn { min-height: 64px; cursor: pointer; }
.craving-btn .go svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 8px; background: rgba(251,250,247,.92); border: 1px solid var(--line); border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 46px; text-decoration: none;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tab i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] i { background: var(--holo); animation: holo-spin 3s linear infinite; }
body.has-overlay .dock { display: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 18px; }
.field > label, .field > .lbl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
input[type="text"], input[type="number"], input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card);
  color: var(--ink); font: 16px/1.35 var(--f-ui); appearance: none; -webkit-appearance: none; }
textarea { resize: vertical; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--h-violet); outline-offset: 1px; border-color: transparent; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--ink); }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; min-height: 44px; }
.check-row input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--ink); flex: none; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 2px solid var(--h-violet); }
.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input { flex: 1; min-width: 0; }
.add-row input.narrow { flex: 0 0 88px; }
.add-row .btn { min-height: 48px; padding: 0 18px; }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-btn { min-height: 58px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.scale-btn .n { font-family: var(--f-display); font-style: italic; font-size: 26px; line-height: 1; }
.scale-btn .w { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.scale-btn[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.scale-btn[aria-pressed="true"] .w { color: rgba(251,250,247,.7); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper-val { font-family: var(--f-display); font-style: italic; font-size: 48px; line-height: 1; }
.stepper .btn { width: 52px; padding: 0; font-size: 22px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 4px 0 0; padding: 0; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line-strong); }
.list-item:first-child { border-top: 0; }
.check { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; cursor: pointer; font-weight: 500; }
.check .box { flex: none; width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 6px; display: grid; place-items: center; font-size: 13px; color: var(--card); }
.check[aria-pressed="true"] .box { background: var(--ink); }
.check[aria-pressed="true"] .t { color: var(--ink-3); text-decoration: line-through; }
.action { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-md); font-weight: 600; font-size: 14.5px; width: 100%; text-align: left; cursor: pointer; min-height: 52px; }
.action .k { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); width: 22px; flex: none; }
.action[aria-pressed="true"] { background: var(--paper-2); color: var(--ink-3); }
.action[aria-pressed="true"] .k::after { content: ' ✓'; color: var(--ok); }
.copy-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; margin-top: 8px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; font: 500 14px var(--f-ui); cursor: pointer; min-height: 48px; }
.copy-line b { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; flex: none; }
.menu-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 0; border-top: 1px dashed var(--line-strong); text-decoration: none; color: var(--ink); }
.menu-row:first-child { border-top: 0; }
.menu-row .code { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); width: 34px; }
.menu-row b { display: block; font-weight: 600; } .menu-row small { color: var(--ink-3); }
.menu-row .chev { margin-left: auto; font-family: var(--f-display); font-size: 26px; color: var(--ink-3); }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.link { all: unset; cursor: pointer; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- headings on inner pages ---------- */
.page-title { font-family: var(--f-display); font-size: 46px; line-height: .95; letter-spacing: -.02em; margin: 22px 0 6px; font-weight: 400; }
.page-title i { font-style: italic; }
.sec { margin-top: 30px; }
.sec > .mono:first-child { display: block; margin-bottom: 10px; }

/* ---------- check-in day strip ---------- */
.daystrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.day-chip { min-height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.day-chip i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink-3); }
.day-chip[aria-pressed="true"] i { background: var(--holo); border-color: transparent; }

/* ---------- milestones / badges ---------- */
.miles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mile { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px; min-height: 86px; display: flex; flex-direction: column; justify-content: space-between; }
.mile .d { font-family: var(--f-display); font-style: italic; font-size: 30px; line-height: 1; color: var(--ink-3); }
.mile.on { border: 0; padding: 1.5px; }
.mile.on > div { background: var(--card); border-radius: 10.5px; padding: 10px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; min-height: 86px; }
.mile.on .d { color: var(--ink); }

/* ---------- region sheet overlay ---------- */
.region-ov { position: relative; height: 100%; overflow: hidden; }
.region-ov .stage { height: 46%; margin: 0; padding-top: var(--safe-top); }
.region-ov .sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 64%; overflow-y: auto; transition: transform .35s var(--ease-out);
  padding-bottom: calc(var(--safe-bottom) + 28px); box-shadow: 0 -10px 40px rgba(22,22,26,.06); touch-action: pan-y; }
.region-ov .grab-zone { padding: 6px 0 4px; cursor: grab; touch-action: none; }
.region-ov .close { position: absolute; top: calc(var(--safe-top) + 10px); right: 14px; z-index: 3; background: rgba(251,250,247,.8); }
.region-ov .head-tag { position: absolute; left: 50%; top: calc(var(--safe-top) + 40px); transform: translateX(-50%); z-index: 2; }
.ring { display: grid; place-items: center; flex: none; }
.ring .display { font-size: 34px; font-style: italic; }
.ring .display span { font-size: 18px; }
.source { font-family: var(--f-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.7; color: var(--ink-3); margin-top: 16px; }

/* ---------- generic full-screen overlays ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; background: var(--paper); }
#overlay[hidden] { display: none; }
#overlay.dark { background: var(--ink); }
.ov { height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; outline: none; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: calc(var(--safe-top) + 6px) 18px 4px; }
.ov-scroll { flex: 1; overflow-y: auto; padding: 6px 18px 24px; -webkit-overflow-scrolling: touch; }
.ov-foot { padding: 12px 18px calc(var(--safe-bottom) + 12px); border-top: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.ov-foot.split { flex-direction: row; }
.ov-foot.split .grow { flex: 1; }
.ov-title { font-family: var(--f-display); font-size: 40px; line-height: .95; letter-spacing: -.02em; margin: 6px 0 4px; font-weight: 400; }
.ov-title i { font-style: italic; }

/* craving */
.crave-stage { position: relative; height: 380px; margin: 0 -18px; }
.crave-stage canvas { width: 100%; height: 100%; display: block; }
.arc { position: absolute; left: 50%; top: 46%; width: 300px; height: 300px; transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
.arc circle { fill: none; }
.arc .base { stroke: var(--line-strong); stroke-width: 1; }
.arc .prog { stroke: var(--signal); stroke-width: 2; opacity: .6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.breath-label { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 12px; color: var(--ink); }
.countdown { font-family: var(--f-display); font-style: italic; font-size: 92px; line-height: .8; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.firing { font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--signal); }
.firing.calm { color: var(--ok); }

/* relapse #2+ (inverted specimen) */
.roast { color: var(--card); }
.roast .mono { color: rgba(251,250,247,.6); }
.roast .mono.signal-text { color: var(--signal); }
.foil > .spec::before, .foil > .spec::after { display: none; }
.roast .spec { background: #1F1F24; border-color: rgba(255,255,255,.1); color: var(--card); }
.roast .spec::before, .roast .spec::after { border-color: var(--signal); }
.roast .ov-foot { background: var(--ink); border-color: rgba(255,255,255,.1); }
.roast textarea { background: #1F1F24; color: var(--card); border-color: rgba(255,255,255,.2); }
.roast .btn-ghost { color: var(--card); border-color: rgba(255,255,255,.3); }
.roast .body-2 { color: rgba(251,250,247,.75); }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-t); position: absolute; inset: 0; }
.glitch::before { color: var(--h-cyan); transform: translate(-3px, 0); clip-path: inset(10% 0 55% 0); mix-blend-mode: screen; animation: glitch-a 2.4s steps(1) infinite; }
.glitch::after { color: var(--signal); transform: translate(3px, 0); clip-path: inset(55% 0 12% 0); mix-blend-mode: screen; animation: glitch-b 3.1s steps(1) infinite; }
@keyframes glitch-a { 0%, 90% { transform: translate(-3px, 0); } 92% { transform: translate(-7px, 1px); } 95% { transform: translate(2px, -1px); } }
@keyframes glitch-b { 0%, 86% { transform: translate(3px, 0); } 88% { transform: translate(8px, -1px); } 93% { transform: translate(-2px, 1px); } }
.strike { text-decoration: line-through; text-decoration-color: var(--signal); text-decoration-thickness: 3px; }
.receipt { font-family: var(--f-mono); font-size: 12px; line-height: 1.9; margin-top: 10px; }
.calm-brain { opacity: .72; filter: saturate(.7); }

/* timeline */
.tl-item .h3 { margin-top: 4px; }
.tl-item.future > *:not(.foil) { opacity: .75; }
.tl-item.now .mono:first-child { color: var(--signal); }

/* toast + confetti */
#toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 150px); transform: translate(-50%, 16px); z-index: 90; background: var(--ink); color: var(--card);
  padding: 12px 18px; border-radius: var(--r-pill); max-width: 88vw; font: 500 14px var(--f-ui); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-overlay #toast { bottom: calc(var(--safe-bottom) + 120px); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }
.chart { width: 100%; height: auto; display: block; }

/* view transitions: cross-fade + slight scale */
::view-transition-old(root) { animation: vt-out .22s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .fx-reveal, .fx-scan, .fx-stage, .fx-tilt { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; animation: none !important; }
  .timeline .progress-line { animation: none !important; transform: none !important; }
}
@media (max-width: 360px) { .counter .num { font-size: 92px; } .countdown { font-size: 76px; } .page-title { font-size: 40px; } }

/* ---------- phase 3: crew ---------- */
.crew-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.member { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 6px 12px; text-align: center; position: relative; min-width: 0; }
.member-brain { height: 86px; position: relative; }
.member-brain canvas { width: 100%; height: 100%; display: block; }
.member .nm { font-weight: 600; font-size: 13.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .d { font-family: var(--f-display); font-style: italic; font-size: 30px; line-height: 1; }
.member .live { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255,77,26,.18); }
.feed-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px dashed var(--line-strong); }
.feed-item:first-of-type { border-top: 0; }
.feed-item.stack { grid-template-columns: 1fr; gap: 8px; }
.feed-item.stack .row { flex-wrap: wrap; gap: 6px; }
.pact { all: unset; box-sizing: border-box; display: block; width: 100%; margin: 8px 0 0; font-weight: 600; font-size: 16px; line-height: 1.35; cursor: pointer; min-height: 44px; }
.stash-teaser { display: block; text-decoration: none; color: inherit; }

/* ---------- Day-1 self call ---------- */
#overlay.dark .call { background: #0E0E11; color: var(--card); max-width: none; position: relative; overflow: hidden; }
.call .mono { color: rgba(251,250,247,.6); }
.call-bg { position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 38%, #3a3a44 0%, #1a1a20 60%, #0e0e11 100%); }
.call-bg::before { content: ''; position: absolute; left: 50%; top: 24%; width: 150px; height: 190px; transform: translateX(-50%);
  background: radial-gradient(50% 42% at 50% 34%, #55555f 0 60%, transparent 61%), radial-gradient(70% 50% at 50% 100%, #4a4a54 0 70%, transparent 71%); filter: blur(2px); opacity: .9; }
.call-bg::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.call-ui { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; padding: 0 24px calc(var(--safe-bottom) + 40px); }
.call-btns { margin-top: auto; display: flex; justify-content: space-around; text-align: center; }
.cbtn { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; border: 0; cursor: pointer; }
.cbtn svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; }
.cbtn:active { transform: scale(.94); }
.call-note { display: inline-block; padding: 10px 14px; border-radius: 14px; background: rgba(251,250,247,.1); font-size: 14px; max-width: 290px; }
.call-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-loading { position: absolute; z-index: 2; top: 45%; left: 0; right: 0; text-align: center; color: var(--card); }
.feed-item .row .btn, .reach .btn { white-space: nowrap; }
.reach { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line, rgba(22,22,26,.18)); }
.reach:first-of-type { border-top: 0; }
.reach .row { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rec-preview { width: 100%; max-height: 50vh; border-radius: var(--r-md); background: #0E0E11; display: block; }

/* ---------- morning + dreams ---------- */
.morning-step { border-top: 1px dashed var(--line-strong); }
.morning-step:first-of-type { border-top: 0; }
.dot-chip { width: 44px; height: 44px; padding: 0; justify-content: center; }
.dream-bars { display: flex; gap: 6px; align-items: flex-end; height: 70px; }
.dream-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--paper-2); }
.dream-bars i.f { background: var(--holo-linear); background-size: 300px 100%; }
details.spec > summary { cursor: pointer; min-height: 32px; list-style: none; display: flex; align-items: center; }
details.spec > summary::-webkit-details-marker { display: none; }
details.spec > summary::after { content: '+'; margin-left: auto; font-family: var(--f-display); font-size: 22px; }
details[open].spec > summary::after { content: '−'; }

/* ---------- ghost stash ---------- */
.reveal { position: relative; aspect-ratio: 1.45; border-radius: var(--r-md); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.reveal .art { position: absolute; inset: 0; display: grid; place-items: center; background-size: cover; background-position: center; }
.tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(8, 1fr); }
.tiles i { background: var(--paper-2); border: .5px solid rgba(22,22,26,.06); transition: background .6s, border-color .6s; }
.tiles i.o { background: transparent; border-color: transparent; }

/* ---------- data ---------- */
.heat { display: grid; grid-template-columns: 26px repeat(8, 1fr); gap: 3px; font-family: var(--f-mono); font-size: 9px; color: var(--ink-3); align-items: center; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--paper-2); }
.recap-canvas { width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line); display: block; }
code { font-family: var(--f-mono); font-size: 11px; background: var(--paper-2); padding: 1px 4px; border-radius: 4px; }

/* ---------- landing / roles ---------- */
body.landing-mode .dock { display: none; }
body.landing-mode #view { padding-bottom: calc(var(--safe-bottom) + 40px); }
.install { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.install li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.install .ic { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.install .ic svg { width: 28px; height: 28px; stroke: var(--h-violet); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.install b { display: block; font-size: 16px; margin-top: 2px; }
body.supporter .craving-btn { display: none; }
.action[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--card); color: var(--ink); }
.action[aria-pressed="true"] .k::after { content: ''; }
.action[data-action="cv-check"][aria-pressed="true"] { background: var(--paper-2); color: var(--ink-3); box-shadow: none; border-color: var(--line); }
.action[data-action="cv-check"][aria-pressed="true"] .k::after { content: ' ✓'; color: var(--ok); }

/* Contrast: the pack's --ink-3 (#8C8B93) is ~3:1 on paper; this keeps the look at 4.5:1 for small mono labels. */
:root { --ink-3: #6B6A72; }
