/* Estilos del sitio. Orden: base de marca, recorridos, demos interactivos y página. */
/* Base de marca compartida por las variantes. Móvil primero. */
:root {
  --bg: #060A1E; --surface: #0C1336; --surface-2: #131B48;
  --line: rgba(148,163,255,.16); --line-strong: rgba(148,163,255,.3);
  --text: #EDEFFA; --text-2: #B4BBDD; --text-3: #8B93BC;
  --accent: #F5B04B; --accent-hover: #FFC46B; --accent-ink: #060A1E; --brand: #6D86FF;
  --ease-out: cubic-bezier(.23,1,.32,1); --ease-in-out: cubic-bezier(.77,0,.175,1);
  --radius: 20px; --wrap: 1180px; --gutter: clamp(18px, 4vw, 32px);
  --display: Sora, ui-sans-serif, system-ui, sans-serif;
  --nav-h: 60px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F6F7FC; --surface: #FFFFFF; --surface-2: #E9EDFB;
  --line: #DDE2F4; --line-strong: #C3CAE8;
  --text: #0E1330; --text-2: #4A5070; --text-3: #6B7193;
  --accent: #4F6DF5; --accent-hover: #3A55D9; --accent-ink: #FFFFFF; --brand: #4F6DF5;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 Manrope, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; min-width: 320px; -webkit-tap-highlight-color: transparent; }
@media (min-width: 768px) { body { font-size: 17px; } :root { --nav-h: 68px; } }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.025em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
ul, ol { list-style: none; margin: 0; padding: 0; }
dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--text-2); }

/* Botones: pill, 48px mínimo para dedo */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15.5px; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-quiet { border: 1px solid var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-quiet:hover { border-color: var(--accent); }
}

