/* Picky? v0.5 "Poster" design system. READ-ONLY for screen implementers: put screen layout in act1.css / act2.css
   and change this file only through the design lead (docs/superpowers/specs/2026-09-25-v05-poster-design.md).
   Rules of the look: one flat saturated field per act, black or white ink, no gradients, no shadows, no grey cards,
   one huge condensed numeral or word per screen, three type sizes per screen (hero / 16 / 12), 2.5px outlines,
   stickers tilted 2-5deg, fat pill buttons, a 24px margin grid on an 8px rhythm, 5-6 groups per screen at most.
   CSP: style-src 'self'. No inline styles anywhere; scripts may set CSSOM properties (el.style.x = ...) only for
   measured values (hero fitting, animation delays). */

/* ---------- fonts (self-hosted, public/fonts/OFL.txt) ---------- */
/* "Picky Display": Anton for Latin, Oswald Bold for Cyrillic (Anton has none). Declared for every weight so the
   browser never fakes a bold on top of an already black face. */
@font-face {
  font-family: "Picky Display";
  src: url("/fonts/anton-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Picky Display";
  src: url("/fonts/oswald-700-cyrillic.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- tokens ---------- */
:root {
  /* palette */
  --lime: #D4FF3A;
  --ink: #0B0B0B;
  --white: #FFFFFF;
  --coral: #FF5B3B;
  --cream: #F3EEE2;
  --violet: #6B4BFF;
  --slab: #262626;          /* the photo slab behind a portrait while it loads */

  /* faces */
  --display: "Picky Display", "HelveticaNeue-CondensedBlack", "Helvetica Neue Condensed Black", Impact, "Arial Narrow Bold", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;

  /* type scale: one hero size per screen + 16 + 12 */
  --t-16: 16px; --lh-16: 22px;
  --t-12: 12px; --lh-12: 16px;
  --hero-xl: clamp(150px, 61vw, 232px);   /* the numeral: count, admirers, share */
  --hero-l: clamp(72px, 29vw, 108px);     /* the landing question */
  --hero-m: clamp(56px, 20vw, 76px);      /* story headlines, the test name */
  --hero-s: 44px;                         /* friend dare, zero moment */

  /* grid */
  --m: 24px;                /* screen margin */
  --u: 8px;                 /* rhythm */
  --line: 2.5px;            /* every outline */
  --r-block: 24px;          /* blocks: photo, share card, sheets (20-28) */
  --r-box: 20px;            /* the rules box */
  --r-pill: 999px;
  --h-btn: 56px; --h-chip: 44px; --h-pill: 32px; --h-tag: 24px;
  --maxw: 430px;

  /* motion */
  --dur-count: 600ms;       /* numbers count up or down */
  --dur-slap: 180ms;        /* stickers slap in, scale 1.15 -> 1 */
  --ease-slap: cubic-bezier(.2, 1.4, .4, 1);

  /* act tokens (set per act below; landing values are the default) */
  --field: var(--lime);     /* the flat background of the act */
  --on: var(--ink);         /* ink on the field: text, outlines */
  --accent: var(--ink);     /* primary button fill */
  --accent-on: var(--lime); /* primary button text */
  --paper: var(--white);    /* boxes and sticker fills */
  --paper-on: var(--ink);
  --hot: var(--coral);      /* a caught rule: the stamp */
  --hot-on: var(--ink);
  --match: var(--white);    /* a mutual yes: ring and fill */
  --tag-bg: var(--white); --tag-on: var(--ink);
  --disc-bg: var(--ink); --disc-fg: var(--lime);
}

/* One flat field per act. data-act sits on <body> (set by app.js on every route) and on each screen section. */
[data-act="landing"], [data-act="rules"], [data-act="friend"] {
  --field: var(--lime); --on: var(--ink); --accent: var(--ink); --accent-on: var(--lime);
  --paper: var(--white); --paper-on: var(--ink); --hot: var(--coral); --hot-on: var(--ink); --match: var(--white);
  --tag-bg: var(--white); --tag-on: var(--ink); --disc-bg: var(--ink); --disc-fg: var(--lime);
}
[data-act="test"] {
  --field: var(--ink); --on: var(--white); --accent: var(--lime); --accent-on: var(--ink);
  --paper: var(--white); --paper-on: var(--ink); --hot: var(--coral); --hot-on: var(--ink); --match: var(--lime);
  --tag-bg: var(--lime); --tag-on: var(--ink); --disc-bg: var(--slab); --disc-fg: var(--lime);
}
[data-act="reveal"] {
  --field: var(--coral); --on: var(--ink); --accent: var(--ink); --accent-on: var(--white);
  --paper: var(--white); --paper-on: var(--ink); --hot: var(--ink); --hot-on: var(--white); --match: var(--white);
  --tag-bg: var(--ink); --tag-on: var(--white); --disc-bg: var(--ink); --disc-fg: var(--coral);
}
[data-act="flip"] {
  --field: var(--cream); --on: var(--ink); --accent: var(--ink); --accent-on: var(--lime);
  --paper: var(--white); --paper-on: var(--ink); --hot: var(--coral); --hot-on: var(--ink); --match: var(--lime);
  --tag-bg: var(--ink); --tag-on: var(--white); --disc-bg: var(--ink); --disc-fg: var(--cream);
}
[data-act="share"] {
  --field: var(--ink); --on: var(--white); --accent: var(--lime); --accent-on: var(--ink);
  --paper: var(--white); --paper-on: var(--ink); --hot: var(--lime); --hot-on: var(--ink); --match: var(--lime);
  --tag-bg: var(--lime); --tag-on: var(--ink); --disc-bg: var(--slab); --disc-fg: var(--violet);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--field); color: var(--on);
  font-family: var(--text); font-size: var(--t-16); line-height: var(--lh-16); font-weight: 600;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--on); outline-offset: 3px; }
::selection { background: var(--on); color: var(--field); }

/* ---------- screens ---------- */
#app { max-width: var(--maxw); margin: 0 auto; }
.screen {
  display: none; flex-direction: column; gap: var(--m);
  min-height: 100dvh;
  padding: calc(32px + env(safe-area-inset-top)) var(--m) calc(var(--m) + env(safe-area-inset-bottom));
  background: var(--field); color: var(--on);
  /* A hero is fitted by measuring it (app.js fit()). Before the first fit a long word (Russian at 108px) overflows;
     if that widened the page, a phone would zoom out. Clip, never scroll (clip keeps the sticky docks working). */
  overflow-x: clip;
}
.screen.active { display: flex; }
/* Fields hard-cut between acts: no transition on background, ever. */

/* ---------- type ---------- */
.micro { font-size: var(--t-12); line-height: var(--lh-12); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.text, .lede { font-size: var(--t-16); line-height: var(--lh-16); font-weight: 600; }
.lede { max-width: 300px; }
.strong { font-weight: 800; }
.fine { font-size: var(--t-12); line-height: var(--lh-12); font-weight: 600; opacity: .7; }
.fine a { opacity: 1; }
.hero {
  font-family: var(--display); font-weight: 400; font-synthesis: none;
  line-height: .86; letter-spacing: -.01em; text-transform: uppercase;
  overflow-wrap: normal; word-break: normal; hyphens: none;
  margin-left: -4px; /* optical: condensed caps sit on the 24px line */
}
.hero-xl { font-size: var(--hero-xl); line-height: .76; letter-spacing: -.02em; }
.hero-l { font-size: var(--hero-l); }
.hero-m { font-size: var(--hero-m); line-height: .88; }
.hero-s { font-size: var(--hero-s); line-height: .9; }
/* Cyrillic caps carry marks above (Й, Ё: 1.03 em) and tails below (Щ, Ц, Д: 0.16 em): a wrapped small hero in
   Russian needs lines 1.2 em apart or "ЛУЧШЕ, ЧЕМ" sits on "ТВОЙ ДРУГ?". */
:lang(ru) .hero-s.wrap { line-height: 1.22; }
.hero em, .hero .hi { font-style: normal; color: var(--hero-hi, var(--white)); }
[data-act="reveal"] .hero em { color: var(--white); }
[data-act="rules"] .hero em, [data-act="landing"] .hero em, [data-act="flip"] .hero em { color: var(--on); }
.num { font-variant-numeric: tabular-nums; }
/* [data-fit]: app.js shrinks the hero until its widest line fits the column (fitHero), from its CSS size down. */
[data-fit] { white-space: nowrap; }
[data-fit].wrap { white-space: normal; }

/* hero numeral + two-line caption, bottoms aligned */
.lockup { display: flex; align-items: flex-end; gap: 10px; }
.lockup .hero { margin-left: -6px; }
.lockup .cap { font-size: var(--t-16); line-height: 20px; font-weight: 700; padding-bottom: 2px; }

/* ---------- brand ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--u); min-height: var(--h-pill); }
.wordmark { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 28px; line-height: 1; letter-spacing: -.01em; text-transform: uppercase; color: var(--on); text-decoration: none; }
.wordmark-q { display: inline-flex; align-items: center; justify-content: center; margin-left: .1em; padding: .06em .2em; border-radius: .22em; background: var(--on); color: var(--field); rotate: 8deg; }
.wordmark.big { font-size: 64px; }
.brand-img { height: 28px; width: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--u);
  height: var(--h-btn); padding: 0 var(--m); border-radius: var(--r-pill);
  border: var(--line) solid transparent; background: transparent; color: var(--on);
  font-size: var(--t-16); font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--on); border-color: var(--on); }
.btn-paper { background: var(--paper); color: var(--paper-on); border-color: var(--on); }
.btn-wide { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; }
.btn:not(:disabled):active { translate: 0 1px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--u); }
.btn-row > .btn { width: 100%; min-width: 0; padding: 0 12px; white-space: normal; text-align: center; line-height: 1.15; }
/* The pool pair: side by side in English, stacked where the labels run long (Russian). */
.pools:lang(ru) { grid-template-columns: 1fr; }
.btn-row > .btn-wide { grid-column: 1 / -1; }
.link { font-size: var(--t-16); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; min-height: var(--h-chip); display: inline-flex; align-items: center; }

/* ---------- chips: one-tap choices (44px, outlined; on = paper fill) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--u); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--h-chip); padding: 0 16px; border-radius: var(--r-pill);
  border: var(--line) solid var(--on); background: transparent; color: var(--on);
  font-size: var(--t-16); font-weight: 700; white-space: nowrap;
}
.chip.on, .chip[aria-pressed="true"] { background: var(--paper); color: var(--paper-on); }
.chip .after { font-weight: 800; }            /* "→ 31 left" */
.chip.dashed { border-style: dashed; }        /* "Don't care" */
.chip:disabled { opacity: .35; }

/* ---------- pills: rule stickers (32px caps; hard = lime fill + lock, soft = paper + heart) ---------- */
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--u); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--h-pill); padding: 0 12px; border-radius: var(--r-pill);
  border: var(--line) solid var(--on); background: var(--paper); color: var(--paper-on);
  font-size: var(--t-12); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.pill-hard { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.pill-soft { background: var(--paper); color: var(--paper-on); }
.pill-live { border-style: dashed; }
.pill-out { background: transparent; color: var(--accent); border-color: var(--accent); }   /* facts on the ink field */
.pill-hot { background: var(--hot); color: var(--hot-on); border-color: var(--on); }
.pill-icon, .pill-x { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; margin: 0 -6px; font-size: var(--t-12); font-weight: 900; }
.pill-icon { margin-right: 0; }
.pill .cost { font-weight: 900; }            /* dealbreaker cost: "−27" */
.pill.two-line { height: auto; min-height: var(--h-pill); padding: 4px 12px; flex-direction: column; align-items: flex-start; gap: 0; border-radius: 16px; }
.pill .typed { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: .7; }   /* you: "no smokers" */
/* tilts: stickers are slapped on by hand */
.tilt-l { rotate: -3deg; } .tilt-r { rotate: 2deg; } .tilt-l2 { rotate: -5deg; } .tilt-r2 { rotate: 4deg; }
.tilted > :nth-child(4n+1) { rotate: -3deg; } .tilted > :nth-child(4n+2) { rotate: 2deg; }
.tilted > :nth-child(4n+3) { rotate: -2deg; } .tilted > :nth-child(4n+4) { rotate: 3deg; }

/* ---------- stickers: slapped labels (the act-two question, the eyebrow, "fictional · AI-made") ---------- */
.sticker {
  display: inline-flex; align-items: center; align-self: flex-start;
  height: var(--h-chip); padding: 0 18px; border-radius: var(--r-pill);
  background: var(--on); color: var(--field);
  font-size: var(--t-16); font-weight: 800; white-space: nowrap;
  rotate: -3deg; transform-origin: left center;
}
.sticker-paper { background: var(--paper); color: var(--paper-on); border: var(--line) solid var(--on); }
.sticker-sm { height: var(--h-pill); padding: 0 12px; font-size: var(--t-12); letter-spacing: .06em; text-transform: uppercase; }
.sticker-tag { height: var(--h-tag); padding: 0 8px; font-size: var(--t-12); font-weight: 800; letter-spacing: .02em; }

/* ---------- stamps: CAUGHT (small, coral) and the verdict (round lime sticker, double ring) ---------- */
.stamp {
  display: inline-flex; align-items: center; height: var(--h-tag); padding: 0 7px;
  border-radius: 4px; background: var(--hot); color: var(--hot-on); border: var(--line) solid var(--on);
  font-size: var(--t-12); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  rotate: 12deg;
}
.stamp-round {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 136px; height: 136px; border-radius: 50%; padding: 18px;
  background: var(--lime); color: var(--ink); border: 3px solid var(--ink);
  font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: var(--t-16); line-height: 18px;
  letter-spacing: .08em; text-transform: uppercase; text-align: center; rotate: -12deg;
}
.stamp-round::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid var(--ink); }
.stamp-round.big { width: 232px; height: 232px; padding: 32px; font-size: 28px; line-height: 30px; }

