/* Olfatipo · estilos
   Concepto: entrar en el perfume. Fuera, un estudio de luz blanca con el frasco;
   dentro, un líquido vivo con ingredientes flotando. Sobre él, cristal esmerilado y papel secante (mouillettes).
   Una sola estética deliberada (no cambia con el modo oscuro del sistema): el líquido aporta la profundidad. */
:root {
  --studio: #ECEAE4; --studio-2: #DAD6CC; --paper: #FCFBF7; --ink: #1A1F1C; --muted: #5A625D; --line: rgba(26,31,28,.14);
  --frost: rgba(251,250,246,.74); --frost-strong: rgba(251,250,246,.9); --frost-line: rgba(255,255,255,.65);
  --accent: #9A5717; --on-ink: #F7F5EF; --light: #FFFBF2;
  --fam-c: #E2B03A; --fam-l: #6FB3C3; --fam-f: #DE93AB; --fam-g: #C3854E; --fam-a: #7C5F45; --fam-e: #B04F35;
  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  --blur: blur(18px) saturate(1.35);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  background: radial-gradient(120% 70% at 50% 18%, #F7F6F2 0%, var(--studio) 55%, var(--studio-2) 100%) fixed, var(--studio);
  font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Escena ---------- */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .4s; }
.scene canvas, .sc-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
canvas.aroma { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }

.app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
  padding: 10px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.app.wide { max-width: none; padding: 0; }
main { flex: 1; display: flex; flex-direction: column; }

/* ---------- Cabecera del test ---------- */
.top { position: sticky; top: calc(env(safe-area-inset-top) + 8px); z-index: 5; display: grid; grid-template-columns: 40px minmax(0,1fr) 30px 40px; gap: 10px; align-items: center;
  padding: 8px 10px; margin-bottom: 6px; border-radius: 18px; background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--frost-strong); cursor: pointer; display: grid; place-items: center; font-size: 22px; line-height: 1; padding: 0 0 2px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.meta { min-width: 0; }
.meta .row { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; }
.meta .row b { color: var(--ink); font-weight: 500; flex: none; }
.meta .row span { overflow: hidden; text-overflow: ellipsis; }
.segs { display: flex; gap: 3px; margin-top: 7px; }
.seg { flex: 1; height: 3px; border-radius: 2px; background: rgba(26,31,28,.15); transition: background .4s; }
.seg.on { background: var(--ink); }
.seg.end { margin-right: 5px; }
canvas.mini { width: 30px; height: 40px; display: block; }
.sound svg path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: var(--ink); }
.sound .off { display: none; }
.sound[aria-pressed="false"] .wav { display: none; }
.sound[aria-pressed="false"] .off { display: block; }

/* ---------- Transiciones entre pantallas ---------- */
#screen { view-transition-name: screen; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(screen) { animation: vt-out .3s ease both; }
::view-transition-new(screen) { animation: vt-in .5s var(--ease) both; }
[data-dir="back"]::view-transition-old(screen) { animation-name: vt-out-back; }
[data-dir="back"]::view-transition-new(screen) { animation-name: vt-in-back; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px) scale(.98); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(4px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateY(14px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateY(-18px); } }
.screen { animation: in .5s var(--ease) both; }
@keyframes in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.stagger { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 200ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Panel de pregunta ---------- */
.qpanel { background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); border-radius: 22px; padding: 16px 18px 18px; margin-top: 4px; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; display: block; }
.q { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -.01em; margin: 6px 0 0; text-wrap: balance; }
.hint { color: var(--muted); font-size: 14.5px; margin: 8px 0 0; }

/* ---------- Mouillettes de cristal ---------- */
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.strip { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; transition: opacity .4s, transform .25s var(--ease); animation: rise .6s var(--ease) both; }
.opts .strip:nth-child(1) { animation-delay: .05s } .opts .strip:nth-child(2) { animation-delay: .1s } .opts .strip:nth-child(3) { animation-delay: .15s }
.opts .strip:nth-child(4) { animation-delay: .2s } .opts .strip:nth-child(5) { animation-delay: .25s } .opts .strip:nth-child(6) { animation-delay: .3s }
.strip:active { transform: scale(.985); }
@media (hover: hover) { .strip:hover { transform: translateX(4px); } }
.paper { position: relative; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 10px; align-items: center; min-height: 64px;
  padding: 6px 44px 6px 7px; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 14px 4px 4px 14px; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); }
