/* PRIMA phone app: one app, three lights.
   house = Spotlight (every day) · stage = Center Stage (before sign-in) · night = Night Rehearsal
   Color meaning: pink = tap this / PRIMA is live · blush = the body · ink = her own words
   berry = care and help · cream = space. Never pink text on cream.
   Type meaning: Cormorant italic = PRIMA's voice · Anton = big moments · Archivo = UI · Space Mono = time/labels */

:root {
  --cream: #FFFFE9;
  --ink: #201A1D;
  --pink: #FA6AB3;
  --berry: #C43D80;
  --blush: #FCC9E1;

  --bg: #FFFFE9;
  --surface: #FFFFF7;
  --text: #201A1D;
  --muted: #5E5257;
  --line: #E7DDD3;
  --soft: #FDE4EF;          /* blush wash for body cards */
  --help: #C43D80;
  --help-text: #FFFFE9;
  --mine-bg: #201A1D;       /* her words */
  --mine-text: #FFFFE9;
  --on-pink: #201A1D;
  --shadow: 0 10px 30px rgba(32, 26, 29, 0.08);
  --veil: rgba(32, 26, 29, 0.38);
  --glow: transparent;

  --f-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --f-ui: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-voice: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --f-label: 'Space Mono', ui-monospace, Menlo, monospace;

  --pad: 20px;
  --tabbar: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

html[data-light="night"] {
  --bg: #201A1D;
  --surface: #2A2226;
  --text: #FFFFE9;
  --muted: #CBBFC4;
  --line: #3D3237;
  --soft: #3A2A32;
  --help: #E06BA6;
  --help-text: #201A1D;
  --mine-bg: #FFFFE9;
  --mine-text: #201A1D;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --veil: rgba(0, 0, 0, 0.55);
  --glow: radial-gradient(60% 45% at 50% 18%, rgba(250, 106, 179, 0.28), rgba(250, 106, 179, 0) 70%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--glow);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .4s ease, color .4s ease;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }

/* ── Type roles ── */
.label { font-family: var(--f-label); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.voice { font-family: var(--f-voice); font-style: italic; font-weight: 500; }
.display { font-family: var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; }
.hero-q { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: clamp(44px, 12.5vw, 60px); line-height: 1.02; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 17px; text-decoration: none; background: none;
  transition: transform .12s ease, background-color .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--pink); color: var(--on-pink); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-help { background: var(--help); color: var(--help-text); }
.btn-block { width: 100%; }
.btn svg { width: 22px; height: 22px; flex: none; }
.link { background: none; border: 0; padding: 10px 6px; min-height: 44px; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; font-size: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500;
}
.chip.on { background: var(--mine-bg); color: var(--mine-text); border-color: var(--mine-bg); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: none;
  display: inline-grid; place-items: center; color: var(--text);
}
.icon-btn svg { width: 24px; height: 24px; }

/* The help button: same place on every signed-in screen */
.help-btn {
  position: fixed; z-index: 30; top: calc(var(--safe-top) + 12px); right: 14px;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--help); color: var(--help-text);
  display: grid; place-items: center; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.help-btn svg { width: 20px; height: 20px; }

/* ── Shell: phone first ── */
.shell { min-height: 100%; }
.main {
  padding: calc(var(--safe-top) + 64px) var(--pad) calc(var(--safe-bottom) + var(--tabbar) + 28px);
  max-width: 560px; margin: 0 auto;
}
.rail { display: none; }
.tabbar {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  padding-bottom: var(--safe-bottom);
  background: var(--bg); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tab {
  min-height: var(--tabbar); background: none; border: 0; padding: 8px 0 6px;
  display: grid; justify-items: center; align-content: center; gap: 3px;
  color: var(--muted); font-size: 11.5px; font-weight: 500; text-decoration: none;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--text); }
.tab.on svg { color: var(--berry); }
html[data-light="night"] .tab.on svg { color: var(--pink); }

.topbar {
  position: fixed; z-index: 25; top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top) + 10px) 64px 10px var(--pad);
  display: flex; align-items: center; gap: 10px; min-height: calc(var(--safe-top) + 64px);
  background: linear-gradient(var(--bg) 75%, transparent);
}
.me-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  font-family: var(--f-display); font-size: 17px; display: grid; place-items: center; text-decoration: none; color: var(--text);
}
.wordmark { font-family: var(--f-display); font-size: 26px; letter-spacing: 0.02em; line-height: 1; }

