/* fiammo on the web (fiammo.co/app). The app's design system on a desk:
 * paper is paper, ink is voice, copper is fire. Values from
 * Color+Fiammo.swift, as style.css and reader/read.css have them, with the
 * night's beside the day's. Lora is the writing; the system face is the
 * phone around it. Buttons are ink; copper marks things (a tick, the tab
 * you are on, a chosen answer). Shapes go by what a thing is: a circle for
 * a face or a glyph control, a capsule for a pill or a chip, a rounded
 * rectangle for what spans the width or holds content. */
/* Lora is linked from app/index.html, with a preconnect to its files, so it
 * starts as the page does rather than after this sheet has loaded. */

:root {
  --paper: #F9F8F6;
  --card: #FFFFFF;
  --border: #E9E7E3;
  --fg: #1A1512;
  --muted: #6F6B65;        /* 5.0:1 on the paper, 5.3:1 on a card (was 4.50) */
  --muted-strong: #575450;
  --ink: #120B04;          /* fiammoInkFill: the main button */
  --on-ink: #F9F8F6;       /* fiammoBackground words on it */
  --gold: #B8731A;         /* fiammoSage: the marks */
  --gold-text: #985D12;    /* the same copper as words: 5.1:1 on the paper (the mark's is 3.6, a ring's and a tick's) */
  --error: #AA5A50;
  --destructive: #A6472E;  /* fiammoDestructive: an action that can't be taken back */
  --amber: #8A6100; --copper: #A3582C; --ember: #AD3A25;
  --tap0: #F4D9CE; --tap0-ink: #8A4A2E;
  --tap1: #CFE3DB; --tap1-ink: #3C6559;
  --tap2: #DCD9EE; --tap2-ink: #554F80;
  --lift: 0 1px 2px rgba(26, 21, 18, .04), 0 8px 24px rgba(26, 21, 18, .05);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  /* Motion+Fiammo: arrive fast, settle, never overshoot. */
  --arrive: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
/* Night: the system's, unless Day or Night was chosen in Settings
 * (settings.mjs; web/theme.js sets data-theme before the first paint). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141210;
    --card: #1F1C19;
    --border: #302C28;
    --fg: #F0EBE4;
    --muted: #948E86;
    --muted-strong: #B3ADA5;
    --ink: #F0EBE4;
    --on-ink: #141210;
    --gold: #CB8A32;
    --gold-text: #CB8A32;
    --error: #F2AAA0;
    --destructive: #E07A5F;
    --amber: #DDA020; --copper: #D47C48; --ember: #E2604A;
    --tap0: #4A2E22; --tap0-ink: #F1CDBE;
    --tap1: #213F38; --tap1-ink: #C4E0D5;
    --tap2: #343056; --tap2-ink: #D5D1F0;
    --lift: 0 0 0 1px #302C28;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141210;
  --card: #1F1C19;
  --border: #302C28;
  --fg: #F0EBE4;
  --muted: #948E86;
  --muted-strong: #B3ADA5;
  --ink: #F0EBE4;
  --on-ink: #141210;
  --gold: #CB8A32;
  --gold-text: #CB8A32;
  --error: #F2AAA0;
  --destructive: #E07A5F;
  --amber: #DDA020; --copper: #D47C48; --ember: #E2604A;
  --tap0: #4A2E22; --tap0-ink: #F1CDBE;
  --tap1: #213F38; --tap1-ink: #C4E0D5;
  --tap2: #343056; --tap2-ink: #D5D1F0;
  --lift: 0 0 0 1px #302C28;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper); color: var(--fg);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* A heading that takes focus on a route change draws no ring: it isn't a control. */
h1[tabindex="-1"]:focus, main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--ink); color: var(--on-ink); padding: 10px 16px;
  border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.skip:focus { top: max(12px, env(safe-area-inset-top)); }
picture { display: contents; }

/* ------------------------------------------------------------ the wordmark */
.wordmark { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; margin-block: 6px; }
.wordmark img.word { font-size: 22px; height: 2.176em; width: auto; margin: -0.908em 0 -0.784em; display: block; pointer-events: none; }

/* ------------------------------------------------------------ the page */
.page { width: 100%; box-sizing: border-box; max-width: 648px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 18px; }
.center { max-width: 420px; margin: 0 auto; padding: 72px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.center > .wordmark { margin-bottom: 16px; }
.title { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.display { font-family: var(--serif); font-size: 30px; line-height: 1.25; font-weight: 500; margin: 12px 0 0; }
.lede { font-size: 16px; color: var(--muted); margin: 0; }
.sub { font-size: 14px; color: var(--muted); margin: 0; }
.meta { font-size: 13px; color: var(--muted); margin: 0; }
.section { font-size: 13px; font-weight: 600; color: var(--muted-strong); margin: 14px 0 0; }
.loading { color: var(--muted); font-size: 14px; }
.error { color: var(--error); font-size: 14px; margin: 0; }
.spacer { flex: 1; }
.foot { max-width: 648px; margin: 0 auto; padding: 0 24px 40px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 13px; }
.foot a { color: var(--gold-text); font-weight: 600; text-decoration: none; }

/* Offline: one line under the bar (FiammoOfflineLine). */
.offline-line { margin: 0; padding: 8px 16px; text-align: center; font-size: 13px; font-weight: 500; color: var(--muted-strong);
  background: color-mix(in srgb, var(--fg) 5%, transparent); border-bottom: 1px solid var(--border); }
.card { background: var(--card); border-radius: 12px; box-shadow: var(--lift); padding: 20px; }
.ic { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; }
.ic svg { width: 100%; height: 100%; }
.ic.small { width: 11px; height: 11px; }
.ic.turn { transform: rotate(-90deg); width: 12px; height: 12px; color: var(--muted); }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 10px; border: 0; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: opacity .15s var(--arrive), transform .15s var(--arrive); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .35; cursor: default; transform: none; }
.btn.ink { background: var(--ink); color: var(--on-ink); }
.btn.secondary { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn.wide { width: 100%; }
.round { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted-strong);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 9px; }
.round:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.round svg { width: 18px; height: 18px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none;
  color: var(--muted-strong); cursor: pointer; padding: 6px 2px; font-size: 14px; }
.quiet-link { color: var(--muted); font-size: 14px; text-decoration: none; text-align: center; }
.quiet-link:hover { color: var(--fg); }
.row-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; text-decoration: none;
  border-bottom: 1px solid var(--border); font-weight: 500; }
.today-links { display: flex; flex-direction: column; }