/* ---------- faces: real portrait thumbnails in discs; flat silhouette discs where no portrait is shown ---------- */
/* <button class="face f-52"><img class="thumb" src="/thumbs/96/w001.jpg" alt=""></button>  (app.js ctx.face())
   Use /thumbs/96 up to 48px, /thumbs/192 above. States: dim (said no / not you), liked, match (mutual), ring. */
.face { position: relative; display: inline-block; flex: none; width: var(--size, 52px); height: var(--size, 52px); border-radius: 50%; background: var(--disc-bg); color: var(--on); }
.face.f-24 { --size: 24px; } .face.f-36 { --size: 36px; } .face.f-42 { --size: 42px; } .face.f-52 { --size: 52px; }
.face.f-56 { --size: 56px; } .face.f-72 { --size: 72px; } .face.f-96 { --size: 96px; }
.face > .thumb { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 28%; }
.face.disc { overflow: hidden; }
.face.disc::before { content: ""; position: absolute; left: 32%; top: 20%; width: 36%; height: 36%; border-radius: 50%; background: var(--disc-fg); }
.face.disc::after { content: ""; position: absolute; left: 14%; top: 62%; width: 72%; height: 64%; border-radius: 50%; background: var(--disc-fg); }
.face.ring { outline: var(--line) solid var(--on); outline-offset: 0; }
.face.dim { opacity: .3; }
.face.dim > .thumb { filter: grayscale(1); }
.face.liked { outline: var(--line) solid var(--on); outline-offset: 2px; }
.face.match { outline: 3px solid var(--match); outline-offset: 2px; }
.face.placeholder { background: transparent; border: var(--line) dashed var(--on); opacity: .4; }
.face .badge {
  position: absolute; right: -4px; top: -4px; z-index: 1;
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--white); border: var(--line) solid var(--ink); font-size: var(--t-16); line-height: 1; rotate: -8deg;
}
.face .badge.match { background: var(--match); color: var(--ink); }
.face .tag {
  position: absolute; left: 50%; bottom: -13px; z-index: 1; translate: -50% 0; rotate: -4deg;
  display: inline-flex; align-items: center; height: var(--h-tag); padding: 0 8px; border-radius: var(--r-pill);
  background: var(--tag-bg); color: var(--tag-on); border: var(--line) solid var(--on);
  font-size: var(--t-12); font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.face .stamp { position: absolute; right: -34px; top: -10px; z-index: 2; }
button.face { cursor: pointer; }
.faces-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.faces-grid { display: grid; grid-template-columns: repeat(4, var(--size, 72px)); justify-content: space-between; row-gap: 36px; }
.faces-grid.g8 { grid-template-columns: repeat(8, var(--size, 36px)); row-gap: 8px; }
.more-n { display: inline-flex; align-items: center; justify-content: center; width: var(--size, 36px); height: var(--size, 36px); border-radius: 50%; border: var(--line) dashed var(--on); font-size: var(--t-12); font-weight: 800; }
.face.enter { animation: pop var(--dur-slap) var(--ease-slap) both; }

/* ---------- the portrait slab (test page, sheets) ---------- */
.photo { position: relative; overflow: hidden; border-radius: 28px; background: var(--slab); aspect-ratio: 327 / 344; width: 100%; }
.photo > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.photo .ai-tag { position: absolute; left: 12px; top: 12px; }

/* ---------- the rules box: every rule pill plus the input, in one white box ---------- */
.rulebox {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px var(--u);
  min-height: 72px; padding: 16px; border-radius: var(--r-box);
  background: var(--paper); color: var(--paper-on); border: var(--line) solid var(--on);
}
.rulebox-input { flex: 1 1 140px; min-width: 120px; height: var(--h-pill); border: 0; outline: 0; background: transparent; font-size: var(--t-16); font-weight: 500; color: var(--paper-on); }
.rulebox-input::placeholder { color: var(--paper-on); opacity: .4; }
.rulebox-enter { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--lime); font-weight: 900; }
.rulebox:focus-within { outline: 3px solid var(--on); outline-offset: 3px; }

