/* ============================================================
   Sofna — app styles. Every value traces back to the component
   sheet (K) in design/Sofna Mockup.dc.html.
   ============================================================ */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dark button:focus-visible, .dark a:focus-visible { outline-color: var(--paper); }
input, textarea { font: inherit; color: inherit; }
a { color: var(--terra-dark); text-decoration: none; }
a:hover { color: var(--terra); }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- stage + phone frame ---------- */
#app { min-height: 100vh; min-height: 100dvh; }
.stage { min-height: 100vh; min-height: 100dvh; display: flex; padding: 24px; }
.phone { position: relative; margin: auto; width: var(--phone-w); height: var(--phone-h); background: var(--paper); border-radius: var(--r-phone); border: 1px solid var(--line-2); box-shadow: var(--shadow-phone); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); animation: sofnaFadeIn .22s ease-out; }
.phone.dark { background: var(--ink); color: var(--paper); }
.statusbar { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; font-size: 15px; font-weight: 700; }
.dark .statusbar { color: var(--muted); }
.battery { width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; padding: 1.5px; }
.battery i { display: block; width: 70%; height: 100%; background: currentColor; border-radius: 1px; }
.home { flex: none; height: 30px; display: flex; align-items: center; justify-content: center; }
.home i { display: block; width: 134px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .5; }
.dark .home i { background: var(--paper); opacity: .35; }
.stage-note { position: fixed; left: 16px; bottom: 12px; font: 12px/1.5 var(--mono); color: var(--muted); display: flex; gap: 14px; align-items: center; }
.stage-note a { color: var(--mid); }
@media (max-width: 520px) {
  .stage { padding: 0; }
  .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; margin: 0; animation: none; }
  .statusbar { height: max(env(safe-area-inset-top), 14px); }
  .statusbar > * { display: none; }
  .home { height: max(env(safe-area-inset-bottom), 14px); }
  .home i { display: none; }
  .stage-note { display: none; }
}

/* ---------- screen skeleton ---------- */
.body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px var(--gutter) 0; gap: 22px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.body.top48 { padding-top: 48px; gap: 28px; }
.body.top56 { padding-top: 56px; gap: 28px; }
.body.g16 { gap: 16px; } .body.g18 { gap: 18px; } .body.g20 { gap: 20px; } .body.g24 { gap: 24px; } .body.g28 { gap: 28px; }
.body.centered { align-items: center; text-align: center; }
.body.pad28 { padding-left: 28px; padding-right: 28px; }
.footer { flex: none; padding: 12px var(--gutter); display: flex; flex-direction: column; gap: 10px; }
.footer .row2 { display: flex; gap: 10px; }
.footer .row2 > * { flex: 1; }
.footer .blank56 { height: 56px; } .footer .blank44 { height: 44px; }
.push { margin-top: auto; }
.grow { flex: 1; min-height: 0; }
.center-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; }
.topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.topbar .ph { width: 40px; height: 40px; }
.topbar .right { display: flex; gap: 6px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.dark .iconbtn { border-color: var(--mid); color: var(--muted); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand i { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--moon); }
.brand b { font: 600 20px var(--serif); }
.stepper { display: flex; align-items: center; justify-content: space-between; }
.stepper .n { font-size: 14px; font-weight: 700; color: var(--muted); }
.stepper .bars { display: flex; gap: 6px; }
.stepper .bars i { display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--line-2); }
.stepper .bars i.is-on { background: var(--ink); }
.stepper .track { flex: 1; height: 4px; border-radius: 2px; background: var(--line-2); margin-left: 16px; overflow: hidden; }
.stepper .track i { display: block; height: 100%; background: var(--ink); transition: width .3s; }

