/* Live Deck — "TALLY". Tokens are law; see DESIGN.md. */
@font-face {
  font-family: 'Flex';
  src: url(/fonts/roboto-flex-latin-standard.woff2) format('woff2-variations');
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-style: oblique 0deg 10deg;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+25B2, U+25C0, U+25B6, U+25CF, U+25CB, U+25F7;
}
@font-face {
  font-family: 'Flex';
  src: url(/fonts/roboto-flex-cyrillic-standard.woff2) format('woff2-variations');
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-style: oblique 0deg 10deg;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cue';
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212, U+25B2, U+25C0, U+25B6, U+25CF, U+25CB, U+25F7;
}
@font-face {
  font-family: 'Cue';
  src: url(/fonts/jetbrains-mono-cyrillic.woff2) format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --blackout: #0c0c0e;
  --riser: #17171b;
  --riser-up: #1f1f24;
  --gaffer: #2b2b31;
  --house: #edebe6;
  --dim: #97948e;
  --spent: #5a5853;
  --tally: #ef4035;
  --tally-ink: #0c0c0e;
  --standby: #3dd68c;

  --display: 'Flex', 'Roboto Flex', system-ui, sans-serif;
  --cue: 'Cue', 'JetBrains Mono', ui-monospace, monospace;

  --ease-go: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --t-go: 560ms;
  --t-ui: 160ms;
  --r-ctl: 8px;
  --r-plate: 12px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--blackout);
  color: var(--house);
  font-family: var(--display);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-cursor {
  cursor: none;
}
a {
  color: inherit;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
code,
kbd {
  font-family: var(--cue);
}
.dim {
  color: var(--dim);
}
.ok {
  color: var(--standby);
}
[hidden] {
  display: none !important;
}

/* ---------- boot ---------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.boot-lamp {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--gaffer);
  animation: breathe 1.6s ease-in-out infinite;
}

/* ---------- lamps (the tally) ---------- */
.lamp {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  border: 2px solid var(--spent);
  flex: none;
}
.is-live > .lamp,
.lamp.is-live {
  border-color: var(--tally);
  background: var(--tally);
  box-shadow: 0 0 0.9em rgb(239 64 53 / 0.55);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  50% {
    opacity: 0.72;
    box-shadow: 0 0 0.35em rgb(239 64 53 / 0.3);
  }
}
.tally {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--cue);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--dim);
}
.tally.is-live {
  color: var(--house);
}
.lamp-line {
  display: flex;
  gap: 0.6em;
  align-items: center;
  font-family: var(--cue);
  letter-spacing: 0.2em;
  font-size: 13px;
  color: var(--dim);
}

/* ---------- shared type ---------- */
.hl {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}
.kicker {
  font-family: var(--cue);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
mark {
  color: inherit;
  background: linear-gradient(var(--tally), var(--tally)) no-repeat 0 94% / 0% 0.11em;
  transition: background-size 720ms var(--ease-go) 420ms;
  padding-bottom: 0.02em;
}
.slide.on mark,
.settled mark {
  background-size: 100% 0.11em;
}

/* ---------- the stage (1600×900) ---------- */
.stage-host {
  position: relative;
  overflow: hidden;
  background: var(--blackout);
}
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  transform: translate(-50%, -50%) scale(var(--k, 1));
  transform-origin: 50% 50%;
  background: var(--blackout);
  overflow: hidden;
  font-size: 36px;
}
.slides {
  position: absolute;
  inset: 0;
}
.slide {
  position: absolute;
  inset: 0;
  padding: 136px 112px 132px;
  background: var(--blackout);
}
.slide.fade {
  opacity: 0;
}
.slide.fade.on {
  opacity: 1;
  transition: opacity 280ms var(--ease-ui);
}