/* ------------------------------------------------------------ sign in */
.signin-card { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 28px 24px; }
.signin-card .sub { margin-bottom: 10px; }
.signin { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
input, textarea { font: inherit; color: var(--fg); }
.signin input { height: 46px; border-radius: 10px; border: 1px solid var(--border); background: var(--paper); padding: 0 14px; font-size: 16px; }
.signin input:focus { outline: none; border-color: var(--gold); }
.signin .btn { margin-top: 10px; }
.signin .quiet-link { margin-top: 6px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.check-note { font-size: 12px; color: var(--muted); margin: 0 0 0 28px; }

/* ------------------------------------------------------------ signing up (signup.mjs, fiammo 871) */
.join-card .eyebrow { font-size: 12px; color: var(--muted); margin: 0 0 2px; letter-spacing: .02em; }
.field-note { font-size: 12px; color: var(--muted); margin: 0; }
.join-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.join-pair > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.join-pair input { width: 100%; box-sizing: border-box; }
@media (max-width: 360px) { .join-pair { grid-template-columns: 1fr; } }
.join-ts { min-height: 65px; margin-top: 10px; }
.join-terms { margin-top: 8px; text-align: center; }
.join-terms a { color: var(--muted-strong); }
.join-code { display: flex; flex-direction: column; gap: 8px; }
.join-code[hidden] { display: none; }
.link-button { border: 0; background: none; cursor: pointer; font: inherit; padding: 6px 0; }
.signin input[aria-invalid="true"] { border-color: var(--error); }

/* ------------------------------------------------------------ today */
.prompt { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.question { font-family: var(--serif); font-size: 22px; line-height: 1.35; margin: 0; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { text-align: left; border: 0; border-radius: 999px; padding: 12px 18px; background: color-mix(in srgb, var(--fg) 5%, transparent);
  font-size: 15px; cursor: pointer; transition: background .15s var(--arrive); }
.option:hover { background: color-mix(in srgb, var(--fg) 9%, transparent); }
/* A tapped answer takes its option's colour (Color.fiammoTapTint). */
.option.on.tap-0 { background: var(--tap0); color: var(--tap0-ink); font-weight: 600; }
.option.on.tap-1 { background: var(--tap1); color: var(--tap1-ink); font-weight: 600; }
.option.on.tap-2 { background: var(--tap2); color: var(--tap2-ink); font-weight: 600; }
.prompt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.your-answer { font-family: var(--serif); font-size: 17px; margin: 0; }

/* ------------------------------------------------------------ posts */
.list { display: flex; flex-direction: column; gap: 14px; }
.post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  transition: box-shadow .15s var(--arrive); }
/* Tab draws the ring j and k draw, and more plainly. */
.card.post:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.post:hover, .post.selected { box-shadow: var(--lift), 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
/* A card's audience pill and its mark (Kept · Oct 25) go under the name
 * when the three don't fit, at 320, rather than push the page sideways. */
/* One byline (PostByline, redesign 1105): face 32, @username in copper
 * semibold beside the time on one line, the countdown at its end, the
 * audience pill under it, the menu last. */
.byline { display: flex; align-items: center; gap: 10px; }
.byline .who { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1.25; min-width: 0; flex: 1; }
.byline .who-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; width: 100%; min-width: 0; }
.byline .handle { font-size: 13px; font-weight: 600; color: var(--gold-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.byline .who-line .meta { font-size: 13px; white-space: nowrap; }
.byline .who-line .dot { color: var(--border); }
.byline .who .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name { font-weight: 600; font-size: 14px; }
.avatar { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
  background: var(--tint-bg); color: var(--tint-ink); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: var(--tint-ink); color: var(--tint-bg); } }
:root[data-theme="dark"] .avatar { background: var(--tint-ink); color: var(--tint-bg); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pill { font-size: 12px; font-weight: 500; color: var(--muted-strong); padding: 3px 10px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; }
.burn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.burn .ic { width: 12px; height: 12px; }
.fire-amber { color: var(--amber); } .fire-copper { color: var(--copper); } .fire-ember { color: var(--ember); }
.card-question { font-size: 13px; color: var(--muted); margin: 0; }
.writing { font-family: var(--serif); font-size: 16px; line-height: 1.65; }
.writing p { margin: 0 0 .8em; white-space: pre-line; } .writing p:last-child { margin-bottom: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tap-answer { font-family: var(--serif); font-size: 18px; margin: 0; }
.tap-answer.tapped { align-self: flex-start; font-family: var(--sans); font-size: 15px; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.tap-answer.tap-0 { background: var(--tap0); color: var(--tap0-ink); }
.tap-answer.tap-1 { background: var(--tap1); color: var(--tap1-ink); }
.tap-answer.tap-2 { background: var(--tap2); color: var(--tap2-ink); }
.card-title { font-family: var(--serif); font-size: 21px; line-height: 1.3; font-weight: 600; margin: 0; }
.read-on { font-size: 13px; color: var(--gold-text); font-weight: 600; }
.sealed, .phone-only { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; margin: 0; }
.photos { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; }
.photos.n2 { grid-template-columns: 1fr 1fr; } .photos.n3 { grid-template-columns: 1fr 1fr 1fr; }
/* No photo's size is kept with the row, so each sits in a box of a fixed
 * shape and the page doesn't move when it lands. */
.photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: color-mix(in srgb, var(--fg) 5%, transparent); }
.photos.n2 img, .photos.n3 img { aspect-ratio: 1 / 1; }
/* A photo alone, once its size is known: its own shape, whole, no taller
 * than the window, centred when it is tall. A grid's squares open whole. */
.photos.n1 img.whole { width: auto; max-width: 100%; max-height: min(80vh, 760px); margin: 0 auto; object-fit: contain; background: none; border-radius: 10px; }
.photos.n2 img, .photos.n3 img { cursor: zoom-in; }
.photo-whole { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: color-mix(in srgb, #000 86%, transparent); cursor: zoom-out; outline: none; }
.photo-whole img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* The feed's gate (FeedGateView): faces, who has shared, the one way in. */
.gate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 32px 24px; }
.faces { display: flex; }
.faces .avatar { box-shadow: 0 0 0 3px var(--card); }
.faces .avatar + .avatar { margin-left: -14px; }
.gate-line { color: var(--muted-strong); font-size: 15px; margin: 0; max-width: 380px; }

/* A post on its own page, and an article as a clean reader. */
.reader { display: flex; flex-direction: column; gap: 16px; }
.reader .writing { font-size: var(--reading, 18px); line-height: 1.75; }
/* The reader's text size (settings.mjs, FiammoTextSizeControl): five stops,
 * set before the first paint by web/theme.js. */
:root[data-textsize="0"] { --reading: 15px; } :root[data-textsize="1"] { --reading: 16.5px; }
:root[data-textsize="3"] { --reading: 20px; } :root[data-textsize="4"] { --reading: 22.5px; }
.article-title { font-family: var(--serif); font-size: 34px; line-height: 1.2; font-weight: 600; margin: 8px 0 0; }
.writing.article { max-width: 65ch; }
.writing.article h2 { font-size: 22px; font-weight: 600; margin: 1.4em 0 .4em; }
.writing.article blockquote { margin: 0 0 1em; padding-left: 18px; border-left: 2px solid var(--border); font-style: italic; color: var(--muted-strong); }
.writing.article ul { margin: 0 0 1em; padding-left: 22px; }
.writing.article hr { border: 0; text-align: center; margin: 1.6em 0; }
.writing.article hr::after { content: "\00b7\2003\00b7\2003\00b7"; color: var(--muted); }
.writing a { color: var(--gold-text); text-decoration: underline; }

.comments { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); padding-top: 8px; }
/* A comment is a grid on one axis: the face, the words, and its ••• on the
 * name's line. Reply sits just under the words; threads are 16 apart and a
 * reply starts where the words above it do. */
.comment { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; column-gap: 10px; align-items: start; border-radius: 12px; }
.comment > .avatar { grid-column: 1; grid-row: 1; }
.comment-body { grid-column: 2; }
.comment > .more-wrap { grid-column: 3; grid-row: 1; margin: -5px 0 0; justify-self: end; }
.comment > .more-wrap .round.small { width: 28px; height: 28px; padding: 6px; }
.comment-who { margin: 0; font-size: 13px; line-height: 18px; }
.comment-text { margin: 2px 0 0; font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.composer { margin-bottom: env(safe-area-inset-bottom); display: flex; gap: 8px; align-items: flex-end; background: var(--card); border-radius: 22px; padding: 6px 6px 6px 16px; box-shadow: var(--lift); }
.comment-field { field-sizing: content; max-height: 40vh; flex: 1; border: 0; background: transparent; resize: none; font-family: var(--serif); font-size: 15px; padding: 8px 0; min-height: 22px; outline: none; }

/* ------------------------------------------------------------ you */
.profile { display: flex; gap: 16px; align-items: center; }
.profile { flex-wrap: wrap; }
/* On a narrow phone the bio keeps a readable width, and Sign out goes under it. */
.profile .who { flex: 1; min-width: min(180px, 100%); }
.profile-name { font-weight: 700; font-size: 18px; margin: 0; }
.bio { font-family: var(--serif); font-size: 15px; margin: 4px 0 0; }

/* ------------------------------------------------------------ write */
body[data-view="write"] { background: var(--card); }
.writer { min-height: 100vh; display: flex; flex-direction: column; }
.write-bar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .3s var(--arrive); }
.chip-wrap { position: relative; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 0;
  background: color-mix(in srgb, var(--fg) 6%, transparent); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip.on { color: var(--gold-text); box-shadow: inset 0 0 0 1.5px var(--gold); background: transparent; font-weight: 600; }
.count, .saved { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu { position: absolute; top: 42px; left: 0; z-index: 6; width: 250px; background: var(--card); border-radius: 14px;
  box-shadow: 0 0 0 1px var(--border), 0 12px 32px rgba(0, 0, 0, .14); padding: 6px; animation: rise .18s var(--arrive); }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }
.menu-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none;
  border-radius: 8px; text-align: left; cursor: pointer; font-size: 14px; }
.menu-row:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.menu-row.group { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 12px; }
.menu-row .menu-label { flex: 1; }
.menu-row .tick { color: var(--gold); width: 13px; height: 13px; }
.menu-row .dot { width: 10px; height: 10px; border-radius: 50%; margin: 0 3px; }
.menu-note { font-size: 12px; color: var(--muted); margin: 6px 10px 4px; }
.sheet { width: 100%; max-width: 700px; margin: 0 auto; padding: 48px 24px 30vh; display: flex; flex-direction: column; gap: 14px; }
.write-question { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 18px; margin: 0; }
.page-title { border: 0; background: transparent; font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.25; padding: 0; outline: none;
  resize: none; width: 100%; overflow: hidden; field-sizing: content; color: inherit; }
.page-text { border: 0; background: transparent; resize: none; outline: none; width: 100%; padding: 0;
  font-family: var(--serif); font-size: 20px; line-height: 1.75; overflow: hidden;
  /* Sizes itself to the writing where the browser can; elsewhere grow() does, once a frame. */
  field-sizing: content; min-height: 50vh; }
.page-title::placeholder, .page-text::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.format-hint { font-size: 12px; color: var(--muted); margin: 0; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.focus-hint { display: none; }
/* The writer's desk's focus (newsletter.mjs): the page alone, and its bar comes back under the pointer. */
body.focus:not([data-view="write"]) .write-bar, body.focus .format-hint { opacity: 0; }
.format-hint { transition: opacity .3s var(--arrive); }
body.focus:not([data-view="write"]) .write-bar:hover, body.focus:not([data-view="write"]) .write-bar:focus-within { opacity: 1; }
body.focus .focus-hint { display: block; position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); margin: 0; }
/* The caret is the words' own colour, in every field the writing has. */
.page-title, .page-text, .letter-body { caret-color: var(--fg); }

/* FiammoNotices: an ink line on the page you land on. */
.notice { position: fixed; top: 72px; left: 50%; transform: translate(-50%, -8px); opacity: 0; z-index: 20;
  background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity .2s var(--arrive), transform .2s var(--arrive); pointer-events: none; }
.notice.in { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ the writer's tools */
/* Your own post: Edit, Copy link and the menu, under the words. */
.owner-tools { display: flex; flex-direction: column; gap: 8px; }
.owner-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.owner-row .btn .ic { width: 14px; height: 14px; }
.more-wrap { position: relative; margin-left: auto; }
.menu.menu-end { left: auto; right: 0; width: 220px; }
.menu-row.destructive { color: var(--destructive); }
.link-field { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--paper); padding: 0 12px; font-size: 14px; }
.burned-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.burned-mark .ic { width: 12px; height: 12px; }
.btn.destructive { background: var(--destructive); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.destructive { color: var(--on-ink); } :root:not([data-theme="light"]) .scrim { background: rgba(0, 0, 0, .55); } }
:root[data-theme="dark"] .btn.destructive { color: var(--on-ink); } :root[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .55); }

/* FiammoAlert: a card over the page, two buttons, the one that can't be
 * undone in the destructive colour. */
.scrim { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(18, 11, 4, .32); animation: fade .16s var(--arrive); }
@keyframes fade { from { opacity: 0; } }
.alert-card { width: 100%; max-width: 360px; max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 24px;
  padding: 24px 22px 18px; box-shadow: 0 0 0 1px var(--border), 0 24px 60px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: 10px;
  animation: rise .18s var(--arrive); }
.alert-title { font-size: 17px; font-weight: 700; margin: 0; }
.alert-message { font-size: 15px; color: var(--muted-strong); margin: 0; }
.alert-actions { display: flex; gap: 10px; margin-top: 10px; }
.alert-actions .btn { flex: 1; }

/* Who reads it afterwards: rows that can be chosen, each a FiammoTick. */
.choose-list { display: flex; flex-direction: column; margin: 4px -8px 0; }
.choose-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px; border: 0; background: none; border-radius: 10px;
  text-align: left; cursor: pointer; font-size: 15px; }
.choose-row:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.choose-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.tick-ring { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muted) 60%, transparent);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tick-ring.on { background: var(--gold); box-shadow: none; color: #FFFFFF; }
.tick-ring .ic { width: 13px; height: 13px; }

/* Your writing: Live, Burned, Just me, and the search over them. */
.you-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.you-tab { border: 0; background: none; padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--muted-strong); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.you-tab.on { color: var(--gold-text); font-weight: 600; border-bottom-color: var(--gold); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 2px var(--gold); }
.search-input:focus-visible { outline: none; }
.search-input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; outline: none; }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search .round.small { margin-right: -8px; width: 28px; height: 28px; padding: 7px; }
.you-panel { display: flex; flex-direction: column; gap: 14px; }

/* Photos in the composer: each with where it sits and how it is going. */
.photo-bar { display: flex; gap: 8px; }
/* The phone's row (ComposerToolRow): Add photos or video, Tag people, Location, Pinboard,
   each a small capsule on a card with a hairline, and a chosen one's name in copper. */
.tool-row { flex-wrap: wrap; align-items: center; }
.head-row:empty, .foot-row:empty { display: none; }
.chip.tool-chip { height: 32px; padding: 0 12px; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted-strong);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--border); max-width: 100%; }
.chip.tool-chip:hover { background: color-mix(in srgb, var(--fg) 4%, var(--card)); }
.chip.tool-chip.on { color: var(--gold-text); box-shadow: inset 0 0 0 1.5px var(--gold); background: transparent; font-weight: 600; }
.chip.tool-chip[hidden] { display: none; }
.chip.tool-chip .ic, .chip.tool-chip .ic svg { width: 14px; height: 14px; flex-shrink: 0; }
.chip-words { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
/* A phone's width: the row keeps each chip whole and slides sideways, as the phone's does. */
@media (max-width: 599px) {
  .tool-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .tool-row::-webkit-scrollbar { display: none; }
  .chip.tool-chip { flex-shrink: 0; }
}
.photo-tray { display: flex; flex-direction: column; gap: 8px; }
.photo-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--border); }
.photo-item[draggable="true"] { cursor: grab; }
.photo-item.drop-here { box-shadow: inset 0 0 0 2px var(--gold); }
.photo-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: color-mix(in srgb, var(--fg) 6%, transparent); }
.photo-thumb.none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.photo-thumb.none .ic { width: 20px; height: 20px; }
.photo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.photo-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-status { color: var(--muted-strong); }
.photo-status.bad { color: var(--error); }
.progress { display: block; width: 140px; max-width: 100%; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 10%, transparent); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--gold); transition: width .2s var(--arrive); }
.round.small { width: 32px; height: 32px; padding: 8px; flex-shrink: 0; }
.round.small svg { width: 16px; height: 16px; }
.chip.still { cursor: default; }
.chip .ic { width: 15px; height: 15px; }
.sheet.dropping { outline: 2px dashed var(--gold); outline-offset: -8px; border-radius: 12px; }
.photo-note { margin: 0; }
/* With photos on the page the writing keeps a shorter floor, so they sit
 * under the words rather than half a screen below them. */
