/* ==========================================================================
   ConectaRD — sistema de diseño
   La bandera como sistema: azul #002D62, rojo #CE1126 y la cruz blanca.
   El sitio es claro; la sala de video es oscura (.theme-dark).
   ========================================================================== */

:root {
  /* Bandera */
  --blue: #002d62;
  --blue-hi: #0a3f82;
  --red: #ce1126;
  --red-hi: #e1263b;
  --white: #ffffff;

  /* Tema claro (sitio) */
  --bg: #f8f6f1;
  --bg-2: #ffffff;
  --surface: #efebe2;
  --surface-2: #e4ded1;
  --surface-3: #d6cebe;
  --line: rgba(0, 45, 98, 0.12);
  --line-2: rgba(0, 45, 98, 0.22);
  --text: #0b1f42;
  --text-2: rgba(11, 31, 66, 0.74);
  --text-3: rgba(11, 31, 66, 0.52);
  --green: #1f9e66;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --cross: 14px; /* grosor de la cruz blanca */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1280px;
}

.theme-dark {
  --bg: #061226;
  --bg-2: #081830;
  --surface: #0d2242;
  --surface-2: #122b52;
  --surface-3: #1a3663;
  --line: rgba(236, 228, 214, 0.09);
  --line-2: rgba(236, 228, 214, 0.17);
  --text: #f1ece2;
  --text-2: rgba(241, 236, 226, 0.7);
  --text-3: rgba(241, 236, 226, 0.46);
  --green: #41b883;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grano de papel muy sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon { flex: none; }

/* ---------- Tipografía ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
}

/* Palabra resaltada con un bloque de color, como un sello */
.mark {
  background: var(--red);
  color: #fff;
  padding: 0 0.12em;
  margin: 0 -0.04em;
  border-radius: 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mark--blue { background: var(--blue); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 34em; margin: 0; }

/* ---------- Marca ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand__mark {
  width: 22px; height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.brand__mark i { display: block; }
.brand__mark i:nth-child(1), .brand__mark i:nth-child(4) { background: var(--blue); }
.brand__mark i:nth-child(2), .brand__mark i:nth-child(3) { background: var(--red); }
.brand b { font-weight: 700; color: var(--red); }
.theme-dark .brand b, .on-color .brand b { color: #fff; }
.on-color .brand__mark { box-shadow: none; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 550;
  font-size: 15px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .icon { transition: transform 0.2s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(3px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hi); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-hi); }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); }
.btn--white.on-blue { color: var(--blue); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-3); background: rgba(0, 45, 98, 0.04); }
.theme-dark .btn--ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn--outline-white { border: 1.5px solid rgba(255, 255, 255, 0.55); color: #fff; }
.btn--outline-white:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { opacity: 0.9; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header del sitio ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; color: var(--text-2); }
.site-nav__links { display: flex; gap: 28px; }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav__actions { display: flex; gap: 8px; align-items: center; }

@media (max-width: 760px) {
  .site-nav__links { display: none; }
  .site-nav__actions .btn--ghost { display: none; }
}

/* ==========================================================================
   Hero: la bandera como retícula
   ========================================================================== */

.hero { padding: 8px 0 clamp(40px, 6vw, 72px); }

.flag {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: var(--cross);
}
.flag__q {
  position: relative;
  border-radius: var(--r-lg);
  color: #fff;
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
}
.flag__q--blue { background: var(--blue); }
.flag__q--red { background: var(--red); }
.flag__q .eyebrow { color: rgba(255, 255, 255, 0.66); }
.flag__q .lead { color: rgba(255, 255, 255, 0.84); }

/* Cuadrante 1 — azul: titular */
.flag__q--main {
  overflow: visible;
  z-index: 2;
  min-height: clamp(480px, 62vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.hero__title { font-size: clamp(50px, 7vw, 108px); }
.hero__title .mark { padding: 0 0.1em 0.04em; }

/* Cuadrante 2 — rojo: el mapa */
.flag__q--map {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: clamp(24px, 3vw, 40px);
}
.flag__q--map .rd-map { margin: auto -4% 0; width: 108%; }

.route-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 14.5px;
  font-weight: 550;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.route-chip.is-hidden { opacity: 0; transform: translateY(6px); }
.route-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(31, 158, 102, 0.18); }
.route-chip .sep { color: rgba(0, 45, 98, 0.45); font-weight: 400; }

/* Cuadrante 3 — rojo: llamada a la acción */
.flag__q--cta { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.flag__q--cta h2 { font-size: clamp(34px, 3.6vw, 52px); }
.flag__q--cta .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cuadrante 4 — azul: datos rápidos */
.flag__q--facts { display: grid; align-content: center; gap: 0; padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(20px, 3vw, 36px); }
.fact { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.fact:last-child { border-bottom: 0; }
.fact__icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1);
}
.fact strong { display: block; font-weight: 600; font-size: 16px; }
.fact small { display: block; color: rgba(255, 255, 255, 0.66); font-size: 14px; }

/* El escudo en el centro de la cruz: un sello que gira */
.seal {
  position: absolute;
  right: calc(-1 * var(--cross) / 2);
  bottom: calc(-1 * var(--cross) / 2);
  transform: translate(50%, 50%);
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 var(--cross) var(--bg);
  z-index: 3;
}
.seal__ring { position: absolute; inset: 6px; animation: spin 22s linear infinite; }
.seal__ring text {
  font-family: var(--font-mono);
  font-size: 9.4px;
  font-weight: 500;
  fill: var(--blue);
  text-transform: uppercase;
}
.seal .brand__mark { width: 40px; height: 40px; gap: 5px; border-radius: 8px; box-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .flag { grid-template-columns: minmax(0, 1fr); }
  .flag__q--main { min-height: 0; padding-bottom: 72px; }
  .seal { right: 50%; transform: translate(50%, 50%); width: 96px; height: 96px; }
  .seal .brand__mark { width: 30px; height: 30px; gap: 4px; }
  .flag__q--map { padding-top: 64px; }
}

/* ---------- Mapa de RD ---------- */

.rd-map { width: 100%; height: auto; overflow: visible; }
.rd-map .prov {
  fill: var(--surface);
  stroke: var(--bg);
  stroke-width: 1.4;
  stroke-linejoin: round;
  transition: fill 0.5s var(--ease);
}
.rd-map .prov.is-lit { fill: var(--surface-3); }
.rd-map .prov.is-active { fill: var(--red); }
.rd-map--interactive .prov { cursor: pointer; }
.rd-map--interactive .prov:hover { fill: var(--surface-2); }

.rd-map .route {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: route-draw 1.4s var(--ease) forwards;
}
.rd-map__pins .is-out { opacity: 0; transition: opacity 0.5s ease; }
.rd-map .pin { fill: var(--text); }
.rd-map .pin-ring {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 1.8s var(--ease) infinite;
}

/* Mapa sobre rojo (portada) */
.on-red .rd-map .prov { fill: rgba(255, 255, 255, 0.16); stroke: var(--red); stroke-width: 1.6; }
.on-red .rd-map .prov.is-lit { fill: rgba(255, 255, 255, 0.34); }
.on-red .rd-map .prov.is-active { fill: #fff; }
.on-red .rd-map .route { stroke: #fff; stroke-width: 2.2; }
.on-red .rd-map .pin { fill: var(--blue); }
.on-red .rd-map .pin-ring { stroke: #fff; }

/* Mapa sobre azul (registro) */
.on-blue .rd-map .prov { fill: rgba(255, 255, 255, 0.1); stroke: var(--blue); stroke-width: 1.6; }
.on-blue .rd-map--interactive .prov:hover { fill: rgba(255, 255, 255, 0.24); }
.on-blue .rd-map .prov.is-active { fill: var(--red); }

@keyframes route-draw { to { stroke-dashoffset: 0; } }
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Cintas en movimiento ---------- */

.tapes { position: relative; padding: clamp(28px, 4vw, 48px) 0; overflow: hidden; }
.tape {
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  color: #fff;
}
.tape--blue { background: var(--blue); transform: rotate(-1.2deg); position: relative; z-index: 2; margin: 0 -2%; }
.tape--red { background: var(--red); transform: rotate(0.7deg); margin: 6px -2% 0; }
.tape__track { display: inline-flex; animation: tape 70s linear infinite; will-change: transform; }
.tape--red .tape__track { animation-duration: 55s; animation-direction: reverse; }
.tape__track span {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 44px;
}
.tape__track span::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(45deg);
}
.tape--red .tape__track span::after { background: #fff; }
.tapes:hover .tape__track { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */

.section { padding: clamp(72px, 10vw, 132px) 0; }
.section__head { display: flex; flex-direction: column; gap: 18px; }
.section__title { font-size: clamp(40px, 5.4vw, 72px); color: var(--blue); }

.steps {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.steps__head { position: sticky; top: 112px; align-self: start; }
.steps__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--blue); }
.step {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 6px 20px;
  padding: 30px 0 32px;
  border-bottom: 1px solid var(--line-2);
}
.step__n {
  grid-row: span 2;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--red);
}
.step:nth-child(even) .step__n { color: var(--blue); }
.step h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
.step p { margin: 0; color: var(--text-2); max-width: 36em; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .steps__head { position: static; }
  .step { grid-template-columns: 56px minmax(0, 1fr); }
  .step__n { font-size: 40px; }
}

/* Seguridad */

.safety {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--blue);
  color: #fff;
  padding: clamp(32px, 6vw, 80px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
}
.safety::before {
  /* franja roja lateral */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  background: var(--red);
}
.safety .eyebrow { color: rgba(255, 255, 255, 0.6); }
.safety .lead { color: rgba(255, 255, 255, 0.82); }
.safety__copy { display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 1; }
.safety__title { font-size: clamp(42px, 5.6vw, 76px); }
.safety__list { list-style: none; margin: 0; padding: 0; display: grid; align-content: center; gap: 4px; position: relative; z-index: 1; }
.safety__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.safety__list li:last-child { border-bottom: 0; }
.safety__list .fact__icon { margin-top: -2px; }
.safety__list strong { display: block; font-weight: 600; }
.safety__list small { display: block; color: rgba(255, 255, 255, 0.68); font-size: 14.5px; margin-top: 2px; }

@media (max-width: 860px) { .safety { grid-template-columns: 1fr; } }

/* Cierre a todo el ancho, en rojo */

.closing {
  background: var(--red);
  color: #fff;
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
  overflow: hidden;
}
.closing::before,
.closing::after {
  /* la cruz blanca, cruzando la sección */
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.09);
}
.closing::before { left: 50%; top: 0; bottom: 0; width: var(--cross); transform: translateX(-50%); }
.closing::after { top: 50%; left: 0; right: 0; height: var(--cross); transform: translateY(-50%); }
.closing__inner { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.closing__title { font-size: clamp(48px, 8vw, 120px); max-width: 11ch; }
.closing__rotator { display: inline-block; min-width: 4ch; text-align: left; color: var(--blue); background: #fff; padding: 0 0.14em; border-radius: 0.08em; }
.closing .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Footer */

.site-footer { background: var(--blue); color: rgba(255, 255, 255, 0.7); padding: 36px 0 44px; font-size: 14px; }
.site-footer .brand { color: #fff; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a:hover { color: #fff; }

/* ---------- Formularios ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field__label { font-size: 14px; font-weight: 550; color: var(--text-2); }
.field__hint { font-size: 13px; color: var(--text-3); }
.field__error { font-size: 13px; color: var(--red); font-weight: 500; }
.field.has-error .input, .field.has-error .select { border-color: var(--red); }

.input, .select {
  height: 52px;
  width: 100%;
  padding: 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover { border-color: rgba(0, 45, 98, 0.36); }
.input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 45, 98, 0.1); }
.theme-dark .input:hover, .theme-dark .select:hover { border-color: rgba(255, 255, 255, 0.28); }
.theme-dark .input:focus, .theme-dark .select:focus { border-color: var(--text); background: var(--surface); box-shadow: none; }
.input[type="date"] { color-scheme: light; }
.theme-dark .input[type="date"] { color-scheme: dark; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23002d62' stroke-opacity='.7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.select option, .select optgroup { background: var(--bg-2); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text-2);
  transition: all 0.15s var(--ease);
}
.chip:hover span { border-color: var(--text-3); color: var(--text); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.theme-dark .chip span { background: transparent; }
.theme-dark .chip input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform 0.12s var(--ease);
}
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--text-3); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.alert {
  padding: 14px 16px;
  border-radius: var(--r);
  font-size: 14px;
  background: rgba(206, 17, 38, 0.08);
  color: var(--red);
  border: 1px solid rgba(206, 17, 38, 0.2);
}
.alert--info { background: rgba(0, 45, 98, 0.06); color: var(--blue); border-color: var(--line-2); }
.alert code { font-family: var(--font-mono); font-size: 12.5px; }

.btn-google { background: var(--bg-2); color: #1f1f1f; border: 1px solid var(--line-2); }
.btn-google:hover { border-color: var(--text-3); box-shadow: 0 6px 16px -10px rgba(0, 45, 98, 0.4); }

/* ---------- Páginas de cuenta ---------- */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth__aside {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--blue);
  color: #fff;
  padding: 32px clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
}
.auth__aside::after {
  /* franja roja inferior */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: var(--red);
}
.auth__aside .eyebrow { color: rgba(255, 255, 255, 0.6); }
.auth__aside-map { margin: 0 -6%; }
.auth__aside-caption { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.auth__province-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.4vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1;
  min-height: 1em;
}
.auth__province-name.is-empty { color: rgba(255, 255, 255, 0.4); }
.auth__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px var(--gutter) 56px;
}
.auth__top { width: 100%; max-width: 460px; display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.auth__back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--text-2); }
.auth__back:hover { color: var(--text); }
.auth__form { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 20px; margin-top: clamp(28px, 6vh, 64px); }
.auth__title { font-size: clamp(38px, 4vw, 52px); color: var(--blue); }
.auth__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth__foot { text-align: center; font-size: 14px; color: var(--text-3); }
.auth__foot a { color: var(--blue); font-weight: 550; }
.auth__mobile-brand { display: none; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__row { grid-template-columns: 1fr; }
  .auth__mobile-brand { display: inline-flex; }
}

/* Páginas sencillas (allauth: errores, cierre de sesión, etc.) */
.plain { min-height: 100dvh; display: flex; flex-direction: column; }
.plain__top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.plain__body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 520px; padding: 48px 0 96px; gap: 20px; }
.plain__body h1 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1; margin: 0; color: var(--blue); }
.plain__body p { margin: 0; color: var(--text-2); }
.plain__body form { display: flex; flex-direction: column; gap: 16px; }
.plain__body button[type="submit"], .plain__body .btn-like {
  align-self: flex-start;
  height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 550;
}

/* Páginas legales */
.legal { max-width: 720px; padding: 40px 0 96px; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1; margin: 8px 0 8px; color: var(--blue); }
.legal h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; margin: 24px 0 0; color: var(--text); }
.legal p, .legal li { color: var(--text-2); }
.legal ul, .legal ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); }
.legal__nav { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-3); }

