/* Poppins (SIL Open Font License 1.1) — subset latino: á é í ó ú ñ ¿ ¡ « » − · */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/poppins-800.woff2") format('woff2'); }

/* ==========================================================================
   Fanbag · Adiviná el regalo
   Mobile-first. El layout de desktop empieza en 1024px (ver bloque final).
   Índice (las fuentes @font-face van arriba de todo):
     1. Tokens y base         6. Puente al Nivel 2
     2. Utilidades            7. Nivel 2 · La Caja
     3. Componentes comunes   8. Pop-up con formulario
     4. Inicio                9. Desktop (>= 1024px)
     5. Casos (pregunta / error / acierto)
   ========================================================================== */

/* ---------- 1. Tokens y base ---------- */
:root {
  --blue: #0265DE;
  --blue-2: #3A7AED;
  --navy: #023F88;
  --tint: #EAF2FF;
  --tint-2: #F3F7FF;
  --line: #DCE3EF;
  --line-2: #B9CDF0;
  --track: #E6EDF8;
  --ink: #434040;
  --muted: #606060;
  --muted-2: #6B6B6B;
  --amber: #B54708;
  --amber-bg: #FFF4E5;
  --orange: #E8730C;
  --orange-ink: #8A3500;
  --orange-soft: #FFE8D2;
  --danger: #D92D20;
  --danger-ink: #B42318;
  --ok: #0B6B2E;
  --ok-bg: #EAFBEA;
  --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: #FFFFFF;
}

