/* =========================================================
   Crono · temporizador de aula
   Lienzo fijo de 1672×941 (mismo tamaño que las imágenes de
   referencia) que se escala para llenar la pantalla.
   ========================================================= */

:root {
  --navy: #13204a;
  --navy-soft: #1f3550;
  --ink: #2a3348;
  --muted: #4c5568;
  --cream: #fbf6ee;
  --cream-2: #fdfaf4;
  --line: #e4ddd2;

  --teal: #10abd3;
  --teal-dark: #0b8fb3;
  --teal-soft: #e6f6fb;
  --mint: #1cb894;
  --mint-dark: #13a07f;
  --coral: #f0625a;
  --coral-dark: #db4d45;
  --maze-teal: #18afb0;
  --yellow: #f5c242;

  --ok: #3dae48;
  --half: #f7941d;
  --low: #e8413c;
  --ok-tint: #f1f1ef;
  --half-tint: #fdf0df;
  --low-tint: #fce6e3;

  --font-title: "Fredoka", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  --font-text: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-chalk: "Gochi Hand", "Comic Sans MS", cursive;

  --shadow: 0 18px 40px rgba(60, 45, 20, 0.12), 0 2px 6px rgba(60, 45, 20, 0.08);
  --shadow-btn: 0 8px 0 rgba(0, 0, 0, 0.12), 0 14px 24px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #f4ece0;
  color: var(--ink);
  font-family: var(--font-text);
  overflow: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 5px solid #ffb703; outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Lienzo escalado ---------- */
.viewport {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, #fbf5ea, #efe4d3);
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1672px;
  height: 941px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: 50% 50%;
  overflow: hidden;
  background: var(--cream);
  border-radius: calc(18px / var(--scale, 1));
}

:fullscreen .stage { border-radius: 0; }

.stage svg { display: block; }

/* =========================================================
   Pantalla de configuración (imágenes 2 y 4)
   ========================================================= */
.setup {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 90%, rgba(130, 180, 110, 0.25), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(120, 190, 120, 0.22), transparent 26%),
    linear-gradient(180deg, #f6eee2 0%, #efe3d1 100%);
}

.setup[hidden], .run[hidden] { display: none; }

.setup__card {
  position: absolute;
  left: 84px;
  top: 36px;
  width: 1510px;
  height: 822px;
  border-radius: 38px;
  background: var(--cream-2);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 690px 1fr;
}

.setup__left {
  position: relative;
  padding: 34px 26px 0 40px;
  border-right: 2px solid #ece6dc;
}

.setup__title {
  margin: 0 0 22px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 57px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: #0f1730;
}

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  height: 334px;
  padding: 18px 20px 16px;
  text-align: left;
  border: 3px solid #ebe6de;
  border-radius: 24px;
  background: #fffdf9;
  transition: border-color .2s, background-color .2s, transform .15s;
}
.mode-card:hover { transform: translateY(-2px); }
.mode-card[aria-checked="true"] {
  border-color: #23b8d9;
  background: #e8f7fb;
}

.mode-card__head {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 30px;
  color: var(--navy);
}

.radio {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #c9ccd3;
  background: #fff;
  flex: none;
  position: relative;
}
.mode-card[aria-checked="true"] .radio {
  border: 0;
  background: #19b5d8;
}
.mode-card[aria-checked="true"] .radio::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #fff;
}

.mode-card__thumb {
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  background: #ececea;
}
.mode-card__thumb svg { width: 100%; height: 100%; }

.mode-card__text {
  font-size: 20px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}

/* Chips de escena */
.scenes {
  display: flex;
  gap: 10px;
  margin: 16px 0 6px;
  transition: opacity .2s;
}
.scenes[data-disabled="true"] { opacity: .45; }

.scene-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 8px;
  border-radius: 26px;
  border: 2px solid #e4e0d8;
  background: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
  white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}
.scene-chip svg { width: 30px; height: 30px; flex: none; }
.scene-chip[aria-checked="true"] {
  background: #e8f7fb;
  border-color: #23b8d9;
}

.field-label {
  display: block;
  margin: 10px 0 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 25px;
  color: var(--navy);
}

