@font-face { font-family: 'Switzer'; src: url('fonts/Switzer-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Noto Sans Arabic'; src: url('fonts/NotoSansArabic-arabic-400-600-normal.woff2') format('woff2'); font-weight: 400 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  --ground: #F4F3EF; --ink: #0D1014; --ink-2: #4A4D55; --ink-3: #8A8C93; --rule: #DAD7CF;
  --cobalt: #175CFF; --amber: #E6A21A; --amber-bg: #FBF0D9;
  --sans: 'Switzer', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --ar: 'Noto Sans Arabic', 'Switzer', sans-serif;
  /* chat lookalike */
  --wa-bg: #EFEAE2; --wa-in: #FFFFFF; --wa-out: #D9FDD3; --wa-text: #111B21; --wa-sub: #667781; --wa-head: #FFFFFF; --wa-bar: #F0F2F5; --tick: #53BDEB;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- stage (desktop) ---------- */
.stage { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 400px) auto minmax(300px, 380px); grid-template-areas: "intro device behind"; gap: 56px; justify-content: center; align-items: center; padding: 32px 40px; }
.intro { grid-area: intro; align-self: center; }
.device { grid-area: device; display: flex; justify-content: center; }
.behind { grid-area: behind; align-self: center; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.brand .word { font-weight: 700; letter-spacing: .02em; font-size: 18px; }
.brand .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); padding: 4px 8px; border-radius: 99px; }
.intro h1 { font-size: 40px; line-height: 1.04; letter-spacing: -.025em; font-weight: 650; margin: 0 0 16px; max-width: 12ch; }
.lede { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin: 0 0 28px; max-width: 38ch; }
.fine { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); margin: 24px 0 0; max-width: 40ch; }

