/* flome onboarding (#182). The picked character's colors (--c-*) become the whole page. */
:root {
  --display: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Marker Felt", cursive;
  --ios: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --ink: #16181d;
  --paper: #fbfbf8;
  --gray: #e9e9eb;
  --quiet: #7a7f86;
  --hl-yellow: #ffe45c;
  --imsg: #0a84ff;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: #e9ece4; font-family: var(--ios); color: var(--ink); display: flex; justify-content: center; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-deep); outline-offset: 2px; }

.app { --c-bg: #eef0ea; --c-mid: #d9ddd2; --c-deep: #16181d; position: relative; width: 100%; max-width: 440px; height: 100%; height: 100dvh; background: var(--c-bg); overflow: hidden; transition: background-color 0.5s ease; }
@media (min-width: 600px) {
  body { align-items: center; padding: 24px; }
  .app { height: min(880px, calc(100dvh - 48px)); border-radius: 36px; box-shadow: 0 40px 80px -30px rgba(10, 20, 10, 0.45); }
}
.view { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.8,.2,1); transform: translateY(14px); padding-top: env(safe-area-inset-top, 0px); }
.view.on { opacity: 1; pointer-events: auto; transform: none; }
.sticker { display: block; border-radius: 22px; border: 5px solid #fff; box-shadow: 0 10px 22px -8px rgba(20, 22, 28, 0.35); object-fit: cover; background: #fff; }

/* welcome */
#v-welcome { padding: 28px 26px calc(28px + env(safe-area-inset-bottom, 0px)); justify-content: space-between; }
.collage { position: relative; flex: 1; min-height: 300px; margin: 0 -26px; }
.collage img { position: absolute; height: 40%; max-width: 30%; aspect-ratio: 3 / 4; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.welcome-copy h1 { font: 800 40px/0.98 var(--display); letter-spacing: -0.035em; margin: 0 0 12px; text-wrap: balance; }
.welcome-copy h1 mark { background: linear-gradient(transparent 55%, var(--hl-yellow) 55% 92%, transparent 92%); color: inherit; padding: 0 2px; }
.welcome-copy p { margin: 0 0 22px; font-size: 16px; color: #3d424a; }
.big-cta { width: 100%; border: 0; border-radius: 18px; padding: 17px 20px; background: var(--c-deep); color: #fff; font: 700 17px var(--ios); display: flex; justify-content: space-between; align-items: center; text-decoration: none; transition: transform 0.15s ease, background-color 0.4s ease; }
.big-cta:active { transform: scale(0.98); }
.big-cta:disabled { opacity: 0.5; }
.fine { text-align: center; font-size: 12.5px; color: var(--quiet); margin-top: 10px; }

/* cast */
#v-cast { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
.cast-top { padding: 0 22px 8px; display: flex; flex-direction: column; gap: 10px; }
.cast-top h2 { margin: 0; font: 800 28px/1.02 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.seg { display: inline-flex; background: rgba(255,255,255,0.55); border-radius: 999px; padding: 3px; gap: 2px; align-self: flex-start; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 13px; font: 600 13px var(--ios); color: #444a52; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.cards { flex: 1; min-height: 0; align-items: flex-start; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 40px 12px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.ccard { flex: 0 0 min(286px, 76vw); scroll-snap-align: center; background: #fff; border-radius: 28px; padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 40px -24px rgba(20,22,28,0.45); transition: transform 0.3s ease; }
.ccard .pic { position: relative; }
.ccard .pic img { width: 100%; height: clamp(160px, 30svh, 250px); border-radius: 20px; object-fit: cover; object-position: center 20%; display: block; }
.ccard .tag { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,0.92); border-radius: 999px; padding: 4px 10px; font: 600 12px var(--ios); }
.ccard h3 { margin: 0; font: 800 30px/1 var(--display); letter-spacing: -0.03em; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ccard h3 em { font: 500 13px var(--ios); font-style: normal; color: var(--quiet); letter-spacing: 0; text-align: right; }
.ccard .life { font: 600 20px/1.1 var(--hand); color: #3a3f47; margin: 0; }
.ccard .sample { align-self: flex-start; background: var(--gray); border-radius: 18px 18px 18px 6px; padding: 8px 12px; font-size: 14.5px; line-height: 1.3; max-width: 92%; }
.ccard .push { font-size: 12.5px; color: var(--quiet); margin: 0; }
.cast-foot { padding: 6px 22px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dots { display: flex; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.18); transition: width 0.3s ease, background-color 0.3s ease; }
.dots i.on { width: 18px; border-radius: 3px; background: var(--c-deep); }

/* chat */
#v-chat { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.chat-head { padding: 4px 18px 10px; display: flex; flex-direction: column; gap: 10px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress div { display: flex; flex-direction: column; gap: 5px; }
.progress span { font: 600 10.5px var(--ios); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(22,24,29,0.45); transition: color 0.3s; }
.progress div.on span { color: var(--c-deep); }
.progress b { height: 4px; border-radius: 2px; background: rgba(22,24,29,0.12); overflow: hidden; position: relative; }
.progress b::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); background: var(--c-deep); border-radius: 2px; transition: width 0.5s cubic-bezier(.2,.8,.2,1); }
.who { display: flex; align-items: center; gap: 10px; width: 100%; }
.who img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center 18%; border: 2px solid #fff; }
.who b { font: 700 15px var(--ios); }
.who small { color: rgba(22,24,29,0.55); font-size: 12.5px; }
.who:has(.ipill:not([hidden])) small { display: none; }
.ipill { white-space: nowrap; margin-left: auto; font: 600 11.5px var(--ios); background: rgba(255,255,255,0.7); border-radius: 999px; padding: 4px 9px; color: #3d424a; font-variant-numeric: tabular-nums; }
.map { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; background: rgba(255,255,255,0.7); border-radius: 12px; padding: 7px 10px; }
.map .lbl { font: 600 12px var(--ios); }
.map .bar { height: 6px; border-radius: 3px; background: rgba(22,24,29,0.1); overflow: hidden; }
.map .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--c-deep); transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.map .pct { font: 800 14px var(--display); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.map.bump { animation: bump 0.6s cubic-bezier(.2,1.4,.4,1); }
@keyframes bump { 40% { transform: scale(1.04); background: #fff; } }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; scrollbar-width: none; }
.chat-body::-webkit-scrollbar { display: none; }
.thread { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: flex-end; gap: 7px; animation: pop 0.32s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.row.them { justify-content: flex-start; }
.row.me { justify-content: flex-end; margin: 12px 0 6px; }
.row .av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: center 18%; flex: 0 0 26px; visibility: hidden; }
.row.first .av { visibility: visible; }
.bubble { max-width: 76%; padding: 9px 13px; border-radius: 20px; font-size: 16px; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.them .bubble { background: #fff; color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 0 1px 1px rgba(0,0,0,0.04); }
.me .bubble { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; position: relative; }
.me .bubble.img { padding: 4px; background: transparent; }
.me .bubble.img img { width: 120px; border-radius: 16px; display: block; border: 1px solid rgba(0,0,0,0.08); }
.tb { position: absolute; top: -13px; left: -15px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--c-bg); display: grid; place-items: center; font-size: 13px; animation: drop 0.4s cubic-bezier(.2,1.4,.4,1) both; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.typing .bubble { display: flex; gap: 4px; padding: 13px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b9bcc2; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.35; } 40% { opacity: 1; transform: translateY(-2px); } }
.row.wide { display: block; margin: 8px 0 8px 33px; }
.divider { text-align: center; font: 600 11px var(--ios); color: rgba(22,24,29,0.45); letter-spacing: 0.06em; text-transform: uppercase; margin: 10px 0; }

/* chat cards */
.card { background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 10px 26px -18px rgba(20,22,28,0.5); display: flex; flex-direction: column; gap: 10px; max-width: 300px; }
.card h4 { margin: 0; font: 800 17px/1.15 var(--display); letter-spacing: -0.01em; }
.meta { font-size: 12.5px; color: var(--quiet); }
.perk { display: flex; flex-direction: column; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--c-deep); color: #fff; border-radius: 999px; padding: 5px 11px 5px 7px; font: 700 12.5px var(--ios); align-self: flex-start; }
.perk ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.perk li { display: flex; gap: 9px; font-size: 14px; line-height: 1.3; }
.perk li b { flex: 0 0 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; background: var(--c-bg); }
.scan { position: relative; width: 150px; border-radius: 14px; overflow: hidden; }
.scan img { display: block; width: 100%; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; top: -40px; background: linear-gradient(to bottom, transparent, rgba(255, 228, 92, 0.7), transparent); animation: scan 1.1s linear infinite; }
@keyframes scan { to { top: 100%; } }
.week { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 3px; font-variant-numeric: tabular-nums; }
.week .dh { font: 700 11px var(--ios); text-align: center; color: var(--quiet); }
.week .col { position: relative; height: 200px; background: repeating-linear-gradient(to bottom, #f1f2ef 0 1px, transparent 1px 20px); border-radius: 6px; }
.week .hrs { position: relative; height: 200px; }
.week .hrs span { position: absolute; right: 2px; font-size: 9.5px; color: var(--quiet); translate: 0 -6px; }
.week .blk { position: absolute; left: 1px; right: 1px; border-radius: 5px; padding: 2px 3px; font: 700 8.5px/1.05 var(--ios); color: #1d1f24; overflow: hidden; transform-origin: top; animation: grow 0.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
.legend-row { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 11.5px; color: #444a52; }
.legend-row i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.guide ol { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 3px; }
.mini-lms { border-radius: 12px; background: #f6f7f9; border: 1px solid #e6e8ec; padding: 10px; display: grid; gap: 6px; }
.mini-lms .ln { height: 7px; border-radius: 4px; background: #e2e5ea; }
.mini-lms .ln.s { width: 60%; }
.mini-lms .feed { justify-self: start; display: inline-flex; gap: 6px; align-items: center; border-radius: 8px; padding: 5px 9px; font: 600 12px var(--ios); background: #fff; border: 1px solid #d5d9df; position: relative; }
.mini-lms .feed::after { content: ""; position: absolute; inset: -5px; border-radius: 11px; border: 2px solid var(--c-deep); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { opacity: 1; transform: scale(0.96); } to { opacity: 0; transform: scale(1.12); } }
.lms-row { display: flex; gap: 5px; flex-wrap: wrap; }
.lms { font: 600 11.5px var(--ios); padding: 3px 8px; border-radius: 999px; background: #f1f2f4; color: #8a8f96; }
.lms.on { background: var(--c-deep); color: #fff; }
.linkout { font-size: 13.5px; color: var(--c-deep); font-weight: 600; text-decoration: none; }
.cover { display: flex; gap: 14px; align-items: center; }
.cover svg { flex: 0 0 74px; }
.big { font: 800 26px/1 var(--display); }
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.courses li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.courses li i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.courses li .st { margin-left: auto; font-size: 12px; font-weight: 600; }
.st.no { color: #c2410c; } .st.ok { color: #1f7a4d; }
.files { display: grid; gap: 7px; }
.file { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.file .ext { width: 26px; height: 32px; border-radius: 5px; background: #fde2e0; color: #b42318; font: 800 8px var(--ios); display: grid; place-items: end center; padding-bottom: 4px; }
.file .ext.doc { background: #dce8fd; color: #1d4ed8; }
.file .bar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: #eef0f2; overflow: hidden; }
.file .bar b { display: block; height: 100%; width: 0; background: var(--c-deep); transition: width 0.9s ease; }
.found { display: flex; align-items: baseline; gap: 8px; }
.found .big { font-size: 40px; color: var(--c-deep); font-variant-numeric: tabular-nums; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--quiet); transition: color 0.3s; }
.checklist .ck { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d5d8dd; flex: 0 0 18px; position: relative; }
.checklist li.run .ck { border-color: var(--c-deep); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.checklist li.done { color: var(--ink); }
.checklist li.done .ck { background: var(--c-deep); border-color: var(--c-deep); }
.checklist li.done .ck::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }
@keyframes spin { to { rotate: 360deg; } }
.consent-card .perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.consent-card .perms li { display: flex; gap: 9px; align-items: center; }
.consent-card .perms b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: 0 0 20px; }
.consent-card .yes b { background: #ddf3e6; color: #1f7a4d; }
.consent-card .no b { background: #f1f2f4; color: #6b6f76; }
.okpill { align-self: flex-start; background: #ddf3e6; color: #1f6b45; border-radius: 999px; padding: 4px 10px; font: 700 12.5px var(--ios); }
.next7 { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.next7 li { display: flex; gap: 8px; align-items: center; }
.next7 li i { width: 8px; height: 8px; border-radius: 2px; }
.next7 li span { margin-left: auto; color: var(--quiet); font-size: 12px; font-variant-numeric: tabular-nums; }
.free { display: flex; gap: 5px; }
.free span { flex: 1; text-align: center; border-radius: 8px; padding: 6px 0; font: 700 11px var(--ios); background: #f1f2f4; color: #9aa0a6; }
.free span.on { background: var(--c-mid); color: var(--ink); }
.locked .heat-mini { filter: blur(6px); transition: filter 0.9s ease; }
.locked.open .heat-mini { filter: none; }
.heat-mini { display: grid; grid-template-columns: repeat(var(--n, 16), 1fr); gap: 3px; align-items: end; height: 60px; }
.heat-mini i { border-radius: 3px 3px 1px 1px; }
.lockpill { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 10px; font: 700 12px var(--ios); }
.locked.open .lockpill { background: #e8452c; }
.picked { gap: 8px; }
.pgroup { display: grid; gap: 5px; }
.pg-h { font: 700 10.5px var(--ios); letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); margin-top: 4px; }
.pick { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; text-align: left; border: 0; background: #f6f7f5; border-radius: 12px; padding: 8px 10px; }
.pick b { display: block; font: 600 13.5px/1.25 var(--ios); }
.pick small { display: block; font-size: 11.5px; color: var(--quiet); line-height: 1.25; }
.pick .x { font: 700 11px var(--ios); color: #9aa0a6; padding: 4px 6px; }
.pick[aria-pressed="true"] { background: transparent; }
.pick[aria-pressed="true"] b { text-decoration: line-through; color: #9aa0a6; }
.pick[aria-pressed="true"] .x { color: var(--c-deep); }
.pending { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #3d424a; background: #f6f7f5; border-radius: 10px; padding: 8px 10px; }
.pending .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--c-deep); border-right-color: transparent; animation: spin 0.8s linear infinite; flex: 0 0 14px; }
.devcode { font: 700 13px var(--ios); background: #fff7d6; border-radius: 10px; padding: 6px 10px; }

/* answering */
.dock { padding: 10px 14px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.dock:empty { padding-block: 0 calc(22px + env(safe-area-inset-bottom, 0px)); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.chip { border: 0; background: #fff; border-radius: 999px; padding: 9px 14px; font: 600 14.5px var(--ios); box-shadow: 0 1px 2px rgba(0,0,0,0.08); animation: pop 0.3s calc(var(--i, 0) * 45ms) both cubic-bezier(.2,1.3,.4,1); }
.chip:active, .tile:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--c-deep); color: #fff; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border: 0; background: #fff; border-radius: 18px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); animation: pop 0.3s calc(var(--i, 0) * 55ms) both cubic-bezier(.2,1.3,.4,1); transition: background-color 0.2s, color 0.2s; }
.tile .ic { font-size: 22px; }
.tile .lb { font: 700 14.5px/1.2 var(--ios); }
.tile small { font-size: 12px; color: var(--quiet); line-height: 1.25; }
.tile[aria-pressed="true"] { background: var(--c-deep); color: #fff; }
.tile[aria-pressed="true"] small { color: rgba(255,255,255,0.75); }
.cta { border: 0; border-radius: 16px; padding: 14px; background: var(--c-deep); color: #fff; font: 700 16px var(--ios); transition: opacity 0.2s, transform 0.15s; }
.cta:disabled { opacity: 0.35; cursor: default; }
.composer { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 999px; padding: 5px 5px 5px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.composer input { flex: 1; min-width: 0; border: 0; outline: none; font: 16px var(--ios); background: transparent; color: var(--ink); padding: 8px 0; }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c-deep); color: #fff; display: grid; place-items: center; flex: 0 0 36px; }
.composer.shake { animation: shake 0.35s; }
@keyframes shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.err { font-size: 12.5px; color: #b42318; padding-left: 14px; }
.extras { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ghost { border: 0; background: transparent; padding: 2px 6px; font: 600 13.5px var(--ios); color: var(--c-deep); }
.drop { position: relative; border: 2px dashed rgba(22,24,29,0.25); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(255,255,255,0.6); text-align: center; cursor: pointer; }
.drop b { font: 700 15px var(--ios); }
.drop span { font-size: 12.5px; color: var(--quiet); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.consent { font-size: 11.5px; color: var(--quiet); padding: 0 10px; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; }

/* reveal */
#v-reveal { background: #111; padding-top: 0; }
.segs { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); left: 14px; right: 14px; display: flex; gap: 4px; z-index: 5; }
.segs b { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.3); overflow: hidden; }
.segs b::after { content: ""; display: block; height: 100%; width: var(--p, 0%); background: #fff; transition: width 0.3s ease; }
.segs.dark b { background: rgba(0,0,0,0.15); } .segs.dark b::after { background: var(--ink); }
.story { position: absolute; inset: 0; padding: calc(52px + env(safe-area-inset-top, 0px)) 26px calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.story .k { font: 600 12px var(--ios); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.story h2 { margin: 0; font: 800 34px/1.02 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.tapzone { position: absolute; top: 60px; bottom: 120px; width: 40%; z-index: 4; background: transparent; border: 0; }
.tapzone.prev { left: 0; } .tapzone.next { right: 0; width: 60%; }
.tapzone.off { pointer-events: none; }
.hint { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; font: 600 12.5px var(--ios); opacity: 0.6; z-index: 3; }
.story-next { position: absolute; right: 22px; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); z-index: 7; border: 0; background: var(--c-deep); color: #fff; border-radius: 999px; padding: 11px 18px; font: 700 15px var(--ios); }
.s-hidden { background: #14161b; color: #fff; }
.numrow { display: flex; align-items: baseline; gap: 14px; }
.numrow .n { font: 800 96px/0.9 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.numrow .n.small { font-size: 54px; opacity: 0.45; text-decoration: line-through; text-decoration-thickness: 4px; }
.numrow .n.hl { color: var(--hl-yellow); }
.hidden-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hidden-list li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.3; opacity: 0; animation: pop 0.4s both; }
.hidden-list li i { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; }
.hidden-list li span { color: rgba(255,255,255,0.6); display: block; font-size: 12.5px; }
.s-stress { background: var(--paper); color: var(--ink); }
.heat { display: grid; grid-template-columns: repeat(var(--n, 16), 1fr); gap: 4px; align-items: end; height: 200px; position: relative; margin-top: 20px; }
.heat .w { border-radius: 5px 5px 2px 2px; transform-origin: bottom; animation: grow 0.6s cubic-bezier(.2,.8,.2,1) both; position: relative; min-height: 4px; }
.heat .w.hot { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px #e8452c; }
.heat .here { position: absolute; bottom: -22px; left: 50%; font: 700 10px var(--ios); white-space: nowrap; translate: -50% 0; }
.heat .flag { position: absolute; left: 50%; top: -6px; font: 700 22px/1 var(--hand); color: #e8452c; white-space: nowrap; translate: -60% -100%; }
.axis { display: grid; grid-template-columns: repeat(var(--n, 16), 1fr); gap: 4px; font-size: 9.5px; color: var(--quiet); text-align: center; margin-top: 26px; font-variant-numeric: tabular-nums; }
.hell { background: #fff1ec; border-radius: 16px; padding: 12px 14px; font-size: 14.5px; line-height: 1.35; }
.hell b { color: #c2311a; }
.s-time { background: var(--c-mid); color: var(--ink); }
.bars { display: grid; gap: 14px; margin-top: 8px; }
.bars .lbl { display: flex; justify-content: space-between; font: 600 14px var(--ios); margin-bottom: 5px; }
.bars .track { height: 30px; border-radius: 10px; background: rgba(255,255,255,0.45); overflow: hidden; }
.bars .fill { height: 100%; border-radius: 10px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.slack { font: 800 46px/1 var(--display); letter-spacing: -0.03em; }
.slack small { display: block; font: 600 22px/1.15 var(--hand); letter-spacing: 0; margin-top: 6px; }
.s-noticed { background: #f4f5f1; color: var(--ink); gap: 10px; padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.s-noticed h2 { font-size: 30px; }
.s-noticed .sub { margin: 0; font-size: 15px; color: #3d424a; }
.s-noticed .sub.small { font-size: 12.5px; color: var(--quiet); }
.offers { display: grid; gap: 6px; position: relative; z-index: 6; }
.offer { display: grid; grid-template-columns: 26px 1fr 22px; gap: 10px; align-items: center; text-align: left; border: 0; background: #fff; border-radius: 14px; padding: 9px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); transition: background-color 0.2s, color 0.2s; }
.offer .ic { font-size: 22px; }
.offer b { display: block; font: 700 14px/1.22 var(--ios); }
.offer small { display: block; font-size: 11.5px; line-height: 1.25; color: var(--quiet); margin-top: 1px; }
.offer .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d5d8dd; position: relative; }
.offer[aria-pressed="true"] { background: var(--c-deep); color: #fff; }
.offer[aria-pressed="true"] small { color: rgba(255,255,255,0.75); }
.offer[aria-pressed="true"] .tick { background: #fff; border-color: #fff; }
.offer[aria-pressed="true"] .tick::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--c-deep); border-width: 0 2px 2px 0; rotate: 45deg; }
.s-type { background: var(--c-deep); color: #fff; align-items: center; text-align: center; }
.typecard { width: 100%; background: #fff; color: var(--ink); border-radius: 28px; padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); rotate: -2deg; animation: drop 0.6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes drop { from { transform: translateY(-30px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.typecard .sticker { width: 110px; height: 140px; rotate: 4deg; margin-top: -48px; }
.typecard h3 { margin: 0; font: 800 34px/0.95 var(--display); letter-spacing: -0.035em; text-transform: uppercase; }
.typecard .traits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.typecard .traits span { background: var(--c-bg); border-radius: 999px; padding: 5px 10px; font: 600 12.5px var(--ios); }
.typecard .sig { font: 700 12px var(--ios); color: var(--quiet); letter-spacing: 0.06em; text-transform: uppercase; }
.share { border: 2px solid #fff; background: transparent; color: #fff; border-radius: 999px; padding: 11px 18px; font: 700 15px var(--ios); z-index: 6; position: relative; }
.s-letter { background: #fffdf6; color: var(--ink); background-image: repeating-linear-gradient(to bottom, transparent 0 33px, #dce6f2 33px 34px); }
.letter { font: 600 27px/34px var(--hand); white-space: pre-wrap; margin: 6px 0 0; }
.letter-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.letter-foot .sticker { width: 74px; height: 94px; rotate: -6deg; }
.s-letter .big-cta { position: relative; z-index: 6; }

/* handoff */
#v-handoff { padding: 40px 26px calc(30px + env(safe-area-inset-bottom, 0px)); align-items: center; text-align: center; gap: 16px; justify-content: center; }
#v-handoff .sticker { width: 150px; height: 190px; rotate: -4deg; }
#v-handoff h2 { margin: 0; font: 800 32px/1 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
#v-handoff p { margin: 0; color: #3d424a; }
.prefill { width: 100%; background: #fff; border-radius: 18px; padding: 12px 14px; text-align: left; display: grid; gap: 4px; }
.prefill small { color: var(--quiet); font-size: 12px; }
.prefill .msg, .prefill .num { font-size: 15.5px; user-select: all; font-variant-numeric: tabular-nums; }
.waiting { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13.5px; color: #3d424a; }
.toast { position: absolute; left: 50%; bottom: 120px; translate: -50% 0; background: rgba(22,24,29,0.9); color: #fff; border-radius: 999px; padding: 9px 16px; font: 600 13.5px var(--ios); z-index: 60; animation: pop 0.3s both; white-space: nowrap; }
.closed { padding: 40px 26px; text-align: center; display: grid; place-content: center; gap: 12px; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