/* ── Today ── */
.today { display: grid; gap: 28px; }
.today-head { display: grid; gap: 6px; padding-top: 8px; }
.today-head .greet { font-size: 19px; }
.today-sub { color: var(--muted); max-width: 32ch; margin-top: 4px; }
.today-main { display: grid; gap: 10px; }
.today-actions { display: grid; gap: 4px; justify-items: center; }
.today-side { display: grid; gap: 14px; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 22px; padding: 18px 20px; display: grid; gap: 12px; }
.card.mine { border-color: var(--text); }
.card-quote { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 24px; line-height: 1.2; }
.card-row { display: flex; flex-wrap: wrap; gap: 8px; }
.reset-pill {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px;
  padding: 10px 18px 10px 10px; border-radius: 999px; border: 0; background: var(--soft); text-align: left;
}
.reset-pill .play { width: 44px; height: 44px; border-radius: 50%; background: var(--pink); color: var(--on-pink); display: grid; place-items: center; flex: none; }
.reset-pill .play svg { width: 18px; height: 18px; }
.reset-pill b { font-weight: 600; display: block; }
.reset-pill small { color: var(--muted); font-size: 13px; }
.sticky-cta {
  position: fixed; z-index: 15; left: 0; right: 0; bottom: calc(var(--safe-bottom) + var(--tabbar));
  padding: 14px var(--pad) 6px; background: linear-gradient(transparent, var(--bg) 30%);
  display: grid; justify-items: center; gap: 0;
}
.sticky-cta .btn { width: 100%; max-width: 520px; }
.spacer-cta { height: 120px; }


/* Today's photo: the sunlit studio by day, the night studio by night. It fades into the page so words stay crisp. */
.today-photo {
  position: absolute; z-index: 0; top: 0; left: 0; right: 0; height: 52vh; pointer-events: none;
  background: url("/img/studio-morning.jpg") 70% 40% / cover no-repeat; opacity: 0.42;
  -webkit-mask-image: linear-gradient(#000 20%, transparent 100%); mask-image: linear-gradient(#000 20%, transparent 100%);
}
html[data-light="night"] .today-photo { background-image: url("/img/night-studio.jpg"); background-position: 50% 30%; opacity: 0.5; }
.shell > .main { position: relative; z-index: 1; }
@media (max-width: 899px) {
  .today-photo { background-image: url("/img/studio-phone.jpg"); background-position: 50% 72%; height: 60vh; opacity: 0.5;
    -webkit-mask-image: linear-gradient(#000 45%, transparent 100%); mask-image: linear-gradient(#000 45%, transparent 100%); }
  html[data-light="night"] .today-photo { background-image: url("/img/night-studio.jpg"); background-position: 50% 30%; height: 52vh; }
}

/* ── Center Stage as a daytime look (her choice) ── */
.stage-hero, .talk-banner { display: none; }
.sticker {
  position: absolute; right: 14px; bottom: 22px; z-index: 2;
  background: var(--cream); color: var(--ink); font-family: var(--f-display); text-transform: uppercase;
  font-size: 19px; letter-spacing: 0.02em; padding: 6px 12px 5px; transform: rotate(-7deg);
  box-shadow: 0 6px 16px rgba(32, 26, 29, 0.2);
}
html[data-look="stage"] .today-photo { display: none; }
html[data-look="stage"] .stage-hero {
  display: block; position: absolute; z-index: 0; top: 0; right: 0; width: 64%; height: min(54vh, 450px);
  background: #C94F8E url("/img/stage-shoulders.jpg") 50% 22% / cover no-repeat;
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
}
html[data-look="stage"] .hero-q {
  font-family: var(--f-display); font-style: normal; font-weight: 400; text-transform: uppercase;
  font-size: clamp(58px, 17.5vw, 84px); line-height: 0.9; letter-spacing: 0;
}
html[data-look="stage"] .today-sub { display: none; }
html[data-look="stage"] .topbar { background: none; }
html[data-look="stage"] .talk-banner {
  display: block; position: relative; height: 230px; margin: -8px calc(var(--pad) * -1) 6px;
  background: #C94F8E url("/img/stage-shoulders.jpg") 50% 28% / cover no-repeat;
}

/* First visit */
.first { display: grid; gap: 26px; text-align: center; justify-items: center; padding-top: 12px; }
.first .display { font-size: 52px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; justify-items: center; }
.steps li { display: grid; justify-items: center; gap: 8px; font-size: 16px; }
.steps li + li::before { content: ""; width: 1px; height: 26px; background: var(--line); margin-bottom: 4px; }
.dot-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.dot-ic svg { width: 24px; height: 24px; }
.dot-body { background: var(--soft); color: var(--berry); }
.dot-prima { background: var(--pink); color: var(--on-pink); font-family: var(--f-display); font-size: 22px; }
.dot-act { background: var(--mine-bg); color: var(--mine-text); }

/* ── Sheets and overlays ── */
.veil { position: fixed; inset: 0; z-index: 40; background: var(--veil); animation: fade .2s ease; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0;
  background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: var(--shadow);
  padding: 10px var(--pad) calc(var(--safe-bottom) + 20px);
  max-height: 88vh; overflow: auto; animation: rise .28s cubic-bezier(.2, .8, .2, 1);
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 18px; }
.sheet h2 { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 34px; line-height: 1.1; margin-bottom: 18px; }
.options { display: grid; gap: 10px; margin-bottom: 18px; }
.option {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 18px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-weight: 500;
}
.option svg { width: 26px; height: 26px; flex: none; }
.option.on { background: var(--mine-bg); color: var(--mine-text); border-color: var(--mine-bg); }
.sheet-foot { display: grid; gap: 4px; justify-items: center; }
.help-sheet .md ul { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 14px 0; }
.help-sheet .md li { overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); }
.help-sheet .md a { color: var(--text); font-weight: 700; }

.full {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); background-image: var(--glow);
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow: auto;
  padding: calc(var(--safe-top) + 10px) var(--pad) calc(var(--safe-bottom) + 20px);
  animation: fade .25s ease;
}
.full-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding-right: 50px; }