/* ---------- Mensajes (toasts) ---------- */

.flash-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.flash {
  pointer-events: auto;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5);
  animation: flash-in 0.3s var(--ease), flash-out 0.4s ease 4.2s forwards;
}
.flash--error { background: var(--red); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes flash-out { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }

/* ==========================================================================
   Sala de video (tema oscuro)
   ========================================================================== */

.room-body { overflow: hidden; height: 100dvh; }

.room {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto minmax(0, 1fr) 88px;
  grid-template-areas:
    "top   top"
    "stage chat"
    "bar   chat";
  gap: 0 12px;
  padding: 0 12px;
}
.room.chat-closed { grid-template-columns: minmax(0, 1fr) 0; gap: 0; }
.room.chat-closed .chat { display: none; }

/* Cabecera = mitad superior de la bandera. El fondo blanco asoma como la cruz. */
.room__top {
  grid-area: top;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 -12px 14px;
  padding-bottom: 10px;
  background: #fff;
}
.room__half { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px; color: #fff; }
.room__half--blue { background: var(--blue); }
.room__half--red { background: var(--red); justify-content: flex-end; }
.room__seal {
  position: absolute;
  left: 50%;
  top: calc(64px + 5px);
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  z-index: 2;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
}
.room__seal .brand__mark { width: 24px; height: 24px; gap: 3px; box-shadow: none; }

.room__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
}
.room__status .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.room[data-state="connected"] .room__status .dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2); }
.room[data-state="searching"] .room__status .dot { background: #fbbf24; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.me { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.me__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--red);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.me__name { display: flex; flex-direction: column; line-height: 1.15; }
.me__name strong { font-weight: 600; font-size: 14.5px; }
.me__name small { font-size: 12.5px; opacity: 0.8; }
.me button {
  height: 34px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  border: 1.5px solid rgba(255, 255, 255, 0.55); color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.me button:hover { background: #fff; color: var(--red); border-color: #fff; }

/* Escenario */

.stage {
  grid-area: stage;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  isolation: isolate;
}
.stage__remote { position: absolute; inset: 0; background: #000; }
.stage__remote video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* El placeholder tapa el video hasta que llega imagen (o si la otra persona apaga la cámara) */
.stage.has-remote .stage__placeholder { opacity: 0; pointer-events: none; }
.stage__placeholder { transition: opacity 0.3s var(--ease); }
.unmute {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6);
}
.unmute[hidden] { display: none; }
.room[data-state="offline"] .room__status .dot { background: #f87171; }

.stage__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 55% at 30% 30%, rgba(0, 45, 98, 0.55), transparent 70%),
    radial-gradient(60% 50% at 75% 80%, rgba(206, 17, 38, 0.18), transparent 70%),
    var(--bg-2);
}
.stage__placeholder-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.avatar {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  border: 5px solid #fff;
}
/* Ondas, como si la persona estuviera hablando */
.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  animation: wave 2.4s var(--ease) infinite;
}
.avatar::after { animation-delay: 1.2s; }
@keyframes wave { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.7); opacity: 0; } }
.stage__placeholder small { color: var(--text-3); font-size: 13px; }

