/* Quiz Nivora, con los colores de Laboratorios Nivora (marca inventada). */
:root {
  --navy: #0b1530;
  --card: #15214a;
  --card-line: #26366f;
  --blue: #1d4ed8;
  --blue-soft: #1e3a8a;
  --teal: #2dd4bf;
  --teal-dark: #0f766e;
  --green: #15803d;
  --red: #f87171;
  --muted: #b4c0e0;
  --bg: var(--navy);
  --ink: #fff;
  --page: #060c1d;
  --accent: var(--teal);
  --accent-ink: var(--navy);
  --accent-shadow: var(--teal-dark);
  --line: #fff;
  --field: #fff;
  --field-ink: var(--navy);
  --focus: #fde047;
}
.spacer { flex: 1; }
.app { overflow-x: clip; }
.screen { position: relative; z-index: 1; }

/* Los círculos del fondo */
.deco span { position: absolute; border-radius: 50%; pointer-events: none; }
.deco-a { width: 300px; height: 300px; top: -150px; right: -110px; background: var(--blue-soft); opacity: .55; }
.deco-b { width: 340px; height: 340px; bottom: -150px; left: -200px; background: var(--blue-soft); opacity: .35; }
.deco-c { width: 170px; height: 170px; top: 62%; right: -110px; border: 18px solid var(--blue-soft); opacity: .6; }

/* Logo y etiquetas */
.logo { display: flex; align-items: center; gap: 12px; font: 800 1.9rem/1 "Jakarta", sans-serif; letter-spacing: .14em; }
.leaf { width: 40px; height: 40px; flex: none; }
.logo-sm { font-size: 1.35rem; gap: 10px; }
.logo-sm .leaf { width: 30px; height: 30px; }
.logo-center { justify-content: center; font-size: 1.6rem; }
.chip {
  align-self: flex-start; padding: 6px 14px; border: 1px solid var(--card-line); border-radius: 999px;
  background: var(--card); font-weight: 700; font-size: .9rem;
}
.chip-strong { font: 800 1rem/1.2 "Jakarta", sans-serif; padding: 9px 16px; white-space: nowrap; }