/* ---------- type ---------- */
.h1 { font: 600 32px/1.2 var(--serif); text-wrap: pretty; }
.h1.s30 { font-size: 30px; }
.h1.s36 { font-size: 36px; line-height: 1.15; }
.h1.s24 { font-size: 24px; line-height: 1.3; }
.h1.q { font-weight: 500; font-size: 28px; line-height: 1.3; }
.h1.title { font-weight: 500; font-size: 26px; line-height: 1.3; }
.h2 { font: 600 26px/1.25 var(--serif); text-wrap: pretty; }
.h3 { font: 600 20px var(--serif); }
.h3.s18 { font-size: 18px; } .h3.s19 { font-size: 19px; }
.lead { color: var(--mid); text-wrap: pretty; }
.dark .lead { color: var(--muted); }
.overline { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.overline.s13 { font-size: 13px; }
.small { font-size: 14px; color: var(--muted); }
.small.mid { color: var(--mid); }
.tiny { font-size: 13px; color: var(--muted); }
.tiny.b { font-weight: 700; }
.s15 { font-size: 15px; } .s16 { font-size: 16px; } .s20 { font-size: 20px; }
.mid { color: var(--mid); } .muted { color: var(--muted); } .soft { color: var(--soft); } .terra { color: var(--terra-dark); }
.b { font-weight: 700; }
.promise { font: italic 15px/1.5 var(--serif); color: var(--muted); text-align: center; }
.italic { font: italic 16px var(--serif); color: var(--muted); }
.label { font-size: 14px; font-weight: 700; color: var(--mid); }
.error { font-size: 15px; font-weight: 700; color: var(--terra-dark); }
.hint { font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack.g2 { gap: 2px; } .stack.g4 { gap: 4px; } .stack.g6 { gap: 6px; } .stack.g10 { gap: 10px; } .stack.g14 { gap: 14px; } .stack.g16 { gap: 16px; } .stack.g20 { gap: 20px; }
.hrow { display: flex; align-items: center; gap: 8px; }
.hrow.between { justify-content: space-between; }
.hrow.g12 { gap: 12px; } .hrow.g14 { gap: 14px; } .hrow.g16 { gap: 16px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.pretty { text-wrap: pretty; }
.w100 { width: 100%; }

/* ---------- buttons ---------- */
.btn { width: 100%; height: var(--btn-h); border-radius: var(--r-btn); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; padding: 0 16px; transition: background .12s, transform .12s, opacity .12s; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--terra); color: var(--card); }
.btn-primary:active { background: var(--terra-dark); }
.btn-primary:disabled, .btn-primary.is-disabled { opacity: .4; pointer-events: none; }
.btn-secondary { border: 1.5px solid var(--line-2); color: var(--ink); }
.btn-secondary.is-quiet { color: var(--muted); pointer-events: none; }
.btn-secondary:disabled { color: var(--muted); }
.dark .btn-secondary { border-color: var(--mid); color: var(--paper); }
.btn-text { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--mid); }
.btn-text.is-danger { color: var(--terra-dark); }
.btn-text.is-muted { color: var(--muted); }
.dark .btn-text { color: var(--muted); }
.btn-dashed { width: 100%; height: 52px; border-radius: 14px; border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--mid); }
.btn-dashed.is-selected { border-style: solid; border-color: var(--ink); color: var(--ink); }
.link { font-size: 15px; font-weight: 700; color: var(--mid); }
.btn.web-wide { width: auto; height: 60px; padding: 0 36px; font-size: 18px; }