/* ---------- receipts and quotes: a face, a name and their own words, proof span highlighted ---------- */
.receipt { display: flex; flex-direction: column; gap: 6px; }
.receipt-row { display: flex; align-items: center; gap: 10px; }
.quote { font-size: var(--t-16); line-height: var(--lh-16); font-weight: 600; padding-left: 16px; border-left: var(--line) solid var(--on); }
[data-act="test"] .quote { border-left-color: var(--lime); }
mark, .proof { background: var(--on); color: var(--field); padding: 0 3px; border-radius: 3px; }

/* ---------- Swiss table rows (act-two prompts) and segmented answers ---------- */
.rows { border-bottom: var(--line) solid var(--on); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--u); min-height: var(--h-chip); padding: 6px 0; border-top: var(--line) solid var(--on); font-size: var(--t-16); font-weight: 600; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.seg-btn { height: var(--h-pill); padding: 0 12px; border-radius: var(--r-pill); border: var(--line) solid var(--on); background: transparent; font-size: var(--t-12); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.seg-btn[aria-pressed="true"] { background: var(--on); color: var(--field); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: var(--h-pill); height: var(--h-pill); border-radius: 50%; border: var(--line) solid var(--on); font-weight: 900; }
.stepper output { min-width: 40px; text-align: center; font-weight: 800; }
.textbox { width: 100%; min-height: 88px; padding: 14px 16px; border-radius: var(--r-box); border: var(--line) solid var(--on); background: var(--paper); color: var(--paper-on); font-size: var(--t-16); font-weight: 500; resize: vertical; }
.textbox:focus { outline: 3px solid var(--on); outline-offset: 3px; }
.textbox::placeholder { color: var(--paper-on); opacity: .4; }

/* ---------- story cards (the reveal): full-bleed, tap right 65% = next, left 35% = back, no timers ---------- */
.story { position: relative; display: flex; flex-direction: column; flex: 1; gap: var(--m); }
.story-card { display: none; flex-direction: column; gap: var(--m); flex: 1; position: relative; z-index: 1; }
.story-card.now { display: flex; }
.story-tap { position: absolute; top: 0; bottom: 0; z-index: 0; background: transparent; }
.story-tap.back { left: 0; width: 35%; }
.story-tap.next { right: 0; width: 65%; }
.story-card button, .story-card a, .story-card .face { position: relative; z-index: 2; }
.dots { display: flex; gap: 6px; align-items: center; height: var(--h-pill); }
.dot { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--on); opacity: .25; }
.dot.done { opacity: 1; }
.dot.now { width: 28px; opacity: 1; }