.scenes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.scenes li { border-bottom: 1px solid var(--rule); }
.scenes button { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: baseline; gap: 4px 10px; text-align: left; padding: 11px 4px; }
.scenes .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.scenes .t { font-size: 15px; font-weight: 550; line-height: 1.25; }
.scenes .d { grid-column: 2; font-size: 12.5px; color: var(--ink-3); }
.scenes .st { grid-row: 1; grid-column: 3; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.scenes li.on .t { color: var(--cobalt); }
.scenes li.on .st { color: var(--cobalt); }
.scenes li.done .st { color: var(--ink-2); }
.scenes button:hover .t { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- behind this message ---------- */
.behind { font-size: 14px; }
.behind .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 14px; }
.behind h2 { font-size: 22px; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 12px; font-weight: 620; }
.behind .empty { color: var(--ink-3); font-size: 14px; line-height: 1.5; max-width: 34ch; }
.ev-rows { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ev-rows li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.ev-rows .l { font-size: 14px; line-height: 1.35; }
.ev-rows .v { font-family: var(--mono); font-size: 12.5px; text-align: right; white-space: nowrap; }
.ev-rows .s { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ev-rows li.miss .l, .ev-rows li.miss .v { color: #8a5a00; }
.ev-rows li.miss { box-shadow: inset 3px 0 0 var(--amber); padding-left: 10px; }
.ev-rows li.tot .l, .ev-rows li.tot .v { font-weight: 650; }
.ev-rows li.rcv { box-shadow: inset 3px 0 0 #B9BCC2; padding-left: 10px; }
.ev-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 12px 0 0; }
.ev-note.ok { color: var(--cobalt); }

/* evidence state chip */
.state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.state.confirmed { color: var(--cobalt); } .state.confirmed::before { background: var(--cobalt); }
.state.likely::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.state.needs { color: #8a5a00; } .state.needs::before { background: var(--amber); }
.state.rerun::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cobalt); }

/* ---------- phone ---------- */
.phone { --h: min(844px, calc(100vh - 48px)); height: var(--h); width: calc(var(--h) * 0.4621); min-width: 330px; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--wa-bg); border-radius: 46px; box-shadow: 0 0 0 10px #0D1014, 0 0 0 11px #2a2d33, 0 40px 80px -20px rgba(13,16,20,.35); color: var(--wa-text); }
.statusbar { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; background: var(--wa-head); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-icons { display: flex; gap: 6px; align-items: center; }
.sb-icons i { display: block; background: var(--wa-text); }
.sig { width: 17px; height: 10px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.wifi { width: 14px; height: 10px; border-radius: 10px 10px 2px 2px; clip-path: polygon(50% 100%, 0 20%, 100% 20%); }
.bat { width: 24px; height: 11px; border-radius: 3px; background: none !important; box-shadow: inset 0 0 0 1.5px var(--wa-text); position: relative; }
.bat::after { content: ""; position: absolute; inset: 2.5px 6px 2.5px 2.5px; background: var(--wa-text); border-radius: 1px; }

.head { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 12px 8px 6px; background: var(--wa-head); border-bottom: 1px solid #E9EDEF; position: relative; z-index: 3; }
.back { width: 28px; height: 28px; display: grid; place-items: center; color: var(--wa-text); }
.back svg { width: 22px; height: 22px; }
.avatar svg { width: 38px; height: 38px; display: block; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.who b { font-size: 16.5px; font-weight: 650; letter-spacing: .01em; }
.who small { font-size: 12.5px; color: var(--wa-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-pill { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--ground); padding: 4px 7px; border-radius: 6px; }
.menu { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--wa-text); }
.menu svg { width: 22px; height: 22px; }
.menu:active { background: #E9EDEF; }

.viewing { flex: none; font-size: 12px; line-height: 1.35; padding: 7px 14px; background: #FAFAF8; border-bottom: 1px solid #E9EDEF; color: var(--wa-sub); display: flex; gap: 8px; align-items: center; position: relative; z-index: 2; }
.viewing b { color: var(--wa-text); font-weight: 600; }
.viewing .who-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 650; color: #fff; }
.viewing.swap { animation: swap .5s ease; }
@keyframes swap { from { background: #E8EEFF; } to { background: #FAFAF8; } }

.chat { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background-color: var(--wa-bg); background-image: radial-gradient(rgba(13,16,20,.045) 1px, transparent 1.2px); background-size: 18px 18px; scrollbar-width: none; }
.chat::-webkit-scrollbar { display: none; }
.thread { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 3px; }

/* day pill and notices */
.day { align-self: center; margin: 10px 0 6px; background: #FFFFFF; color: #54656F; font-size: 12px; font-weight: 550; padding: 5px 11px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); text-transform: uppercase; letter-spacing: .02em; }
.notice { align-self: center; max-width: 92%; margin: 4px 0 6px; background: #FFFFFF; color: var(--wa-sub); font-size: 12px; line-height: 1.4; text-align: center; padding: 7px 11px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }

/* messages */
.msg { max-width: 86%; display: flex; flex-direction: column; margin-top: 4px; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; }
.msg + .msg.in.cont, .msg + .msg.out.cont { margin-top: 1px; }
.bub { position: relative; border-radius: 10px; padding: 7px 9px 6px 10px; font-size: 15px; line-height: 1.38; box-shadow: 0 1px .5px rgba(11,20,26,.13); overflow-wrap: anywhere; }
.in .bub { background: var(--wa-in); border-top-left-radius: 3px; }
.out .bub { background: var(--wa-out); border-top-right-radius: 3px; }
.cont.in .bub { border-top-left-radius: 10px; }
.cont.out .bub { border-top-right-radius: 10px; }
.bub p { margin: 0 0 6px; }
.bub p:last-of-type { margin-bottom: 0; }
.bub .ttl { font-weight: 650; display: block; margin-bottom: 3px; }
.meta { float: right; margin: 6px 0 -3px 10px; font-size: 11px; color: var(--wa-sub); display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; position: relative; top: 3px; }
.meta .tk { width: 16px; height: 11px; color: var(--tick); }
.bub::after { content: ""; display: block; clear: both; }
.bub .state { margin-bottom: 5px; }
.miss { margin: 7px 0 2px; padding: 7px 9px; background: var(--amber-bg); border-left: 3px solid var(--amber); border-radius: 4px; font-size: 14px; line-height: 1.38; transition: background .6s ease, border-color .6s ease; }
.miss.resolved { background: #E8EEFF; border-left-color: var(--cobalt); }
.miss .mk { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #8a5a00; margin-bottom: 2px; }
.miss.resolved .mk { color: var(--cobalt); }
.src { margin-top: 7px; padding-top: 6px; border-top: 1px solid #ECEEEA; font-size: 11.5px; line-height: 1.45; color: var(--wa-sub); }
.src .ids { font-family: var(--mono); font-size: 10.5px; }
.src .lnk { display: inline-block; margin-top: 3px; color: var(--cobalt); font-weight: 600; font-size: 13px; }
.src .lnk::after { content: " \203A"; }

/* reply buttons (interactive message) */
.btns { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.btns button { background: var(--wa-in); border-radius: 8px; padding: 10px 8px; font-size: 15px; font-weight: 600; color: var(--cobalt); box-shadow: 0 1px .5px rgba(11,20,26,.13); display: flex; align-items: center; justify-content: center; gap: 7px; transition: opacity .3s ease, background .3s ease, color .3s ease; }
.btns button svg { width: 15px; height: 15px; }
.btns.live button { animation: nudge 2.2s ease-in-out infinite; }
.btns.live button:nth-child(2) { animation-delay: .12s; } .btns.live button:nth-child(3) { animation-delay: .24s; }
@keyframes nudge { 0%, 70%, 100% { box-shadow: 0 1px .5px rgba(11,20,26,.13); } 82% { box-shadow: 0 0 0 2px rgba(23,92,255,.28), 0 1px .5px rgba(11,20,26,.13); } }
.btns.used button { color: #9AA3A8; pointer-events: none; animation: none; }
.btns.used button.picked { color: var(--cobalt); background: #EEF3FF; }
.btns.disabled button { color: #9AA3A8; }
.btns button.spent { color: #9AA3A8; pointer-events: none; animation: none; }
.btns button.spent.picked { color: var(--cobalt); background: #EEF3FF; }

/* typing */
.typing { align-self: flex-start; background: var(--wa-in); border-radius: 10px; border-top-left-radius: 3px; padding: 11px 13px; display: flex; gap: 4px; margin-top: 4px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696A0; animation: dot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

.msg.enter, .day.enter, .notice.enter, .typing.enter { animation: rise .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* arabic */
.bub .ar { font-family: var(--ar); direction: rtl; text-align: right; font-size: 16px; line-height: 1.6; }
.bub .gloss { display: block; margin-top: 6px; padding-top: 5px; border-top: 1px dashed #D5D9D2; font-size: 12.5px; line-height: 1.4; color: var(--wa-sub); direction: ltr; text-align: left; }
.bub .gloss::before { content: "EN  "; font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; color: #9AA3A8; }
.num { unicode-bidi: isolate; direction: ltr; }

/* cards inside bubbles */
.card { margin: -2px -4px 8px -5px; border-radius: 7px; overflow: hidden; background: var(--ground); }
.card.brief { padding: 12px 12px 11px; }
.brief .k { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.brief .big { display: flex; align-items: baseline; gap: 8px; margin: 3px 0 9px; }
.brief .big b { font-size: 30px; letter-spacing: -.02em; font-weight: 650; line-height: 1; }
.brief .big span { font-size: 13px; color: var(--ink-2); }
.gap { display: flex; height: 22px; gap: 2px; border-radius: 3px; overflow: hidden; }
.gap i { display: block; height: 100%; background: var(--cobalt); }
.gap i.lk { background: #E4E5E8 repeating-linear-gradient(-45deg, #9A9DA4 0 1.5px, transparent 1.5px 6px); }
.gap i.un { background: var(--amber-bg) repeating-linear-gradient(-45deg, var(--amber) 0 1.5px, transparent 1.5px 6px); }
.gapl { display: flex; gap: 2px; margin-top: 5px; font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); }
.gapl span { overflow: hidden; white-space: nowrap; }
.gapl span { color: var(--cobalt); }
.gapl span.lk { color: var(--ink-3); }
.gapl span.un { color: #8a5a00; }
.gaps-cap { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }

.card.order { padding: 11px 12px; }
.order .k { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.order .row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.order .row:last-child { border-bottom: 0; padding-bottom: 0; }
.order .row .v { font-family: var(--mono); font-size: 13px; text-align: right; }
.order .row small { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; }
.order .row.b .v { color: var(--cobalt); }
.order .row.a { color: var(--ink-2); }
.order .row.a .v { text-decoration: line-through; text-decoration-color: rgba(13,16,20,.35); }
.order .save { font-weight: 650; }

.steps { list-style: none; margin: 2px 0 6px; padding: 0; }
.steps li { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 14.5px; }
.steps li .ck { width: 18px; height: 18px; border-radius: 50%; background: var(--cobalt); flex: none; display: grid; place-items: center; }
.steps li .ck svg { width: 11px; height: 11px; }
.steps li.wait .ck { background: transparent; box-shadow: inset 0 0 0 1.5px #9AA3A8; }
.steps li.wait { color: var(--wa-sub); }
.steps li .tm { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--wa-sub); }
.steps li.enter { animation: rise .32s cubic-bezier(.2,.8,.2,1) both; }

.doc { display: flex; align-items: center; gap: 10px; margin: -2px -4px 6px -5px; padding: 10px; border-radius: 7px; background: rgba(13,16,20,.045); }
.doc .ic { width: 34px; height: 40px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); position: relative; flex: none; }
.doc .ic::after { content: "PO"; position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-family: var(--mono); font-size: 9px; color: var(--cobalt); }
.doc .ic::before { content: ""; position: absolute; left: 7px; right: 7px; top: 8px; height: 12px; background: repeating-linear-gradient(#D5D9D2 0 1.5px, transparent 1.5px 4px); }
.doc b { display: block; font-size: 14px; font-weight: 600; }
.doc small { font-size: 12px; color: var(--wa-sub); }
.ordertext { margin: -2px -4px 6px -5px; padding: 9px 10px; border-radius: 7px; background: rgba(13,16,20,.045); font-size: 13.5px; line-height: 1.45; direction: ltr; text-align: left; border-left: 3px solid var(--ink); }

/* voice */
.voice { display: flex; align-items: center; gap: 9px; min-width: 240px; padding: 2px 0 2px; }
.voice .pl { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #54656F; flex: none; }
.voice .pl svg { width: 22px; height: 22px; }
.voice .wf { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; position: relative; }
.voice .wf i { flex: 1; background: #A7B3AD; border-radius: 2px; min-height: 3px; }
.voice .wf i.on { background: #2B7A55; }
.voice .face { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 650; font-size: 14px; position: relative; }
.voice .face::after { content: ""; position: absolute; right: -3px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #53BDEB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-2.1A7 7 0 0 0 19 12z' fill='%23fff'/%3E%3C/svg%3E") center / 10px no-repeat; }
.voice-dur { font-size: 11px; color: var(--wa-sub); margin-left: 44px; margin-top: -2px; }
.heard { display: block; margin-bottom: 6px; padding: 6px 8px; border-left: 3px solid #A7B3AD; background: rgba(13,16,20,.04); border-radius: 4px; font-size: 13.5px; color: var(--ink-2); }
.heard .mk { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--wa-sub); margin-bottom: 2px; }

/* photo */
.photo { margin: -4px -6px 4px -7px; border-radius: 7px; overflow: hidden; line-height: 0; width: 248px; max-width: 100%; }
.photo svg { width: 100%; height: auto; display: block; }

/* composer */
.composer { flex: none; background: var(--wa-bar); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); position: relative; z-index: 2; min-height: 64px; }
.c-hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--wa-sub); padding: 0 6px 6px; display: flex; justify-content: space-between; }
.c-row { display: flex; align-items: flex-end; gap: 7px; }
.c-in { flex: 1; min-height: 44px; background: #fff; border-radius: 22px; display: flex; align-items: center; padding: 10px 16px; font-size: 15.5px; line-height: 1.3; color: #8696A0; text-align: left; }
.c-in.ready { color: var(--wa-text); box-shadow: 0 0 0 2px rgba(23,92,255,.22); }
.c-in .ph-ic { width: 22px; height: 22px; margin-right: 8px; flex: none; color: #54656F; }
.c-go { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.c-go svg { width: 21px; height: 21px; }
.c-go.ready { background: var(--cobalt); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(23,92,255,.35); } 50% { box-shadow: 0 0 0 7px rgba(23,92,255,0); } }
.c-next { width: 100%; min-height: 48px; border-radius: 24px; background: var(--ink); color: var(--ground); display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 18px; font-size: 15px; font-weight: 600; text-align: left; gap: 10px; }
.c-next small { display: block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: #A9ADB5; margin-bottom: 1px; }
.c-next .ar-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--cobalt); display: grid; place-items: center; flex: none; }
.c-next .ar-ic svg { width: 16px; height: 16px; }
.c-wait { min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--wa-sub); text-align: center; padding: 0 12px; }

/* sheet (scenes on phone, evidence page) */
.scrim { position: absolute; inset: 0; background: rgba(11,20,26,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 8; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; background: var(--ground); border-radius: 16px 16px 0 0; z-index: 9; transform: translateY(102%); transition: transform .32s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; color: var(--ink); }
.sheet.on { transform: none; }
.sh-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 18px; border-bottom: 1px solid var(--rule); }
.sh-top .url { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-top .ttl { flex: 1; font-weight: 650; font-size: 16px; }
.sh-x { width: 34px; height: 34px; border-radius: 50%; background: #E6E4DE; display: grid; place-items: center; flex: none; }
.sh-x svg { width: 14px; height: 14px; }
.sh-body { overflow-y: auto; padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); }
.sh-body .behind { display: block; }
.sheet .scenes { border-top: 0; }

/* tap ring used in recordings */
.tapring { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(13,16,20,.18); box-shadow: 0 0 0 2px rgba(255,255,255,.7); pointer-events: none; z-index: 20; animation: tap .5s ease-out forwards; }
@keyframes tap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

.instant, .instant * { animation: none !important; transition: none !important; }

/* ---------- mid widths: behind panel moves under intro ---------- */
@media (max-width: 1240px) {
  .stage { grid-template-columns: minmax(280px, 380px) auto; grid-template-areas: "intro device" "behind device"; gap: 28px 48px; align-content: center; }
  .stage { align-items: start; align-content: start; padding-top: 24px; }
  .intro { align-self: start; }
  .behind { align-self: start; max-width: 380px; padding-bottom: 40px; }
  .device { grid-row: 1 / span 2; align-self: start; position: sticky; top: 24px; }
  .intro h1 { font-size: 34px; }
  .brand { margin-bottom: 22px; }
}
@media (max-width: 1240px) and (max-height: 900px) {
  .lede { display: none; }
}

/* ---------- phones: the chat is the page ---------- */
@media (max-width: 860px) {
  html, body { height: 100%; overflow: hidden; background: var(--wa-head); }
  .stage { display: block; padding: 0; min-height: 0; height: 100%; }
  .intro, .behind { display: none; }
  .device { height: 100%; }
  .phone { --h: 100%; height: 100%; height: 100dvh; width: 100%; min-width: 0; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
  .head { padding-top: calc(6px + env(safe-area-inset-top)); }
  .sh-body .behind { display: block; }
}
@media (max-width: 360px) {
  .who small { font-size: 11.5px; }
  .bub { font-size: 14.5px; }
  .msg { max-width: 90%; }
  .voice { min-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 1800px) and (min-height: 1100px) { .stage { zoom: 1.3; min-height: calc(100vh / 1.3); } .phone { --h: min(844px, calc(100vh / 1.3 - 48px)); } }