/* Body reset */
.reset { background: linear-gradient(180deg, #FDE4EF 0%, var(--cream) 70%); color: var(--ink); }
html[data-light="night"] .reset { background: radial-gradient(70% 50% at 50% 40%, #4A2A3B 0%, #201A1D 75%); color: var(--cream); }
.reset-stage { display: grid; place-items: center; align-content: center; gap: 22px; }
.orb-wrap { position: relative; width: min(78vw, 340px); aspect-ratio: 1; display: grid; place-items: center; }
.orb-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.orb-ring circle { fill: none; stroke-width: 3; }
.orb-ring .track { stroke: rgba(250, 106, 179, 0.18); }
.orb-ring .bar { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.orb {
  width: 64%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFF1F7 0%, #FCC9E1 45%, #F79CCB 100%);
  box-shadow: 0 0 60px rgba(250, 106, 179, 0.45);
  display: grid; place-items: center; transform: scale(0.72);
  transition: transform 4s cubic-bezier(.45, 0, .55, 1);
}
.orb.in { transform: scale(1.0); transition-duration: 4s; }
.orb.out { transform: scale(0.72); transition-duration: 6s; }
.orb-word { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 54px; color: var(--ink); }
.reset-cue { font-size: 16px; opacity: 0.8; text-align: center; }
.reset-time { font-family: var(--f-label); font-size: 13px; letter-spacing: 0.12em; }
.reset-done { display: grid; gap: 14px; justify-items: center; text-align: center; }

/* ── Conversation ── */
.talk-main { padding-top: calc(var(--safe-top) + 72px); padding-bottom: calc(var(--safe-bottom) + var(--tabbar) + 96px); }
.talk-head {
  position: fixed; z-index: 25; top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top) + 10px) 64px 10px 8px; min-height: calc(var(--safe-top) + 64px);
  display: flex; align-items: center; gap: 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--pink); color: var(--on-pink); display: grid; place-items: center; font-family: var(--f-display); font-size: 18px; flex: none; }
.talk-name { font-family: var(--f-display); font-size: 20px; letter-spacing: 0.04em; flex: 1; }
.thread { display: grid; gap: 22px; }
.msg-prima { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 23px; line-height: 1.32; max-width: 34em; min-width: 0; overflow-wrap: anywhere; }
.msg-prima p + p, .msg-prima ul, .msg-prima ol { margin-top: 0.6em; }
.msg-prima ul, .msg-prima ol { padding-left: 1.2em; margin-bottom: 0; }
.msg-prima strong { font-weight: 600; }
.msg-prima a { text-underline-offset: 3px; }
.msg-mine {
  justify-self: end; max-width: 82%; background: var(--mine-bg); color: var(--mine-text);
  border-radius: 22px 22px 6px 22px; padding: 12px 16px; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg-intro { color: var(--muted); }
.thinking { display: inline-flex; gap: 6px; padding: 8px 0; }
.thinking i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); animation: pulse 1.2s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .15s; }
.thinking i:nth-child(3) { animation-delay: .3s; }
.inline-reset { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 20px; background: var(--soft); }
.inline-reset .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--berry); flex: none; }
.inline-reset .ic svg { width: 24px; height: 24px; }
.inline-reset span { flex: 1; font-size: 15.5px; }
.inline-reset .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.support {
  border: 1px solid var(--line); border-left: 4px solid var(--berry); border-radius: 18px;
  background: var(--surface); padding: 16px 18px; display: grid; gap: 10px; font-family: var(--f-ui); font-style: normal; font-size: 16px;
}
.support ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.support li { padding: 10px 0; border-top: 1px solid var(--line); }
.support li:first-child { border-top: 0; padding-top: 0; }
.support a { font-weight: 700; color: var(--text); }
.missed { display: grid; gap: 10px; justify-items: start; font-family: var(--f-ui); font-style: normal; font-size: 16px; color: var(--muted); }

