/* Floorbell: live pitches the room can fund. A concept by ALLOIC.
   Style: accent ladder (one hue; full strength on small marks, pale tints on areas).
   Grid, at 1440: sidebar 232 + canvas 1208; canvas padding 32 + 32 leaves 1144.
   Live room: main column (1fr = 754) + 24 + side column 366 = 1144. */

:root {
  --ground: #fbf7f8;
  --surface: #ffffff;
  --raised: #f5f0f2;
  --active: #efe8eb;
  --border: #e9e2e5;
  --rule: #f3eef0;
  --control: #d3cacf;
  --text: #15121a;
  --muted: #5d5660;
  --accent: #b8336a;
  --accent-soft: #fdf2f7;
  --accent-track: #f8dbe8;
  --accent-ink: #6b1d3e;
  --positive: #247b50;
  --negative: #c4242a;
  --pill-positive-bg: #dcfce7; --pill-positive-ink: #14532d;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb;  --pill-warning-ink: #92400e;
  --pill-neutral-bg: #f1ecee;  --pill-neutral-ink: #3b3540;
  --pill-accent-bg: #fdf2f7;   --pill-accent-ink: #6b1d3e;

  /* the stage takes the colour of whoever is on it */
  --stage: #a52e60; --stage-deep: #24101a; --stage-ink: #ffffff; --stage-soft: #f8dbe8;

  --font: "DM Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 232px;
  --pad: 32px;
  --gap: 24px;
  --card-pad: 20px;
  --radius-card: 8px;
  --radius-control: 6px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 15px/22px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
:where(ul[class], ol[class]) { padding: 0; list-style: none; }
svg, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the concept strip: always the first thing in the document ---------- */
.concept { padding: 9px 32px; background: var(--accent-track); color: var(--accent-ink); font-size: 14px; line-height: 21px; }
.concept a { font-weight: 600; text-underline-offset: 3px; white-space: nowrap; }
.concept a:hover { text-decoration-thickness: 2px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); align-items: start; }
.topbar { display: none; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; padding: 20px 12px 16px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; text-decoration: none; }
.brand .mark { color: var(--accent); flex: none; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.scope { margin: 18px 0 14px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); font-weight: 600; line-height: 20px; }
.scope-sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.nav svg, .side-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav-group { margin: 24px 10px 6px; font-size: 13px; color: var(--muted); }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 24px; }
.side-btn { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); text-align: left; transition: background-color 150ms ease, color 150ms ease; }
.side-btn:hover { background: var(--raised); color: var(--text); }
.side-btn[aria-pressed="true"] { color: var(--accent-ink); }
.colophon { color: var(--muted); font-size: 13px; line-height: 19px; }
.side .colophon { margin: 12px 10px 0; }
.colophon a { font-weight: 600; text-underline-offset: 3px; }
.colophon-foot { display: none; margin-top: var(--gap); }

