/* Kofe
 *
 * A house in the evening. The page is warm charcoal with a little paper in
 * it, every room is a photograph lit from inside, type is ivory, and gold is
 * kept for what is open, chosen or lit.
 *
 * Order of this file: tokens, base, parts (buttons, fields, chips, avatars),
 * the frame (top bar, tab bar), then one section per screen, then the room.
 *
 * Widths: phone is up to 760px, tablet up to 1000px. app.js asks the same
 * question with matchMedia('(max-width: 760px)').
 */

/* ------------------------------------------------------------------ tokens */
:root {
  /* night, the house look */
  --bg: #1b1815;            /* warm charcoal: the page */
  --deep: #0f0d0b;          /* brown-black: behind pictures, inside a room */
  --surface: #25201b;       /* deep taupe: panels */
  --raised: #302a23;        /* what sits on a panel */
  --sunk: #151210;          /* wells: inputs on a panel */
  --ink: #f4eee2;           /* soft ivory */
  --ink-2: #dcd3c3;         /* parchment, for long text */
  --muted: #a69d8f;         /* smoke */
  --faint: #7d7469;         /* stone */
  --line: rgba(244, 238, 226, 0.09);
  --line-2: rgba(244, 238, 226, 0.18);
  --door: #cba660;          /* restrained gold: chosen, checked */
  --door-ink: #1d1406;
  --door-soft: rgba(203, 166, 96, 0.14);
  --lamp: #e3ad54;          /* muted amber: open, lit */
  --lamp-ink: #2a1c05;
  --lamp-glow: rgba(227, 173, 84, 0.24);
  --btn: #f4eee2;           /* the main button is ivory, not gold */
  --btn-ink: #18140f;
  --danger: #f08e84;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.32);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .94 0 0 0 0 .84 .11 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;

  --display: "Bodoni Moda", "Noto Serif Display", "Noto Serif Armenian", "Didot", "Bodoni 72", "Iowan Old Style", Georgia, serif;
  --body: "Hanken Grotesk", "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;

  /* type: one scale, used everywhere */
  --t-xs: 12.5px;
  --t-sm: 14px;
  --t-base: 16px;
  --t-md: 18px;
  --t-lg: 22px;
  --t-xl: 28px;
  --t-2xl: clamp(30px, 3.6vw, 40px);
  --t-3xl: clamp(38px, 5.4vw, 60px);
  --t-hero: clamp(48px, 8vw, 112px);

  /* space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;

  /* shape */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 26px;
  --arch: 220px;            /* the top of a door */

  /* motion: few, slow enough to be felt, never in the way */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 0.15s;
  --med: 0.3s;
  --slow: 0.6s;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --top-h: 64px;
  --tab-h: 62px;
}

/* Each screen has its own depth, so the house breathes. */
:root[data-screen="rooms"] { --bg: #201c18; }
:root[data-screen="talk"] { --bg: #191613; }
:root[data-screen="me"] { --bg: #221c16; --surface: #2b241d; --raised: #362e25; }
:root[data-screen="door"] { --bg: #1d1916; }
:root[data-screen="room"] { --bg: #0c0a08; }
:root[data-screen="front"] { --bg: #161310; --max: 1360px; }

/* The same house by day: parchment walls, the pictures stay dark. */
:root[data-theme="light"] {
  --bg: #efe7d8;
  --deep: #14110e;
  --surface: #f8f2e6;
  --raised: #fffaf0;
  --sunk: #e9dfcd;
  --ink: #1f1912;
  --ink-2: #3a3126;
  --muted: #6b6052;
  --faint: #978b7b;
  --line: rgba(31, 25, 18, 0.1);
  --line-2: rgba(31, 25, 18, 0.2);
  --door: #8a6420;
  --door-ink: #fffaf0;
  --door-soft: rgba(138, 100, 32, 0.12);
  --lamp: #e0a23a;
  --lamp-ink: #3a2705;
  --lamp-glow: rgba(224, 162, 58, 0.34);
  --btn: #1f1912;
  --btn-ink: #f4eee2;
  --danger: #b3362d;
  --shadow: 0 1px 2px rgba(40, 30, 15, 0.06), 0 12px 30px rgba(40, 30, 15, 0.1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .18 0 0 0 0 .1 .1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="light"][data-screen="rooms"] { --bg: #f1e9db; }
:root[data-theme="light"][data-screen="talk"] { --bg: #ebe3d3; }
:root[data-theme="light"][data-screen="me"] { --bg: #f0e6d3; --surface: #faf3e4; --raised: #fffaf0; }
:root[data-theme="light"][data-screen="door"] { --bg: #eee6d7; }
:root[data-theme="light"][data-screen="room"] { --bg: #efe7d8; }

/* Anything that sits on a photograph is evening in both looks. */
.night {
  --bg: #0f0d0b;
  --surface: rgba(20, 16, 12, 0.6);
  --raised: rgba(40, 33, 26, 0.7);
  --ink: #f4eee2;
  --ink-2: #e2d9c9;
  --muted: #c2b8a8;
  --faint: #91877a;
  --line: rgba(244, 238, 226, 0.14);
  --line-2: rgba(244, 238, 226, 0.26);
  --door: #d8b36b;
  --door-ink: #1d1406;
  --door-soft: rgba(15, 13, 11, 0.5);
  --lamp: #e9b45c;
  --lamp-ink: #2a1c05;
  --lamp-glow: rgba(233, 180, 92, 0.28);
  --btn: #f4eee2;
  --btn-ink: #18140f;
  color: var(--ink);
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg) var(--grain);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--slow) ease;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--door); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
.label { font-size: var(--t-sm); font-weight: 650; color: var(--door); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
/* a person's own words take the look of the line they stand in */
span[data-own][data-own] { all: unset; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 15.5px; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer;
  transition: transform var(--fast) ease, background var(--fast) ease, border-color var(--fast) ease, filter var(--fast) ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-lamp { background: var(--lamp); color: var(--lamp-ink); }
.btn-lamp:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-soft { background: var(--surface); color: var(--ink); }
.btn-soft:hover { background: var(--raised); }
.btn-quiet { background: transparent; color: var(--muted); padding: 0 12px; min-height: 44px; }
.btn-quiet:hover { color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: var(--t-sm); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
  transition: background var(--fast) ease, color var(--fast) ease;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: var(--t-sm); background: none; border: 0; cursor: pointer; }
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; flex: none;
  border-radius: 999px; border: 0; background: var(--surface);
  font-size: var(--t-sm); font-weight: 600; cursor: pointer; color: var(--ink-2); white-space: nowrap;
  transition: background var(--fast) ease, color var(--fast) ease;
}
.chip:hover { background: var(--raised); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip.static { cursor: default; }
.chip.static:hover { background: var(--surface); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: var(--t-xs); font-weight: 700; background: var(--door-soft); color: var(--ink);
}
.pill-live { background: var(--lamp); color: var(--lamp-ink); }
.pill-check { background: transparent; border: 1px solid var(--door); color: var(--door); }
.live-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 4px var(--lamp-glow); }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-style: normal;
  background: var(--lamp); color: var(--lamp-ink); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; flex: none;
}

/* ------------------------------------------------------------------ fields */
.field { display: grid; gap: 8px; }
.field label, .field .lab { font-size: var(--t-sm); font-weight: 650; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid transparent; background: var(--surface);
  padding: 13px 16px; font-size: 16px; color: var(--ink);
  transition: border-color var(--fast) ease, background var(--fast) ease;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--door); background: var(--raised); }
.field .hint { font-size: 13px; color: var(--faint); }
.err { color: var(--danger); font-weight: 600; font-size: var(--t-sm); }
.err:empty { display: none; }
.seg { display: inline-flex; border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; background: var(--surface); justify-self: start; }
.seg button { border: 0; background: transparent; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: var(--t-sm); cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: var(--shadow); }
.lang {
  min-height: 44px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-2); font-size: var(--t-sm); font-weight: 650; cursor: pointer; max-width: 100%;
}
.lang option { color: #1f1912; background: #f4eee2; }

/* ----------------------------------------------------------------- avatars */
.av {
  --size: 36px;
  width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: calc(var(--size) * 0.36); font-weight: 750;
  color: #fff; background: hsl(var(--h, 30) 22% 34%);
  box-shadow: 0 0 0 2px var(--bg);
}
.av.pt, .av.ph { overflow: hidden; background: hsl(var(--h, 30) 20% 17%); }
.av.pt svg { width: 100%; height: 100%; display: block; }
.av.ph img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.av.house { background: var(--surface); color: var(--ink); }
.av.house svg { width: 46%; height: auto; }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -8px; }

/* -------------------------------------------------------------- the frame */
.brand { display: inline-flex; align-items: flex-end; gap: 9px; text-decoration: none; color: var(--ink); flex: none; min-height: 44px; padding-block: 8px; }
.logo-sym { height: 27px; width: auto; display: block; }
.logo-sym .logo-light { fill: var(--lamp); }
.logo-word { height: 28px; width: auto; display: block; fill: currentColor; stroke: currentColor; stroke-width: 9; stroke-linejoin: round; }
.brand.big .logo-sym { height: 44px; }
.brand.big .logo-word { height: 46px; stroke-width: 5; }

.top {
  position: sticky; top: 0; z-index: 30; min-height: var(--top-h);
  display: flex; align-items: center; gap: var(--s-5);
  padding: calc(env(safe-area-inset-top, 0px)) var(--gutter) 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  transition: background-color var(--slow) ease;
}
.top-in { width: 100%; max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: var(--s-5); min-height: var(--top-h); }
.top-nav { display: flex; gap: 4px; align-items: center; margin-left: var(--s-4); }
.top-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 650; font-size: 15.5px;
  transition: color var(--fast) ease, background var(--fast) ease;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.top-nav .av { box-shadow: none; }
.top-tools { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
/* over the first picture of the front page the bar is clear */
.top.over { position: fixed; left: 0; right: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.top.over.scrolled { background: color-mix(in srgb, #14110e 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.main { width: 100%; max-width: var(--max); margin: 0 auto; padding: var(--s-5) var(--gutter) var(--s-8); min-width: 0; }
.page-head { display: flex; gap: var(--s-4) var(--s-5); align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--s-5); }
.page-head h1 { font-family: var(--display); font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.015em; }
.page-head p { color: var(--muted); margin-top: 6px; }
.section-title { font-family: var(--display); font-size: var(--t-xl); line-height: 1.1; margin: var(--s-7) 0 var(--s-4); }
.section-title:first-child { margin-top: 0; }

.tabbar { display: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 80; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 650; text-decoration: none; }
.skip:focus { top: 10px; }
#main:focus { outline: none; }
#app[data-nav="1"] .main { animation: page-in 0.3s ease backwards; }
@keyframes page-in { from { opacity: 0; } }

.empty { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6) 0; max-width: 46ch; color: var(--muted); }
.empty b { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1.12; color: var(--ink); }
.empty.centre { justify-items: center; text-align: center; margin: var(--s-7) auto; }

/* -------------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 14.5px; text-align: center;
  box-shadow: var(--shadow); animation: rise-toast var(--med) var(--ease) both; max-width: calc(100vw - 32px);
}

/* -------------------------------------------------------------------- sheet */
.sheet-back {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 6, 5, 0.66);
  display: grid; place-items: center; padding: var(--s-4); animation: fade 0.2s ease both;
}
.sheet {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg); padding: clamp(22px, 4vw, 34px); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); animation: rise var(--med) var(--ease) both;
}
.sheet h2 { font-family: var(--display); font-size: var(--t-2xl); line-height: 1.08; padding-right: 34px; }
.sheet-x { position: absolute; top: 12px; right: 12px; }
.sheet-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-toast { from { opacity: 0; transform: translate(-50%, 12px); } }
.person-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding-block: 10px; text-decoration: none; }
.person-row b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row small { display: block; color: var(--muted); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.people-list { display: grid; max-height: min(52vh, 420px); overflow: auto; }
a.person-row:hover b { color: var(--door); }
.invite-row { display: flex; gap: 8px; align-items: center; }
.invite-row input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--sunk); color: var(--ink); font-size: var(--t-sm); }

/* =================================================================== Rooms
 * Doors you can walk through. Each one is a photograph of its room, with the
 * topic, the question, who is inside and the one thing you can do.
 */
.rooms-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4) var(--s-6); align-items: center; margin-bottom: var(--s-4); }
.rooms-head h1 { font-family: var(--display); font-size: var(--t-3xl); line-height: 1; letter-spacing: -0.015em; }
.search { position: relative; max-width: 460px; width: 100%; justify-self: end; }
.search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 50px; padding: 0 18px 0 46px; border-radius: 999px; border: 1px solid transparent; background: var(--surface); color: var(--ink); font-size: 16px;
  transition: border-color var(--fast) ease, background var(--fast) ease;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--door); background: var(--raised); }
/* the topics, in one row: choose one and the page is about it */
.rail-wrap { position: relative; margin-bottom: var(--s-2); }
.rail { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: none; width: 88px; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 4px 2px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; scroll-snap-align: start; }
.rail-pic { display: grid; place-items: center; width: 64px; height: 76px; border-radius: 32px 32px 12px 12px; overflow: hidden; background: var(--surface); transition: box-shadow var(--fast) ease; }
.rail-pic img { width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 70%) 50%; filter: saturate(0.75) brightness(0.82); transition: filter var(--med) ease; }
.rail-pic .logo-sym { height: 30px; width: auto; }
.rail-pic .av { box-shadow: none; }
.rail-name { max-width: 100%; font-size: 13px; font-weight: 650; line-height: 1.2; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item:hover, .rail-item[aria-pressed="true"] { color: var(--ink); }
.rail-item:hover .rail-pic img, .rail-item[aria-pressed="true"] .rail-pic img { filter: none; }
.rail-item[aria-pressed="true"] .rail-pic { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--lamp); }
.rail-item:focus-visible { outline: none; }
.rail-item:focus-visible .rail-pic { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.rail-go { position: absolute; top: 24px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--raised); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; }
.rail-go[hidden] { display: none; }
.rail-go.prev { left: -14px; }
.rail-go.next { right: -14px; }
.rail-go.next svg { transform: rotate(180deg); }
.rail-go svg { width: 18px; height: 18px; }
@media (hover: none) { .rail-go { display: none; } }

/* friends, and the small things around them */
.opt { margin-left: 6px; font-size: 0.85em; font-weight: 500; color: var(--faint); }
.rail-item { position: relative; }
.rail-dot { position: absolute; top: 4px; right: 12px; box-shadow: 0 0 0 3px var(--bg); }
.fr-strip { display: flex; gap: var(--s-3); overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.fr-strip::-webkit-scrollbar { display: none; }
.fr-chip { flex: none; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 10px 8px 10px; border-radius: 999px; background: var(--surface); text-decoration: none; }
.fr-chip span { display: grid; line-height: 1.2; }
.fr-chip b { font-weight: 650; }
.fr-chip small { color: var(--muted); font-size: 13px; }
.fr-chip .ar-act { font-style: normal; margin-left: 6px; background: var(--lamp); color: var(--lamp-ink); }
.friends { max-width: 780px; }
.friends .tier:first-child { margin-top: var(--s-3); }
.friends .rows .person-row { padding-block: 14px; border-bottom: 1px solid var(--line); }
.friends .person-row small .live-dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
.btn.is-friend:disabled { opacity: 1; color: var(--door); cursor: default; }
.msg .text a, .line p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* beside where you write: emoji and a picture */
.composer { position: relative; }
.tool-btn { width: 40px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { color: var(--ink); background: var(--surface); }
.tool-btn svg { width: 21px; height: 21px; }
.emoji-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 6; width: min(336px, 100%); display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 8px; border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow); }
.emoji-pop[hidden] { display: none; }
.emoji-pop button { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.emoji-pop button:hover { background: var(--surface); }
/* a finger already has an emoji keyboard */
@media (hover: none) { .tool-emoji { display: none; } }
.pic { display: block; line-height: 0; }
.pic img { display: block; max-width: min(280px, 100%); max-height: 320px; border-radius: 14px; background: var(--sunk); }
.msg .text.has-pic { padding: 4px; background: transparent; }
.pic-gone { color: var(--faint); font-style: italic; }

/* the parts of the page */
.tier { margin-top: var(--s-7); }
.rail-wrap + .tier { margin-top: var(--s-5); }
.tier > h2 { font-family: var(--display); font-size: var(--t-xl); line-height: 1.1; margin-bottom: var(--s-4); }
.tier-sub { color: var(--muted); font-size: var(--t-sm); margin: -8px 0 var(--s-3); }
.tier-more { margin-top: var(--s-5); }
/* today's questions: a list, not a wall */
.asks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.ask-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; min-height: 92px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ask-row img { width: 56px; height: 66px; border-radius: 28px 28px 10px 10px; object-fit: cover; object-position: var(--x, 70%) 50%; background: var(--deep); filter: saturate(0.75) brightness(0.85); transition: filter var(--med) ease; }
.ar-text { display: grid; gap: 3px; min-width: 0; }
.ar-text small { font-size: 13px; font-weight: 700; color: var(--door); }
.ar-text b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.22; overflow-wrap: anywhere; }
.ar-act { display: inline-grid; place-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 650; white-space: nowrap; transition: background var(--fast) ease, color var(--fast) ease; }
.ask-row:hover .ar-act, .ask-row:focus-visible .ar-act { background: var(--lamp); color: var(--lamp-ink); }
.ask-row:hover img { filter: none; }
/* nothing open: said once, calmly */
.quiet { display: flex; align-items: center; gap: clamp(20px, 4vw, 52px); padding: clamp(22px, 3vw, 36px) clamp(20px, 3.4vw, 48px); border-radius: var(--r-lg); background: var(--surface); }
.quiet > div { display: grid; gap: var(--s-2); justify-items: start; }
.quiet b { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1.12; }
.quiet span { color: var(--muted); max-width: 40ch; }
.quiet .btn { margin-top: var(--s-3); }
.quiet .drawn { width: clamp(150px, 20vw, 230px); flex: none; }

