/* EVM Sala de invitados - "Noche Verde". Mobile first. */

@font-face {
  font-family: 'Inter EVM';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --noche: #0b1b08;
  --surface: #12280d;
  --raised: #1c3716;
  --line: #34572b;
  --lima: #a2ff3f;
  --ink: #071105;
  --crema: #f7fadf;
  --muted: #cacfb9;
  --live: #ff5a4a;
  --error: #fe8b83;

  --r-panel: 22px;
  --r-control: 14px;
  --gutter: clamp(16px, 4vw, 28px);

  color-scheme: dark;
  font-family: 'Inter EVM', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

body {
  min-height: 100dvh;
  background: var(--noche);
  color: var(--crema);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variation-settings: 'opsz' 16;
}

[hidden] { display: none !important; }

a { color: var(--lima); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--crema);
  outline-offset: 3px;
}
/* Headings get focus programmatically when a view changes (for screen readers): no ring. */
[tabindex='-1']:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3 { margin: 0; line-height: 1.12; font-variation-settings: 'opsz' 28; }
h1 { font-size: clamp(2.25rem, 9.5vw, 3.6rem); font-weight: 760; letter-spacing: -0.025em; }
h2 { font-size: 1.375rem; font-weight: 680; letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* ---------- brand bar ---------- */

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px var(--gutter) 6px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand img { display: block; width: 132px; height: auto; }
.brand .brand-side { color: var(--muted); font-size: 0.9375rem; text-align: right; }

/* ---------- tally light: the broadcast "on air" lamp ---------- */

.tally {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 6px;
  background: var(--raised);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.tally[data-state='lobby'] { background: #5c6b3a; }
.tally[data-state='live'] {
  background: var(--live);
  box-shadow: 0 0 18px 2px rgba(255, 90, 74, 0.55);
}

/* ---------- layout ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px var(--gutter) 48px;
}

.step {
  max-width: 36rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding-top: 18px;
}

.greeting { display: grid; gap: 10px; }
.greeting .lead { font-size: 1.1875rem; color: var(--muted); max-width: 32rem; }
.greeting .lead strong { color: var(--crema); font-weight: 650; }

.panel {
  background: var(--surface);
  border-radius: var(--r-panel);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
/* A box inside a panel is outlined instead of filled. */
.panel .panel { background: transparent; border: 1px solid var(--line); padding: 16px; border-radius: var(--r-control); }

.notice {
  border-left: 4px solid var(--lima);
  padding: 4px 0 4px 14px;
  display: grid;
  gap: 6px;
}
.notice.is-error { border-left-color: var(--error); }
.notice.is-error .notice-title { color: var(--error); }
.notice-title { font-weight: 680; }

.countdown {
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 720;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- controls ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--crema);
  font: inherit;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn-primary {
  background: var(--lima);
  border-color: var(--lima);
  color: var(--ink);
  font-weight: 720;
}
.btn-primary:hover { border-color: var(--crema); }
.btn-primary:focus-visible { outline-color: var(--crema); }

.btn-big { min-height: 64px; font-size: 1.25rem; width: 100%; border-radius: 18px; }

.btn-danger { background: transparent; border-color: var(--live); color: var(--crema); }
.btn-danger:hover { background: rgba(255, 90, 74, 0.14); border-color: var(--live); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--lima); padding-inline: 8px; }
.btn-ghost:hover { border-color: var(--line); }

.btn-small { min-height: 44px; padding: 8px 14px; font-size: 0.9375rem; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

label { font-weight: 600; }

.field { display: grid; gap: 6px; }
.field .hint { font-size: 0.9375rem; color: var(--muted); font-weight: 400; }

select, input[type='text'], input[type='password'], input[type='datetime-local'], textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  min-width: 0;
  background: var(--noche);
  color: var(--crema);
  font: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input[type='datetime-local'] { font-size: 0.9375rem; padding-inline: 10px; }
select:focus-visible, input:focus-visible, textarea:focus-visible { border-color: var(--lima); }

.check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
}
.check input {
  appearance: none;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  border: 2px solid var(--muted);
  background: var(--noche);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.check input::after {
  content: '';
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-2px) rotate(-45deg);
  opacity: 0;
}
.check input:checked { background: var(--lima); border-color: var(--lima); }
.check input:checked::after { opacity: 1; }
.check span { display: grid; gap: 2px; }
.check .hint { font-weight: 400; color: var(--muted); font-size: 0.9375rem; }

details.more > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--lima);
  font-weight: 620;
  list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+'; width: 1.25em; font-weight: 700; }
details.more[open] > summary::before { content: '–'; }
details.more > div { display: grid; gap: 14px; padding: 6px 0 4px; }

.help-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.help-list strong { color: var(--crema); }

/* ---------- media ---------- */

.preview {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050d04;
  border-radius: var(--r-panel);
  overflow: hidden;
}
.preview video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.preview .preview-empty {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: var(--muted); padding: 16px;
}

/* Broadcast-style segmented level meter */
.meter {
  height: 18px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, #26421f 0 9px, transparent 9px 12px);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--lima) 0 9px, transparent 9px 12px);
  transition: width 80ms linear;
}
/* Near clipping the whole bar turns red, like a peak lamp. */
.meter[data-hot='true'] .meter-fill {
  background: repeating-linear-gradient(90deg, var(--live) 0 9px, transparent 9px 12px);
}

/* ---------- live view ---------- */

/* While live the page uses the whole window: the studio picture is as big as the window height allows
   (16:9), the other people go in a side column on wide screens and under the picture on narrow ones.
   "Pantalla completa" (.is-full) makes the picture fill the whole screen. */
body[data-view='view-live'] main { max-width: none; padding: 6px clamp(10px, 2vw, 28px) 12px; }
/* A slimmer logo bar while live: every pixel of height goes to the picture. */
body[data-view='view-live'] .brand { padding: 10px clamp(10px, 2vw, 28px) 0; max-width: none; }
body[data-view='view-live'] .brand img { width: 104px; }

.live {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding-top: 6px;
  width: 100%;
  margin-inline: auto;
}
.live-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }

