/* Layout: one-column phone app — header, tabbed queue of people, bottom nav; recording happens in a full-height sheet.
   Colours and fonts come from the account's theme (accounts/{id}.theme), injected as tokens in #theme by js/theme.js.
   Anything a theme leaves out is derived here from --bg, --ink and --accent.
   The Ohayo look adds rice paper (--paper), washi tape ([data-tape]) and highlighter buttons ([data-marker]); see the end of this file. */
:root {
  --bg: #F2EDE4;
  --ink: #231B17;
  --accent: #3D4C7A;
  --accent-ink: #FFFFFF;
  --surface: color-mix(in srgb, var(--bg) 35%, #FFFFFF);
  --muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 13%, var(--bg));
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--bg));
  --accent-text: color-mix(in srgb, var(--accent) 70%, var(--ink));
  --good: color-mix(in srgb, var(--ink) 80%, var(--bg));
  --good-soft: color-mix(in srgb, var(--ink) 9%, var(--bg));
  --danger: #9B3B32;
  --logo-1: var(--ink);
  --logo-2: var(--accent);
  --paper: none;
  --shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent), 0 8px 24px color-mix(in srgb, var(--ink) 7%, transparent);
  --font-display: 'Klee One', system-ui, sans-serif;
  --display-weight: 600;
  --font-body: 'Mulish', system-ui, sans-serif;
  --r: 6px;
  --r-btn: 2px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a, .card { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { max-width: 480px; margin: 0 auto; min-height: 100%; padding: 0 16px calc(104px + env(safe-area-inset-bottom, 0px)); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 22px 8px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; }
.logo svg, .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wm { font-family: var(--font-display); font-weight: var(--display-weight, 400); text-transform: uppercase; letter-spacing: .3em; font-size: 14px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 34px; line-height: 1.15; margin: 22px 0 2px; }
.greet { color: var(--muted); font-size: 14px; margin: 0; letter-spacing: .01em; }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-btn); padding: 8px 14px; font-size: 13px; white-space: nowrap; }

/* Proto banner */
.proto { font-size: 13px; color: var(--accent-text); background: var(--accent-soft); border-radius: var(--r); padding: 9px 12px; margin: 18px 0 16px; }

/* Segmented tabs */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: transparent; border-radius: 3px; padding: 9px 4px; font-size: 14px; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.seg .n { font-variant-numeric: lining-nums tabular-nums; opacity: .7; margin-left: 5px; }