/* drawings for pages with nothing on them yet */
.drawn { display: block; width: 150px; height: auto; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; --sc-line: var(--line-2); --sc-fill: var(--raised); --sc-ink: var(--ink-2); --sc-dash: var(--faint); }
.drawn.small { width: 64px; }
.sc-rug { stroke: var(--sc-line); stroke-width: 1; }
.sc-top, .sc-paper { fill: var(--sc-fill); stroke: var(--sc-line); stroke-width: 1.2; }
.sc-wax { fill: var(--sc-ink); }
.sc-flame { fill: var(--lamp); filter: drop-shadow(0 0 5px var(--lamp)); transform-box: fill-box; transform-origin: 50% 100%; animation: flame 1.5s ease-in-out infinite alternate; }
.sc-seat { stroke: var(--sc-dash); stroke-width: 1.4; stroke-dasharray: 3 3.4; }
.sc-free { stroke: var(--lamp); stroke-dasharray: none; stroke-width: 1.8; animation: sc-pulse 2.4s ease-in-out infinite; }
.sc-you { fill: var(--lamp); stroke: none; }
.sc-fold { stroke: var(--sc-line); stroke-width: 1.2; }
.sc-seal { fill: var(--lamp); animation: sc-glow 3s ease-in-out infinite; }
.sc-arch { stroke: var(--lamp-ink); stroke-width: 1.6; }
.sc-ribbon { stroke: var(--lamp); stroke-width: 1.6; }
@keyframes sc-pulse { 50% { opacity: 0.35; } }
@keyframes sc-glow { 50% { filter: drop-shadow(0 0 7px var(--lamp)); } }
.wait .drawn { width: 128px; --sc-line: rgba(244, 238, 226, 0.22); --sc-fill: rgba(244, 238, 226, 0.06); --sc-ink: #e2d9c9; --sc-dash: rgba(244, 238, 226, 0.4); }
.empty .drawn { margin-bottom: var(--s-2); }
.me-block .drawn { width: 112px; }
.me-block .drawn.small { width: 56px; }

/* while something is on its way: its outline, so the page does not jump */
.skel { display: block; border-radius: var(--r); background: linear-gradient(100deg, var(--surface) 30%, var(--raised) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: skel 1.5s linear infinite; }
@keyframes skel { from { background-position: 120% 0; } to { background-position: -60% 0; } }
.skel-card { aspect-ratio: 3 / 4.15; min-height: 340px; border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg); }
.skel-pic { min-height: 440px; border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg); }
.skel-line { height: 24px; border-radius: 8px; margin-bottom: 14px; }
.skel-box { height: 160px; border-radius: var(--r-lg); }
.skel-hero { height: 380px; border-radius: var(--r-lg); }

/* walking in: the door opens, the light takes the screen, and you are in the room */
.pass { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: #0c0a08; pointer-events: none; animation: pass-veil 1.6s linear both; }
.pass-arch { position: relative; width: min(180px, 42vw); aspect-ratio: 3 / 4.15; border-radius: 999px 999px 6px 6px; padding: 8px; background: linear-gradient(180deg, #2a2019, #1a1410); perspective: 900px; animation: pass-through 1.6s cubic-bezier(0.7, 0, 0.3, 1) both; }
.pass-light, .pass-leaf { position: absolute; inset: 8px; border-radius: 999px 999px 2px 2px; }
.pass-light { background: radial-gradient(90% 62% at 52% 80%, #fff0cb, #f3c56e 42%, #c78a34 78%, #9b6421); box-shadow: 0 0 80px 10px rgba(236, 187, 104, 0.35); }
.pass-leaf { transform-origin: 0 50%; background: linear-gradient(98deg, #33241a, #47311f 46%, #2a1c12); animation: pass-open 1.6s cubic-bezier(0.6, 0.02, 0.18, 1) both; }
@keyframes pass-veil { 0% { opacity: 0; background-color: #0c0a08; } 9% { opacity: 1; } 52% { background-color: #0c0a08; } 74% { opacity: 1; background-color: #e6b964; } 100% { opacity: 0; background-color: #e6b964; } }
@keyframes pass-open { 0%, 10% { transform: none; opacity: 1; } 48% { transform: rotateY(80deg); filter: brightness(0.6); opacity: 1; } 62%, 100% { transform: rotateY(80deg); filter: brightness(0.6); opacity: 0; } }
@keyframes pass-through { 0%, 40% { transform: none; } 80%, 100% { transform: scale(12); } }

.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: var(--s-5) var(--s-4); }
.room-card {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3 / 4.15; min-height: 340px; padding: var(--s-5) 20px 20px;
  border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg);
  background: var(--deep); color: #f4eee2; text-decoration: none; text-align: left;
  box-shadow: 0 1px 0 rgba(255, 240, 210, 0.06) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.55);
  transition: transform var(--med) var(--ease), box-shadow var(--med) ease;
}
.rc-pic { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 70%) 50%; transition: transform 1.2s var(--ease); }
.room-card::before {
  /* the dark the words sit on */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12, 9, 7, 0.18), rgba(12, 9, 7, 0) 30%, rgba(12, 9, 7, 0.46) 56%, rgba(12, 9, 7, 0.93));
}
.room-card.is-idea .rc-pic { filter: saturate(0.6) brightness(0.72); }
.room-card.is-live::after {
  /* light under a door someone is behind */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--lamp, #e3ad54); box-shadow: 0 0 26px 8px rgba(227, 173, 84, 0.34);
}
a.room-card:hover { transform: translateY(-5px); box-shadow: 0 1px 0 rgba(255, 240, 210, 0.08) inset, 0 28px 50px -18px rgba(0, 0, 0, 0.7); }
a.room-card:hover .rc-pic { transform: scale(1.05); }
a.room-card:hover .rc-pic { filter: none; }
a.room-card:focus-visible { outline-offset: 4px; border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg); }
.rc-topic { font-size: var(--t-sm); font-weight: 650; color: #e2bd76; }
.rc-q { font-family: var(--display); font-size: 23px; line-height: 1.16; margin: 6px 0 var(--s-4); text-wrap: balance; overflow-wrap: anywhere; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 40px; }
.rc-state { display: inline-flex; align-items: center; gap: 9px; font-size: var(--t-sm); color: #cfc5b4; min-width: 0; }
.is-live .rc-state { color: #f4eee2; font-weight: 600; }
.rc-faces { display: inline-flex; }
.rc-faces .av { box-shadow: 0 0 0 2px #14100c; }
.rc-faces .av + .av { margin-left: -9px; }
.rc-act {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: var(--t-sm); font-weight: 700; background: rgba(244, 238, 226, 0.14); color: #f4eee2;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background var(--fast) ease, color var(--fast) ease;
}
.is-live .rc-act { background: #e3ad54; color: #2a1c05; }
a.room-card:hover .rc-act { background: #f4eee2; color: #18140f; }
.rc-mine { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); }

/* ============================================================== at the door */
.threshold { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.th-pic {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(68vh, 620px); padding: clamp(22px, 3vw, 40px);
  border-radius: var(--arch) var(--arch) var(--r-lg) var(--r-lg); background: var(--deep);
}
.th-pic img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 70%) 50%; }
.th-pic::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 9, 7, 0.1), rgba(12, 9, 7, 0) 34%, rgba(12, 9, 7, 0.5) 62%, rgba(12, 9, 7, 0.94)); }
.th-pic .rc-topic { font-size: var(--t-base); }
.th-pic h1 { font-family: var(--display); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.06; letter-spacing: -0.01em; margin-top: 8px; overflow-wrap: anywhere; }
.th-pic .th-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: var(--s-4); font-size: var(--t-sm); color: #cfc5b4; }
.th-form { display: grid; gap: var(--s-4); padding-top: clamp(0px, 4vw, 48px); }
.th-form h2 { font-family: var(--display); font-size: var(--t-xl); line-height: 1.1; }
.th-inside { display: grid; gap: 10px; margin-top: var(--s-4); }
.answer-card { background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 8px; }
.answer-card .who { display: flex; gap: 10px; align-items: center; font-weight: 650; font-size: var(--t-sm); }
.answer-card .who small { color: var(--muted); font-weight: 500; }
.answer-card .a { font-family: var(--display); font-size: 17.5px; line-height: 1.32; overflow-wrap: anywhere; }
.answer-card.mine { box-shadow: inset 0 0 0 1px var(--lamp); }
.blur-a .a { filter: blur(5px); user-select: none; }
.crisis { border-left: 3px solid var(--door); border-radius: 4px 12px 12px 4px; padding: 12px 14px; font-size: var(--t-sm); background: var(--surface); }

/* ========================================================== Open your room */
.create { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); align-items: start; }
.create form { display: grid; gap: var(--s-6); min-width: 0; }
.c-step { display: grid; gap: var(--s-3); min-width: 0; border: 0; padding: 0; margin: 0; }
.c-step > legend, .c-step > .c-title { display: flex; align-items: baseline; gap: 12px; padding: 0; font-family: var(--display); font-size: var(--t-lg); line-height: 1.15; }
.c-num { font-family: var(--display); font-style: italic; font-size: var(--t-lg); color: var(--door); }
.c-step > legend { margin-bottom: var(--s-3); }
.topic-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--raised) transparent; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.topic-tile {
  position: relative; isolation: isolate; overflow: hidden; flex: none; width: 112px; height: 132px; padding: 0 8px 12px; scroll-snap-align: start;
  display: flex; align-items: flex-end; justify-content: center; text-align: center;
  border: 0; border-radius: 60px 60px 14px 14px; background: var(--deep); color: #f4eee2; cursor: pointer;
  font-size: 13.5px; font-weight: 650; line-height: 1.15;
  transition: transform var(--fast) ease, box-shadow var(--fast) ease;
}
.topic-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 70%) 50%; filter: saturate(0.7) brightness(0.7); transition: filter var(--med) ease; }
.topic-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 9, 7, 0) 30%, rgba(12, 9, 7, 0.9)); }
.topic-tile:hover img { filter: none; }
.topic-tile span { max-width: 100%; overflow-wrap: anywhere; }
.topic-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--lamp); }
.topic-tile[aria-pressed="true"] img { filter: none; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.topic-grid .topic-tile { width: auto; height: auto; aspect-ratio: 1 / 1.16; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.idea { flex: 0 1 auto; max-width: 100%; text-align: left; white-space: normal; min-height: 44px; padding: 8px 14px; border-radius: 14px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.idea:hover { color: var(--ink); }
.more { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.more summary { cursor: pointer; font-weight: 650; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--fast) ease; }
.more[open] summary::before { transform: rotate(45deg); }
.more summary:hover { color: var(--ink); }
.more-body { display: grid; gap: var(--s-4); padding-top: var(--s-3); }
.create-preview { position: sticky; top: calc(var(--top-h) + 24px); }
.create-preview .room-card { min-height: 0; }

/* ================================================================= Messages */
.dm { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s-5); height: calc(100vh - var(--top-h) - 150px); height: calc(100dvh - var(--top-h) - 150px); min-height: 440px; }
.dm-list { overflow: auto; display: grid; gap: 2px; align-content: start; margin-inline: -10px; }
.dm-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; min-height: 68px; padding: 10px; border-radius: var(--r); text-decoration: none; transition: background var(--fast) ease; }
.dm-item:hover, .dm-item[aria-current="true"] { background: var(--surface); }
.dm-face { position: relative; display: inline-flex; }
.dm-face .here { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px var(--bg); }
.dm-text { min-width: 0; display: grid; gap: 1px; }
.dm-text b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-text small { color: var(--muted); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-side { display: grid; gap: 6px; justify-items: end; align-content: center; }
.dm-time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dm-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4) var(--s-5) var(--s-4); background: var(--surface); border-radius: var(--r-lg); }
.dm-head { display: flex; gap: var(--s-3); align-items: center; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.dm-head .grow { flex: 1; min-width: 0; min-height: 44px; display: grid; align-content: center; }
.dm-head h2 { font-family: var(--display); font-size: var(--t-lg); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-head p { color: var(--muted); font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-head a { text-decoration: none; }
.dm-back { display: none; }
.dm-note { font-size: var(--t-sm); color: var(--muted); background: var(--raised); border-radius: 12px; padding: 10px 14px; }
.dm-none { margin: auto; display: grid; gap: 8px; justify-items: center; text-align: center; color: var(--muted); padding: var(--s-5); max-width: 34ch; }
.dm-none b { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1.12; color: var(--ink); }
.thread { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 4px 6px 0; overscroll-behavior: contain; }
.thread-empty { margin: auto; color: var(--faint); font-size: var(--t-sm); }
.msg { display: flex; gap: 8px; align-items: flex-end; animation: arrive 0.35s ease both; }
.msg .body { min-width: 0; }
.msg .name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.msg .text { display: inline-block; max-width: min(520px, 100%); padding: 10px 15px; border-radius: 18px 18px 18px 5px; background: var(--raised); font-size: 15.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.me { justify-content: flex-end; }
.msg.me .text { background: var(--door-soft); border-radius: 18px 18px 5px 18px; }
.msg.gave { justify-content: center; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
.gift-msg { display: grid; justify-items: center; gap: 6px; padding: 8px 18px; }
.gift-msg :is(svg, img) { height: 76px; width: auto; max-width: 220px; overflow: visible; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3)); }
.gift-msg small { color: var(--muted); font-size: 13px; }
.msg.gave.fresh :is(svg, img) { animation: drop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1.2) both; }
.composer { display: flex; gap: 8px; align-items: flex-end; background: var(--raised); border-radius: 26px; padding: 6px 6px 6px 8px; }
.composer textarea { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; min-height: 44px; max-height: 140px; padding: 11px 8px; outline: none; font-size: 16px; line-height: 1.35; color: var(--ink); }
.composer textarea::placeholder { color: var(--faint); }
.composer:focus-within { box-shadow: inset 0 0 0 1px var(--door); }
.send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; transition: transform var(--fast) ease; }
.send:active { transform: scale(0.94); }
.send svg { width: 18px; height: 18px; }
.gift-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: transparent; color: var(--door); display: grid; place-items: center; cursor: pointer; }
.gift-btn:hover { background: var(--door-soft); }
.gift-btn svg { width: 20px; height: 20px; }
.typing { font-size: 13px; color: var(--faint); min-height: 18px; }
/* one small question a day for the two of you */
.duo { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--raised); }
.duo .label { font-size: 13px; }
.duo-q { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.22; }
.duo form, .inline-form { display: flex; gap: 8px; }
.duo input, .inline-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 16px; border: 1px solid transparent; background: var(--sunk); color: var(--ink); }
.duo input:focus, .inline-form input:focus { outline: none; border-color: var(--door); }
.duo-lock { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--t-sm); color: var(--muted); }
.blurred { filter: blur(5px); user-select: none; color: var(--ink); }
.duo-a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duo-a div { padding: 10px 14px; border-radius: 12px; background: var(--sunk); }
.duo-a small { font-size: 12px; font-weight: 700; color: var(--door); }
.duo-a p { font-family: var(--display); font-size: 17px; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }

/* ======================================================================= Me
 * Who someone is: their picture, their room, what they care about, what
 * they asked and what people left them.
 */