.paper.noart { grid-template-columns: minmax(0,1fr); padding-left: 18px; padding-block: 11px; }
.paper::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 40px; background: linear-gradient(90deg, transparent, rgba(26,31,28,.07)); transition: width 1.1s var(--ease); }
.paper > * { position: relative; z-index: 1; }
.art { display: grid; place-items: center; }
.txt { font-size: 15.5px; line-height: 1.3; min-width: 0; }
.txt small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.txt strong { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: .02em; }
.strip.picked .paper::after { width: 94%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tip) 70%, transparent)); }
.strip.picked .illu { transform: scale(1.14) rotate(-5deg); }
.opts.done .strip:not(.picked) { opacity: .28; transform: translateX(-6px); }
.opts.done .strip { cursor: default; }
.skip { align-self: flex-start; margin-top: 12px; border: 0; padding: 8px 14px; border-radius: 999px; background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--ink); font-size: 14px; cursor: pointer; }

.illu { display: block; overflow: visible; transition: transform .5s var(--ease); }
.illu .ico { color: var(--ink); }
.illu .tone { fill: var(--tone); opacity: .75; }

/* ---------- Reacción ---------- */
.reaction { margin-top: 14px; padding: 14px 16px 16px; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-left: 3px solid var(--tip); border-radius: 4px 16px 16px 4px; animation: in .4s var(--ease) both; }
.rk { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tip); flex: none; display: inline-block; }
.rt { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.3; margin: 6px 0 12px; }
.rfoot { display: flex; align-items: center; gap: 12px; }
.rbar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rbar span { display: block; height: 100%; width: 0; background: var(--tip); animation: fill var(--d, 2s) linear forwards; }
@keyframes fill { to { width: 100%; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--frost-strong); color: var(--ink); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn.light { background: var(--light); color: var(--ink); border-color: var(--light); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; }
:is(.btn, .icon-btn, .skip, .chip, .strip, .tile, .sug, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* =========================================================
   PORTADA
   ========================================================= */
.landing { position: relative; }
.lnav { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 1200px; margin: 0 auto; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); }
.logo { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.lnav .right { display: flex; gap: 8px; align-items: center; }
.challenge { position: relative; z-index: 2; display: flex; gap: 10px; align-items: flex-start; max-width: 460px; margin: 76px auto 0; padding: 12px 14px; border-radius: 16px; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); font-size: 14.5px; }
.challenge p { margin: 0; } .challenge .dot { margin-top: 6px; }

.hero { height: 300vh; position: relative; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-copy { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 84px); text-align: center; padding: 0 20px;
  opacity: calc(1 - var(--p, 0) * 3.2); transform: translateY(calc(var(--p, 0) * -80px)); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.hero-title { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 13.5vw, 128px); line-height: .92; letter-spacing: -.025em; margin: 12px 0 0; }
.hero-title em { font-style: italic; font-weight: 500; display: block; }
.hero-cue { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 22px); text-align: center; margin: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); opacity: calc(1 - var(--p, 0) * 5); }
.hero-cue span { display: block; font-size: 18px; margin-top: 6px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
.dive-line { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%) scale(calc(.9 + var(--p, 0) * .1)); text-align: center; margin: 0; padding: 0 24px;
  font-family: var(--display); font-size: clamp(34px, 9vw, 92px); line-height: 1; letter-spacing: -.02em; color: var(--light);
  text-shadow: 0 2px 30px rgba(60,30,5,.35); opacity: calc((var(--p, 0) - .7) * 5); }
