/* App de test, mobile first: una pregunta por pantalla, tarjetas con foto, avance automático. Máx. 480 px de ancho. */
:root {
  --ivory: #F7F1EF;   /* fondo */
  --rose: #B88A72;    /* rose gold: acentos y botones */
  --ink: #705243;     /* texto principal */
  --deep: #4E372C;    /* títulos */
  --soft: #96715C;    /* texto secundario */
  --beige: #E5D8CF;   /* bordes y superficies */
  --card: #FFFFFF;
  --display: "Cormorant Garamond", "Didot", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ivory); color: var(--ink); }
body { font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#app { max-width: 480px; margin: 0 auto; padding-inline: 18px; padding-block: env(safe-area-inset-top, 0px) calc(28px + env(safe-area-inset-bottom, 0px)); }
.screen { animation: in .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 5; background: var(--ivory); padding-top: calc(10px + env(safe-area-inset-top, 0px)); margin-inline: -18px; padding-inline: 18px; }
.top-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; height: 48px; }
.top-logo { width: 116px; height: auto; justify-self: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--beige); }
.lang { display: flex; background: var(--card); border: 1px solid var(--beige); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; font: 600 11px/1 var(--sans); letter-spacing: .06em; color: var(--soft); padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--rose); color: #fff; }
.bar { height: 4px; background: var(--beige); border-radius: 4px; margin: 6px 0 2px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--rose); border-radius: 4px; transition: width .5s ease; }

/* Bienvenida */
.welcome { padding-top: 8px; }
.hero { border-radius: 24px 24px 0 0; overflow: hidden; aspect-ratio: 16 / 12; background: var(--beige); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-card { background: var(--card); border: 1px solid var(--beige); border-top: 0; border-radius: 0 0 24px 24px; padding: 16px 18px 18px; text-align: center; margin-top: -1px; }
.crown { margin: 0 auto 6px; opacity: .9; }
.eyebrow { font: 600 10.5px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--rose); margin: 0 0 6px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.display { font: 600 clamp(34px, 9.6vw, 44px)/1.02 var(--display); color: var(--deep); margin: 4px 0 8px; letter-spacing: -.01em; text-wrap: balance; outline: none; }
.tag { font: italic 500 20px/1.3 var(--display); color: var(--soft); margin: 0 0 12px; text-wrap: balance; }
.body { color: var(--ink); margin: 0 auto 16px; max-width: 34ch; }
.howto { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 10px; text-align: left; background: var(--ivory); border-radius: 14px; }
.howto li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; font: 500 13.5px/1.3 var(--sans); }
.howto span { width: 26px; height: 26px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font: 600 12px/1 var(--sans); }
.micro { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--soft); margin: 12px 0 0; }