.searching {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  background: radial-gradient(90% 75% at 50% 38%, #0b4a96 0%, var(--blue) 55%, #001a3d 100%);
  color: #fff;
  transition: opacity 0.4s var(--ease);
}
.searching [data-search-map] { width: min(640px, 86%); }
.searching .rd-map .prov { fill: rgba(255, 255, 255, 0.1); stroke: var(--blue); stroke-width: 1.6; }
.searching .rd-map .prov.is-lit { fill: rgba(255, 255, 255, 0.32); }
.searching .rd-map .pin { fill: var(--red); }
.searching .rd-map .pin-ring { stroke: #fff; stroke-width: 2; }
.searching__text { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.searching__title { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.035em; }
.searching__sub {
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}
.room[data-state="connected"] .searching { opacity: 0; pointer-events: none; }

.peer {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.room[data-state="connected"] .peer { opacity: 1; transform: none; }
.peer__map { width: 58px; height: 40px; }
.peer__map .rd-map .prov { stroke: rgba(0, 45, 98, 0.18); stroke-width: 1; fill: rgba(0, 45, 98, 0.18); }
.peer__map .rd-map .prov.is-active { fill: var(--red); stroke: var(--red); }
.peer__label { display: flex; flex-direction: column; line-height: 1.2; }
.peer__label small { font-size: 12px; color: rgba(0, 45, 98, 0.6); }
.peer__label strong { font-family: var(--font-display); font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }

.self {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: clamp(120px, 18%, 220px);
  aspect-ratio: 3 / 4;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
}
.self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.self__off {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}
.self__initial {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  border: 3px solid #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  margin-bottom: 4px;
}
.self.is-off video { visibility: hidden; }
.self.is-off .self__off { display: flex; }
.self__off button { font-size: 12.5px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.self__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 18, 38, 0.7);
  color: var(--text-2);
}

.bar { grid-area: bar; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar__group { display: flex; align-items: center; gap: 8px; }

.ctl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  position: relative;
}
.ctl:hover { background: var(--surface-2); }
.ctl.is-off { background: var(--red); color: #fff; border-color: var(--red); }
.ctl.is-active { background: #fff; color: var(--blue); border-color: #fff; }

/* Controles centrales agrupados en una barra flotante */
.dock {
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.dock .ctl { background: transparent; border-color: transparent; }
.dock .ctl:hover { background: rgba(255, 255, 255, 0.08); }
.dock .ctl.is-off { background: var(--red); border-color: var(--red); }
.dock .ctl.is-active { background: #fff; border-color: #fff; }
.ctl .icon-off { display: none; }
.ctl.is-off .icon-on { display: none; }
.ctl.is-off .icon-off { display: block; }
.ctl--report:hover { color: var(--red-hi); }
.ctl__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--surface);
  display: none;
}
.ctl.has-unread .ctl__badge { display: block; }
.ctl--filters { width: auto; border-radius: 999px; padding: 0 18px 0 16px; display: inline-flex; gap: 10px; font-size: 14px; font-weight: 500; }
.ctl--filters small { color: var(--text-3); font-weight: 400; }

.next {
  height: 56px;
  padding: 0 14px 0 26px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.02em;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.next:hover { background: var(--red-hi); }
.next:active { transform: scale(0.98); }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
}

.chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 12px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.chat__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.chat__title { display: flex; flex-direction: column; gap: 2px; }
.chat__head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.chat__title small { font-size: 12.5px; color: var(--text-3); }
.chat__close { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.chat__close:hover { color: var(--text); background: var(--surface); }
.chat__log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
.msg { max-width: 82%; padding: 9px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; animation: msg-in 0.22s var(--ease); }
.msg--them { align-self: flex-start; background: #f4efe6; color: var(--blue); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 6px; }
.msg + .msg--them, .msg + .msg--me { margin-top: 2px; }
.msg--sys { align-self: center; max-width: 100%; background: none; color: var(--text-3); font-size: 12.5px; text-align: center; padding: 10px 0; }
.msg--sys strong { color: var(--text); font-weight: 600; }
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } }

.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__form .input { height: 46px; border-radius: 999px; padding: 0 18px; font-size: 14.5px; background: var(--surface); border-color: var(--line); }
.chat__send { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; transition: opacity 0.15s; }
.chat__send:disabled { opacity: 0.3; cursor: default; }

.pop {
  position: absolute;
  bottom: 96px;
  left: 12px;
  z-index: 30;
  width: min(360px, calc(100vw - 24px));
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pop[hidden] { display: none; }
.pop__title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.pop .chip span { height: 38px; padding: 0 15px; font-size: 14px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 9, 20, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal__card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modal-in 0.25s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal__title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.modal__text { margin: -8px 0 0; color: var(--text-2); font-size: 14.5px; }
.reasons { display: flex; flex-direction: column; gap: 8px; }
.reason { position: relative; }
.reason input { position: absolute; opacity: 0; }
.reason span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.reason span::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--text-3); }
.reason:hover span { border-color: var(--text-3); }
.reason input:checked + span { border-color: var(--text); background: rgba(255, 255, 255, 0.05); }
.reason input:checked + span::after { border: 5px solid var(--red); }
.reason input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; }

.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  z-index: 60;
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 14.5px;
  font-weight: 550;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .room {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) 80px;
    grid-template-areas: "top" "stage" "bar";
    padding: 0 8px;
  }
  .room.chat-closed { grid-template-columns: minmax(0, 1fr); }
  .room__top { margin: 0 -8px 10px; gap: 8px; padding-bottom: 8px; }
  .room__half { height: 58px; padding: 0 14px; }
  .room__seal { top: calc(58px + 4px); width: 42px; height: 42px; }
  .room__seal .brand__mark { width: 20px; height: 20px; }
  .room__status { display: none; }
  .me__name { display: none; }
  .me button { height: 32px; padding: 0 14px; }
  .dock { padding: 0; background: none; border: 0; }
  .dock .ctl { background: var(--surface); border-color: var(--line); }
  .next .icon { display: none; }
  .bar { gap: 8px; }
  .bar__group { gap: 6px; }
  .chat {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 92px;
    height: min(58dvh, 460px);
    z-index: 25;
    margin: 0;
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, 0.8);
  }
  /* Pantalla dividida: la otra persona arriba, tú abajo */
  .stage { background: none; border: 0; border-radius: 0; overflow: visible; }
  .stage__remote,
  .searching {
    inset: 0 0 calc(50% + 4px) 0;
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .self {
    inset: calc(50% + 4px) 0 0 0;
    width: auto;
    aspect-ratio: auto;
    border-radius: var(--r-lg);
    box-shadow: none;
    border-color: var(--line);
  }
  .self__tag { left: 12px; bottom: 12px; font-size: 12.5px; padding: 4px 10px; }
  .peer { top: 26px; left: 10px; }
  .avatar { width: 92px; height: 92px; font-size: 38px; border-width: 4px; }
  .stage__placeholder small { font-size: 12px; }
  .searching { gap: 14px; padding: 16px; }
  .searching [data-search-map] { width: 78%; }
  .searching__title { font-size: 24px; }
  .ctl { width: 46px; height: 46px; }
  .ctl--filters small, .ctl--filters .label { display: none; }
  .ctl--filters { width: 46px; padding: 0; justify-content: center; }
  .next { height: 52px; padding: 0 18px; font-size: 16px; }
  .next .kbd { display: none; }
  .pop { bottom: 92px; left: 8px; }
}
@media (max-width: 370px) {
  .bar__group { gap: 4px; }
  .ctl { width: 42px; height: 42px; }
  .ctl--filters { width: 42px; }
  .next { padding: 0 14px; }
}

/* Movimiento reducido: se suavizan las transiciones, pero las cintas y el sello siguen
   moviéndose (son lentos y forman parte de la identidad). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg, .modal__card, .flash { animation-duration: 0.01ms; }
  .tape__track { animation-duration: 110s; }
  .tape--red .tape__track { animation-duration: 90s; }
}