.composer {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(var(--safe-bottom) + var(--tabbar));
  padding: 10px var(--pad) 12px; background: linear-gradient(transparent, var(--bg) 22%);
}
.composer-inner {
  max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 28px; padding: 6px 6px 6px 18px;
}
.composer textarea {
  flex: 1; border: 0; background: none; resize: none; outline: none; padding: 12px 0; min-height: 48px; max-height: 160px;
  font-size: 17px; line-height: 1.4;
}
.composer textarea::placeholder { color: var(--muted); }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none; }
.round svg { width: 22px; height: 22px; }
.round.mic { background: var(--pink); color: var(--on-pink); }
.round.send { background: var(--text); color: var(--bg); }
.round.rec { background: var(--berry); color: var(--cream); animation: pulse-ring 1.4s infinite; }
.rec-note { text-align: center; font-family: var(--f-label); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }

/* Takeaway */
.takeaway-stage { min-width: 0; width: 100%; display: grid; place-items: center; align-content: center; gap: 22px; padding: 10px 0; }
.ticket {
  position: relative; width: min(100%, 440px); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow);
  padding: 26px 24px 22px; display: grid; gap: 16px; text-align: left; border: 1px solid var(--line);
}
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); transform: translateY(-50%); }
.ticket::before { left: -12px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -12px; clip-path: inset(0 50% 0 0); }
.ticket .display { font-size: clamp(36px, 10vw, 48px); text-align: center; }
.ticket .label.center { text-align: center; }
.ticket-part { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.ticket-row { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.ticket-row .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ticket-row .ic svg { width: 18px; height: 18px; }
.ticket-line { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1.15; }
.progress-hero { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: clamp(23px, 6vw, 34px); line-height: 1.22; margin-top: 14px; max-width: 32ch; }
.ticket .writing { text-align: center; color: var(--muted); padding: 20px 0; }
.takeaway-actions { display: grid; gap: 4px; justify-items: center; width: min(100%, 440px); }

/* Voice mode (always night) */
.voice-mode { text-align: center; }
.voice-said { display: grid; gap: 10px; justify-items: center; min-height: 120px; align-content: start; padding: 8px 6px 0; }
.voice-said .voice { font-size: clamp(26px, 7vw, 34px); line-height: 1.2; max-width: 22ch; }
.voice-said .voice.long { font-size: 21px; max-width: 30ch; }
.mic-stage { display: grid; place-items: center; gap: 18px; }
.big-mic {
  position: relative; width: min(56vw, 220px); aspect-ratio: 1; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 40% 35%, #FF9BD0, var(--pink) 60%);
  color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 80px rgba(250, 106, 179, 0.55);
}
.big-mic svg { width: 64px; height: 64px; }
.big-mic::before, .big-mic::after {
  content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1px solid rgba(250, 106, 179, 0.45);
}
.big-mic::after { inset: -40px; border-color: rgba(250, 106, 179, 0.22); }
.big-mic.listening::before, .big-mic.listening::after { animation: ripple 1.8s infinite ease-out; }
.big-mic.speaking { animation: breathe 2.4s infinite ease-in-out; }
.status-pill { font-family: var(--f-label); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--blush); }
.caption { min-height: 56px; font-size: 18px; max-width: 30ch; margin: 0 auto; }
.voice-controls { display: flex; justify-content: center; gap: 28px; }
.vc { display: grid; justify-items: center; gap: 6px; font-size: 13px; color: var(--muted); background: none; border: 0; }
.vc .round { width: 56px; height: 56px; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.vc.end .round { width: 64px; height: 64px; background: var(--cream); color: var(--ink); }
.vc.on .round { background: var(--berry); color: var(--cream); }

/* ── Progress ── */
.page-title { font-family: var(--f-display); text-transform: uppercase; font-size: 46px; line-height: 1; }
.page-sub { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--muted); margin-top: 8px; }
.section { display: grid; gap: 12px; margin-top: 30px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 14px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -4px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .pin { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); margin-top: 7px; position: relative; z-index: 1; }
.timeline .t-name { font-family: var(--f-display); text-transform: uppercase; font-size: 20px; line-height: 1.15; letter-spacing: 0.01em; }
.timeline .t-date { font-family: var(--f-label); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-body { background: var(--soft); border-radius: 999px; padding: 10px 16px; font-size: 15px; }
.win { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.win:first-child { border-top: 0; }
.check { width: 26px; height: 26px; border-radius: 50%; background: var(--mine-bg); color: var(--mine-text); display: grid; place-items: center; flex: none; }
.check svg { width: 15px; height: 15px; }
.t-btn { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.t-btn:hover .t-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.timeline li.t-month { grid-template-columns: 1fr; padding: 6px 0 12px 26px; }
.timeline li.t-month::before { display: none; }
.small { font-size: 14px; margin-top: -4px; }
.moment { display: grid; gap: 14px; }
.moment-title { font-size: clamp(34px, 9vw, 44px); }
.status-chip { font-family: var(--f-label); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; white-space: nowrap; align-self: center; }
.status-chip.kept { background: var(--mine-bg); color: var(--mine-text); border-color: var(--mine-bg); }
.ticket-row .grow { flex: 1; }
.empty { display: grid; gap: 16px; justify-items: start; padding: 22px 0; }

/* ── Journal ── */
.journal { display: grid; gap: 18px; }
.j-prompt { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 32px; line-height: 1.12; }
.j-area { width: 100%; min-height: 40vh; border: 0; background: none; outline: none; resize: none; font-size: 18px; line-height: 1.6; padding: 0; }
.j-area::placeholder { color: var(--muted); }
.j-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.saved { font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.saved svg { width: 16px; height: 16px; }
.past { display: grid; gap: 0; }
.past button { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 4px; }
.past .first-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 15px; }

/* ── Me / memory ── */
.me-title { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1.05; }
.list { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 8px 8px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row input, .row textarea { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.row .status { font-family: var(--f-label); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.row.danger { color: var(--berry); }
html[data-light="night"] .row.danger { color: var(--help); }
.row-btn svg, .list svg { width: 20px; height: 20px; flex: none; }
.row-btn { width: 100%; background: none; border: 0; text-align: left; justify-content: space-between; }
.confirm { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.confirm button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.confirm .yes { background: var(--help); color: var(--help-text); border-color: var(--help); }
select { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; }

/* ── Welcome, sign in, sign up (Center Stage) ── */
.stage-screen { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: minmax(52vh, 1fr) auto; }
.stage-photo { position: relative; overflow: hidden; background: #3A1F2D; }
.stage-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.stage-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(32, 26, 29, 0.55)); }
.stage-words { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; z-index: 1; color: var(--cream); }
.stage-words .display { font-size: clamp(88px, 30vw, 150px); line-height: 0.86; }
.stage-words .voice { font-size: 26px; line-height: 1.15; margin-top: 8px; }
.stage-bottom { padding: 26px var(--pad) calc(var(--safe-bottom) + 22px); display: grid; gap: 6px; justify-items: center; max-width: 520px; width: 100%; margin: 0 auto; }
.fine { font-family: var(--f-label); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.auth { padding: calc(var(--safe-top) + 12px) var(--pad) calc(var(--safe-bottom) + 24px); max-width: 520px; margin: 0 auto; display: grid; gap: 18px; }
.auth .display { font-size: 52px; }
.auth-photo { height: 30vh; min-height: 180px; margin: 0 calc(var(--pad) * -1); position: relative; overflow: hidden; }
.auth-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.auth-photo .display { position: absolute; left: var(--pad); bottom: 14px; color: var(--cream); font-size: 72px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-label); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  min-height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  padding: 12px 16px; font-size: 17px; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--text); outline: none; }
.pw { position: relative; }
.pw .icon-btn { position: absolute; right: 5px; top: 5px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.check-row input { width: 22px; height: 22px; margin-top: 1px; accent-color: #201A1D; flex: none; }
.form-error { color: var(--berry); font-size: 15px; min-height: 1em; }
html[data-light="night"] .form-error { color: var(--help); }

/* Onboarding */
.onb { padding: calc(var(--safe-top) + 12px) var(--pad) calc(var(--safe-bottom) + 110px); max-width: 560px; margin: 0 auto; display: grid; gap: 22px; }
.onb-top { display: flex; align-items: center; gap: 12px; }
.bars { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bars i { height: 4px; border-radius: 2px; background: var(--line); }
.bars i.on { background: var(--pink); }
.onb h1 { font-family: var(--f-voice); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1.08; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; min-height: 120px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; align-content: center; gap: 10px; font-weight: 500; padding: 14px;
}
.tile svg { width: 34px; height: 34px; }
.tile.on { background: var(--mine-bg); color: var(--mine-text); border-color: var(--mine-bg); }
.tile.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--pink); }
.tile.wide { grid-column: 1 / -1; min-height: 64px; grid-auto-flow: column; justify-content: start; padding-left: 20px; }

/* ── Toast ── */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + var(--tabbar) + 90px);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 15px; box-shadow: var(--shadow);
  max-width: calc(100% - 40px); animation: fade .2s ease;
}

/* ── Laptop and projector ── */
@media (min-width: 900px) {
  :root { --pad: 48px; }
  .shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
  .rail {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
    padding: 28px 18px; border-right: 1px solid var(--line);
  }
  .rail .wordmark { font-size: 34px; margin: 0 10px 26px; }
  .rail a {
    display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border-radius: 14px;
    text-decoration: none; color: var(--muted); font-weight: 500; font-size: 17px;
  }
  .rail a svg { width: 22px; height: 22px; }
  .rail a.on { background: var(--soft); color: var(--text); }
  .rail .grow { flex: 1; }
  .rail .me-link { border-top: 1px solid var(--line); border-radius: 0; padding-top: 16px; min-height: 60px; }
  .tabbar, .topbar { display: none; }
  .help-btn { top: 22px; right: 28px; width: 44px; height: 44px; }
  .main { max-width: 1120px; margin: 0; padding: 72px var(--pad) 72px; }

  html[data-light="night"] .today-photo { background-image: url("/img/night-window.jpg"); background-position: 62% 50%; }
  html[data-look="stage"] .stage-hero { position: fixed; width: 40vw; height: 100vh; clip-path: none; background-position: 50% 25%; }
  html[data-look="stage"] .stage-hero .sticker { right: auto; left: 28px; bottom: 40px; font-size: 26px; }
  html[data-look="stage"] .hero-q { font-size: clamp(64px, 6.2vw, 104px); max-width: 9ch; }
  html[data-look="stage"] .talk-banner { height: 280px; margin: 0 0 8px; border-radius: 20px; overflow: hidden; }
  .today-side .reset-pill { min-height: 150px; border-radius: 22px; align-items: flex-end; padding: 18px; background: #FCC9E1 url("/img/reset-blush.jpg") 60% 50% / cover no-repeat; }
  html[data-light="night"] .today-side .reset-pill { background: #2A2226 url("/img/reset-night.jpg") 70% 40% / cover no-repeat; color: var(--cream); }
  html[data-light="night"] .today-side .reset-pill small { color: var(--blush); }
  .today-photo {
    position: fixed; top: 0; right: 0; left: auto; width: 44vw; height: 100vh; opacity: 0.9;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%); mask-image: linear-gradient(to right, transparent 0%, #000 45%);
  }
  html[data-light="night"] .today-photo { opacity: 0.75; }
  .today { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 32px 56px; align-items: start; }
  .today-head, .today-main { grid-column: 1; }
  .today-side { grid-column: 2; grid-row: 1 / span 2; padding-top: 44px; }
  .hero-q { font-size: clamp(64px, 6.4vw, 92px); }
  .today-actions { justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; gap: 18px; }
  .today-actions .btn { min-width: 220px; min-height: 60px; font-size: 19px; }
  .sticky-cta { position: static; padding: 0; background: none; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; gap: 18px; }
  .sticky-cta .btn { width: auto; min-width: 240px; min-height: 60px; font-size: 19px; }
  .today-main .sticky-cta, .first .sticky-cta { margin-top: 22px; }
  .spacer-cta { display: none; }
  .first { justify-items: start; text-align: left; }
  .first .display { font-size: 84px; }
  .steps { grid-auto-flow: column; gap: 0; justify-content: start; }
  .steps li { grid-auto-flow: column; align-items: center; gap: 12px; }
  .steps li + li::before { width: 48px; height: 1px; margin: 0 14px 0 0; }

  .talk-main { max-width: 860px; margin: 0 auto; padding-top: 104px; padding-bottom: 150px; }
  .talk-head { position: fixed; left: 236px; padding: 18px 90px 18px 48px; min-height: 76px; }
  .msg-prima { font-size: 27px; }
  .msg-mine { font-size: 18px; max-width: 70%; }
  .composer { left: 236px; bottom: 0; padding: 14px 48px 26px; }

  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px; border-radius: 28px; padding: 28px 32px; animation: fade .2s ease; }
  .grabber { display: none; }
  .full { padding: 28px 48px; }
  .stage-screen { grid-template-rows: none; grid-template-columns: 1fr 1fr; min-height: 100vh; }
  .stage-bottom { align-content: center; justify-items: start; padding: 48px 64px; max-width: 560px; }
  .stage-bottom .btn { min-width: 280px; }
  .stage-headline { display: block !important; font-family: var(--f-display); text-transform: uppercase; font-size: 64px; line-height: 0.98; margin-bottom: 6px; }
  .stage-grace { display: block !important; font-family: var(--f-voice); font-style: italic; font-size: 30px; margin-bottom: 26px; }
  .auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
  .auth-side { display: block !important; position: relative; overflow: hidden; }
  .auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
  .auth-side .display { position: absolute; left: 40px; bottom: 30px; color: var(--cream); font-size: 140px; }
  .auth { align-content: center; padding: 48px 64px; }
  .auth-photo { display: none; }
  .onb { padding-top: 72px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile.wide { grid-column: span 1; }
  .progress-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
  .journal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
  .journal-grid .past { order: -1; }
  .j-prompt { font-size: 44px; }
  .me-title { font-size: 56px; }
  .me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
  .toast { bottom: 40px; }
}
.stage-headline, .stage-grace, .auth-side { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(196, 61, 128, .5); } 100% { box-shadow: 0 0 0 16px rgba(196, 61, 128, 0); } }
@keyframes ripple { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Help stays on top of full-screen overlays too */
#layer .help-btn { z-index: 60; }

/* Moment titles use the big-moment type (Anton), not the sheet heading style */
.sheet .moment-title { font-family: var(--f-display); font-style: normal; font-weight: 400; text-transform: uppercase; line-height: 0.98; margin: 0; }