/* GO: the new slide is wiped in behind a tally-red edge */
.slide.go {
  clip-path: inset(0 100% 0 0);
  z-index: 2;
}
.slide.go.go-back {
  clip-path: inset(0 0 0 100%);
}
.slide.go.on {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--t-go) var(--ease-go);
}
.slide.go::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -4px;
  width: 4px;
  background: var(--tally);
  box-shadow: 0 0 28px rgb(239 64 53 / 0.7);
  opacity: 0;
}
.slide.go.on::after {
  animation: edge var(--t-go) var(--ease-go) both;
}
.slide.go-back.on::after {
  animation-name: edge-back;
}
@keyframes edge {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(1604px);
    opacity: 0;
  }
}
@keyframes edge-back {
  0% {
    transform: translateX(1604px);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}
.slide.gone {
  z-index: 1;
  opacity: 0.3;
  transition: opacity 500ms var(--ease-ui);
}
/* the headline arrives condensed and stretches to its set width */
.slide.go.on .hl {
  animation: stretch 900ms var(--ease-go) both;
}
@keyframes stretch {
  from {
    font-stretch: 48%;
    letter-spacing: 0.01em;
  }
  to {
    font-stretch: 112%;
    letter-spacing: -0.03em;
  }
}

.slide-cue {
  position: absolute;
  top: 44px;
  right: 56px;
  font-family: var(--cue);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--house);
}
.slide-cue .of {
  color: var(--dim);
}
.stage .kicker {
  font-size: 22px;
  margin-bottom: 28px;
}
.stage .hl {
  font-size: 96px;
}
.stage .hl-xl {
  font-size: 140px;
}
.stage p {
  font-size: 38px;
  line-height: 1.3;
  color: var(--dim);
  margin: 28px 0 0;
  max-width: 34ch;
  text-wrap: pretty;
}
.stage p strong {
  color: var(--house);
  font-weight: 700;
}
.stage .sub {
  font-size: 44px;
  font-weight: 700;
  font-stretch: 100%;
  margin: 40px 0 0;
}
.stage code {
  font-size: 0.85em;
  color: var(--house);
  background: var(--riser);
  padding: 0.05em 0.3em;
  border-radius: 6px;
}

/* cue-sheet rows: the one layout primitive */
.rows {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
}
.row {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  transition:
    opacity 360ms var(--ease-ui),
    transform 520ms var(--ease-go);
}
.row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--gaffer);
  transform-origin: left;
}
.row-no {
  font-family: var(--cue);
  font-size: 22px;
  color: var(--tally);
  letter-spacing: 0.08em;
}
.row-body {
  font-size: 42px;
  line-height: 1.2;
  font-weight: 500;
}
.row-body small {
  display: block;
  font-size: 0.6em;
  color: var(--dim);
  margin-top: 6px;
}
.row.is-pending {
  opacity: 0;
  transform: translateX(-32px);
}
.slide.go.on .row:not(.is-pending) {
  animation: row-in 620ms var(--ease-go) both;
  animation-delay: calc(200ms + var(--i, 0) * 80ms);
}
.slide.go.on .row:not(.is-pending)::before {
  animation: rule 700ms var(--ease-go) both;
  animation-delay: calc(160ms + var(--i, 0) * 80ms);
}
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }
}
@keyframes rule {
  from {
    transform: scaleX(0);
  }
}

/* --- layouts --- */
.L-title .title-wrap,
.L-statement .statement,
.L-end .end-wrap {
  position: absolute;
  left: 112px;
  right: 112px;
  bottom: 150px;
}
.L-title .hl-xl {
  font-size: 136px;
  max-width: 15ch;
}
.title-sub {
  font-size: 40px;
  color: var(--dim);
  margin-top: 36px;
  max-width: 36ch;
  line-height: 1.25;
}
.title-meta {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  font-family: var(--cue);
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.title-meta span + span::before {
  content: '·';
  margin-right: 40px;
  color: var(--tally);
}
.title-logo {
  position: absolute;
  top: 100px;
  left: 112px;
  height: 156px;
  width: auto;
}

.L-statement .hl-xl {
  font-size: 128px;
  max-width: 13ch;
}
.L-statement p {
  max-width: 40ch;
}
.L-end p {
  max-width: 56ch;
}

.L-join .join-left {
  position: absolute;
  left: 112px;
  top: 136px;
  width: 760px;
}
.L-join .hl-xl,
.L-lead .hl-xl {
  font-size: 132px;
}
.join-url {
  margin-top: 48px;
  font-family: var(--cue);
  font-size: 40px;
  color: var(--house);
  letter-spacing: 0.02em;
}
.join-count {
  margin-top: 24px;
  font-family: var(--cue);
  font-size: 22px;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
}
.join-count span {
  color: var(--tally);
  font-size: 1.6em;
  margin-right: 0.2em;
}
.join-qr {
  position: absolute;
  right: 112px;
  top: 50%;
  width: 560px;
  height: 560px;
  transform: translateY(-50%);
}
.qr {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--r-plate);
}