/* ---------- fields ---------- */
.field { width: 100%; height: var(--field-h); border: 1px solid var(--line); border-radius: var(--r-field); background: var(--card); padding: 0 16px; font-size: 17px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--muted); }
.field:focus { border: 1.5px solid var(--ink); outline: none; }
.field.is-error, .field.is-error:focus { border: 1.5px solid var(--terra-dark); }
.field.h56 { height: 56px; }
.field.h60 { height: 60px; font: 600 22px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: none; line-height: 1.5; display: block; }
.textarea.story { font: 400 20px/1.4 var(--serif); }
.textarea.tall { min-height: 180px; }
.textarea.h80 { min-height: 80px; }
.code-cells { display: flex; gap: 8px; }
.code-cell { flex: 1; height: 64px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: flex; align-items: center; justify-content: center; font: 600 26px var(--serif); }
.code-cell.is-filled, .code-cell.is-active { border: 1.5px solid var(--ink); }
.code-cell.is-error { border: 1.5px solid var(--terra-dark); }
.code-cell.is-active::after { content: ""; display: block; width: 1.5px; height: 26px; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.code-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* ---------- choices ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15px; font-weight: 700; color: var(--ink); }
.chip.is-selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.is-add { border-style: dashed; color: var(--muted); }
.chip.sm { padding: 6px 12px; font-size: 14px; }
.chips input.chip { width: 140px; background: var(--card); }
.segs { display: flex; gap: 8px; }
.seg { flex: 1; height: 54px; border: 1px solid var(--line-2); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.seg.is-selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scale { display: flex; justify-content: space-between; gap: 8px; }
.dot { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); display: flex; align-items: center; justify-content: center; }
.dot.is-selected { background: var(--ink); border-color: var(--ink); }
.scale-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }
.days { display: flex; justify-content: space-between; }
.day { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.day.is-selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; border: 1px solid var(--line-2); flex: none; transition: background .15s, border-color .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); transition: transform .15s, background .15s; }
.toggle.is-on { background: var(--ink); border-color: var(--ink); }
.toggle.is-on::after { transform: translateX(20px); background: var(--paper); }
.tabs { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tab { flex: 1; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--muted); border-radius: 9px; }
.tab.is-active { background: var(--ink); color: var(--paper); }
.radio { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: left; width: 100%; }
.radio.is-selected { background: var(--card); border: 1.5px solid var(--ink); }
.radio .r { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: flex; align-items: center; justify-content: center; }
.radio.is-selected .r { border-color: var(--ink); }
.radio.is-selected .r::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
.radio .t { flex: 1; display: flex; flex-direction: column; }

