@font-face{font-family:"UnifrakturCook";font-weight:700;font-style:normal;font-display:swap;src:url(fonts/unifraktur-700.woff2) format("woff2");}
@font-face{font-family:"Playfair Display";font-weight:700;font-style:normal;font-display:swap;src:url(fonts/playfair-700.woff2) format("woff2");}
@font-face{font-family:"Playfair Display";font-weight:900;font-style:normal;font-display:swap;src:url(fonts/playfair-900.woff2) format("woff2");}
@font-face{font-family:"Source Serif 4";font-weight:400;font-style:normal;font-display:swap;src:url(fonts/serif4-400.woff2) format("woff2");}
@font-face{font-family:"Source Serif 4";font-weight:400;font-style:italic;font-display:swap;src:url(fonts/serif4-400i.woff2) format("woff2");}
@font-face{font-family:"Source Serif 4";font-weight:600;font-style:normal;font-display:swap;src:url(fonts/serif4-600.woff2) format("woff2");}
@font-face{font-family:"Inter";font-weight:400;font-style:normal;font-display:swap;src:url(fonts/inter-400.woff2) format("woff2");}
@font-face{font-family:"Inter";font-weight:600;font-style:normal;font-display:swap;src:url(fonts/inter-600.woff2) format("woff2");}
@font-face{font-family:"IBM Plex Mono";font-weight:400;font-style:normal;font-display:swap;src:url(fonts/plexmono-400.woff2) format("woff2");}

/* Layout: a working phone on a kitchen table. Desktop: the phone plus a short side card. Phone: the app fills the screen. */
:root {
  --table: #DCD3C0; --paper: #F4EFE4; --paper-2: #EAE3D2; --ink: #1A1814; --ink-2: #4E4840; --rule: #B9AF9B;
  --accent: #B3261E; --accent-2: #1F5F8B; --highlight: #F2C94C; --ok: #2E6B3E; --focus: #1F5F8B; --on-accent: #FFFFFF;
  --photo: #FFFFFF; --device: #2A2620; --led: #E5322B; --green: #2F8F4E;
  --np: #EDE6D3; --np-ink: #1C1915; --np-ink-2: #4A443A; --np-rule: #1C1915;
  --font-masthead: "UnifrakturCook", "Playfair Display", Georgia, serif;
  --font-headline: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --table: #0D0C09; --paper: #16140F; --paper-2: #221E16; --ink: #F2EDE2; --ink-2: #B8B0A2; --rule: #3B352B;
  --accent: #FF6B5E; --accent-2: #7FB8E6; --highlight: #D9A520; --ok: #7FD39A; --focus: #7FB8E6; --on-accent: #1A1814;
  --photo: #F2EDE2; --device: #000000; --led: #FF5A4F; --green: #5FCB83; color-scheme: dark; } }
:root[data-theme="dark"] {
  --table: #0D0C09; --paper: #16140F; --paper-2: #221E16; --ink: #F2EDE2; --ink-2: #B8B0A2; --rule: #3B352B;
  --accent: #FF6B5E; --accent-2: #7FB8E6; --highlight: #D9A520; --ok: #7FD39A; --focus: #7FB8E6; --on-accent: #1A1814;
  --photo: #F2EDE2; --device: #000000; --led: #FF5A4F; --green: #5FCB83; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--table); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.45; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-headline); margin: 0; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 3px; padding: 10px; width: 100%; min-height: 44px; }
textarea { min-height: 84px; resize: vertical; }
label.lbl { font-size: 0.8rem; font-weight: 600; display: block; margin-bottom: 3px; }

.stage { min-height: 100%; display: flex; gap: 36px; justify-content: center; align-items: center; padding-block: 20px; padding-inline: 16px; }
.device { width: 390px; max-width: 100%; height: min(844px, calc(100dvh - 40px)); min-height: 560px; border: 10px solid var(--device); border-radius: 38px; overflow: hidden; position: relative; background: var(--paper); box-shadow: 0 20px 50px rgba(0,0,0,.35); flex: none; }
.side { width: 320px; display: flex; flex-direction: column; gap: 14px; }
.side h1 { font-family: var(--font-masthead); font-size: 2.6rem; font-weight: 700; }
.side .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.side p { color: var(--ink-2); font-size: 0.95rem; }
.side .btns { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 781px) { .stage { padding-block: 40px 50vh; align-items: flex-start; } .side { position: sticky; top: 24px; } }
@media (max-width: 780px) {
  html, body { height: auto; }
  .stage { flex-direction: column; align-items: stretch; gap: 18px; padding-block: 18px 60vh; padding-inline: 16px; min-height: 0; }
  .side { order: -1; width: 100%; }
  .side h1 { font-size: 2.3rem; }
  .device { width: 100%; height: min(760px, calc(100dvh - 40px)); min-height: 560px; border-width: 8px; border-radius: 30px; }
}

.app { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 6px; min-height: 48px; border-bottom: 1px solid transparent; }
.bar .back { background: none; border: 0; padding: 8px 6px; font-weight: 600; color: var(--accent-2); cursor: pointer; min-height: 40px; }
.bar .ttl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); flex: 1; text-align: center; }
.pill { border: 1.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 11px; font-size: 0.78rem; font-weight: 600; cursor: pointer; min-height: 32px; }
.scr { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 16px 24px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.tabs { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); border-top: 1px solid var(--rule); background: var(--paper-2); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs button { background: none; border: 0; padding: 7px 2px 9px; font-size: 0.68rem; font-weight: 600; color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; }
.tabs button[aria-current="page"] { color: var(--accent); }
.tabs svg { width: 22px; height: 22px; }
.tabs .dot { position: relative; }
.tabs .dot::after { content: ""; position: absolute; top: -2px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--led); }