.dive-line em { font-style: italic; }
@media (min-width: 900px) {
  .hero-copy { text-align: left; left: max(48px, 6vw); right: auto; top: 50%; transform: translateY(calc(-50% + var(--p, 0) * -80px)); max-width: 44vw; }
}

/* Mundos */
.world { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 90px max(20px, env(safe-area-inset-right)) 70px max(20px, env(safe-area-inset-left)); color: var(--ink); }
.world[data-tone="light"] { color: var(--light); }
.world[data-tone="light"] .eyebrow, .world[data-tone="light"] .world-who { color: rgba(255,251,242,.78); }
.world[data-tone="dark"] .eyebrow { color: rgba(26,31,28,.75); }
.world .eyebrow { display: flex; gap: 10px; align-items: center; }
.world .eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.world-title { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(64px, 21vw, 240px); line-height: .86; letter-spacing: -.035em; margin: 10px 0 0;
  transform: translateY(40px); opacity: 0; transition: transform 1.1s var(--ease), opacity 1.1s var(--ease); }
.world-line { font-family: var(--display); font-size: clamp(20px, 5.4vw, 30px); line-height: 1.25; max-width: 24ch; margin: 18px 0 0; text-wrap: balance;
  transform: translateY(30px); opacity: 0; transition: transform 1.1s .12s var(--ease), opacity 1.1s .12s var(--ease); }
.world-notes { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; opacity: 0; transition: opacity 1s .25s; }
.world-notes li { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; padding: 7px 12px; border-radius: 999px; border: 1px solid currentColor; }
.world-who { font-size: 14.5px; color: rgba(26,31,28,.78); margin: 16px 0 0; opacity: 0; transition: opacity 1s .35s; }
.world.in .world-title, .world.in .world-line { transform: none; opacity: 1; }
.world.in .world-notes, .world.in .world-who { opacity: 1; }
.world[data-tone="dark"] .world-title { text-shadow: 0 1px 40px rgba(255,255,255,.35); }
.world[data-tone="light"] .world-title { text-shadow: 0 2px 40px rgba(40,15,0,.25); }
@media (min-width: 900px) { .world { padding-left: 6vw; padding-right: 6vw; justify-content: center; } .world:nth-child(even) { align-items: flex-end; text-align: right; } .world:nth-child(even) .world-notes { justify-content: flex-end; } .world:nth-child(even) .eyebrow { flex-direction: row-reverse; } }

/* Llamada final */
.final { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 80px 16px; }
.final-card { width: 100%; max-width: 520px; background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); border-radius: 28px; padding: 28px 22px; text-align: center; }
.final-title { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 12vw, 76px); line-height: .95; letter-spacing: -.02em; margin: 10px 0 0; }
.final-title em { font-style: italic; font-weight: 500; }
.final-card .lead { color: var(--muted); max-width: 36ch; margin: 14px auto 0; }
.cta { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; margin: 22px auto 0; }
.how { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; text-align: left; }
.how li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.how li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 17px; }
.how b { font-weight: 600; } .how span { color: var(--muted); font-size: 14.5px; }

/* =========================================================
   TEST
   ========================================================= */
.dots { display: flex; gap: 6px; margin-top: 12px; }
.dots span { width: 22px; height: 4px; border-radius: 2px; background: rgba(26,31,28,.15); }
.dots .on { background: var(--ink); } .dots .now { background: var(--muted); }
.pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tile { aspect-ratio: 1/1.18; max-width: 100%; border: 1px solid var(--frost-line); border-radius: 22px; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 10px; transition: transform .25s var(--ease), background .35s; animation: rise .45s var(--ease) both; }
.tile:nth-of-type(2) { animation-delay: .07s; }
.tile:active { transform: scale(.95); }
.tile .name { font-family: var(--display); font-size: 19px; line-height: 1.15; padding: 0 4px; text-align: center; }
.tile.hit { background: color-mix(in srgb, var(--tip) 40%, var(--paper)); transform: scale(1.04); }
.or { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 17px; z-index: 2; }