/* Paso de pregunta */
.step { padding-top: 18px; }
.step.center { text-align: center; padding-top: 70px; }
.kicker { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin: 0 0 8px; }
.q { font: 600 clamp(23px, 6.6vw, 28px)/1.2 var(--sans); color: var(--deep); margin: 0 0 8px; letter-spacing: -.015em; text-wrap: balance; outline: none; }
.sub { color: var(--soft); margin: 0 0 18px; font-size: 14.5px; }
.q + .opts { margin-top: 18px; }
.opts { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.opts.grid { grid-template-columns: 1fr 1fr; gap: 12px; }

.opt { position: relative; display: grid; align-items: center; background: var(--card); border: 1.5px solid var(--beige); border-radius: var(--r); cursor: pointer; transition: border-color .2s, transform .15s, box-shadow .2s; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.opt:active { transform: scale(.985); }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.otitle { display: block; font: 600 15px/1.3 var(--sans); color: var(--deep); }
.osub { display: block; font-size: 13px; color: var(--soft); margin-top: 3px; line-height: 1.4; }
.ck { width: 24px; height: 24px; flex: none; }
.ck circle { fill: none; stroke: var(--beige); stroke-width: 1.5; }
.ck path { fill: none; stroke: transparent; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.opt.list { grid-template-columns: minmax(0, 1fr) 24px; gap: 12px; padding: 16px 16px; min-height: 58px; }
.opt.rows { grid-template-columns: 84px minmax(0, 1fr) 24px; gap: 14px; padding: 10px 14px 10px 10px; }
.opt.rows.noimg { grid-template-columns: minmax(0, 1fr) 24px; padding: 16px; }
.opt.rows .ph { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; }
.opt.grid { grid-template-rows: auto auto; padding: 0; }
.opt.grid .ph { aspect-ratio: 1 / 1; overflow: hidden; }
.opt.grid .txt { padding: 12px 12px 14px; text-align: center; }
.opt.grid .otitle { font-size: 14px; }
.opt.grid .osub { display: none; }
.opt.grid .ck { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.85); border-radius: 50%; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.opt:hover .ph img { transform: scale(1.04); }
.opt:hover { border-color: #D7C2B5; }

.opt:has(input:checked) { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose), 0 10px 24px -16px rgba(112, 82, 67, .6); }
.opt:has(input:checked) .ck circle { fill: var(--rose); stroke: var(--rose); }
.opt:has(input:checked) .ck path { stroke: #fff; }
.opt:has(input:focus-visible) { outline: 2px solid var(--deep); outline-offset: 3px; }

.note { background: var(--card); border: 1px solid var(--beige); border-left: 3px solid var(--rose); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin: 16px 0 0; }

/* Registro */
#reg { display: grid; gap: 4px; }
.field { display: block; }
.field span { display: block; font: 500 13px/1.4 var(--sans); color: var(--ink); margin: 8px 0 6px; }
.field input { width: 100%; font: 400 16px/1.4 var(--sans); color: var(--deep); background: var(--card); border: 1.5px solid var(--beige); border-radius: 999px; padding: 14px 18px; }
.field input::placeholder { color: #BFA89A; }
.field input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(184, 138, 114, .16); }
.err { color: #A3453A; font-size: 12.5px; margin: 4px 4px 0; }
.err:empty { margin: 0; }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 13.5px; margin-top: 12px; cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; border: 1.5px solid var(--beige); border-radius: 50%; background: var(--card); margin: 0; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--rose); border-color: var(--rose); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
.legal { text-align: center; font-size: 12px; margin: 12px 0 0; } .legal a { color: var(--soft); }

/* Botones */
.cta { display: block; width: 100%; margin-top: 20px; background: var(--rose); color: #fff; border: 0; border-radius: 14px; padding: 17px 20px; font: 600 15px/1.2 var(--sans); text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 12px 24px -14px rgba(112, 82, 67, .7); transition: background .2s, transform .15s; }
.cta:hover { background: #A77A63; } .cta:active { transform: scale(.99); }
.cta[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.link { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--soft); font: 500 13.5px/1.4 var(--sans); cursor: pointer; padding: 8px; }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }

/* Cargando */
.loader { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 50%; border: 2px solid var(--beige); border-top-color: var(--rose); display: grid; place-items: center; animation: spin 1.2s linear infinite; }
.loader img { width: 40px; animation: spin 1.2s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Resultado */
.results { display: grid; gap: 16px; }
.match { background: var(--card); border: 1px solid var(--beige); border-radius: 24px; overflow: hidden; }
.match-ph { position: relative; aspect-ratio: 16 / 11; background: var(--beige); }
.match-ph img { width: 100%; height: 100%; object-fit: cover; }
.area { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.9); color: var(--deep); font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 8px 10px; border-radius: 999px; }
.match-body { padding: 20px 20px 22px; text-align: center; }
.match-body p { margin: 0 0 10px; }
.list-title { font-weight: 600; color: var(--deep); text-align: left; margin-top: 14px !important; }
.ticks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; text-align: left; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; }
.ticks .ck { width: 20px; height: 20px; margin-top: 1px; }
.ticks .ck circle { stroke: var(--rose); } .ticks .ck path { stroke: var(--rose); }
.fine { font-size: 12.5px; color: var(--soft); margin: 8px 0 0; }
.fine.center { text-align: center; }

/* Invitación y gracias */
.invite { background: var(--card); border: 1px solid var(--beige); border-radius: 24px; padding: 30px 22px 24px; text-align: center; }
.diamond { display: grid; grid-template-columns: 1fr 14px 1fr; align-items: center; gap: 12px; margin: 14px 0; }
.diamond span { height: 1.5px; background: var(--rose); } .diamond i { width: 14px; height: 14px; background: var(--rose); transform: rotate(45deg); }
.invite-sub { font: 600 24px/1.2 var(--display); color: var(--soft); margin: 0 0 6px; }
.value { font: 600 20px/1.3 var(--display); color: var(--deep); } .value s { color: var(--soft); font-weight: 400; }
.done { width: 52px; height: 52px; margin: 0 auto 12px; }
.done circle { fill: none; stroke: var(--rose); stroke-width: 2; } .done path { fill: none; stroke: var(--rose); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.invite hr { border: 0; border-top: 1px solid var(--beige); margin: 22px 0 14px; }
.sig { display: flex; gap: 8px; align-items: center; justify-content: center; font: 600 13px/1 var(--sans); letter-spacing: .16em; color: var(--deep); margin: 0; }

@media (min-width: 560px) { #app { padding-inline: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Ajustes: encuadre de cejas, CTA fijo en resultados, notas alineadas a la izquierda */
.opt.rows .ph img, .opt.grid .ph img { object-position: 50% 22%; }
.results .cta { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 4; }
.match .note { text-align: left; }
.opt.list .otitle { font-weight: 500; }