.title { font-family: var(--font-headline); font-weight: 900; font-size: 1.85rem; }
.dateline { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sub { font-size: 0.92rem; color: var(--ink-2); }
.k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.card { border: 1px solid var(--rule); background: var(--paper-2); padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; color: var(--ink); }
button.card { cursor: pointer; font: inherit; }
button.card:hover { border-color: var(--ink-2); }
.card .t { font-weight: 600; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.pair { display: flex; gap: 8px; flex-wrap: wrap; }
.pair > * { flex: 1 1 120px; }
.btn { font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; min-height: 46px; padding: 10px 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 4px; cursor: pointer; text-align: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.quiet { border-color: var(--rule); color: var(--ink-2); }
.btn.big { min-height: 54px; font-size: 1.02rem; }
.btn.small { min-height: 36px; padding: 6px 10px; font-size: 0.85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.demo { border: 1.5px dashed var(--accent-2); color: var(--accent-2); background: transparent; border-radius: 4px; padding: 8px 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; min-height: 40px; }
.demo::before { content: "DEMO · "; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .08em; }
.end { text-align: center; font-family: var(--font-body); font-style: italic; color: var(--ink-2); padding: 12px 0 2px; border-top: 1px solid var(--rule); margin-top: 4px; }
.caption { background: var(--paper-2); border-left: 4px solid var(--accent); padding: 9px 11px; font-size: 0.88rem; display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.caption button { background: none; border: 0; color: var(--ink-2); cursor: pointer; font-size: 0.8rem; padding: 0 2px; min-height: 28px; }
.switch { width: 46px; height: 26px; border-radius: 13px; background: var(--rule); position: relative; flex: none; border: 0; cursor: pointer; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"]::after { left: 23px; }
.chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--font-mono); font-size: 0.72rem; border: 1.5px solid var(--ink); background: transparent; padding: 4px 9px; border-radius: 2px; cursor: pointer; color: var(--ink); min-height: 30px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: var(--paper); padding: 8px 4px; font-weight: 600; font-size: 0.85rem; cursor: pointer; min-height: 40px; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.preview { border: 2px solid var(--ink); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.preview .r { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 0.86rem; border-bottom: 1px dotted var(--rule); padding: 3px 0; }
.preview .r span:last-child { font-family: var(--font-mono); font-size: 0.72rem; text-align: right; }
.sticky { background: var(--highlight); color: #1A1814; padding: 13px 14px; font-family: var(--font-body); box-shadow: 2px 3px 0 rgba(0,0,0,.18); transform: rotate(-1deg); display: flex; flex-direction: column; gap: 3px; text-align: left; border: 0; cursor: pointer; width: 100%; }
.sticky .magnet { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); align-self: center; margin-top: -21px; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.sticky .k { color: #4A443A; }
.sticky.alt { transform: rotate(1deg); background: #F6D98A; }
.invite { background: var(--paper-2); border: 1px solid var(--rule); box-shadow: 3px 3px 0 var(--rule); padding: 16px 14px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.invite .h { font-family: var(--font-headline); font-weight: 700; font-size: 1.35rem; padding-right: 90px; }
.mono { font-family: var(--font-mono); font-size: 0.8rem; }
.stamp { position: absolute; right: 10px; top: 12px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .12em; border: 2px solid var(--accent); color: var(--accent); padding: 2px 6px; transform: rotate(-8deg); text-transform: uppercase; background: transparent; }
.stamp.ok { border-color: var(--ok); color: var(--ok); }
.stamp.blue { border-color: var(--accent-2); color: var(--accent-2); }

.envelope { border: 1px solid var(--rule); background: var(--paper-2); padding: 20px 14px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.envelope .flap { width: 100%; height: 0; border-top: 34px solid var(--rule); border-left: 80px solid transparent; border-right: 80px solid transparent; opacity: .75; }
.envelope .seal { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); margin-top: -18px; border: 2px solid var(--paper-2); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.thumb { background: var(--photo); padding: 4px 4px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.3); border: 0; cursor: pointer; position: relative; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumb .pend { position: absolute; left: 4px; right: 4px; bottom: 0; font-family: var(--font-mono); font-size: 0.55rem; color: #4E4840; text-align: center; }

.paper { background: var(--np); color: var(--np-ink); font-family: var(--font-body); padding: 10px 12px 10px; box-shadow: 0 1px 3px rgba(0,0,0,.3), inset 0 0 40px rgba(60,40,10,.08); background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 3px 3px; }
.paper button { color: var(--np-ink); }
.masthead { text-align: center; }
.ears { display: flex; justify-content: space-between; font-size: 0.66rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--np-rule); padding-bottom: 2px; }
.ears b { display: block; font-size: 0.8rem; }
.mast { font-family: var(--font-masthead); font-weight: 700; font-size: 2.3rem; line-height: 1.05; padding: 6px 0 2px; }
.rule2 { border-top: 3px solid var(--np-rule); border-bottom: 1px solid var(--np-rule); height: 2px; margin: 4px 0; }
.rule2.thin { border-top-width: 1px; height: 1px; }
.dbar { display: flex; justify-content: space-between; gap: 6px; font-size: 0.68rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 0; }
.psec { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--np-rule); margin: 8px 0 2px; }
.psec button { background: transparent; border: 0; padding: 6px; font-family: var(--font-headline); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 0.8rem; cursor: pointer; min-height: 38px; }
.psec button[aria-pressed="true"] { background: var(--np-ink); color: var(--np) !important; }
.band { background: var(--np-ink); color: var(--np); font-family: var(--font-headline); font-weight: 900; font-size: 0.92rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 3px 6px; margin-top: 10px; }
.subhead { font-weight: 700; font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; border-top: 1px solid var(--np-rule); border-bottom: 1px solid var(--np-rule); padding: 2px 0; margin: 8px 0 2px; }
.headline { font-family: var(--font-headline); font-weight: 900; font-size: 1.4rem; line-height: 1.12; margin-top: 8px; }
.deck { font-size: 0.88rem; font-style: italic; border-bottom: 1px solid var(--np-rule); padding-bottom: 6px; margin-top: 3px; }
.story { font-size: 0.9rem; line-height: 1.4; margin-top: 6px; }
.story::first-letter { font-family: var(--font-headline); font-weight: 900; font-size: 2.6rem; float: left; line-height: .9; padding: 3px 5px 0 0; }
.cl { font-size: 0.92rem; line-height: 1.34; padding: 7px 0; border-bottom: 1px dotted var(--np-ink-2); }
.cl b { font-weight: 700; text-transform: uppercase; }
.cl .box { display: inline-block; margin-top: 4px; font-size: 0.76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-body); min-height: 30px; }
.cl .box::after { content: " \25B8"; text-decoration: none; }
.cl .st { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase; margin-left: 8px; }
.cl.mine { background: rgba(242,201,76,.35); padding-inline: 6px; }
.adbox { border: 2px solid var(--np-rule); outline: 1px solid var(--np-rule); outline-offset: 2px; padding: 9px 10px; margin: 10px 2px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.adbox .h { font-family: var(--font-headline); font-weight: 900; font-size: 1.08rem; text-transform: uppercase; letter-spacing: .04em; }
.adbox .s { font-size: 0.8rem; font-style: italic; }
.folio { display: flex; justify-content: space-between; font-size: 0.64rem; text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid var(--np-rule); margin-top: 10px; padding-top: 3px; }
.halftone { aspect-ratio: 16/9; width: 100%; margin: 8px 0 2px; background-image: radial-gradient(circle, rgba(28,25,21,.5) 0.9px, transparent 1.1px), var(--ht); background-size: 3px 3px, cover; background-position: 0 0, center; filter: grayscale(1) contrast(1.15) brightness(1.05); }
.cutline { font-size: 0.72rem; font-style: italic; border-bottom: 1px solid var(--np-rule); padding-bottom: 4px; }

.machine { background: #2A2620; color: #F2EDE2; padding: 14px; border-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
.machine .head { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: .08em; text-transform: uppercase; }
.led { width: 11px; height: 11px; border-radius: 50%; background: #5A2A26; flex: none; }
.led.on { background: #E5322B; box-shadow: 0 0 8px #E5322B; animation: blink 1.6s steps(2, end) infinite; }
.led.rec { background: #E5322B; box-shadow: 0 0 8px #E5322B; }
@keyframes blink { 50% { opacity: .25; box-shadow: none; } }
.tape { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px; background: #3A352D; border-radius: 3px; font-size: 0.9rem; border: 0; color: #F2EDE2; cursor: pointer; text-align: left; width: 100%; min-height: 46px; }
.tape .n { font-family: var(--font-mono); color: #FFB347; }
.tape .len { font-family: var(--font-mono); font-size: 0.76rem; color: #CFC7B8; }
.tape.new .who::after { content: " · new"; color: #FFB347; font-family: var(--font-mono); font-size: 0.7rem; }
.cassette { background: #1D1B17; border: 2px solid #4A443A; border-radius: 6px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.reel { width: 42px; height: 42px; border-radius: 50%; border: 5px solid #CFC7B8; position: relative; background: #3A352D; }
.reel::before, .reel::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 5px; background: #CFC7B8; transform: translate(-50%, -50%); }
.reel::after { transform: translate(-50%, -50%) rotate(90deg); }
.reel i { position: absolute; inset: 0; }
.playing .reel { animation: spin 1.4s linear infinite; }
.playing .reel.r { animation-duration: 2s; }
@keyframes spin { to { transform: rotate(360deg); } }
.cassette .lab { font-family: var(--font-mono); font-size: 0.72rem; color: #CFC7B8; text-align: center; line-height: 1.35; }
.cassette .lab b { display: block; color: #F2EDE2; font-size: 0.86rem; }
.machine .btn { background: #F2EDE2; color: #1A1814; border-color: #F2EDE2; }
.machine .btn.primary { background: #E5322B; border-color: #E5322B; color: #fff; }

.layer { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--paper); }
.layer[hidden] { display: none !important; }
.dark { background: #15130F; color: #F2EDE2; }
.dark .sub { color: #CFC7B8; }
.dark .k { color: #CFC7B8; }
.dark .btn { background: #2A2620; color: #F2EDE2; border-color: #5A5448; }
.dark .btn.primary { background: #E5322B; border-color: #E5322B; color: #fff; }
.lhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 8px; }
.lhead button { background: none; border: 0; color: inherit; font-weight: 600; cursor: pointer; min-height: 40px; padding: 4px; }
.lbody { flex: 1; overflow-y: auto; padding: 4px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.lbody > * { flex-shrink: 0; }
.callwho { font-family: var(--font-headline); font-size: 2.2rem; font-weight: 700; text-align: center; }
.callvia { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; color: #CFC7B8; }
.callbtns { display: flex; justify-content: center; gap: 56px; }
.round { width: 72px; height: 72px; border-radius: 50%; border: 0; font-weight: 700; color: #fff; cursor: pointer; font-size: 0.8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.round.ok { background: #2E8B57; } .round.no { background: #C8322B; }
.round svg { width: 28px; height: 28px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.timer { font-family: var(--font-mono); font-size: 1rem; text-align: center; color: #CFC7B8; font-variant-numeric: tabular-nums; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(240px, 100%); margin: 0 auto; }
.board button { aspect-ratio: 1; border: 2px solid currentColor; background: transparent; font-family: var(--font-headline); font-weight: 900; font-size: 2rem; cursor: pointer; color: inherit; }
.livetext { border: 1px solid #4A443A; padding: 10px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 6px; background: #1D1B17; min-height: 120px; border-radius: 4px; }
.livetext .m { padding: 6px 9px; border-radius: 4px; background: #3A352D; max-width: 85%; }
.livetext .m.me { align-self: flex-end; background: #F2C94C; color: #1A1814; }
.livetext .m.sys { align-self: center; background: transparent; color: #CFC7B8; font-size: 0.78rem; font-style: italic; }
.dark input { background: #2A2620; color: #F2EDE2; border-color: #5A5448; }
.cardprompt { background: var(--np); color: var(--np-ink); padding: 20px 16px; font-family: var(--font-body); font-size: 1.2rem; text-align: center; box-shadow: 0 2px 0 #00000055; border: 1px solid #000; }

.clockscreen { background: var(--paper-2); }
.bigclock { font-family: var(--font-mono); font-size: 4.2rem; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.viewer { background: #000; color: #F2EDE2; }
.viewer .img { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer .img img { max-width: 100%; max-height: 100%; display: block; }
.viewer .wm { position: absolute; left: 12px; bottom: 12px; font-family: var(--font-mono); font-size: 0.75rem; opacity: .35; }
.viewer .date { position: absolute; right: 12px; bottom: 12px; font-family: var(--font-mono); color: #FFB347; font-size: 0.85rem; text-shadow: 0 0 2px #000; }
.viewer .acts { display: flex; justify-content: space-around; padding: 10px 6px 14px; gap: 6px; }
.viewer .acts button { background: none; border: 0; color: #F2EDE2; font-weight: 600; cursor: pointer; padding: 8px; min-height: 44px; }
.cam { background: #0E0D0A; color: #F2EDE2; }
.finder { flex: 1; position: relative; overflow: hidden; margin: 0 16px; border: 2px solid #3A352D; }
.finder img { width: 100%; height: 100%; object-fit: cover; animation: pan 9s ease-in-out infinite alternate; }
@keyframes pan { from { transform: scale(1.15) translate(-3%, -2%); } to { transform: scale(1.25) translate(3%, 2%); } }
.finder .corner { position: absolute; width: 24px; height: 24px; border: 2px solid #F2EDE2; opacity: .7; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.shutter { width: 74px; height: 74px; border-radius: 50%; background: #F2EDE2; border: 6px solid #5A5448; cursor: pointer; margin: 0 auto; display: block; }
.counter { font-family: var(--font-mono); font-size: 0.85rem; background: #3A352D; color: #FFB347; padding: 3px 8px; border-radius: 3px; }

.gl-word { background: var(--highlight); color: #1A1814; padding: 18px 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; box-shadow: 2px 3px 0 rgba(0,0,0,.18); }
.gl-word strong { font-family: var(--font-headline); font-size: 2.3rem; font-weight: 900; letter-spacing: .01em; }
.gl-on { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; }
.gl-on .bulb { width: 14px; height: 14px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.qr { display: grid; grid-template-columns: repeat(21, 1fr); width: 168px; aspect-ratio: 1; background: #fff; padding: 8px; gap: 0; margin: 0 auto; }
.qr i { background: #fff; } .qr i.b { background: #000; }

.sheetwrap { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheetwrap[hidden] { display: none !important; }
.sheet { background: var(--paper); width: 100%; max-height: 88%; overflow-y: auto; border-top: 3px solid var(--ink); padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto 4px; }
.radio { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; min-height: 42px; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; color: var(--ink); width: 100%; }
.radio span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.radio[aria-checked="true"] span { background: var(--accent); border-color: var(--accent); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.stamps button { border: 2px solid var(--ink); background: var(--paper); padding: 6px 2px; font-size: 0.68rem; font-weight: 600; cursor: pointer; min-height: 52px; line-height: 1.15; color: var(--ink); }
.stamps button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.toast { position: absolute; left: 14px; right: 14px; bottom: 76px; z-index: 60; background: var(--ink); color: var(--paper); padding: 11px 13px; font-size: 0.9rem; border-radius: 4px; box-shadow: 0 6px 16px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.welcome { background: var(--paper); }
.ov-card { border: 1px solid var(--rule); background: var(--paper-2); padding: 12px 13px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; text-align: left; cursor: pointer; width: 100%; color: var(--ink); font: inherit; }
.ov-card svg { width: 30px; height: 30px; color: var(--accent); }
.ov-card .t { font-weight: 700; }
.list .row { border-bottom: 1px solid var(--rule); min-height: 50px; padding: 4px 0; }
.list button.row { background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.mode { border: 2px solid var(--rule); padding: 11px 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.92rem; background: var(--paper); text-align: left; width: 100%; color: var(--ink); font-family: inherit; }
.mode[aria-checked="true"] { border-color: var(--ink); background: var(--paper-2); }
.mode .dotr { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); flex: none; margin-top: 2px; }
.mode[aria-checked="true"] .dotr { background: var(--accent); border-color: var(--accent); }
.inbox-item { border-bottom: 1px solid var(--rule); padding: 8px 0; display: flex; flex-direction: column; gap: 3px; }
@media (prefers-reduced-motion: reduce) { .led.on, .playing .reel, .pulse, .finder img { animation: none; } .flash.go { animation-duration: .01s; } .toast { transition: none; } }

/* Brings the design reference up to date with the app as built; added after the prototype's own styles. */
body.embedded .side {
  display: none;
}
body.embedded .stage {
  display: block;
  padding: 0;
  min-height: 0;
}
body.embedded .device {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.embedded {
  background: var(--paper);
}
.demo-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--highlight);
  color: #1a1814;
  padding: 1px 10px 2px;
  border-radius: 0 0 6px 6px;
  white-space: nowrap;
}
/* The Paper's sections and filter chips scroll sideways. */
.psec {
  display: flex;
  overflow-x: auto;
  grid-template-columns: none;
  scrollbar-width: thin;
}
.psec button {
  flex: 0 0 auto;
  padding-inline: 16px;
  white-space: nowrap;
}
.chipset {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  justify-content: flex-start !important;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.chip {
  flex: 0 0 auto;
  white-space: nowrap;
}
.yellow-note {
  border-left: 4px solid #e0b000;
  background: var(--paper-2);
  padding: 8px 10px;
  font-size: 0.88rem;
}