.me-hero {
  --w-wall: #12100d; --w-lamp: #f3c15e; --w-ink: #f4eee2; --w-muted: #c2b8a8; --w-me: #d8b36b; --w-shade: rgba(0, 0, 0, 0.5);
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); min-height: clamp(300px, 40vw, 460px);
  display: flex; align-items: flex-end; padding: clamp(18px, 3vw, 36px);
  background: var(--deep); color: var(--w-ink); color-scheme: dark;
}
.me-hero .stage-room { position: absolute; inset: 0; z-index: -2; background: center 20% / cover no-repeat var(--deep); }
.me-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 8, 6, 0.3), rgba(10, 8, 6, 0) 30%, rgba(10, 8, 6, 0.2) 50%, rgba(10, 8, 6, 0.9)); }
.me-plate { display: flex; gap: clamp(14px, 2vw, 24px); align-items: center; min-width: 0; flex: 1; }
.me-plate .av { box-shadow: 0 0 0 3px var(--w-me), 0 12px 28px rgba(0, 0, 0, 0.5); }
.me-plate h1 { font-family: var(--display); font-size: clamp(32px, 4.8vw, 62px); line-height: 1; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.me-kind { font-size: var(--t-sm); font-weight: 650; color: var(--w-lamp); margin-bottom: 8px; }
.me-line { color: var(--w-muted); font-size: var(--t-md); margin-top: 8px; max-width: 46ch; overflow-wrap: anywhere; }
.me-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.me-tools .icon-btn { background: rgba(15, 12, 9, 0.5); color: #f4eee2; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.me-tools .icon-btn:hover { background: rgba(15, 12, 9, 0.75); }
.me-tools .btn { background: rgba(15, 12, 9, 0.5); color: #f4eee2; border-color: rgba(244, 238, 226, 0.25); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.me-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--s-4); }
.me-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s-5) 0 0; }
.me-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: var(--s-7); }
.me-col { display: grid; gap: var(--s-7); min-width: 0; align-content: start; }
.me-block { display: grid; gap: var(--s-3); min-width: 0; }
.me-block > h2 { font-family: var(--display); font-size: var(--t-xl); line-height: 1.1; }
.me-block > .sub { color: var(--muted); font-size: var(--t-sm); margin-top: -6px; }
.door-q { font-family: var(--display); font-style: italic; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; overflow-wrap: anywhere; }
.notes { display: grid; gap: var(--s-4); margin-top: var(--s-2); }
.note-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); }
.note-card > a { text-decoration: none; display: inline-grid; min-width: 44px; min-height: 44px; place-items: start center; }
.note-card > .av { margin-inline: 4px; }
.note-card b { font-size: var(--t-sm); }
.note-card p { font-family: var(--display); font-size: 19px; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.keeps { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px; }
.keep {
  aspect-ratio: 1; display: grid; place-items: center; padding: 12px; overflow: hidden; border-radius: 18px;
  background: radial-gradient(120% 85% at 50% 0%, #3a2c1e, #100d0a 72%);
}
.keep :is(svg, img), .keep .cp { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6)); }
.keep.more { font-size: var(--t-sm); font-weight: 650; color: #c2b8a8; }
.keep.new { animation: drop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1.2) both; }
.mini-room { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-3); align-items: center; padding: 6px 0; text-decoration: none; }
.mini-room img { width: 64px; height: 64px; border-radius: 32px 32px 10px 10px; object-fit: cover; object-position: var(--x, 70%) 50%; background: var(--deep); }
.mini-room b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.mini-room small { color: var(--muted); font-size: 13.5px; }
.mini-room:hover b { color: var(--door); }

