/* UltraSync: paginas del sitio (inicio e invitacion). Tokens, temas y la
   fuente vienen de /ext/ui/tokens.css: los mismos de la extension. */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--us-ground); }
body {
  margin: 0;
  overflow-x: clip;
  min-height: 100vh;
  background: var(--us-ground);
  color: var(--us-text);
  font: 600 16px/1.55 var(--us-font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ol, ul { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.us-i { flex: none; display: block; }

.page { position: relative; z-index: 1; width: min(100% - 32px, 1040px); margin: 0 auto; padding: 24px 0 64px; }
.page.narrow { width: min(100% - 32px, 480px); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; letter-spacing: -.01em; text-decoration: none; }
.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--us-action);
  color: var(--us-on-action);
}

.card {
  background: var(--us-card);
  border-radius: var(--us-radius-xl);
  box-shadow: var(--us-shadow);
  padding: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  background: var(--us-surface);
  color: var(--us-text);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, transform .35s var(--us-ease-out);
}
.btn:hover { background: color-mix(in srgb, var(--us-surface) 88%, var(--us-text)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--us-action); color: var(--us-on-action); }
.btn.primary:hover { background: color-mix(in srgb, var(--us-action) 86%, #fff); }
.btn:disabled { cursor: default; transform: none; background: var(--us-surface); color: var(--us-text-2); }
.btn.block { width: 100%; }

.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid var(--us-border);
  background: var(--us-card);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  transition: border-color .15s;
}
.input::placeholder { color: var(--us-text-2); opacity: 1; }
.input:focus { border-color: var(--us-action); }
.input[aria-invalid="true"] { border-color: var(--us-warn); }
.input.code { font-size: 22px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.input.code::placeholder { letter-spacing: .18em; }

.muted { color: var(--us-text-2); }
.hint { font-size: 14px; font-weight: 600; color: var(--us-text-2); }
.hint.err { color: var(--us-warn); font-weight: 800; }

code {
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--us-surface);
  font: 800 .88em/1.4 var(--us-font);
  white-space: nowrap;
}
.copy {
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--us-surface);
  font-size: 13px;
  font-weight: 800;
  transition: background-color .15s;
}
.copy:hover { background: color-mix(in srgb, var(--us-surface) 85%, var(--us-text)); }

/* Pasos de instalacion: aqui el orden si importa. */
.steps { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--us-surface);
  font-size: 14px;
  font-weight: 900;
}

/* ------------------------------------------------------------ encabezado */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-end { display: flex; align-items: center; gap: 8px; }
.top .btn { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 12px; }

/* Idioma: un segmentado chico, la opcion activa se vuelve tarjeta. */
.lang { display: flex; padding: 4px; border-radius: 14px; background: var(--us-surface); }
.lang button {
  height: 34px;
  min-width: 40px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--us-text-2);
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.lang button:hover { color: var(--us-text); }
.lang button[aria-pressed="true"] { background: var(--us-card); color: var(--us-text); box-shadow: var(--us-shadow); }

/* Tema: el sol se va hacia arriba y entra la luna (y al reves). */
.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--us-surface);
  color: var(--us-text);
  transition: background-color .15s, transform .35s var(--us-ease-out);
}
.theme-btn:hover { background: color-mix(in srgb, var(--us-surface) 88%, var(--us-text)); }
.theme-btn:active { transform: scale(.94); }
.theme-btn > span { grid-area: 1 / 1; display: grid; transition: transform .5s var(--us-ease-out), opacity .3s; }
:root:not([data-theme="noche"]) .theme-btn .moon { transform: translateY(130%) rotate(-50deg); opacity: 0; }
:root[data-theme="noche"] .theme-btn .sun { transform: translateY(-130%) rotate(70deg); opacity: 0; }

/* El tema nuevo se abre en circulo desde el boton (site.js); sin fundido. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* La luz tibia de la escena (el horizonte del atardecer) sigue al mouse: es
   luz, no color propio. */
:root { --glow: rgba(232, 163, 97, .24); }
:root[data-theme="noche"] { --glow: rgba(232, 163, 97, .11); }
.glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s;
}
.glow.on { opacity: 1; }