.sheet.has-photos .page-text { min-height: 24vh; }
/* A photo placed between two paragraphs, at its own place in the words. */
.writing .photos.inline { margin: 1.2em 0; }
.writing .photos { margin-top: 1em; }

@media (prefers-reduced-motion: reduce) {
  *, .menu, .notice, .scrim, .alert-card { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------ phone width */
@media (max-width: 720px) {
  .page { padding: 20px 16px 48px; }
  .write-bar { padding: max(10px, env(safe-area-inset-top)) 12px 10px; gap: 6px; flex-wrap: wrap; }
  .saved { display: none; }
  .sheet { padding: 28px 16px 30vh; }
  .page-text { font-size: 18px; }
  .page-title, .article-title { font-size: 28px; }
  .shelf { grid-template-columns: 1fr; }
  .photo-item { flex-wrap: wrap; }
  .alert-actions { flex-direction: column-reverse; }
}

/* ------------------------------------------------------------ people (people.mjs)
 * Alerts, the bar's count, friends, profiles. A friend action is a small
 * ink pill (fiammoPill: .filled ink, .outlined, .state), never copper; the
 * count and a new row's dot are the copper marks. */
:root { --badge-bg: var(--gold-text); --badge-fg: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --badge-bg: var(--gold); --badge-fg: #141210; } }
:root[data-theme="dark"] { --badge-bg: var(--gold); --badge-fg: #141210; }
.bell-count { position: absolute; top: -5px; left: 13px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-fg); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper); font-variant-numeric: tabular-nums; }
.bell-count[hidden] { display: none; }
.pill-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 14px; border-radius: 999px; border: 0;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.pill-btn .ic { width: 12px; height: 12px; }
.pill-btn.filled { background: var(--ink); color: var(--on-ink); }
.pill-btn.outlined { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.pill-btn.state { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.pill-btn[disabled] { opacity: .5; cursor: default; }
.pill-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.friend-pill-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.friend-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.error.small { font-size: 13px; }
.phone-only.small { font-size: 13px; gap: 6px; align-items: center; }
.phone-only.small .ic { width: 13px; height: 13px; }

.alert-list { padding: 4px 0; display: flex; flex-direction: column; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; }
.alert-row + .alert-row { border-top: 1px solid var(--border); }
.alert-face { display: flex; border-radius: 50%; text-decoration: none; flex-shrink: 0; }
.alert-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-open { display: block; color: inherit; text-decoration: none; text-align: left; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; border-radius: 6px; }
.alert-open.still { cursor: default; }
.alert-open:hover .alert-text { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.alert-open.still:hover .alert-text { text-decoration: none; }
.alert-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.alert-text { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.alert-text strong { font-weight: 600; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 7px; flex-shrink: 0; }
.empty-row .alert-text { font-weight: 600; }
.empty-face { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--muted); }
.empty-face .ic { width: 18px; height: 18px; }

.person { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.person-top { display: flex; width: 100%; align-items: flex-start; margin-bottom: 4px; }
.person .profile-name { font-size: 22px; overflow-wrap: anywhere; }
.person .friend-pill-box { margin-top: 8px; }
/* FiammoExternalLink: the glyph and the label in ink, no pill. */
.link-out { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-size: 14px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.link-out:hover { text-decoration: underline; text-underline-offset: 3px; }
.person-letter { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.nl-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--fg); text-decoration: none; }
.nl-latest { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--fg); padding: 10px 0 6px; }
.nl-latest-title { font-family: var(--serif); font-size: 16px; }
.person-letter .friend-pill-box { margin-top: 4px; }

.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.person-row + .person-row { border-top: 1px solid var(--border); }
.person-link { flex: 1 1 180px; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; border-radius: 8px; }
.person-link .who, .person-row .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-link .name, .person-link .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.people-search { display: flex; flex-direction: column; gap: 12px; }
.people-results:empty, .suggested:empty, .requests-here:empty { display: none; }
.suggested, .requests-here { display: flex; flex-direction: column; gap: 10px; }
.see-all { align-self: flex-start; color: var(--gold-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.invite-row { display: flex; }

.reasons { display: flex; flex-direction: column; margin: 4px -4px 0; }
.reason { text-align: left; padding: 12px 8px; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; font-size: 15px; color: var(--fg); cursor: pointer; border-radius: 0; }
.reason:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.reason:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.reason[aria-busy="true"] { color: var(--muted); }
.reason.urgent { color: var(--destructive); font-weight: 600; }
.urgent-help { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.urgent-help p { margin: 0; }
.urgent-help a { color: var(--fg); font-weight: 600; }
/* Opened from an alert: the row is lit, a tint round it, nothing moved. */
.comment.lit { background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 12%, transparent); }

@media (max-width: 720px) {
  .alert-row, .person-row { padding-left: 16px; padding-right: 16px; }
  .person-row { flex-wrap: wrap; }
  .person-row .friend-pill-box { margin-left: 52px; }
}

/* ------------------------------------------------------------ the rest of parity
 * talk.mjs (comments, the check-in, playback, a month, the stack,
 * questions, Choose people and tags), settings.mjs, translate.mjs and
 * drafts.mjs. Paper, ink and copper as everywhere: the one main button of a
 * screen in ink, copper only for what is chosen. */
.text-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--gold-text); cursor: pointer; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-btn[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.comment-body .text-btn { display: block; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted-strong); }
.comment-thread { display: flex; flex-direction: column; gap: 12px; }
.comment-replies { display: flex; flex-direction: column; gap: 12px; margin-left: 38px; }
/* What is being answered, over the field and on its edges: its words start
 * where the field's do (FiammoQuotedLine). */
.replying { display: flex; flex-direction: column; gap: 4px; margin: 0 0 -6px; padding: 10px 6px 10px 16px; background: color-mix(in srgb, var(--fg) 4%, transparent); border-radius: 16px; }
.replying-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.replying-to { font-size: 12px; font-weight: 600; color: var(--muted-strong); }
.replying-line { margin: 0 34px 0 0; padding-left: 8px; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-wrap { position: relative; }
.mention-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 6; list-style: none; margin: 0; padding: 6px; background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--border), 0 12px 32px rgba(0, 0, 0, .14); }
.mention { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mention.on, .mention:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.mention .meta { margin-left: auto; }
.empty-comments { margin: 0; }
.card-count { font-size: 12px; color: var(--muted); }
.translated { margin: 4px 0 0; font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.translated .text-btn { font-size: 12px; }

/* Saturday's check-in: two scales of five words, the chosen one in copper. */
.scale-row { display: flex; flex-direction: column; gap: 8px; }
.scale-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted-strong); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-step { border: 0; border-radius: 999px; padding: 10px 4px; background: color-mix(in srgb, var(--fg) 5%, transparent); font-size: 14px; cursor: pointer; }
.scale-step:hover { background: color-mix(in srgb, var(--fg) 9%, transparent); }
.scale-step.on { color: var(--gold-text); font-weight: 600; background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold); }
.week-note-box { display: flex; flex-direction: column; gap: 6px; }
.week-note-q { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted-strong); }
.week-note, .answer-field { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); padding: 10px 12px; font-family: var(--serif); font-size: 15px; resize: vertical; }
.week-note:focus, .answer-field:focus { outline: none; border-color: var(--gold); }

/* Voice notes and videos, played on the page; a line on a card. */
.player audio { width: 100%; border-radius: 999px; }
/* Focus sits inside the browser's own player (its shadow), so the ring is drawn round it whole. */
.player audio:focus-within, .player video:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.player video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.media-line { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; color: var(--muted-strong); }
.media-line .ic { width: 15px; height: 15px; }

/* A month, read only. */
.month { display: flex; flex-direction: column; gap: 14px; }
.month-name { font-family: var(--serif); font-size: 24px; margin: 0; }
.month-pick { margin: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.month-pick blockquote { margin: 0; }
.month-pick blockquote p { margin: 0; }
.month-topics { display: flex; flex-wrap: wrap; gap: 6px; }

/* The stack: the question once, the faces, who picked what. */
.stack { display: flex; flex-direction: column; gap: 12px; }
.faces.small .avatar { box-shadow: 0 0 0 2px var(--card); }
.faces.small .avatar + .avatar { margin-left: -8px; }
.more-faces { margin-left: 6px; align-self: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ballot { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ballot li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ballot .tap-answer.tapped { font-size: 13px; padding: 5px 12px; }
.ballot-names { font-size: 13px; color: var(--muted-strong); overflow-wrap: anywhere; }
.stack .btn { align-self: flex-start; }

/* Questions. */
.question-card .question { font-size: 19px; }
.question.big { font-size: 26px; margin: 4px 0 0; }
.answer-box { display: flex; flex-direction: column; gap: 10px; }
.for-you { display: flex; flex-direction: column; gap: 10px; }
.for-you:empty { display: none; }
.card-question .ic.small { vertical-align: -1px; }

/* Choose people and tags: a wider card, a search, rows with a tick. */
.alert-card.wide { max-width: 440px; }
.choose-body { display: flex; flex-direction: column; gap: 8px; }
.choose-list.people { max-height: 46vh; overflow: auto; margin: 0 -8px; }
.choose-list.people .meta { margin-left: auto; }
.choose-row[disabled] { opacity: .45; cursor: default; }
.choose-count { margin: 0; }
.photo-elsewhere { display: inline-flex; align-items: center; gap: 4px; }

/* Settings. */
.gear .ic { width: 19px; height: 19px; }
.gear.here { color: var(--gold-text); }
/* Settings: pages, a list down the left at 900 and over, the list alone under it. */
.set-pages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.set-page-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); border-radius: 10px; }
.set-page-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.set-side { position: sticky; top: 72px; align-self: start; }
.set-side .set-page-link { padding: 9px 12px; font-size: 15px; color: var(--muted-strong); }
.set-side .set-page-link:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.set-side .set-page-link.on { color: var(--gold-text); font-weight: 600; background: color-mix(in srgb, var(--gold) 8%, transparent); }
.set-index { background: var(--card); border-radius: 12px; box-shadow: var(--lift); padding: 4px 0; }
.set-index li + li { border-top: 1px solid var(--border); }
.set-index .set-page-link { display: grid; grid-template-columns: minmax(0, 1fr) 16px; column-gap: 12px; padding: 13px 16px; min-height: 56px; }
.set-index .set-page-name { font-size: 16px; font-weight: 500; }
.set-index .meta { grid-row: 2; }
.set-chev { grid-row: 1 / 3; grid-column: 2; color: var(--muted); display: inline-flex; transform: rotate(-90deg); }
.set-chev svg { width: 13px; height: 13px; }
.set-layout { display: grid; grid-template-columns: 228px minmax(0, 640px); gap: 40px; align-items: start; }
.set-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.set-page-title { font-size: 20px; font-weight: 700; margin: 4px 0 -4px; }
.size-sample { margin: 6px 0 0; font-family: var(--serif); font-size: var(--reading, 18px); line-height: 1.6; }
.set-section { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 120px; }
.set-card { display: flex; flex-direction: column; gap: 8px; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.set-row + .set-row { border-top: 1px solid var(--border); padding-top: 8px; }
.set-row.lead { border: 0; }
.set-row .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.set-row .name { overflow-wrap: anywhere; }
.set-input { width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--paper); padding: 9px 12px; font-size: 15px; }
textarea.set-input { resize: vertical; font-family: var(--serif); }
.set-input:focus { outline: none; border-color: var(--gold); }
.set-input.time { width: auto; }
.set-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.dot.big { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.set-choice { align-items: flex-start; margin: 0 -8px; }
.set-choice-text { display: flex; flex-direction: column; gap: 2px; }
.nl-link { color: var(--fg); text-decoration: none; font-weight: 600; }
.nl-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.member-list { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--sw); cursor: pointer; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px transparent; }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--gold); }

/* FiammoAppearanceControl: three small pictures of the page. */
.look { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.look-choice { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font: inherit; }
.look-pic { position: relative; width: 100%; max-width: 132px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--border);
  background: #F9F8F6; display: flex; flex-direction: column; gap: 5px; padding: 0 10px 10px; }
.look-pic.dark { background: #141210; }
.look-pic.auto { background: linear-gradient(90deg, #F9F8F6 50%, #141210 50%); }
.look-bar { height: 12px; margin: 0 -10px 4px; background: rgba(26, 21, 18, .06); }
.look-pic.dark .look-bar { background: rgba(240, 235, 228, .08); }
.look-card { height: 30%; border-radius: 6px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(26, 21, 18, .08); }
.look-pic.dark .look-card { background: #1F1C19; box-shadow: none; }
.look-pic.auto .look-card { background: linear-gradient(90deg, #FFFFFF 50%, #1F1C19 50%); }
.look-line { height: 5px; width: 80%; border-radius: 3px; background: rgba(26, 21, 18, .2); }
.look-line.short { width: 50%; }
.look-pic.dark .look-line { background: rgba(240, 235, 228, .3); }
.look-pic.auto .look-line { background: rgba(128, 122, 115, .45); }
.look-pic.auto .look-bar { background: linear-gradient(90deg, rgba(26, 21, 18, .06) 50%, rgba(240, 235, 228, .08) 50%); }
.look-choice.on .look-pic { box-shadow: 0 0 0 2px var(--gold); }
.look-label { font-size: 13px; color: var(--muted-strong); }
.look-choice.on .look-label { color: var(--gold-text); font-weight: 600; }
.look-choice { border-radius: 14px; }
.look-choice:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* The reader's text size: a line of stops between a small A and a large one. */
.back-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-size { display: flex; align-items: center; gap: 8px; }
.size-a { font-family: var(--serif); color: var(--muted-strong); line-height: 1; }
.size-a.small { font-size: 12px; } .size-a.big { font-size: 19px; }
.size-stops { display: flex; align-items: center; gap: 2px; }
.size-stop { width: 22px; height: 30px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.size-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 55%, transparent); }
.size-stop.on .size-dot { width: 11px; height: 11px; background: var(--gold); }

/* Drafts. */
.drafts-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* As wide as the content column (up to 1040), one row a draft, as Google
 * Docs lists its documents: kind, title and first line, who reads it, edited. */
.page.wide { max-width: 1088px; }
.drafts-table { padding: 4px 0; }
.drafts { list-style: none; margin: 0; padding: 0; }
.draft-cols, .draft-open { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(120px, 200px) 96px; column-gap: 16px; align-items: center; }
.draft-cols { padding: 10px 52px 10px 20px; font-size: 12px; font-weight: 600; color: var(--muted-strong); border-bottom: 1px solid var(--border); }
.draft-cols span:first-child { grid-column: 1 / 3; }
.draft-cols span:last-child, .draft-when { text-align: right; }
.draft { display: flex; align-items: center; gap: 4px; padding: 0 12px 0 0; }
.draft + .draft { border-top: 1px solid var(--border); }
.draft:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); }
.draft-open { flex: 1; min-width: 0; padding: 14px 0 14px 20px; color: inherit; text-decoration: none; border-radius: 10px; }
.draft-open:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.draft-mark { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; align-self: start;
  background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--muted-strong); }
.draft-mark.letter { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-text); }
.draft-mark svg { width: 17px; height: 17px; }
.draft-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.draft-title { font-family: var(--serif); font-size: 17px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-line { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-aud, .draft-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.draft-small { display: none; }
.draft-del { flex: none; opacity: 0; }
.draft:hover .draft-del, .draft:focus-within .draft-del { opacity: 1; }
@media (hover: none) { .draft-del { opacity: 1; } }
@media (max-width: 699.98px) {
  .draft-cols { display: none; }
  .draft-open { grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; padding: 14px 0 14px 16px; }
  .draft-aud, .draft-when { display: none; }
  .draft-small { display: block; margin-top: 2px; }
  .draft { padding-right: 6px; }
  .draft-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* The face sits fixed at the top right at 1100 and over: a wide page keeps
 * its right edge clear of it while the page runs to the window's edge. */
@media (min-width: 1100px) { .page.wide { padding-right: clamp(24px, calc(76px - (100vw - 1328px) / 2), 76px); } }
.from-other { color: var(--muted-strong); }
.drafts-link { font-size: 13px; font-weight: 600; color: var(--muted-strong); text-decoration: none; white-space: nowrap; }
.drafts-link:hover { color: var(--fg); }

@media (max-width: 720px) {
  .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .scale-step { font-size: 13px; padding: 9px 2px; }
  .look { gap: 6px; }
  .back-row { flex-wrap: wrap; }
}
.tap-with-why { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tap-with-why .why { margin: 0; }

/* A tapped answer as the phone draws it (AnsweredPollView): the question as
 * a serif italic line, the three options, the pick filled in its colour
 * with a check, and the day's count beside each. */
.answered-poll { display: flex; flex-direction: column; gap: 12px; }
.poll-question { margin: 0; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--muted-strong); }
.poll { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poll-row { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--border); }
.poll-option { flex: 1; min-width: 0; font-family: var(--serif); font-size: 16px; line-height: 1.4; color: var(--muted); }
.poll-count { flex-shrink: 0; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.poll-check { display: inline-flex; width: 12px; height: 12px; align-self: center; }
.poll-check svg { width: 12px; height: 12px; stroke-width: 3; }
.poll-row.chosen { box-shadow: none; }
.poll-row.chosen .poll-option, .poll-row.chosen .poll-count, .poll-row.chosen .poll-check { color: inherit; }
.poll-row.tap-0 { background: var(--tap0); color: var(--tap0-ink); }
.poll-row.tap-1 { background: var(--tap1); color: var(--tap1-ink); }
.poll-row.tap-2 { background: var(--tap2); color: var(--tap2-ink); }
.answered-poll .why { margin: 0; }
.poll-all { align-self: flex-start; text-decoration: none; }
.poll-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.prompt.answered { gap: 14px; }
.prompt.answered .quiet-link { align-self: flex-start; font-size: 13px; }
.prompt.answered .quiet-link:hover { color: var(--fg); }
/* The line of why under a picked option (HomeView.whyBox): one line that
 * grows to three, then scrolls. */
textarea.why-field { field-sizing: content; min-height: 44px; max-height: calc(3 * 1.5em + 20px); line-height: 1.5; resize: none; overflow-y: auto; font-size: 15px; caret-color: var(--fg); }
textarea.why-field:focus { outline: none; border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); }

/* People you may know: a strip that scrolls sideways, as the phone's does,
 * a card 140 across each, Add at the foot. */
.suggested { min-width: 0; max-width: 100%; contain: inline-size; }
.suggested .section { margin-bottom: 10px; }
.people-strip { list-style: none; margin: 0 -4px; padding: 4px 4px 10px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 4px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.person-card { flex: 0 0 140px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px 14px;
  background: var(--card); border-radius: 12px; box-shadow: var(--lift); text-align: center; }
.person-card-link { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; width: 100%; color: inherit; text-decoration: none; }
.person-card-link .avatar { margin-bottom: 6px; }
.person-card-link .name, .person-card-link .meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card-link .mutual { font-size: 12px; }
.person-card-link:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.person-card-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px; }
.person-card .friend-pill-box { margin-top: auto; align-items: center; }
.person-card .friend-pills { justify-content: center; }

/* ------------------------------------------------------------ the frame
 * letters-1026 W1 (fiammo's docs/letters-1026/spec-W1.md): the places down a
 * rail on a wide window (1100 and over), the same icons alone on a middle
 * one (700 to 1099), a capsule along the foot of a narrow one (the phone's
 * tab bar shape) with Write as a round ink button above it on the trailing
 * side. Your face top right, always. The place you are on is copper (its
 * icon and its word), the rest the secondary ink; Write is the one ink
 * button. Beside Home's feed at 1280 and over, a panel of 320. */
.rail { position: fixed; z-index: 5; display: flex; }
.rail .places { display: flex; }
.place { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--muted-strong); border-radius: 999px; }
.place:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.place.on, .place.on:hover { color: var(--gold-text); }
.place.on .place-word { font-weight: 650; }
.place-ic { position: relative; display: inline-flex; width: 24px; height: 24px; flex-shrink: 0; }
.place-ic svg { width: 24px; height: 24px; }
.place-word { font-size: 16px; font-weight: 500; }
.write-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: var(--on-ink);
  text-decoration: none; font-weight: 600; font-size: 15px; position: relative; }
.write-btn:active { transform: scale(.98); }
.write-btn .place-ic, .write-btn .place-ic svg { width: 20px; height: 20px; }
.top { display: flex; align-items: center; gap: 12px; }
.face-wrap { position: relative; }
.face { width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.face .avatar { pointer-events: none; }
.face.here .avatar, .face[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--gold); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); }
.side { display: none; }
/* A place's name, as the app's tooltip draws one, where only its icon is. */
.place-tip { display: none; }

@media (min-width: 1100px) {
  .rail { top: 0; left: 0; bottom: 0; width: 240px; flex-direction: column; gap: 4px;
    padding: max(20px, env(safe-area-inset-top)) 16px 20px max(16px, env(safe-area-inset-left)); border-right: 1px solid var(--border); background: var(--paper); }
  .rail-brand { padding: 6px 14px 22px; }
  .rail .places { flex-direction: column; gap: 2px; }
  .place { padding: 11px 14px; }
  .write-btn { margin-top: 16px; min-height: 48px; border-radius: 10px; }
  .top { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); z-index: 6; }
  .top-brand, .top .spacer { display: none; }
  .cols, .offline-line, .foot { margin-left: 240px; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .rail { top: 0; left: 0; bottom: 0; width: 72px; flex-direction: column; align-items: center; gap: 6px;
    padding: 72px 0 20px; border-right: 1px solid var(--border); background: var(--paper); }
  .rail-brand { display: none; }
  .rail .places { flex-direction: column; gap: 6px; }
  .place { width: 48px; height: 48px; justify-content: center; border-radius: 50%; }
  .write-btn { width: 48px; height: 48px; border-radius: 50%; margin-top: 12px; }
  .place-word { display: none; }
  .place:hover::after, .place:focus-visible::after, .write-btn:hover::after, .write-btn:focus-visible::after {
    content: attr(aria-label); position: absolute; left: 58px; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
    background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; z-index: 7; }
  .top { position: sticky; top: 0; z-index: 4; margin-left: 72px; padding: max(8px, env(safe-area-inset-top)) 16px 8px 24px;
    background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
  .top .spacer { flex: 1; }
  .cols, .offline-line, .foot { margin-left: 72px; }
}
@media (max-width: 699.98px) {
  .top { position: sticky; top: 0; z-index: 4; padding: max(6px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border); }
  .top .spacer { flex: 1; }
  .rail { left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
    height: 60px; padding: 0 6px; align-items: center; border-radius: 999px; background: var(--card);
    box-shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(26, 21, 18, .12); }
  .rail-brand { display: none; }
  .rail .places { flex: 1; justify-content: space-around; }
  .place { width: 48px; height: 48px; justify-content: center; border-radius: 50%; }
  .place-word { display: none; }
  .write-btn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 72px);
    width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 8px 24px rgba(26, 21, 18, .22); }
  .write-btn .place-ic, .write-btn .place-ic svg { width: 24px; height: 24px; }
  .foot { padding-bottom: 168px; }
}
@media (min-width: 1280px) {
  .cols.with-side { grid-template-columns: minmax(0, 648px) 320px; justify-content: center; gap: 24px; }
  .cols.with-side .page { margin: 0; }
  .side { display: block; position: sticky; top: 0; align-self: start; padding: 72px 0 32px; max-height: 100vh; overflow-y: auto; }
}

/* The face's menu (tools.mjs's menu, with rows of its own). */
.menu.face-menu { top: 52px; right: 0; width: 264px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-row.menu-person { padding: 10px; gap: 12px; }
.menu-who { display: flex; flex-direction: column; min-width: 0; }
.menu-who .menu-label { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sub { font-size: 13px; color: var(--muted); }
.menu-ic { display: inline-flex; width: 20px; height: 20px; color: var(--muted-strong); }
.menu-ic svg { width: 20px; height: 20px; }
.menu-group-label { margin: 6px 10px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.menu-row.radio .menu-check { display: inline-flex; width: 13px; height: 13px; color: var(--gold); visibility: hidden; }
.menu-row.radio .menu-check svg { width: 13px; height: 13px; }
.menu-row.radio[aria-checked="true"] .menu-check { visibility: visible; }
.menu-row.radio[aria-checked="true"] .menu-label { font-weight: 600; }
.menu-row.small { font-size: 13px; color: var(--muted-strong); padding-top: 6px; padding-bottom: 8px; }

/* Home's prompt: its kind over the question, and once answered, one line. */
.prompt-kind { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.prompt-folded { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 16px 20px; }
.prompt-folded-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.prompt-folded-line { font-family: var(--serif); font-size: 17px; }
.drafts-line { padding: 6px 4px; }

/* A card's mark where its countdown is: kept in ink, burned and Just me in
 * the secondary ink (the countdown keeps the fire's colours). */
.mark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.mark .ic, .mark-ic { width: 12px; height: 12px; display: inline-flex; }
.mark-ic svg { width: 12px; height: 12px; }
.kept-mark { color: var(--fg); font-weight: 600; }
.burned-mark, .justme-mark { color: var(--muted); }

/* Your profile's head, as the phone's profile: face, name, bio, link out. */
.profile-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.profile-head .profile-name { font-size: 22px; margin-top: 8px; overflow-wrap: anywhere; }
.profile-head .bio { margin: 4px 0 0; }
.profile-head .pill-btn { margin-top: 8px; }
.you-tabs { gap: 0; }
/* Four to a row at 320 too: each tab takes a quarter, its word never wraps,
 * and the padding gives way before the page scrolls sideways. */
.you-tab { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; padding-left: 4px; padding-right: 4px; }

/* Settings (letters-1026 W1): your photo, its circle to cut it to, and
 * what is the phone's. */
.set-face { display: inline-flex; }
.set-row.lead .who { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.set-value { margin: 0 0 8px; font-size: 15px; }
.on-phone { white-space: nowrap; }
.crop { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.crop-window { width: 240px; height: 240px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--border); touch-action: none; }
.crop-canvas { width: 240px; height: 240px; display: block; cursor: grab; }
.crop-canvas:focus-visible { outline: none; }
.crop-window:focus-within { box-shadow: 0 0 0 2px var(--gold); }
.crop-zoom { width: 220px; accent-color: var(--gold); }
#notifications .set-card { margin-top: 10px; }

/* ------------------------------------------------------------------ letters (letters-1026 W2) */
/* Post · Letter: two words, the chosen one a weight up in copper. */
.kind-switch { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.kind { border: 0; background: none; padding: 6px 4px; font-size: 15px; font-weight: 500; color: var(--muted-strong); cursor: pointer; border-radius: 6px; }
.kind.on { color: var(--gold-text); font-weight: 650; }
.kind.dim { opacity: .45; }
.kind-dot { color: var(--muted); }
.kind-note { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted-strong); margin-top: -6px; }
.kind-undo { border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 650; color: var(--gold-text); cursor: pointer; }
/* The long-post suggestion, above the writing. */
.suggest { display: flex; align-items: center; gap: 10px; max-width: 700px; width: calc(100% - 48px); margin: 10px auto 0; padding: 8px 8px 8px 14px;
  border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--border); font-size: 14px; }
.suggest[hidden] { display: none; }
.suggest-take { border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 650; color: var(--gold-text); cursor: pointer; margin-right: auto; }
/* The burn line: copper while it burns, ink once kept. */
.burn-line { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px; border: 0; background: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--gold-text); cursor: pointer; white-space: nowrap; }
.burn-line .ic { width: 11px; height: 11px; }
.burn-line.kept { color: var(--fg); }
.burn-line:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.burn-wrap[hidden] { display: none; }
/* A phone's width: the bar wraps, so its second row is the burn line and
   Post at the trailing edge, and focused writing stays in the letter's More
   (the window is already the words at that width). */
@media (max-width: 599px) {
  .write-bar .focus-btn { display: none; }
  .write-bar .burn-wrap { margin-left: auto; }
  .write-bar .burn-wrap[hidden] + * { margin-left: auto; }
}
.burn-menu { left: auto; right: 0; width: 260px; }
.burn-foot { border-top: 1px solid var(--border); padding-top: 10px; line-height: 1.5; }
.burn-control { position: relative; }
/* The letter's surface: a toolbar that stays as the words scroll, and the words. */
.letter-wrap { display: flex; flex-direction: column; gap: 10px; }
.letter-wrap[hidden] { display: none; }
.letter-bar { position: sticky; top: 56px; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px; margin: 0 -4px;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-radius: 12px; transition: opacity .25s var(--arrive); }
.letter-tools { display: flex; flex-wrap: wrap; gap: 2px; }
.tool { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 50%; color: var(--muted-strong); cursor: pointer; }
.tool svg { width: 20px; height: 20px; }
.tool:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.tool[aria-pressed="true"] { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.letter-body { min-height: 50vh; outline: none; font-family: var(--serif); font-size: 20px; line-height: 1.75; word-wrap: break-word; }
/* An empty letter is marked .empty for its placeholder, a name the empty
 * states' column (above) also takes: it stays a block, or its one line is
 * squeezed to no width and the caret has nowhere to draw. */
.letter-body.empty { display: block; }
.letter-body.empty::before, .letter-body:empty::before { content: attr(data-placeholder); color: color-mix(in srgb, var(--muted) 70%, transparent); position: absolute; pointer-events: none; }
.letter-body p, .letter-body ul, .letter-body blockquote { margin: 0 0 .9em; }
.letter-body h2 { font-size: 26px; font-weight: 600; line-height: 1.3; margin: 1.2em 0 .4em; }
.letter-body blockquote { padding-left: 18px; border-left: 2px solid var(--border); font-style: italic; color: var(--muted-strong); }
.letter-body ul { padding-left: 26px; }
.letter-body hr { border: 0; text-align: center; margin: 1.4em 0; height: 1.2em; }
.letter-body hr::after { content: "\00b7\2003\00b7\2003\00b7"; color: var(--muted); }
.letter-body a { color: var(--gold-text); text-decoration: underline; }
.letter-body .drop-before { box-shadow: 0 -3px 0 var(--gold); }
.letter-body .drop-after { box-shadow: 0 3px 0 var(--gold); }
.letter-body.dropping { background: color-mix(in srgb, var(--gold) 5%, transparent); border-radius: 10px; }
/* A letter's photo where it sits in the words. */
.lphoto { margin: 1.2em 0; user-select: none; }
.lphoto-in { position: relative; border-radius: 10px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--border); cursor: grab; outline-offset: 3px; }
.lphoto-in img { display: block; width: auto; max-width: 100%; max-height: min(520px, 60vh); margin: 0 auto; object-fit: contain; }
.lphoto-none { display: grid; place-items: center; height: 180px; color: var(--muted); }
.lphoto-in.uploading img, .lphoto-in.reading img, .lphoto-in.failed img { opacity: .55; }
.lphoto-status { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px;
  background: var(--card); box-shadow: var(--lift); font-family: var(--sans); font-size: 13px; color: var(--muted-strong); }
.lphoto-status.bad { color: var(--error); }
.lphoto-x { position: absolute; top: 8px; right: 8px; background: var(--card); box-shadow: var(--lift); }
.ring { display: inline-block; width: 18px; height: 18px; }
.ring svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring-track { stroke: var(--border); }
.ring-fill { stroke: var(--gold); transition: stroke-dashoffset .2s var(--arrive); }
/* A post's one video. */
.video-box { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); }
.video-box[hidden] { display: none; }
.video-box .photo-text { display: flex; align-items: center; gap: 8px; }
.photo-bar .ic svg { width: 15px; height: 15px; }
/* Focused writing: the page alone, the words at the measure, the count at the foot. */
.focus-foot { display: none; }
body.focus .focus-foot { display: block; position: fixed; bottom: 0; left: 0; right: 0; margin: 0; padding: 28px 16px max(14px, env(safe-area-inset-bottom));
  text-align: center; font-size: 12px; color: var(--muted); background: linear-gradient(to bottom, transparent, var(--card) 55%);
  font-variant-numeric: tabular-nums; pointer-events: none; }
/* Focused writing is the page alone: everything else is gone, not faded (the keys still work). */
body.focus[data-view="write"] :is(.write-bar, .letter-bar, .tool-row, .kind-switch, .kind-note, .suggest, .format-hint, .photo-tray,
  .video-box, .photo-note, .photo-elsewhere) { display: none !important; }
body.focus[data-view="write"] .sheet { padding-top: 120px; }
/* Its one control, in copper while it is on: the pill that leaves it. */
.focus-pill { display: none; }
body.focus .focus-pill { display: inline-flex; align-items: center; gap: 7px; position: fixed; z-index: 8;
  top: max(16px, env(safe-area-inset-top)); right: 16px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--gold-text); box-shadow: inset 0 0 0 1.5px var(--gold); font-size: 14px; font-weight: 600;
  animation: rise .18s var(--arrive); }
body.focus .focus-pill:hover { background: color-mix(in srgb, var(--gold) 8%, var(--card)); }
.focus-pill .ic, .focus-pill .ic svg { width: 14px; height: 14px; }
.focus-btn[aria-pressed="true"] { color: var(--gold-text); box-shadow: inset 0 0 0 1.5px var(--gold); }
body.focus-letter .sheet { max-width: calc(65ch + 48px); }
body.focus-letter .letter-body { font-size: 18px; line-height: 1.8; }
body.focus-letter .page-title { font-size: 30px; }
/* The shortcuts sheet. */
.keys-sheet { max-height: 60vh; overflow: auto; border-radius: 8px; }
.keys-sheet:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.keys-head { font-size: 13px; font-weight: 600; color: var(--muted-strong); margin: 4px 0 6px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px; }
.keys dt { margin: 0; } .keys dd { margin: 0; color: var(--muted-strong); }
.keys kbd { font-family: var(--sans); font-size: 12px; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--fg) 6%, transparent); box-shadow: inset 0 -1px 0 var(--border); white-space: nowrap; }
/* A letter's title on the post card: the serif, 17 semibold, in the words' own colour, two lines at most. */
.card.post .letter-title { font-size: 17px; line-height: 1.35; color: var(--fg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.letter-reader .article-title { margin-top: 14px; }
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.shelf-card { gap: 10px; }
.shelf-title { font-family: var(--serif); font-size: 18px; line-height: 1.3; font-weight: 600; margin: 0; }
.shelf-foot { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.shelf-name { font-weight: 600; }
.dot-sep { color: var(--muted); }
.long-reads.in-panel .shelf { grid-template-columns: 1fr; }
.panel-head { font-size: 15px; font-weight: 650; margin: 0 0 10px; }
.side-stack { display: flex; flex-direction: column; gap: 28px; }
/* A letter's page: the title in the serif, the body at the measure, a hairline of progress. */
.letter-reader { max-width: calc(65ch + 8px); }
.letter-reader .writing { max-width: 65ch; }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9; pointer-events: none; }
.read-progress-fill { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
.letter-foot { display: flex; align-items: center; gap: 14px; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); max-width: 65ch; }
.echo-line { margin: 0; font-size: 14px; color: var(--muted-strong); }
/* Echo on a post's page (echo.mjs): the pill floating over the foot of the
   page while there's an echo to send (FiammoEchoPill), the lines to pick
   (the composer's highlight: the words full ink on a wash of the copper),
   and the note on the composer's glass, held at the foot. */
.echo-foot { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-direction: column; align-items: center; margin: 20px 0 8px; pointer-events: none; }
.echo-foot > * { pointer-events: auto; }
.echo-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--lift);
  color: var(--fg); font: 500 15px/1 var(--sans); cursor: pointer; }
.echo-pill:hover { background: var(--card); }
.echo-pill .ic, .echo-pill .ic svg { width: 17px; height: 17px; }
.echo-pill[disabled] { opacity: .6; cursor: default; }
.echo-done { margin: 0; font-size: 13px; color: var(--muted); align-self: flex-start; }
.echo-foot .echo-done { align-self: flex-start; }
.echo-foot .echo-compose { width: 100%; padding: 0; }
.echo-hint { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.echo-pick { white-space: pre-wrap; overflow-wrap: anywhere; }
.echo-choice { cursor: pointer; border-radius: 4px; padding: 1px 0; transition: background-color .12s ease-out; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.echo-choice:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.echo-choice.on { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--fg); }
.echo-choice:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.echo-picked { display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow: auto; padding: 0 4px; }
.echo-picked-title { font-size: 12px; font-weight: 600; color: var(--muted-strong); }
.echo-picked-line { font-size: 14px; font-style: italic; white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) { .echo-choice { transition: none; } }
/* At phone width the foot clears the tab bar, and the note's glass takes the
   width the write button would cover while it is written. */
@media (max-width: 699.98px) {
  .echo-foot { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 72px); }
  body:has(.echo-compose) .write-btn { display: none; }
}
.get-letters { display: flex; flex-direction: column; gap: 4px; }
.set-list { list-style: none; margin: 0; padding: 0; }
@media (max-width: 699.98px) {
  .letter-bar { top: 52px; }
  .tool { width: 40px; height: 40px; }
  .burn-line span:first-child { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
  .letter-body { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .ring-fill, .letter-bar { transition: none; } }
a.back { text-decoration: none; }
a.back:hover { color: var(--fg); }
.set-page-title:focus, h1.title[id="set-page-h"]:focus { outline: none; }
/* A post's own page: the pill sits beside the burn control at the row's end. */
.byline > .burn-control { margin-left: 0; }

/* A post's burn (890): said, never chosen. */
.burn-plain { color: var(--muted); font-size: 13px; white-space: nowrap; align-self: center; }

/* Live's Letters section (2026-10-28): kept letters as a grid of titles. */
.kept-letters { margin-top: 22px; }
.kept-list { display: flex; flex-direction: column; }
.kept-row { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hairline, rgba(0,0,0,.08)); text-decoration: none; color: inherit; }
.kept-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kept-photo { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.owner-head { display: flex; gap: 8px; align-items: center; }
.kept-row .shelf-title { font-family: var(--serif, "Lora", serif); font-size: 17px; line-height: 1.3; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kept-sub { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kept-foot { margin-top: auto; }
.burned-letter { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.burned-letter .byline { gap: 6px; color: var(--secondary, inherit); }

/* The composer, 2026-10-28: X · Post · Letter · •••, one bar of + · audience · send,
   a quiet summary over it, and Details behind the dots. */
.compose-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0 4px; }
.compose-bar .spacer { flex: 1; }
.compose-bar .menu { top: auto; bottom: calc(100% + 6px); }
.compose-summary { display: block; max-width: 100%; margin: 8px 0 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compose-summary:hover { color: var(--fg); }
.compose-summary[hidden] { display: none; }
.details { display: flex; flex-direction: column; margin: 4px 0 8px; }
.detail-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0; border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); background: none; font: inherit; color: var(--fg); cursor: pointer; text-align: left; }
.detail-row[hidden] { display: none; }
.detail-row .ic, .detail-row .ic svg { width: 16px; height: 16px; flex-shrink: 0; }
.detail-label { font-size: 15px; }
.detail-value { margin-left: auto; font-size: 14px; color: var(--muted); max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-row .switch { margin-left: auto; width: 40px; height: 24px; border-radius: 12px; background: color-mix(in srgb, var(--fg) 16%, transparent); position: relative; transition: background .2s; }
.switch-row .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); transition: transform .2s var(--arrive); }
.switch-row .switch.on { background: var(--gold); }
.switch-row .switch.on::after { transform: translateX(16px); }
.detail-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.detail-sub { font-size: 13px; color: var(--muted); }
.switch-row:has(.detail-sub) { padding: 8px 0; }

/* Friend reading off (web_friends_reading_enabled): where the feed was, the
   empty state's shape saying friends' posts are read in the app, with the
   App Store and, on a wide window, a code for the phone (docs/mobbin-1106). */
.in-the-app { flex-direction: row; align-items: flex-start; gap: 16px; }
.in-the-app-ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--muted-strong); }
.in-the-app-ic svg { width: 18px; height: 18px; }
.in-the-app-words { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1; min-width: 0; }
.in-the-app-title { font-size: 15px; font-weight: 600; margin: 0; color: var(--fg); }
.in-the-app-why { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 6px; max-width: 46ch; }
.in-the-app-code { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.in-the-app-code canvas { border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border); }
.in-the-app-code figcaption { font-size: 12px; color: var(--muted); }
/* A phone has no use for a code to scan with itself. */
@media (max-width: 720px) { .in-the-app-code { display: none; } }

/* Home's door to the composer (Threads' and Substack's web): a face, a line, Post. */
.compose-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.compose-row .compose-hint { flex: 1; font-family: var(--serif); font-size: 16px; color: var(--muted); }
.compose-row:hover .compose-hint { color: var(--muted-strong); }
.compose-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; }
.section-head .section { margin: 0; }
.section-head .quiet-link { font-size: 13px; }

/* A page's wait, held back 300 ms (FiammoDelayed): a read that answers sooner shows none. */
.waits, .loading { animation: fiammo-wait 160ms var(--arrive) 300ms both; }
@keyframes fiammo-wait { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .waits, .loading { animation-duration: 1ms; } }
/* Posts waiting in the shape of posts (FiammoLoadingPost). */
.skeleton { display: flex; flex-direction: column; gap: 10px; }
.sk-byline { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sk-face { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 7%, transparent); }
.sk-line { display: block; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--fg) 6%, transparent); width: 100%; }
.sk-line.short { width: 28%; } .sk-line.mid { width: 62%; } .sk-line.long { width: 84%; }
.loading-posts .skeleton:nth-child(3) { opacity: .6; }
/* The day's prompt over its question, grey and with no capsule (DailyPromptTag). */
.prompt-tag { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 -6px; }
.read-more { align-self: flex-start; }
/* Home's written receipt: your first line back in the writing's face
   (FiammoQuotedLine), what it was in grey, and See note. */