/* ---------- the share card: violet 9:16 on the ink field, white ink, the verdict as a lime sticker ---------- */
.share-card {
  position: relative; overflow: hidden; width: 100%; max-width: 327px; aspect-ratio: 9 / 16; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px; padding: var(--m);
  border-radius: var(--r-block); background: var(--violet); color: var(--white);
}
.share-card .brand-line { letter-spacing: .14em; }
.share-card .close { padding-top: 14px; border-top: var(--line) solid var(--white); }
.share-card .foot { margin-top: auto; }
.share-card .stamp-round { position: absolute; right: 20px; top: 47%; z-index: 2; }   /* beside "Then I said yes..." */
.share-text { padding: 12px 16px; border-radius: var(--r-box); border: var(--line) solid var(--on); font-size: var(--t-12); line-height: var(--lh-12); font-weight: 600; user-select: all; }

/* ---------- sheet (dialog#sheet): a flat bottom sheet ---------- */
.sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: var(--maxw); max-height: 84dvh; margin: 0 auto; padding: 0;
  border: 0; border-top: var(--line) solid var(--ink); border-radius: 28px 28px 0 0;
  background: var(--cream); color: var(--ink); overflow: auto;
}
.sheet::backdrop { background: rgba(11, 11, 11, .6); }
.sheet-body { display: flex; flex-direction: column; gap: 16px; padding: var(--m) var(--m) calc(var(--m) + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--u); }
.sheet-x { width: var(--h-chip); height: var(--h-chip); border-radius: 50%; border: var(--line) solid var(--ink); font-size: 20px; font-weight: 900; }
.sheet[open] { animation: rise 200ms ease-out; }