.field { width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
.field:focus { outline: none; border-color: var(--ink); }
.search { margin-top: 14px; } .search .kicker { margin: 0 0 8px; }
.sugs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sug { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.sug small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.empty { color: var(--ink); font-size: 14px; margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--frost); }

.slider { margin-top: 18px; }
.slider input { width: 100%; accent-color: var(--ink); height: 30px; margin: 0; }
.scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.scale span.on { color: var(--ink); font-weight: 500; }
.ilevel { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 14px; align-items: center; margin-top: 12px; padding: 16px; background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 16px; }
.ilevel p { font-family: var(--display); font-size: 19px; line-height: 1.3; margin: 0; }
.sillage { color: var(--ink); } .sillage path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; transition: opacity .3s; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1.5px solid var(--frost-line); background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 999px; padding: 10px 14px; text-align: left; cursor: pointer; font-size: 14.5px; line-height: 1.25; transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 30px; }

.search, .slider { background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); border-radius: 18px; padding: 14px; }
.lnav .btn.small { box-shadow: 0 4px 18px rgba(0,0,0,.12); }

/* Revelaciones y redoble: texto sobre el líquido */
.reveal, .drum { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 8px; }
.reveal .glass { background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); border-radius: 26px; padding: 26px 22px; max-width: 420px; }
.reveal h1 { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 9vw, 46px); line-height: 1.02; margin: 8px 0 0; text-wrap: balance; }
.reveal h1 em { font-style: italic; }
.reveal p { color: var(--muted); max-width: 34ch; margin: 12px auto 0; }
.reveal .btn { margin-top: 22px; }
.tone-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: var(--paper); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.phrase { font-family: var(--display); font-style: italic; font-size: clamp(28px, 8vw, 44px); line-height: 1.12; max-width: 16ch; color: var(--light); text-shadow: 0 2px 30px rgba(40,15,0,.4); min-height: 2.4em; }

/* =========================================================
   RESULTADO
   ========================================================= */
