/* Pulse: social media at the speed of attention.
   Brand: warm paper and ink, one "ember" accent for the beat, Fraunces for voice, DM Sans for reading. */

:root {
  color-scheme: light;
  --paper: #f5f1ea;
  --card: #fffdf9;
  --sunk: #ece6dc;
  --ink: #221e1a;
  --ink-2: #57504a;
  --muted: #8a8278;
  --line: #e4ddd1;
  --ember: #e2553d;
  --ember-ink: #b83e29;
  --glow: #f8ddd0;
  --sage: #6f8f78;
  --dusk: #2b3047;
  --on-ember: #fffaf6;
  --shadow: 0 1px 2px rgba(34, 30, 26, 0.06), 0 12px 32px rgba(34, 30, 26, 0.08);
  --display: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --beat: 380ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --tabbar: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) {
    color-scheme: dark;
    --paper: #17161a;
    --card: #211f24;
    --sunk: #2a282e;
    --ink: #f2eee8;
    --ink-2: #c9c1b6;
    --muted: #8e867c;
    --line: #332f36;
    --ember: #ff7a5c;
    --ember-ink: #ff9a80;
    --glow: #3a2421;
    --sage: #9cbaa3;
    --on-ember: #1b0f0b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #17161a;
  --card: #211f24;
  --sunk: #2a282e;
  --ink: #f2eee8;
  --ink-2: #c9c1b6;
  --muted: #8e867c;
  --line: #332f36;
  --ember: #ff7a5c;
  --ember-ink: #ff9a80;
  --glow: #3a2421;
  --sage: #9cbaa3;
  --on-ember: #1b0f0b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 90% at 50% 0%, #3a3f5c 0%, #2b3047 45%, #1c1f30 100%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { padding: 0; background: none; border: 0; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell: full screen on phones; a phone-shaped window on large screens; edge to edge inside an iframe. */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}
.frame-note { display: none; }
@media (min-width: 640px) and (min-height: 720px) {
  html:not(.embedded) .app { height: min(880px, calc(100dvh - 72px)); margin-top: 24px; border-radius: 36px; box-shadow: 0 0 0 10px #12141f, 0 40px 80px rgba(0, 0, 0, 0.45); }
  html:not(.embedded) .frame-note { position: fixed; left: 0; right: 0; bottom: 14px; display: block; color: rgba(242, 238, 232, 0.6); font-size: 12px; text-align: center; }
  html:not(.embedded) .frame-note a { color: #f2eee8; text-decoration: underline; text-underline-offset: 2px; }
}
html.embedded body { background: var(--paper); }
html.embedded .app { max-width: none; }
/* Screen captures for the case study: pinned to the left edge at exactly phone width. */
html.shot body { background: var(--paper); }
html.shot .app { width: 390px; max-width: 390px; height: 844px; margin: 0; border-radius: 0; box-shadow: none; }
html.shot .frame-note { display: none; }

.screen { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; animation: screen-in 260ms var(--ease); }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.pad { padding: 4px 18px 28px; }

/* Top bar */
.bar { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px 6px 18px; flex: none; }
.bar-title { flex: 1; min-width: 0; overflow: hidden; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.bar-sub { color: var(--muted); font-size: 12px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: var(--ink); transition: background-color 150ms var(--ease); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--sunk); }
.dot-badge { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; background: var(--ember); border: 2px solid var(--paper); border-radius: 50%; }

/* Wordmark: lowercase serif with the ember beat dot */
.wordmark { display: inline-flex; align-items: baseline; gap: 2px; flex: 1; font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.04em; }
.wordmark i { width: 7px; height: 7px; margin-left: 1px; background: var(--ember); border-radius: 50%; animation: breathe 3.2s var(--ease) infinite; }
@keyframes breathe { 50% { transform: scale(1.35); opacity: 0.75; } }
.mark { position: relative; display: inline-grid; place-items: center; }

/* Avatars: monograms on each person's own hue */
.av { display: inline-grid; place-items: center; width: var(--s, 36px); height: var(--s, 36px); flex: none; background: hsl(var(--h) 52% 86%); border-radius: 50%; color: hsl(var(--h) 45% 26%); font-family: var(--display); font-size: calc(var(--s, 36px) * 0.4); font-weight: 600; line-height: 1; }
:root[data-theme="night"] .av { background: hsl(var(--h) 30% 30%); color: hsl(var(--h) 60% 88%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="day"]) .av { background: hsl(var(--h) 30% 30%); color: hsl(var(--h) 60% 88%); } }

/* Stories */
.stories { display: flex; gap: 12px; padding: 4px 18px 10px; overflow-x: auto; flex: none; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: grid; justify-items: center; gap: 4px; width: 58px; flex: none; color: var(--ink-2); font-size: 11px; }
.story-ring { padding: 2.5px; border-radius: 50%; background: conic-gradient(var(--ember), #f4a582, var(--ember)); }
.story.is-seen .story-ring { background: var(--line); }
.story-ring .av { border: 2.5px solid var(--paper); }
.story span:last-child { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Feed: one post per page */
.progress { display: flex; align-items: center; gap: 8px; padding: 0 18px 8px; color: var(--muted); font-size: 12px; flex: none; }
.progress-track { flex: 1; height: 3px; overflow: hidden; background: var(--line); border-radius: 3px; }
.progress-track i { display: block; height: 100%; background: var(--ember); border-radius: 3px; transition: width 400ms var(--ease); }
.pager { flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.pager::-webkit-scrollbar { display: none; }
.page { display: flex; height: 100%; padding: 2px 14px 14px; scroll-snap-align: start; scroll-snap-stop: always; }

.post { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-align: left; }
.who b { display: block; overflow: hidden; font-weight: 700; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.reason { padding: 3px 9px; background: var(--glow); border-radius: 99px; color: var(--ember-ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.media { position: relative; flex: 1; min-height: 0; margin: 0 10px; overflow: hidden; background: var(--sunk); border-radius: 16px; touch-action: manipulation; }
.media svg { width: 100%; height: 100%; }
.media-text { display: grid; place-items: center; flex: 1; margin: 0 10px; padding: 28px; background: linear-gradient(160deg, var(--glow), var(--sunk)); border-radius: 16px; }
.media-text p { font-family: var(--display); font-size: clamp(22px, 6.4vw, 28px); font-weight: 500; line-height: 1.22; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.burst { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; color: var(--on-ember); pointer-events: none; transform: translate(-50%, -50%) scale(0); }
.burst svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25)); }
.burst.is-on { animation: burst 900ms var(--ease) forwards; }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 30% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 70% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0; } }
.caption { padding: 12px 16px 2px; color: var(--ink-2); font-size: 14px; }
.caption b { color: var(--ink); }
.tagl { color: var(--ember-ink); font-weight: 700; }
.actions { display: flex; align-items: center; gap: 2px; padding: 4px 8px 10px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 99px; color: var(--ink-2); font-size: 13px; font-weight: 700; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.act svg { width: 21px; height: 21px; transition: transform var(--beat) var(--ease); }
.act:hover { background: var(--sunk); }
.act.is-on { color: var(--ember-ink); }
.act.is-on svg path { fill: currentColor; }
.act.is-beat svg { animation: beat var(--beat) var(--ease); }
.act.is-beat::after { position: absolute; content: ""; }
@keyframes beat { 0% { transform: scale(1); } 35% { transform: scale(0.82); } 70% { transform: scale(1.22); } 100% { transform: scale(1); } }
.spacer { flex: 1; }

.caught { display: grid; place-items: center; align-content: center; gap: 14px; flex: 1; padding: 30px; text-align: center; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.caught .ripple { position: relative; width: 84px; height: 84px; }
.caught .ripple i { position: absolute; inset: 0; border: 2px solid var(--ember); border-radius: 50%; opacity: 0; animation: ripple 3s var(--ease) infinite; }
.caught .ripple i:nth-child(2) { animation-delay: 1s; }
.caught .ripple i:nth-child(3) { animation-delay: 2s; }
.caught .ripple b { position: absolute; inset: 32px; background: var(--ember); border-radius: 50%; }
@keyframes ripple { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }
.caught h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.caught p { max-width: 30ch; color: var(--ink-2); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; background: var(--ink); border-radius: 99px; color: var(--paper); font-weight: 700; transition: transform 150ms var(--ease), opacity 150ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn.ember { background: var(--ember); color: var(--on-ember); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.input { width: 100%; min-height: 46px; padding: 11px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); outline: none; transition: border-color 150ms var(--ease); }
.input:focus { border-color: var(--ember); }
textarea.input { resize: none; line-height: 1.5; }
.hint { color: var(--muted); font-size: 12px; }
.error { color: var(--ember-ink); font-size: 12px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 99px; color: var(--ink-2); font-size: 13px; font-weight: 700; transition: all 150ms var(--ease); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.swatch { width: 34px; height: 34px; border: 3px solid var(--card); border-radius: 50%; box-shadow: 0 0 0 1.5px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ember); }

/* Lists and cards */
.section-h { margin: 22px 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.section-h:first-child { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { display: block; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.unread { width: 9px; height: 9px; flex: none; background: var(--ember); border-radius: 50%; }
.card { padding: 16px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--sunk); border-radius: 10px; }
.thumb svg { width: 100%; height: 100%; }
.thumb-text { display: grid; place-items: center; padding: 8px; background: linear-gradient(160deg, var(--glow), var(--sunk)); font-family: var(--display); font-size: 11px; line-height: 1.25; text-align: center; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; color: var(--muted); text-align: center; }
.empty b { color: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 600; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); }
.search .input { padding-left: 42px; }
.person-cards { display: flex; gap: 10px; margin: 0 -18px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.person-cards::-webkit-scrollbar { display: none; }
.pcard { display: grid; justify-items: center; gap: 6px; width: 132px; flex: none; padding: 16px 10px 12px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); text-align: center; }
.pcard b { max-width: 100%; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pcard small { color: var(--muted); font-size: 12px; }

/* Profile */
.profile { display: grid; justify-items: center; gap: 8px; padding: 8px 18px 18px; text-align: center; }
.profile h1 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.profile .handle { color: var(--muted); font-size: 13px; }
.profile .bio { max-width: 32ch; color: var(--ink-2); }
.stats { display: flex; gap: 22px; margin: 6px 0 4px; }
.stats div { display: grid; }
.stats b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.stats small { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 6px; padding: 0 18px 12px; }
.tabs .chip { flex: 1; }

/* Messages */
.thread { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 16px; }
.msg { max-width: 78%; padding: 9px 13px; background: var(--card); border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow); font-size: 14px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--ink); border-radius: 18px 18px 6px 18px; color: var(--paper); }
.msg-time { align-self: center; margin: 8px 0 2px; color: var(--muted); font-size: 11px; }
.typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.typing i { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; background: var(--paper); border-top: 1px solid var(--line); flex: none; }
.composer .input { min-height: 42px; border-radius: 99px; }
.send { display: grid; place-items: center; width: 42px; height: 42px; flex: none; background: var(--ember); border-radius: 50%; color: var(--on-ember); }
.send svg { width: 20px; height: 20px; }

/* Activity */
.digest { padding: 14px 16px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.digest + .digest { margin-top: 10px; }
.digest h3 { display: flex; justify-content: space-between; margin-bottom: 4px; font-family: var(--display); font-size: 17px; font-weight: 600; }
.digest h3 small { color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 500; }

/* Settings */
.set { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.set + .set { border-top: 1px solid var(--line); }
.set-main { flex: 1; min-width: 0; }
.set-main b { display: block; font-size: 14px; }
.set-main small { display: block; color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; background: var(--line); border-radius: 99px; transition: background-color 200ms var(--ease); }
.switch::after { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--card); border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); content: ""; transition: transform 200ms var(--ease); }
.switch[aria-checked="true"] { background: var(--ember); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.seg { display: flex; padding: 3px; background: var(--sunk); border-radius: 99px; }
.seg button { flex: 1; min-height: 32px; padding: 0 10px; border-radius: 99px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); color: var(--ink); }

/* Compose */
.preview { overflow: hidden; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.preview .media, .preview .media-text { height: 230px; margin: 10px; flex: none; }
.count { color: var(--muted); font-size: 12px; text-align: right; }
.count.is-near { color: var(--ember-ink); font-weight: 700; }

/* Tab bar */
.tabbar { display: flex; align-items: center; justify-content: space-around; height: var(--tabbar); padding: 0 6px; background: var(--paper); border-top: 1px solid var(--line); flex: none; }
.tab { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 56px; padding: 6px 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::before { position: absolute; top: -9px; width: 18px; height: 3px; background: var(--ember); border-radius: 3px; content: ""; }
.tab-post { display: grid; place-items: center; width: 48px; height: 38px; background: var(--ink); border-radius: 14px; color: var(--paper); }
.tab-post svg { width: 22px; height: 22px; }
.tab .count-badge { position: absolute; top: 0; right: 10px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; background: var(--ember); border-radius: 99px; color: var(--on-ember); font-size: 10px; }

/* Overlays: sheets and the story viewer */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(20, 18, 16, 0.42); animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; display: flex; flex-direction: column; max-height: 82%; background: var(--paper); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2); animation: sheet-in 280ms var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet-grip { width: 38px; height: 4px; margin: 10px auto 4px; background: var(--line); border-radius: 4px; flex: none; }
.sheet-head { display: flex; align-items: center; padding: 4px 10px 8px 18px; flex: none; }
.sheet-head h2 { flex: 1; font-family: var(--display); font-size: 19px; font-weight: 600; }
.comment { display: flex; gap: 10px; padding: 10px 18px; }
.comment p { color: var(--ink-2); font-size: 14px; }
.comment p b { color: var(--ink); }
.comment small { color: var(--muted); font-size: 12px; }

.story-view { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; color: #fff; background: #111; animation: fade 200ms var(--ease); }
.story-art { position: absolute; inset: 0; }
.story-art svg { width: 100%; height: 100%; }
.story-art::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 22%, transparent 62%, rgba(0, 0, 0, 0.6) 100%); content: ""; }
.story-top { position: relative; padding: 12px 12px 0; }
.bars { display: flex; gap: 4px; }
.bars span { flex: 1; height: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.35); border-radius: 3px; }
.bars span.done i, .bars span.on i { display: block; height: 100%; background: #fff; }
.bars span.on i { width: 0; animation: fill var(--dur, 4s) linear forwards; }
.story-view.is-paused .bars span.on i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }
.story-who { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.story-who b { flex: 1; font-size: 14px; }
.story-who .icon-btn { color: #fff; }
.story-who .icon-btn:hover { background: rgba(255, 255, 255, 0.15); }
.story-text { position: relative; margin: auto 22px 18px; font-family: var(--display); font-size: 25px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }
.story-zones { position: absolute; inset: 90px 0 90px; display: grid; grid-template-columns: 1fr 2fr; }
.story-reply { position: relative; display: flex; gap: 8px; padding: 0 12px 14px; }
.story-reply .input { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.4); border-radius: 99px; color: #fff; }
.story-reply .input::placeholder { color: rgba(255, 255, 255, 0.75); }

/* Onboarding */
.welcome { display: flex; flex: 1; flex-direction: column; padding: 18px 22px 22px; background: var(--paper); }
.welcome-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.steps { display: flex; gap: 6px; }
.steps i { width: 18px; height: 4px; background: var(--line); border-radius: 4px; transition: background-color 200ms var(--ease), width 200ms var(--ease); }
.steps i.on { width: 28px; background: var(--ember); }
.welcome-body { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 16px; }
.welcome h1 { font-family: var(--display); font-size: 38px; font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; }
.welcome h1 em { color: var(--ember-ink); font-style: italic; }
.welcome .lede { color: var(--ink-2); font-size: 16px; }
.hero-mark { position: relative; width: 148px; height: 148px; margin-bottom: 8px; }
.hero-mark i { position: absolute; inset: 0; border: 2px solid var(--ember); border-radius: 50%; opacity: 0; animation: ripple 3.6s var(--ease) infinite; }
.hero-mark i:nth-child(2) { animation-delay: 1.2s; }
.hero-mark i:nth-child(3) { animation-delay: 2.4s; }
.hero-mark b { position: absolute; inset: 56px; background: var(--ember); border-radius: 50%; animation: breathe 3.6s var(--ease) infinite; }
.principle { display: flex; gap: 14px; padding: 14px 0; }
.principle + .principle { border-top: 1px solid var(--line); }
.principle span { display: grid; place-items: center; width: 40px; height: 40px; flex: none; background: var(--glow); border-radius: 12px; color: var(--ember-ink); font-family: var(--display); font-weight: 600; }
.principle b { display: block; font-size: 15px; }
.principle small { display: block; color: var(--ink-2); font-size: 13.5px; }
.welcome-foot { display: grid; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 22px); z-index: 60; max-width: min(360px, calc(100% - 32px)); margin: 0; padding: 10px 16px; background: var(--ink); border-radius: 99px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); color: var(--paper); font-size: 13.5px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