/* Cards */
.list { display: flex; flex-direction: column; gap: 10px; }
.swipe { position: relative; border-radius: var(--r); overflow: hidden; }
.swipe-bg { position: absolute; inset: 0; display: flex; align-items: stretch; justify-content: flex-end; background: var(--bg); border-radius: var(--r); overflow: hidden; }
.swipe-bg button { width: 84px; border: 0; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.swipe-bg button.del { background: var(--danger); color: #fff; }
.card { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 14px; touch-action: pan-y; transition: transform .2s ease; }
.card.dragging { transition: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.who { min-width: 0; }
.name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 11.5px; padding: 2px 7px; border-radius: 2px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.on { background: var(--good-soft); color: var(--good); border-color: transparent; }
.hint { color: var(--muted); font-size: 12.5px; text-align: center; padding: 6px 0 2px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h3 { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 28px; line-height: 1.2; color: var(--ink); margin: 0 0 8px; }
.empty p { margin: 0 auto; max-width: 30em; }

/* Bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 5; }
.nav-in { max-width: 448px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.nav button { border: 0; background: transparent; border-radius: var(--r); padding: 10px 6px; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.nav button[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: inline-grid; place-items: center; font-variant-numeric: lining-nums tabular-nums; }
.dot[hidden] { display: none; }

/* Sheet */
.sheet { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet-in { max-width: 480px; margin: 0 auto; padding: 0 16px 32px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 18px; }
.person-head { text-align: center; padding-block: 8px 18px; }
.person-head .avatar { width: 64px; height: 64px; font-size: 21px; margin: 0 auto 12px; }
.person-head h2 { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 32px; line-height: 1.15; margin: 0; text-wrap: balance; }
.person-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.frame { position: relative; aspect-ratio: 9 / 14; max-width: 100%; max-height: 56vh; margin: 0 auto; border-radius: var(--r); overflow: hidden; background: #1E0D17; display: grid; place-items: center; }
.frame video { width: 100%; height: 100%; object-fit: cover; transition: filter .3s ease; }
.frame video.mirror { transform: scaleX(-1); }
.frame video.glow { filter: brightness(1.07) saturate(1.1) contrast(.94) blur(.3px); }
.frame-empty { color: #D9CFC6; text-align: center; padding: 24px; font-size: 14px; }
.frame-empty .ring { width: 92px; height: 92px; border-radius: 50%; border: 1px dashed #8E7A86; margin: 0 auto 14px; display: grid; place-items: center; font-family: var(--font-display); font-size: 32px; color: #F3EFEA; }
.prompter { position: absolute; left: 0; right: 0; top: 0; max-height: 48%; overflow-y: auto; overscroll-behavior: contain; padding: 44px 18px 28px; background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,.38) 75%, transparent); color: rgba(255,255,255,.88); font-size: var(--ps, 22px); line-height: 1.45; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.5); white-space: pre-wrap; scrollbar-width: none; z-index: 1; }
.prompter::-webkit-scrollbar { display: none; }
.script-edit { margin-bottom: 14px; }
.timer { z-index: 2; position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; font-variant-numeric: lining-nums tabular-nums; display: flex; align-items: center; gap: 6px; }
.timer.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }
.timer.low { background: #B4232A; }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { border: 0; border-radius: var(--r-btn); padding: 15px 18px; font-size: 16px; font-weight: 500; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-soft { background: var(--surface); border: 1px solid var(--line); font-weight: 400; }
.btn-danger { background: var(--surface); border: 1px solid var(--line); color: var(--danger); font-weight: 400; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.stop-sq { width: 12px; height: 12px; border-radius: 2px; background: currentColor; }
.linkish { background: none; border: 0; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.err { color: var(--danger); font-size: 14px; text-align: center; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 2px; padding: 7px 14px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 0; }

.label { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }

/* Email + watch preview: recipient-facing paper, fixed light by design, styled per product (not per account) */
.paper { background: #FFFFFF; color: #24252B; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; font-family: Arial, Helvetica, sans-serif; }
.mail-meta { font-size: 12.5px; color: #6A6D7A; padding: 12px 16px; border-bottom: 1px solid #ECEDF1; background: #FAFAFB; overflow-wrap: anywhere; line-height: 1.5; }
.mail-meta b { color: #24252B; font-weight: 600; }
.mail-body { padding: 28px 22px 26px; }
.mail-logo { font-family: Georgia, serif; font-size: 26px; margin-bottom: 22px; }
.mail-body p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: #34353C; }
.thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%; margin: 20px 0 18px; }
.thumb img, .thumb .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { display: grid; place-items: center; font-family: Georgia, serif; font-size: 64px; color: rgba(255,255,255,.9); }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.play span::after { content: ""; border-left: 20px solid #24252B; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.gif-tag { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; }
.sig { font-family: Georgia, serif; font-size: 22px; color: #24252B; margin-top: 6px; }
.mail-foot { font-size: 11.5px; color: #8A8D98; padding: 14px 22px 20px; border-top: 1px solid #ECEDF1; line-height: 1.6; }
.mail-foot u { color: #6A6D7A; }
.paper .credit { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px 16px; font-size: 12px; color: #8A8D98; }
.paper .credit svg { width: 22px; height: 12px; --logo-line: #3D4C7A; }
.watch { padding: 30px 22px 28px; text-align: center; }
.watch h3 { font-family: Georgia, serif; font-weight: 400; font-size: 30px; line-height: 1.15; margin: 14px 0 6px; color: #24252B; text-wrap: balance; }
.watch .sub { color: #6A6D7A; font-size: 14px; margin-bottom: 22px; }
.watch .thumb { margin: 0 auto 22px; max-width: 300px; }
.cta { display: inline-block; border-radius: 999px; padding: 13px 26px; font-weight: 700; color: #fff; font-size: 15px; }
.watch .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cta.react-pv { background: #fff; border: 1.5px solid; padding: 11.5px 20px; }

.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; margin-bottom: 12px; }
.tabs2 button { border: 0; background: transparent; border-radius: 3px; padding: 8px; font-size: 14px; color: var(--muted); }
.tabs2 button[aria-selected="true"] { background: var(--bg); color: var(--ink); }

/* Timeline (sent person) */
.timeline { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; }
.tl { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl:last-child { border-bottom: 0; }
.tl i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--muted); }
.tl.on i { background: var(--accent); border-color: var(--accent); }
.tl small { color: var(--muted); font-size: 13px; font-variant-numeric: lining-nums tabular-nums; }

/* Report + brand pages */
.h-page { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 34px; line-height: 1.15; margin: 6px 0 4px; }
.lead { color: var(--muted); font-size: 15px; margin: 6px 0 0; max-width: 32em; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; }
.funnel { display: flex; flex-direction: column; gap: 14px; }
.f-row { display: grid; grid-template-columns: 70px 1fr 80px; gap: 10px; align-items: center; font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--accent); }
.f-row .v { text-align: right; font-variant-numeric: lining-nums tabular-nums; color: var(--muted); font-size: 13px; }
.f-row .v strong { color: var(--ink); font-weight: 500; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .val { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 30px; line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.ret { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: lining-nums tabular-nums; }
.ret th { text-align: right; font-weight: 400; color: var(--muted); font-size: 12.5px; padding: 0 0 8px; }
.ret th:first-child, .ret td:first-child { text-align: left; }
.ret td { padding: 10px 0; border-top: 1px solid var(--line); text-align: right; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.small { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
textarea.csv { width: 100%; min-height: 140px; margin-top: 12px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; resize: vertical; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.field > span:first-child { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.field textarea { width: 100%; min-height: 96px; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-btn); padding: 11px 12px; font-size: 16px; line-height: 1.5; resize: vertical; }
.steps { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--ink); font-weight: 600; }
.steps code, .small code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); color: var(--accent-text); padding: 1px 5px; border-radius: 2px; }
.tags { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.7; }
.tags code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); color: var(--accent-text); padding: 1px 5px; border-radius: 2px; }
.preview-wrap { position: sticky; top: 0; }
.field input[type="text"], .field select { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-btn); padding: 11px 12px; font-size: 16px; }
.swatch-in { display: flex; align-items: center; gap: 12px; }
.swatch-in input[type="color"] { width: 48px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 2px; background: var(--bg); }
.swatch-in code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* A product's logo and font sample in Settings → Products. Shown on white, as in the email and watch page. */
.brand-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 6px; }
.font-sample { background: #fff; color: #34353C; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; line-height: 1.4; }
.logo.lg { width: 56px; height: 56px; }
.powered { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .01em; margin-top: 28px; }

/* Toast + notification */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); max-width: 448px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: var(--r); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 40; box-shadow: var(--shadow); font-size: 14px; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; }
.notif { position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); max-width: 456px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; z-index: 50; box-shadow: var(--shadow); text-align: left; width: auto; animation: drop .35s ease; }
.notif .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; padding: 6px; }
.notif .ic svg, .notif .ic img { width: 100%; height: 100%; object-fit: contain; }
.notif small { color: var(--muted); font-size: 12px; display: block; }
.notif b { font-weight: 500; font-size: 14px; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Real-app additions */
.frame canvas { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.frame canvas.mirrored, .frame video.mirrored { transform: none; }
.frame video.flip { transform: scaleX(-1); }
.makeup { margin-top: 12px; display: grid; gap: 10px; }
.makeup label { display: grid; grid-template-columns: 112px 1fr 2.2em; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.makeup .mk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.makeup #compare { touch-action: none; user-select: none; -webkit-user-select: none; }
.makeup output { font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }

/* Settings → Plan, and the upgrade prompt */
.plan-head { display: flex; align-items: center; gap: 10px; }
.plan-name { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 26px; line-height: 1.2; }
.pill.warn { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); border-color: transparent; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.meter-top span:last-child { color: var(--muted); }
.meter .bar { height: 6px; }
.meter .bar.over > div { background: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.plan-choice { border-top: 1px solid var(--line); padding-top: 14px; }
.row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-btns .btn { padding: 12px 10px; font-size: 15px; }
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.modal { position: relative; width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--r); padding: 28px 22px 20px; box-shadow: var(--shadow); --tape: #F6E2A2; --tape-x: calc(50% - 38px); }
.modal-title { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 26px; line-height: 1.2; margin: 0 0 10px; }
.modal p { margin: 0 0 18px; line-height: 1.5; }
.modal-btns { display: flex; flex-direction: column; gap: 6px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.makeup input[type="range"] { width: 100%; accent-color: var(--accent); }
.pill.draft { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.login { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px 16px; }
.login .logo { width: 64px; height: 64px; margin: 0 auto 18px; }
.login h1 { font-family: var(--font-display); font-weight: var(--display-weight, 400); font-size: 40px; line-height: 1.15; margin: 0 0 8px; }
.login p { color: var(--muted); max-width: 26em; margin: 0 auto 24px; }
.progress { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; background: var(--accent); transition: width .2s ease; }
.warn { color: var(--danger); font-size: 12.5px; }
.secret { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; overflow-wrap: anywhere; user-select: all; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.pill.warn-pill { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* ---------- The Ohayo look ---------- */
/* Rice paper: cards and panels are sheets of washi on a cream desk. --paper is none in dark mode. */
.card, .panel, .stat, .timeline, .login-note { background-image: var(--paper); background-size: 420px; background-position: center; }
:root[data-tape] .card, :root[data-tape] .panel, :root[data-tape] .stat, :root[data-tape] .timeline { border-color: color-mix(in srgb, var(--line) 70%, transparent); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent), 0 6px 16px color-mix(in srgb, var(--ink) 6%, transparent); }

/* Washi tape: a pastel strip across the top of each note. Torn ends, slightly see-through. */
:root[data-tape] .app { overflow-x: clip; }
:root[data-tape] .list { gap: 18px; padding-top: 8px; }
:root[data-tape] .swipe { overflow: visible; }
:root[data-tape] .swipe-bg { border-radius: var(--r); }
:root[data-tape] .card::before, :root[data-tape] .empty::before, :root[data-tape] .login-note::before, :root[data-tape] .modal::before {
  content: ""; position: absolute; top: -9px; left: var(--tape-x, 42%); width: 76px; height: 20px; z-index: 1; pointer-events: none;
  transform: rotate(var(--tape-r, -2.5deg)); background-color: var(--tape, #F9C8A4); opacity: .85; mix-blend-mode: multiply;
  clip-path: polygon(0 0, 3px 11%, 0 22%, 4px 33%, 1px 44%, 4px 56%, 0 67%, 3px 78%, 0 89%, 2px 100%, calc(100% - 3px) 100%, 100% 89%, calc(100% - 4px) 78%, 100% 67%, calc(100% - 2px) 56%, 100% 44%, calc(100% - 4px) 33%, 100% 22%, calc(100% - 2px) 11%, 100% 0);
}
:root[data-tape] .list > .swipe:nth-child(5n+1) .card { --tape: #F9C8A4; --tape-x: 40%; --tape-r: -2.5deg; }
:root[data-tape] .list > .swipe:nth-child(5n+2) .card { --tape: #BCC8E8; --tape-x: 64%; --tape-r: 3deg; }
:root[data-tape] .list > .swipe:nth-child(5n+3) .card { --tape: #CADBB4; --tape-x: 22%; --tape-r: -4deg; }
:root[data-tape] .list > .swipe:nth-child(5n+4) .card { --tape: #F3C6CF; --tape-x: 52%; --tape-r: 1.5deg; }
:root[data-tape] .list > .swipe:nth-child(5n) .card { --tape: #F6E2A2; --tape-x: 30%; --tape-r: -1.5deg; }
:root[data-tape] .list > .swipe:nth-child(5n+2) .card::before { background-image: radial-gradient(rgba(255,255,255,.75) 1.5px, transparent 1.8px); background-size: 9px 9px; }
:root[data-tape] .list > .swipe:nth-child(5n+3) .card::before { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 4px, transparent 4px 11px); }
:root[data-tape] .list > .swipe:nth-child(5n) .card::before { background-image: radial-gradient(circle at 50% 55%, rgba(245,154,74,.55) 2.6px, transparent 3px); background-size: 15px 20px; }
:root[data-tape] .empty { position: relative; margin-top: 18px; background: var(--surface) var(--paper) center / 420px; border-radius: var(--r); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent), 0 6px 16px color-mix(in srgb, var(--ink) 6%, transparent); --tape: #BCC8E8; --tape-x: calc(50% - 38px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-tape] :is(.card, .empty, .login-note, .modal)::before { mix-blend-mode: normal; opacity: .55; } }
:root[data-theme="dark"][data-tape] :is(.card, .empty, .login-note, .modal)::before { mix-blend-mode: normal; opacity: .55; }

/* Sign-in: the logo on a taped note */
.login-note { position: relative; max-width: 340px; margin: 0 auto; padding: 44px 24px 30px; background-color: var(--surface); border-radius: var(--r); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent), 0 10px 28px color-mix(in srgb, var(--ink) 8%, transparent); --tape: #F9C8A4; --tape-x: calc(50% - 38px); }
.login h1.login-logo { margin: 0 auto 18px; width: 180px; line-height: 0; }
.login-logo svg { width: 100%; height: auto; display: block; }

/* Highlighter buttons: the label sits on a pastel marker stroke with rough ends, like a highlighted word. */
:root[data-marker] :is(.btn, .btn-ghost) { position: relative; isolation: isolate; background: none; border: 0; box-shadow: none; color: var(--hl-ink, var(--ink)); }
:root[data-marker] :is(.btn, .btn-ghost)::before { content: ""; position: absolute; z-index: -1; left: 6px; right: 4px; top: 22%; bottom: 14%; background: var(--hl, #BCC8E8); opacity: .85; mix-blend-mode: multiply;
  border-radius: 3px 10px 4px 12px / 10px 4px 12px 3px; transform: rotate(-1.2deg) skewX(-8deg); clip-path: polygon(1.5% 8%, 98.5% 0, 100% 30%, 97.5% 62%, 99% 100%, 2.5% 94%, 0 70%, 1.5% 38%); }
:root[data-marker] .btn-primary { --hl: #BCC8E8; --hl-ink: var(--accent); font-weight: 600; }
:root[data-marker] .btn-dark { --hl: #F6E2A2; font-weight: 600; }
:root[data-marker] .btn-soft { color: var(--muted); font-weight: 500; }
:root[data-marker] :is(.btn-soft, .btn-danger)::before { display: none; }
:root[data-marker] .btn-danger { --hl-ink: var(--danger); font-weight: 500; }
:root[data-marker] .btn-ghost { --hl: #F9C8A4; font-weight: 600; padding: 7px 12px; }
:root[data-marker] :is(.btn, .btn-ghost):active::before { opacity: 1; }
:root[data-marker] :is(.btn, .btn-ghost):disabled { opacity: .5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-marker] :is(.btn, .btn-ghost)::before { mix-blend-mode: normal; opacity: .3; } :root:not([data-theme="light"])[data-marker] :is(.btn, .btn-ghost) { --hl-ink: var(--ink); } }
:root[data-theme="dark"][data-marker] :is(.btn, .btn-ghost)::before { mix-blend-mode: normal; opacity: .3; }
:root[data-theme="dark"][data-marker] :is(.btn, .btn-ghost) { --hl-ink: var(--ink); }
:root[data-marker] .actions > .btn::before, :root[data-marker] .login-note .btn::before { left: 18%; right: 18%; }
:root[data-marker] .login-note .btn::before { left: 4px; right: 2px; }
:root[data-marker] .seg button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-marker] .btn-danger { --hl-ink: var(--danger); } }
:root[data-theme="dark"][data-marker] .btn-danger { --hl-ink: var(--danger); }

/* Filter chips: plain words; the chosen one gets the highlighter stroke. */
:root[data-marker] .filters { gap: 2px; margin: 12px 0 4px; }
:root[data-marker] .chip { position: relative; isolation: isolate; border: 0; background: none; color: var(--muted); padding: 6px 10px; }
:root[data-marker] .chip[aria-pressed="true"] { background: none; color: var(--accent-text); font-weight: 600; }
:root[data-marker] .chip[aria-pressed="true"]::before { content: ""; position: absolute; z-index: -1; left: 4px; right: 3px; top: 26%; bottom: 16%; background: #BCC8E8; opacity: .85; mix-blend-mode: multiply;
  border-radius: 3px 8px 4px 9px / 8px 4px 9px 3px; transform: rotate(-1.2deg) skewX(-8deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-marker] .chip[aria-pressed="true"]::before { mix-blend-mode: normal; opacity: .3; } }
:root[data-theme="dark"][data-marker] .chip[aria-pressed="true"]::before { mix-blend-mode: normal; opacity: .3; }

/* Repeat signups and reactions */
.hist { color: var(--accent-text); font-size: 12px; line-height: 1.4; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-head .hist { white-space: normal; margin: 4px 0 0; font-size: 13px; }
.emo { font-size: 1.15em; line-height: 1; margin-left: 4px; }
.said { color: var(--muted); font-style: normal; margin-left: 6px; overflow-wrap: anywhere; }
.reacts { display: flex; flex-direction: column; }
.react-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; padding: 11px 0; }
.react-row:first-child { border-top: 0; padding-top: 0; }
.r-said { font-size: 15px; color: var(--ink); }
.r-said .emo { margin-left: 0; font-size: 22px; }
.r-said .said { color: var(--ink); }
.r-who { font-size: 12.5px; color: var(--muted); }

/* Renaming someone on their page */
.person-head .greets { margin: 2px 0 2px; font-size: 13px; color: var(--muted); }
.person-head .greets .linkish { font-size: 13px; padding: 0 2px; }
.rename { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 4px 0 6px; }
.rename input { flex: 1 1 200px; max-width: 280px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-btn); padding: 10px 12px; font: 20px/1.3 var(--font-display); text-align: center; color: var(--ink); }
.person-head .their-note { margin: 10px auto 0; max-width: 30em; font-size: 15px; color: var(--ink); background: var(--accent-soft); border-radius: var(--r); padding: 10px 14px; }
:root[data-marker] .panel.form > .btn::before { left: 26%; right: 26%; }