.result { padding-bottom: 20px; }
.res-spacer { flex: none; }
.res-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.res-fam { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 11vw, 56px); line-height: 1; letter-spacing: -.02em; margin: 6px 0 0; text-wrap: balance; }
.res-arch { font-family: var(--display); font-style: italic; font-size: 23px; margin: 6px 0 0; }
.panel { background: var(--frost-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--frost-line); border-radius: 22px; padding: 18px; margin-top: 16px; }
.res-desc { margin: 0; font-size: 16px; line-height: 1.6; }
.facts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.fact { background: var(--paper); border-radius: 14px; padding: 12px 14px; margin: 0; min-width: 0; }
.fact dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-weight: 600; }
.fact dd small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.section-t { font-family: var(--display); font-size: 26px; font-weight: 500; margin: 0; }
.sub { color: var(--muted); font-size: 14.5px; margin: 6px 0 0; }
.formula .bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin-top: 12px; }
.formula .bar span { flex: 0 0 auto; width: calc(var(--w) * 1%); transform-origin: left; animation: grow 1.2s var(--ease) both 1s; }
@keyframes grow { from { transform: scaleX(0); } }
.formula ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.formula li { display: flex; align-items: center; gap: 6px; }
.cards { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pcard { background: var(--paper); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 14px; }
.swatch { position: relative; width: 40px; height: 56px; margin-top: 10px; border-radius: 7px 7px 11px 11px; border: 1.5px solid #93A098; overflow: hidden; }
.swatch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--s2) 0 38%, var(--s1) 38% 100%); opacity: .9; }
.pbrand { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.pcard h3 { font-family: var(--display); font-size: 21px; font-weight: 600; margin: 2px 0 0; line-height: 1.15; }
.pcard .notes { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 6px; }
.pill .dot { width: 7px; height: 7px; }
.pill.flag { border-color: var(--accent); color: var(--accent); }
.pcard .btn { margin-top: 12px; }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.box h3 { font-family: var(--display); font-size: 22px; font-weight: 600; margin: 0; }
.box p { margin: 8px 0 0; } .box .kicker { margin: 0 0 4px; }
.box ul { padding-left: 18px; margin: 10px 0 0; line-height: 1.55; }
.box .field { margin-top: 6px; }
.box label.kicker { margin-top: 14px; }
.premium { border: 1.5px solid var(--accent); }
.price { font-family: var(--display); font-size: 30px; font-weight: 600; margin-top: 12px; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.copyfall { margin-top: 10px; min-height: 80px; resize: vertical; }
.card-prev { margin-top: 14px; display: flex; justify-content: center; }
.card-prev img { width: 62%; max-width: 240px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: rise .6s var(--ease) both; }
.compat { text-align: center; }
.ring { --p: 50; width: 128px; height: 128px; margin: 12px auto 10px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--paper); }
.ring span { position: relative; font-family: var(--display); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Pie, avisos, cookies ---------- */
.foot { position: relative; z-index: 1; margin: 40px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); padding: 14px 16px; max-width: 520px; border-radius: 18px; background: var(--frost); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.app.wide .foot { margin-bottom: 24px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.foot p { margin: 10px auto 0; max-width: 40ch; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: min(440px, calc(100% - 32px));
  background: var(--ink); color: var(--on-ink); padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 20; }
.toast.show { opacity: 1; }
.cookies { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; max-width: 456px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.14); font-size: 14px; }
.cookies p { margin: 0; }
.noscript { text-align: center; padding: 40px 16px; }

/* ---------- Páginas legales ---------- */
.legal { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: 24px 20px 60px; background: var(--paper); min-height: 100vh; }
.legal h1 { font-family: var(--display); font-weight: 500; font-size: 34px; line-height: 1.1; }
.legal h2 { font-family: var(--display); font-size: 21px; margin-top: 28px; }
.legal p, .legal li { line-height: 1.6; }
.legal .todo { background: color-mix(in srgb, var(--fam-c) 30%, transparent); padding: 0 4px; border-radius: 4px; }
.legal .back { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .hero { height: auto; } .hero-pin { position: relative; }
}

/* =========================================================
   EFECTOS DE RESPUESTA Y REVELACIÓN FINAL
   ========================================================= */
/* Onda de color que sale del toque y velo del color de la familia */
.ripple { position: fixed; z-index: 60; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--c); box-shadow: 0 0 24px var(--c), inset 0 0 18px var(--c); animation: ripple 1.1s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(.4); opacity: .95; } to { transform: scale(26); opacity: 0; } }
.wash { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(80% 60% at 50% 55%, var(--c), transparent 70%);
  mix-blend-mode: soft-light; animation: wash .9s ease-out forwards; }
.wash.big { z-index: 3; mix-blend-mode: screen; animation-duration: 1.3s; }
@keyframes wash { 0% { opacity: 0; } 25% { opacity: .85; } 100% { opacity: 0; } }
.strip.picked .paper { animation: dip .7s var(--ease); }
@keyframes dip { 0% { transform: none; } 35% { transform: translateY(5px) scale(.97); } 70% { transform: translateY(-3px) scale(1.015); } 100% { transform: none; } }

/* Oscurecer el estudio durante el redoble */
body.dim .scene { filter: brightness(.55) saturate(1.3); transition: filter 1.2s; }
.scene { transition: opacity .4s, filter 1.2s; }

/* Botón para descubrir el resultado: late como un corazón */
.unveil-btn { margin-top: 28px; width: 190px; height: 190px; border-radius: 50%; border: 1px solid rgba(255,255,255,.75); cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(255,255,255,.12) 60%, rgba(255,255,255,.04));
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--light);
  font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.15; padding: 24px; text-shadow: 0 1px 14px rgba(40,15,0,.5);
  box-shadow: 0 0 0 0 rgba(255,255,255,.5), 0 20px 60px rgba(0,0,0,.25); animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.45), 0 20px 60px rgba(0,0,0,.25); }
  14% { transform: scale(1.06); } 28% { transform: scale(1); } 42% { transform: scale(1.04); box-shadow: 0 0 0 26px rgba(255,255,255,0), 0 20px 60px rgba(0,0,0,.25); } }