.onair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.onair-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  font-size: 1.125rem;
}
.onair-label::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(255, 90, 74, 0.25);
}
.quality { font-size: 0.9375rem; color: var(--muted); }
.quality[data-q='poor'], .quality[data-q='lost'] { color: var(--error); }

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050d04;
  border-radius: var(--r-panel);
  overflow: hidden;
}
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.stage .stage-empty {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px;
  color: var(--muted); padding: 16px;
}

/* Level bars: five segments, lit from the left as the sound gets louder (red = close to clipping). */
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i {
  width: 4px;
  height: 30%;
  border-radius: 2px;
  background: rgba(247, 250, 223, 0.28);
  transition: background-color 90ms linear;
}
.bars i:nth-child(2) { height: 48%; }
.bars i:nth-child(3) { height: 66%; }
.bars i:nth-child(4) { height: 84%; }
.bars i:nth-child(5) { height: 100%; }
.bars[data-level='1'] i:nth-child(-n+1),
.bars[data-level='2'] i:nth-child(-n+2),
.bars[data-level='3'] i:nth-child(-n+3),
.bars[data-level='4'] i:nth-child(-n+4),
.bars[data-level='5'] i:nth-child(-n+5) { background: var(--lima); }
.bars[data-hot='true'] i { background: var(--live) !important; }

.level-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(7, 17, 5, 0.78);
  font-size: 0.875rem;
  font-weight: 620;
}
.stage-level { left: 10px; bottom: 10px; z-index: 2; }

.orient-hint {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(7, 17, 5, 0.82);
  font-size: 0.9375rem;
  font-weight: 620;
  white-space: nowrap;
  animation: orient-fade 500ms ease 6s forwards;
}
@keyframes orient-fade { to { opacity: 0; visibility: hidden; } }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 640px;
  justify-self: center;
}
.tile {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-radius: var(--r-control);
  overflow: hidden;
  display: grid;
  place-content: center;
}
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.is-self video { transform: scaleX(-1); }
/* Camera switched off: show the initial or the microphone instead of a frozen frame. */
.tile[data-cam='off'] video { visibility: hidden; }
.tile-name {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 70px);
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(7, 17, 5, 0.78);
  font-size: 0.875rem;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile .level-pill { right: 8px; bottom: 8px; padding: 6px 7px; }
.tile[data-speaking='true'] { box-shadow: inset 0 0 0 3px var(--lima); }
.tile-initial { font-size: 1.75rem; font-weight: 760; color: var(--muted); }
.tile-icon { display: none; width: 34px; height: 34px; color: var(--muted); }
.tile.is-self.is-audio .tile-initial { display: none; }
.tile.is-self.is-audio .tile-icon { display: block; }
.tile-mute {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--live);
  color: var(--ink);
  place-content: center;
}
.tile-mute svg { width: 16px; height: 16px; }
.tile[data-muted='true'] .tile-mute { display: grid; }