.canvas { min-width: 0; padding: 28px var(--pad) 40px; }
.view { animation: view-in 380ms var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }
.nav-live { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.embed .concept, .embed .colophon-foot { display: none; }

/* ---------- shared pieces ---------- */
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); }
.card h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-note { color: var(--muted); font-size: 13px; line-height: 19px; text-align: right; }
.fine { color: var(--muted); font-size: 13px; line-height: 19px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 34px; padding: 0 13px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out); }
.btn:hover { background: var(--raised); border-color: #b9adb4; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { color: var(--muted); background: var(--raised); cursor: not-allowed; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-primary:hover { background: #9f2a5a; border-color: #9f2a5a; }
.btn-quiet { border-color: transparent; background: none; }
.btn-big { width: 100%; height: 46px; font-size: 16px; font-weight: 600; }
.btn-text { height: auto; padding: 0; border: 0; background: none; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { background: none; text-decoration-thickness: 2px; }

.seg { display: inline-flex; justify-self: start; width: fit-content; padding: 2px; border-radius: 8px; background: var(--raised); }
.seg button { height: 30px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-weight: 500; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); }

.pill { display: inline-flex; align-items: center; flex: none; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; }
.pill-accent { background: var(--pill-accent-bg); color: var(--pill-accent-ink); }
.pill-positive { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill-negative { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill-warning { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill-live { background: var(--accent); color: #fff; }

.av { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: hsl(var(--h, 330) 55% 90%); color: hsl(var(--h, 330) 55% 24%); font-size: 13px; font-weight: 600; }

.kv { display: grid; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 7px 0; }
.kv > div + div { border-top: 1px solid var(--rule); }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 500; text-align: right; }
.kv-roomy > div { padding: 11px 0; }

.inline-form { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.inline-form input, .field input { min-width: 0; width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); }
.inline-form input::placeholder { color: var(--muted); }

/* ---------- title row (list, money, rules, pitch) ---------- */
.titlerow { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.titlerow h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; }
.sub { margin-top: 4px; max-width: 64ch; color: var(--muted); }

/* ---------- live room: the object header ---------- */
.obj { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-bottom: var(--gap); padding: 14px var(--card-pad); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.obj-cover { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: var(--stage); }
.obj-cover img, .cell-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-s { display: inline-block; width: 22px; height: 22px; margin-right: 7px; vertical-align: -5px; }
.obj-text { flex: 1 1 300px; min-width: 0; }
.obj-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.obj h1 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; }
.obj-meta { margin-top: 2px; color: var(--muted); }
.obj-actions { display: flex; align-items: center; gap: 8px; }

.run { display: grid; grid-template-columns: repeat(3, 68px) auto; align-items: end; gap: 6px; }
.run-part { display: grid; gap: 5px; color: var(--muted); font-size: 13px; line-height: 18px; }
.run-part i { display: block; height: 4px; border-radius: 2px; background: var(--accent-track); overflow: hidden; }
.run-part i::after { content: ""; display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 500ms linear; }
.run-part.is-now { color: var(--text); font-weight: 600; }
.run-clock { min-width: 86px; padding-left: 8px; font-size: 13px; line-height: 16px; color: var(--muted); }
.run-clock b { display: block; font-size: 18px; line-height: 22px; font-weight: 600; color: var(--text); }

/* ---------- live room: layout ---------- */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 366px; gap: var(--gap); }
.room-main { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.room-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.under { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); flex: 1; }
.under .card { display: flex; flex-direction: column; }

/* ---------- the stage: a camera, a slide on the studio wall, a caption bar ---------- */
.stage { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--stage-deep); color: var(--stage-ink); container-type: inline-size; }
.stage-pic { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); aspect-ratio: 16 / 9; overflow: hidden; background: var(--stage); }
.cam { position: absolute; inset: 0; animation: cam-drift 18s ease-in-out infinite alternate; }
.cam img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 320ms ease; }
.cam img.is-on { opacity: 1; }
.cam img.is-close { left: 44%; width: 56%; transform: scale(1.4); transform-origin: var(--o, 50% 50%); }
@keyframes cam-drift { from { transform: scale(1); } to { transform: scale(1.045) translateX(0.6%); } }
.is-paused .cam { animation-play-state: paused; }
.stage.is-bell .cam img.is-on { animation: bell-zoom 3600ms var(--ease-out); }
@keyframes bell-zoom { from { transform: scale(1.22); } }
.stage-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; font-size: 13px; line-height: 20px; }
.onair { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 999px; background: #fff; color: var(--text); font-weight: 600; font-size: 12px; }
.onair-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.is-paused .onair-dot { animation: none; background: var(--muted); }
@keyframes pulse { 50% { transform: scale(0.6); } }
.watching { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--stage-deep); color: #fff; font-size: 12px; font-weight: 500; }

.slide { position: relative; display: grid; align-content: center; gap: 1.4cqw; width: 47%; min-height: 0; padding: 0 0 2cqw 4.4cqw; }
.stage.is-split .slide { width: 44%; padding-right: 3cqw; }
.slide-big { font-size: clamp(20px, 4.5cqw, 36px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.slide-note { font-size: clamp(14px, 2.15cqw, 17px); line-height: 1.4; color: var(--stage-soft); }
.slide-rows { display: grid; gap: 0.5cqw; font-size: clamp(13px, 1.95cqw, 15.5px); line-height: 1.5; }
.slide-rows li { display: flex; justify-content: space-between; gap: 14px; }
.slide-rows li:last-child { margin-top: 0.6cqw; padding-top: 0.9cqw; border-top: 2px solid var(--stage-soft); font-weight: 600; }
.slide-who { display: flex; align-items: center; gap: 9px; font-size: clamp(13px, 2cqw, 16px); color: var(--stage-soft); }
.slide > * { animation: rise 420ms var(--ease-out) both; }
.slide > :nth-child(2) { animation-delay: 80ms; }
@keyframes rise { from { transform: translateY(14px); } }
.showcase .slide > *, .showcase .view { animation: none; }

.caption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; box-sizing: content-box; height: 48px; padding: 11px 18px 13px; font-size: clamp(14px, 2.05cqw, 16px); line-height: 24px; }
.caption b { margin-right: 4px; font-weight: 600; color: var(--stage-soft); }

.flies { position: absolute; right: 18px; bottom: 16px; width: 0; height: 0; pointer-events: none; }
.fly { position: absolute; right: 0; bottom: 0; padding: 4px 11px; border-radius: 999px; background: #fff; color: var(--accent-ink); font-size: 14px; font-weight: 700; line-height: 20px; white-space: nowrap; opacity: 0; animation: fly 2000ms var(--ease-out) forwards; }
.fly.is-you { background: var(--text); color: #fff; }
@keyframes fly { 0% { opacity: 0; transform: translateY(18px) scale(0.8); } 14% { opacity: 1; transform: translateY(0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-130px); } }

/* ---------- the panel and the questions ---------- */
.offers { display: grid; }
.offer { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 2px 11px; align-items: center; padding: 10px 0; }
.offer + .offer { border-top: 1px solid var(--rule); }
.offer-who { font-weight: 600; line-height: 20px; }
.offer-who span { font-weight: 400; color: var(--muted); }
.offer-text { grid-column: 2 / -1; color: var(--muted); font-size: 14px; line-height: 20px; min-height: 20px; }
.offer.is-in .offer-text, .offer.is-offer .offer-text { color: var(--text); }
.outcome { margin-top: auto; padding-top: 12px; font-weight: 500; }

.questions { display: grid; }
.q { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: start; padding: 10px 0; }
.q + .q { border-top: 1px solid var(--rule); }
.vote { display: grid; justify-items: center; gap: 1px; width: 44px; padding: 5px 0 4px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); font-size: 13px; font-weight: 600; line-height: 16px; transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out); }
.vote svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vote:hover { background: var(--raised); }
.vote:active { transform: scale(0.95); }
.vote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.q-text { line-height: 21px; }
.q-by { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 19px; }

/* ---------- the round: the one thing only this product has ---------- */
.round-fig { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.round-fig .num { display: inline-block; transform-origin: left bottom; font-size: 34px; line-height: 38px; font-weight: 600; letter-spacing: -0.02em; }
.round-fig .bump { animation: bump 420ms var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.06); } }
.round-of { color: var(--muted); }
.track { position: relative; height: 14px; margin-top: 14px; border-radius: 7px; background: var(--accent-track); }
.track-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; transition: left 500ms var(--ease-out), width 500ms var(--ease-out); }
.track-panel { background: var(--accent-ink); border-radius: 7px 0 0 7px; }
.track-crowd { background: var(--accent); }
.track-you { background: var(--text); }
.track-floor { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--text); }
.track-ends { position: relative; display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 18px; }
.track-floor-label { position: absolute; top: 0; transform: translateX(-50%); color: var(--text); font-weight: 600; white-space: nowrap; }
.finding { margin-top: 12px; font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 19px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { width: 10px; height: 10px; border-radius: 2px; }
.sw-panel { background: var(--accent-ink); } .sw-crowd { background: var(--accent); } .sw-you { background: var(--text); }
.round .kv { margin: 10px 0 16px; }
.round .fine { margin-top: 8px; text-align: center; }
.round.is-rung .track { animation: ring 700ms var(--ease-out); }
@keyframes ring { 20% { transform: scaleY(1.7); } 45% { transform: scaleY(0.85); } 70% { transform: scaleY(1.2); } }

/* ---------- the room (chat and money coming in) ---------- */
.chat { display: flex; flex-direction: column; flex: 1 1 0; min-height: 300px; }
.chat-list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 7px; margin-right: -8px; padding-right: 8px; overscroll-behavior: contain; }
.chat-list li { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.chat-list li.is-new { animation: chat-in 360ms var(--ease-out); }
@keyframes chat-in { from { opacity: 0; transform: translateY(10px); } }
.chat-list b { font-weight: 600; }
.chat-list .who { color: var(--muted); font-weight: 500; }
.chat-in { display: flex; align-items: baseline; gap: 7px; }
.chat-in::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.chat-in.is-panel::before { background: var(--accent-ink); }
.chat-in.is-you::before { background: var(--text); }
.chat-sys { padding: 7px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

/* ---------- tables ---------- */
.tabs { display: flex; gap: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.tabs button { position: relative; height: 40px; padding: 0; border: 0; background: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button span { margin-left: 4px; font-weight: 400; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.table { width: 100%; border-collapse: collapse; }
.table th { height: 38px; padding: 0 16px 0 0; color: var(--muted); font-size: 13px; font-weight: 400; text-align: left; white-space: nowrap; }
.table td { padding: 13px 16px 13px 0; border-top: 1px solid var(--border); vertical-align: middle; }
.table th.num, .table td.num { text-align: right; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table td.act { text-align: right; white-space: nowrap; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-cover { flex: none; width: 48px; height: 48px; overflow: hidden; border-radius: 8px; background: var(--accent-track); }
.cell-name { display: block; font-weight: 600; }
.cell-sub { display: block; color: var(--muted); font-size: 13px; line-height: 19px; }
.only-phone { display: none; }
.empty { padding: 18px 20px; border: 1px dashed var(--control); border-radius: var(--radius-card); color: var(--muted); }
.note-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.note-row p, .rules-grid p { margin-top: 8px; color: var(--muted); }

/* ---------- how the money works ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.rules-ways { grid-column: span 7; } .rules-floor { grid-column: span 5; }
.rules-panel { grid-column: 1 / span 5; grid-row: 2; } .rules-fees { grid-column: 1 / span 5; grid-row: 3; }
.rules-table { grid-column: 6 / span 7; grid-row: 2 / span 2; } .rules-honest { grid-column: 1 / -1; }
.rules-honest p { max-width: 96ch; }
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 14px; }
.way h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 20px; line-height: 26px; font-weight: 600; }
.rules-grid .way-fig { margin-top: 12px; color: var(--text); font-weight: 500; }
.way-fig .num { font-size: 20px; }
.track-demo { margin-top: 20px; }
.rules-table .table td { padding-top: 14px; padding-bottom: 14px; border-top-color: var(--rule); }
.rules-table .table td.num { font-weight: 500; white-space: nowrap; }
.rules-fees .kv { margin-top: 6px; }
.rules-fees .kv dd { white-space: nowrap; }
.rules-fees .fine { margin-top: 10px; }

/* ---------- take the floor ---------- */
.pitch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 366px; grid-template-rows: auto 1fr; gap: var(--gap); }
.pitch-grid .ask { grid-column: 2; grid-row: 1 / span 2; }
.night-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 12px; }
.night-parts h3 { font-size: 15px; line-height: 22px; font-weight: 600; }
.night-parts p { margin-top: 2px; color: var(--muted); }
.stage-self { --stage: #20242e; --stage-deep: #151922; --stage-soft: #d5d8df; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; aspect-ratio: 16 / 9; background: var(--stage); }
.stage-self .slide { width: auto; padding: 1cqw 5.2cqw; }
.stage-self .slide-big { font-size: clamp(22px, 6.1cqw, 46px); }
.stage-self .slide-note { font-size: clamp(14px, 2.6cqw, 20px); }
.stage-self .caption { height: 48px; margin: 0 18px 12px; padding: 0 0 0 12px; border-left: 3px solid var(--stage-soft); }
.stage-self .watching { height: auto; padding: 0; background: none; }
.stage-self video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
.stage-self.has-cam video { display: block; }
.stage-self > :not(video) { position: relative; }
.stage-self.has-cam .slide-self { align-content: end; }
.stage-self.has-cam .slide-big, .stage-self.has-cam .slide-note, .stage-self.has-cam .caption { width: fit-content; padding: 2px 10px; background: var(--stage-deep); color: #fff; }
.stage-self.has-cam .caption { height: auto; border-left: 0; margin-left: 5.2cqw; }
.stage-self .watching { font-size: 20px; font-weight: 600; color: #fff; }
.beats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 18px 16px; }
.beats span { height: 5px; border-radius: 3px; background: var(--stage-deep); overflow: hidden; }
.beats span::after { content: ""; display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(var(--p, 0)); }
.fields { display: grid; gap: 14px; margin-top: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .label { font-size: 14px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.verdict { min-height: 0; color: var(--negative); font-weight: 500; }
.verdict:empty { display: none; }

/* ---------- dialogs and the toast ---------- */
.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 24px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 18px 50px rgba(21, 18, 26, 0.22); overflow: auto; }
.modal-wide { width: min(600px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(21, 18, 26, 0.45); }
.modal h2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; }
.modal h3 { margin-top: 18px; font-size: 16px; font-weight: 600; }
.modal p, .modal ul { margin-top: 8px; }
.modal-sub { color: var(--muted); }
.plain { padding-left: 20px; }
.plain li + li { margin-top: 4px; }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.chips-tiers { grid-template-columns: 1fr; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: grid; place-items: center; height: 40px; border: 1px solid var(--control); border-radius: var(--radius-control); font-weight: 600; transition: background-color 150ms ease, border-color 150ms ease; }
.chips-tiers .chip span { display: flex; justify-content: space-between; gap: 12px; height: auto; padding: 9px 12px; font-weight: 400; }
.chips-tiers .chip b { font-weight: 600; }
.chip input:hover + span { background: var(--raised); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal .field { margin-top: 14px; }
.gets { padding: 10px 12px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.gets:empty { display: none; }
.terms { display: grid; gap: 5px; padding-left: 18px; list-style: disc; color: var(--muted); font-size: 14px; line-height: 20px; }
.check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-weight: 500; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.modal .btn { height: 40px; padding: 0 16px; }
.modal .fine { margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 8px; background: var(--text); color: #fff; font-weight: 500; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(21, 18, 26, 0.25); }
.noscript { padding: 24px 32px; }

/* ---------- the tablet: one column, round and chat side by side ---------- */
@media (max-width: 1180px) {
  .room { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-main, .room-side { display: contents; }
  .stage, .under { grid-column: 1 / -1; }
  .stage { order: 1; } .round { order: 2; } .chat { order: 3; min-height: 0; height: auto; } .under { order: 4; }
  .chat-list { flex-basis: 260px; }
  .pitch-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .pitch-grid .ask { grid-column: auto; grid-row: auto; }
  .rules-grid > * { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- the phone: the sidebar folds into a bar and a sheet ---------- */
@media (max-width: 900px) {
  :root { --pad: 16px; --gap: 16px; --card-pad: 16px; }
  .concept { padding: 8px 16px; font-size: 13px; line-height: 19px; }
  .app { display: block; }
  .topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 8px 0 8px; background: var(--ground); border-bottom: 1px solid var(--border); }
  .topbar .brand-name { display: none; }
  .topbar-name { flex: 1; font-weight: 600; font-size: 16px; }
  .topbar .btn { height: 40px; }
  .side { position: fixed; inset: 0; z-index: 9; display: none; height: auto; padding: 68px 16px 24px; background: var(--ground); }
  .side.is-open { display: flex; }
  .side .brand-side { display: none; }
  .nav a, .side-btn { height: 46px; font-size: 16px; }
  .canvas { padding: 16px var(--pad) 32px; }
  .colophon-foot { display: block; }
  .obj { padding: 12px var(--card-pad); }
  .obj-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .obj-actions .seg button { padding: 0 9px; }
  .run { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
  .titlerow { flex-wrap: wrap; align-items: flex-start; }
  .titlerow h1 { font-size: 24px; line-height: 30px; }
  .note-row { grid-template-columns: minmax(0, 1fr); }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
  .table td, .rules-table .table td { padding: 0; border: 0; }
  .table td.hide-phone { display: none; }
  .table td.act { grid-column: 1 / -1; text-align: left; }
  .table td.act:empty { display: none; }
  .only-phone { display: block; }
  .rules-table .table tr { padding: 9px 0; border-top-color: var(--rule); }
}
@media (max-width: 720px) {
  .room { grid-template-columns: minmax(0, 1fr); }
  .under { grid-template-columns: minmax(0, 1fr); }
  .stage { margin: 0 calc(var(--pad) * -1); border-radius: 0; }
  .stage-pic { display: block; aspect-ratio: auto; }
  .cam { position: relative; inset: auto; aspect-ratio: 16 / 9; overflow: hidden; }
  .cam img.is-close { left: 0; width: 100%; transform: scale(1.9); transform-origin: var(--om, 50% 50%); }
  .stage-top { position: absolute; top: 0; left: 0; right: 0; }
  .slide, .stage.is-split .slide { width: auto; min-height: 132px; padding: 16px; gap: 8px; background: var(--stage); }
  .slide-big { font-size: 23px; } .slide-note { font-size: 15px; }
  .flies { bottom: auto; top: calc(56.25vw - 20px); }
  .stage-self { aspect-ratio: auto; min-height: 330px; }
  .stage-self .slide { background: none; }
  .chat-list { flex-basis: 220px; }
  .under { order: 3; } .chat { order: 4; }
  .seg button { height: 38px; }
  .btn { height: 40px; }
  .vote { padding: 8px 0 7px; }
  .ways, .night-parts { grid-template-columns: minmax(0, 1fr); }
  .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 20px; }
}

.showcase .obj-actions, .bare .obj-actions { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