.L-section {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 72px;
  padding-bottom: 150px;
}
.L-section .section-no {
  font-size: 440px;
  line-height: 0.74;
  font-weight: 800;
  font-stretch: 30%;
  color: var(--tally);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.L-section .section-body {
  padding-bottom: 8px;
}
.L-section .hl-xl {
  font-size: 120px;
}
.L-number .number-wrap {
  position: absolute;
  left: 112px;
  right: 112px;
  bottom: 150px;
}
.number {
  font-size: 400px;
  line-height: 0.78;
  font-weight: 900;
  font-stretch: 151%;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.number-cap p {
  font-size: 44px;
  color: var(--house);
  max-width: 30ch;
}

.L-quote .quote-wrap {
  position: absolute;
  left: 112px;
  right: 160px;
  bottom: 150px;
  margin: 0;
}
.quote-wrap blockquote {
  margin: 0;
  font-size: 84px;
  font-weight: 500;
  font-style: oblique 8deg;
  font-stretch: 96%;
  line-height: 1.04;
}
.quote-wrap figcaption {
  margin-top: 40px;
  font-family: var(--cue);
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.L-split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 80px;
}
.L-split .split-media {
  position: relative;
  border-radius: var(--r-plate);
  overflow: hidden;
  outline: 1px solid var(--gaffer);
}
.L-split .split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.L-split .row-body {
  font-size: 36px;
}

.L-image {
  padding: 0;
}
.L-image .full-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.L-image .image-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 220px 112px 120px;
  background: linear-gradient(to top, var(--blackout) 30%, transparent);
}

/* polls: bars grow from the cue column */
.poll-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 64px;
}
.poll-head .kicker {
  grid-column: 1 / -1;
  margin: 0;
}
.poll-head .hl {
  font-size: 84px;
  max-width: 18ch;
}
.poll-total {
  font-family: var(--cue);
  font-size: 22px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: right;
  white-space: nowrap;
}
.poll-total span {
  display: block;
  font-size: 96px;
  line-height: 1;
  color: var(--house);
  letter-spacing: -0.02em;
}
.bars {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.bar {
  display: grid;
  grid-template-columns: 64px minmax(0, 600px) 1fr 140px;
  align-items: center;
  gap: 24px;
  min-height: 84px;
  padding: 8px 0;
  border-top: 1px solid var(--gaffer);
}
.bar-no {
  font-family: var(--cue);
  font-size: 22px;
  color: var(--dim);
}
.bar-label {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
}
.bar-track {
  height: 40px;
  background: var(--riser);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  background: var(--house);
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 800ms var(--ease-go);
}
.bar-pct {
  font-family: var(--cue);
  font-size: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar.is-lead .bar-fill {
  background: var(--tally);
  opacity: 1;
}
.bar.is-lead .bar-no,
.bar.is-lead .bar-pct {
  color: var(--tally);
}

/* Q&A on screen */
.L-qna {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 96px;
}
.qna-head .hl {
  font-size: 92px;
}
.qna-qr {
  width: 220px;
  height: 220px;
  margin-top: 48px;
}
.qna-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.qna-list .row {
  grid-template-columns: 80px 1fr;
  padding: 26px 0;
}
.qna-list .row-no {
  font-size: 34px;
}
.qna-list .row-body {
  font-size: 38px;
}
.qna-list .is-pinned .row-body {
  font-size: 48px;
  font-weight: 700;
}
.qna-list .is-pinned::before {
  background: var(--tally);
  height: 3px;
}
.qna-list .is-empty .row-body {
  color: var(--dim);
}

.L-agenda .rows {
  max-width: 1100px;
}

.L-lead .lead-wrap {
  position: absolute;
  left: 112px;
  top: 136px;
  width: 800px;
}

.corner-qr {
  position: absolute;
  right: 56px;
  bottom: 64px;
  display: grid;
  justify-items: end;
  gap: 10px;
}
.corner-qr .qr {
  width: 112px;
  height: 112px;
  border-radius: 6px;
}
.corner-qr span {
  font-family: var(--cue);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- projector chrome ---------- */
.stage > .tally {
  position: absolute;
  top: 40px;
  left: 56px;
  font-size: 20px;
  z-index: 5;
}
.cue-rail {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 28px;
  display: flex;
  gap: 6px;
  align-items: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 5;
}
.cue-rail li {
  flex: 1;
  height: 4px;
  background: var(--gaffer);
  border-radius: 2px;
  transition:
    background var(--t-ui),
    height 300ms var(--ease-go);
}
.cue-rail li.is-done {
  background: var(--spent);
}
.cue-rail li.is-now {
  background: var(--tally);
  height: 10px;
}
.preshow {
  position: absolute;
  right: 112px;
  bottom: 84px;
  z-index: 4;
  text-align: right;
}
.preshow-label {
  font-family: var(--cue);
  font-size: 20px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.preshow-clock {
  font-family: var(--cue);
  font-weight: 700;
  font-size: 112px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}
.blackout {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: var(--blackout);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.reactions {
  position: absolute;
  right: 120px;
  bottom: 70px;
  width: 0;
  height: 0;
  z-index: 7;
  pointer-events: none;
}
.reactions span {
  position: absolute;
  bottom: 0;
  right: var(--x);
  font-size: 72px;
  animation: rise 2.5s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes rise {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    transform: translate(0, -60px) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift), -640px) rotate(var(--rot)) scale(0.9);
    opacity: 0;
  }
}

/* ---------- projector page ---------- */
.view-screen {
  position: fixed;
  inset: 0;
}
.screen-fill {
  position: absolute;
  inset: 0;
}
.screen-hint {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  background: var(--riser);
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  padding: 10px 14px;
  font-family: var(--cue);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--dim);
  cursor: pointer;
  transition: opacity 600ms;
}
.screen-hint.is-gone {
  opacity: 0;
  pointer-events: none;
}

/* ---------- controls ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  background: var(--riser);
  color: var(--house);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--t-ui) var(--ease-ui),
    border-color var(--t-ui) var(--ease-ui),
    transform 90ms var(--ease-ui);
}
.btn:hover {
  background: var(--riser-up);
  border-color: var(--spent);
}
.btn:active {
  transform: scale(0.97);
}
.btn:focus-visible,
.opt:focus-visible,
.up:focus-visible,
.g-react button:focus-visible {
  outline: 2px solid var(--house);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn-go {
  background: var(--tally);
  border-color: var(--tally);
  color: var(--tally-ink);
}
.btn-go:hover {
  background: #ff5548;
  border-color: #ff5548;
}
.btn.is-on {
  border-color: var(--tally);
  color: var(--house);
  box-shadow: inset 0 0 0 1px var(--tally);
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.btn-xs {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}
.btn-danger:hover {
  border-color: var(--tally);
}
.btn kbd {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--gaffer);
  border-radius: 4px;
  padding: 1px 5px;
}
.pill {
  font-family: var(--cue);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--gaffer);
  border-radius: 99px;
  padding: 2px 8px;
  color: var(--dim);
}
.pill-ok {
  color: var(--standby);
  border-color: rgb(61 214 140 / 0.4);
}
input,
textarea {
  width: 100%;
  background: var(--blackout);
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  padding: 12px 14px;
  font-size: 16px;
  transition: border-color var(--t-ui);
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--house);
}
textarea {
  resize: vertical;
  min-height: 64px;
}
.h-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--cue);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}
.h-label .btn {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--display);
}
.h-label b {
  color: var(--house);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: 50;
  background: var(--house);
  color: var(--blackout);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-ctl);
  padding: 10px 16px;
  pointer-events: none;
  transition:
    opacity 180ms var(--ease-ui),
    transform 260ms var(--ease-go);
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.is-warn {
  background: var(--tally);
}

/* ---------- host console ---------- */
.view-host {
  min-height: 100vh;
  padding: 0 24px 32px;
}
.h-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  background: var(--blackout);
  border-bottom: 1px solid var(--gaffer);
  margin: 0 -24px 20px;
  padding: 0 24px;
  font-size: 14px;
}
.h-tally {
  font-size: 13px;
}
.h-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.h-net,
.h-aud {
  font-family: var(--cue);
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}
.h-net.is-ok::before {
  content: '●';
  color: var(--standby);
  margin-right: 6px;
}
.h-net.is-warn {
  color: var(--tally);
}
.h-aud b {
  color: var(--house);
  font-size: 15px;
}
.h-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: start;
}
.h-now {
  position: sticky;
  top: 76px;
}
.h-stage {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--r-plate);
  outline: 1px solid var(--gaffer);
}
.h-slidecue {
  color: var(--house);
  letter-spacing: 0.04em;
  text-transform: none;
}
.h-controls {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 16px;
}
.h-controls .btn {
  min-height: 64px;
  font-size: 18px;
}
.h-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.h-side {
  display: grid;
  gap: 16px;
}
.h-side > section {
  background: var(--riser);
  border: 1px solid var(--gaffer);
  border-radius: var(--r-plate);
  padding: 16px;
}
.h-clock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.clock-main span,
.clock-slide span {
  display: block;
  font-family: var(--cue);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clock-slide span {
  font-size: 28px;
  color: var(--dim);
}
.clock-slide span.is-over {
  color: var(--tally);
}
.clock-main small,
.clock-slide small {
  font-family: var(--cue);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.06em;
}
.clock-pace {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 18px;
}
.clock-pace.is-late {
  color: var(--tally);
}
.clock-pace.is-ok::before {
  content: '● ';
  color: var(--standby);
}
.clock-pace.is-idle {
  color: var(--dim);
}
.clock-btns {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.clock-wall {
  grid-column: 1 / -1;
  font-family: var(--cue);
  font-size: 12px;
  color: var(--dim);
}
.h-stage-sm {
  border-radius: var(--r-ctl);
}
.notes {
  font-size: 19px;
  line-height: 1.45;
  max-height: 320px;
  overflow: auto;
}
.notes p {
  margin: 0 0 12px;
}
.notes mark {
  background-size: 100% 0.11em;
}
.mini-bars {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.mini-bars li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--gaffer);
  font-size: 14px;
}
.mini-bars .bar-no {
  font-size: 12px;
}
.mini-bars b {
  font-family: var(--cue);
}
.qa-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow: auto;
}
.qa {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--gaffer);
  font-size: 15px;
}
.qa.is-empty {
  display: block;
}
.qa-votes {
  font-family: var(--cue);
  color: var(--tally);
  font-weight: 700;
}
.qa-text small {
  display: block;
  color: var(--dim);
  font-size: 12px;
  margin-top: 2px;
}
.qa-acts {
  grid-column: 2;
  display: flex;
  gap: 6px;
}
.q-answered .qa-text,
.q-hidden .qa-text {
  color: var(--spent);
  text-decoration: line-through;
}
.q-pinned {
  box-shadow: inset 3px 0 0 var(--tally);
  padding-left: 10px;
}
.h-aud-panel {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.h-aud-panel .h-label {
  margin: 0;
  flex-basis: 100%;
}
.sheet {
  background: var(--riser);
  color: var(--house);
  border: 1px solid var(--gaffer);
  border-radius: var(--r-plate);
  width: min(640px, calc(100vw - 32px));
  max-height: 80vh;
  padding: 20px;
}
.sheet::backdrop {
  background: rgb(12 12 14 / 0.8);
}
.cue-sheet {
  margin: 0;
}
.cue-sheet .row {
  padding: 0;
}
.cue-sheet button {
  all: unset;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  cursor: pointer;
}
.cue-sheet button:hover .row-body {
  color: var(--tally);
}
.cue-sheet .row-no {
  font-size: 14px;
}
.cue-sheet .row-body {
  font-size: 17px;
}
.link-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--gaffer);
}
.link-row code,
.link-row small {
  display: block;
  font-size: 13px;
  color: var(--dim);
  margin-top: 4px;
  word-break: break-all;
}
.remote-qr {
  width: 220px;
  margin: 12px auto 0;
}
.view-host-login,
.index {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login {
  width: min(380px, 100%);
  display: grid;
  gap: 16px;
}
.login .hl {
  font-size: 44px;
}
.login-err {
  color: var(--tally);
  min-height: 1.4em;
  margin: 0;
}
.index-wrap {
  width: min(720px, 100%);
}
.index-wrap .hl {
  font-size: clamp(44px, 8vw, 80px);
  margin: 20px 0 8px;
}
.index-wrap .row-no {
  font-size: 14px;
}
.index-wrap .row-body {
  font-size: 24px;
}
.index-wrap .row-body small {
  font-size: 14px;
}

@media (max-width: 1100px) {
  .h-grid {
    grid-template-columns: 1fr;
  }
  .h-now {
    position: static;
  }
}
@media (max-width: 640px) {
  .view-host {
    padding: 0 16px 120px;
  }
  .h-top {
    margin: 0 -16px 12px;
    padding: 0 16px;
    gap: 12px;
  }
  .h-title {
    display: none;
  }
  .h-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--blackout);
    border-top: 1px solid var(--gaffer);
  }
  .h-controls .btn {
    min-height: 72px;
  }
  .h-next {
    display: none;
  }
  .clock-main span {
    font-size: 34px;
  }
}

