/* MEISEOL · «Encuentra tu perfume ✦» (SPEC2 §7.6) y las piezas que reutiliza «Encuentra tu rutina ✦» (preguntas, opciones,
   progreso, navegación y resultados). Sale de shop.css (§7.16: solo la descargan esas dos páginas) con las reglas en el
   mismo orden; las plantillas la enlazan justo detrás de shop.css. Propietario: S1-L (la rutina, S2, la reutiliza). */

/* ───── Tarjeta de producto ───── */
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.opt:has(input:focus-visible) .opt__box {
  outline: 3px solid var(--violet); outline-offset: 2px;
}
/* ───── «Encuentra tu perfume ✦» ───── */
.finder {
  position: relative; overflow: hidden; isolation: isolate; padding: 30px 0 64px;
  background:
    radial-gradient(55% 60% at 90% 8%, rgba(217, 208, 255, .85), transparent 70%),
    radial-gradient(45% 50% at 0% 70%, rgba(205, 238, 255, .8), transparent 70%),
    radial-gradient(40% 40% at 60% 100%, rgba(255, 117, 183, .12), transparent 70%),
    var(--milk);
}
.finder__bubble { position: absolute; z-index: -1; overflow: visible; aspect-ratio: 1; height: auto; }
.finder__bubble--a { width: 260px; right: -80px; top: 40px; animation: drift 18s ease-in-out infinite; }
.finder__bubble--b { width: 110px; left: -30px; top: 46%; animation: drift 13s ease-in-out -6s infinite reverse; }
.finder__head { max-width: 720px; margin-inline: auto; text-align: center; }
.finder__head .eyebrow { justify-content: center; }
.finder__title { margin-top: 12px; font-size: clamp(36px, 6.4vw, 62px); font-weight: 650; line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.finder__lead { max-width: 54ch; margin: 14px auto 0; color: var(--muted); font-size: 16.5px; }
.finder--results .finder__title { font-size: clamp(24px, 3vw, 30px); }
.finder--results .finder__lead { display: none; }
.finder__stage {
  max-width: 920px; margin: 26px auto 0; padding: 22px 18px;
  border: 1px solid rgba(118, 87, 255, .16); border-radius: 30px;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
.finder__stage.is-results { max-width: none; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.fstep__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fstep__count { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--violet-ink); }
.progress { display: flex; gap: 6px; }
.progress li { width: 34px; height: 6px; border-radius: 6px; background: rgba(27, 27, 27, .1); transition: background .3s; }
.progress li.is-done { background: var(--violet); }
.progress li.is-current { background: var(--grad-iris); }
.fstep__set { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.fstep__legend { padding: 0; }
.fstep__q { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; line-height: 1.12; letter-spacing: -.028em; outline: none; text-wrap: balance; }
.fstep__hint { margin: 6px 0 18px; font-size: 15px; color: var(--muted); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt__box {
  position: relative; display: flex; align-items: center; gap: 12px; height: 100%; min-height: 62px; padding: 10px 30px 10px 12px;
  border: 1.5px solid var(--line); border-radius: 18px; background: #fff;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .25s var(--ease);
}
.opt:hover .opt__box { border-color: rgba(118, 87, 255, .45); }
.opt input:checked + .opt__box { border-color: var(--graphite); background: var(--tint); box-shadow: inset 0 0 0 1px var(--graphite); }
.opt input:checked + .opt__box .opt__check { opacity: 1; transform: none; }
.opt__swatch {
  position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--fam-1) 38%, var(--fam-2) 100%);
  box-shadow: inset 0 0 0 1px rgba(27, 27, 27, .06);
}
.opt__icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--violet-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.opt__level { display: flex; align-items: flex-end; gap: 3px; width: 26px; height: 26px; flex: none; padding-bottom: 1px; }
.opt__level i { flex: 1; border-radius: 3px; background: rgba(118, 87, 255, .18); }
.opt__level i:nth-child(1) { height: 40%; }
.opt__level i:nth-child(2) { height: 70%; }
.opt__level i:nth-child(3) { height: 100%; }
.opt__level i.is-on { background: var(--grad); }
.opt__text { display: grid; gap: 1px; min-width: 0; }
.opt__label { font-size: 15px; font-weight: 700; line-height: 1.2; }
.opt__desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.opt__check {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--graphite); color: var(--milk); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease);
}
.opt__check .i { width: 13px; height: 13px; stroke-width: 3; }
.opt--any .opt__label { font-weight: 600; }
.fstep__error { min-height: 1.5em; margin-top: 12px; color: #B3261E; font-size: 14px; font-weight: 600; }
.fstep__error:empty { min-height: 0; margin: 0; }
.fnav { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.fnav__next { justify-self: end; }
.fnav__skip { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
.fnav .btn { min-height: 48px; }
/* Entre 380 y 419 px «Siguiente» sobresalía 2 px (medida de la puerta de S2); el mismo ajuste que la rutina. */
@media (min-width: 380px) and (max-width: 419.98px) { .finder .fnav :is(.fnav__back, .fnav__next) { gap: 8px; padding-inline: 16px; } }
.fres__head { display: grid; justify-items: center; gap: 10px; max-width: 780px; margin: 0 auto 26px; text-align: center; }
.fres__title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; outline: none; }
.fres__answers { display: grid; justify-items: center; gap: 8px; }
.fres__label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fres__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.fres__chips li { padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(118, 87, 255, .25); font-size: 13px; font-weight: 600; }
.fres__honest { display: flex; gap: 8px; align-items: flex-start; max-width: 60ch; padding: 10px 14px; border-radius: 14px; background: #FFF6E9; color: #5A3000; font-size: 14px; text-align: left; }
.fres__honest .i { width: 18px; height: 18px; color: var(--warn); }
.fres__none { text-align: center; color: var(--muted); }
.fres__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.fres__how { max-width: 64ch; margin: 18px auto 0; font-size: 13px; color: var(--muted); text-align: center; }
.why, .why__ideal { font-size: 13.5px; line-height: 1.5; }
.why__ideal { color: var(--muted); }
.why { padding: 10px 12px; border-radius: 14px; background: var(--tint); }
.why__k { font-weight: 700; color: var(--graphite); }
.why__spark { width: 11px; height: 11px; margin-right: 5px; vertical-align: 0; }
/* ───── Tableta ───── */
@media (min-width: 600px) {
  .grid--3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
  .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  .finder__stage { padding: 32px 36px; }
  .opts--aromas, .opts--momento, .opts--sensaciones { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opts--intensidad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fnav { display: flex; flex-wrap: wrap; }
  .fnav__next { margin-left: auto; }
  .opts--intensidad .opt__box { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 120px; padding: 16px; }
  .opts--intensidad .opt__check { top: 12px; right: 12px; }
}
/* ───── Escritorio ───── */
@media (min-width: 1000px) {
  .finder { padding-top: 40px; }
}
@media (forced-colors: active) {
  .opt__box { forced-color-adjust: auto; border: 1px solid CanvasText; }
}
/* ═════ S1 · fase 2b: ficha de las dos líneas, carrito, favoritos y hallazgos de QA de la fase 1. */
.finder__bubble { animation-iteration-count: 3; }
@media (max-width: 699.98px) {
  .finder__bubble--a { opacity: .35; }
}
.finder::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 253, 248, 0), var(--milk));
}
.finder > .wrap { position: relative; z-index: 1; }
/* Test: en resultados, la compra antes de la explicación; desde 1000 px, tarjeta horizontal con precio y «Añadir» en la
   primera pantalla; el encabezado repetido queda solo para lectores de pantalla [REQ-2, VIS-7] */
.finder--results .finder__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fres__grid .pcard { grid-template-areas: "media body" "buy buy" "extra extra"; }
.fres__grid .pcard__extra { order: 1; padding-bottom: 18px; }
.fres__grid .pcard__buy { margin-top: 0; }
@media (min-width: 1000px) {
  .fres__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fres__grid .pcard { display: grid; grid-template-columns: minmax(0, .38fr) minmax(0, .62fr); grid-template-areas: "media body" "media buy" "extra extra"; }
  .fres__grid .pcard__media { aspect-ratio: auto; height: 100%; min-height: 250px; border-radius: calc(var(--card-radius) - 1px) 0 0 0; }
  .fres__grid .pcard__body { padding-right: 64px; }
  .fres__grid .pcard__buy { align-self: end; padding-top: 6px; }
  .fres__grid .pcard__extra { padding: 4px 18px 18px; }
}
@media (min-width: 1000px) and (max-height: 820px) {
  .finder { padding-top: 24px; }
  .finder__title { font-size: clamp(36px, 4vw, 48px); }
  .finder__lead { display: none; }
  .finder__stage { margin-top: 18px; padding: 24px 32px; }
  .fnav { margin-top: 16px; padding-top: 14px; }
}
/* Test a 320-379 px: una columna y sin etiquetas que se salen de su caja [A11Y-7] */
.opt__label { hyphens: auto; }
.opt__text { overflow-wrap: anywhere; } /* último recurso: una palabra que no quepa se parte antes de pisar el ✓ o el borde */
@media (max-width: 379.98px) {
  .opts { grid-template-columns: 1fr; }
  .fnav { grid-template-columns: 1fr; }
  .fnav__next { justify-self: stretch; }
}
/* Opción estrecha (test y rutina, con 2-4 columnas): icono arriba y texto debajo, a todo el ancho; el ✓ va en la fila del
   icono y nunca pisa la etiqueta. Con descripción (los nombres de la rutina, como «Imperfecciones», son más largos), antes.
   Cada opción mide su propio ancho, así que vale para cualquier rejilla [G2R2-S1L-01]. */
.opt { container-type: inline-size; }
@container (max-width: 199.98px) {
  .opt__box { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .opt__check { top: 11px; right: 11px; }
}
@container (min-width: 200px) and (max-width: 219.98px) {
  .opt__box:has(.opt__desc) { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .opt__box:has(.opt__desc) .opt__check { top: 11px; right: 11px; }
}
