/* No Humans Inc. A board meeting you sit in. Full-screen scene, game HUD, panels for everything else. */

@font-face {
  font-family: 'NH Sans';
  src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NH Serif';
  src: url('fonts/newsreader-latin-opsz-normal.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NH Serif';
  src: url('fonts/newsreader-latin-opsz-italic.woff2') format('woff2');
  font-weight: 200 800; font-style: italic; font-display: swap;
}

:root {
  --paper: #f2f1ed;
  --ink: #0e0e0d;
  --glass: rgba(12, 12, 11, 0.66);
  --glass-2: rgba(12, 12, 11, 0.82);
  --line: rgba(255, 255, 255, 0.16);
  --soft: rgba(255, 255, 255, 0.62);
  --signal: #ff4a1f;
  --serif: 'NH Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'NH Sans', system-ui, sans-serif;
  --px: 0; --py: 0; --cash: 1;
  --edge: clamp(14px, 2.2vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; overflow: clip;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 90; background: #fff; color: var(--ink); padding: 10px 16px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.label, .slide-item, .slide-left, .speaking-label, .plate-role, .ln-who, .hud-stats dt, .q-meta, .ask-label, .foot-link, .onair-status {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}

/* ---------- the scene ---------- */

.game { position: fixed; inset: 0; overflow: hidden; overflow: clip; }

.world { position: absolute; inset: -4%; transition: filter 0.9s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.world picture, .world img, .world video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.world-still { animation: breathe 26s ease-in-out infinite alternate; }
.world-video { opacity: 0; transition: opacity 1.2s ease; }
.world-video.ready { opacity: 1; }
.world { transform: translate3d(calc(var(--px) * -22px), calc(var(--py) * -14px), 0) scale(1.04); }
.has-speaker .world { filter: blur(5px) brightness(0.7) saturate(0.85); transform: translate3d(calc(var(--px) * -22px), calc(var(--py) * -14px), 0) scale(1.1); }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1%); } }

.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%), linear-gradient(to top, rgba(0,0,0,0.6), transparent 38%); }
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0,0); } 20% { transform: translate(-4%,3%); } 40% { transform: translate(3%,-5%); } 60% { transform: translate(-6%,-2%); } 80% { transform: translate(5%,4%); } 100% { transform: translate(0,0); } }