.live-note { text-align: center; }

/* Headphones switch under the people: shows the current choice and flips it without leaving the room. */
.live-extra { display: grid; gap: 8px; width: 100%; max-width: 640px; justify-self: center; }
.hp-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--crema);
  font: inherit;
  font-weight: 620;
  text-align: left;
  cursor: pointer;
}
.hp-switch:hover { border-color: var(--muted); }
.hp-switch svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.hp-switch[aria-checked='true'] svg { color: var(--lima); }
.hp-label { flex: 1; }
.hp-track { position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px; background: rgba(247, 250, 223, 0.22); transition: background-color 120ms linear; }
.hp-track i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--crema); transition: transform 120ms ease; }
.hp-switch[aria-checked='true'] .hp-track { background: var(--lima); }
.hp-switch[aria-checked='true'] .hp-track i { transform: translateX(18px); background: var(--ink); }
.banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* On air the question floats over the picture (no layout jump); in the waiting room it sits inline. */
.live #hp-prompt {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  max-width: 620px;
  margin-inline: auto;
  z-index: 45;
  background: var(--raised);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.controls {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 10px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(11, 27, 8, 0) 0, var(--noche) 30%);
}
.controls .btn { min-height: 60px; flex-direction: column; gap: 4px; font-size: 0.9375rem; padding-inline: 8px; line-height: 1.2; text-align: center; }
.controls .btn[aria-pressed='true'] { background: var(--crema); color: var(--ink); border-color: var(--crema); }

.banner {
  border-radius: var(--r-control);
  padding: 12px 14px;
  background: var(--raised);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.banner.is-error { background: #3a1512; color: var(--crema); }

/* Wide window in landscape (laptop, monitor): picture as tall as the window allows, people at its right. */
@media (min-width: 820px) and (min-aspect-ratio: 5/4) {
  .live-body {
    grid-template-columns: minmax(0, calc((100dvh - 225px) * 16 / 9)) clamp(170px, 18vw, 250px);
    grid-template-rows: auto 1fr;
    justify-content: center;
  }
  .stage { grid-column: 1; grid-row: 1 / span 2; width: 100%; }
  .tiles {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-content: start;
    max-height: calc(100dvh - 275px);
    overflow-y: auto;
  }
  .live-extra { grid-column: 2; grid-row: 2; justify-self: stretch; }
  .live-note { text-align: left; }
  /* Five or more people: the side column takes two columns of tiles; the picture gives up a little width. */
  .live-body[data-crowd='many'] {
    grid-template-columns: minmax(0, calc((100dvh - 225px) * 16 / 9)) clamp(320px, 30vw, 500px);
  }
}

/* Phone on its side (or any very short window): no logo, thin bars, the picture takes the height. */
@media (orientation: landscape) and (max-height: 520px) {
  body[data-view='view-live'] .brand { display: none; }
  body[data-view='view-live'] main { padding-top: 2px; padding-bottom: 4px; }
  .live { gap: 6px; padding-top: 2px; }
  .live-body { grid-template-columns: minmax(0, calc((100dvh - 118px) * 16 / 9)) 150px; gap: 8px; justify-content: center; }
  .stage { width: 100%; }
  .stage { grid-column: 1; grid-row: 1 / span 2; }
  .tiles { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0, 1fr); max-height: calc(100dvh - 118px - 56px); overflow-y: auto; align-content: start; }
  .live-extra { grid-column: 2; grid-row: 2; justify-self: stretch; align-self: end; }
  .hp-switch { min-height: 44px; padding: 4px 10px; gap: 8px; font-size: 0.875rem; }
  .hp-track { display: none; }
  .live-note { display: none; }
  .onair-label { font-size: 1rem; }
  .controls { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); gap: 8px; }
  .controls .btn { min-height: 44px; flex-direction: row; gap: 8px; font-size: 0.875rem; }
}