.quoted-line { margin: 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--border); }
.quoted-line p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.written-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.written-foot .see-note { font-size: 13px; font-weight: 600; color: var(--gold-text); }
.card.prompt.written { display: flex; flex-direction: column; gap: 12px; }
.card.prompt.written .question { font-size: 19px; }
/* Edit profile | Share profile: two equal halves at the width's radius, ink words. */
.profile-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; width: 100%; margin-top: 10px; }
.btn.half { min-height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; border-radius: 10px; color: var(--fg); text-decoration: none; }
.btn.half:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
/* Your card, from Share profile: face, name, code, Copy link. */
.share-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 8px; }
.share-card .share-name { font-weight: 600; font-size: 16px; margin: 8px 0 0; }
.share-card .share-qr { margin: 12px 0 4px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border); }
.share-actions { display: flex; gap: 8px; margin-top: 8px; }

/* A mark of each alert's kind on the face's corner (AlertKindBadge): copper
   for an answer to what you wrote, slate for a person, eucalyptus for
   something shared. Slate and eucalyptus are avatar pastels and turn over
   at night as a face does; never ink. */
.alert-face.has-badge { position: relative; }
.kind-badge { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); }
.kind-badge svg { width: 11px; height: 11px; }
.kind-badge.answered { background: var(--gold); color: var(--paper); }
.kind-badge.person { background: #3F5F7D; color: #D4E0EC; }
.kind-badge.shared { background: #3C6559; color: #CFE3DB; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kind-badge.person { background: #D4E0EC; color: #3F5F7D; }
  :root:not([data-theme="light"]) .kind-badge.shared { background: #CFE3DB; color: #3C6559; } }
:root[data-theme="dark"] .kind-badge.person { background: #D4E0EC; color: #3F5F7D; }
:root[data-theme="dark"] .kind-badge.shared { background: #CFE3DB; color: #3C6559; }

/* Something arriving above what is being read waits behind a mark (FiammoNewAboveMark). */
.new-above { position: sticky; top: 12px; z-index: 5; align-self: center; display: block; margin: 8px auto; padding: 0 14px; min-height: 32px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: var(--lift); animation: fiammo-wait 180ms var(--arrive) both; }
.new-above:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.notice.with-action { display: inline-flex; align-items: center; gap: 12px; pointer-events: auto; }
.notice-action { border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 600; color: var(--on-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.notice-action:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