/* Entrada */
.screen-start { padding-top: 32px; }
.start-title { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; }
.start-sub { font: 800 1.45rem/1.2 "Jakarta", sans-serif; color: var(--teal); margin-top: 6px; }
.start-lead { color: var(--muted); margin-top: 6px; }
.record { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 18px; background: var(--card); }
.record-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--teal); flex: none; }
.record-label { color: var(--muted); font-size: .95rem; }
.record-value { font: 800 1.7rem/1.1 "Jakarta", sans-serif; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field input { border-color: transparent; }
.check u { color: var(--teal); }
.check input { width: 26px; height: 26px; }
.pill-note { margin: 6px 0 0; display: table; letter-spacing: .06em; text-transform: uppercase; }
.pill-solid { background: #fff; color: var(--navy); border-color: #fff; }
.form-note { color: var(--muted); font-size: .88rem; }

/* Pregunta */
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.timer-row { display: flex; justify-content: space-between; align-items: flex-end; }
.timer-label { color: var(--muted); font-weight: 600; }
.timer-value { font: 800 2.6rem/1 "Jakarta", sans-serif; font-variant-numeric: tabular-nums; }
.timer-bar { height: 14px; margin-top: 8px; border-radius: 999px; background: var(--card-line); overflow: hidden; }
.timer-bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--teal); transition: width .1s linear; }
.timer-bar.is-low span { background: #fbbf24; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0;
  padding: 10px 16px; border: 1px solid var(--card-line); border-radius: 16px; background: var(--card);
}
.stat > span { color: var(--muted); font-weight: 600; }
.stat strong { font: 800 2rem/1.1 "Jakarta", sans-serif; font-variant-numeric: tabular-nums; }
.stat-col { flex-direction: column; align-items: flex-start; gap: 2px; }
.bolt { color: var(--teal); font-weight: 800; }
.segments { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; list-style: none; margin: 0; padding: 0; }
.segments li { height: 10px; border-radius: 999px; background: var(--card-line); }
.segments li.is-ok { background: var(--teal); }
.segments li.is-ko { background: repeating-linear-gradient(135deg, var(--red) 0 4px, #7f1d1d 4px 8px); }
.segments li.is-now { background: #fff; }

.ask, .feedback { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.q-card { padding: 20px; border-radius: 22px; background: #fff; color: var(--navy); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #dbe6ff; color: var(--blue); font-weight: 700; font-size: .85rem; }
.q-text { margin-top: 12px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.q-text:focus { outline: none; }
.answers { display: flex; flex-direction: column; gap: 10px; }
.answer {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px;
  border: 2px solid var(--card-line); border-radius: 18px; background: var(--card); color: #fff;
  text-align: left; font: 600 1.1rem/1.25 "Jakarta", sans-serif;
}
button.answer:hover { border-color: var(--teal); }
button.answer:active { transform: scale(.98); }
.letter {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue); color: #fff; font: 800 1.1rem/1 "Jakarta", sans-serif;
}
.answer-text { flex: 1; min-width: 0; }
.hint { text-align: center; color: var(--muted); font-size: .95rem; }

/* Acierto o fallo */
.fb-head { display: flex; align-items: center; gap: 14px; }
.fb-icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: var(--navy); font: 800 2rem/1 "Jakarta", sans-serif; }
.fb-icon.is-ko { background: var(--red); }
.fb-title { font-size: 2.2rem; font-weight: 800; }
.fb-title:focus { outline: none; }
.fb-streak { display: inline-block; margin-top: 4px; padding: 3px 12px; border: 2px solid var(--teal); border-radius: 999px; font-weight: 800; }
.fb-streak.is-ko { border-color: var(--red); }
.fb-q { color: var(--muted); }
.answers-done { gap: 8px; }
.answers-done .answer { min-height: 50px; padding: 8px 14px; font-size: 1rem; }
.answer.is-off { opacity: .7; }
.answer.is-off .letter { background: var(--card-line); width: 34px; height: 34px; }
.answer.is-right { background: var(--green); border-color: var(--green); font-weight: 800; }
.answer.is-right .letter { background: #fff; color: var(--green); }
.answer.is-wrong { border-color: var(--red); border-style: dashed; }
.answer.is-wrong .letter { background: var(--red); color: var(--navy); }
.answer small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; opacity: .9; }
.plus { flex: none; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--green); font: 800 1.3rem/1 "Jakarta", sans-serif; }
.why { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 18px; background: var(--card); }
.why-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-top: 2px; border: 2px solid var(--teal); border-radius: 50%; color: var(--teal); font-weight: 800; font-size: .8rem; }
.why-title { color: var(--teal); font-weight: 800; }
.why-text { font-size: 1.05rem; }
.fb-pause { text-align: center; color: var(--muted); font-size: .85rem; }
/* Siguiente siempre a mano, aunque la explicación sea larga. */
.feedback [data-next] { position: sticky; bottom: 12px; z-index: 2; }
.feedback { gap: 10px; }

/* Resultado */
.screen-result { text-align: center; padding-top: 28px; }
.res-hello { color: var(--muted); font: 700 1.15rem/1.2 "Jakarta", sans-serif; }
.res-hello:focus { outline: none; }
.res-points { position: relative; display: flex; flex-direction: column; align-items: center; }
.res-points strong { font: 800 5rem/1 "Jakarta", sans-serif; letter-spacing: -.04em; animation: grow .5s ease; }
.res-points > span:last-child { font: 800 1.6rem/1 "Jakarta", sans-serif; color: var(--teal); margin-top: 4px; }
@keyframes grow { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti i { position: absolute; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); }
.confetti i:nth-child(1) { left: 6%; top: 42%; }
.confetti i:nth-child(2) { left: 22%; top: 4%; width: 8px; height: 8px; background: #6b8cff; }
.confetti i:nth-child(3) { right: 8%; top: 60%; border-radius: 2px; transform: rotate(30deg); background: var(--blue); width: 16px; height: 16px; }
.confetti i:nth-child(4) { left: 12%; bottom: -14px; border-radius: 2px; background: #fff; transform: rotate(-20deg); }
.confetti i:nth-child(5) { right: 18%; bottom: -26px; background: none; border: 3px solid var(--teal); }
.res-place {
  align-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 999px;
  background: #fff; color: var(--navy); font: 800 1.35rem/1.2 "Jakarta", sans-serif;
}
.podium-ico { display: inline-flex; align-items: flex-end; gap: 2px; }
.podium-ico i { width: 6px; border: 2px solid currentColor; border-radius: 1px; }
.podium-ico i:nth-child(1) { height: 10px; } .podium-ico i:nth-child(2) { height: 16px; } .podium-ico i:nth-child(3) { height: 7px; }
.res-screen, .res-timeout { color: var(--muted); }
.res-timeout { font-size: .9rem; }
.screen-result .stats { text-align: left; }
.gift { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 22px; background: #fff; color: var(--navy); text-align: left; }
.gift-qr { flex: none; width: 112px; padding: 6px; border: 2px solid #e2e8f5; border-radius: 14px; }
.gift-qr .gg-qr { width: 100%; }
.gift-body { min-width: 0; }
.gift-tag { color: var(--blue); font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.gift-title { font: 800 1.2rem/1.2 "Jakarta", sans-serif; margin-top: 4px; }
.gift-label { color: #5b6585; font-size: .85rem; margin-top: 6px; }
.gift-code { display: inline-block; padding: 4px 12px; border-radius: 10px; background: #eef2ff; font: 800 1.5rem/1.2 "Jakarta", sans-serif; letter-spacing: .08em; white-space: nowrap; }
.btn-ghost { color: #fff; }

/* Ranking en el móvil */
.round-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: transparent; font: 800 1.1rem/1 "Jakarta", sans-serif; }
.rk-title { font-size: 2rem; font-weight: 800; }
.rk-title:focus { outline: none; }
.rk-lead { color: var(--muted); }
.rk-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--card-line); border-radius: 18px; background: var(--card); overflow: hidden; }
.rk-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--card-line); }
.rk-row:first-child { border-top: 0; }
.rk-row.is-me { background: var(--blue); }
.rk-pos { flex: none; width: 2.6em; color: var(--teal); font: 800 1.05rem/1 "Jakarta", sans-serif; }
.rk-row.is-me .rk-pos { color: #fff; }
.rk-who { flex: 1; min-width: 0; }
.rk-who strong, .rk-who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-who small { color: var(--muted); }
.rk-row.is-me .rk-who small { color: #dbe6ff; }
.rk-pts { font: 800 1.15rem/1 "Jakarta", sans-serif; font-variant-numeric: tabular-nums; }
.rk-me { padding: 12px 16px; border-radius: 16px; background: var(--blue); font-weight: 700; }

@media (max-width: 370px) {
  .start-title { font-size: 2.6rem; }
  .logo { font-size: 1.6rem; }
  .stat { padding: 10px 12px; }
  .stat strong { font-size: 1.7rem; }
  .res-points strong { font-size: 4.2rem; }
  .gift-qr { width: 92px; }
}
.nw { white-space: nowrap; }