/* ---------- toast (#toast holds one at a time) ---------- */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--m) + env(safe-area-inset-bottom)); z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; height: var(--h-chip); padding: 0 20px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--white); border: var(--line) solid var(--white);
  font-size: var(--t-16); font-weight: 700; animation: pop var(--dur-slap) var(--ease-slap) both;
}

/* ---------- language switch: EN | RU ---------- */
.lang-switch { display: inline-flex; }
.lang-btn { height: var(--h-pill); min-width: 44px; padding: 0 10px; border: var(--line) solid var(--on); font-size: var(--t-12); font-weight: 800; letter-spacing: .08em; }
.lang-btn:first-child { border-radius: var(--r-pill) 0 0 var(--r-pill); }
.lang-btn:last-child { border-radius: 0 var(--r-pill) var(--r-pill) 0; margin-left: calc(-1 * var(--line)); }
.lang-btn[aria-pressed="true"] { background: var(--on); color: var(--field); }

/* ---------- look switch: "Look: Poster · Editorial" (footer, landing and share only; app.js flips html[data-look]) ---------- */
.look-switch { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-12); line-height: var(--lh-12); font-weight: 700; }
.look-btn { min-height: var(--h-pill); padding: 0 6px; font-size: var(--t-12); font-weight: 700; opacity: .65; }
.look-btn[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
body:not([data-act="landing"]):not([data-act="share"]) .look-switch { display: none; }

/* ---------- sticky bottom dock for the screen's CTA (flat: the field colour, no fade) ---------- */
.dock { position: sticky; bottom: 0; z-index: 5; margin-top: auto; display: flex; flex-direction: column; gap: var(--u); padding: 16px 0 env(safe-area-inset-bottom); background: var(--field); }

/* ---------- footer (legal line + second language switch) ---------- */
.legal { max-width: var(--maxw); margin: 0 auto; padding: var(--m) var(--m) calc(var(--m) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }

/* ---------- PWA install card (built by pwa.js under the share buttons) ---------- */
.install-card { position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 44px 12px 12px; border-radius: var(--r-box); background: var(--paper); color: var(--paper-on); border: var(--line) solid var(--on); }
.install-card img { border-radius: 10px; }
.install-copy b { display: block; font-weight: 800; }
.install-copy span { font-size: var(--t-12); line-height: var(--lh-12); }
.install-go { height: 40px; padding: 0 16px; border-radius: var(--r-pill); background: var(--ink); color: var(--lime); font-weight: 700; }
.install-x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; }
.ios-steps { grid-column: 1 / -1; margin: 4px 0 0; padding-left: 20px; list-style: decimal; font-size: var(--t-12); line-height: 20px; }

/* ---------- utilities ---------- */
.hidden { display: none !important; }
.contents { display: contents; }
.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; }
.stack { display: flex; flex-direction: column; gap: var(--m); }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.push { margin-top: auto; }
.center { text-align: center; align-items: center; }
.soft { opacity: .6; }
.rule-top { padding-top: 14px; border-top: var(--line) solid var(--on); }
.rule-y { padding: 16px 0; border-top: var(--line) solid var(--on); border-bottom: var(--line) solid var(--on); }

/* ---------- motion ---------- */
.slap { animation: slap var(--dur-slap) var(--ease-slap) both; }
.shake { animation: shake 400ms ease both; }
@keyframes slap { from { scale: 1.15; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes rise { from { translate: 0 40px; } to { translate: 0 0; } }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  /* transition-property defaults to `all`, so the 1ms above would make a fitted hero's font-size transition and fit()
     would measure the old size and shrink the hero to its floor. Fitted heroes (and their inline children) never
     transition. */
  [data-fit], [data-fit] * { transition-property: none !important; }
}

/* ---------- wider screens: the phone column stays 430px, the field fills the window ---------- */
@media (min-width: 700px) {
  .screen { padding-top: calc(48px + env(safe-area-inset-top)); }
}