/* El cursor de Vale (inicio.js): su color en la flecha y en la etiqueta, con
   texto oscuro encima, como todo relleno de color de persona. */
.buddy { position: fixed; left: 0; top: 0; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .3s; will-change: transform; }
.buddy.on { opacity: 1; }
.buddy-arrow { display: block; margin: -3px 0 0 -4px; transform: rotate(var(--tilt, 0deg)); transform-origin: 4px 3px; filter: drop-shadow(0 2px 3px rgba(31, 25, 21, .3)); }
.buddy-arrow path { fill: var(--who-fill); stroke: #1f1915; stroke-width: 1.5; stroke-linejoin: round; }
.buddy-label { position: absolute; left: 15px; top: 19px; display: flex; align-items: center; gap: 4px; }
.buddy-name, .buddy-ms {
  padding: 3px 10px 4px;
  border-radius: 999px;
  color: #1f1915;
  box-shadow: var(--us-shadow);
  font-size: 12px;
  white-space: nowrap;
}
.buddy-name { background: var(--who-fill); font-weight: 900; }
/* El chip del desfase: verde cerca, amarillo a media distancia, rojo lejos.
   Es el unico rojo del sistema, a pedido: dice "muy desfasado", no "error". */
.buddy-ms { padding-inline: 8px; background: #6fd39a; font-weight: 800; transition: background-color .25s, transform .3s var(--us-ease-out); }
.buddy-ms[data-level="mid"] { background: #f5c451; }
.buddy-ms[data-level="far"] { background: #ff6b6b; transform: scale(1.06); }

/* Lo que falta escribir al cambiar de idioma (site.js): su trazo, tenue. */
.ink-ghost { opacity: .16; }

/* La reaccion que sale al hacer clic (resorte, como la del video). */
.pop-react { position: fixed; z-index: 60; translate: -50% -50%; font-size: 34px; line-height: 1; pointer-events: none; animation: pop-up 1.7s both; }
.pop-react.from-buddy { font-size: 27px; }
@keyframes pop-up {
  0% { opacity: 0; transform: scale(.3); animation-timing-function: var(--us-ease-spring); }
  18% { opacity: 1; transform: scale(1); animation-timing-function: var(--us-ease-out); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -150px) scale(.9); }
}

/* ------------------------------------------------------------ inicio */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 40px;
  align-items: center;
  margin-top: 48px;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 58px); font-weight: 900; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.hero h1 .w { display: inline-block; }
.lead { margin-top: 18px; max-width: 34em; font-size: 18px; font-weight: 600; color: var(--us-text-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }
.cta .meta { font-size: 14px; font-weight: 700; color: var(--us-text-2); }

.have { margin-top: 28px; padding: 18px; max-width: 440px; }
.have h2 { font-size: 16px; font-weight: 900; }
.code-row { display: flex; gap: 8px; margin-top: 12px; }
.code-row .input { flex: 1; min-width: 0; }
.have .hint { margin-top: 8px; font-size: 13px; }

/* Entrada: las palabras de a una; "al mismo segundo" llega desalineado y se
   alinea cuando las pantallas se sincronizan (inicio.js, SYNC_AT). */
.motion .top { animation: fade-in .6s ease-out both; }
.motion .hero h1.intro .w { animation: word-in .7s var(--us-ease-out) calc(80ms + var(--i, 0) * 55ms) both; }
/* "mismo segundo": lo mueve inicio.js (headline), separado y despues junto. */
.motion .hero h1.intro .w.split { animation: none; opacity: 0; }
.motion .hero-copy > .lead { animation: rise .7s var(--us-ease-out) .45s both; }
.motion .hero-copy > .cta { animation: rise .7s var(--us-ease-out) .55s both; }
.motion .hero-copy > .have { animation: rise .7s var(--us-ease-out) .65s both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes word-in { from { opacity: 0; transform: translateY(.45em); filter: blur(8px); } }
/* La rueda entre las dos partes: gira en ambar mientras sincroniza; al
   juntarse pasa a un visto verde y salen dos ondas. */
.hero h1 { position: relative; }
.sync-wheel { position: absolute; width: .58em; height: .58em; translate: -50% -50%; display: grid; place-items: center; pointer-events: none; transition: opacity .4s; }
.sync-wheel .us-i { grid-area: 1 / 1; width: 100%; height: 100%; }
.sync-wheel .spin { color: var(--us-warn); animation: spin 1.1s linear infinite; transition: opacity .2s, scale .25s; }
.sync-wheel.done .spin { opacity: 0; scale: .5; }
/* Las letras sueltas mientras pasa la onda verde (inicio.js, letterWave). */
.hero h1 .ch { display: inline-block; }
.sync-ring { position: absolute; inset: 0; border: 2px solid var(--us-ok); border-radius: 50%; opacity: 0; }
.sync-wheel.done .sync-ring { animation: sync-ring 1s var(--us-ease-out) both; }
.sync-wheel.done .sync-ring + .sync-ring { animation-delay: .16s; }
.sync-wheel.gone { opacity: 0; }
.sync-wheel.tight .spin { display: none; }
@keyframes sync-ring { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(4.2); } }

/* La escena: dos pantallas de la misma sala, cada una en su casa. */
.stage { position: relative; aspect-ratio: 1; perspective: 1500px; }
.stage-light {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 163, 97, .38), rgba(184, 101, 91, .16) 58%, transparent);
  filter: blur(28px);
  pointer-events: none;
}
:root[data-theme="noche"] .stage-light { background: radial-gradient(closest-side, rgba(232, 163, 97, .26), rgba(75, 63, 99, .26) 58%, transparent); }
/* El contenedor 3D no recibe clics: asi la pantalla de atras (que queda tras
   su plano) tambien se puede tocar. */
.stage-inner { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.stage-inner .screen { pointer-events: auto; }
.screen {
  position: absolute;
  width: 74%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background: #1d2238;
  box-shadow: var(--us-shadow-lift);
}
.screen.back { right: 0; top: 2%; transform: translateZ(-46px); }
.screen.front { left: 0; bottom: 2%; transform: translateZ(40px); }
.motion .stage.intro .screen.front { animation: in-front .95s var(--us-ease-out) .1s both; }
.motion .stage.intro .screen.back { animation: in-back .95s var(--us-ease-out) .22s both; }
.motion .stage.intro .sync-pill { animation: fade-in .5s ease-out .7s both; }
@keyframes in-front { from { opacity: 0; translate: -44px 56px; } }
@keyframes in-back { from { opacity: 0; translate: 44px -44px; } }

/* El "video": un atardecer dibujado. El sol se pone con el avance del video,
   asi dos pantallas en el mismo segundo muestran el mismo cuadro. */
.vid { position: absolute; inset: 0; background: linear-gradient(180deg, #2c3456 0%, #4b3f63 44%, #b8655b 72%, #e8a361 100%); }
.vid .sun {
  position: absolute;
  left: 46%;
  top: 10%;
  width: 21%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f7c77a;
}
.vid .sea { position: absolute; left: 0; right: 0; bottom: 0; height: 36%; overflow: hidden; background: #1d2238; }
.vid .sea i {
  position: absolute;
  left: -48px;
  right: -48px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(247, 199, 122, .5) 0 18px, transparent 18px 48px);
}
.vid .sea i:first-child { top: 16%; }
.vid .sea i:last-child { top: 38%; opacity: .45; }
.vid .bar { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .28); }
.vid .bar span { position: absolute; inset: 0; border-radius: inherit; background: #fff; transform-origin: left; transform: scaleX(.36); }

/* Lo de encima del video: tarjeta Noche al 95 %, como el overlay de verdad. */
.who, .s-dock, .s-msg .bubble, .s-float .tag, .pause-tag, .pause-mark { background: color-mix(in srgb, #26201b 95%, transparent); color: #f5ece3; }
.who { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.who .av { width: 22px; height: 22px; font-size: 12px; }
.who b { color: var(--who-ink); font-weight: 900; }

.s-dock {
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .65);
}
.s-sync { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 36px; padding: 3px 0 6px; margin-bottom: 2px; border-bottom: 1px solid #3d342c; color: #b9aa9b; }
.s-sync b { color: #f5ece3; font-size: 13px; font-weight: 900; line-height: 1.1; }
.s-sync small { font-size: 11px; font-weight: 700; line-height: 1; }
.s-sync i { width: 7px; height: 7px; margin-bottom: 1px; border-radius: 50%; background: #6fd39a; transition: background-color .3s; }
.s-sync.far i { background: #f5c451; animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.s-dock > .dock-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #f5ece3; transition: background-color .15s, transform .2s var(--us-ease-out); }
.s-dock > .dock-btn.on { background: var(--us-action); color: #1f1915; }
.s-dock > .dock-btn:active { transform: scale(.88); }

.s-feed { position: absolute; left: 10px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 72%; }
.s-msg { display: flex; align-items: flex-end; gap: 6px; animation: msg-in .45s var(--us-ease-out) both; }
.s-msg.out { animation: msg-out .3s ease-in both; }
.s-msg .av { width: 22px; height: 22px; font-size: 12px; }
.s-msg .bubble {
  padding: 5px 10px 6px;
  border-radius: 16px 16px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -10px rgba(0, 0, 0, .65);
}
.s-msg .bubble b { display: block; font-size: 11px; font-weight: 900; color: var(--who-ink); }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes msg-out { to { opacity: 0; transform: translateY(-6px); } }

/* La reaccion que sube (momento firma: entra con el resorte). */
.s-floats { position: absolute; inset: 0; pointer-events: none; }
.s-float { position: absolute; right: 60px; bottom: 26%; display: flex; flex-direction: column; align-items: center; gap: 3px; animation: float-up 2.9s both; }
.s-float .e { font-size: 27px; line-height: 1; }
.s-float .tag { display: flex; align-items: center; gap: 4px; padding: 2px 7px 2px 2px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.s-float .tag .av { width: 16px; height: 16px; font-size: 11px; }
.s-float .tag b { color: var(--who-ink); }
@keyframes float-up {
  0% { opacity: 0; transform: translateY(22px) scale(.35); animation-timing-function: var(--us-ease-spring); }
  16% { opacity: 1; transform: translateY(0) scale(1); animation-timing-function: var(--us-ease-out); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(8px, -104px) scale(.9); }
}

.pause { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pause.on { opacity: 1; }
.pause-mark { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 5px; transform: scale(.8); transition: transform .35s var(--us-ease-out); }
.pause.on .pause-mark { transform: none; }
.pause-mark i { width: 5px; height: 16px; border-radius: 999px; background: #f5ece3; }
.pause-tag { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }

/* El aviso entre las dos pantallas: sincronizando -> en sincronia. */
.sync-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  transform: translateZ(90px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  background: var(--us-card);
  color: var(--us-text);
  box-shadow: var(--us-shadow-lift);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.sp-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--us-surface); color: var(--us-warn); transition: color .3s; }
.sync-pill:not(.locked) .sp-icon svg { animation: spin 1.1s linear infinite; }
.sync-pill.locked .sp-icon { color: var(--us-ok); }
.sync-pill.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--us-ok); animation: ring .9s var(--us-ease-out) both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { from { opacity: .9; } to { opacity: 0; transform: scale(1.3, 1.9); } }

/* Las pantallas se pueden abrir (inicio.js, demoMode): se nota al pasar. */
.stage .screen { cursor: pointer; transition: scale .35s var(--us-ease-out); }
.stage .screen:hover { scale: 1.025; }
.stage-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  color: var(--us-text-2);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

/* ------------------------------------------------------------ la demo */

/* Una pantalla abierta en grande, sobre una capa oscura (es el mundo del
   video: siempre Noche). La otra pantalla queda al lado, en chico. */
:root.demo-lock { overflow: hidden; }
.demo { position: fixed; inset: 0; z-index: 70; display: grid; align-items: safe center; justify-items: center; padding: 16px; overflow-y: auto; }
.demo-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 13, .92); }
/* La pantalla abierta a la izquierda (tan grande como deje el alto de la
   ventana) y al costado la de la otra persona y la ayuda. */
.demo-box {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, auto) 260px;
  grid-template-areas: "head head" "big side";
  justify-content: center;
  gap: 14px 22px;
}
.demo-head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-big { grid-area: big; width: min(820px, calc((100dvh - 120px) * 1.6)); max-width: 100%; }
.demo-title { color: #f5ece3; font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.demo-close { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, #26201b 95%, transparent); color: #f5ece3; transition: background-color .15s, transform .35s var(--us-ease-out); }
.demo-close:hover { background: #3d342c; }
.demo-close:active { transform: scale(.94); }
.demo-foot { grid-area: side; display: flex; flex-direction: column; gap: 18px; }
.demo-hint { max-width: 34em; color: #e7dacb; font-size: 15px; font-weight: 700; text-wrap: pretty; }
.demo-pip { order: -1; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.demo-pip-label { color: #b9aa9b; font-size: 13px; font-weight: 800; }

.screen.in-demo { position: relative; inset: auto; width: 100%; transform: none; scale: none; cursor: default; }
.screen.big { border-radius: 24px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 20px 40px -14px rgba(0, 0, 0, .75); }
.screen.big .vid { cursor: pointer; }

/* La caja de escribir y la bandeja de reacciones salen del dock con el resorte. */
.s-compose, .s-tray { display: none; }
.screen.big.chat-open .s-compose { display: flex; }
.screen.big.tray-open .s-tray { display: grid; }
.s-compose {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  width: min(520px, 64%);
  align-items: center;
  gap: 6px;
  padding: 5px 5px 5px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, #26201b 95%, transparent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 20px 40px -14px rgba(0, 0, 0, .75);
  cursor: default;
  animation: pop-in .32s var(--us-ease-spring) both;
}
.s-input { flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; color: #f5ece3; font: 700 15px/1 var(--us-font); outline: none; }
.s-input::placeholder { color: #b9aa9b; opacity: 1; }
.s-send { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--us-action); color: #1f1915; transition: transform .2s var(--us-ease-out); }
.s-send:active { transform: scale(.88); }
.s-tray {
  position: absolute;
  right: 74px;
  top: 50%;
  translate: 0 -50%;
  grid-template-columns: repeat(4, 50px);
  gap: 4px;
  padding: 8px;
  border-radius: 24px;
  background: color-mix(in srgb, #26201b 95%, transparent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 20px 40px -14px rgba(0, 0, 0, .75);
  cursor: default;
  transform-origin: right center;
  animation: pop-in .32s var(--us-ease-spring) both;
}
.s-emoji { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 27px; line-height: 1; transition: background-color .15s, transform .2s var(--us-ease-out); }
.s-emoji:hover { background: #2f2822; }
.s-emoji:active { transform: scale(.88); }
@keyframes pop-in { from { opacity: 0; transform: translateX(8px) scale(.9); } }

/* En grande, el overlay con sus medidas de verdad (en pantallas anchas). */
@media (min-width: 641px) {
  .screen.big .who { left: 16px; top: 16px; gap: 8px; padding: 4px 12px 4px 4px; font-size: 14px; }
  .screen.big .who .av { width: 28px; height: 28px; font-size: 15px; }
  .screen.big .s-dock { right: 16px; padding: 6px; }
  .screen.big .s-dock > .dock-btn { width: 42px; height: 42px; }
  .screen.big .s-dock > .dock-btn svg { width: 20px; height: 20px; }
  .screen.big .s-sync { width: 42px; }
  .screen.big .s-sync b { font-size: 15px; }
  .screen.big .s-feed { left: 20px; bottom: 34px; gap: 8px; max-width: min(440px, 46%); }
  .screen.big.chat-open .s-feed { bottom: 92px; }
  .screen.big .s-msg .av { width: 28px; height: 28px; font-size: 15px; }
  .screen.big .s-msg .bubble { padding: 8px 14px 9px; border-radius: 20px 20px 20px 6px; font-size: 15px; }
  .screen.big .s-msg .bubble b { font-size: 13px; }
  .screen.big .s-float { right: 96px; }
  .screen.big .s-float .e { font-size: 46px; }
  .screen.big .s-float .tag { padding: 3px 10px 3px 3px; font-size: 12px; }
  .screen.big .s-float .tag .av { width: 22px; height: 22px; font-size: 12px; }
  .screen.big .pause-mark { width: 64px; height: 64px; gap: 7px; }
  .screen.big .pause-mark i { width: 7px; height: 22px; }
  .screen.big .pause-tag { padding: 4px 12px; font-size: 13px; }
  .screen.big .vid .bar { left: 20px; right: 20px; bottom: 14px; height: 5px; }
}
@media (max-width: 860px) {
  .demo-box { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "big" "side"; }
  .demo-big { width: 100%; }
  .demo-foot { gap: 12px; }
  .demo-pip { order: 0; width: min(300px, 62%); align-self: flex-end; }
}
@media (max-width: 640px) {
  .demo { align-items: start; padding-top: 24px; }
  .demo-hint { font-size: 14px; }
  .screen.big.chat-open .s-feed { bottom: 64px; }
  .s-compose { bottom: 14px; width: 82%; padding: 3px 3px 3px 12px; }
  .s-input { height: 32px; font-size: 14px; }
  .s-send { width: 32px; height: 32px; }
  .s-tray { right: 44px; grid-template-columns: repeat(4, 34px); gap: 2px; padding: 5px; border-radius: 18px; }
  .s-emoji { width: 34px; height: 34px; border-radius: 10px; font-size: 20px; }
}

/* avatares (los mismos de la extension) */
.av {
  /* El color es el de la persona (--who-fill, puesto en el avatar o en su
     mensaje); sin persona, el propio. */
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--who-fill, var(--us-action)) 30%, #26201b);
  box-shadow: inset 0 0 0 2px var(--who-fill, var(--us-action));
  line-height: 1;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 40px 56px;
  align-items: start;
  margin-top: 104px;
}
.features > h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 900; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.features dl { margin: 0; }
.features dl > div { padding: 20px 0; border-top: 1px solid var(--us-border); }
.features dl > div:first-child { padding-top: 4px; border-top: 0; }
.features dt { font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.features dd { margin: 4px 0 0; max-width: 34em; color: var(--us-text-2); }
.features dd a { color: inherit; font-weight: 800; text-underline-offset: 3px; }
/* El titulo acompana a su lista mientras se recorre. */
@media (min-width: 861px) { .features > h2 { position: sticky; top: 40px; } }

/* Cada funcion con un pedacito de la extension funcionando al lado. */
.feature-list > .feature { display: grid; grid-template-columns: 208px 1fr; gap: 24px; align-items: center; padding: 22px 0; }
.feature-list > .feature:first-child { padding-top: 4px; }
.fx { position: relative; height: 128px; overflow: hidden; border-radius: 20px; }
.fx-rows, .fx-code, .fx-look { background: var(--us-card); box-shadow: var(--us-shadow); }

.fx-rows { display: flex; flex-direction: column; justify-content: center; padding: 2px 12px; }
.fx-row { display: flex; align-items: center; gap: 8px; height: 40px; }
.fx-row + .fx-row { border-top: 1px solid var(--us-border); }
.fx-row .av { width: 26px; height: 26px; font-size: 14px; background: color-mix(in srgb, var(--who-fill) 24%, var(--us-card)); }
.fx-name { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; }
.fx-name b { color: var(--who-ink); font-weight: 900; }
.fx-me { margin-left: 5px; color: var(--us-text-2); font-size: 12px; font-weight: 800; }
.fx-ms { display: flex; flex-direction: column; align-items: flex-end; color: var(--us-ok); font-size: 12px; font-weight: 800; line-height: 1.15; }
.fx-ms b { font-size: 14px; font-weight: 900; }
.fx-ms small { color: var(--us-text-2); font-size: 11px; font-weight: 700; }
.fx-ctl { display: flex; align-items: center; gap: 4px; color: var(--us-text-2); font-size: 12px; font-weight: 800; }

.fx-chat { background: linear-gradient(180deg, #2c3456 0%, #4b3f63 48%, #b8655b 78%, #e8a361 100%); box-shadow: var(--us-shadow); }
.fx-chat .sun { position: absolute; right: 20%; top: 26%; width: 34px; height: 34px; border-radius: 50%; background: #f7c77a; }
.fx-chat .sea { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #1d2238; }
.fx-feed { position: absolute; left: 8px; bottom: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.fx-floats { position: absolute; inset: 0; pointer-events: none; }
.fx-floats .s-float { right: 16px; bottom: 28%; }

.fx-code { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fx-letters { display: flex; font-size: 34px; font-weight: 900; letter-spacing: .1em; line-height: 1; }
.fx-letters span { display: inline-block; animation: letter-in .55s var(--us-ease-spring) calc(var(--k, 0) * 70ms) both; }
@keyframes letter-in { from { opacity: 0; transform: translateY(12px) scale(.5); } }
.fx-lock { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--us-surface); color: var(--us-text-2); transform: scale(.85); transition: background-color .3s, color .3s, transform .4s var(--us-ease-out); }
.fx-code.locked .fx-lock { background: var(--us-action); color: var(--us-on-action); transform: none; }

.fx-look { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.fx-av { width: 56px; height: 56px; font-size: 27px; background: color-mix(in srgb, var(--who-fill) 24%, var(--us-card)); box-shadow: inset 0 0 0 3px var(--who-fill); transition: background-color .4s, box-shadow .4s; }
.fx-av.pop { animation: pop .5s var(--us-ease-out); }
@keyframes pop { 40% { transform: scale(1.08); } }
.fx-swatches { display: flex; gap: 7px; }
.fx-swatches i { width: 12px; height: 12px; border-radius: 50%; background: var(--who-fill); box-shadow: 0 0 0 2px var(--us-card); transition: box-shadow .3s, transform .3s var(--us-ease-out); }
.fx-swatches i.on { box-shadow: 0 0 0 2px var(--us-card), 0 0 0 4px var(--who-fill); transform: scale(1.1); }

/* Al llegar a una lista, sus filas aparecen en orden. Sin JS se ven igual. */
.motion [data-reveal] { transition: opacity .6s var(--us-ease-out), transform .8s var(--us-ease-out), filter .6s var(--us-ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.motion [data-reveal]:not(.seen) { opacity: 0; transform: translateY(22px); filter: blur(4px); }

.install { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; margin-top: 88px; padding: 32px; }
.install h2 { font-size: 26px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.install > div > p { margin-top: 10px; color: var(--us-text-2); }
.install .btn { margin-top: 20px; }
.install .other { margin-top: 14px; }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--us-text-2);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  cursor: pointer;
}
.link:hover { color: var(--us-text); }

.foot { margin-top: 40px; text-align: center; font-size: 13px; font-weight: 700; color: var(--us-text-2); }
.foot a { color: inherit; text-underline-offset: 3px; }
.foot a:hover { color: var(--us-text); }

/* ------------------------------------------------------------ privacidad */

.legal-page { width: min(100% - 32px, 720px); }
.legal { margin-top: 28px; padding: 32px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 900; line-height: 1.1; letter-spacing: -.025em; }
.legal .lead { margin-top: 12px; font-size: 17px; }
.legal > .hint { margin-top: 8px; font-size: 13px; }
.legal h2 { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--us-border); font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p, .legal ul { margin-top: 10px; max-width: 38em; font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.legal ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.legal li::marker { color: var(--us-action); }
.legal a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.legal b { font-weight: 800; }

/* ------------------------------------------------------------ invitacion */

.join-card { margin-top: 28px; }
.join-card h1 { font-size: 22px; font-weight: 900; line-height: 1.25; }
.join-card h1 .code { display: block; margin-top: 2px; font-size: 52px; letter-spacing: .1em; line-height: 1.05; }
.join-card .lead { margin-top: 10px; font-size: 16px; }
.join-card .section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--us-border); }
.join-card .section h2 { font-size: 16px; font-weight: 900; margin-bottom: 14px; }
.join-card .steps { font-size: 15px; }
.join-card .btn.block { margin-top: 4px; }

.me-row { display: flex; align-items: center; gap: 12px; }
.me-row .av { width: 52px; height: 52px; font-size: 27px; background: color-mix(in srgb, var(--who-fill) 24%, var(--us-card)); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; font-size: 13px; font-weight: 800; color: var(--us-text-2); }
.field .input { color: var(--us-text); }
.form { display: flex; flex-direction: column; gap: 12px; }
.status { font-size: 15px; font-weight: 700; }
.status.ok { color: var(--us-ok); }
.status.err { color: var(--us-warn); font-weight: 800; }

/* ------------------------------------------------------------ angosto */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; margin-top: 36px; }
  .stage { width: min(100%, 520px); justify-self: center; }
  .features { grid-template-columns: 1fr; gap: 20px; margin-top: 72px; }
  .install { grid-template-columns: 1fr; gap: 20px; padding: 24px; margin-top: 64px; }
}
@media (max-width: 560px) {
  .feature-list > .feature { grid-template-columns: 1fr; gap: 14px; }
  .fx { max-width: 340px; }
  .top .get-top { display: none; }
}
@media (max-width: 480px) {
  .card { padding: 20px; }
  .have { padding: 16px; }
  .screen { border-radius: 16px; }
  .who { left: 7px; top: 7px; padding-right: 8px; font-size: 11px; }
  .who .av { width: 18px; height: 18px; font-size: 11px; }
  .s-dock { right: 6px; padding: 4px; }
  .s-dock > .dock-btn { width: 24px; height: 24px; }
  .s-dock > .dock-btn svg { width: 13px; height: 13px; }
  .s-sync { width: 30px; }
  .s-feed { left: 7px; bottom: 18px; gap: 4px; }
  .s-msg .av { width: 18px; height: 18px; font-size: 11px; }
  .s-msg .bubble { padding: 4px 8px 5px; font-size: 11px; }
  .s-float .e { font-size: 23px; }
  .s-float { right: 44px; }
  .sync-pill { font-size: 12px; padding: 5px 12px 5px 5px; }
  .join-card h1 .code { font-size: 44px; }
}

/* Movimiento reducido: fundidos en vez de recorridos (inicio.js tampoco
   inclina la escena ni pone la clase .motion). */
@media (prefers-reduced-motion: reduce) {
  .s-compose, .s-tray { animation: fade-in .2s ease-out both; }
  .stage .screen { transition: none; }
  .s-msg { animation: fade-in .3s ease-out both; }
  .s-msg.out { animation: fade-out .3s ease-out both; }
  .s-float { animation: float-fade 2.6s ease-out both; }
  .fx-letters span, .fx-av.pop { animation: fade-in .2s ease-out both; }
  .s-sync.far i, .sync-pill .sp-icon svg { animation: none !important; }
  .theme-btn > span { transition: opacity .2s; transform: none !important; }
  .pop-react { animation: float-fade 1.4s ease-out both; }
  @keyframes fade-out { to { opacity: 0; } }
  @keyframes float-fade { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
}

/* ------------------------------------------------------------ planes */

.plans-hero { margin-top: 56px; max-width: 720px; }
.plans-hero h1 { font-size: clamp(34px, 4.6vw, 50px); font-weight: 900; line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.price-grid.three { grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.price { padding: 24px; }
.price h2 { font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.price h2 small { margin-left: 6px; font-size: 14px; font-weight: 800; color: var(--us-text-2); letter-spacing: 0; }
.price .amount { margin-top: 10px; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.price .amount small { font-size: 15px; font-weight: 800; color: var(--us-text-2); letter-spacing: 0; }
.price > p:last-child { margin-top: 8px; color: var(--us-text-2); }
.plans-rules { margin-top: 36px; max-width: none; }
.features dd a { color: inherit; font-weight: 800; text-underline-offset: 3px; }

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