/* Navegación */
.nav { position: sticky; top: 0; z-index: 30; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav img { height: 26px; width: auto; }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
@media (min-width: 768px) { .nav img { height: 30px; } }

/* Fragmentos de contenido compartidos */
.steps { display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; counter-increment: s; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); border: 1px solid var(--line-strong); color: var(--accent); }
.steps strong { font: 700 17px/1.3 var(--display); letter-spacing: -.01em; }
.steps span { color: var(--text-2); font-size: 15px; }
.gets { display: grid; gap: 10px; }
.gets li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.gets i { color: var(--accent); font-size: 20px; line-height: 1.25; flex: none; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.case-kind { font-size: 13px; font-weight: 600; color: var(--accent); }
.case h4 { font-size: 21px; }
.case > p { color: var(--text-2); font-size: 15.5px; }
.case dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.case dt { font: 700 clamp(20px, 5.5vw, 28px)/1 var(--display); letter-spacing: -.03em; }
.case dd { font-size: 12.5px; line-height: 1.35; color: var(--text-3); margin-top: 6px; }
.case .case-note { font-size: 12px; color: var(--text-3); }
.always { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.always li { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--text-2); }
.always i { font-size: 26px; color: var(--accent); }
.always strong { font: 700 16px var(--display); color: var(--text); }
@media (min-width: 900px) { .always { grid-template-columns: repeat(4, 1fr); } }

/* Ilustraciones vectoriales */
.art { width: 100%; height: auto; overflow: visible; }
.art .f { fill: var(--surface); } .art .f2 { fill: var(--surface-2); }
.art .a { fill: var(--accent); } .art .b { fill: var(--brand); }
.art .s { stroke: var(--line-strong); stroke-width: 1.5; }
.art .ln { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .la { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .lb { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Pie y contacto */
.foot { padding: clamp(64px, 10vw, 120px) 0 36px; border-top: 1px solid var(--line); }
.foot h2 { font-size: clamp(32px, 6vw, 60px); max-width: 14ch; }
.foot .wrap > p { margin-top: 16px; color: var(--text-2); max-width: 46ch; }
.foot .btn { margin-top: 28px; }
.foot-info { display: grid; gap: 18px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.foot-info dt { font-size: 13px; font-weight: 600; color: var(--text-3); }
.foot-info dd { margin-top: 2px; }
.foot-info a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.foot .foot-legal { margin-top: 40px; font-size: 13px; color: var(--text-3); }
@media (min-width: 768px) { .foot-info { grid-template-columns: repeat(3, 1fr); } .foot .btn { min-height: 54px; padding: 0 28px; font-size: 16.5px; } }

/* ── Ronda 2 ─────────────────────────────────────────────── */
.prov { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.prov h2 { font-size: clamp(26px, 4.4vw, 44px); max-width: 20ch; }
.prov p { margin-top: 14px; color: var(--text-2); max-width: 52ch; }
.prov ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.prov li { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; }
.prov strong { font: 700 clamp(17px, 2.4vw, 24px)/1.15 var(--display); letter-spacing: -.02em; }
.prov span { font-size: 13.5px; color: var(--text-3); }
@media (min-width: 900px) { .prov ul { grid-template-columns: repeat(4, 1fr); } }

.art-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 4vw, 32px); }
.st { display: grid; gap: 24px; }
.st-hurt { font-size: 15px; color: var(--text-3); font-style: italic; }
.st h3 { margin-top: 8px; font-size: clamp(23px, 3.6vw, 34px); }
.st h4 { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 14px; letter-spacing: 0; }
.st-cols { display: grid; gap: 28px; margin: 28px 0; }
@media (min-width: 640px) { .st-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .st { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; } .st-vis { position: sticky; top: calc(var(--nav-h) + 24px); } }
.show { padding: clamp(56px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.show h2, .incl2 h2 { font-size: clamp(28px, 5vw, 52px); max-width: 16ch; }
.show > .wrap > p { margin: 14px 0 36px; color: var(--text-2); max-width: 50ch; }
.incl2 { padding: 0 0 clamp(56px, 9vw, 112px); } .incl2 h2 { margin-bottom: 28px; font-size: clamp(24px, 3.6vw, 36px); }
.vid { margin: clamp(40px, 6vw, 72px) 0 0; display: grid; gap: 14px; }
.vid video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #060A1E; display: block; }
.vid figcaption { display: grid; gap: 4px; } .vid strong { font: 700 20px var(--display); letter-spacing: -.02em; } .vid span { font-size: 14.5px; color: var(--text-2); max-width: 56ch; }

.prov h3 { margin: 32px 0 12px; font: 600 14px Manrope, sans-serif; color: var(--accent); letter-spacing: 0; }
.prov h3 + ul { margin-top: 0; }
@media (min-width: 900px) { .prov ul.three { grid-template-columns: repeat(3, 1fr); } .prov ul.two { grid-template-columns: repeat(2, 1fr); } }
.prov ul.three li:last-child { grid-column: 1 / -1; } @media (min-width: 900px) { .prov ul.three li:last-child { grid-column: auto; } }
/* Video: vertical en teléfono, horizontal en tablet y escritorio. Con preload=none el oculto no descarga nada. */
.vid .v-tall { aspect-ratio: 9 / 16; max-height: 78dvh; width: auto; max-width: 100%; margin-inline: auto; }
.vid .v-wide { display: none; }
@media (min-width: 700px) { .vid .v-tall { display: none; } .vid .v-wide { display: block; } }

/* Recorridos (tours): mini demos animados con datos ficticios.
   Todo se mide en em y el em se ata al ancho de la miniatura (--u), así el demo escala como un video. */
.tour { margin: 0; display: grid; gap: 14px; }
.tour-stage { aspect-ratio: 36 / 26; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; background: radial-gradient(120% 90% at 20% 0%, #DCE3FF 0%, #EEF1FC 45%, #F8E9CF 100%); position: relative; }
.tour figcaption { display: grid; gap: 4px; }
.tour figcaption strong { font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.tour figcaption > span { font-size: 13.5px; color: var(--text-3); }
.tour-caps { display: grid; gap: 4px; margin-top: 8px; font-size: 14px; color: var(--text-3); counter-reset: c; }
.tour-caps li { display: flex; gap: 8px; counter-increment: c; transition: color 300ms ease; }
.tour-caps li::before { content: counter(c); font-weight: 700; width: 1.1em; }
.tour-caps li.on { color: var(--text); } .tour-caps li.on::before { color: var(--accent); }
.tour.bare figcaption { display: none; }

/* --u = 1/36 del ancho de la miniatura; lo pone tours.js con ResizeObserver. Antes se usaban unidades
   de contenedor (cqw) y el navegador se quedaba congelado más de un segundo al entrar la sección a pantalla. */
.tf { font-size: var(--u, clamp(7px, 2.4vw, 12px)); font-family: Manrope, sans-serif; line-height: 1.3; color: #0E1330; background: #fff; border-radius: 1em; box-shadow: 0 1.6em 4em -1.6em rgba(14,19,48,.45), 0 0 0 .08em rgba(14,19,48,.06); overflow: hidden; position: relative; text-align: left; }
.tf * { box-sizing: border-box; }
.tf.desk { width: 32em; height: 21.5em; display: grid; grid-template-rows: 2em 1fr; }
.tf.phone { width: 12.6em; height: 23.4em; border-radius: 1.8em; border: .35em solid #0E1330; display: grid; grid-template-rows: auto 1fr; }
.t-top { display: flex; align-items: center; gap: .4em; padding: 0 .9em; background: #F4F6FE; border-bottom: .08em solid #E6E9F8; }
.t-top i { width: .55em; height: .55em; border-radius: 50%; background: #C9CFE8; }
.t-top b { margin-left: .6em; font-size: .78em; color: #7A80A0; font-weight: 600; }
.t-body { display: grid; grid-template-columns: 6em 1fr; min-height: 0; }
.t-side { background: #0E1330; padding: 1em .8em; display: grid; gap: .6em; align-content: start; }
.t-side span { height: .55em; border-radius: .3em; background: rgba(255,255,255,.18); }
.t-side span:first-child { background: #F5B04B; width: 70%; }
.t-main { padding: 1em 1.1em; display: grid; gap: .8em; align-content: start; min-width: 0; }
.t-h { font: 700 1.05em Sora, sans-serif; letter-spacing: -.02em; }
.t-sub { font-size: .72em; color: #7A80A0; }
.t-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; }
.t-kpi { border: .08em solid #E6E9F8; border-radius: .7em; padding: .6em .7em; }
.t-kpi b { display: block; font: 700 1.25em Sora, sans-serif; letter-spacing: -.03em; }
.t-kpi span { font-size: .66em; color: #7A80A0; }
.t-bars { display: flex; align-items: flex-end; gap: .5em; height: 4.6em; padding: 0 .2em; border-bottom: .08em solid #E6E9F8; }
.t-bars i { flex: 1; border-radius: .3em .3em 0 0; background: #C9D3FF; transform-origin: bottom; }
.t-bars i.hi { background: #4F6DF5; }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .55em .7em; border: .08em solid #E6E9F8; border-radius: .7em; font-size: .78em; font-weight: 600; }
.t-row small { display: block; font-weight: 500; color: #7A80A0; font-size: .86em; }
.t-pill { flex: none; padding: .25em .7em; border-radius: 9em; font-size: .9em; font-weight: 700; background: #FFF1D6; color: #9A5B00; white-space: nowrap; }
.t-pill.ok { background: #DDF6EA; color: #0E7A4D; }
.t-pill.blue { background: #E4E9FF; color: #3A55D9; }
.t-btn { display: grid; place-items: center; height: 2.6em; border-radius: 9em; background: #4F6DF5; color: #fff; font-weight: 700; font-size: .82em; }
/* Teléfono */
.t-ph { padding: 1.5em .9em .7em; font: 700 .95em Sora, sans-serif; border-bottom: .08em solid #E6E9F8; display: flex; align-items: center; gap: .5em; }
.t-ph i { font-size: 1.2em; color: #4F6DF5; }
.t-pb { padding: .8em; display: grid; gap: .6em; align-content: start; min-height: 0; }
.t-photo { height: 6.4em; border-radius: .8em; background: linear-gradient(135deg, #8FA3FF, #4F6DF5 60%, #0E1330); display: grid; place-items: center; color: #fff; font-size: 1em; position: relative; overflow: hidden; }
.t-photo i { font-size: 2em; }
.t-photo .flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.t-chat { background: #EFEAE2; }
.t-bub { max-width: 86%; padding: .5em .7em; border-radius: .9em; font-size: .74em; background: #fff; justify-self: start; border-bottom-left-radius: .2em; }
.t-bub.me { justify-self: end; background: #D9FDD3; border-radius: .9em; border-bottom-right-radius: .2em; }
.t-bub.sys { justify-self: center; background: #0E1330; color: #fff; font-weight: 700; font-size: .68em; border-radius: 9em; display: flex; gap: .4em; align-items: center; }
.t-dots { display: inline-flex; gap: .25em; } .t-dots i { width: .4em; height: .4em; border-radius: 50%; background: #9AA0BC; }
.t-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3em; text-align: center; font-size: .68em; font-weight: 700; }
.t-days span { padding: .5em 0; border-radius: .6em; border: .08em solid #E6E9F8; }
.t-days span.on { background: #0E1330; color: #fff; border-color: #0E1330; }
.t-slots { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; font-size: .74em; font-weight: 600; text-align: center; }
.t-slots span { padding: .55em 0; border-radius: .6em; border: .08em solid #E6E9F8; }
.t-slots span.off { color: #C3CAE8; text-decoration: line-through; }
.t-slots span.pick { background: #4F6DF5; color: #fff; border-color: #4F6DF5; }
.t-done { position: absolute; inset: 0; background: #fff; display: grid; place-content: center; justify-items: center; gap: .5em; text-align: center; padding: 1em; font-size: .82em; font-weight: 600; }
.t-done i { font-size: 3em; color: #1FA971; } .t-done b { font: 700 1.2em Sora, sans-serif; }
/* Pasos y auditoría */
.t-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; font-size: .68em; font-weight: 700; color: #9AA0BC; position: relative; }
.t-steps span { padding-top: .9em; border-top: .25em solid #E6E9F8; transition: color 300ms ease, border-color 300ms ease; }
.t-steps span.on { color: #0E1330; border-color: #4F6DF5; }
.t-row.best { border-color: #4F6DF5; background: #F2F5FF; }
.t-audit { display: grid; grid-template-columns: 9em 1fr; gap: 1em; align-items: center; }
.t-ring { position: relative; display: grid; place-items: center; }
.t-ring svg { width: 8.4em; height: 8.4em; transform: rotate(-90deg); }
.t-ring b { position: absolute; font: 800 2.2em Sora, sans-serif; letter-spacing: -.04em; }
.t-checks { display: grid; gap: .4em; font-size: .78em; font-weight: 600; }
.t-checks li { display: flex; align-items: center; justify-content: space-between; padding: .42em .7em; border: .08em solid #E6E9F8; border-radius: .6em; }
.t-checks i { font-size: 1.3em; color: #1FA971; } .t-checks li.warn i { color: #E08A00; }

/* Galería de recorridos */
.tours-grid { display: grid; gap: 28px; }
@media (min-width: 700px) { .tours-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (min-width: 1100px) { .tours-grid { grid-template-columns: repeat(3, 1fr); } }

/* Demos interactivos. Se ven como una app clara sin importar el tema de la página.
   Objetivos táctiles de 44px o más. */
.tour-stage { cursor: default; }
.tour-view { width: 100%; height: 100%; display: grid; place-items: center; }
.tour-try { position: absolute; right: 12px; bottom: 12px; z-index: 2; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #0E1330; color: #fff; font: 700 14px Manrope, sans-serif; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 28px -8px rgba(14,19,48,.7); transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.tour-try i { font-size: 18px; }
.tour-try:active { transform: scale(.96); }
.tour-stage:has(.tour-try) { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tour-stage:hover .tour-try { background: #4F6DF5; } }

/* Ventana del demo: en teléfono ocupa toda la pantalla; en escritorio, marco + guía lateral */
dialog.demo { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100dvh; position: fixed; inset: 0; overflow: hidden; background: #F1F3FB; color: #0E1330; font: 500 15px/1.45 Manrope, sans-serif; color-scheme: light; }
dialog.demo::backdrop { background: rgba(6,10,30,.7); backdrop-filter: blur(6px); }
.demo-in { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.demo-side { padding: 10px 12px 10px 16px; background: #fff; border-bottom: 1px solid #E6E9F8; display: grid; gap: 8px; }
.demo-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-title strong { display: block; font: 700 17px/1.2 Sora, sans-serif; letter-spacing: -.02em; }
.demo-title small { font-size: 12px; color: #7A80A0; font-weight: 600; }
.demo-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #0E1330; background: #F1F3FB; flex: none; }
.demo-hint, .demo-foot, .g-steps li:not(.now), .g-end { display: none; }
.g-count { margin: 0; font-size: 12px; font-weight: 700; color: #4F6DF5; }
.demo-guide { display: grid; gap: 6px; }
.demo-guide .d-bar { height: 5px; }
.g-steps { list-style: none; margin: 0; padding: 0; }
.g-steps li { font: 700 15px/1.3 Sora, sans-serif; letter-spacing: -.01em; }
.demo-stage { min-height: 0; display: grid; }
@media (prefers-reduced-motion: no-preference) {
  dialog.demo[open] { animation: demoUp 440ms cubic-bezier(.32,.72,0,1) both; }
  dialog.demo[open]::backdrop { animation: demoFade 300ms ease both; }
  dialog.demo.closing { animation: demoDown 220ms ease-in both; }
}
@keyframes demoUp { from { transform: translateY(100%); } }
@keyframes demoDown { to { transform: translateY(100%); } }
@keyframes demoFade { from { opacity: 0; } }

.demo.fin .g-end { display: block; margin: 0; font-size: 13.5px; font-weight: 700; color: #0E7A4D; }
.demo.fin .demo-foot { display: flex; gap: 8px; } .demo.fin .demo-foot .btn { flex: 1; background: #4F6DF5; color: #fff; min-height: 44px; }
.demo.fin .g-steps { display: none; }

/* Marco del dispositivo */
.dv { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #fff; overflow: hidden; container-type: inline-size; }
.dv-chrome { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #E9ECF7; }
.dv-web .dv-chrome > i { width: 10px; height: 10px; border-radius: 50%; background: #C3CAE8; }
.dv-web .dv-chrome > span { flex: 1; margin-left: 8px; padding: 5px 12px; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: #4A5070; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-phone .dv-chrome { justify-content: space-between; background: #fff; padding: 6px 20px 2px; font-size: 13px; }
.dv-phone .dv-chrome span { display: flex; gap: 5px; font-size: 16px; }
.dv-app { position: relative; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.dv-phone .dv-app { grid-template-rows: auto minmax(0, 1fr) auto; }
.dv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #E6E9F8; flex-wrap: wrap; }
.dv-head strong { font: 700 16px Sora, sans-serif; letter-spacing: -.02em; }
[data-id="whatsapp"] .dv-head { background: #0A6B5C; color: #fff; border: 0; }
.dv-top { display: flex; padding: 3px; border-radius: 999px; background: rgba(14,19,48,.08); }
[data-id="whatsapp"] .dv-top { background: rgba(255,255,255,.2); }
.dv-top button { min-height: 36px; padding: 0 13px; border-radius: 999px; font: 700 13px Manrope, sans-serif; color: inherit; opacity: .75; transition: background-color 200ms ease, opacity 200ms ease; }
.dv-top button[aria-pressed="true"] { background: #fff; color: #0E1330; opacity: 1; box-shadow: 0 1px 4px rgba(14,19,48,.18); }
.dv-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 12px; border-bottom: 1px solid #E6E9F8; }
.dv-nav::-webkit-scrollbar { display: none; }
.dv-nav button { flex: none; min-height: 44px; padding: 0 13px; border-radius: 12px; display: inline-flex; align-items: center; gap: 7px; font: 600 14px Manrope, sans-serif; color: #4A5070; white-space: nowrap; position: relative; transition: background-color 200ms ease, color 200ms ease; }
.dv-nav button i { font-size: 20px; }
.dv-nav button[aria-current="true"] { background: #EEF1FE; color: #2F3F99; }
.dv-nav button.pulse::after { content: ""; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #F5B04B; box-shadow: 0 0 0 0 rgba(245,176,75,.7); animation: dvPulse 1.4s ease-out infinite; }
@keyframes dvPulse { to { box-shadow: 0 0 0 12px rgba(245,176,75,0); } }
@media (prefers-reduced-motion: reduce) { .dv-nav button.pulse::after { animation: none; } }
.dv-phone .dv-nav { order: 3; border: 0; border-top: 1px solid #E6E9F8; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; overflow: visible; }
.dv-phone .dv-nav button { flex: 1; flex-direction: column; gap: 2px; font-size: 11.5px; padding: 4px; min-height: 50px; }
.dv-scr { overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 28px; display: grid; gap: 14px; align-content: start; }
.dv-toast { position: absolute; left: 50%; bottom: 76px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: #0E1330; color: #fff; font-size: 13.5px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity 240ms ease, transform 320ms var(--ease-out); z-index: 3; }
.dv-toast.on { opacity: 1; transform: translate(-50%, 0); }
.dv-web .dv-toast { bottom: 20px; }
@container (min-width: 720px) {
  .dv-web .dv-app { grid-template-columns: 208px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dv-web .dv-head { grid-column: 1 / -1; }
  .dv-web .dv-nav { flex-direction: column; overflow: visible; border: 0; border-right: 1px solid #E6E9F8; padding: 12px; background: #FAFBFF; }
  .dv-web .dv-app.nonav { grid-template-columns: 1fr; }
  .dv-web .dv-scr { padding: 24px 28px 36px; }
  .dv-web .dv-scr > .d-kpis, .dv-web .dv-scr > .d-list, .dv-web .dv-scr > .d-card, .dv-web .dv-scr > .d-seg, .dv-web .dv-scr > .d-h, .dv-web .dv-scr > * { max-width: 760px; }
}

/* Escritorio: marco a la izquierda, guía completa a la derecha */
@media (min-width: 900px) {
  dialog.demo { inset: 0; margin: auto; width: min(1240px, 95vw); height: min(840px, 92dvh); border-radius: 24px; }
  .demo-in { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 320px; }
  .demo-side { order: 2; border: 0; border-left: 1px solid #E6E9F8; padding: 22px; gap: 16px; align-content: start; grid-template-rows: auto auto 1fr auto; }
  .demo-title strong { font-size: 21px; }
  .demo-hint { display: block; margin: 0; color: #4A5070; font-size: 14.5px; }
  .demo-foot, .demo.fin .demo-foot { display: grid; gap: 10px; }
  .demo.fin .g-steps { display: grid; }
  .demo-foot .btn { background: #4F6DF5; color: #fff; }
  .demo-guide { align-content: start; gap: 10px; }
  .g-steps { display: grid; gap: 4px; counter-reset: g; }
  .g-steps li, .g-steps li:not(.now) { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 12px; font: 600 14.5px/1.35 Manrope, sans-serif; color: #7A80A0; counter-increment: g; }
  .g-steps li::before { content: counter(g); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12.5px Sora, sans-serif; border: 1.5px solid #C9CFE8; }
  .g-steps li.now { background: #EEF1FE; color: #0E1330; font-weight: 700; } .g-steps li.now::before { border-color: #4F6DF5; background: #4F6DF5; color: #fff; }
  .g-steps li.done { color: #0E7A4D; text-decoration: line-through; text-decoration-color: rgba(14,122,77,.4); } .g-steps li.done::before { content: "✓"; border-color: #1FA971; background: #1FA971; color: #fff; }
  .g-end { display: block; margin: 0; padding: 12px 14px; border-radius: 12px; background: #DDF6EA; color: #0E7A4D; font-size: 14px; font-weight: 700; }
  .demo-stage { padding: 28px; place-items: center; background: radial-gradient(120% 90% at 20% 0%, #DCE3FF 0%, #EEF1FC 45%, #F8E9CF 100%); }
  .dv { width: 100%; height: 100%; border-radius: 14px; box-shadow: 0 40px 90px -40px rgba(14,19,48,.55), 0 0 0 1px rgba(14,19,48,.08); }
  .dv-phone { width: 380px; max-height: 780px; border: 10px solid #0E1330; border-radius: 46px; box-shadow: 0 40px 90px -40px rgba(14,19,48,.7); }
  .dv-phone .dv-chrome { padding-top: 12px; }
  @keyframes demoUp { from { opacity: 0; transform: translateY(24px) scale(.97); } }
  @keyframes demoDown { to { opacity: 0; transform: translateY(16px) scale(.98); } }
}

/* Piezas nuevas de las apps */
.d-h h4 { margin: 0; font: 700 21px/1.2 Sora, sans-serif; letter-spacing: -.025em; } .d-h p { margin: 2px 0 0; font-size: 13.5px; color: #7A80A0; font-weight: 600; }
.d-kpis.k4 { grid-template-columns: 1fr 1fr; } @container (min-width: 620px) { .d-kpis.k4 { grid-template-columns: repeat(4, 1fr); } }
.d-card { border: 1px solid #E6E9F8; border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.d-card h5 { margin: 0; font: 700 13px Manrope, sans-serif; color: #7A80A0; }
.d-card > strong { font: 700 17px Sora, sans-serif; }
.d-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; border-bottom: 1px solid #E6E9F8; }
.d-chart i { flex: 1; border-radius: 6px 6px 0 0; background: #C9D3FF; transition: height 500ms var(--ease-out); } .d-chart i.hi { background: #4F6DF5; }
.d-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .d-photos i { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg, #8FA3FF, #4F6DF5 60%, #0E1330); } .d-photos i:nth-child(even) { background: linear-gradient(200deg, #F5B04B, #E8590C 70%, #2B1B55); }
.d-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 700 14px Manrope, sans-serif; color: #4F6DF5; justify-self: start; }
.d-list li.tap > i { font-size: 22px; color: #9AA0BC; flex: none; } .d-list li.tap .ph-check-circle { color: #1FA971; }
.d-list li .d-bar { margin: 8px 0 4px; height: 6px; } .d-list li .d-steps { margin-top: 10px; }
.d-list strong.done { text-decoration: line-through; color: #9AA0BC; }
.d-list li.new { border-color: #4F6DF5; background: #F2F5FF; }
.d-pill.blue { background: #E4E9FF; color: #3A55D9; }
.d-net { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; background: #DDF6EA; color: #0E7A4D; font-weight: 700; font-size: 13.5px; }
.d-net span { display: flex; align-items: center; gap: 8px; } .d-net i { font-size: 18px; } .d-net.off { background: #FFE3C2; color: #B34A00; } .d-net .d-switch { margin: 0; }
.d-quote { margin: 0; padding: 12px 14px; border-radius: 14px; background: #F1F3FB; font-style: italic; font-size: 14px; display: flex; gap: 10px; } .d-quote i { font-size: 20px; color: #4F6DF5; flex: none; }
.d-sub.center { text-align: center; }
.d-seg.col button.svc span { display: flex; align-items: center; gap: 10px; font-weight: 700; } .d-seg.col button.svc i { font-size: 24px; color: #4F6DF5; } .d-seg.col button.svc { min-height: 60px; }
.dv-phone .d-chat { max-height: none; min-height: 300px; }

/* Piezas */
.d-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; background: #0E1330; color: #fff; font: 700 14.5px Manrope, sans-serif; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: transform 140ms var(--ease-out), opacity 200ms ease; }
.d-btn i { font-size: 18px; }
.d-btn:active { transform: scale(.96); }
.d-btn.ghost { background: #F1F3FB; color: #0E1330; }
.d-btn.wide { width: 100%; min-height: 52px; font-size: 16px; background: #4F6DF5; }
.d-btn[disabled] { opacity: .45; pointer-events: none; }
.d-pill { flex: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #FFF1D6; color: #9A5B00; white-space: nowrap; }
.d-pill.ok { background: #DDF6EA; color: #0E7A4D; } .d-pill.no { background: #FDE3E3; color: #B42318; } .d-pill.warn { background: #FFE3C2; color: #B34A00; }
.d-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-kpis div { border: 1px solid #E6E9F8; border-radius: 14px; padding: 12px; min-width: 0; }
.d-kpis b { display: block; font: 800 clamp(17px, 5vw, 24px)/1.1 Sora, sans-serif; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.d-kpis span { font-size: 12px; color: #7A80A0; font-weight: 600; }
.d-seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.d-seg::-webkit-scrollbar { display: none; }
.d-seg button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #E6E9F8; font: 600 14px Manrope, sans-serif; color: #4A5070; white-space: nowrap; transition: border-color 200ms ease, background-color 200ms ease, color 200ms ease; }
.d-seg button[aria-pressed="true"] { border-color: #4F6DF5; background: #F2F5FF; color: #0E1330; }
.d-seg.col { display: grid; overflow: visible; margin: 0; padding: 0; }
.d-seg.col button { text-align: left; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; white-space: normal; }
.d-seg.col small { color: #7A80A0; font-weight: 600; white-space: nowrap; }
.d-seg.five { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; overflow: visible; }
.d-seg.five button { padding: 0 2px; font-size: 13px; white-space: normal; line-height: 1.15; }
.d-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.d-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #E6E9F8; border-radius: 14px; flex-wrap: wrap; }
.d-list li > div { min-width: 0; flex: 1 1 180px; }
.d-list strong { display: block; font-weight: 700; }
.d-list small { display: block; font-size: 13px; color: #7A80A0; margin-top: 2px; }
.d-list small b { color: #0E1330; }
.d-list li.tap { cursor: pointer; }
.d-list .d-empty { color: #7A80A0; font-size: 14px; justify-content: center; border-style: dashed; }
.d-acts { display: flex; gap: 6px; align-items: center; }
.d-acts b { font: 700 16px Sora, sans-serif; margin-right: 6px; }
.d-field { display: grid; gap: 6px; }
.d-field label { font-size: 13.5px; font-weight: 700; display: flex; justify-content: space-between; }
.d-field select { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid #E6E9F8; font: 600 16px Manrope, sans-serif; background: #fff; color: #0E1330; }
.d-field input[type=range] { width: 100%; height: 44px; accent-color: #4F6DF5; }
.d-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.d-row.end { justify-content: flex-end; }
.d-thumbs { display: flex; gap: 6px; align-items: center; } .d-thumbs i { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #8FA3FF, #4F6DF5 60%, #0E1330); }
.d-thumbs small { color: #7A80A0; }
.d-switch { width: 56px; height: 34px; border-radius: 999px; background: #C9CFE8; position: relative; transition: background-color 200ms ease; flex: none; margin: 5px 0; }
.d-switch span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform 240ms var(--ease-out); }
.d-switch[aria-checked="true"] { background: #1FA971; } .d-switch[aria-checked="true"] span { transform: translateX(22px); }
.d-row:has(.d-switch) { justify-content: flex-start; font-weight: 600; }
.d-chat { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 16px; background: #EFEAE2; min-height: 240px; max-height: 44dvh; overflow-y: auto; }
.d-chat p { margin: 0; max-width: 84%; padding: 9px 13px; border-radius: 16px; background: #fff; justify-self: start; border-bottom-left-radius: 4px; font-size: 15px; }
.d-chat p.me { justify-self: end; background: #D9FDD3; border-radius: 16px; border-bottom-right-radius: 4px; }
.d-chat p.sys { justify-self: center; background: #0E1330; color: #fff; font-weight: 700; font-size: 13px; border-radius: 999px; text-align: center; }
.d-chat .typing { display: inline-flex; gap: 4px; padding: 14px; } .d-chat .typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AA0BC; animation: dDot 1s ease-in-out infinite; }
.d-chat .typing i:nth-child(2) { animation-delay: .15s; } .d-chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dDot { 30% { transform: translateY(-4px); opacity: .5; } }
@media (prefers-reduced-motion: no-preference) { .d-chat p:last-child { animation: dIn 280ms var(--ease-out) both; } }
@keyframes dIn { from { opacity: 0; transform: translateY(8px); } }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; min-height: 44px; }
.d-chips button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid #0A6B5C; color: #0A6B5C; font: 700 14.5px Manrope, sans-serif; }
.d-human { padding: 14px; border-radius: 16px; border: 1.5px dashed #F5B04B; background: #FFF8EA; display: grid; gap: 8px; }
.d-human small { font-size: 12.5px; font-weight: 700; color: #9A5B00; }
.d-human > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.d-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 12.5px; font-weight: 700; color: #9AA0BC; }
.d-steps li { padding-top: 8px; border-top: 4px solid #E6E9F8; transition: color 300ms ease, border-color 300ms ease; }
.d-steps li.on { color: #0E1330; border-color: #4F6DF5; }
.d-step { display: inline-flex; align-items: center; gap: 4px; } .d-step b { min-width: 40px; text-align: center; font: 700 18px Sora, sans-serif; }
.d-step button { width: 44px; height: 44px; border-radius: 12px; background: #F1F3FB; font-size: 22px; font-weight: 700; color: #0E1330; }
.d-bar { height: 10px; border-radius: 5px; background: #E6E9F8; overflow: hidden; } .d-bar span { display: block; height: 100%; border-radius: 5px; background: #4F6DF5; transition: width 300ms var(--ease-out), background-color 200ms ease; }
.d-bar.over span { background: #E5484D; }
.d-sub { margin: 0; font-size: 13.5px; color: #4A5070; font-weight: 600; }
.d-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FDE3E3; color: #B42318; font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.d-note.ok { background: #DDF6EA; color: #0E7A4D; } .d-note i { font-size: 20px; }
.d-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.d-slots button { min-height: 48px; border-radius: 12px; border: 1.5px solid #E6E9F8; font: 700 14.5px Manrope, sans-serif; color: #0E1330; }
.d-slots button[disabled] { color: #C3CAE8; text-decoration: line-through; background: #F7F8FD; }
.d-slots button[aria-pressed="true"] { background: #4F6DF5; border-color: #4F6DF5; color: #fff; }
.d-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 12px; }
.d-done > i { font-size: 64px; color: #1FA971; } .d-done b { font: 700 22px Sora, sans-serif; letter-spacing: -.02em; } .d-done span { color: #4A5070; }
.d-done .d-btn { margin-top: 10px; }
.d-score { display: flex; align-items: baseline; gap: 12px; } .d-score b { font: 800 56px/1 Sora, sans-serif; letter-spacing: -.05em; color: #4F6DF5; font-variant-numeric: tabular-nums; } .d-score span { font-weight: 700; color: #4A5070; }

/* ── Página ─────────────────────────────────────────────── */

  /* Variante 9: seis tarjetas que se deslizan con el dedo. "Sí me pasa" a la derecha,
     "no es mi caso" a la izquierda. Al terminar, la página muestra solo lo que le pasó. */
  .hero { padding: clamp(28px, 5vw, 56px) 0 0; text-align: center; }
  .hero h1 { font-size: clamp(44px, 11vw, 104px); font-weight: 800; letter-spacing: -.05em; line-height: .96; }
  .hero h1 em { font-style: normal; color: var(--accent); }
  .hero p { margin: 16px auto 0; max-width: 36ch; color: var(--text-2); }

  .game { padding-block: 28px clamp(48px, 8vw, 96px); display: grid; justify-items: center; gap: 22px; }
  .deck { position: relative; width: min(100%, 400px); aspect-ratio: 5 / 6; touch-action: pan-y; }
  .card { position: absolute; inset: 0; border-radius: 32px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; box-shadow: 0 30px 70px -34px rgba(14,19,48,.7); user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform; transform: translateY(calc(var(--d) * 12px)) scale(calc(1 - var(--d) * .045)); transition: transform 380ms var(--ease-out); }
  .card.drag { transition: none; cursor: grabbing; }
  .card i.big { font-size: 56px; }
  .card q { quotes: "“" "”"; font: 800 clamp(27px, 7.4vw, 38px)/1.08 var(--display); letter-spacing: -.035em; text-wrap: balance; }
  .card small { font-size: 14px; font-weight: 700; opacity: .8; }
  .card .stamp { position: absolute; top: 26px; padding: 6px 14px; border-radius: 12px; border: 3px solid currentColor; font: 800 20px var(--display); opacity: 0; }
  .card .stamp.y { left: 24px; transform: rotate(-12deg); color: #7CF2B4; } .card .stamp.n { right: 24px; transform: rotate(12deg); color: #FFB3A6; }
  .c0 { background: #0E1330; } .c1 { background: #4F6DF5; } .c2 { background: #F5B04B; color: #0E1330; } .c3 { background: #2B1B55; } .c4 { background: #E8590C; } .c5 { background: #0A6B5C; }
  .c2 .stamp.y { color: #0E7A4D; } .c2 .stamp.n { color: #B42318; }
  .acts { display: flex; gap: 14px; align-items: center; }
  .act { height: 60px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); background: var(--surface); transition: transform 160ms var(--ease-out), border-color 200ms ease; }
  .act i { font-size: 22px; } .act:active { transform: scale(.95); }
  .act.yes { background: #0E1330; color: #fff; border-color: #0E1330; }
  .count { font-size: 14px; font-weight: 600; color: var(--text-3); }
  .skip { font-size: 14.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); min-height: 44px; }

  .result { padding: 0 0 clamp(48px, 8vw, 96px); scroll-margin-top: var(--nav-h); }
  .result h2 { font-size: clamp(32px, 6.4vw, 72px); letter-spacing: -.04em; max-width: 14ch; }
  .result > .wrap > p { margin-top: 12px; color: var(--text-2); }
  .res-item { padding: clamp(28px, 5vw, 56px) 0; border-top: 1px solid var(--line); margin-top: clamp(28px, 5vw, 56px); }
  .res-item + .res-item { margin-top: 0; }
  .res-item .lbl { font-weight: 700; color: var(--accent); margin-bottom: 20px; }
  @media (prefers-reduced-motion: no-preference) { .res-item { animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--n) * 90ms); } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  [hidden] { display: none !important; }

/* Sin JavaScript se muestra todo el contenido y se oculta el juego de tarjetas */
html:not(.js) #game { display: none; }
.js #result[data-ssr] { display: none; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-link { font-weight: 600; font-size: 14.5px; color: var(--text-2); display: none; }
@media (min-width: 560px) { .nav-link { display: inline; } }
.foot-brief { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 0 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); min-height: 48px; }
@media (max-width: 480px) { .foot-brief { margin-left: 0; display: flex; } }
.acts { gap: 10px; } .act { padding: 0 16px; font-size: 15px; white-space: nowrap; }
@media (min-width: 400px) { .act { padding: 0 24px; font-size: 16px; } }
html:not(.js) .hero p { display: none; }
.result.solo .lbl { display: none; } .result.solo .res-item { margin-top: 28px; }
.result { padding-top: clamp(28px, 5vw, 56px); }

/* ── Nix, la mascota ─────────────────────────────────────── */
/* La posición la pone mascot.js con transform; aquí solo forma, estados y globo. */
.nix { position: fixed; left: 0; top: 0; z-index: 35; width: 56px; height: 56px; pointer-events: none; will-change: transform; }
.nix-btn { position: relative; display: block; width: 56px; height: 56px; perspective: 320px; pointer-events: auto; touch-action: none; cursor: grab; transition: opacity 200ms ease; }
/* Sombra: un degradado radial. Un filter (blur o drop-shadow) obligaría a repintar en cada cuadro. */
.nix-btn::before { content: ""; position: absolute; left: 0; right: 0; bottom: -22%; height: 40%; background: radial-gradient(closest-side, rgba(43,58,158,.42), rgba(43,58,158,0)); }
.nix[data-state="held"] .nix-btn { cursor: grabbing; }
.nix[data-state="held"] .nix-btn::before { bottom: -34%; opacity: .5; }
.nix-3d { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; }
.nix-3d svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nix-dot { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; border-radius: 50%; background: #F5B04B; transition: opacity 200ms ease; }
.nix[data-wear]:not([data-wear=""]) .nix-dot { opacity: 0; }
.nix-wear g[data-w] { opacity: 0; transition: opacity 220ms ease; } .nix-wear g[data-w].on { opacity: 1; }
dialog.demo .nix-bubble { max-width: 210px; }
/* Dentro del demo Nix se coloca respecto a la ventana, que recorta lo que se sale */
dialog.demo .nix, dialog.demo .nix-confetti { position: absolute; }
@media (max-width: 899px) { dialog.demo .nix-btn { scale: .74; } dialog.demo .nix-bubble { max-width: 230px; } }
.nix-3d { will-change: transform; }
.nix-smile, .nix-dizzy { opacity: 0; transition: opacity 160ms ease; }
.nix-eyes { transition: opacity 160ms ease, transform 300ms var(--ease-out); transform-origin: 32px 32px; }
.nix[data-state="happy"] .nix-eyes, .nix[data-state="dizzy"] .nix-eyes { opacity: 0; }
.nix[data-state="happy"] .nix-smile, .nix[data-state="dizzy"] .nix-dizzy { opacity: 1; }
.nix[data-state="thinking"] .nix-eyes { transform: scaleY(.55) translateY(-3px); }
.nix[data-state="held"] .nix-eyes { transform: scale(1.18); }
.nix[data-state="yawn"] .nix-eyes { transform: scaleY(.3); }
.nix[data-state="sleep"] .nix-eyes { transform: scaleY(.1) translateY(6px); }
.nix.muted .nix-btn { opacity: .55; }
.nix-zzz { position: absolute; left: 62%; bottom: 96%; font: 800 13px var(--display); color: var(--accent); opacity: 0; transition: opacity 300ms ease; }
.nix-zzz b { display: inline-block; opacity: 0; } .nix-zzz b:nth-child(2) { font-size: 1.25em; } .nix-zzz b:nth-child(3) { font-size: 1.55em; }
.nix[data-state="sleep"] .nix-zzz { opacity: 1; }
.nix[data-state="sleep"] .nix-zzz b { animation: nixZ 2.4s ease-in-out infinite; } .nix[data-state="sleep"] .nix-zzz b:nth-child(2) { animation-delay: .5s; } .nix[data-state="sleep"] .nix-zzz b:nth-child(3) { animation-delay: 1s; }
.nix[data-state="sleep"] .nix-3d { animation: nixBreath 3.2s ease-in-out infinite; }
@keyframes nixZ { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes nixBreath { 50% { transform: scale(1.05, .95); } }
.nix-confetti { position: fixed; z-index: 36; width: 9px; height: 9px; margin: -4px; border-radius: 2px; pointer-events: none; }
/* Globo: por defecto arriba a la izquierda de Nix; se voltea si Nix está a la izquierda o muy arriba */
.nix-bubble { position: absolute; right: 70%; bottom: 96%; width: max-content; max-width: min(250px, calc(100vw - 96px)); padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #0E1330; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.35; box-shadow: 0 12px 32px -12px rgba(14,19,48,.6); opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96); transform-origin: 100% 100%; transition: opacity 200ms ease, transform 260ms var(--ease-out), visibility 0s 260ms; display: grid; gap: 6px; }
.nix.talk .nix-bubble { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity 200ms ease, transform 260ms var(--ease-out); }
.nix.left .nix-bubble { right: auto; left: 70%; border-radius: 16px 16px 16px 4px; transform-origin: 0 100%; }
.nix.low .nix-bubble { bottom: auto; top: 96%; border-radius: 16px 4px 16px 16px; transform-origin: 100% 0; }
.nix.low.left .nix-bubble { border-radius: 4px 16px 16px 16px; transform-origin: 0 0; }
.nix-link { color: #F5B04B; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 28px; display: inline-flex; align-items: center; }
.nix-mute { justify-self: start; font: 600 11.5px Manrope, sans-serif; color: #B9C1E8; text-decoration: underline; text-underline-offset: 3px; min-height: 26px; }
@media (min-width: 768px) { .nix, .nix-btn { width: 72px; height: 72px; } .nix-bubble { font-size: 14.5px; max-width: 280px; } }
@media (prefers-reduced-motion: reduce) { .nix-btn { cursor: pointer; touch-action: auto; } .nix[data-state="sleep"] .nix-3d, .nix[data-state="sleep"] .nix-zzz b { animation: none; } }
@media print { .nix { display: none; } }