.unveil-btn:active { transform: scale(.94); }
.unveil-hint { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,251,242,.7); }

/* Las tres notas, una a una */
.notes-reveal { min-height: 50vh; display: grid; place-items: center; }
.nr-item { text-align: center; color: var(--light); animation: noteIn 1.25s var(--ease) both; }
.nr-item .kicker { color: rgba(255,251,242,.8); }
.nr-name { font-family: var(--display); font-style: italic; font-size: clamp(46px, 14vw, 84px); line-height: 1; margin: 10px 0 0;
  text-shadow: 0 0 40px var(--c), 0 2px 30px rgba(30,10,0,.5); }
.nr-fam { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 14px 0 0; }
@keyframes noteIn { 0% { opacity: 0; transform: scale(.7); filter: blur(14px); } 25% { opacity: 1; transform: scale(1); filter: blur(0); }
  80% { opacity: 1; transform: scale(1.04); filter: blur(0); } 100% { opacity: 0; transform: scale(1.25); filter: blur(10px); } }

/* Destello final que da paso al resultado */
.flashout { position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff 0%, color-mix(in srgb, var(--c) 60%, #fff) 35%, transparent 75%); animation: flashout 1.6s ease-out forwards; }
@keyframes flashout { 0% { opacity: 0; transform: scale(.2); } 18% { opacity: 1; transform: scale(1.6); } 100% { opacity: 0; transform: scale(2.4); } }

/* El nombre del olfatipo aparece letra a letra */
.res-fam .wd { display: inline-block; white-space: nowrap; }
.res-fam .ch { display: inline-block; animation: letter .9s var(--ease) both; animation-delay: calc(var(--k) * 55ms + 900ms); }
@keyframes letter { from { opacity: 0; transform: translateY(.5em) rotate(6deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  .ripple, .wash, .flashout { display: none; }
  .unveil-btn { animation: none; }
}

/* Foto del frasco: el cristal se multiplica sobre el líquido, así lo blanco deja ver lo de dentro */
.sc-glass { position: absolute; left: 0; top: 0; height: auto; transform-origin: 0 0; mix-blend-mode: multiply; pointer-events: none; will-change: transform, opacity; }

/* Película de entrada (vídeo real troceado en fotogramas) por encima del frasco dibujado */
.scene.filmed > :not(.sc-film) { visibility: hidden; }

/* =========================================================
   MÓVIL: que cada pregunta quepa entera en la pantalla
   ========================================================= */
@media (max-width: 600px) {
  .app { padding-top: 6px; padding-bottom: 16px; }
  .top { padding: 6px 8px; margin-bottom: 4px; }
  .qpanel { padding: 12px 14px 14px; border-radius: 18px; }
  .q { font-size: clamp(21px, 5.9vw, 27px); line-height: 1.12; margin-top: 4px; }
  .hint { font-size: 13px; margin-top: 5px; }
  .opts { gap: 6px; margin-top: 9px; }
  .paper { grid-template-columns: 40px minmax(0,1fr); gap: 8px; min-height: 50px; padding: 4px 38px 4px 5px; }
  .paper.noart { padding-block: 9px; padding-left: 14px; }
  .art svg { width: 40px; height: 40px; }
  .txt { font-size: 14.5px; line-height: 1.25; }
  .txt small { font-size: 12.5px; }
  .skip { margin-top: 8px; padding: 6px 12px; font-size: 13px; }
  .reaction { margin-top: 10px; padding: 12px 14px 14px; }
  .rt { font-size: 18px; margin: 4px 0 10px; }
}
/* Móviles bajos (iPhone SE y con barras del navegador): un punto más compacto */
@media (max-width: 600px) and (max-height: 720px) {
  .q { font-size: clamp(20px, 5.4vw, 24px); }
  .hint { display: none; }
  .paper { min-height: 44px; }
  .art svg { width: 34px; height: 34px; }
  .paper { grid-template-columns: 34px minmax(0,1fr); }
  .txt { font-size: 14px; }
}