/* ================================================================== Settings */
.settings { display: grid; gap: var(--s-7); max-width: 640px; }
.set-group { display: grid; gap: var(--s-4); min-width: 0; }
.set-group > h2 { font-family: var(--display); font-size: var(--t-xl); line-height: 1.1; }
.set-row { display: flex; gap: var(--s-4); align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 48px; }
.set-row > span:first-child { font-weight: 600; }
.place-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.place-pick { display: grid; gap: 4px; padding: 0 0 10px; overflow: hidden; text-align: center; cursor: pointer; border-radius: 14px; border: 0; background: var(--surface); color: var(--ink); transition: box-shadow var(--fast) ease; }
.place-pick .thumb { display: block; aspect-ratio: 16 / 10; background: center / cover var(--deep); }
.place-pick .nm { font-size: 13px; font-weight: 650; line-height: 1.2; padding: 6px 6px 0; }
.place-pick .st { font-size: 12.5px; color: var(--muted); }
.place-pick[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--door); }
.place-pick[aria-pressed="true"] .st { color: var(--door); font-weight: 650; }
.place-pick.armed { box-shadow: 0 0 0 2px var(--lamp); }
.place-pick.armed .st { color: var(--lamp); font-weight: 650; }
.centre-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.centre-pick { width: 56px; height: 56px; display: grid; place-items: center; cursor: pointer; border-radius: 14px; border: 0; background: radial-gradient(120% 85% at 50% 0%, #3a2c1e, #100d0a 72%); color: #c2b8a8; font-size: 12px; font-weight: 650; }
.centre-pick .cp { width: 30px; filter: none; }
.centre-pick .cp-book, .centre-pick .cp-scales { width: 40px; }
.centre-pick[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--door); }
.coin {
  display: inline-block; width: 0.95em; height: 0.95em; border-radius: 50%; margin-right: 0.3em; vertical-align: -0.12em;
  background: radial-gradient(circle at 35% 30%, #fff3cf, #e2bb6c 45%, #a87922); box-shadow: inset 0 0 0 1px rgba(90, 60, 10, 0.5);
}

/* ============================================================= front page */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); min-height: min(100vh, 900px); min-height: min(100svh, 900px); display: flex; }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; opacity: 0.5; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(15, 13, 11, 0.94), rgba(15, 13, 11, 0.6) 46%, rgba(15, 13, 11, 0.5)), linear-gradient(180deg, rgba(15, 13, 11, 0.5), rgba(15, 13, 11, 0) 30%, rgba(15, 13, 11, 0) 70%, #0f0d0b);
}
.hero-in { width: 100%; max-width: var(--max); margin: 0 auto; padding: calc(var(--top-h) + 40px) var(--gutter) 56px; display: grid; grid-template-columns: minmax(0, 0.66fr) minmax(0, 1.34fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: var(--s-5); justify-items: start; }
.hero h1 { font-family: var(--display); font-size: clamp(48px, 6.4vw, 92px); line-height: 0.96; letter-spacing: -0.025em; }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 30ch; }
.hero .actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-2); }
.hero-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: end; }
.hero-doors .room-card { min-height: 0; aspect-ratio: 3 / 4.4; padding: 22px 20px 22px; }
.hero-doors .rc-act, .hero-doors .rc-faces { display: none; }
.hero-doors .rc-foot { min-height: 0; }
.hero-doors .room-card:nth-child(2) { margin-bottom: clamp(24px, 4vw, 56px); }
.hero-doors .rc-q { font-size: clamp(18px, 1.7vw, 24px); margin-bottom: 12px; }
.hero.first .hero-copy > * { animation: rise 0.8s var(--ease) both; }
.hero.first .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero.first .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero.first .hero-doors .room-card { animation: door-in 0.9s var(--ease) both; }
.hero.first .hero-doors .room-card:nth-child(1) { animation-delay: 0.2s; }
.hero.first .hero-doors .room-card:nth-child(2) { animation-delay: 0.3s; }
.hero.first .hero-doors .room-card:nth-child(3) { animation-delay: 0.4s; }
@keyframes door-in { from { opacity: 0; transform: translateY(26px); } }
/* ---- the story under the first picture: one thought a screen, each with a drawing that moves ---- */
.story { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); color: var(--ink); padding-block: clamp(76px, 9vw, 136px); }
.story::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grain); opacity: 0.5; pointer-events: none; }
.story-in { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.story-in.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 104px); align-items: center; }
.story-in.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.story-copy { display: grid; gap: clamp(16px, 1.8vw, 26px); justify-items: start; }
.story-copy.center { justify-items: center; text-align: center; }
.story h2 { font-family: var(--display); font-size: clamp(46px, 6.6vw, 100px); line-height: 0.98; letter-spacing: -0.03em; }
.story h2 span { display: block; }
.story h2 .lit { background: linear-gradient(96deg, #f4eee2 4%, #ecc77a 52%, #c99a4c); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.story-sub { font-size: clamp(18px, 1.75vw, 24px); line-height: 1.38; color: var(--muted); max-width: 30ch; text-wrap: balance; }
.story .actions { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; margin-top: var(--s-3); }
/* each part arrives as you reach it */
.story.is-waiting :is(h2, .story-sub, .actions, .people-demo, .door-demo, .seat-demo, .open-mark) { opacity: 0; }
.story.is-in :is(h2, .story-sub, .actions) { animation: story-rise 1s var(--ease) both; }
.story.is-in .story-sub { animation-delay: 0.12s; }
.story.is-in .actions { animation-delay: 0.24s; }
.story.is-in :is(.people-demo, .door-demo, .seat-demo) { animation: story-show 1s var(--ease) 0.1s both; }
@keyframes story-rise { from { opacity: 0; transform: translateY(30px); } }
@keyframes story-show { from { opacity: 0; } }
/* a person, drawn: no face, no name */
.fp-person u, .sd-seat { border-radius: 50%; background: hsl(calc(var(--tone, 20) * 1deg) 26% 17%); box-shadow: 0 0 0 3px #150e08, 0 10px 22px rgba(0, 0, 0, 0.55); }
:is(.fp-person, .sd-seat) svg { display: block; width: 100%; height: 100%; border-radius: 50%; fill: hsl(calc(var(--tone, 20) * 1deg + 12deg) 36% 62%); }

/* 1. people: apart at first, then round the tables they chose */
.s-people { background: linear-gradient(180deg, #0f0d0b, #12100d); }
.people-demo { position: relative; height: clamp(340px, 44vh, 430px); max-width: 1120px; margin: clamp(28px, 4vw, 56px) auto 0; --sz: 58px; --rx: 132px; --ry: 90px; --spread: 1; }
.people-demo [data-k="0"] { --cx: 17%; --cy: 50%; }
.people-demo [data-k="1"] { --cx: 50%; --cy: 50%; }
.people-demo [data-k="2"] { --cx: 83%; --cy: 50%; }
.fp-table { position: absolute; left: var(--cx); top: var(--cy); width: calc(var(--rx) * 2 - var(--sz) * 1.5); height: calc(var(--ry) * 2 - var(--sz) * 1.5); transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 38%, #6a4421, #2c190b 78%); box-shadow: 0 6px 0 -1px #1c0f08, 0 26px 40px rgba(0, 0, 0, 0.6), 0 0 70px 14px rgba(227, 173, 84, 0.2), inset 0 2px 1px rgba(255, 226, 180, 0.2); transition: opacity 1s var(--ease) 1.9s, transform 1.1s var(--ease) 1.9s; }
.fp-table b { font-family: var(--display); font-weight: 400; font-size: 19px; color: #f1d9a6; white-space: nowrap; }
.fp-person { position: absolute; left: calc(var(--cx) + var(--c) * var(--rx)); top: calc(var(--cy) + var(--s) * var(--ry)); width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); transition: transform 1.7s cubic-bezier(0.6, 0, 0.15, 1), opacity 1.2s var(--ease); transition-delay: calc(0.9s + var(--i) * 55ms); }
.fp-person u { display: block; width: 100%; height: 100%; text-decoration: none; animation: pp-drift 6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.7s); }
@keyframes pp-drift { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
.fp-person.you u { background: #3a2a14; box-shadow: 0 0 0 2.5px #ecc77a, 0 0 26px 4px rgba(236, 187, 104, 0.45); }
.fp-person.you svg { fill: #f1d9a6; }
/* before you reach this part, and until they start to move, everyone is on their own */
.story:not(.is-in) .fp-person { transform: translate(calc(var(--ox) * var(--spread)), calc(var(--oy) * var(--spread))) scale(0.78); opacity: 0.55; }
.story:not(.is-in) .fp-person.you { opacity: 1; }
.story:not(.is-in) .fp-table { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
.story.is-waiting .fp-person, .story.is-waiting .fp-table { transition: none; }

/* 2. the door, and the question behind it */
.s-ask { background: #12100d; }
.door-demo { position: relative; justify-self: center; width: min(380px, 100%); display: grid; justify-items: center; gap: 18px; padding-bottom: 70px; }
.dd-topic { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: #ecc77a; transition: opacity 0.5s; }
.dd-arch { position: relative; width: 100%; aspect-ratio: 3 / 4.15; border-radius: 190px 190px 8px 8px; padding: 12px; background: linear-gradient(180deg, #2a2019, #1a1410); box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.1), 0 40px 80px -20px rgba(0, 0, 0, 0.8); perspective: 1300px; transition: box-shadow 1.4s var(--ease); }
.dd-light, .dd-leaf { position: absolute; inset: 12px; border-radius: 178px 178px 3px 3px; }
.dd-light { background: radial-gradient(90% 62% at 54% 84%, #fff0cb, #f3c56e 42%, #c78a34 78%, #9b6421); box-shadow: inset 0 0 40px rgba(90, 50, 10, 0.5); }
.dd-q { position: absolute; z-index: 1; left: 33%; right: 8%; bottom: 15%; margin: 0; font-family: var(--display); font-size: clamp(21px, 2vw, 27px); line-height: 1.15; letter-spacing: -0.01em; color: #2a1a05; text-wrap: balance; }
.dd-q span { display: inline-block; opacity: 0; }
.door-demo.open .dd-q span { animation: word-in 0.6s var(--ease) both; animation-delay: calc(0.75s + var(--i) * 60ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(0.5em); filter: blur(5px); } to { opacity: 1; } }
.dd-leaf { z-index: 2; transform-origin: 0 50%; background: linear-gradient(98deg, #33241a, #47311f 46%, #2a1c12); box-shadow: inset 0 0 0 1px rgba(255, 226, 180, 0.08), inset -14px 0 30px rgba(0, 0, 0, 0.35); transition: transform 1.5s cubic-bezier(0.6, 0.02, 0.18, 1), filter 1.5s; }
.dd-leaf::before { content: ""; position: absolute; inset: 9% 11% 7%; border-radius: 140px 140px 3px 3px; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.42), inset 0 2px 0 1.5px rgba(255, 226, 180, 0.07); }
.dd-knob { position: absolute; right: 7%; top: 56%; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7dfa5, #b98a3c 60%, #6d4a18); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5); }
.door-demo.open .dd-leaf { transform: rotateY(77deg); filter: brightness(0.62); }
.door-demo.open .dd-arch { box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.14), 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 140px 6px rgba(236, 187, 104, 0.3); }
.dd-spill { position: absolute; left: -22%; right: -22%; bottom: 0; height: 110px; background: radial-gradient(closest-side, rgba(244, 197, 110, 0.5), rgba(244, 197, 110, 0)); opacity: 0; transform: scaleX(0.5); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); pointer-events: none; }
.door-demo.open .dd-spill { opacity: 1; transform: none; }

/* 3. the table, and the seat that is still free */
.s-seat { background: linear-gradient(180deg, #12100d, #0f0d0b); }
.seat-demo { position: relative; width: 100%; max-width: 620px; justify-self: center; aspect-ratio: 4 / 3; background: radial-gradient(closest-side, rgba(110, 66, 28, 0.5), rgba(110, 66, 28, 0)); --sz: clamp(46px, 5.2vw, 68px); }
.sd-rug { position: absolute; left: 50%; top: 54%; width: 96%; height: 86%; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(236, 187, 104, 0.16), inset 0 0 0 16px rgba(236, 187, 104, 0.035), inset 0 0 0 17px rgba(236, 187, 104, 0.12); }
.sd-table { position: absolute; left: 50%; top: 54%; width: 58%; height: 46%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(46% 46% at 50% 40%, #8a5a2b, #4a2c13 52%, #23130a 86%); box-shadow: 0 9px 0 -1px #1c0f08, 0 11px 0 -1px rgba(0, 0, 0, 0.55), 0 34px 46px 6px rgba(0, 0, 0, 0.62), 0 0 90px 20px rgba(227, 173, 84, 0.16), inset 0 2px 1px rgba(255, 226, 180, 0.2); }
.sd-candle { position: absolute; left: 50%; bottom: 46%; width: 7.5%; aspect-ratio: 1 / 2.5; transform: translateX(-50%); border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg, #c2ad82, #f8eed6 46%, #ac9870); box-shadow: 0 12px 14px rgba(0, 0, 0, 0.55); }
.sd-candle::before { content: ""; position: absolute; left: 50%; bottom: 104%; width: 46%; aspect-ratio: 1 / 1.9; margin-left: -23%; border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%; background: radial-gradient(60% 66% at 50% 72%, #fffbe6, #ffcf66 52%, #ec8d2c); box-shadow: 0 0 26px 9px rgba(255, 196, 96, 0.55), 0 0 90px 40px rgba(255, 196, 96, 0.18); transform-origin: 50% 100%; animation: flame 1.5s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(0.92, 1.1) rotate(2deg); } to { transform: scale(1.04, 0.95) rotate(-1deg); } }
.sd-seat { position: absolute; left: var(--l); top: var(--t); width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2); }
.sd-seat::before { content: ""; position: absolute; z-index: -1; inset: -34%; border-radius: 50%; background: radial-gradient(closest-side, rgba(236, 187, 104, 0.6), transparent); opacity: 0; }
.sd-bub { position: absolute; left: 50%; bottom: 112%; display: flex; gap: 4px; padding: 9px 11px; border-radius: 14px; background: #f4eee2; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4); opacity: 0; transform: translate(-50%, 8px) scale(0.6); transform-origin: 50% 100%; }
.sd-bub::after { content: ""; position: absolute; left: 50%; top: 100%; margin: -5px 0 0 -5px; width: 10px; height: 10px; background: #f4eee2; transform: rotate(45deg); border-radius: 2px; }
.sd-bub s { width: 6px; height: 6px; border-radius: 50%; background: #6b5f4b; animation: bub-dot 1s ease-in-out infinite; text-decoration: none; }
.sd-bub s:nth-child(2) { animation-delay: 0.15s; }
.sd-bub s:nth-child(3) { animation-delay: 0.3s; }
@keyframes bub-dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.story.is-waiting .sd-seat { opacity: 0; }
.story.is-in .sd-seat { animation: seat-in 0.8s var(--ease) both; animation-delay: calc(0.5s + var(--i) * 0.24s); }
.story.is-in .sd-seat:not(.you)::before { animation: seat-talk 11s ease-in-out infinite; animation-delay: calc(3s + var(--i) * 2.2s); }
.story.is-in .sd-bub { animation: bub-say 11s var(--ease) infinite; animation-delay: calc(3s + var(--i) * 2.2s); }
@keyframes seat-in { from { opacity: 0; transform: translateY(14px) scale(0.6); } 60% { transform: translateY(0) scale(1.06); } }
@keyframes seat-talk { 0%, 20%, 100% { opacity: 0; } 4%, 15% { opacity: 1; } }
@keyframes bub-say { 0%, 20%, 100% { opacity: 0; transform: translate(-50%, 8px) scale(0.6); } 3%, 16% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.sd-seat.you { background: rgba(236, 187, 104, 0.08); box-shadow: 0 0 0 2px #ecc77a; display: grid; place-items: center; }
.sd-seat.you b { font-size: clamp(12px, 1.1vw, 15px); font-weight: 700; color: #ecc77a; }
.story.is-in .sd-seat.you { animation: seat-in 0.8s var(--ease) both, seat-free 2.6s ease-in-out infinite; animation-delay: calc(0.5s + var(--i) * 0.24s), 3s; }
@keyframes seat-free { 0%, 100% { box-shadow: 0 0 0 2px #ecc77a, 0 0 0 0 rgba(236, 187, 104, 0.4); } 50% { box-shadow: 0 0 0 2px #ecc77a, 0 0 0 14px rgba(236, 187, 104, 0); } }

/* 4. your own door: the arch is drawn, then lit */
.s-open { background: radial-gradient(60% 46% at 50% 30%, #1d1610, #0f0d0b 70%); padding-block: clamp(84px, 10vw, 150px) clamp(96px, 11vw, 168px); }
.s-open::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(180deg, rgba(22, 19, 16, 0), #161310); }
.open-mark { position: relative; height: clamp(170px, 26vh, 260px); aspect-ratio: 32 / 34; margin-bottom: clamp(8px, 1.6vw, 24px); }
.arch-mark { width: 100%; height: 100%; overflow: visible; }
.am-line { stroke: #f4eee2; stroke-width: 1.5; stroke-dasharray: 100; stroke-dashoffset: 0; }
.am-light { fill: #e9b860; filter: drop-shadow(0 0 5px rgba(236, 187, 104, 0.75)); }
.om-spill { position: absolute; left: 50%; width: min(220%, 92vw); margin-left: calc(min(220%, 92vw) / -2); top: 78%; height: 46%; background: radial-gradient(closest-side, rgba(236, 187, 104, 0.34), rgba(236, 187, 104, 0)); pointer-events: none; }
.story.is-in .am-line { animation: am-draw 1.5s cubic-bezier(0.6, 0, 0.2, 1) 0.1s both; }
.story.is-in .am-light { animation: am-lit 1.1s var(--ease) 1.3s both, am-breathe 4s ease-in-out 2.6s infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.story.is-in .om-spill { animation: story-show 1.4s var(--ease) 1.6s both; }
.story.is-in.s-open :is(h2, .story-sub, .actions) { animation-delay: 0.9s; }
.story.is-in.s-open .story-sub { animation-delay: 1.02s; }
.story.is-in.s-open .actions { animation-delay: 1.14s; }
@keyframes am-draw { from { stroke-dashoffset: 100; } }
@keyframes am-lit { from { opacity: 0; transform: scaleY(0.2); } }
@keyframes am-breathe { to { filter: drop-shadow(0 0 11px rgba(236, 187, 104, 1)); } }
.site-foot { padding: var(--s-6) 0 calc(var(--s-6) + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: var(--t-sm); }
.site-foot .in { max-width: var(--max); margin: 0 auto; padding: var(--s-5) var(--gutter) 0; border-top: 1px solid var(--line); display: flex; gap: var(--s-4) var(--s-5); flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-foot a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-foot a:hover { color: var(--ink); }
.site-foot .links { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; }

/* ================================================================== sign in */
.auth { min-height: calc(100vh - var(--top-h)); min-height: calc(100dvh - var(--top-h)); display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; isolation: isolate; overflow: hidden; margin: 0 0 var(--s-5) var(--gutter); border-radius: var(--r-lg); background: radial-gradient(70% 60% at 50% 40%, #241b12, #0f0d0b 74%); display: grid; align-content: center; justify-items: center; gap: clamp(8px, 2vw, 24px); padding: clamp(24px, 4vw, 56px); }
.auth-art .door-demo { width: min(290px, 60%); padding-bottom: 56px; }
.auth-art blockquote { margin: 0; text-align: center; font-family: var(--display); font-style: italic; font-size: clamp(26px, 3vw, 40px); line-height: 1.12; max-width: 17ch; }
.auth-form { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px) var(--gutter); }
.auth-form form { width: min(400px, 100%); display: grid; gap: var(--s-4); }
.auth-form h1 { font-family: var(--display); font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.015em; }
.auth-form .small { font-size: 13px; color: var(--muted); }
.auth-form .small a { color: var(--ink-2); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line-2); }
.providers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Google's own button: its colours are fixed by Google, in both looks. */
.btn-google { width: 100%; min-height: 52px; gap: 12px; background: #ffffff; color: #1f1f1f; border-color: #747775; font-weight: 600; font-size: 16px; }
.btn-google:hover { background: #f4f6fb; }
.btn-google svg { width: 18px; height: 18px; }
.btn-apple { width: 100%; min-height: 52px; background: #000; color: #fff; border-color: #000; font-weight: 600; font-size: 16px; }
.btn-apple:hover { background: #1d1d1f; }
.btn-apple { gap: 10px; }
.btn-apple img { width: 15px; height: 20px; margin-top: -3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 360px) { .field-row { grid-template-columns: 1fr; } }
.age-tick { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.age-tick input { margin-top: 4px; }
.linkish { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--ink-2); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lead-sm { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.arriving { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); font-size: 17px; padding: 40px var(--gutter); }
.arriving .live-dot { width: 14px; height: 14px; animation: arriving 1.2s ease-in-out infinite; }
@keyframes arriving { 50% { opacity: 0.25; transform: scale(0.7); } }
.demo-note { font-size: 13px; color: var(--faint); }

/* ================================================================== welcome */
.onboard { padding-block: clamp(20px, 5vw, 56px) 0; display: grid; gap: var(--s-6); max-width: 920px; margin: 0 auto; }
.onboard h1 { font-family: var(--display); font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.015em; }
.sticky-foot {
  position: sticky; bottom: 0; z-index: 5; padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg) 34%); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}

/* ================================================================ the room
 * Inside, it is always evening: one photograph is the whole room, a round
 * table in the middle, people seated around it, the question on the table.
 * The room takes about two thirds of the screen; the conversation sits
 * beside it. One look in both themes, on purpose.
 */
.scene {
  --w-wall: #12100d;
  --w-wall-2: #0a0807;
  --w-felt: #3a2416;
  --w-felt-2: #28170d;
  --w-rim: #b98d43;
  --w-lamp: #f3c15e;
  --w-lamp-glow: rgba(243, 193, 94, 0.18);
  --w-ink: #ede9df;
  --w-muted: #a99f8f;
  --w-faint: #7b7266;
  --w-line: rgba(237, 233, 223, 0.09);
  --w-panel: #17130f;
  --w-panel-2: #1f1a15;
  --w-me: #d4aa63;
  --w-shade: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
  position: relative; min-height: 100vh; height: 100vh; min-height: 100dvh; height: 100dvh; display: flex; flex-direction: column;
  color: var(--w-ink);
  background:
    radial-gradient(60% 50% at 38% 0%, rgba(243, 193, 94, 0.10), transparent 70%),
    radial-gradient(120% 90% at 50% 120%, var(--w-wall-2), transparent 60%),
    var(--w-wall);
}

/* Each kind of room is its own place. The pictures of the wall and floor
 * come from the page; these are the colours that go with them. */
.scene[data-set="poetry"], .me-hero[data-set="poetry"] { --w-wall: #130b06; --w-wall-2: #070403; --w-felt: #3d2312; --w-felt-2: #201107; --w-lamp: #ffb85c; --w-lamp-glow: rgba(255, 170, 80, 0.26); --w-panel: #160e09; --w-panel-2: #20150c; }
.scene[data-set="film"], .me-hero[data-set="film"] { --w-wall: #0c0c0d; --w-wall-2: #060606; --w-felt: #2c2c2e; --w-felt-2: #151516; --w-rim: #9a9a96; --w-lamp: #ecebe6; --w-lamp-glow: rgba(236, 235, 230, 0.16); --w-ink: #ecebe8; --w-muted: #a5a5a1; --w-faint: #767673; --w-panel: #131314; --w-panel-2: #1c1c1e; --w-me: #ecebe6; }
.scene[data-set="football"], .me-hero[data-set="football"] { --w-wall: #05090c; --w-wall-2: #03130b; --w-rim: #ffffff; --w-lamp: #f2f7ff; --w-lamp-glow: rgba(220, 238, 255, 0.18); --w-panel: #0a1410; --w-panel-2: #101d17; --w-me: #f2f7ff; --w-shade: rgba(0, 0, 0, 0.45); }
.scene[data-set="books"], .me-hero[data-set="books"] { --w-wall: #0f0a06; --w-wall-2: #070403; --w-felt: #4a2c17; --w-felt-2: #2a170b; --w-lamp: #ffc070; --w-panel: #150e08; --w-panel-2: #1e150d; }
.scene[data-set="humour"], .me-hero[data-set="humour"] { --w-wall: #150407; --w-wall-2: #080203; --w-felt: #1f1214; --w-felt-2: #0d0607; --w-rim: #c22a36; --w-lamp: #ffe1b0; --w-lamp-glow: rgba(255, 225, 176, 0.2); --w-panel: #170a0c; --w-panel-2: #211113; --w-me: #f0b755; }
.scene[data-set="law"], .me-hero[data-set="law"] { --w-wall: #0b0806; --w-wall-2: #060403; --w-felt: #4a1d12; --w-felt-2: #240d08; --w-rim: #d4aa63; --w-lamp: #e9c17a; --w-panel: #140e0b; --w-panel-2: #1d1510; }
.scene[data-set="medicine"], .me-hero[data-set="medicine"] { --w-wall: #08151a; --w-wall-2: #040b0e; --w-felt: #1d3a43; --w-felt-2: #10242b; --w-rim: #7fd3c8; --w-lamp: #a8ece2; --w-lamp-glow: rgba(140, 225, 215, 0.18); --w-ink: #e6f1f0; --w-muted: #9bb2b3; --w-faint: #6b8486; --w-panel: #0a181d; --w-panel-2: #102329; --w-me: #a8ece2; }
.scene[data-set="politics"], .me-hero[data-set="politics"] { --w-wall: #090608; --w-wall-2: #050304; --w-felt: #5a141b; --w-felt-2: #2e0a0e; --w-rim: #d6a85c; --w-lamp: #ffd9a0; --w-panel: #150c0e; --w-panel-2: #1f1214; }
.scene-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-4); align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) clamp(12px, 2vw, 22px) 10px;
}
.scene-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 999px;
  border: 0; background: rgba(237, 233, 223, 0.07); color: var(--w-ink); cursor: pointer; font-weight: 650; font-size: var(--t-sm);
  transition: background var(--fast) ease;
}
.scene-btn:hover { background: rgba(237, 233, 223, 0.13); }
.scene-btn svg { width: 18px; height: 18px; }
.scene-btn.lit { background: var(--w-lamp); color: #2a1c05; padding: 0 16px; }
.scene-title { min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.scene-title b { font-family: var(--display); font-weight: 400; font-size: var(--t-lg); line-height: 1.1; white-space: nowrap; }
.scene-title span { font-size: var(--t-sm); color: var(--w-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-right { display: flex; gap: var(--s-2); align-items: center; }
.presence { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 6px; font-size: var(--t-sm); font-weight: 650; color: var(--w-ink); white-space: nowrap; }
.scene-crisis { margin: 10px clamp(16px, 3vw, 28px) 0; font-size: 13.5px; color: var(--w-muted); border: 1px solid var(--w-line); border-left: 3px solid var(--w-me); border-radius: 10px; padding: 9px 12px; }
.scene-crisis b { color: var(--w-ink); }

.scene-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 31vw, 440px); }

/* ---------------------------------------------------------------- stage */
.stage { position: relative; min-height: 0; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; margin-left: clamp(0px, 1vw, 12px); }
/* one photograph is the whole room: its far wall across the top, the rug in the middle */
.stage-room { position: absolute; inset: 0; background: center / cover no-repeat var(--w-wall); }
.stage-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(85% 75% at 50% 46%, transparent 50%, var(--w-shade)); }
.stage-light {
  position: absolute; left: 50%; top: -12%; width: 70%; height: 80%; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--w-lamp-glow), transparent);
  pointer-events: none;
}
.scene[data-set="poetry"] .stage-light, .scene[data-set="hall"] .stage-light { animation: candlelight 3.6s ease-in-out infinite; }
.scene[data-set="film"] .stage-light { animation: projector 0.9s steps(4, jump-none) infinite; }
@keyframes candlelight { 0%, 100% { opacity: 1; } 35% { opacity: 0.78; } 60% { opacity: 0.94; } 80% { opacity: 0.82; } }
@keyframes projector { 0%, 100% { opacity: 1; } 50% { opacity: 0.86; } }
.table {
  position: absolute; left: 50%; top: 49%; width: 62%; height: 48%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #1a0e07;
  /* the thickness of the top, then its shadow on the floor */
  box-shadow:
    0 9px 0 -1px #1c0f08,
    0 11px 0 -1px rgba(0, 0, 0, 0.55),
    0 34px 46px 6px rgba(0, 0, 0, 0.62),
    0 70px 90px rgba(0, 0, 0, 0.4);
  display: grid; place-items: center;
}
.table::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(58% 52% at 50% 36%, var(--w-lamp-glow), transparent 72%),
    radial-gradient(closest-side, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.62)),
    url(art/rooms/table.webp) center / 100% 100% no-repeat;
  box-shadow: inset 0 2px 1px rgba(255, 226, 180, 0.16), inset 0 -3px 10px rgba(0, 0, 0, 0.5);
  filter: var(--w-wood, none);
}
.table-top { position: relative; z-index: 1; width: 68%; display: grid; gap: 10px; justify-items: center; text-align: center; }

/* what stands in the middle of each table */
.cp { width: clamp(44px, 5.2vw, 78px); height: auto; display: block; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.55)); }
.cp-book, .cp-scales, .cp-reel { width: clamp(64px, 7.4vw, 108px); }
.cp-candle { width: clamp(40px, 4.6vw, 68px); filter: drop-shadow(0 0 22px rgba(255, 170, 70, 0.7)) drop-shadow(0 8px 8px rgba(0, 0, 0, 0.5)); }
.cp-scales, .cp-bell { filter: brightness(1.25) drop-shadow(0 8px 8px rgba(0, 0, 0, 0.6)); }
.cp-tealight { filter: drop-shadow(0 0 18px rgba(255, 130, 50, 0.65)) drop-shadow(0 6px 6px rgba(0, 0, 0, 0.5)); }

/* the same table in every room, its wood in the light of that room */
.scene[data-set="film"], .me-hero[data-set="film"] { --w-wood: grayscale(0.9) brightness(0.8); }
.scene[data-set="medicine"], .me-hero[data-set="medicine"] { --w-wood: grayscale(0.75) brightness(0.72); }
.scene[data-set="humour"], .me-hero[data-set="humour"] { --w-wood: brightness(0.62) saturate(0.8); }
.scene[data-set="football"], .me-hero[data-set="football"] { --w-wood: brightness(0.85); }
/* medicine: the table breathes, slowly */
.scene[data-set="medicine"] .table::after {
  content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1.5px solid var(--w-rim); opacity: 0;
  animation: breathing 6s ease-in-out infinite;
}
@keyframes breathing { 0% { transform: scale(0.86); opacity: 0; } 45% { opacity: 0.45; } 100% { transform: scale(1.03); opacity: 0; } }
/* humour: black lacquer under a spotlight */
.scene[data-set="humour"] .stage-light { top: -20%; width: 54%; height: 96%; }
.table-q { font-family: var(--display); font-size: clamp(18px, 2.1vw, 31px); line-height: 1.16; color: var(--w-ink); text-wrap: balance; overflow-wrap: anywhere; }
.table-items { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-height: 90px; overflow: hidden; }
.table-item {
  display: grid; text-align: left; max-width: 150px; padding: 7px 10px; border-radius: 4px;
  background: #efe7d6; color: #2a2318; box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  transform: rotate(var(--tilt, 0deg)); font-size: 12px; line-height: 1.25;
}
.table-item b { font-family: var(--display); font-weight: 400; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-item small { color: #6b5f4b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-item.new { animation: drop 0.6s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-26px) rotate(calc(var(--tilt) * -3)) scale(1.08); } }

/* ---------------------------------------------------------------- seats */
.seats { position: absolute; inset: 0; }
.seat {
  position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--w-ink); width: 96px;
}
.seat .av { box-shadow: 0 0 0 3px var(--w-wall-2), 0 8px 18px rgba(0,0,0,0.45); transition: box-shadow 0.4s ease, transform 0.4s ease; position: relative; z-index: 1; }
/* the light of the table on each face */
.seat .av::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at var(--lx, 50%) var(--ly, 0%), color-mix(in srgb, var(--w-lamp) 46%, transparent), transparent 62%);
  mix-blend-mode: soft-light;
}
.scene.arrive .seat { animation: seat-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
.scene.arrive .stage-shade { animation: lights-up 1.6s ease-out backwards; }
@keyframes seat-in { from { opacity: 0; transform: translate(-50%, -42%) scale(0.9); } }
@keyframes lights-up { from { background-color: rgba(0, 0, 0, 0.7); } }
.seat .halo {
  position: absolute; top: -14px; left: 50%; width: 90px; height: 90px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--w-lamp-glow), transparent); opacity: 0; transition: opacity 0.4s ease;
}
.seat-name { font-size: 13px; font-weight: 650; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.seat-host { font-size: 11px; font-weight: 700; color: var(--w-lamp); }
.seat-flags { position: absolute; top: -6px; right: 14px; font-size: 18px; z-index: 2; }
.seat-gifts { display: flex; gap: 2px; align-items: center; justify-content: center; }
.seat-gifts:empty { display: none; }
.seat-gifts :is(svg, img) { width: 20px; height: 20px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.seat-gifts small { font-size: 10.5px; font-weight: 700; color: var(--w-muted); margin-left: 2px; }
.seat.gifted .halo { opacity: 1; }
.seat.gifted .av { box-shadow: 0 0 0 3px #e9c170, 0 0 30px 8px rgba(233, 193, 112, 0.45); }
.seat.me .av { box-shadow: 0 0 0 3px var(--w-me), 0 8px 18px rgba(0,0,0,0.45); }
.seat.me .seat-name { color: var(--w-me); }
.seat.mic-on .av { box-shadow: 0 0 0 4px color-mix(in srgb, var(--w-me) 30%, transparent), 0 8px 18px rgba(0,0,0,0.45); }
.seat.speaking .halo { opacity: 1; }
.seat.speaking .av { box-shadow: 0 0 0 3px var(--w-lamp), 0 0 28px 6px var(--w-lamp-glow); transform: scale(1.06); }
.seat:hover .av { transform: scale(1.05); }
.seat:focus-visible { outline: none; }
.seat:focus-visible .av { box-shadow: 0 0 0 3px var(--w-me); }
.seat.empty { cursor: default; width: auto; }
.chair {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed rgba(237, 233, 223, 0.16);
  background: rgba(237, 233, 223, 0.02);
}

/* what someone says, above their seat */
.bubble {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 5;
  width: max-content; max-width: 230px; padding: 9px 13px; border-radius: 14px;
  background: #f6f1e4; color: #1f1a12; font-size: 13.5px; line-height: 1.38; text-align: left; font-weight: 500;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45); animation: pop 0.35s cubic-bezier(.2,.8,.2,1.15) both;
}
.bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #f6f1e4;
}
.side-left .bubble { left: 0; transform: none; }
.side-left .bubble::after { left: 40px; }
.side-right .bubble { left: auto; right: 0; transform: none; }
.side-right .bubble::after { left: auto; right: 34px; transform: none; }
.bubble.dots { display: inline-flex; gap: 4px; padding: 11px 14px; }
.bubble.dots i { width: 6px; height: 6px; border-radius: 50%; background: #8a7f6a; animation: blink 1.2s infinite ease-in-out; }
.bubble.dots i:nth-child(2) { animation-delay: 0.15s; }
.bubble.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.94); } }
.side-left .bubble, .side-right .bubble { animation-name: pop-side; }
@keyframes pop-side { from { opacity: 0; transform: translateY(6px) scale(0.94); } }

.float-react {
  position: absolute; z-index: 6; font-size: 26px; pointer-events: none;
  transform: translate(-50%, -50%); animation: rise-react 2.1s ease-out both;
}
@keyframes rise-react {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, -90%) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), -260%) scale(1); }
}

/* a closer look at someone */
.seat-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8;
  width: min(330px, calc(100% - 32px)); background: #f6f1e4; color: #1f1a12; border-radius: 18px; padding: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55); display: grid; gap: 10px; animation: rise 0.25s ease both;
}
.seat-card .who { display: flex; gap: 12px; align-items: center; }
.seat-card .who b { display: block; font-size: 16px; }
.seat-card .who small { color: #6b5f4b; }
.seat-card .seat-line { color: #4d4433; font-size: 14px; }
.seat-card .seat-answer { font-family: var(--display); font-size: 18px; line-height: 1.3; border-top: 1px solid rgba(31,26,18,0.12); padding-top: 10px; }
.seat-card .seat-answer span:not([data-own]) { display: block; font-family: var(--body); font-size: 12.5px; color: #8a7f6a; font-weight: 650; margin-bottom: 4px; }
.seat-card .btn-ghost { color: #1f1a12; border-color: rgba(31,26,18,0.2); }
.seat-card .btn-lamp { background: #1b1611; color: #f6f1e4; }
.seat-card-x { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: #6b5f4b; font-size: 15px; }
.seat-card { max-height: calc(100% - 20px); overflow: auto; }
.seat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.seat-card .btn-gift { background: #1b1611; color: #f6f1e4; }
.seat-got { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.seat-got span { font-size: 12.5px; color: #8a7f6a; font-weight: 650; margin-right: 4px; }
.seat-got :is(svg, img) { width: 24px; height: 24px; overflow: visible; }

/* ---------------------------------------------------------------- gifts */
.card-head { display: flex; align-items: center; gap: 8px; padding-right: 26px; }
.card-head b { flex: 1; min-width: 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.15; }
.card-back { border: 0; background: none; cursor: pointer; font-size: 26px; line-height: 1; color: #6b5f4b; min-width: 36px; min-height: 40px; padding: 0 6px 3px 0; }
.coin-pill {
  display: inline-flex; align-items: center; min-height: 36px; border-radius: 999px; padding: 4px 12px; cursor: pointer;
  font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums;
  border: 1px solid rgba(31, 26, 18, 0.2); background: #fffaec; color: #1f1a12;
}
.gift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gift {
  display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(31, 26, 18, 0.1); background: #e8dec8; color: #1f1a12;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.gift:hover { transform: translateY(-2px); border-color: #a87922; background: #efe6d2; }
.gift-art { height: 42px; width: 100%; display: grid; place-items: center; }
.gift-art :is(svg, img) { height: 42px; width: auto; max-width: 100%; overflow: visible; }
.gift-name { font-size: 11.5px; font-weight: 650; line-height: 1.15; text-align: center; }
.gift-cost { font-size: 11.5px; font-weight: 700; color: #7a5a18; }
.gift-cost.free { color: #6b5f4b; font-weight: 600; }
.card-note { font-size: 12px; line-height: 1.4; color: #6b5f4b; }
.gift-big { display: grid; place-items: center; padding: 8px 0 2px; }
.gift-big :is(svg, img) { height: 104px; width: auto; max-width: 100%; overflow: visible; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22)); }
.gift-ask { font-family: var(--display); font-size: 22px; line-height: 1.2; text-align: center; text-wrap: balance; }
.gift-price { text-align: center; font-size: 13.5px; font-weight: 600; color: #4d4433; }
.packs { display: grid; gap: 8px; }
.pack {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(31, 26, 18, 0.14); background: #fffaec; color: #1f1a12; font-size: 15px;
}
.pack:hover { border-color: #a87922; }
.pack .price { font-weight: 700; }

/* a gift on its way across the room */
.gift-fly { position: absolute; left: 0; top: 0; z-index: 9; width: 62px; pointer-events: none; will-change: transform; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45)); }
.gift-fly :is(svg, img), .gift-land :is(svg, img) { display: block; width: 100%; height: auto; overflow: visible; }
.gift-fly.bright { width: 86px; filter: drop-shadow(0 0 16px rgba(255, 214, 120, 0.95)) drop-shadow(0 10px 12px rgba(0, 0, 0, 0.4)); }
.gift-fly.grand { width: clamp(130px, 21vw, 230px); filter: drop-shadow(0 0 22px rgba(255, 150, 70, 0.8)) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45)); }
.gift-land { position: absolute; z-index: 9; width: 70px; pointer-events: none; transform: translate(-50%, -50%); animation: gift-land 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.gift-land.bright { width: 92px; }
.gift-land.grand { width: 150px; }
@keyframes gift-land {
  0% { transform: translate(-50%, -50%) scale(0.7); }
  16% { transform: translate(-50%, -50%) scale(1.3); }
  30%, 72% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, 10%) scale(0.25); opacity: 0; }
}
.spark {
  position: absolute; z-index: 8; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none;
  background: #ffe7a0; box-shadow: 0 0 10px 2px rgba(255, 190, 90, 0.8); animation: spark 0.95s ease-out forwards;
}
@keyframes spark { to { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.2); } }
.gift-banner {
  position: absolute; left: 50%; top: 14px; z-index: 10; transform: translateX(-50%); margin: 0;
  max-width: calc(100% - 24px); padding: 9px 20px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(13, 11, 9, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(233, 193, 112, 0.55);
  color: #f6f1e4; font-family: var(--display); font-style: italic; font-size: clamp(15px, 1.6vw, 21px);
  animation: gift-banner 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
@keyframes gift-banner { from { opacity: 0; transform: translate(-50%, -12px); } }
.stage.grand .stage-shade { animation: grand-light 7s ease-in-out; }
@keyframes grand-light { 20%, 70% { background-color: rgba(255, 140, 50, 0.14); } }
.line.gift-line { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--w-lamp); }
.line.gift-line :is(svg, img) { width: 22px; height: 22px; flex: none; overflow: visible; }

/* ---------------------------------------------------------------- tools */
.stage-tools {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 7;
  display: flex; gap: 2px; align-items: center; padding: 4px; border-radius: 999px;
  background: rgba(14, 11, 9, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  max-width: calc(100% - 24px);
}
.tool {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--w-muted); cursor: pointer; transition: background var(--fast) ease, transform var(--fast) ease;
}
.tool:hover { background: rgba(237, 233, 223, 0.1); color: var(--w-ink); }
.tool svg { width: 18px; height: 18px; }
.tool.react { font-size: 20px; }
.tool.react:active { transform: scale(1.25); }
.tool-sep { width: 1px; height: 20px; background: var(--w-line); flex: none; margin-inline: 4px; }

/* ---------------------------------------------------------------- the talk panel */
.talk { min-height: 0; display: flex; flex-direction: column; background: transparent; padding-right: clamp(0px, 1vw, 12px); }
.talk-tabs { display: flex; gap: 4px; padding: 4px 14px 10px; }
.talk-tabs button {
  border: 0; background: transparent; color: var(--w-muted); font-weight: 650; font-size: var(--t-sm); min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; gap: 7px; align-items: center;
}
.talk-tabs button[aria-selected="true"] { background: var(--w-panel-2); color: var(--w-ink); }
.talk-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
.talk-pane[hidden] { display: none !important; }
.talk .thread { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px; padding: 14px 4px 8px 0; }
.line { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 6px 0; animation: arrive 0.35s ease both; }
.line.cont { padding-top: 0; }
.line-av { width: 30px; }
.line-av .av { box-shadow: none; }
.line-name { font-size: 13px; font-weight: 700; color: var(--w-ink); display: flex; gap: 8px; align-items: baseline; }
.line-name small { font-weight: 400; font-size: 12px; color: var(--w-faint); font-variant-numeric: tabular-nums; }
.line p { font-size: 15px; line-height: 1.5; color: #d9d6cc; overflow-wrap: anywhere; white-space: pre-wrap; }
.line.me p { color: var(--w-ink); }
.line.me .line-name { color: var(--w-me); }
.line.system { grid-template-columns: 1fr; text-align: center; font-size: 12.5px; color: var(--w-faint); padding: 10px 0; }
.talk .typing { color: var(--w-faint); font-size: 12.5px; min-height: 18px; margin: 0 0 6px; }
.talk .composer { background: var(--w-panel-2); padding: 6px 6px 6px 14px; align-items: center; }
.talk .composer:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w-lamp) 60%, transparent); }
.talk .composer textarea { color: var(--w-ink); }
.talk .composer textarea::placeholder { color: var(--w-faint); }
.talk .send { background: var(--w-lamp); color: #2b1d02; }
/* nobody else yet: what to do next, said once */
.wait { margin: auto; display: grid; gap: var(--s-3); justify-items: center; text-align: center; padding: var(--s-5) var(--s-4); max-width: 30ch; color: var(--w-muted); font-size: var(--t-sm); }
.wait b { font-family: var(--display); font-weight: 400; font-size: var(--t-xl); line-height: 1.12; color: var(--w-ink); }
.wait .btn { margin-top: var(--s-2); }
.answers.earlier { padding-top: 4px; }
.answers.earlier:empty { display: none; }
.answers.earlier a.who { text-decoration: none; color: inherit; }
.answers.earlier a.who:hover b { text-decoration: underline; }
.pane-note { font-size: 13.5px; color: var(--w-muted); padding: 12px 0 10px; font-weight: 600; }
.answers { display: grid; gap: 10px; overflow: auto; padding-bottom: 8px; }
.answer { background: var(--w-panel-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.answer.mine { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w-me) 50%, transparent); }
.answer .who { display: flex; gap: 10px; align-items: center; }
.answer .who span { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 14px; }
.answer .who small { color: var(--w-faint); font-size: 12px; }
.answer p { font-family: var(--display); font-size: 16.5px; line-height: 1.32; overflow-wrap: anywhere; }


/* in the room: the same two buttons, in the room's own colours */
.talk .tool-btn { color: var(--w-muted); }
.talk .tool-btn:hover, .talk .tool-btn[aria-expanded="true"] { color: var(--w-ink); background: rgba(244, 238, 226, 0.08); }
.talk .emoji-pop { background: #2a211a; }
.talk .emoji-pop button:hover { background: rgba(244, 238, 226, 0.1); }
.line p .pic img { max-width: min(240px, 100%); margin-top: 4px; }
.talk .composer { padding-left: 6px; }

/* gifts and coins in a sheet, anywhere outside a room: the same cream card */
.gift-sheet { width: min(430px, 100%); gap: 14px; background: #f6f1e4; color: #1f1a12; }
.gift-sheet .card-head { padding-right: 34px; }
.gift-sheet .seat-line { color: #4d4433; font-size: 14.5px; }
.gift-sheet .btn { justify-self: stretch; }
.gift-sheet .btn-lamp { background: #1b1611; color: #f6f1e4; }
.gift-sheet .sheet-x { color: #6b5f4b; }

/* ========================================================== longer languages
 * Words in Armenian, Russian, German are longer. Nothing here has a fixed
 * width; these rules only loosen what was tuned for English.
 */
:root:lang(hy) *, :root:lang(hy) *::placeholder { font-style: normal !important; }
:root:not(:lang(en)) .btn { white-space: normal; padding-block: 8px; }
:root:not(:lang(en)) .hero h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1.02; }
:root:not(:lang(en)) .story h2 { font-size: clamp(36px, 6vw, 88px); line-height: 1.04; letter-spacing: -0.02em; }
:root:not(:lang(en)) .rc-q { font-size: 21px; }
:root:not(:lang(en)) .tabbar a { font-size: 11px; }

/* ====================================================================== tablet */
@media (max-width: 1000px) {
  .threshold { grid-template-columns: minmax(0, 1fr); }
  .th-pic { min-height: 0; aspect-ratio: 4 / 3.4; }
  .th-form { padding-top: 0; }
  .create { grid-template-columns: minmax(0, 1fr); }
  .create-preview { display: none; }
  .me-cols { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  .hero-in { grid-template-columns: minmax(0, 1fr); align-items: end; }
  .hero-doors { max-width: 640px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .story-in.split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .story-in.split .story-copy { justify-items: center; text-align: center; }
  .story-in.flip .seat-demo { order: 2; }
  .auth-art { display: none; }
  .dm { grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-4); }
  .people-demo { --sz: 42px; --rx: 88px; --ry: 64px; --spread: 0.7; }
  .fp-table b { font-size: 15px; }
  .seat { width: 80px; }
  .seat .av { --size: 52px !important; width: 52px; height: 52px; font-size: 17px; }
}

/* ======================================================================= phone
 * Designed for one hand: three places along the bottom, the way to open a
 * room in the middle of them, one door per row, the room on top of its talk.
 */
@media (max-width: 760px) {
  :root { --top-h: 54px; --arch: 150px; }
  .top-nav, .top .top-open { display: none; }
  .logo-sym { height: 24px; }
  .logo-word { height: 25px; }
  .main { padding: var(--s-3) var(--gutter) calc(var(--tab-h) + 40px + env(safe-area-inset-bottom, 0px)); }
  .shell.bare .main { padding-bottom: var(--s-7); }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; min-height: var(--tab-h);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 -1px 0 var(--line);
  }
  .tabbar a {
    position: relative; display: grid; justify-items: center; gap: 3px; min-height: 52px; align-content: center; padding: 4px 2px;
    text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.1; text-align: center;
  }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar a > span:not(.av) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .av { box-shadow: none; }
  .tabbar a[aria-current="page"] .av { box-shadow: 0 0 0 2px var(--ink); }
  .tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); }
  .tabbar .tab-open { color: var(--ink); }
  .tabbar .tab-open i { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 999px; background: var(--lamp); color: var(--lamp-ink); }
  .tabbar .tab-open i svg { width: 20px; height: 20px; }
  .toast { bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom, 0px)); }

  .page-head { margin-bottom: var(--s-4); }
  .rooms-head { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .search { max-width: none; justify-self: stretch; }
  .rail { gap: 0; }
  .rail-go { display: none !important; }
  .rail-item { width: 78px; }
  .rail-dot { right: 8px; }
  .friends .person-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .friends .person-row .acts { grid-column: auto; }
  .friends .person-row .acts:has(> :nth-child(2)) { grid-column: 2; justify-content: flex-start; }
  .rail-pic { width: 58px; height: 68px; border-radius: 29px 29px 11px 11px; }
  .tier { margin-top: var(--s-6); }
  /* open rooms: one after another sideways, the next one peeking in */
  .tier .doors { display: flex; grid-template-columns: none; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); }
  .tier .doors::-webkit-scrollbar { display: none; }
  .tier .doors > * { flex: 0 0 80%; scroll-snap-align: start; }
  .tier .doors > :only-child { flex-basis: 100%; }
  .tier-more { width: 100%; min-height: 48px; }
  .ask-row { min-height: 88px; }
  .asks { grid-template-columns: minmax(0, 1fr); }
  .ask-row { gap: var(--s-3); grid-template-columns: 50px minmax(0, 1fr) auto; }
  .ask-row img { width: 50px; height: 60px; }
  .ar-text b { font-size: 18px; }
  .ar-act { padding: 0 14px; }
  .quiet { flex-direction: column; align-items: flex-start; }
  .quiet .drawn { width: 150px; }
  .skel-card { aspect-ratio: auto; min-height: 300px; }
  .skel-pic { min-height: 320px; }
  .doors { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .room-card { aspect-ratio: auto; min-height: 300px; padding: var(--s-5) 20px 18px; }
  .rc-q { font-size: 24px; }

  .th-pic { aspect-ratio: auto; min-height: 320px; padding: 22px 20px; }
  .th-pic h1 { font-size: clamp(27px, 7.4vw, 36px); }

  .dm { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .dm-list { margin-inline: -8px; }
  .dm.has-open .dm-list, .dm:not(.has-open) .dm-pane { display: none; }
  .dm-back { display: inline-grid; }
  /* with a conversation open, the whole screen is that conversation */
  .talk-open .top, .talk-open .tabbar, .talk-open .page-head { display: none; }
  .talk-open .main { padding: 0; }
  .dm.has-open .dm-pane {
    position: fixed; inset: 0; z-index: 20; border-radius: 0; background: var(--bg);
    padding: calc(8px + env(safe-area-inset-top, 0px)) 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .dm-pane .duo .label, .dm-pane .duo-lock { display: none; }
  .duo-a { grid-template-columns: minmax(0, 1fr); }

  .me-hero { min-height: 380px; border-radius: var(--r-lg); margin-inline: calc(var(--gutter) * -0.5); }
  .me-plate { flex-direction: column; align-items: flex-start; }
  .me-cols { margin-top: var(--s-6); gap: var(--s-6); }
  .me-col { gap: var(--s-6); }

  .hero { min-height: 0; }
  .hero-in { padding: calc(var(--top-h) + 28px) var(--gutter) 36px; gap: var(--s-6); }
  .hero-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero-doors .room-card:nth-child(3) { display: none; }
  .hero-doors .room-card { padding: 16px 14px 16px; aspect-ratio: 3 / 4.6; }
  .hero-doors .rc-q { font-size: 17px; margin-bottom: 10px; }
  .hero-doors .rc-topic, .hero-doors .rc-state { font-size: 12.5px; }
  .hero .actions { width: 100%; }
  .hero .actions .btn { flex: 1 1 auto; }
  .story { padding-block: 76px; }
  .story h2 { font-size: clamp(40px, 12.4vw, 60px); }
  .story-sub { font-size: 18px; }
  .people-demo { height: 400px; margin-top: 28px; --sz: 32px; --rx: 62px; --ry: 46px; --spread: 0.3; }
  .fp-person.you { --ox: 190px !important; --oy: -560px !important; }
  .people-demo [data-k="0"] { --cx: 50%; --cy: 21%; }
  .people-demo [data-k="1"] { --cx: 25%; --cy: 74%; }
  .people-demo [data-k="2"] { --cx: 75%; --cy: 74%; }
  .fp-table b { font-size: 12.5px; }
  .fp-person u { box-shadow: 0 0 0 2px #150e08, 0 6px 12px rgba(0, 0, 0, 0.5); }
  .door-demo { width: min(300px, 100%); }
  .dd-q { font-size: 20px; }
  .seat-demo { --sz: 13.5vw; }
  .s-open .actions { width: 100%; }
  .s-open .actions .btn { flex: 1 1 auto; }

  /* the room: the picture, then who is here, then the talk, then where you write */
  .scene { height: auto; min-height: 100vh; min-height: 100dvh; }
  .scene-top { gap: var(--s-2); padding-inline: 10px; }
  .scene-title b { font-size: var(--t-md); }
  .scene-title span { display: none; }
  .scene-btn span { display: none; }
  .scene-btn { padding: 0 12px; }
  .scene-btn.lit span { display: inline; }
  .scene-body { display: flex; flex-direction: column; }
  .stage { height: min(112vw, 460px); flex: none; margin: 0 10px; border-radius: var(--r-lg); }
  .table { width: 70%; height: 44%; top: 49%; }
  .table-q { font-size: 16px; }
  .table-items { display: none; }
  .table-top { gap: 6px; }
  .cp { width: 30px; }
  .cp-book, .cp-scales, .cp-reel { width: 44px; }
  .seat { width: 64px; gap: 3px; }
  .seat .av { --size: 42px !important; width: 42px; height: 42px; font-size: 14px; }
  .seat .halo { width: 64px; height: 64px; top: -12px; }
  .seat-name { font-size: 12px; }
  .seat-host { display: none; }
  /* the words are right below; on the picture only the dots of someone typing show */
  .bubble:not(.dots) { display: none; }
  .stage-tools { bottom: 8px; }
  .talk { min-height: 52vh; padding: 6px 0 0; }
  .talk-tabs { padding-inline: 10px; }
  .talk-pane { padding-inline: 12px; }
  .talk .thread { min-height: 180px; }
  .talk .composer { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 24px 6px var(--w-wall); }
  .wait { padding-block: var(--s-6); }

  .person-row { grid-template-columns: auto minmax(0, 1fr); }
  .person-row .acts { grid-column: 2; justify-content: flex-start; }
  .sheet-back { place-items: end center; padding: 0; }
  .sheet { width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
  .topic-tile { width: 100px; height: 120px; }
}

/* ================================================================ small phone */
@media (max-width: 360px) {
  .rc-q { font-size: 21px; }
  .room-card { padding-inline: 16px; }
  .stage { margin-inline: 6px; }
  .seat { width: 54px; }
  .seat .av { --size: 36px !important; width: 36px; height: 36px; }
  .tabbar a { font-size: 11px; }
  .hero-doors .rc-q { font-size: 15.5px; }
  .people-demo { --sz: 28px; --rx: 52px; --ry: 42px; }
  .top-in { gap: var(--s-2); }
  .top-tools { gap: 2px; min-width: 0; }
  .top-tools .lang { max-width: 100px; padding-inline: 10px 22px; text-overflow: ellipsis; }
  .top-tools .btn { padding-inline: 10px; }
  .people-demo [data-k="1"] { --cx: 24%; }
  .people-demo [data-k="2"] { --cx: 76%; }
  .fp-table b { font-size: 11.5px; }
}

/* ========================================================== calmer, on request */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* a finger does not hover */
@media (hover: none) {
  a.room-card:hover { transform: none; }
  a.room-card:hover .rc-pic { transform: none; }
  a.room-card.is-idea:hover .rc-pic { filter: saturate(0.6) brightness(0.72); }
  a.room-card:hover .rc-act { background: rgba(244, 238, 226, 0.14); color: #f4eee2; }
  a.room-card.is-live:hover .rc-act { background: #e3ad54; color: #2a1c05; }
}


/* ================================================================ day or evening, switched from anywhere
 * The sun shows in the evening (tap for day), the moon by day (tap for evening). */
.look-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background var(--fast) ease; }
.look-btn:hover { background: var(--surface); }
.look-btn svg, .scene-look svg { width: 19px; height: 19px; }
.look-btn svg + svg, .scene-look svg + svg { display: none; }
:root[data-theme="light"] :is(.look-btn, .scene-look) svg:first-child { display: none; }
:root[data-theme="light"] :is(.look-btn, .scene-look) svg + svg { display: block; }
.scene-look { padding: 0; width: 44px; justify-content: center; }

/* The room by day: the photograph keeps its evening, everything around it turns to parchment. */
:root[data-theme="light"] .scene {
  color-scheme: light;
  background: radial-gradient(60% 50% at 38% 0%, rgba(224, 162, 58, 0.12), transparent 70%), #efe7d8;
}
:root[data-theme="light"] :is(.scene-top, .scene-crisis, .talk) {
  --w-ink: #1f1912; --w-muted: #6b6052; --w-faint: #8f8372; --w-line: rgba(31, 25, 18, 0.12);
  --w-panel: #f8f2e6; --w-panel-2: #e8dece; --w-me: #8a6420;
  color: var(--w-ink); color-scheme: light;
}
:root[data-theme="light"] .scene-btn { background: rgba(31, 25, 18, 0.06); }
:root[data-theme="light"] .scene-btn:hover { background: rgba(31, 25, 18, 0.11); }
:root[data-theme="light"] .scene-btn.lit { background: var(--w-lamp); }
:root[data-theme="light"] .line p { color: #3a3126; }
:root[data-theme="light"] .line.me p { color: #1f1912; }
:root[data-theme="light"] .talk .composer { background: #fffaf0; box-shadow: 0 1px 2px rgba(40, 30, 15, 0.08), inset 0 0 0 1px rgba(31, 25, 18, 0.08); }
:root[data-theme="light"] .talk .tool-btn:hover, :root[data-theme="light"] .talk .tool-btn[aria-expanded="true"] { background: rgba(31, 25, 18, 0.07); }
:root[data-theme="light"] .talk .emoji-pop { background: #fffaf0; box-shadow: var(--shadow); }
:root[data-theme="light"] .talk .emoji-pop button:hover { background: rgba(31, 25, 18, 0.07); }
:root[data-theme="light"] .wait .drawn { --sc-line: rgba(31, 25, 18, 0.25); --sc-fill: rgba(31, 25, 18, 0.05); --sc-ink: #3a3126; --sc-dash: rgba(31, 25, 18, 0.35); }
:root[data-theme="light"] .stage { box-shadow: 0 18px 50px -20px rgba(40, 30, 15, 0.45); }


/* ================================================================ the discussion room, brighter (polish 2026-10-15)
 * Warmer and more open: the photograph shows its floor, walls and furniture; the vignette is a soft
 * edge rather than a black frame; the table is smaller so people around it are easy to see.
 * Text keeps its own shadow, so it reads whatever the picture does. */
.stage-room { filter: brightness(1.2) saturate(1.06) contrast(1.02); }
.stage-shade { background: radial-gradient(95% 85% at 50% 46%, transparent 62%, color-mix(in srgb, var(--w-shade) 45%, transparent)); }
.stage-light { opacity: 0.9; background: radial-gradient(closest-side, color-mix(in srgb, var(--w-lamp-glow) 130%, transparent), transparent); }
.table { width: 52%; height: 40%; top: 50%; }
.table::before {
  background:
    radial-gradient(60% 55% at 50% 36%, var(--w-lamp-glow), transparent 74%),
    radial-gradient(closest-side, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.42)),
    url(art/rooms/table.webp) center / 100% 100% no-repeat;
}
.table-top { width: 74%; max-width: 30ch; }
.table-q { font-size: clamp(17px, 1.75vw, 27px); line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 18px rgba(0, 0, 0, 0.55); }
.seat-name { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.6); }
@media (max-width: 760px) {
  .table { width: 60%; height: 38%; }
  .table-top { width: 82%; }
  .table-q { font-size: clamp(14px, 4vw, 18px); }
}


/* ================================================================ full-height pages (polish 2026-10-15)
 * The cause of the "half light, half black" page: index.html paints <html> in the evening colour so the
 * first frame is never white, and body's min-height:100% resolves to nothing (html has no height), so a
 * short page ended halfway and the evening colour showed below it in the day look. The page colour now
 * belongs to <html> in both looks, and the body is at least one screen tall. */
html { background: var(--bg); transition: background-color var(--slow) ease; }
body { min-height: 100vh; min-height: 100dvh; }
#app { min-height: 100vh; min-height: 100dvh; }

/* ================================================================ Friends, nobody yet */
.fr-empty {
  --fr-line: color-mix(in srgb, var(--ink) 55%, transparent); --fr-wood: #8a6420; --fr-top: var(--raised); --fr-cup: var(--surface);
  --fr-steam: color-mix(in srgb, var(--ink) 25%, transparent); --fr-floor: color-mix(in srgb, var(--ink) 7%, transparent); --fr-lamp: var(--lamp);
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 440px); justify-content: center; align-items: center; gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(16px, 4vw, 40px); padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
:root:not([data-theme="light"]) .fr-empty { --fr-wood: #c79a50; }
.fr-empty-art svg { width: 100%; height: auto; display: block; }
.fr-empty-t { display: grid; gap: 12px; }
.fr-empty-t h2 { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 0; text-wrap: balance; }
.fr-empty-t p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; max-width: 44ch; }
.fr-empty-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.fr-empty-go .btn svg { width: 17px; height: 17px; }
@media (max-width: 760px) {
  .fr-empty { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .fr-empty-art { width: min(240px, 70%); }
  .fr-empty-t { justify-items: center; }
  .fr-empty-go { justify-content: center; }
  .fr-empty-go .btn { flex: 1 1 100%; justify-content: center; }
}
/* the list lines up with the page title and the Find people button */
.friends { max-width: none; }
/* mid-width screens: the top bar keeps every label on one line */
.top .top-open { white-space: nowrap; }
@media (max-width: 1060px) and (min-width: 761px) {
  .top-nav a { padding-inline: 9px; }
  .top-nav { margin-left: var(--s-2); }
  .top .top-open { padding-inline: 14px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .top-nav a[href="#me"] > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top-nav a { padding-inline: 7px; }
  .top .look-btn { width: 36px; }
}
/* the room by night: warm charcoal around the photograph, like the rest of the house, not black */
:root:not([data-theme="light"]) .scene { background: radial-gradient(60% 50% at 38% 0%, rgba(243, 193, 94, 0.08), transparent 70%), #1c1814; }

/* ------------------------------------------------------------ report and block */
.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .btn-danger, :root:not([data-theme]) .btn-danger { color: #1a0d0b; }
.safety-row { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid rgba(31, 26, 18, 0.12); padding-top: 10px; margin-top: 2px; }
.safety-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 13px; color: inherit; opacity: 0.7; cursor: pointer; }
.safety-btn:hover, .safety-btn:focus-visible { opacity: 1; background: rgba(127, 127, 127, 0.12); }
.safety-btn svg { width: 15px; height: 15px; }
.safety-sheet .muted { margin: -6px 0 0; font-size: var(--t-sm); }
.rep-why { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.rep-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; }
.rep-opt:has(input:checked) { border-color: var(--door); background: color-mix(in srgb, var(--door) 10%, transparent); }
.rep-opt input { accent-color: var(--door); width: 18px; height: 18px; margin: 0; flex: none; }
.rep-block { border-style: dashed; }
.safety-sheet textarea { width: 100%; resize: vertical; }
.blk-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); line-height: 1.5; }
.pm-acts { display: grid; gap: 8px; }
.pm-acts .btn { justify-content: center; }
.pm-acts svg { width: 16px; height: 16px; }
.dm-more { flex: none; }
.blocked-list { display: grid; gap: 6px; }
.blocked-list .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.danger-zone { border-top: 1px solid var(--line); padding-top: var(--s-5, 24px); }
.danger-zone .muted { max-width: 52ch; }
.btn-danger-line { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger-line:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

/* ------------------------------------------------------------ the bell and its notices */
.bell-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background var(--fast) ease; }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: var(--surface); }
.bell-btn .badge { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; font-size: 10.5px; padding: 0 4px; }
.bell-btn.is-ring svg { animation: bell-ring 0.9s ease; transform-origin: 50% 15%; }
@keyframes bell-ring { 15% { transform: rotate(14deg); } 35% { transform: rotate(-11deg); } 55% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }
.top.over:not(.scrolled) .bell-btn { color: #f4eee2; }
.bell-panel { position: fixed; z-index: 65; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); overflow: hidden; animation: rise 0.22s var(--ease) both; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 18px; }
.bell-head h2 { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 0; }
.bell-list { overflow: auto; padding: 0 6px 8px; overscroll-behavior: contain; }
.nt-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none; position: relative; }
.nt-row:hover, .nt-row:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nt-row.is-new::after { content: ""; position: absolute; right: 12px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--door); }
.nt-text { display: grid; gap: 2px; font-size: 14.5px; line-height: 1.4; padding-right: 16px; min-width: 0; }
.nt-text b { font-weight: 650; }
.nt-text time, .nt-sub { color: var(--muted); font-size: 12.5px; }
.nt-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-n { color: var(--muted); font-size: 12.5px; }
.bell-empty { margin: 8px 14px 16px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.bell-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.bell-foot .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .bell-panel { left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); width: auto; max-height: calc(100dvh - 90px); }
  .top .bell-btn { width: 36px; }
}
.ios-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.5; }
.ios-share { display: inline-grid; place-items: center; vertical-align: -4px; color: var(--door); }

/* ------------------------------------------------------------ front page: Mafia, your own room, and the rest */
.story-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #9b2a24; margin: 0; }
.s-mafia { background: #f8f1e6; color: #1b1612; }
.s-mafia .story-in.split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.s-mafia::after { opacity: 0.25; }
.s-mafia .story-sub { color: #5d544a; max-width: 34ch; }
.s-mafia .lit-red { color: #8f1f1b; }
.btn-mafia { background: #1b1612; color: #f7efe4; }
.btn-mafia:hover { background: #8f1f1b; }
.s-mafia .actions { justify-content: flex-start; }
.mafia-show { position: relative; aspect-ratio: 3 / 2; }
.ms-heads { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 64% 50% at 50% 50%, #000 64%, transparent 100%); mask-image: radial-gradient(ellipse 64% 50% at 50% 50%, #000 64%, transparent 100%); }
.s-mafia::after { display: none; }
.ms-cards { position: absolute; right: 0; bottom: 0; width: 30%; height: 44%; }
.ms-cards img { position: absolute; bottom: 0; left: 30%; width: 46%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 18px 30px -12px rgba(40, 20, 10, 0.55); transform-origin: 50% 110%; transition: transform 0.9s var(--ease); }
.ms-cards img:nth-child(1) { transform: rotate(-16deg) translateX(-34%); }
.ms-cards img:nth-child(2) { transform: translateY(-6%); z-index: 1; }
.ms-cards img:nth-child(3) { transform: rotate(16deg) translateX(34%); }
.story.is-waiting .ms-cards img { transform: rotate(0) translateY(30%); opacity: 0; }

.s-room { background: linear-gradient(180deg, #0f0d0b, #15110d); }
.room-show { position: relative; }
.rs-main { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px; box-shadow: 0 40px 80px -30px #000; }
.rs-picks { position: absolute; left: 5%; bottom: -8%; display: flex; gap: 10px; }
.rs-picks img { width: clamp(64px, 9vw, 112px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 2px solid rgba(244, 238, 226, 0.85); box-shadow: 0 14px 28px -10px #000; }
.rs-picks img:first-child { border-color: #ecc77a; }

.s-more { background: #0f0d0b; padding-block: clamp(56px, 7vw, 104px); }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.more-card { display: grid; gap: 10px; align-content: start; padding: clamp(22px, 2.6vw, 32px); border-radius: 22px; background: rgba(244, 238, 226, 0.04); border: 1px solid rgba(244, 238, 226, 0.09); }
.more-card h3 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.1; margin: 4px 0 0; }
.more-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 16px; }
.mc-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(236, 199, 122, 0.12); color: #ecc77a; }
.mc-ic svg { width: 22px; height: 22px; }
.story.is-waiting :is(.mafia-show, .room-show, .more-card) { opacity: 0; }
.story.is-in :is(.mafia-show, .room-show) { animation: story-show 1s var(--ease) 0.1s both; }
.story.is-in .more-card { animation: story-rise 0.9s var(--ease) both; }
.story.is-in .more-card:nth-child(2) { animation-delay: 0.12s; }
.story.is-in .more-card:nth-child(3) { animation-delay: 0.24s; }
@media (max-width: 860px) {
  .s-mafia .story-in.split, .s-room .story-in.split { grid-template-columns: minmax(0, 1fr); }
  .s-room .room-show { order: 2; margin-bottom: 30px; }
  .more-grid { grid-template-columns: minmax(0, 1fr); }
}
.rep-who { display: flex; align-items: center; gap: 10px; margin: -8px 0 0; } .rep-who b { font-weight: 650; }

/* ================================================================ the front page by day
 * Day is the house look: parchment, warm light, the photographs stay as they are. */
:root[data-theme="light"][data-screen="front"] { --bg: #f3ebdd; }
:root[data-theme="light"] :is(.hero, .story, .top.over).night {
  --bg: #f3ebdd; --surface: rgba(255, 250, 240, 0.75); --raised: #fffaf0;
  --ink: #1f1912; --ink-2: #3a3126; --muted: #6b6052; --faint: #978b7b;
  --line: rgba(31, 25, 18, 0.1); --line-2: rgba(31, 25, 18, 0.22);
  --door: #8a6420; --door-ink: #fffaf0; --door-soft: rgba(138, 100, 32, 0.12);
  --lamp: #e0a23a; --lamp-ink: #3a2705; --lamp-glow: rgba(224, 162, 58, 0.34);
  --btn: #1f1912; --btn-ink: #f4eee2;
  color: var(--ink); color-scheme: light;
}
:root[data-theme="light"] .story { --deep: #f3ebdd; }
:root[data-theme="light"] .story::after { opacity: 0.35; }
:root[data-theme="light"] .story h2 .lit { background: linear-gradient(96deg, #2a1d0e 4%, #8a5f1c 50%, #c48a2e); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* the first picture: morning light through the door */
:root[data-theme="light"] .hero { background: radial-gradient(70% 80% at 78% 40%, #fbf1dc, #f3ebdd 60%, #efe5d4); }
:root[data-theme="light"] .hero-bg { opacity: 0.32; filter: sepia(0.35) saturate(0.8) brightness(1.25) contrast(0.9);
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 62%); mask-image: linear-gradient(90deg, transparent 18%, #000 62%); }
:root[data-theme="light"] .hero::before { background: linear-gradient(90deg, rgba(243, 235, 221, 0.96), rgba(243, 235, 221, 0.72) 46%, rgba(243, 235, 221, 0.35)), linear-gradient(180deg, rgba(243, 235, 221, 0.6), rgba(243, 235, 221, 0) 28%, rgba(243, 235, 221, 0) 72%, #f3ebdd); }
:root[data-theme="light"] .hero-doors .room-card { box-shadow: 0 30px 60px -24px rgba(60, 38, 12, 0.45), 0 0 0 1px rgba(31, 25, 18, 0.06); }
:root[data-theme="light"] .top.over.scrolled { background: color-mix(in srgb, #f3ebdd 86%, transparent); }
:root[data-theme="light"] .top.over:not(.scrolled) .bell-btn { color: var(--ink-2); }

/* 1. people, round their tables */
:root[data-theme="light"] .s-people { background: linear-gradient(180deg, #f3ebdd, #efe5d4); }
:root[data-theme="light"] .fp-person u, :root[data-theme="light"] .sd-seat:not(.you) { box-shadow: 0 0 0 3px #f6eee0, 0 10px 20px rgba(70, 45, 15, 0.22); }
:root[data-theme="light"] .fp-table { box-shadow: 0 6px 0 -1px #1c0f08, 0 24px 36px rgba(70, 45, 15, 0.3), 0 0 60px 10px rgba(224, 162, 58, 0.18), inset 0 2px 1px rgba(255, 226, 180, 0.2); }
:root[data-theme="light"] .fp-person.you u { box-shadow: 0 0 0 2.5px #b07a2a, 0 0 26px 4px rgba(224, 162, 58, 0.4); }

/* 2. the door */
:root[data-theme="light"] .s-ask { background: #eee4d2; }
:root[data-theme="light"] .dd-topic { color: #8a6420; }
:root[data-theme="light"] .dd-arch { box-shadow: 0 0 0 1px rgba(31, 25, 18, 0.08), 0 40px 70px -24px rgba(60, 38, 12, 0.55); }
:root[data-theme="light"] .door-demo.open .dd-arch { box-shadow: 0 0 0 1px rgba(31, 25, 18, 0.08), 0 40px 70px -24px rgba(60, 38, 12, 0.55), 0 0 120px 8px rgba(236, 187, 104, 0.45); }

/* 3. the table */
:root[data-theme="light"] .s-seat { background: linear-gradient(180deg, #eee4d2, #f3ebdd); }
:root[data-theme="light"] .seat-demo { background: radial-gradient(closest-side, rgba(200, 140, 60, 0.22), rgba(200, 140, 60, 0)); }
:root[data-theme="light"] .sd-table { filter: drop-shadow(0 20px 26px rgba(70, 45, 15, 0.28)); }
:root[data-theme="light"] .sd-bub { background: #fffaf0; box-shadow: 0 8px 18px rgba(70, 45, 15, 0.25); }
:root[data-theme="light"] .sd-bub::after { background: #fffaf0; }
:root[data-theme="light"] .sd-seat.you { background: rgba(176, 122, 42, 0.08); box-shadow: 0 0 0 2px #b07a2a; }
:root[data-theme="light"] .sd-seat.you b { color: #8a6420; }

/* your own room, and the rest */
:root[data-theme="light"] .s-room { background: linear-gradient(180deg, #f3ebdd, #ede2cf); }
:root[data-theme="light"] .rs-main { box-shadow: 0 40px 80px -30px rgba(60, 38, 12, 0.55); }
:root[data-theme="light"] .rs-picks img { border-color: #fffaf0; box-shadow: 0 14px 28px -10px rgba(60, 38, 12, 0.5); }
:root[data-theme="light"] .rs-picks img:first-child { border-color: #c48a2e; }
:root[data-theme="light"] .s-more { background: #f3ebdd; }
:root[data-theme="light"] .more-card { background: #fbf6ec; border-color: rgba(31, 25, 18, 0.08); box-shadow: 0 1px 2px rgba(40, 30, 15, 0.04), 0 18px 40px -24px rgba(60, 38, 12, 0.25); }
:root[data-theme="light"] .mc-ic { background: rgba(176, 122, 42, 0.12); color: #8a6420; }

/* 4. open your own: the arch lit at dusk-gold on parchment */
:root[data-theme="light"] .s-open { background: radial-gradient(60% 50% at 50% 30%, #fbe9c4, #f3ebdd 70%); }
:root[data-theme="light"] .s-open::before { background: linear-gradient(180deg, rgba(243, 235, 221, 0), #f3ebdd); }
:root[data-theme="light"] .am-line { stroke: #2a1d0e; }
:root[data-theme="light"] .am-light { fill: #e0a23a; }

/* ================================================================ front page, second edition
 * Find your people: two rows of rooms drift past, slowly, like doors along a corridor. */
.s-people { padding-bottom: clamp(64px, 8vw, 120px); }
.gallery { margin-top: clamp(40px, 5vw, 72px); display: grid; gap: clamp(16px, 2vw, 26px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.g-row { display: flex; gap: clamp(16px, 2vw, 26px); width: max-content; animation: g-move 90s linear infinite; }
.g-row.rev { animation-duration: 110s; animation-direction: reverse; margin-left: calc(var(--gw, 280px) * -0.5); }
.story:not(.is-in) .g-row { animation-play-state: paused; }
@keyframes g-move { to { transform: translateX(-50%); } }
.g-card { --gw: clamp(220px, 21vw, 290px); position: relative; flex: none; width: var(--gw); aspect-ratio: 3 / 4; margin: 0; border-radius: calc(var(--gw) / 2) calc(var(--gw) / 2) 22px 22px; overflow: hidden; isolation: isolate; background: #1a1410;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 60px -28px rgba(40, 24, 8, 0.6); }
.g-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); }
.g-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 9, 6, 0) 34%, rgba(12, 9, 6, 0.55) 62%, rgba(12, 9, 6, 0.92)); }
.g-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px 22px; display: grid; gap: 10px; color: #f6efe2; }
.g-topic { font-size: 13px; font-weight: 700; color: #ecc77a; }
.g-q { font-family: var(--display); font-weight: 500; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.16; letter-spacing: -0.01em; text-wrap: balance; }
.g-in { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: rgba(246, 239, 226, 0.82); }
.g-faces { display: flex; }
.g-faces img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #17110c; }
.g-faces img + img { margin-left: -8px; }
@media (prefers-reduced-motion: reduce) { .g-row { animation: none; } .gallery { overflow-x: auto; } }

/* Take a seat: the table from above. People speak in turn; one chair waits. */
.tb { position: relative; width: min(560px, 100%); aspect-ratio: 1; justify-self: center; --r: 47%; margin: 40px 0; }
.tb-glow { position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 180, 90, 0.35), rgba(240, 180, 90, 0)); }
.tb-wood { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: cover; clip-path: circle(49.4%); filter: drop-shadow(0 30px 40px rgba(50, 30, 10, 0.45)); }
.tb-wood { box-shadow: none; }
.tb::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; box-shadow: 0 40px 70px -20px rgba(50, 30, 10, 0.55), 0 0 0 1px rgba(60, 35, 12, 0.25); }
.tb-cup { position: absolute; left: 30%; top: 46%; width: 15%; filter: drop-shadow(0 10px 10px rgba(30, 15, 5, 0.45)); transform: rotate(-8deg); }
.tb-candle { position: absolute; left: 56%; top: 30%; width: 11%; filter: drop-shadow(0 12px 12px rgba(30, 15, 5, 0.5)); }
.tb-seat { position: absolute; left: 50%; top: 50%; width: clamp(58px, 7vw, 78px); aspect-ratio: 1; margin: calc(clamp(58px, 7vw, 78px) / -2) 0 0 calc(clamp(58px, 7vw, 78px) / -2);
  transform: rotate(var(--a)) translateX(calc(min(560px, 86vw) * 0.47)) rotate(calc(var(--a) * -1)); }
.tb-seat img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fbf5ea, 0 14px 26px rgba(50, 30, 10, 0.35); }
.tb-seat.you { border-radius: 50%; display: grid; place-items: center; background: rgba(255, 250, 240, 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 2px #c48a2e, 0 14px 26px rgba(50, 30, 10, 0.25); animation: tb-free 2.8s ease-in-out infinite; }
.tb-seat.you b { font-size: 14px; font-weight: 700; color: #8a6420; }
@keyframes tb-free { 0%, 100% { box-shadow: 0 0 0 2px #c48a2e, 0 0 0 0 rgba(196, 138, 46, 0.35), 0 14px 26px rgba(50, 30, 10, 0.25); } 50% { box-shadow: 0 0 0 2px #c48a2e, 0 0 0 16px rgba(196, 138, 46, 0), 0 14px 26px rgba(50, 30, 10, 0.25); } }
.tb-say { position: absolute; bottom: calc(100% + 12px); width: max-content; max-width: 210px; padding: 10px 14px; border-radius: 18px; background: #fffaf0; color: #1f1912; font-style: normal; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 1px 1px rgba(40, 25, 8, 0.06), 0 16px 34px -10px rgba(40, 25, 8, 0.35); opacity: 0; transform: translateY(8px) scale(0.92); transform-origin: bottom center; z-index: 3; }
.tb-say.t { left: 50%; translate: -50% 0; }
.tb-say.r { left: 40%; border-bottom-left-radius: 6px; transform-origin: bottom left; }
.tb-say.l { right: 40%; border-bottom-right-radius: 6px; transform-origin: bottom right; }
.story.is-in .tb-say { animation: tb-say 15s var(--ease) infinite; animation-delay: calc(0.8s + var(--d)); }
.story.is-in .tb-seat:not(.you) img { animation: tb-talk 15s ease-in-out infinite; animation-delay: calc(0.8s + var(--d)); }
@keyframes tb-say { 0% { opacity: 0; transform: translateY(8px) scale(0.92); } 3%, 17% { opacity: 1; transform: none; } 20%, 100% { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes tb-talk { 0%, 20%, 100% { box-shadow: 0 0 0 4px #fbf5ea, 0 14px 26px rgba(50, 30, 10, 0.35); } 3%, 17% { box-shadow: 0 0 0 4px #e9b45c, 0 0 0 10px rgba(233, 180, 92, 0.25), 0 14px 26px rgba(50, 30, 10, 0.35); } }
.story.is-waiting .tb { opacity: 0; }
.story.is-in .tb { animation: story-show 1.2s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .tb-say { opacity: 1; transform: none; } .tb-seat:not(:first-of-type) .tb-say { display: none; } }

/* A room of your own: the same chair, lamp and shelf, in four different rooms. */
.rv { display: grid; gap: 18px; justify-items: center; }
.rv-stage { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 28px; overflow: hidden; isolation: isolate; background: #1a1410;
  box-shadow: 0 50px 90px -40px rgba(40, 24, 8, 0.7), 0 0 0 1px rgba(31, 25, 18, 0.06); }
.rv-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0; animation: rv-look 16s ease-in-out infinite; animation-delay: calc(var(--i) * 4s - 0.5s); }
.rv-plate:first-child { opacity: 1; }
@keyframes rv-look { 0% { opacity: 0; } 5%, 25% { opacity: 1; } 31%, 100% { opacity: 0; } }
.rv-stage img:not(.rv-plate) { position: absolute; display: block; }
.rv-stage > img:not(.rv-plate), .rv-side, .rv-shelf, .rv-frame { filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.45)); }
.rv-rug { left: 20%; bottom: 3%; width: 60%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)) !important; opacity: 0.95; }
.rv-chair { left: 15%; bottom: 8%; width: 30%; }
.rv-side { position: absolute; left: 46%; bottom: 11%; width: 12%; display: flex; flex-direction: column; align-items: center; }
.rv-side img { position: static !important; }
.rv-lamp { width: 92%; margin-bottom: -3%; }
.rv-table { width: 100%; }
.rv-plant { right: 7%; bottom: 7%; width: 13%; }
.rv-shelf { position: absolute; right: 8%; top: 31%; width: 30%; height: 18%; }
.rv-board { left: 0; bottom: 0; width: 100%; }
.rv-books { left: 8%; bottom: 5%; width: 34%; }
.rv-vase { right: 10%; bottom: 5%; width: 18%; }
.rv-frame { position: absolute; left: 21%; top: 13%; width: 14%; aspect-ratio: 727 / 900; }
.rv-frame img { inset: 0; width: 100%; height: 100%; }
.rv-frame .rv-art { inset: 13% 15%; width: 70%; height: 74%; object-fit: cover; }
.rv-looks { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 250, 240, 0.7); box-shadow: 0 0 0 1px rgba(31, 25, 18, 0.08); }
:root[data-theme="dark"] .rv-looks { background: rgba(255, 250, 240, 0.06); box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.1); }
.rv-looks span { position: relative; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); isolation: isolate; }
.rv-looks span::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--btn); opacity: 0; animation: rv-look 16s ease-in-out infinite; animation-delay: calc(var(--i) * 4s - 0.5s); }
.rv-looks span { animation: rv-chip 16s ease-in-out infinite; animation-delay: calc(var(--i) * 4s - 0.5s); }
@keyframes rv-chip { 0% { color: var(--muted); } 5%, 25% { color: var(--btn-ink); } 31%, 100% { color: var(--muted); } }
.story.is-waiting .rv { opacity: 0; }
.story.is-in .rv { animation: story-show 1.2s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .rv-plate, .rv-looks span, .rv-looks span::before { animation: none; } .rv-looks span:first-child { color: var(--btn-ink); } .rv-looks span:first-child::before { opacity: 1; } }

/* the first picture: by day, let the door be seen */
:root[data-theme="light"] .hero-bg { opacity: 0.7; filter: sepia(0.2) saturate(0.9) brightness(1.12);
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, #000 52%); mask-image: linear-gradient(90deg, transparent 8%, #000 52%); }
:root[data-theme="light"] .hero::before { background: linear-gradient(90deg, rgba(243, 235, 221, 0.97) 18%, rgba(243, 235, 221, 0.55) 48%, rgba(243, 235, 221, 0.12) 80%), linear-gradient(180deg, rgba(243, 235, 221, 0.5), rgba(243, 235, 221, 0) 22%, rgba(243, 235, 221, 0) 76%, #f3ebdd); }
@media (max-width: 860px) {
  .tb { width: min(420px, 100%); margin: 56px auto 24px; }
  .tb-seat { transform: rotate(var(--a)) translateX(calc(min(420px, 86vw) * 0.47)) rotate(calc(var(--a) * -1)); }
  .tb-say { max-width: 170px; font-size: 13px; }
  .s-seat .story-in.split { grid-template-columns: minmax(0, 1fr); }
  .s-seat .story-copy { order: -1; }
}
.rv-plant { width: 11%; right: 6%; }
.rv-shelf { top: 25%; right: 10%; width: 28%; }
@media (max-width: 860px) {
  .tb-say.r { left: auto; right: 30%; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; transform-origin: bottom right; }
  .tb-say.l { right: auto; left: 30%; border-bottom-right-radius: 18px; border-bottom-left-radius: 6px; transform-origin: bottom left; }
}
.tb { container-type: inline-size; }
.tb-seat, .tb-seat:is(*) { transform: rotate(var(--a)) translateX(46cqw) rotate(calc(var(--a) * -1)); }
@media (max-width: 860px) { .tb { width: min(400px, 88%); } }

/* ================================================================ front page, third edition */
/* ---- 1. Find your people: topic cards */
.tp-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 28px); }
.tp-grid > :nth-child(n + 7) { display: none; }
.tp-card { --tint: #f6f0e6; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; text-decoration: none; color: #1f1912; background: var(--tint);
  box-shadow: 0 1px 2px rgba(40, 25, 8, 0.06), 0 14px 34px -22px rgba(40, 25, 8, 0.35); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tp-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(40, 25, 8, 0.06), 0 22px 44px -24px rgba(40, 25, 8, 0.45); }
.tp-card:focus-visible { outline: 3px solid var(--door); outline-offset: 3px; }
.tp-pic { display: block; aspect-ratio: 10 / 7; overflow: hidden; background: #d9cfbf; }
.tp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.tp-card:hover .tp-pic img, .tp-card:focus-visible .tp-pic img { transform: scale(1.035); }
.tp-text { display: grid; gap: 8px; padding: 20px 22px 24px; align-content: start; flex: 1; }
.tp-name { font-size: 13.5px; font-weight: 700; color: color-mix(in srgb, #1f1912 62%, var(--accent, #8a6420)); }
.tp-q { font-family: var(--display); font-size: clamp(21px, 1.7vw, 25px); line-height: 1.18; letter-spacing: -0.01em; text-wrap: balance; }
.tp-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: #4d4335; }
.tp-card[data-tint="books"] { --tint: #eef0e4; --accent: #5f7a4e; }
.tp-card[data-tint="film"] { --tint: #e8edf4; --accent: #3e5a86; }
.tp-card[data-tint="football"] { --tint: #e8f1e4; --accent: #3f7a3a; }
.tp-card[data-tint="humour"] { --tint: #fbeee0; --accent: #c0632e; }
.tp-card[data-tint="politics"] { --tint: #e9edf1; --accent: #4b5d72; }
.tp-card[data-tint="poetry"] { --tint: #f1ebf4; --accent: #7c5a8e; }
.tp-card[data-tint="running"] { --tint: #e7f0f5; --accent: #2f6f95; }
.tp-card[data-tint="philosophy"] { --tint: #f3f1ec; --accent: #6d675c; }
.tp-card[data-tint="history"] { --tint: #f6e9e0; --accent: #a4532f; }
.tp-card[data-tint="music"] { --tint: #f2e6ea; --accent: #84304a; }
.tp-card[data-tint="travel"] { --tint: #e4f2f1; --accent: #1f7c78; }
.tp-card[data-tint="cooking"] { --tint: #eef1e2; --accent: #5e7a2c; }
:root[data-theme="dark"] .tp-card { --tint-d: color-mix(in srgb, var(--tint) 7%, #211b15); background: var(--tint-d); color: #f4eee2; box-shadow: 0 0 0 1px rgba(244, 238, 226, 0.07); }
:root[data-theme="dark"] .tp-name { color: color-mix(in srgb, #f4eee2 55%, var(--accent, #cba660)); }
:root[data-theme="dark"] .tp-live { color: #c2b8a8; }
.tp-more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }
.tp-more .btn { min-height: 48px; padding: 0 24px; background: var(--raised); border: 1px solid var(--line-2); }
.s-people { padding-bottom: clamp(76px, 9vw, 136px); }
@media (max-width: 1000px) { .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tp-grid { grid-template-columns: minmax(0, 1fr); } .tp-grid > :nth-child(n + 5) { display: none; } }
@media (prefers-reduced-motion: reduce) { .tp-card, .tp-pic img { transition: none; } }

/* ---- 2. One topic, one table: a pale doorway, the door opens once onto a sunlit room */
.s-ask .story-in.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dw { margin: 0; justify-self: center; width: min(380px, 100%); display: grid; gap: 26px; justify-items: center; }
.dw-way { position: relative; display: block; width: 100%; text-decoration: none; perspective: 1600px; border-radius: 10px; }
.dw-way:focus-visible { outline: 3px solid var(--door); outline-offset: 8px; }
.dw-frame { position: relative; display: block; aspect-ratio: 5 / 8; padding: 16px 16px 0; border-radius: 120px 120px 6px 6px;
  background: linear-gradient(90deg, #e7dccb, #f6efe3 18%, #efe5d6 82%, #ddd0bd); box-shadow: inset 0 0 0 1px rgba(110, 86, 52, 0.18), 0 1px 0 rgba(255, 255, 255, 0.6) inset; transform-style: preserve-3d; }
.dw-room { position: absolute; inset: 16px 16px 0; border-radius: 104px 104px 2px 2px; overflow: hidden; background: #c9b493; box-shadow: inset 0 6px 14px rgba(60, 38, 12, 0.35), inset 0 0 0 1px rgba(60, 38, 12, 0.2); }
.dw-room img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.dw-leaf { position: absolute; inset: 16px 16px 0; border-radius: 104px 104px 2px 2px; transform-origin: 0 50%; transform-style: preserve-3d; transform: rotateY(-16deg);
  background: linear-gradient(90deg, #f1e8da, #f8f2e8 40%, #ece2d2); box-shadow: inset 0 0 0 1px rgba(110, 86, 52, 0.16), 6px 0 18px -10px rgba(60, 38, 12, 0.35);
  transition: transform 1.1s cubic-bezier(0.32, 0.72, 0.24, 1) 0.15s; display: grid; grid-template-rows: 1.3fr 1fr; gap: 9%; padding: 30% 15% 14%; }
.dw-panel { display: block; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(110, 86, 52, 0.18), inset 2px 2px 4px rgba(110, 86, 52, 0.08), 1px 1px 0 rgba(255, 255, 255, 0.7); }
.dw-panel:first-child { border-radius: 80px 80px 6px 6px; }
.dw-handle { position: absolute; right: 9%; top: 54%; width: 5px; height: 42px; border-radius: 3px; background: linear-gradient(90deg, #a8875a, #d8bf93 50%, #9c7c50); box-shadow: 0 2px 4px rgba(60, 38, 12, 0.3); }
.dw-edge { position: absolute; top: 0; bottom: 0; right: -7px; width: 7px; background: linear-gradient(90deg, #ddd1bf, #cbbca6); transform-origin: 0 50%; transform: rotateY(90deg); border-radius: 0 2px 2px 0; }
.dw-floor { position: absolute; left: -12%; right: -12%; bottom: -26px; height: 52px; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 45, 15, 0.18), rgba(70, 45, 15, 0)); pointer-events: none; }
.story.is-in .dw-leaf { transform: rotateY(-72deg); }
.story.is-in .dw-room img { transform: scale(1); }
.dw-cap { display: grid; gap: 6px; text-align: center; max-width: 30ch; }
.dw-topic { font-size: 13.5px; font-weight: 700; color: var(--door); }
.dw-q { font-family: var(--display); font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; color: var(--ink); text-wrap: balance; }
.story.is-waiting .dw { opacity: 0; }
.story.is-in .dw { animation: story-show 0.8s var(--ease) both; }
:root[data-theme="dark"] .dw-frame { background: linear-gradient(90deg, #3a3026, #4a3e31 18%, #43382c 82%, #352b22); box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.08); }
:root[data-theme="dark"] .dw-leaf { background: linear-gradient(90deg, #4a3e31, #56493a 40%, #443829); box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.08), 6px 0 18px -10px rgba(0, 0, 0, 0.6); }
:root[data-theme="dark"] .dw-panel { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 1px 1px 0 rgba(255, 255, 255, 0.05); }
:root[data-theme="dark"] .dw-edge { background: linear-gradient(90deg, #3a3026, #2c241c); }
:root[data-theme="dark"] .dw-floor { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
@media (prefers-reduced-motion: reduce) { .dw-leaf, .dw-room img { transition: none; } .dw-leaf { transform: rotateY(-72deg); } .dw-room img { transform: none; } .story.is-waiting .dw { opacity: 1; } }
@media (max-width: 860px) { .s-ask .story-in.split { grid-template-columns: minmax(0, 1fr); } .s-ask .story-copy { justify-items: center; text-align: center; } .dw { width: min(300px, 78%); margin-top: 24px; } }
:root[data-theme="light"] .s-ask { background: #f3ebdd; }

/* ---- 5. A room of your own: grounded furniture, clean walls, a real segmented control */
.rv-plate { animation: none !important; opacity: 0 !important; transition: opacity 0.9s ease; }
.rv[data-look="0"] .rv-plate[data-i="0"], .rv[data-look="1"] .rv-plate[data-i="1"], .rv[data-look="2"] .rv-plate[data-i="2"], .rv[data-look="3"] .rv-plate[data-i="3"] { opacity: 1 !important; }
.rv-stage > img:not(.rv-plate), .rv-side { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.3)); }
.rv-rug { left: 18%; bottom: 4%; width: 64%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)) !important; }
.rv-chair { left: 14%; bottom: 10%; width: 31%; }
.rv-side { left: 47%; bottom: 12.5%; width: 12%; }
.rv-plant { right: 9%; bottom: 8%; width: 12%; }
.rv-shadow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
.rv-s-chair { left: 13%; bottom: 7.5%; width: 34%; height: 9%; }
.rv-s-side { left: 46%; bottom: 10.5%; width: 14%; height: 5%; }
.rv-s-plant { right: 8.5%; bottom: 6.5%; width: 13%; height: 5%; }
.lk { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: #fbf6ec; box-shadow: inset 0 0 0 1px rgba(31, 25, 18, 0.1); width: min(440px, 100%); }
.lk-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 999px; background: #1f1912; box-shadow: 0 2px 8px rgba(31, 25, 18, 0.25);
  transform: translateX(calc(var(--look, 0) * 100%)); transition: transform 0.45s cubic-bezier(0.32, 0.72, 0.24, 1); }
.rv { --look: 0; }
.lk-opt { position: relative; z-index: 1; min-height: 40px; border: 0; background: transparent; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 650; color: #6b6052; cursor: pointer; transition: color 0.3s ease; }
.lk-opt[aria-checked="true"] { color: #f6efe3; }
.lk-opt:focus-visible { outline: 2px solid var(--door); outline-offset: 2px; }
:root[data-theme="dark"] .lk { background: #2a231c; box-shadow: inset 0 0 0 1px rgba(244, 238, 226, 0.1); }
:root[data-theme="dark"] .lk-pill { background: #f4eee2; }
:root[data-theme="dark"] .lk-opt { color: #c2b8a8; }
:root[data-theme="dark"] .lk-opt[aria-checked="true"] { color: #1f1912; }
.rv-looks { display: none; }
@media (prefers-reduced-motion: reduce) { .rv-plate, .lk-pill { transition: none; } }

/* ---- shared rhythm */
.story-in { max-width: 1200px; }
/* the door opens inward, into the room, so it stays inside the doorway */
.dw-room { perspective: 1100px; perspective-origin: 20% 55%; }
.dw-room > img { position: absolute; inset: 0; }
.dw-leaf { inset: 0; border-radius: inherit; transform: rotateY(14deg); box-shadow: inset 0 0 0 1px rgba(110, 86, 52, 0.16), -8px 0 22px -8px rgba(60, 38, 12, 0.35); }
.story.is-in .dw-leaf { transform: rotateY(74deg); }
.dw-edge { right: auto; left: 100%; width: 8px; transform-origin: 0 50%; transform: rotateY(-90deg); }
@media (prefers-reduced-motion: reduce) { .dw-leaf { transform: rotateY(74deg); } }
.tp-q, .dw-q { display: block; font-weight: 500; }
.tp-q { font-size: clamp(21px, 1.75vw, 25px); }
/* the photo room in the preview is only the stage; the furniture stays put while the room around it changes */
.rv-stage { background: #2a221b; }
