:root {
  --ink: #07090b;
  --graphite: #0f1317;
  --panel: #151a1f;
  --panel-high: #1b2127;
  --line: #2a3239;
  --line-soft: #20272d;
  --text: #f0f3f5;
  --muted: #96a1aa;
  --dim: #68747d;
  --signal: #69d4cb;
  --signal-deep: #1b7772;
  --amber: #d2a45f;
  --warning: #e0b46b;
  --danger: #ef796f;
  --success: #78d99a;
  --radius: 3px;
  --font-display: "Arial Narrow", "Aptos Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --font-utility: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    var(--ink);
  background-size: 40px 40px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--signal);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.96);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.08em;
  transform: rotate(45deg);
}

.brand-glyph {
  display: block;
  transform: rotate(-45deg);
}

.brand-glyph em {
  display: inline-block;
  margin: 0 2px;
  color: var(--amber);
  font-size: 11px;
  font-style: normal;
}

.brand-name,
.brand-product,
.session-meta,
.eyebrow {
  margin: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-name span {
  color: var(--amber);
}

.brand-product {
  color: var(--muted);
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-product b {
  color: var(--signal);
}

.rehearsal-flag {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(210, 164, 95, 0.45);
  background: rgba(210, 164, 95, 0.07);
  color: #e9c48b;
  font-family: var(--font-utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(210, 164, 95, 0.12);
}

.session-meta {
  justify-self: end;
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-meta span {
  padding: 0 7px;
  color: var(--line);
}

.console-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100vh - 118px);
}

.scene-rail {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(12, 15, 18, 0.96);
}

.rail-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 26px 20px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: var(--signal);
  font-family: var(--font-utility);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rail-heading h2,
.panel-heading h2,
.script-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.scene-count,
.utility-tag,
.script-heading > span {
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#scene-list {
  padding: 9px 0;
}

.scene-button {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 1px 9px;
  padding: 13px 20px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.scene-button:hover {
  background: rgba(255, 255, 255, 0.025);
}

.scene-button.is-active {
  border-left-color: var(--signal);
  background: linear-gradient(90deg, rgba(105, 212, 203, 0.1), transparent 80%);
}

.scene-index {
  grid-row: 1 / 3;
  padding-top: 2px;
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 9px;
}

.scene-button.is-active .scene-index {
  color: var(--signal);
}

.scene-button > span:not(.scene-index) {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.scene-button small {
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage {
  min-width: 0;
  padding: 22px;
}

.visual-deck {
  position: relative;
  min-height: 530px;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 42%, rgba(105, 212, 203, 0.07), transparent 26%),
    linear-gradient(145deg, #12171b 0%, #0b0e11 72%);
}

.visual-deck::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 255, 255, 0.009) 6px 7px);
}

.stage-topline {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 47px;
  padding: 10px 17px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-badge {
  padding: 5px 8px;
  border: 1px solid rgba(120, 217, 154, 0.38);
  color: var(--success);
}

.source-badge.is-review {
  border-color: rgba(224, 180, 107, 0.38);
  color: var(--warning);
}

.source-badge.is-restricted {
  border-color: rgba(239, 121, 111, 0.4);
  color: var(--danger);
}

.scene-visual {
  position: relative;
  z-index: 1;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  border-right: 1px solid var(--line-soft);
}

.nexa-visual {
  position: relative;
  width: min(25vw, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.nexa-visual::before,
.nexa-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(105, 212, 203, 0.18);
  transform: rotate(45deg);
}

.nexa-visual::before {
  inset: 17%;
}

.nexa-visual::after {
  inset: 25%;
  border-color: rgba(210, 164, 95, 0.24);
}

.orbit {
  position: absolute;
  inset: 6%;
  border: 1px dashed rgba(105, 212, 203, 0.28);
  border-radius: 50%;
  animation: orbit 18s linear infinite;
}

.orbit-two {
  inset: 1%;
  border-style: solid;
  border-color: transparent rgba(210, 164, 95, 0.22) transparent rgba(210, 164, 95, 0.22);
  animation-duration: 28s;
  animation-direction: reverse;
}

.signal-face {
  position: relative;
  z-index: 2;
  width: 35%;
  aspect-ratio: 0.76;
  border: 1px solid rgba(105, 212, 203, 0.52);
  border-radius: 48% 48% 42% 42%;
  background: linear-gradient(160deg, rgba(105, 212, 203, 0.16), rgba(105, 212, 203, 0.025));
  box-shadow: inset 0 0 35px rgba(105, 212, 203, 0.08), 0 0 50px rgba(105, 212, 203, 0.08);
  animation: breathe 4s ease-in-out infinite;
}

.signal-eye {
  position: absolute;
  top: 39%;
  width: 16%;
  height: 2px;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}

.eye-left { left: 22%; }
.eye-right { right: 22%; }

.signal-wave {
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 28%;
  height: 8%;
  border-bottom: 1px solid var(--amber);
  border-radius: 50%;
}

.signal-dot {
  position: absolute;
  z-index: 3;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 11px var(--signal);
}

.dot-one { top: 18%; left: 24%; }
.dot-two { top: 61%; right: 13%; background: var(--amber); box-shadow: 0 0 11px var(--amber); }
.dot-three { bottom: 15%; left: 35%; }

.identity-caption {
  display: grid;
  gap: 3px;
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-utility);
  text-transform: uppercase;
}

.identity-caption span {
  color: var(--signal);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.identity-caption strong {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.scene-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 680px;
  padding: 48px clamp(28px, 5vw, 78px);
}

.scene-copy h1 {
  max-width: 600px;
  margin: 4px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.scene-copy > p:not(.eyebrow) {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Silent looping Gulf-EL city film under the scene title. */
.brand-film {
  display: block;
  width: 100%;
  max-width: 570px;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  object-fit: cover;
}

.scene-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.scene-label {
  padding: 7px 9px;
  border: 1px solid rgba(224, 180, 107, 0.5);
  background: rgba(224, 180, 107, 0.06);
  color: var(--warning);
  font-family: var(--font-utility);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.script-panel {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.62);
}

.script-heading {
  align-self: start;
}

.script-heading > span {
  display: inline-block;
  margin-top: 8px;
}

#scene-script {
  margin: 0;
  padding-left: 22px;
  border-left: 1px solid var(--amber);
  color: #dce2e5;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.65;
}

.speech-controls {
  min-width: 220px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.control-button,
.input-action-row button,
.quiet-button {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-high);
  font-family: var(--font-utility);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-control {
  border-color: var(--signal-deep);
  background: var(--signal);
  color: #07100f;
}

.primary-control:hover {
  background: #8adfd8;
}

.stop-control:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.tts-status {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 10px;
  text-align: right;
}

.operator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(15, 19, 23, 0.96);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 67px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.operator-state {
  padding: 6px 8px;
  border: 1px solid rgba(120, 217, 154, 0.32);
  color: var(--success);
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.operator-state.is-escalated {
  border-color: rgba(239, 121, 111, 0.4);
  color: var(--danger);
}

.safety-rule {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 13px;
  padding: 18px 17px 10px;
}

.safety-rule-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--warning);
  color: var(--warning);
  font-family: var(--font-utility);
  font-weight: 800;
}

.safety-rule p {
  margin: 0;
  color: #d8dddf;
  font-size: 12px;
  line-height: 1.65;
}

.microcopy {
  margin: 0;
  padding: 4px 17px 17px 60px;
  color: var(--dim);
  font-size: 10px;
}

.triage-panel form {
  padding: 17px;
}

label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.input-action-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
  margin-top: 7px;
}

input[type="text"],
input[type="number"],
input[type="email"] {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0d0f;
  color: var(--text);
}

input::placeholder {
  color: #59636a;
}

.input-action-row button:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.triage-result {
  margin: 0 17px 17px;
  padding: 12px 13px;
  border-left: 2px solid var(--dim);
  background: #0c1013;
}

.triage-result strong {
  color: var(--muted);
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.triage-result p {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 11px;
}

.triage-result.is-approved {
  border-color: var(--success);
}

.triage-result.is-approved strong {
  color: var(--success);
}

.triage-result.is-escalated {
  border-color: var(--danger);
}

.triage-result.is-escalated strong {
  color: var(--danger);
}

/* Prepared answer (nexa-answers.js), shown in place of the triage result. */
.prepared-answer strong {
  color: var(--signal);
}

.prepared-answer p {
  margin: 8px 0 0;
  color: #d8dddf;
}

.prepared-answer .prepared-note {
  color: var(--warning);
  font-size: 11px;
}

.prepared-toggle {
  margin: 14px 17px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prepared-toggle summary {
  padding: 11px 12px;
  color: var(--signal);
  font-family: var(--font-utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.prepared-toggle summary span {
  color: var(--dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.prepared-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 0 10px 10px;
}

.prepared-item {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0d0f;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.prepared-item:hover {
  border-color: var(--signal-deep);
  color: var(--signal);
}

/* Audience sign-up (nexa-signup.js): operator panel, stage corner badge and large QR card. */
.signup-panel {
  grid-column: 1 / -1;
}

.signup-body {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
  padding: 17px;
}

.signup-qr {
  width: 132px;
  border-radius: var(--radius);
}

.signup-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.signup-copy strong {
  color: var(--text);
}

.signup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--text);
  text-decoration: none;
}

.link-button:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.signup-badge {
  display: flex;
  margin-top: 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(105, 212, 203, 0.45);
  border-radius: var(--radius);
  background: rgba(7, 9, 11, 0.85);
  color: var(--signal);
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.signup-badge img {
  width: 64px;
  border-radius: 3px;
}

/* The corner badge steps aside while the large QR card is up. */
.visual-deck:has(.show-signup) .signup-badge {
  display: none;
}

.signup-card {
  display: none;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 22px;
  align-items: center;
  max-width: 570px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(105, 212, 203, 0.5);
  border-radius: var(--radius);
  background: rgba(105, 212, 203, 0.05);
}

.signup-card img {
  width: 100%;
  border-radius: var(--radius);
}

.signup-card h2 {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.05;
}

.signup-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.scene-copy.show-signup .signup-card {
  display: grid;
}

.scene-copy.show-signup .brand-film {
  display: none;
}

/* Platform tour video: replaces the city film while the operator shows it. */
.tour-film {
  display: none;
  width: 100%;
  max-width: 570px;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
}

.scene-copy.show-tour .tour-film {
  display: block;
}

.scene-copy.show-tour .brand-film {
  display: none;
}

/* Package gifts strip (nexa-gifts.js fills the grid): always on the stage, under the video. */
.gifts-card {
  max-width: 570px;
  margin-top: 14px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(210, 164, 95, 0.5);
  border-radius: var(--radius);
  background: rgba(210, 164, 95, 0.05);
}

.gifts-card .eyebrow {
  margin: 0;
}

.gifts-card .welcome-gift {
  margin: 2px 0 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.gift {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0d0f;
}

.gift img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
}

.gift figcaption {
  display: grid;
  gap: 1px;
  padding: 4px 5px 5px;
  font-size: 9px;
  line-height: 1.25;
}

.gift figcaption span {
  color: var(--muted);
}

@media (max-width: 560px) {
  .gift-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .signup-body {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .signup-card {
    grid-template-columns: 1fr;
  }

  .signup-card img {
    max-width: 200px;
  }
}

/* Register / Book a call buttons on the large QR card: only on the public /watch page. */
.watch-actions {
  display: none;
}

.watch-view .watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.watch-button {
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--signal);
  color: #07100f;
  font-weight: 700;
  text-decoration: none;
}

.watch-button.is-secondary {
  border: 1px solid var(--signal);
  background: transparent;
  color: var(--signal);
}

.signup-card .welcome-gift {
  margin-bottom: 6px;
  color: var(--amber);
  font-weight: 700;
}

/* Return calculator: operator panel, plus a stage card that replaces the city film when shown. */
.calc-panel form {
  padding: 17px 17px 0;
}

.calc-result {
  padding: 12px 17px 17px;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.calc-line strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 22px;
  white-space: nowrap;
}

.calc-note {
  margin: 12px 0 0;
  color: var(--warning);
  font-family: var(--font-utility);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.calc-card {
  display: none;
  max-width: 570px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(224, 180, 107, 0.5);
  border-radius: var(--radius);
  background: rgba(224, 180, 107, 0.05);
}

.scene-copy.show-calc .calc-card {
  display: block;
}

.scene-copy.show-calc .brand-film {
  display: none;
}

.calc-card .calc-line strong {
  font-size: clamp(22px, 2.4vw, 34px);
}

.quiet-button {
  padding: 0 15px;
}

.quiet-button {
  color: var(--muted);
}

.quiet-button:hover {
  border-color: var(--muted);
  color: var(--text);
}

.footer {
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 8px 28px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--dim);
  font-family: var(--font-utility);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
  text-align: center;
}

.footer span:last-child {
  justify-self: end;
}

.presenter-launch {
  margin: 14px 18px 0;
}

/* Shown in the middle of the screen while the browser waits for the visitor's first tap. */
.sound-prompt {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 40;
  transform: translate(-50%, -50%);
  padding: 22px 34px;
  border: 0;
  border-radius: 999px;
  background: var(--signal);
  color: #07100f;
  font: 700 clamp(18px, 2.4vw, 26px)/1.1 var(--font-body);
  box-shadow: 0 0 0 10px rgba(105, 212, 203, 0.18), 0 16px 50px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  animation: prompt-pulse 1.8s ease-in-out infinite;
}

@keyframes prompt-pulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(105, 212, 203, 0.18), 0 16px 50px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 0 0 22px rgba(105, 212, 203, 0.06), 0 16px 50px rgba(0, 0, 0, 0.6); }
}

/* Portrait face (nexa-face.js) replaces the abstract face once the picture has loaded. */
.nexa-visual.has-portrait > :not(.nexa-portrait),
.nexa-visual.has-portrait::before,
.nexa-visual.has-portrait::after {
  display: none;
}

.nexa-portrait {
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent);
  mask-image: radial-gradient(closest-side, #000 78%, transparent);
  transform-origin: 50% 80%;
}

.nexa-portrait img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Mouth shapes and blink sit exactly over the face and blend in and out; the neck light glows with the voice. */
.nexa-portrait .nexa-layer {
  position: absolute;
  opacity: 0;
  transition: opacity 90ms ease-out;
}

.nexa-portrait .nexa-blink {
  transition-duration: 50ms;
}

.nexa-portrait .nexa-layer.is-on {
  opacity: 1;
}

.nexa-neck-glow {
  position: absolute;
  border-bottom: 2px solid #b9fff8;
  border-radius: 50%;
  filter: drop-shadow(0 0 4px #69d4cb) drop-shadow(0 0 10px rgba(105, 212, 203, 0.7));
  opacity: 0;
}

.nexa-visual.is-speaking .signal-wave {
  animation: speak 240ms ease-in-out infinite alternate;
}

/* Presenter screen: the window shared in Zoom. Operator tools stay in the console window. */
.presenter-view .scene-rail,
.presenter-view .operator-grid,
.presenter-view .script-heading,
.presenter-view .speech-controls,
.presenter-view .rehearsal-flag,
.presenter-view .session-meta,
.presenter-view .footer,
.presenter-view .skip-link {
  display: none;
}

.presenter-view .console-shell {
  display: block;
  min-height: 0;
}

.presenter-view .stage {
  padding: 0;
}

.presenter-view .visual-deck {
  min-height: calc(100vh - 79px);
  border: 0;
}

.presenter-view .nexa-visual {
  width: min(38vw, 480px);
}

.presenter-view .script-panel {
  grid-template-columns: 1fr;
}

.presenter-view #scene-script {
  font-size: clamp(18px, 1.8vw, 26px);
}

@keyframes speak {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(2.4); }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.82; }
  50% { transform: scale(1.035); opacity: 1; }
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .session-meta {
    display: none;
  }

  .console-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .visual-deck {
    grid-template-columns: minmax(240px, 0.7fr) 1fr;
  }

  .script-panel {
    grid-template-columns: 145px 1fr;
  }

  .speech-controls {
    grid-column: 1 / -1;
    grid-template-columns: 150px 150px 1fr;
    align-items: center;
  }

  .tts-status {
    grid-column: auto;
  }

}

@media (max-width: 780px) {
  /* Play / Stop stay in reach at the bottom of the phone screen. */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .speech-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 11, 0.95);
  }

  .speech-controls .tts-status {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px 18px;
  }

  .rehearsal-flag {
    justify-self: start;
  }

  .console-shell {
    display: block;
  }

  .scene-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-heading {
    padding: 17px 16px 12px;
  }

  #scene-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 9px 14px 14px;
    scrollbar-color: var(--line) transparent;
  }

  .scene-button {
    flex: 0 0 178px;
    padding: 11px 12px;
    border: 1px solid var(--line-soft);
    border-left-width: 1px;
  }

  .scene-button.is-active {
    border-color: var(--signal-deep);
  }

  .stage {
    padding: 12px;
  }

  .visual-deck {
    display: block;
    min-height: 0;
  }

  .stage-topline {
    gap: 12px;
    align-items: flex-start;
  }

  .source-badge {
    max-width: 61%;
    text-align: right;
  }

  .scene-visual {
    min-height: 290px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .nexa-visual {
    width: 220px;
  }

  .scene-copy {
    padding: 35px 24px;
  }

  .scene-copy h1 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .script-panel {
    display: block;
    padding: 20px;
  }

  #scene-script {
    margin: 18px 0;
  }

  .speech-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tts-status {
    grid-column: 1 / -1;
    text-align: left;
  }

  .operator-grid {
    grid-template-columns: 1fr;
  }

  .signup-panel {
    grid-column: auto;
  }

  .footer {
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }

  .footer p {
    text-align: left;
  }

  .footer span:last-child {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .rehearsal-flag {
    font-size: 8px;
  }

  .stage-topline {
    flex-direction: column;
  }

  .source-badge {
    max-width: 100%;
    text-align: left;
  }

  .operator-grid {
    gap: 12px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Computer screens only (phones and tablets keep their layout): a bigger Nexa in a narrower column,
   and a bigger video and gifts strip on the right. */
@media (min-width: 1101px) {
  .visual-deck {
    grid-template-columns: minmax(300px, 0.62fr) minmax(420px, 1.38fr);
  }

  .nexa-visual {
    width: min(28vw, 295px);
  }

  .presenter-view .nexa-visual {
    width: min(42vw, 540px);
  }

  .scene-copy {
    max-width: 800px;
  }

  .brand-film,
  .tour-film,
  .gifts-card,
  .calc-card,
  .signup-card {
    max-width: 660px;
  }
}

/* Public /watch page: visitors can ask Nexa and try the calculator; operator-only parts stay hidden. */
.watch-view .operator-grid {
  display: grid;
  padding: 0 16px 28px;
}

.watch-view .signup-panel,
.watch-view #calc-show,
.watch-view .operator-state,
.watch-view .safety-rule,
.watch-view .microcopy {
  display: none;
}

.watch-view .prepared-answer .watch-button {
  display: inline-block;
  margin-top: 10px;
}

/* Phones, public /watch page only: small scene titles so Nexa and the film get the space; the
   calculator above the questions; the gifts as a compact strip at the bottom (nexa-watch.js moves it). */
@media (max-width: 780px) {
  .watch-view .scene-copy {
    padding: 16px 16px 12px;
  }

  .watch-view .scene-copy h1 {
    margin: 2px 0 6px;
    font-size: 24px;
    line-height: 1.1;
  }

  .watch-view .scene-copy > p:not(.eyebrow) {
    font-size: 13px;
  }

  .watch-view .operator-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .watch-view .operator-grid .calc-panel {
    order: -1;
  }

  .watch-view .operator-grid .gifts-card {
    margin-top: 0;
  }

  .watch-view .gifts-card .gift-grid {
    max-width: 100%;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84px;
    overflow-x: auto;
  }

  .watch-view .gifts-card .gift figcaption {
    font-size: 8px;
  }
}