/* Fondos por pantalla (mobile). En desktop todo usa el degradé. */
html[data-screen="iniciojuego"] body,
html[data-screen="bienvenida"] body,
html[data-screen="puente"] body,
html[data-screen="gracias"] body {
  background: radial-gradient(ellipse 120% 40% at 50% 105%, #C9DFFF 0%, #FFFFFF 70%);
}

html[data-screen="iniciojuego"] .topbar { display: none; }

@media (max-width: 1023px) {
  html[data-screen="caso"][data-state="error"] body { background: #FFF7EF; }
  html[data-screen="caso"][data-state="right"] body { background: #F3F7FF; }
}

button { font-family: inherit; }
h1, h2, p { margin: 0; }
img { display: block; }
a { color: var(--navy); }
a:hover { color: var(--blue); }

:focus-visible { outline: 3px solid #7BA0FF; outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

body.modal-open { overflow: hidden; }

.app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.main { flex: 1; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; }
.screen[hidden], [hidden] { display: none !important; }

/* ---------- 2. Utilidades ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.accent { color: var(--blue-2); }
@media (max-width: 1023px) { .d-only { display: none !important; } }
@media (min-width: 1024px) { .m-only { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 3. Componentes comunes ---------- */

/* Barra superior */
.topbar {
  padding: 0 16px;
  background: #FFFFFF; border-bottom: 1px solid var(--track);
}
/* Mobile: fila 1 = logo + progreso; fila 2 = línea de tiempo */
.topbar__inner {
  width: 100%; max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 60px auto;
  align-items: center; column-gap: 10px;
}
.topbar__logo { height: 32px; width: auto; grid-row: 1; grid-column: 1; }
.stepper {
  grid-row: 2; grid-column: 1 / -1; display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 12px 0 12px 0;
}
.stepper__item { display: flex; align-items: center; gap: 8px; }
.stepper__text { display: flex; flex-direction: column; line-height: 1.25; }
.stepper__label { font-size: 11px; font-weight: 600; color: var(--muted-2); }
.stepper__name { font-size: 13px; font-weight: 700; }
.stepper__name--off { color: #606060; }
.stepper__line { flex: 0 1 44px; height: 2px; background: var(--line-2); }
html[data-screen="nivel2"] .topbar { display: none; }

.pill {
  grid-row: 1; grid-column: 2; justify-self: end;
  margin-left: auto; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--navy);
  background: var(--tint); border-radius: 999px; padding: 5px 10px;
}
.pill--solid { margin-left: 0; font-size: 13px; font-weight: 700; color: #FFFFFF; background: var(--blue); padding: 7px 14px; }

.dot {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--muted-2);
  border: 2px solid var(--line-2);
}
.dot--active { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.dot--done { background: var(--blue); border-color: var(--blue); color: #ffffff; }

/* Botones */
.btn {
  font-family: inherit; cursor: pointer; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 700; line-height: normal;
  padding: 12px 24px; text-align: center; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn--primary { color: #FFFFFF; background: var(--blue); }
.btn--primary:hover { color: #FFFFFF; background: #0157BF; }
.btn--ghost { color: var(--navy); background: #FFFFFF; border: 1.5px solid var(--line-2); font-weight: 600; padding: 12px 22px; }
.btn--ghost:hover { background: var(--tint); }
.btn--outline { color: var(--blue); background: #FFFFFF; border: 1px solid var(--blue); }
@media (hover: hover) { .btn--outline:hover { background: var(--tint); } }
.btn--lg { font-size: 17px; padding: 17px; box-shadow: 0 10px 24px rgba(2, 101, 222, .30); }
.btn--form { border-radius: 14px; font-size: 16px; padding: 15px 28px; box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn:active:not([disabled]) { transform: translateY(1px); }

/* Chips */
.chip-amber {
  align-self: flex-start;
  font-size: 13px; font-weight: 700; color: var(--amber);
  background: var(--amber-bg); border-radius: 999px; padding: 6px 14px;
}

.chip-amber.--small {
    align-self: flex-start;
    font-size: 13px; font-weight: 600; color: var(--navy);
    background: var(--tint); border-radius: 999px; padding: 6px 10px;
    line-height: 1.3;
}

.lead-form .chip-amber.--small { 
  margin-top: -5px;
}

.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #FFFFFF; font-weight: 700; font-size: 12px;
  border-radius: 999px; padding: 7px 14px;
}
.note { font-size: 13px; color: var(--muted-2); }

/* Barras de progreso */
.bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar--lg { height: 10px; }
.bar__fill { height: 100%; border-radius: 999px; transition: width .4s; }
.bar__fill--blue { background: var(--blue); }

/* Personajes */
.face { display: block; object-fit: contain; }

/* ---------- 4. Inicio ---------- */
.inicio {
  flex: 1; width: 100%; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px 20px 24px;
}
.inicio__intro, .inicio__picks { display: flex; flex-direction: column; gap: 16px; }
.inicio__picks { flex: 1; }
.inicio__picks .note { margin-top: auto; }

.hero { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.5px; }
.lead { font-size: 15px; line-height: 1.4; color: var(--muted); }
.picks__title { margin-top: 6px; font-size: 18px; font-weight: 700; }
.picks { display: flex; flex-direction: column; gap: 16px; }

.pick {
  display: flex; align-items: center; gap: 14px; text-align: left;
  color: var(--ink); background: #FFFFFF;
  border: 1.5px solid var(--line); border-radius: 18px;
  padding: 10px 14px 10px 10px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(58, 122, 237, .10);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pick:hover { border-color: var(--blue); box-shadow: 0 10px 26px rgba(58, 122, 237, .18); }
.pick__avatar {
  width: 68px; height: 68px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
  background-repeat: no-repeat; background-size: cover; background-position: center top;
}

.pick__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick__country {
  display: none; align-self: flex-start;
  font-size: 13px; font-weight: 700; color: var(--navy);
  background: var(--tint); border-radius: 999px; padding: 4px 12px; margin-bottom: 4px;
}
.pick__name { font-size: 16px; font-weight: 700; line-height: 1.25; }
.pick__meta { font-size: 13px; color: var(--muted); line-height: 1.15; }
.pick__cta {
  flex-shrink: 0; display: none; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: #FFFFFF;
  background: var(--blue); border-radius: 999px; padding: 12px 20px;
}
.pick__chev { flex-shrink: 0; }

/* ---------- 5. Casos ---------- */
.caso {
  flex: 1; width: 100%; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column;
}
.caso__photo {
  height: 300px; flex-shrink: 0; position: relative;
  display: flex; align-items: flex-end; justify-content: center;
}
.caso__avatar {
  width: 100%; height: 100%;
  background-repeat: no-repeat; background-size: cover; background-position: center top;
}
.caso[data-state="error"] .caso__avatar { filter: saturate(.2); }
.caso__country {
  position: absolute; top: 14px; left: 14px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: #FFFFFF; border-radius: 999px; padding: 5px 12px;
}
.photo-badge { display: none; }

.caso__body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 22px; }
.caso__name { font-size: 24px; font-weight: 700; }
.caso__meta { font-size: 14px; color: var(--muted); }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.trait {
  font-size: 12px; font-weight: 600; color: var(--navy);
  background: var(--tint); border-radius: 999px; padding: 5px 10px;
}
.q { display: flex; flex-direction: column; gap: 14px; }
.q__title { font-size: 16px; font-weight: 700; }
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  font-size: 15px; font-weight: 600; color: var(--ink);
  background: #FFFFFF; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 12px 14px; min-height: 56px; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  line-height: 1.25;
}
.option:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(58, 122, 237, .12); }
.option__letter {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #FFFFFF; font-weight: 700; font-size: 14px;
}

/* Estados del caso: en mobile, error y acierto son pantalla completa */
.caso[data-state="question"] .fb { display: none; }
.caso[data-state="error"] .q,
.caso[data-state="right"] .q { display: none; }
.caso[data-state="error"] #caso-right,
.caso[data-state="right"] #caso-error { display: none; }
.caso[data-state="error"] .caso__photo,
.caso[data-state="error"] .caso__head,
.caso[data-state="error"] .traits,
.caso[data-state="right"] .caso__photo,
.caso[data-state="right"] .caso__head,
.caso[data-state="right"] .traits { display: none; }
.caso[data-state="error"] .caso__body,
.caso[data-state="right"] .caso__body { padding: 36px 24px 28px; }

.fb { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.fb__main { display: flex; flex-direction: column; gap: 20px; }
.fb__icon {
  width: 55px; height: 55px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.fb__icon--error { background: var(--orange); }
.fb__icon--right { background: #009e3b; }
.fb__title { font-size: 44px; line-height: 1.1; font-weight: 700; }
.fb--error .fb__title { color: var(--orange-ink); }
.fb--right .fb__title { color: var(--navy); }
.chosen {
  display: flex; align-items: center; gap: 10px;
  background: #FFFFFF; border: 1px solid #F3D9C2; border-radius: 14px; padding: 12px 14px;
}
.chosen__letter {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--orange-ink); font-weight: 700; font-size: 13px;
}
.chosen__text { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: line-through; }
.fb__text { font-size: 18px; line-height: 1.4; font-weight: 500; }
.fb__note {
  display: block; margin-top: 20px;
  font-size: 16.5px; line-height: 1.4; font-weight: 400; color: var(--muted);
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
}
.fb__right { font-size: 15.5px; line-height: 1.5; color: var(--muted); padding: 12px 15px; background-color: #ecfff3; border-radius: 10px; border: 1px solid #b5e6c7; width: fit-content; }
.fb__right strong { color: #009e3b; }
.fb__btn { width: 100%; }

/* ---------- 6. Puente al Nivel 2 ---------- */
.puente {
  flex: 1; width: 100%; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 32px 24px 28px;
}

.screen.--intro .puente { justify-content: center; }
.screen.--intro .puente__main { gap: 0px; align-items: center; }
.screen.--intro .pill { margin-left: 0; font-size: 14px; }
.screen.--intro .topbar__logo {  height: 50px; margin-bottom: 50px; }
.screen.--intro .pill { margin-bottom: 10px; }
.screen.--intro .puente__actions { margin-top: 35px; }
.screen.--intro .puente__actions .btn { width: fit-content; margin: 0 auto; padding-left: 30px; padding-right: 30px; }
    

.puente__main { display: flex; flex-direction: column; gap: 18px; }
.puente__title { font-size: 32px; line-height: 1.12; font-weight: 700; text-align: center; }
.puente__text { font-size: 16px; line-height: 1.55; color: var(--muted); }
.puente__team {
  list-style: none; margin: 15px 0 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.puente__team li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.puente__team img { width: 60px; height: 60px; border-radius: 999px; }
.puente__name { font-size: 13px; font-weight: 700; }
.puente__role { display: none; font-size: 13px; color: var(--muted); }
.puente__actions { display: flex; flex-direction: column-reverse; gap: 12px; }
.puente__actions .btn { width: 100%; border: 1px solid transparent; }
.puente__actions .btn--outline { border-color: var(--blue); }

/* ---------- 7. Nivel 2 · La Caja ---------- */
.game { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 0 0 95px; }

/* En mobile, header + medidor quedan fijos arriba para ver las reacciones mientras se suma */
.game__top {
  position: sticky; top: 0; z-index: 15;
  background: #FFFFFF; box-shadow: 0 6px 16px rgba(58, 122, 237, .10);
}
.game__header { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 8px; }
.game__brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.game__logo { height: 26px; width: auto; }
.game__grid { display: flex; flex-direction: column; }
.budget { display: flex; flex-direction: column; gap: 6px; padding: 8px 0px; }
.budget__row { display: flex; justify-content: space-between; font-size: 13px; }
.budget__total { font-weight: 600; }
.budget__left { color: var(--muted); }
.budget__left strong { color: var(--blue); }

/* Acciones: barra fija abajo en mobile */
.game__actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 18;
  display: flex; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #FFFFFF; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 16px rgba(58, 122, 237, .08);
}
.game__actions .btn { flex: 1; }

/* Medidor de felicidad */
.meter { padding: 6px 15px 15px 15px; }
.meter__head { display: none; }
.meter__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mate { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.mate__face { width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; }
.mate__info { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mate__row { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.mate__name { font-size: 12px; font-weight: 700; }
.mate__pct { font-size: 13px; font-weight: 700; }
.mate .bar { height: 6px; margin: 5px 0 0 0;}
.mate__sub { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 18px; }
.mate__quote, .mate__role { display: none; }
.mate__role { display: block; font-size: 12px; line-height: 1.15; margin-top: 3px; }
.delta {
  flex-shrink: 0; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}
.delta--up { color: #023F88; background: #DCE9FF; }
.delta--down { color: #8A3500; background: #FFE8D2; }

/* Productos */
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.section-head__title { font-size: 18px; font-weight: 700; }
.section-head__hint { font-size: 13px; color: var(--muted-2); }
.products { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 0; order: 2 }
.products .game__actions { display: none; }
.products__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.product {
  display: flex; gap: 12px; align-items: center; text-align: left;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 14px; min-height: 64px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(58, 122, 237, .08);
  transition: border-color .15s ease, transform .15s ease;
}
.product:hover:not([disabled]) { border-color: var(--blue); }
.product[disabled] { cursor: default; opacity: .45; }
.product[draggable="true"]:not([disabled]) { cursor: grab; }
.product__icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--tint);
  display: flex; align-items: center; justify-content: center;
}
.product__text { min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
.product__name { grid-column: 1 / -1; }
.product__name { font-size: 15px; font-weight: 600; color: var(--ink); }
.product__price { font-size: 14px; font-weight: 700; color: var(--blue); }
.product__status { font-size: 12px; color: var(--muted-2); }

/* La caja */
.box {
  margin: 25px 16px 25px 16px;
  display: flex; flex-direction: column; gap: 14px; min-height: 200px;
  padding: 16px; border-radius: 24px;
  border: 2.5px dashed #9EBEFF; background: var(--tint-2);
  transition: background .2s, border-color .2s;
  order: 1;
}
.box--over { border-color: var(--blue); background: #DCE9FF; }
.box__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-direction: column; align-items: flex-start; }
.box__title { display: flex; align-items: center; gap: 10px; }
.box__title h2 { font-size: 16px; font-weight: 700; }
.box__count { font-size: 13px; color: var(--muted); text-align: right; }
.box__empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted-2); text-align: center; padding: 12px 0;
}
.box__empty-title { font-size: 17.5px; font-weight: 600; }
.box__empty-text { font-size: 14px; line-height: 1.3; }
.box__items { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.chip-item {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 14px; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(58, 122, 237, .10);
}
.chip-item__remove {
  width: 32px; height: 32px; border-radius: 999px; border: 0; padding: 0;
  background: var(--tint); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chip-item__remove:hover { background: #DCE9FF; }
/* Validación: caja vacía al enviar */
.box--error { border-color: var(--danger); background: #FFF8F7; }
.box__error {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--danger-ink);
  background: #FEF3F2; border-radius: 12px; padding: 10px 14px;
}
.box__error svg { flex-shrink: 0; }
.box__hint {
  margin-top: auto; font-size: 15px; line-height: 1.45; color: var(--navy);
  background: var(--tint); border-radius: 15px; padding: 12px 15px; font-weight: 500;
}

/* Reacciones (mobile) */
.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 19;
  max-width: 536px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 6px;
  background: #10244A; color: #FFFFFF; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 14px 32px rgba(16, 36, 74, .35); font-size: 13px; line-height: 1.35;
}
.toast__row { display: flex; align-items: baseline; gap: 8px; }
.toast__name { font-weight: 700; min-width: 58px; }
.toast__delta { font-weight: 700; min-width: 30px; }
.toast__delta--up { color: #9CC4FF; }
.toast__delta--down { color: #FFB877; }

/* ---------- 8. Pop-up con formulario ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: stretch; justify-content: center;
  background: rgba(16, 36, 74, .55);
}
.modal__dialog {
  width: 100%; max-width: 900px; display: flex; flex-direction: column;
  background: #FFFFFF; overflow: hidden;
}
.modal__head {
  flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; background: linear-gradient(120deg, #0065DE 0%, #77AFFF 100%);
}
.modal__logo { height: 28px; width: auto; }
.modal__tools { display: flex; align-items: center; gap: 12px; }
.modal__tools .faces { display: none; }
.modal__close {
  width: 36px; height: 36px; flex-shrink: 0; border: 0; padding: 0; cursor: pointer; border-radius: 999px;
  background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.modal__close:hover { background: rgba(255, 255, 255, .38); }
.modal__close:focus-visible { outline-color: #FFFFFF; }
.faces { display: flex; gap: 8px; }
.faces__item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.faces__item img { width: 36px; height: 36px; }
.faces__pct { font-size: 11px; font-weight: 700; color: #FFFFFF; }
.modal__body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 28px;
}
.modal__title { font-size: 22px; line-height: 1.2; font-weight: 700; }
.modal__text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.modal__images { display: none; }
.lead-form { display: flex; flex-direction: column; gap: 18px; position: relative; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 15px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field select {
  width: 100%; height: 46px; font-family: inherit; font-size: 16px; color: var(--ink);
  background: #FFFFFF; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 11px 14px;
  outline-color: var(--blue);
}
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.field input::placeholder { color: #8C8C8C; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { font-size: 12px; font-weight: 500; color: var(--danger-ink); }
.field__error:empty { display: none; }
.form-foot { display: flex; flex-direction: column; gap: 14px; }
.consent { display: flex; flex-direction: column; gap: 4px; }
.consent__label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent__label input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--blue); }
.consent__error { padding-left: 30px; }
.form-error { font-size: 14px; font-weight: 600; color: var(--danger-ink); background: #FEF3F2; border-radius: 12px; padding: 10px 14px; }

.modal.--event .modal__text { flex: 100%; }
.modal.--event .form-foot { margin-top: 35px; flex-direction: column-reverse; }
.modal.--event .modal__body { position: relative; }
.modal.--event .modal__images { display: block; width: 250px; margin: 0 auto; }

/* Página de gracias (gracias.blade.php) */
.gracias {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 32px 20px;
}
.gracias__logo { height: 34px; width: auto; }
.gracias__card {
  width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 16px;
  background: #FFFFFF; border-radius: 28px; padding: 20px;
  box-shadow: 0 30px 80px rgba(2, 40, 100, .12);
}

/* Variante mailing (se muestra solo si se activa con FANBAG.activarMailing) */
.mail-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  background: var(--tint-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px;
}
.mail-card__avatar {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #FFFFFF; font-weight: 700; font-size: 16px;
}
.mail-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-card__label { font-size: 12px; font-weight: 600; color: var(--blue); }
.mail-card__name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.mail-card__detail { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.mail-card__not {
  flex-basis: 100%; text-align: left; padding: 6px 0 2px 64px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--navy);
  background: none; border: 0; text-decoration: underline; cursor: pointer;
}
.mail-card__detail:empty { display: none; }
.mail-foot { display: flex; flex-direction: column; gap: 14px; }
.mail-foot__btn { width: 100%; }

.thanks { display: flex; flex-direction: column; gap: 16px; }
.thanks__box { display: flex; gap: 18px; align-items: flex-start; background: var(--ok-bg); border-radius: 20px; padding: 20px; }
.thanks__icon {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 999px; background: var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.thanks__text { display: flex; flex-direction: column; gap: 8px; }
.thanks__title { font-size: 22px; font-weight: 700; color: var(--ok); }
.thanks__msg { font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.thanks__link { align-self: stretch; display: block; margin: 0 auto; }

.prestadores__miscelaneas {
        position: absolute;
        z-index: -1;
        opacity: 0.4;
    }

    .prestadores__miscelaneas.--left {
        left: 0rem;
        top: -1rem;
        width: 150px;
    }

    .prestadores__miscelaneas.--right {
        right: 0;
        bottom: 0rem;
        width: 175px;
    }

    .prestadores__miscelaneas.--right-dos {
        right: 0;
        bottom: 0rem;
        width: 160px;
        z-index: 1;
    }

    @media screen and (max-width: 768px) {
      .prestadores__miscelaneas {
          opacity: 0.6;
      }

      .prestadores__miscelaneas.--left {
          width: 120px;
      }

      .prestadores__miscelaneas.--right {
          bottom: 0rem;
          width: 140px;
      }

      .prestadores__miscelaneas.--right-dos {
          width: 140px;
      }
    }

    @media screen and (max-width: 481px) {
      .prestadores__miscelaneas {
          opacity: 0.35;
          z-index: 1;
      }

      .prestadores__miscelaneas.--left {
          width: 80px;
      }

      .prestadores__miscelaneas.--right {
          bottom: 0rem;
          width: 90px;
      }

      .prestadores__miscelaneas.--right-dos {
          width: 90px;
      }
    }

/* Tablet chica: el pop-up pasa a ser una tarjeta centrada */
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal__dialog { border-radius: 28px; max-height: 100%; box-shadow: 0 30px 80px rgba(2, 40, 100, .35); }
  .modal__head { padding: 15px 20px; }
  .modal__logo { height: 35px; }
  .modal__close { width: 40px; height: 40px; }
  .faces__item img { width: 44px; height: 44px; }
  .faces__pct { font-size: 12px; }
  .modal__body { padding: 26px 36px 30px; }
  .modal__title { font-size: 28px; }
  .modal__text { font-size: 16px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 65%; }
  .modal__images { display: block; position: absolute; width: 220px; right: 20px; height: auto; bottom: 60px;}
  .modal.--event .modal__images { position: absolute; width: 250px; right: 15px; height: auto; bottom: 0px; }
  .modal.--event .modal__title { width: 70%; }
  .modal.--event .modal__text { width: 60%; }
  .modal.--event .form-foot { flex-direction: column;   align-items: flex-start;}

  .field input[type="text"], .field input[type="email"], .field select { font-size: 15px; }
  .form-foot { flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; }
  .form-foot .btn { flex-shrink: 0; }
  .thanks__link { align-self: flex-start; display: inline-block; }
  .mail-card { flex-wrap: nowrap; }
  .mail-card__not { flex-basis: auto; padding: 10px 4px; flex-shrink: 0; }
  .mail-foot { flex-direction: row; align-items: flex-end; gap: 16px; }
  .mail-foot__field { width: 360px; }
  .mail-foot__btn { width: auto; flex-shrink: 0; height: 46px; padding: 0 28px; }
  .thanks__box { padding: 24px 26px; }
  .gracias__card { padding: 32px; }
  .gracias__logo { height: 38px; }
}

/* Mobile ancho (tablet vertical): productos en 2 columnas */
@media (min-width: 560px) and (max-width: 1023px) {
  .products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 9. Desktop (>= 1024px) ---------- */
@media (min-width: 1024px) {

  body,
  html[data-screen] body {
    background: radial-gradient(ellipse 90% 45% at 50% 108%, #C9DFFF 0%, #FFFFFF 70%);
    background-attachment: fixed;
  }

  .app {
    max-width: 1440px; margin: 0 auto;
    padding: 28px 72px 48px; gap: 28px;
  }
  html[data-screen="nivel2"] .app { padding: 24px 48px 32px; gap: 0; }

  /* Barra superior */
  .topbar { padding: 0; background: none; border: 0; }
  .topbar__inner {
    max-width: none; gap: 24px; grid-template-rows: auto;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .topbar__logo { height: 38px; grid-row: auto; grid-column: auto; }
  .stepper { grid-row: auto; grid-column: auto; gap: 14px; padding: 0; }
  .stepper__item { gap: 10px; }
  .stepper__label { font-size: 12px; }
  .stepper__name { font-size: 15px; }
  .stepper__line { flex: none; width: 64px; }
  .dot { width: 32px; height: 32px; font-size: 14px; }
  .pill { grid-row: auto; grid-column: auto; justify-self: end; margin-left: 0; font-size: 14px; padding: 9px 16px; }

  .btn--lg { font-size: 18px; padding: 16px 36px; }

  /* Inicio */
  .inicio {
    max-width: none; padding: 0; gap: 72px; align-items: center;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
  .inicio__intro { gap: 26px; }
  .badge { font-size: 15px; gap: 10px; padding: 10px 20px; }
  .hero { font-size: 50px; letter-spacing: -1px; line-height: 1.08; }
  .lead { font-size: 21px; }
  .levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 15px; }
  .level-card {
    background: #FFFFFF; border: 1px solid var(--line); border-radius: 18px;
    padding: 18px 22px; box-shadow: 0 8px 24px rgba(58, 122, 237, .10);
  }
  .level-card__label { font-size: 13px; font-weight: 600; color: var(--blue); }
  .level-card__text { font-size: 16px; line-height: 1.3; margin-top: 4px; font-weight: 500; }
  .note { font-size: 15px; }
  .inicio__picks { flex: none; }
  .inicio__picks .note { margin-top: 0; font-size: 14px; }
  .picks__title { margin-top: 0; font-size: 24px; }
  .pick { gap: 20px; border-radius: 24px; padding: 14px 22px 14px 14px; box-shadow: 0 10px 28px rgba(58, 122, 237, .10); }
  .pick:hover { transform: translateY(-2px); }
  .pick__avatar { width: 120px; height: 120px; border-radius: 20px; }
  .pick__info { gap: 6px; }
  .pick__country { display: inline-block; margin-bottom: 0; }
  .pick__name { font-size: 19.5px; }
  .pick__meta { font-size: 15px; }
  .pick__cta { display: flex; }

  /* Casos: foto a la izquierda, contenido a la derecha */
  .caso {
    max-width: none; display: grid; gap: 64px; align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
  .caso__photo { height: auto; min-height: 520px; border-radius: 32px; overflow: hidden; }
  .caso__avatar { width: 100%; height: 100%; }
  .caso__country { top: 22px; left: 22px; font-size: 14px; padding: 7px 16px; }
  .caso__body { padding: 0; justify-content: center; gap: 22px; }
  .caso__name { font-size: 44px; line-height: 1.1; letter-spacing: -.5px; }
  .caso__meta { font-size: 18px; margin-top: 6px; }
  .trait { font-size: 14px; padding: 7px 14px; }
  .traits { gap: 8px; }
  .q { gap: 14px; }
  .q__title { font-size: 22px; }
  .options { gap: 14px; }
  .option { gap: 16px; font-size: 18px; border-radius: 20px; padding: 16px 20px; min-height: 72px; box-shadow: 0 8px 20px rgba(58, 122, 237, .08); }
  .option__letter { width: 40px; height: 40px; font-size: 16px; }

  /* En desktop los resultados conservan foto, nombre y rasgos */
  .caso[data-state="error"] .caso__photo,
  .caso[data-state="right"] .caso__photo { display: flex; }
  .caso[data-state="error"] .caso__head,
  .caso[data-state="right"] .caso__head { display: block; }
  .caso[data-state="error"] .traits,
  .caso[data-state="right"] .traits { display: flex; }
  .caso[data-state="error"] .caso__body,
  .caso[data-state="right"] .caso__body { padding: 0; }
  .caso[data-state="error"] .photo-badge--error,
  .caso[data-state="right"] .photo-badge--right {
    position: absolute; right: 28px; bottom: 28px;
    width: 96px; height: 96px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
  }
  .photo-badge--error { background: var(--orange); box-shadow: 0 12px 30px rgba(138, 53, 0, .30); }
  .photo-badge--right { background: #009e3b; box-shadow: 0 12px 30px rgba(2, 101, 222, .30); }

  .fb { flex: none; justify-content: flex-start; gap: 16px; }
  .fb__main { gap: 16px; margin-bottom: 20px; }
  .fb__icon { display: none; width: 84px; height: 84px; }
  .chosen { gap: 12px; border-radius: 16px; padding: 12px 16px; }
  .chosen__letter { width: 32px; height: 32px; font-size: 14px; }
  .chosen__text { font-size: 16px; }
  .fb__text { font-size: 21px; }
  .fb__note { display: inline; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; }
  .fb__right { font-size: 17.5px; margin-top: 10px; padding: 12px 15px; }
  .fb__btn { width: auto; align-self: flex-start; padding: 16px 36px; box-shadow: none; }

  /* Puente */
  .puente {
    max-width: none; align-items: center; justify-content: center; text-align: center; gap: 26px; padding: 0;
  }
  .puente__main { align-items: center; gap: 26px; }
  .chip-amber { font-size: 15px; padding: 8px 18px; }
  .chip-amber.--small { font-size: 14px; padding: 8px 15px; }
  .puente__main .chip-amber { align-self: center; }
  .puente__title { max-width: 980px; font-size: 50px; letter-spacing: -1px; line-height: 1.08; }
  .puente__text { max-width: 720px; font-size: 21px; line-height: 1.5; }
  .puente__team { gap: 28px; margin: 20px 0 6px 0; width: fit-content; }
  .puente__team img { width: 84px; height: 84px; }
  .puente__team li { gap: 8px; }
  .puente__name { font-size: 15px; }
  .puente__role { display: block; transform: translate(0px, -6px); }
  .puente__actions { flex-direction: row; gap: 16px; margin-top: 20px; }
  .puente__actions .btn { width: auto; font-size: 19px; padding: 17px 40px; }

  /* Nivel 2 */
  .game { padding: 0; gap: 35px; max-width: none; margin: 0; }
  .section-head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .game__top { position: static; background: none; box-shadow: none; display: flex; flex-direction: column; gap: 20px; }
  .game__header {
    flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; padding: 0;
  }
  .game__brand { gap: 16px; justify-content: flex-start; }
  .game__logo { height: 36px; }
  .budget { flex: 1; max-width: 520px; gap: 6px; }
  .budget__row { font-size: 14px; }
  .game__actions {
    position: static; padding: 0; background: none; border: 0; box-shadow: none; gap: 12px;
  }
  .game__actions .btn { flex: none; }
  .game__actions .btn--primary { padding: 12px 24px; }

  .meter {
    padding: 18px 24px; background: #FFFFFF; border: 1px solid var(--line);
    border-radius: 20px; box-shadow: 0 10px 28px rgba(58, 122, 237, .08);
  }
  .meter__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
  .meter__title { font-size: 18px; font-weight: 700; }
  .meter__summary { font-size: 14px; color: var(--muted); }
  .meter__summary strong { color: var(--ink); }
  .meter__grid { gap: 20px; }
  .mate { flex-direction: row; align-items: center; gap: 8px; text-align: left; }
  .mate__face { width: 68px; height: 68px; }
  .mate__info { flex: 1; gap: 5px; }
  .mate__row { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 8px; }
  .mate__name { font-size: 15px; }
  .mate__pct { font-size: 15px; }
  .mate .bar { height: 8px; margin: 0px; }
  .mate__sub { justify-content: flex-start; min-height: 40px; gap: 6px; }
  .mate__quote, .mate__role {
    display: block; font-size: 13px; color: var(--muted); overflow: hidden; line-height: 1.25; margin-top: 0px;
  }

  .mate__role { color: var(--muted-2); }
  .delta { font-size: 12px; padding: 2px 8px; }

  .game__grid {
    flex-direction: column; flex: 1; min-height: 0; display: grid; gap: 24px; align-items: stretch;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
  .products { padding: 0; gap: 18px; min-height: 0; order: 1 }
  .products .game__actions { display: flex; margin-top:30px; width: 100%; justify-content: space-between; }
  .game__header .game__actions { display: none; }
  .products__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
  .product { padding: 12px 14px; min-height: 76px; }
  .product__text { display: flex; flex-direction: column; gap: 2px; }
  .product__icon { width: 48px; height: 48px; }
  .box { margin: 0; padding: 20px 24px; min-height: 0; order: 2; }
  .box__head { flex-direction: row; align-items: center; }
  .box__title h2 { font-size: 18px; }
  .box__count { font-size: 14px; }
  .box__empty-title { font-size: 19.5px; }
  .toast { display: none !important; }

  /* Pop-up */
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 60%; }

  .screen.--intro .puente { gap: 0px; margin-top: -35px; }
  .screen.--intro .puente__main { gap: 0px; }
  .screen.--intro .topbar__logo {  height: 60px; margin-bottom: 65px; }
  .screen.--intro .pill { margin-bottom: 12px; }
  .screen.--intro .puente__actions { margin-top: 45px; }
}


/* Transición bienvenida → inicio */

#screen-iniciojuego > * { transition: transform .45s ease, opacity .45s ease; }
#screen-iniciojuego.is-leaving > * { transform: scale(.94); opacity: 0; }

.wipe { position: fixed; inset: 0; z-index: 100; background: var(--blue); pointer-events: none; }
.confetti { position: fixed; z-index: 101; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
#screen-inicio:not([hidden]) .inicio__intro > *,
#screen-inicio:not([hidden]) .pick { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
#screen-inicio:not([hidden]) .inicio__intro > :nth-child(2) { animation-delay: .08s; }
#screen-inicio:not([hidden]) .inicio__intro > :nth-child(3) { animation-delay: .16s; }
#screen-inicio:not([hidden]) .inicio__intro > :nth-child(4) { animation-delay: .24s; }
#screen-inicio:not([hidden]) .pick:nth-child(1) { animation-delay: .2s; }
#screen-inicio:not([hidden]) .pick:nth-child(2) { animation-delay: .3s; }
#screen-inicio:not([hidden]) .pick:nth-child(3) { animation-delay: .4s; }