/* ---------- cards, lists, pills ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.card.is-selected { border: 1.5px solid var(--ink); }
.card.is-dashed { background: transparent; border: 1px dashed var(--line-2); }
.card.p14 { padding: 14px 16px; } .card.p12 { padding: 12px 14px; } .card.p18 { padding: 18px; } .card.p20 { padding: 20px; } .card.p10 { padding: 10px 14px; }
.card.r20 { border-radius: 20px; } .card.r14 { border-radius: 14px; }
.card.row { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.card.row.g16 { gap: 16px; } .card.row.g12 { gap: 12px; }
.card .t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .t.g4 { gap: 4px; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); display: flex; flex-direction: column; }
.list > .item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-size: 17px; }
.list > .item:last-child { border-bottom: 0; }
.list > .item.p14 { padding: 14px 16px; } .list > .item.p16 { padding: 16px; } .list > .item.s15 { font-size: 15px; }
.item .val { display: flex; align-items: center; gap: 8px; color: var(--mid); }
.item .kv { display: flex; flex-direction: column; min-width: 0; }
.item .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.item .act { font-size: 15px; font-weight: 700; color: var(--mid); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--mid); }
.pill i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.pill.none i { border: 1.5px solid var(--muted); }
.pill.writing i { background: var(--muted); }
.pill.voicing i { background: var(--mid); }
.pill.ready i { background: var(--moon); }
.pill.stopped { color: var(--terra-dark); } .pill.stopped i { background: var(--terra); }
.pill.failed { color: var(--terra-dark); } .pill.failed i { border: 1.5px solid var(--terra); }
.bullets { display: flex; flex-direction: column; gap: 14px; }
.bullets > li { display: flex; gap: 12px; align-items: flex-start; }
.bullets > li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moon); margin-top: 9px; flex: none; }
.bullets.sm { gap: 10px; font-size: 15px; color: var(--mid); }
.gold { width: 72px; height: 72px; border-radius: 50%; background: var(--moon); flex: none; }
.gold.s44 { width: 44px; height: 44px; }
.divider { height: 1px; background: var(--line); }

/* ---------- figure, moon, bars, timeline ---------- */
.figure-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line-2); border-radius: 20px; padding: 16px; background: var(--card); }
.figure-box .tag { font: 11px var(--mono); color: var(--muted); }
.figure-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.figure-card .name { font: 600 20px var(--serif); }
.moon { position: relative; width: 96px; height: 96px; margin: 0 auto; flex: none; }
.moon::before { content: ""; position: absolute; inset: -29px; border-radius: 50%; border: 1px solid var(--moon); animation: sofnaRing 7s ease-in-out infinite; }
.moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--moon); animation: sofnaBreathe 7s ease-in-out infinite; }
.moon.s56 { width: 56px; height: 56px; } .moon.s56::before { inset: -17px; }
.moon-static { width: 120px; height: 120px; border-radius: 50%; background: var(--moon); opacity: .9; flex: none; }
.moon-static.paused { background: transparent; border: 1.5px solid var(--moon); opacity: .7; }
.moon-static.done { opacity: .35; }
.moon-static.empty { width: 96px; height: 96px; background: transparent; border: 1.5px solid var(--moon); opacity: 1; }
.bars { display: flex; gap: 3px; align-items: center; }
.bars i { display: block; width: 3px; border-radius: 2px; transform-origin: center; animation: sofnaBar 1s ease-in-out infinite; }
.bars.still i { animation: none; transform: scaleY(.35); }
.timeline { display: flex; gap: 4px; height: 6px; width: 100%; position: relative; }
.timeline .knap { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 5px rgba(0, 0, 0, .28); pointer-events: none; }
.timeline.paused .knap { background: var(--soft); }
/* Det område, fingeren kan ramme, er større end selve stregen — den skal kunne rammes i mørke. */
.spol { padding: 16px 0; margin: -16px 0; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 8px; }
.spol:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.spol.traekker .timeline > div > i { transition: none; }
.timeline > div { border-radius: 3px; background: var(--mid); position: relative; overflow: hidden; }
.timeline > div > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper); display: block; transition: width .5s linear; }
.timeline.paused > div > i { background: var(--soft); }
.timeline.light > div { background: var(--line); } .timeline.light > div > i { background: var(--line-2); }
.timeline.done > div > i { display: none; }
.zones { display: flex; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; width: 100%; }
.zones span:nth-child(1), .timeline > div:nth-child(1) { flex: var(--z1, 2); }
.zones span:nth-child(2), .timeline > div:nth-child(2) { flex: var(--z2, 6); }
.zones span:nth-child(3), .timeline > div:nth-child(3) { flex: var(--z3, 9); text-align: right; }
.times { display: flex; justify-content: space-between; font-size: 14px; color: var(--soft); width: 100%; }
.times.dim { color: var(--mid); }
.times.light { color: var(--mid); }
.transport { display: flex; align-items: center; justify-content: center; gap: 36px; padding: 8px 0 4px; }
.skip { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--mid); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--soft); }
.playbtn { width: 96px; height: 96px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.playbtn.outline { background: transparent; border: 2px solid var(--paper); color: var(--paper); }
.rec-wrap { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.rec-wrap.is-on::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--terra); opacity: .35; }
.rec { width: 168px; height: 168px; border-radius: 50%; background: var(--terra); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-rec); color: var(--card); touch-action: none; user-select: none; -webkit-user-select: none; transition: background .15s, box-shadow .15s; }
.rec.is-on { background: var(--terra-dark); box-shadow: none; }
.progress { width: 200px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--terra); transition: width .2s linear; }
.steps { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.step.todo { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.step .st { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.step.active .st { background: var(--ink); } .step.active .st::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--moon); }
.step.done .st { background: var(--ink); color: var(--paper); }
.step.todo .st { border: 1.5px solid var(--line-2); }
.step b { flex: 1; } .step span { font-size: 14px; color: var(--muted); }

/* ---------- story text / read mode / sheet / toast ---------- */
.story { font: 400 18px/1.65 var(--serif); color: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.story p { text-wrap: pretty; }
.fade-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.fade-wrap .scroll { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 48px; }
.fade-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(247, 241, 228, 0), var(--paper)); pointer-events: none; }
.read { font: 400 25px/1.6 var(--serif); color: var(--paper); display: flex; flex-direction: column; gap: 22px; flex: 1; min-height: 0; overflow-y: auto; }
.read.lg { font-size: 29px; } .read.sm { font-size: 22px; }
.read p { text-wrap: pretty; }
.pages { display: flex; gap: 6px; justify-content: center; padding-bottom: 4px; flex-wrap: wrap; }
.pages i { display: block; width: 24px; height: 4px; border-radius: 2px; background: var(--mid); }
.pages i.is-on { background: var(--paper); }
.dim { opacity: .4; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; z-index: 5; }
.sheet-wrap .scrim { position: absolute; inset: 0; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); color: var(--ink); border-top: 1px solid var(--line); border-radius: 32px 32px var(--r-phone) var(--r-phone); padding: 20px 24px 12px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 -8px 30px rgba(58, 50, 38, .12); animation: sofnaSheetIn .25s ease-out; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto; }
.sheet .home { padding: 0; }
@media (max-width: 520px) { .sheet { border-radius: 32px 32px 0 0; padding-bottom: max(env(safe-area-inset-bottom), 12px); } .sheet .home { display: none; } }
#beskeder { position: fixed; left: 0; right: 0; bottom: 110px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; z-index: 50; pointer-events: none; }
.toast { width: 100%; max-width: 360px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 700; text-align: center; animation: sofnaFadeIn .2s ease-out; pointer-events: none; }
.toast.dark { background: var(--paper); color: var(--ink); }
.demo-note { font: 12px/1.5 var(--mono); color: var(--mid); background: var(--card); border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 12px; text-align: left; }
.dark .demo-note { background: transparent; color: var(--muted); border-color: var(--mid); }