.duration {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 94px;
  padding: 0 10px 0 22px;
  border: 3px solid #dfe1e6;
  border-radius: 20px;
  background: #fff;
}
.duration:focus-within { border-color: #23b8d9; }

.duration__input {
  width: 200px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 62px;
  letter-spacing: 1px;
  color: #0f1730;
  font-variant-numeric: tabular-nums;
}

.duration__presets {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.duration__presets button {
  width: 52px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: #f1f2f4;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
}
.duration__presets button:hover,
.duration__presets button[aria-pressed="true"] { background: #d8f1f8; }

.duration__arrows {
  display: flex;
  flex-direction: column;
  width: 52px;
  height: 74px;
  border-radius: 14px;
  background: #eef0f3;
  overflow: hidden;
}
.duration__arrows button {
  flex: 1;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
}
.duration__arrows button:hover { background: #dfe3e8; }
.duration__arrows svg {
  width: 28px; height: 28px;
  fill: none; stroke: #6a7385; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

.btn-start {
  position: absolute;
  left: 40px;
  right: 26px;
  bottom: 38px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, #13b9e0, #08a6d0);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 46px;
  box-shadow: 0 6px 0 #0789ad, 0 14px 26px rgba(8, 140, 180, .28);
  transition: transform .12s, box-shadow .12s;
}
.btn-start:active { transform: translateY(4px); box-shadow: 0 2px 0 #0789ad; }
.btn-start svg { width: 52px; height: 52px; fill: #fff; }

/* Columna derecha */
.setup__right {
  position: relative;
  padding: 38px 28px 0 22px;
}

.preview {
  position: relative;
  height: 536px;
}
.preview__tag {
  position: absolute;
  left: 6px;
  top: -18px;
  z-index: 2;
  padding: 10px 34px;
  border-radius: 26px;
  background: var(--navy-soft);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 26px;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.preview__scene {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  overflow: hidden;
  background: #dfe9ee;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.preview__scene svg { width: 100%; height: 100%; }

.strip {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: center;
  margin-top: 26px;
  height: 192px;
}
.strip__card {
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
}
.strip__card svg { width: 100%; height: 100%; }
.strip__card--ok { background: var(--ok-tint); }
.strip__card--half { background: var(--half-tint); }
.strip__card--low { background: var(--low-tint); }
.strip__arrow {
  display: grid;
  place-items: center;
}
.strip__arrow svg {
  width: 34px; height: 34px;
  fill: none; stroke: #8a94a6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.strip[data-style="scene"] .strip__arrow svg { stroke: var(--navy); stroke-width: 3.6; }

/* =========================================================
   Pantalla de cuenta atrás
   ========================================================= */
.run {
  position: absolute;
  inset: 0;
  --state: var(--ok);
}
.run[data-level="half"] { --state: var(--half); }
.run[data-level="low"]  { --state: var(--low); }

.run__layout { position: absolute; inset: 0; }

.scene-host {
  position: absolute;
  inset: 0;
}
.scene-host > svg { width: 100%; height: 100%; }

/* ---------- Barra de herramientas ---------- */
.toolbar {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 20;
  display: flex;
  gap: 10px;
  transition: opacity .4s, transform .4s;
}
.run.is-idle-ui .toolbar,
.run.is-idle-ui .controls-bar {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.run.is-idle-ui .controls-bar { transform: translate(-50%, 8px); }

.tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 64px;
  height: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 22px;
  color: var(--navy);
  backdrop-filter: blur(6px);
}
.tool:hover { background: #fff; }
.tool svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.tool .ico-off { display: none; }
.tool[aria-pressed="false"] .ico-on { display: none; }
.tool[aria-pressed="false"] .ico-off { display: block; }
.tool--back { padding: 0 22px 0 14px; }

/* ---------- Botones grandes ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 0;
  font-family: var(--font-title);
  font-weight: 600;
  transition: transform .12s, box-shadow .12s, background-color .2s, opacity .2s;
}
.btn svg { flex: none; }
.btn:disabled { opacity: .45; }
.btn:not(:disabled):active { transform: translateY(4px); }

.btn--mint {
  background: linear-gradient(180deg, #22c39c, #14ad88);
  color: #fff;
  box-shadow: 0 7px 0 #0f9273, 0 16px 28px rgba(20, 160, 120, .3);
}
.btn--mint:not(:disabled):active { box-shadow: 0 3px 0 #0f9273; }

.btn--ghost {
  background: linear-gradient(180deg, #ffffff, #eef0f4);
  color: #2d3a55;
  border: 3px solid #d9dde5;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
}

.btn--coral {
  background: linear-gradient(180deg, #f46c63, #ec5850);
  color: #fff;
  box-shadow: 0 7px 0 #cd453e, 0 16px 26px rgba(220, 80, 70, .28);
}
.btn--coral:not(:disabled):active { box-shadow: 0 3px 0 #cd453e; }

.btn--teal {
  background: linear-gradient(180deg, #13b9e0, #08a6d0);
  color: #fff;
  box-shadow: 0 7px 0 #0789ad, 0 16px 26px rgba(8, 140, 180, .28);
}
.btn--teal:not(:disabled):active { box-shadow: 0 3px 0 #0789ad; }

.ico-fill { fill: currentColor; }
.ico-stroke { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout «full» (simple, ardilla, rana) ---------- */
.controls-bar {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 15;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  padding: 14px;
  border-radius: 54px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: opacity .4s, transform .4s;
}
.controls-bar .btn { height: 82px; border-radius: 41px; font-size: 34px; }
.controls-bar .btn--teal { width: 290px; }
.controls-bar .btn--ghost { width: 230px; font-size: 30px; }
.controls-bar svg { width: 36px; height: 36px; }

/* ---------- Layout «bomba» (imagen 1) ---------- */
.bomb-panel {
  position: absolute;
  left: 160px;
  top: 722px;
  width: 1352px;
  height: 174px;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 48px;
  border-radius: 36px;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: 0 16px 40px rgba(110, 80, 40, .12);
  backdrop-filter: blur(6px);
}

.stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.stepper + .stepper { margin-left: 40px; }
.stepper__label {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 21px;
  color: var(--navy-soft);
}
.stepper__box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 40px;
  background: #eef0f2;
}
.stepper__btn {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #e5e8ec, #d5d9df);
  display: grid;
  place-items: center;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.06);
}
.stepper__btn svg {
  width: 26px; height: 26px;
  fill: none; stroke: #2d3a55; stroke-width: 3; stroke-linecap: round;
}
.stepper__btn:disabled { opacity: .4; }
.stepper__value {
  width: 106px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 40px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.bomb-panel__divider {
  width: 2px;
  height: 104px;
  margin: 0 38px;
  background: #ddd8cf;
}
.bomb-panel .btn--mint {
  width: 338px;
  height: 108px;
  border-radius: 54px;
  font-size: 42px;
}
.bomb-panel .btn--mint svg { width: 48px; height: 48px; }
.bomb-panel .btn--ghost {
  width: 262px;
  height: 92px;
  margin-left: 24px;
  border-radius: 46px;
  font-size: 32px;
}
.bomb-panel .btn--ghost svg { width: 40px; height: 40px; }

/* ---------- Layout «laberinto» (imagen 3) ---------- */
.run--maze { background: #fbf8f1; }

.maze-map {
  position: absolute;
  left: 40px;
  top: 42px;
  width: 1086px;
  height: 856px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(60, 90, 40, .18);
}
.maze-map > svg { width: 100%; height: 100%; }

.maze-panel {
  position: absolute;
  left: 1150px;
  top: 40px;
  width: 482px;
  height: 860px;
  padding: 38px 20px 0;
  border-radius: 36px;
  background: #fffefb;
  box-shadow: var(--shadow);
}

.maze-panel__title {
  position: relative;
  height: 158px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: #e5f3fa;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 66px;
  color: #0f1a3a;
  margin: 0;
  padding: 0 40px;
}
.maze-panel__label {
  margin: 30px 0 14px;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 33px;
  color: #0f1a3a;
}

.maze-time {
  position: relative;
  height: 222px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: var(--maze-teal);
  transition: background-color .6s;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 150px;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.08);
}
.run[data-level="half"] .maze-time { background: var(--half); }
.run[data-level="low"] .maze-time { background: var(--low); }
.maze-panel .btn--coral {
  width: 100%;
  height: 115px;
  margin-top: 30px;
  border-radius: 58px;
  font-size: 50px;
}
.maze-panel .btn--coral svg { width: 54px; height: 54px; }

.maze-settings {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 134px;
  margin-top: 40px;
  padding: 0 22px;
  border-radius: 30px;
  background: #f1f1ef;
}
.maze-settings > svg { width: 56px; height: 56px; flex: none; fill: #2c3442; }
.maze-select {
  flex: 1;
  height: 74px;
  padding: 0 60px 0 24px;
  border: 2px solid #dedfe2;
  border-radius: 18px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9h12l-6 7z' fill='%2333404f'/%3E%3C/svg%3E") no-repeat right 18px center / 28px;
  appearance: none;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 32px;
  color: #2b3446;
}
.maze-select:disabled { opacity: .55; }

.maze-shuffle {
  flex: none;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 2px solid #dedfe2;
  border-radius: 18px;
  background: #fff;
  color: #2c3442;
}
.maze-shuffle:hover { background: #e5f3fa; border-color: #23b8d9; }
.maze-shuffle svg { width: 38px; height: 38px; }

/* ---------- Estados de color comunes ---------- */
.lvl-stroke { stroke: var(--ok); transition: stroke .6s; }
[data-level="half"] .lvl-stroke { stroke: var(--half); }
[data-level="low"] .lvl-stroke { stroke: var(--low); }

.bg-img { display: none; }
.bg.has-img .bg-img { display: inline; }
.bg.has-img .bg-fallback { display: none; }

.run[data-level="low"]:not([data-status="finished"]) .pulse-low {
  animation: pulse-low 1s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes pulse-low {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* ---------- Final ---------- */
.finish-banner {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 18;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.2) rotate(-6deg);
  opacity: 0;
  transition: transform .5s cubic-bezier(.2, 1.6, .4, 1), opacity .3s;
}
.finish-banner span {
  display: block;
  padding: 26px 80px 34px;
  border-radius: 60px;
  background: #fff;
  border: 8px solid var(--low);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 130px;
  color: var(--low);
  white-space: nowrap;
}
.run[data-status="finished"] .finish-banner {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-6deg);
}
.run[data-layout="laberinto"] .finish-banner { left: 583px; }

.confetti {
  position: absolute;
  inset: 0;
  z-index: 17;
  pointer-events: none;
  overflow: hidden;
}
.confetti i {
  position: absolute;
  top: -30px;
  width: 18px;
  height: 28px;
  border-radius: 4px;
  animation: confetti-fall var(--dur, 3s) cubic-bezier(.3, .6, .5, 1) var(--delay, 0s) forwards;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--dx, 0), 1000px) rotate(var(--rot, 540deg)); opacity: 0; }
}

/* ---------- Animaciones de escena ---------- */
.spark { transform-box: fill-box; transform-origin: center; }
.run[data-status="running"] .spark__burst { animation: flicker .18s steps(2) infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes flicker {
  from { transform: scale(.88) rotate(0deg); }
  to { transform: scale(1.12) rotate(18deg); }
}
.run[data-status="running"] .spark__glow { animation: glow 0.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes glow {
  from { opacity: .7; transform: scale(.9); }
  to { opacity: 1; transform: scale(1.12); }
}

/* La bomba se mueve todo el rato y cada vez más: «¡va a explotar!» */
.bomb-shake { transform-box: view-box; transform-origin: 818px 700px; }
.run[data-status="running"] .bomb-shake { animation: bomb-wobble 1.4s ease-in-out infinite; }
.run[data-level="half"][data-status="running"] .bomb-shake { animation: bomb-wobble-fast .55s ease-in-out infinite; }
.run[data-level="low"][data-status="running"] .bomb-shake { animation: bomb-panic .14s linear infinite, bomb-swell .7s ease-in-out infinite; }
.run[data-status="paused"] .bomb-shake { animation-play-state: paused; }
@keyframes bomb-wobble {
  0%, 100% { transform: rotate(-1.2deg) scale(1, 1); }
  25% { transform: rotate(0deg) scale(1.015, .985); }
  50% { transform: rotate(1.2deg) scale(1, 1); }
  75% { transform: rotate(0deg) scale(.985, 1.015); }
}
@keyframes bomb-wobble-fast {
  0%, 100% { transform: rotate(-2.4deg) translateY(0) scale(1, 1); }
  25% { transform: rotate(0deg) translateY(-6px) scale(1.025, .975); }
  50% { transform: rotate(2.4deg) translateY(0) scale(1, 1); }
  75% { transform: rotate(0deg) translateY(-6px) scale(.975, 1.025); }
}
@keyframes bomb-panic {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  20% { translate: -7px 2px; rotate: -2deg; }
  40% { translate: 6px -3px; rotate: 2.5deg; }
  60% { translate: -5px -2px; rotate: -1.5deg; }
  80% { translate: 7px 1px; rotate: 2deg; }
}
@keyframes bomb-swell {
  0%, 100% { scale: 1; }
  50% { scale: 1.05; }
}

.bomb-heat { opacity: 0; transition: opacity .4s; }
.run[data-level="low"][data-status="running"] .bomb-heat { animation: heat .35s ease-in-out infinite alternate; }
@keyframes heat {
  from { opacity: .05; }
  to { opacity: .32; }
}

.face { display: none; }
[data-face="happy"] .face--happy,
[data-face="worried"] .face--worried,
[data-face="scared"] .face--scared,
[data-face="dizzy"] .face--dizzy { display: inline; }

.boom { opacity: 0; transform: scale(.3); transform-box: fill-box; transform-origin: center; transition: opacity .25s, transform .5s cubic-bezier(.2, 1.7, .4, 1); }
.run[data-status="finished"] .boom { opacity: 1; transform: scale(1); }
.run[data-status="finished"] .fuse-all { opacity: 0; transition: opacity .2s; }

.hiker__body { transform-box: fill-box; transform-origin: 50% 100%; }
.run[data-status="running"] .hiker__body { animation: bob .45s ease-in-out infinite alternate; }
@keyframes bob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-7px) rotate(2deg); }
}
.run[data-status="finished"] .hiker__body { animation: jump .6s ease-in-out infinite alternate; }
@keyframes jump {
  from { transform: translateY(0); }
  to { transform: translateY(-26px); }
}

.frog-jump { transform-box: fill-box; transform-origin: 50% 100%; }
.run[data-status="finished"] .frog-jump { animation: jump .5s ease-in-out infinite alternate; }
.blink { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes blink {
  0%, 94%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(.1); }
}

.run[data-status="finished"] .squirrel-hop { animation: jump .55s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .confetti { display: none; }
}