/* Full screen: the picture fills the screen; people and controls float over it and fade after a few seconds. */
html.lock-scroll, html.lock-scroll body { overflow: hidden; }
.live.is-full {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  width: auto;
  padding: 0;
  background: #000;
}
.live.is-full .live-body { display: block; height: 100%; }
.live.is-full .stage { position: absolute; inset: 0; width: auto; aspect-ratio: auto; border-radius: 0; background: #000; }
.live.is-full .live-extra, .live.is-full .banner[hidden] { display: none; }
.live.is-full .onair, .live.is-full .tiles, .live.is-full .controls, .live.is-full .banner {
  position: absolute;
  z-index: 3;
  transition: opacity 250ms ease;
}
.live.is-full .onair {
  top: calc(10px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(7, 17, 5, 0.72);
}
.live.is-full .banner { top: calc(54px + env(safe-area-inset-top)); left: 12px; right: 12px; }
.live.is-full .tiles {
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  max-width: calc(100% - 24px);
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  overflow-x: auto;
  max-height: none;
}
.live.is-full .tile { flex: none; width: clamp(120px, 16vw, 180px); outline: 1px solid rgba(247, 250, 223, 0.5); outline-offset: -1px; }
/* Small floating tiles: the name goes on top so it never fights the level bars or the initial. */
.live.is-full .tile-name { top: 6px; bottom: auto; left: 6px; max-width: calc(100% - 44px); font-size: 0.75rem; padding: 1px 6px; }
.live.is-full .tile-initial { font-size: 1.4rem; }
.live.is-full .tile-mute { top: 4px; right: 4px; width: 22px; height: 22px; }
.live.is-full .controls {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.72) 100%);
}
.live.is-full .controls .btn { min-height: 52px; background: rgba(28, 55, 22, 0.88); }
@media (min-width: 600px) {
  .live.is-full .controls .btn { flex-direction: row; gap: 8px; }
}
.live.is-full .controls .btn[aria-pressed='true'] { background: var(--crema); }
.live.is-full .controls .btn-danger { background: rgba(7, 17, 5, 0.88); }
.live.is-full .stage-level { bottom: calc(96px + env(safe-area-inset-bottom)); left: calc(12px + env(safe-area-inset-left)); }
@media (max-width: 599px) {
  /* Narrow window: buttons stack icon over label (taller), so the floating bits sit higher. */
  .live.is-full .tiles { bottom: calc(124px + env(safe-area-inset-bottom)); }
  .live.is-full .stage-level { bottom: calc(132px + env(safe-area-inset-bottom)); }
}
.live.is-full[data-idle='true'] { cursor: none; }
.live.is-full[data-idle='true'] .onair,
.live.is-full[data-idle='true'] .tiles,
.live.is-full[data-idle='true'] .controls,
.live.is-full[data-idle='true'] .stage-level { opacity: 0; pointer-events: none; }
@media (orientation: landscape) and (max-height: 520px) {
  .live.is-full .controls { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); padding-top: 18px; }
  .live.is-full .controls .btn { min-height: 44px; }
  .live.is-full .tiles { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .live.is-full .stage-level { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---------- host panel ---------- */

.host-grid { display: grid; gap: 20px; padding-top: 10px; }
@media (min-width: 980px) {
  .host-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item {
  background: var(--raised);
  border-radius: var(--r-control);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}
.item-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.item-name { font-weight: 680; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: 0.9375rem; }
.item .row .btn { flex: 1 1 auto; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 640;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.chip[data-tone='live'] { background: var(--live); color: var(--ink); }
.chip[data-tone='open'] { background: var(--lima); color: var(--ink); }
.chip[data-tone='wait'] { background: #e8e1a2; color: var(--ink); }
.chip[data-tone='off'] { background: transparent; border: 1px solid var(--line); }

.copy-field { display: flex; gap: 8px; align-items: stretch; }
.copy-field input { font-size: 0.9375rem; min-width: 0; }

.empty { color: var(--muted); padding: 6px 0; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form-grid .two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) {
  .form-grid .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  min-height: 48px; display: grid; place-content: center; border-radius: 12px;
  border: 1px solid var(--line); background: var(--noche); cursor: pointer; font-weight: 620; text-align: center;
}
.segmented input:checked + label { background: var(--lima); color: var(--ink); border-color: var(--lima); }
.segmented input:focus-visible + label { outline: 3px solid var(--crema); outline-offset: 3px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(92vw, 30rem);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--crema);
  color: var(--ink);
  font-weight: 620;
  z-index: 20;
}

.login { max-width: 26rem; padding-top: 24px; display: grid; gap: 18px; }

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

/* ---------- OBS viewer: transparent, no UI ---------- */

body.obs { background: transparent; min-height: 0; overflow: hidden; }
body.obs video { position: fixed; inset: 0; width: 100vw; height: 100vh; object-fit: cover; background: transparent; }