/* ---------- time picker, lock screen ---------- */
.picker { display: flex; flex-direction: column; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 0; user-select: none; -webkit-user-select: none; }
.picker .adj { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; font: 400 22px var(--serif); color: var(--line-2); }
.picker .cur { width: 100%; height: 60px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font: 600 40px var(--serif); }
.lock { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 0; gap: 36px; }
.lock .date { font-size: 20px; font-weight: 600; color: var(--soft); }
.lock .clock { font: 400 92px/1 var(--serif); }
.notif { width: 100%; background: var(--paper); color: var(--ink); border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; text-align: left; }
.notif.old { opacity: .85; }
.notif .app { width: 38px; height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none; }
.notif .app i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--moon); }
.notif .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notif .head { display: flex; justify-content: space-between; font-size: 15px; }
.notif .msg { font-size: 15px; line-height: 1.4; }

/* ---------- web pages (landing, checkout, gift, recipient) ---------- */
.web { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; animation: sofnaFadeIn .22s ease-out; }
.web-nav { display: flex; align-items: center; justify-content: space-between; padding: 28px 72px; }
.web-nav .brand i { width: 14px; height: 14px; } .web-nav .brand b { font-size: 24px; }
.web-nav .links { display: flex; gap: 32px; font-size: 16px; font-weight: 700; }
.web-nav .links a { color: var(--mid); } .web-nav .links a.is-active { color: var(--ink); }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 72px 72px; }
.section { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 64px 72px; border-top: 1px solid var(--line); align-items: center; }
.section.one { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 72px; text-align: center; }
.exits { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 0 72px 80px; }
.exits .row { display: flex; gap: 14px; }
.web-footer { display: flex; justify-content: space-between; padding: 24px 72px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); margin-top: auto; }
.h-display { font: 600 56px/1.1 var(--serif); text-wrap: pretty; }
.h-40 { font: 600 40px/1.15 var(--serif); text-wrap: pretty; }
.h-36q { font: 500 36px/1.35 var(--serif); max-width: 820px; text-wrap: pretty; }
.lead19 { font-size: 19px; color: var(--mid); text-wrap: pretty; }
.lead18 { font-size: 18px; color: var(--mid); text-wrap: pretty; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.price { display: flex; flex-direction: column; gap: 6px; border-radius: 20px; padding: 24px; }
.price.us { background: var(--card); border: 1.5px solid var(--ink); }
.price.them { border: 1px dashed var(--line-2); color: var(--muted); }
.price .amt { font: 600 40px var(--serif); }
.demo-card { display: flex; flex-direction: column; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; }
.playbig { width: 80px; height: 80px; border-radius: 50%; background: var(--terra); display: flex; align-items: center; justify-content: center; color: var(--card); flex: none; }
.playbig.s88 { width: 88px; height: 88px; } .playbig.s64 { width: 64px; height: 64px; }
.web-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 40px 60px; text-align: center; }
.web-card { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.checkout { flex: 1; display: grid; grid-template-columns: 1fr 1fr; }
.checkout .left { padding: 48px 56px; display: flex; flex-direction: column; gap: 28px; border-right: 1px solid var(--line); }
.checkout .right { padding: 48px 56px; display: flex; flex-direction: column; gap: 18px; background: var(--card); }
.checkout .field, .checkout .mockfield { border-radius: 10px; height: 46px; }
.badge { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 9px; flex: none; }
.totals { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--mid); border-top: 1px solid var(--line); padding-top: 20px; }
.totals div { display: flex; justify-content: space-between; }
.totals .sum { font-weight: 700; color: var(--ink); font-size: 16px; }
.mockfield { height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); background: var(--card); }
.mockcard { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); color: var(--muted); }
.mockcard > div { height: 46px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; }
.mockcard > div:first-child { border-bottom: 1px solid var(--line); }
.mockcard .split { display: flex; padding: 0; }
.mockcard .split > div { flex: 1; height: 46px; padding: 0 14px; display: flex; align-items: center; }
.mockcard .split > div:first-child { border-right: 1px solid var(--line); }
.gift-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 24px 56px 56px; align-items: center; }
.phase-tag { font: 700 11px var(--mono); padding: 3px 8px; border-radius: 5px; border: 1px dashed var(--muted); color: var(--muted); }
@media (max-width: 860px) {
  .web-nav { padding: 20px 24px; } .web-nav .brand i { width: 12px; height: 12px; } .web-nav .brand b { font-size: 20px; }
  .web-nav .links { gap: 18px; font-size: 15px; }
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 16px 24px 36px; }
  .section { grid-template-columns: 1fr; gap: 14px; padding: 36px 24px; }
  .section.one { padding: 36px 24px; gap: 14px; }
  .exits { padding: 8px 24px 40px; gap: 10px; }
  .exits .row { flex-direction: column; width: 100%; gap: 10px; }
  .btn.web-wide { width: 100%; height: 56px; font-size: 17px; padding: 0 16px; }
  .web-footer { padding: 20px 24px; flex-direction: column; gap: 6px; }
  .h-display { font-size: 38px; } .h-40 { font-size: 30px; } .h-36q { font-size: 24px; line-height: 1.4; }
  .lead19, .lead18 { font-size: 17px; }
  .price-grid { gap: 10px; } .price { padding: 16px; border-radius: 16px; } .price .amt { font-size: 26px; }
  .demo-card { padding: 20px; border-radius: 20px; gap: 16px; }
  .web-main { padding: 32px 24px; gap: 28px; }
  .checkout { grid-template-columns: 1fr; }
  .checkout .left { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; gap: 22px; }
  .checkout .right { padding: 28px 24px; }
  .gift-grid { grid-template-columns: 1fr; gap: 24px; padding: 16px 24px 40px; }
}