/* ---------- guest phone ---------- */
.view-guest {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
}
.g-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  margin: 0 -16px;
  padding: 0 16px;
  background: var(--blackout);
  border-bottom: 1px solid var(--gaffer);
}
.g-top .tally {
  font-size: 12px;
}
.g-title {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.g-cue {
  font-family: var(--cue);
  font-size: 12px;
  color: var(--dim);
}
.g-main {
  display: grid;
  gap: 24px;
  padding-top: 16px;
}
.g-stage {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--r-ctl);
  outline: 1px solid var(--gaffer);
}
.g-preshow {
  padding: 24px 0 8px;
}
.g-count {
  font-family: var(--cue);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  margin: 10px 0 24px;
  font-variant-numeric: tabular-nums;
}
.g-preshow .hl {
  font-size: 40px;
}
.g-preshow p {
  font-size: 16px;
  line-height: 1.5;
}
.g-agenda {
  margin-top: 20px;
}
.g-agenda .row {
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px 0;
}
.g-agenda .row-no {
  font-size: 13px;
}
.g-agenda .row-body {
  font-size: 16px;
}
.g-panel .kicker {
  margin-bottom: 10px;
}
.g-q {
  font-size: 26px;
  line-height: 1.12;
  font-weight: 800;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.g-opts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.opt {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  background: var(--riser);
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color var(--t-ui),
    transform 90ms var(--ease-ui);
}
.opt:active {
  transform: scale(0.98);
}
.opt .bar-no {
  font-size: 13px;
}
.opt.is-mine {
  border-color: var(--house);
}
.opt.is-mine .bar-no::before {
  content: '●';
  color: var(--standby);
}
.opt.is-mine .bar-no {
  font-size: 0;
}
.opt.is-mine .bar-no::before {
  font-size: 14px;
}
.opt-pct {
  font-family: var(--cue);
  font-size: 15px;
}
.opt-fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--riser-up);
  transform-origin: left;
  transition: transform 700ms var(--ease-go);
}
.opt.is-lead .opt-fill {
  background: rgb(239 64 53 / 0.24);
}
.opt.is-lead .opt-pct {
  color: var(--tally);
}
.g-total {
  font-family: var(--cue);
  font-size: 12px;
  margin: 10px 0 0;
}
.lead-form {
  display: grid;
  gap: 10px;
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
  color: var(--dim);
}
.consent input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--tally);
}
.ask-form {
  display: grid;
  gap: 8px;
}
.ask-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.g-qs {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.g-qrow {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--gaffer);
  font-size: 15px;
  line-height: 1.4;
}
.g-qrow small {
  display: block;
  font-size: 12px;
  color: var(--dim);
}
.g-qrow.is-done span {
  color: var(--spent);
}
.up {
  display: grid;
  justify-items: center;
  min-height: 44px;
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  background: var(--riser);
  font-size: 10px;
  color: var(--dim);
  cursor: pointer;
  padding: 4px 0;
}
.up b {
  font-family: var(--cue);
  font-size: 14px;
  color: var(--house);
}
.up.is-mine {
  border-color: var(--tally);
  color: var(--tally);
}
.g-react {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--blackout);
  border-top: 1px solid var(--gaffer);
}
.g-react button {
  width: 56px;
  height: 52px;
  font-size: 26px;
  border: 1px solid var(--gaffer);
  border-radius: var(--r-ctl);
  background: var(--riser);
  cursor: pointer;
}
.g-react button.pop {
  animation: pop 320ms var(--ease-go);
}
@keyframes pop {
  40% {
    transform: scale(1.22) translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .slide.go {
    clip-path: none;
    opacity: 0;
  }
  .slide.go.on {
    opacity: 1;
    transition: opacity 200ms linear !important;
  }
}