/* the speaker, cut in as a live camera feed */
.actor {
  position: absolute; margin: 0; bottom: clamp(220px, 27vh, 290px);
  height: min(56vh, 600px); aspect-ratio: 4 / 5;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 40px 90px rgba(0,0,0,0.55);
  overflow: hidden; opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.actor img, .actor video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.actor video { opacity: 0; transition: opacity 0.6s ease; }
.actor video.ready { opacity: 1; }
.actor::before {
  content: ''; position: absolute; z-index: 2; left: 14px; top: 14px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 3px rgba(255,74,31,0.25); animation: blink 1.2s steps(2) infinite;
}
.actor::after { content: ''; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 120px rgba(0,0,0,0.25); }
.actor.left { left: max(400px, 27vw); transform: translateX(-40px) scale(0.97); }
.actor.right { right: max(440px, 27vw); transform: translateX(40px) scale(0.97); }
.actor.on { opacity: 1; transform: none; }
/* every line gets a different camera move, picked in game.js */
.actor.on img, .actor.on video { animation: var(--shot, push) var(--shot-dur, 9s) ease-out forwards; transform-origin: var(--shot-origin, 50% 40%); }
.actor.on.shot-handheld img, .actor.on.shot-handheld video { animation: handheld 3.2s ease-in-out infinite alternate; }
.actor.cut::after { animation: cutflash 0.35s ease-out; }
@keyframes push { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes pull { from { transform: scale(1.16); } to { transform: scale(1.02); } }
@keyframes panl { from { transform: scale(1.14) translateX(3.5%); } to { transform: scale(1.14) translateX(-3.5%); } }
@keyframes panr { from { transform: scale(1.14) translateX(-3.5%); } to { transform: scale(1.14) translateX(3.5%); } }
@keyframes close { from { transform: scale(1.32) translateY(2%); } to { transform: scale(1.4) translateY(3%); } }
@keyframes tilt { from { transform: scale(1.12) rotate(-1.6deg); } to { transform: scale(1.16) rotate(1.2deg); } }
@keyframes rise2 { from { transform: scale(1.15) translateY(-3%); } to { transform: scale(1.15) translateY(3%); } }
@keyframes handheld { 0% { transform: scale(1.1) translate(0,0) rotate(0); } 25% { transform: scale(1.11) translate(-0.6%,0.4%) rotate(-0.3deg); } 50% { transform: scale(1.1) translate(0.5%,-0.3%) rotate(0.25deg); } 75% { transform: scale(1.12) translate(-0.3%,-0.5%) rotate(-0.15deg); } 100% { transform: scale(1.1) translate(0.4%,0.5%) rotate(0.3deg); } }
@keyframes cutflash { from { background: rgba(255,255,255,0.35); } to { background: transparent; } }
/* the room camera drifts to a new framing every few seconds (game.js sets the values) */
.world > picture, .world-video { translate: var(--cx, 0) var(--cy, 0); scale: var(--cs, 1); transition: translate 10s cubic-bezier(.45,0,.3,1), scale 10s cubic-bezier(.45,0,.3,1), opacity 1.2s ease; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- HUD ---------- */

.hud-left {
  position: absolute; left: var(--edge); top: var(--edge); z-index: 10;
  width: min(330px, calc(100vw - 2 * var(--edge)));
  display: grid; gap: 12px;
}
.wordmark { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,0.35); }
.wordmark em { font-style: italic; font-weight: 300; }
.onair { display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; background: var(--signal); color: #fff; padding: 5px 10px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s steps(2) infinite; }
.onair-status { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.onair.is-off .live { background: #5e5d59; }

.hud-stats { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line); padding: 14px 16px 12px; }
.cashbar { height: 6px; background: rgba(255,255,255,0.14); margin-bottom: 10px; }
.cashbar span { display: block; height: 100%; width: calc(var(--cash) * 100%); background: linear-gradient(90deg, var(--signal), #ffb36b); transition: width 1.2s ease; box-shadow: 0 0 14px rgba(255,74,31,0.6); }
.ticker-track > dl + dl { display: none; }
.ticker-set { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.tk { position: relative; display: grid; gap: 2px; }
.tk-hero { grid-column: 1 / -1; }
.tk-x { display: none; }
.hud-stats dt { color: var(--soft); font-size: 10px; }
.hud-stats dd { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; }
.tk-hero dd { font-size: 34px; font-weight: 300; letter-spacing: -0.02em; }
.tk-delta { position: absolute; right: 0; top: 0; font-size: 12px; font-weight: 700; color: var(--signal); font-variant-numeric: tabular-nums; }
.tk-delta.down::before { content: '\2212'; }
.flash { animation: flash 0.9s ease; }
@keyframes flash { 0% { color: var(--signal); } 100% { color: inherit; } }

/* the agenda, as the current quest */
.quest {
  position: absolute; right: var(--edge); top: var(--edge); z-index: 10;
  width: min(380px, calc(100vw - 2 * var(--edge)));
  background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line); border-left: 3px solid var(--signal);
  padding: 14px 18px 16px;
}
.slide-top { display: flex; justify-content: space-between; gap: 12px; color: var(--soft); }
.slide-floor { display: inline-block; margin-top: 10px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 8px; }
.slide-title { margin: 8px 0 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 28px); line-height: 1.1; letter-spacing: -0.015em; }
.quest.is-floor .slide-title { font-style: italic; }
.slide-bar { height: 2px; background: rgba(255,255,255,0.15); }
.slide-bar span { display: block; height: 100%; width: 0; background: #fff; transition: width 1s linear; }

/* the dialogue box */
.dialog {
  position: absolute; z-index: 20; left: 50%; bottom: clamp(84px, 11vh, 110px);
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 2 * var(--edge)));
  min-height: 132px;
  background: var(--glass-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  padding: 30px 34px 26px;
}
.speaking { position: absolute; top: -15px; left: 26px; display: flex; }
.speaking-label { display: none; }
.speaking-name { background: var(--signal); color: #fff; padding: 6px 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
body:not(.has-speaker) .speaking-name { background: #3a3936; }
.sub-text { font-family: var(--serif); font-size: clamp(20px, 2.1vw, 30px); line-height: 1.32; letter-spacing: -0.01em; color: #fff; }
body:not(.has-speaker) .sub-text { color: var(--soft); }
.w { opacity: 0; transition: opacity 0.18s ease; }
.w.on { opacity: 1; }
.dialog-next { position: absolute; right: 22px; bottom: 16px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid #fff; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); opacity: 0.5; } }

/* actions */
.actions {
  position: absolute; z-index: 20; left: 50%; bottom: var(--edge); transform: translateX(-50%);
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  width: min(980px, calc(100vw - 2 * var(--edge)));
}
.act {
  cursor: pointer; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 12px 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.act:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
.act-main { background: #fff; color: var(--ink); border-color: #fff; }
.act-main:hover { background: var(--signal); color: #fff; border-color: var(--signal); }

/* bankrupt: game over */
.bankrupt { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 24px; background: rgba(8,8,8,0.86); }
.bankrupt[hidden] { display: none; }
.game.is-bankrupt .world { filter: grayscale(1) brightness(0.5); }
.stamp { font-family: var(--sans); font-weight: 900; font-size: clamp(44px, 9vw, 120px); letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); text-shadow: 0 0 40px rgba(255,74,31,0.5); }
.bankrupt-head { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 38px); }
.bankrupt-body { max-width: 46ch; color: var(--soft); }
.bankrupt-clock { font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; border: 1px solid #fff; padding: 10px 16px; animation: blink 1.6s steps(2) infinite; }

/* intro */
.intro { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 24px; background: radial-gradient(80% 70% at 50% 50%, rgba(10,10,10,0.35), rgba(10,10,10,0.88)); transition: opacity 1.2s ease; }
.is-playing .intro { opacity: 0; pointer-events: none; }
.intro-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--soft); }
.intro-title { font-family: var(--serif); font-size: clamp(56px, 10vw, 150px); line-height: 0.92; letter-spacing: -0.03em; }
.intro-title em { font-style: italic; font-weight: 300; }
.intro-tag { color: var(--soft); font-size: 15px; }
.intro-go { margin-top: 16px; cursor: pointer; background: #fff; color: var(--ink); border: 0; padding: 18px 34px; font-size: 13px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.intro-go:hover { background: var(--signal); color: #fff; transform: scale(1.03); }
.is-intro .hud-left, .is-intro .quest, .is-intro .dialog, .is-intro .actions, .is-intro .actor { opacity: 0; }
.hud-left, .quest, .dialog, .actions { transition: opacity 0.9s ease 0.4s; }

/* ---------- panels ---------- */

.panel {
  width: min(620px, calc(100vw - 24px)); max-height: min(86vh, 860px);
  margin: auto; padding: 36px 34px 30px;
  background: var(--paper); color: var(--ink);
  border: 0; overflow: auto;
}
.panel-wide { width: min(1080px, calc(100vw - 24px)); }
.panel::backdrop { background: rgba(6,6,6,0.6); backdrop-filter: blur(6px); }
.panel[open] { animation: rise 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.panel-x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--ink); }
.panel-title { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1; letter-spacing: -0.025em; }

.ask-intro { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: #3b3a37; }
.ask-form { margin-top: 24px; display: grid; gap: 12px; }
.ask-label { color: #7d7b75; }
textarea { width: 100%; resize: vertical; min-height: 110px; font: 400 20px/1.45 var(--serif); color: var(--ink); background: #fff; border: 1px solid #cfccc4; padding: 14px 16px; border-radius: 0; }
textarea::placeholder { color: #8d8b85; font-style: italic; }
textarea:focus { outline: none; border-color: var(--ink); }
.ask-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ask-count { color: #7d7b75; font-size: 13px; font-variant-numeric: tabular-nums; }
.btn { font: 800 12px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; background: var(--ink); color: #fff; border: 0; padding: 17px 26px; cursor: pointer; }
.btn:hover:not(:disabled) { background: var(--signal); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ask-msg { min-height: 1.4em; font-family: var(--serif); font-style: italic; font-size: 18px; }
.ask-msg.no { color: #c2361a; }
.ask-rules { color: #7d7b75; font-size: 13px; }
.ts:empty { display: none; }
.ts-hidden { position: fixed; right: 16px; bottom: 16px; z-index: 20; }

.qlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.q { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid #d5d2ca; }
.q.is-agenda { box-shadow: inset 3px 0 0 var(--signal); padding-left: 14px; }
.q-text { font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.q-meta { margin-top: 6px; color: #7d7b75; display: flex; gap: 12px; }
.q-tag { color: #c2361a; }
.vote { font: 800 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 12px 15px; cursor: pointer; }
.vote:hover:not(:disabled), .vote[aria-pressed='true'] { background: var(--ink); color: #fff; }
.vote:disabled:not([aria-pressed='true']) { opacity: 0.4; cursor: default; }
.qlist-empty { padding-top: 18px; border-top: 1px solid var(--ink); font-family: var(--serif); font-style: italic; font-size: 19px; color: #7d7b75; }
.qlist-empty[hidden] { display: none; }

.minutes-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ln { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid #d5d2ca; }
.ln-dot { display: none; }
.ln > div { display: contents; }
.ln-who { color: #7d7b75; padding-top: 4px; }
.ln-who b { display: block; color: var(--ink); }
.ln-text { font-family: var(--serif); font-size: 18px; line-height: 1.45; color: #3b3a37; }
.ln.is-current .ln-text { color: var(--ink); }
.minutes-status { margin-top: 14px; color: #7d7b75; font-family: var(--serif); font-style: italic; font-size: 17px; }
.minutes-status:empty { display: none; }

.plates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.plate img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.placard { padding-top: 12px; border-top: 1px solid #d5d2ca; margin-top: 10px; position: relative; }
.plate.is-speaking .placard::before, .plate.is-floor .placard::before { content: ''; position: absolute; top: -1px; left: 0; width: 100%; height: 3px; background: var(--signal); }
.plate-name { font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.plate-role { margin-top: 5px; color: #7d7b75; }
.plate-line { margin-top: 8px; font-size: 14px; line-height: 1.45; color: #3b3a37; }
.plate-internet .plate-name { font-style: italic; }

.about-text { display: grid; gap: 14px; font-family: var(--serif); font-size: 19px; line-height: 1.5; color: #3b3a37; }
.disclaimer { margin-top: 6px; padding: 14px 16px; background: #fff; border-left: 3px solid var(--signal); color: var(--ink); font-size: 17px; }
.panel-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid #d5d2ca; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; }
.foot-fine { color: #7d7b75; font-size: 13px; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .quest { top: auto; bottom: calc(var(--edge) + 260px); left: var(--edge); right: var(--edge); width: auto; padding: 10px 14px 12px; }
  .slide-title { font-size: 19px; margin: 6px 0 10px; }
  .hud-left { width: auto; right: var(--edge); grid-template-columns: 1fr auto; align-items: center; }
  .wordmark { font-size: 24px; }
  .onair-status { display: none; }
  .hud-stats { grid-column: 1 / -1; padding: 10px 12px; }
  .ticker-set { grid-template-columns: 1fr 1fr 1fr; }
  .tk-hero { grid-column: auto; }
  .tk-hero dd { font-size: 18px; font-weight: 400; }
  .tk:nth-child(4) { display: none; }
  .tk-delta { display: none; }
  .actor { height: auto; width: min(46vw, 220px); bottom: auto; top: 138px; }
  .actor.left { left: var(--edge); }
  .actor.right { left: auto; right: var(--edge); }
  .dialog { bottom: calc(var(--edge) + 96px); padding: 24px 18px 18px; min-height: 110px; }
  .sub-text { font-size: 18px; }
  .actions { gap: 6px; }
  .act { padding: 10px 12px; font-size: 10px; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ln { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ln-who b { display: inline; margin-right: 6px; }
  .panel { padding: 30px 20px 24px; }
}

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

/* ---------- rounder (Paulo: too squared) ---------- */
.hud-stats, .quest, .dialog { border-radius: 22px; }
.quest { border-left: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--signal); }
.cashbar, .cashbar span, .slide-bar, .slide-bar span { border-radius: 999px; }
.cashbar { height: 7px; }
.actor { border-radius: 28px; }
.live, .slide-floor, .speaking-name, .act, .btn, .vote, .intro-go, .bankrupt-clock, .q-tag { border-radius: 999px; }
.act { padding: 12px 20px; }
.speaking { left: 30px; }
.panel { border-radius: 28px; }
textarea { border-radius: 16px; }
.plate img { border-radius: 18px; }
.disclaimer { border-radius: 14px; border-left: 0; box-shadow: inset 4px 0 0 var(--signal); }
.q.is-agenda { border-radius: 12px; }
.panel-x { width: 40px; height: 40px; border-radius: 50%; right: 16px; top: 14px; display: grid; place-items: center; background: rgba(0,0,0,0.06); font-size: 24px; }
.panel-x:hover { background: rgba(0,0,0,0.12); }
@media (max-width: 820px) {
  .hud-stats, .quest, .dialog { border-radius: 18px; }
  .actor { border-radius: 20px; }
}

/* ---------- alive: cams, reactions, toasts, sound, watching ---------- */
.watching { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 8px; }
.watching::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,0.25); }
.watching[hidden] { display: none; }

.cams { position: absolute; z-index: 12; top: var(--edge); left: 50%; transform: translateX(-50%); list-style: none; margin: 0; padding: 6px; display: flex; gap: 6px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 22px; }
.cam { position: relative; width: 66px; height: 66px; border-radius: 16px; overflow: hidden; opacity: 0.55; filter: grayscale(0.6); transition: opacity 0.3s ease, filter 0.3s ease, transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease; }
.cam img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cam span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 4px 3px; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }
body:not(.has-speaker) .cam { opacity: 0.8; filter: none; }
body[data-speaker="ceo"] .cam[data-cam="ceo"], body[data-speaker="cfo"] .cam[data-cam="cfo"], body[data-speaker="cto"] .cam[data-cam="cto"], body[data-speaker="cmo"] .cam[data-cam="cmo"], body[data-speaker="legal"] .cam[data-cam="legal"] {
  opacity: 1; filter: none; transform: translateY(3px) scale(1.12); box-shadow: 0 0 0 2px var(--signal), 0 10px 30px rgba(255,74,31,0.45); z-index: 1;
}
body[data-speaker="ceo"] .cam[data-cam="ceo"]::after, body[data-speaker="cfo"] .cam[data-cam="cfo"]::after, body[data-speaker="cto"] .cam[data-cam="cto"]::after, body[data-speaker="cmo"] .cam[data-cam="cmo"]::after, body[data-speaker="legal"] .cam[data-cam="legal"]::after {
  content: ''; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: blink 0.9s steps(2) infinite;
}

.floaters { position: absolute; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; overflow: clip; }
.fl { position: absolute; bottom: 120px; font-size: 30px; animation: floatup 3s cubic-bezier(.2,.6,.3,1) forwards; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35)); }
.fl.mine { font-size: 38px; }
@keyframes floatup {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  12% { opacity: 1; transform: translate(calc(var(--drift) * 0.2), -60px) scale(1.1); }
  100% { transform: translate(var(--drift), -62vh) scale(0.9); opacity: 0; }
}

.reacts { position: absolute; z-index: 22; right: var(--edge); bottom: calc(var(--edge) + 6px); display: flex; gap: 6px; padding: 6px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; }
.react { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease; }
.react:hover { background: rgba(255,255,255,0.14); transform: translateY(-3px) scale(1.12); }
.react.pop { animation: pop 0.35s ease; }
@keyframes pop { 40% { transform: scale(1.45) rotate(-8deg); } 100% { transform: scale(1); } }

.sound { position: absolute; z-index: 22; left: var(--edge); bottom: calc(var(--edge) + 6px); width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; cursor: pointer; display: grid; place-items: center; }
.sound svg { width: 24px; height: 24px; }
.sound .sound-on { display: none; }
.sound-on .sound .sound-on { display: inline; }
.sound-on .sound .sound-off { display: none; }
.sound-on .sound { box-shadow: 0 0 0 2px rgba(255,255,255,0.35); }
.intro-sound { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--soft); }

.toasts { position: absolute; z-index: 21; left: var(--edge); top: 50%; transform: translateY(-50%); display: grid; gap: 8px; width: min(300px, 40vw); pointer-events: none; }
.toast { display: grid; gap: 2px; padding: 10px 14px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); animation: slidein 0.4s cubic-bezier(.2,.8,.2,1); transition: opacity 0.6s ease, transform 0.6s ease; }
.toast.out { opacity: 0; transform: translateX(-20px); }
.toast-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.toast-value { font-family: var(--serif); font-size: 16px; line-height: 1.25; }
.toast.down .toast-value { color: #ff9a7a; font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; }
.toast.agenda { box-shadow: inset 3px 0 0 var(--signal); }
@keyframes slidein { from { opacity: 0; transform: translateX(-24px); } }
.hud-left .toasts { display: none; }
.is-intro .cams, .is-intro .reacts, .is-intro .sound, .is-intro .toasts { opacity: 0; }
.cams, .reacts, .sound, .toasts { transition: opacity 0.9s ease 0.5s; }

@media (max-width: 1180px) { .toasts { display: none; } }
@media (max-width: 820px) {
  .cams { top: auto; bottom: calc(var(--edge) + 240px); padding: 4px; gap: 4px; display: none; }
  .reacts { right: 50%; transform: translateX(50%); bottom: calc(var(--edge) + 104px); z-index: 23; padding: 4px; }
  .react { width: 36px; height: 36px; font-size: 18px; }
  .sound { left: auto; right: var(--edge); top: calc(var(--edge) + 48px); bottom: auto; width: 40px; height: 40px; }
  .dialog { bottom: calc(var(--edge) + 158px); }
  .quest { bottom: calc(var(--edge) + 316px); }
}
@media (max-width: 820px) {
  .sound { top: var(--edge); right: var(--edge); width: 32px; height: 32px; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sound svg { width: 20px; height: 20px; }
  .onair { margin-right: 40px; }
  .actor { top: 176px; width: min(40vw, 160px); }
  .reacts { bottom: calc(var(--edge) + 112px); }
  .actions { bottom: var(--edge); }
}
@media (max-width: 820px) {
  .reacts { right: 8px; left: auto; transform: none; bottom: auto; top: 172px; flex-direction: column; padding: 4px; }
  .actor.right { right: 64px; }
  .actor.left { left: var(--edge); }
  .dialog { width: calc(100vw - 2 * var(--edge)); }
  .fl { bottom: 200px; }
}

/* ---------- voting shares: buy panel, key card, cap table, treasury ---------- */
.tk-treasury dd { color: #ffd2a8; }
.act-buy { border-color: rgba(255,74,31,0.7); box-shadow: inset 0 0 0 1px rgba(255,74,31,0.35); }
.act-buy:hover { background: var(--signal); border-color: var(--signal); }

.me-line { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: inset 4px 0 0 var(--signal); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--serif); font-size: 17px; }
.me-line[hidden] { display: none; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font: 700 11px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid currentColor; }
.linkish:hover { color: #c2361a; }

.buy-form { margin-top: 22px; display: grid; gap: 12px; }
.buy-amount { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.buy-amount legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.chip { cursor: pointer; min-width: 64px; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; font: 800 15px/1 var(--sans); font-variant-numeric: tabular-nums; transition: background 0.15s ease, color 0.15s ease; }
.chip:hover { background: rgba(0,0,0,0.06); }
.chip[aria-pressed='true'] { background: var(--ink); color: #fff; }
.chip-input { width: 104px; padding: 11px 16px; border-radius: 999px; border: 1px solid #cfccc4; background: #fff; font: 800 15px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.chip-input:focus, .field:focus { outline: none; border-color: var(--ink); }
.buy-custom { color: #7d7b75; font-size: 13px; }
.buy-summary { font-family: var(--serif); font-size: 20px; line-height: 1.35; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
.field { width: 100%; font: 400 19px/1.3 var(--serif); color: var(--ink); background: #fff; border: 1px solid #cfccc4; padding: 12px 16px; border-radius: 14px; }
.field::placeholder { color: #8d8b85; font-style: italic; }
.buy-hint { color: #7d7b75; font-size: 13px; margin-top: -4px; }
.terms { margin-top: 6px; padding: 14px 18px 14px 16px; border-radius: 14px; background: #fff; box-shadow: inset 4px 0 0 var(--signal); }
.terms-head { font: 700 11px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #7d7b75; margin-bottom: 8px; }
.terms ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; color: #3b3a37; }
.btn-pay { background: var(--signal); padding: 18px 30px; font-size: 13px; }
.btn-pay:hover:not(:disabled) { background: var(--ink); }
.buy-secure { color: #7d7b75; font-size: 13px; text-align: right; }
.usekey { margin-top: 18px; padding-top: 14px; border-top: 1px solid #d5d2ca; }
.usekey summary { cursor: pointer; font: 700 11px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #3b3a37; }
.usekey-form { margin-top: 12px; display: grid; gap: 10px; }
.usekey-row { display: flex; gap: 8px; }
.field-key { font: 700 15px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.ask-msg.ok { color: #1f7a4c; }

/* the key card: a dark glass card inside the paper panel */
#panel-key { width: min(560px, calc(100vw - 24px)); }
.paid-status { min-height: 1.4em; margin: 4px 48px 14px 0; font-family: var(--serif); font-style: italic; font-size: 19px; }
.paid-status:empty { display: none; }
.keycard { position: relative; overflow: hidden; padding: 26px 24px 22px; border-radius: 22px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, rgba(255,74,31,0.38), transparent 55%), linear-gradient(160deg, #1c1b19, #0e0e0d); box-shadow: 0 24px 60px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.1); display: grid; gap: 12px; justify-items: start; }
.keycard[hidden] { display: none; }
.keycard-kicker { font-family: var(--serif); font-size: 18px; }
.keycard-kicker em { font-weight: 300; }
.keycard-title { margin: 0; font: 700 11px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); }
.keycard-code { width: 100%; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.08); border: 1px dashed rgba(255,255,255,0.3); font: 700 clamp(15px, 4.2vw, 21px)/1.35 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.06em; word-break: keep-all; overflow-wrap: normal; user-select: all; -webkit-user-select: all; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover:not(:disabled) { background: var(--signal); color: #fff; }
.keycard-body { font-family: var(--serif); font-size: 16px; line-height: 1.45; color: rgba(255,255,255,0.82); }
.keycard-warn { font-size: 13px; font-weight: 700; color: #ffb39a; }

/* cap table */
.cap-totals { margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cap-totals div { padding: 12px 14px; border-radius: 16px; background: #fff; }
.cap-totals dt { font: 700 10px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: #7d7b75; }
.cap-totals dd { margin: 4px 0 0; font-family: var(--serif); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.cap-totals .cap-hero { background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--signal); }
.cap-totals .cap-hero dt { color: var(--soft); }
.cap-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.cap-row { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 56px; gap: 12px; align-items: baseline; padding: 14px 0 16px; border-bottom: 1px solid #d5d2ca; }
.cap-pos { font: 800 12px/1 var(--sans); color: #7d7b75; font-variant-numeric: tabular-nums; }
.cap-who { font-family: var(--serif); font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.cap-shares { font: 700 13px/1 var(--sans); font-variant-numeric: tabular-nums; }
.cap-pc { font: 700 13px/1 var(--sans); color: #7d7b75; text-align: right; font-variant-numeric: tabular-nums; }
.cap-bar { position: absolute; left: 40px; right: 0; bottom: 6px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--signal), #ffb36b); transform-origin: left; transform: scaleX(var(--w, 0)); transition: transform 0.8s cubic-bezier(.2,.8,.2,1); }
.cap-row.is-me { background: linear-gradient(90deg, rgba(255,74,31,0.08), transparent 70%); border-radius: 10px; }
.cap-you { font: 800 9px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; vertical-align: middle; padding: 4px 7px; background: var(--signal); color: #fff; }
.cap-note { margin-top: 14px; color: #7d7b75; font-size: 13px; }

@media (max-width: 820px) {
  .tk-m-hide { display: none; }
  .cap-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-totals dd { font-size: 19px; }
  .buy-summary { font-size: 17px; }
  .ask-row { flex-wrap: wrap; }
  .buy-secure { text-align: left; }
  .usekey-row { flex-direction: column; }
}

/* seven actions now: one row everywhere. Tighter on desktop, a swipeable strip on phones. */
@media (min-width: 821px) {
  .actions { flex-wrap: nowrap; gap: 6px; }
  .act { padding: 12px 14px; font-size: 11px; letter-spacing: 0.1em; white-space: nowrap; }
}
@media (max-width: 820px) {
  .actions {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 24px 2px 0;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .actions::-webkit-scrollbar { display: none; }
  .act { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
  .act:hover { transform: none; }
  .dialog { bottom: calc(var(--edge) + 62px); }
  .quest { bottom: calc(var(--edge) + 222px); }
}
.buy-form .ask-msg:empty { min-height: 0; }
.usekey { margin-top: 8px; }
@media (min-width: 821px) {
  .reacts { top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; }
  .actions { width: min(980px, calc(100vw - 2 * var(--edge) - 150px)); }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .act { padding: 10px 11px; font-size: 10px; letter-spacing: 0.08em; }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .actions {
    justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-right: 24px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .actions::-webkit-scrollbar { display: none; }
  .act { flex: 0 0 auto; }
  .act:hover { transform: none; }
}