/* ---------- overview (prototype map) ---------- */
.overview { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; display: flex; flex-direction: column; gap: 28px; }
.ov-group { display: flex; flex-direction: column; gap: 12px; }
.ov-head { display: flex; align-items: baseline; gap: 14px; }
.ov-head .letter { font: 600 44px var(--serif); }
.ov-head .name { font: 600 22px var(--serif); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ov-item { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; color: var(--ink); }
.ov-item:hover { border-color: var(--line-2); }
.ov-item .num { font: 700 12px var(--mono); background: var(--ink); color: var(--paper); padding: 3px 7px; border-radius: 5px; }
.ov-item .svcs { display: flex; flex-wrap: wrap; gap: 4px; }
.phase { font: 700 10px var(--mono); padding: 3px 7px; border-radius: 5px; border: 1px solid var(--mid); flex: none; }
.phase.p1 { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.phase.p3 { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.svc { font: 11px var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--mid); }
.ov-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 12px var(--mono); color: var(--mid); }

@media (prefers-reduced-motion: reduce) {
  .moon::before, .moon::after, .bars i { animation-duration: 0s; animation-iteration-count: 0; }
  .phone, .web, .sheet { animation: none; }
}

/* ---------- late additions ---------- */
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; }
.item.card { padding: 14px 16px; }
.btn.h54 { height: 54px; border-radius: 12px; }
.link { font-size: 15px; font-weight: 700; color: var(--mid); }
.link.muted { color: var(--muted); font-size: 16px; }
.gold.s8 { width: 8px; height: 8px; }

.learned-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.learned-head .h3 { white-space: nowrap; }
.learned-head .tiny { flex: none; text-align: right; }

/* Dyrene, man kan vælge imellem (17/9). To i bredden på en telefon. */
.dyr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dyr-grid .card { text-align: center; }
.dyr-grid .card.is-selected { border-color: var(--terra); }
