/* Selvaje · interfaz.
   El paisaje (js/escena.js) es un fondo tranquilo de siluetas. El texto va arriba, sobre el cielo oscuro, y lo
   que se toca va abajo, sobre la tierra: así nada compite con la consigna ni con la respuesta.
   Una sola tinta clara (papel), un acento (amarillo) y el color de cada nivel. Sin texturas, sin vidrio y sin
   sombras de adorno. Tipografía: Fraunces para el texto, IBM Plex Mono para datos y etiquetas. */
:root {
  --papel: #f7f0e3;
  --papel-2: rgba(247, 240, 227, 0.74);
  --papel-3: rgba(247, 240, 227, 0.5);
  --linea: rgba(247, 240, 227, 0.14);
  --linea-2: rgba(247, 240, 227, 0.32);
  --tinta: #10302b;              /* texto sobre lo claro: el botón y la respuesta */
  --hoja: #0e2a28;               /* fondo de las hojas: final, archivo y cómo se juega */
  --amarillo: #f7c33a;
  --coral: #e96a4a;
  --rosa: #f2559a;
  --peligro: #e2503f;
  --cielo: #143a47;              /* los actualiza la escena con la luz de cada tramo */
  --suelo: #0c2b2b;
  --f-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-resorte: cubic-bezier(0.34, 1.5, 0.64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: #0c2b2b; color: var(--papel);
  font-family: var(--f-serif); font-size: 16px; line-height: 1.45; font-weight: 400;
  font-variation-settings: 'SOFT' 60, 'WONK' 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
::selection { background: rgba(247, 195, 58, 0.3); }
:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icono { display: inline-grid; place-items: center; }
/* Sello de nivel: el dibujo es una máscara (js/sprites.js) y se pinta con la tinta del nivel. */
.sello-ico {
  display: inline-block; flex: none; vertical-align: middle; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}

/* Etiqueta pequeña */
.mono { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--papel-2); }

/* ---------- capas ---------- */
#app { position: fixed; inset: 0; overflow: hidden; background: var(--suelo); }
#cielo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* El texto de arriba va sobre el cielo: un halo del mismo color lo separa de lo que pase por detrás. */
.inicio-top, .consigna, .veredicto, .hud { text-shadow: 0 0 14px var(--cielo), 0 0 4px var(--cielo); }
#app.viajando .consigna { opacity: 0; transform: translateY(-10px); }
.consigna { transition: opacity 0.5s var(--e-out), transform 0.5s var(--e-out); }

/* Antes de pasar a otra vista, lo que está en pantalla se apaga un instante (juego.js pone "saliendo") */
#app.saliendo .view > * { opacity: 0; transform: translateY(-6px); transition: opacity 0.16s ease, transform 0.16s ease; }

/* ---------- arriba: kilómetros, puntos y las siete rondas ---------- */
.hud {
  position: absolute; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none;
  transition: opacity 0.4s var(--e-out);
}
#app[data-vista="v-final"] .hud, #app[data-vista="v-archivo"] .hud { opacity: 0; }
.tablero {
  display: flex; align-items: baseline; gap: 6px; height: 28px; line-height: 28px;
  font-family: var(--f-mono); font-size: 17px; font-weight: 500; letter-spacing: 0.04em; color: var(--papel);
}
.tablero-unidad, .tablero-pts { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--papel-2); }
.tablero-pts #hud-pts { font-size: 17px; letter-spacing: 0.04em; color: var(--papel); margin-right: 3px; }
.tablero-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--papel-3); align-self: center; margin: 0 5px; }

/* Odómetro de rodillos: cada dígito es una tira que rueda */
.odometro { display: inline-flex; align-self: center; font-family: var(--f-mono); font-variant-numeric: tabular-nums; line-height: 1; }
.rueda {
  display: inline-block; height: 1.15em; overflow: hidden; width: 0.62em;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.tira { display: flex; flex-direction: column; will-change: transform; }
.tira span { height: 1.15em; display: grid; place-items: center; }
.rueda.cero { opacity: 0.3; }

/* Las siete rondas: cada punto toma el color del nivel que se sacó */
.pips { display: flex; align-items: center; gap: 9px; }
.pip {
  width: 8px; height: 8px; border-radius: 50%; background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--papel-3);
  transition: background-color 0.4s, box-shadow 0.4s, transform 0.4s var(--e-resorte);
}
.pip[style*="background"] { box-shadow: none; }
.pip.actual { box-shadow: inset 0 0 0 1.5px var(--papel), 0 0 0 3px rgba(247, 240, 227, 0.18); animation: latir 1.8s ease-in-out infinite; }
@keyframes latir { 50% { box-shadow: inset 0 0 0 1.5px var(--papel), 0 0 0 6px rgba(247, 240, 227, 0.06); } }
/* El punto de la ronda recién respondida entra con un salto */
.pip.recien { animation: punto-nuevo 0.7s var(--e-resorte) both; }
@keyframes punto-nuevo { 0% { transform: scale(0.2); } 55% { transform: scale(1.7); } 100% { transform: scale(1); } }

/* Botones de icono */
.icon-btn {
  position: absolute; z-index: 6; top: calc(8px + var(--safe-t));
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--linea-2); background: transparent; color: var(--papel);
  transition: transform 0.2s var(--e-out), background-color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background-color: rgba(247, 240, 227, 0.1); border-color: var(--papel-3); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 21px; height: 21px; }
.tool-izq { left: var(--gl); }
.tool-der { right: var(--gr); }
#btn-sonido .ico-off { display: none; }
#btn-sonido[aria-pressed="true"] .ico-on { display: none; }
#btn-sonido[aria-pressed="true"] .ico-off { display: inline-grid; }

/* ---------- vistas ---------- */
.view {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: calc(14px + var(--safe-t)) var(--gr) calc(16px + var(--safe-b)) var(--gl);
  pointer-events: none;
}
.view > * { pointer-events: auto; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--amarillo); color: var(--tinta);
  font-family: var(--f-serif); font-size: 18px; font-weight: 600; letter-spacing: 0.005em;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
  transition: transform 0.18s var(--e-out), background-color 0.2s, opacity 0.3s;
}
.btn-main::after {
  content: ''; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s var(--e-out);
}
.btn:hover { background-color: #ffd257; }
.btn-main:hover::after { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-sec { background: transparent; color: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea-2); }
.btn-sec:hover { background-color: rgba(247, 240, 227, 0.08); box-shadow: inset 0 0 0 1.5px var(--papel-3); }
.link {
  border: 0; background: none; padding: 10px 4px; min-height: 40px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--papel-2);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.link:hover { color: var(--papel); text-decoration-color: currentColor; }

/* ---------- inicio ---------- */
.view-inicio { padding-top: calc(64px + var(--safe-t)); }
.inicio-top { display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; }
.marca {
  position: relative; isolation: isolate; margin: 0; line-height: 0.9;
  font-family: var(--f-serif); font-style: italic; font-weight: 640; font-size: clamp(64px, 19vw, 112px); letter-spacing: -0.035em;
  font-variation-settings: 'SOFT' 100, 'WONK' 1; color: var(--amarillo); text-shadow: none;
}
/* Segundo pase de tinta, corrido, como en un cartel */
.marca::before { content: attr(data-texto); position: absolute; inset: 0; color: var(--rosa); z-index: -1; transform: translate(3px, 3px); }
.lema { margin: 12px 0 0; font-style: italic; font-size: 19px; color: var(--papel); }
.reglas-cortas { margin: 8px 0 0; max-width: 30ch; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--papel-2); text-wrap: balance; }
.inicio-bottom { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.inicio-links { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.punto { width: 3px; height: 3px; border-radius: 50%; background: var(--papel-3); }

/* ---------- ronda ---------- */
.view-ronda, .view-resultado { padding-top: calc(96px + var(--safe-t)); }
.consigna { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 560px; }
.consigna-texto {
  margin: 0; font-weight: 420; font-size: clamp(30px, 8.6vw, 46px); line-height: 1.05; letter-spacing: -0.018em;
  font-variation-settings: 'SOFT' 100, 'WONK' 0; text-wrap: balance; color: var(--papel);
}
.consigna-texto .verbo { font-style: italic; color: var(--papel-2); }
.palabra { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.06em 0.12em; margin: 0 -0.06em -0.12em; }
.palabra > span { display: inline-block; }
/* La cuenta regresiva va en la franja libre entre la consigna y el camino: la escena dice dónde queda (--medio)
   y cuánto mide (--banda), así nunca pisa el texto */
.cuenta {
  --cuenta: 104px;
  position: absolute; left: 0; right: 0; top: var(--medio, 44%); transform: translateY(-50%); text-align: center; pointer-events: none;
  font-style: italic; font-weight: 340; font-size: min(var(--cuenta), calc(var(--banda, 400px) * 0.6)); line-height: 1; color: var(--papel);
  text-shadow: 0 0 26px var(--cielo); font-variation-settings: 'SOFT' 100, 'WONK' 1;
}
.cuenta.ya { --cuenta: 54px; font-weight: 500; color: var(--amarillo); }
.barra { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; }
.aviso {
  margin: 0 auto; min-height: 0; max-width: 100%; text-align: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: #fff;
}
.aviso:not(:empty) { padding: 7px 12px; border-radius: 8px; background: var(--peligro); }

/* La respuesta: lo único claro de la pantalla, con el tiempo que queda como una línea arriba */
.barra-form {
  position: relative; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 8px 0 18px;
  border-radius: 16px; background: var(--papel); color: var(--tinta); overflow: hidden;
}
.segmentos { --frac: 1; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(16, 48, 43, 0.1); }
.segmentos::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: left;
  transform: scaleX(var(--frac)); background: var(--coral); transition: transform 0.12s linear;
}
.segmentos.urgente::after { background: var(--peligro); animation: chispa 0.5s steps(2) infinite; }
@keyframes chispa { 50% { opacity: 0.55; } }
.reloj { order: 2; flex: none; font-family: var(--f-mono); font-size: 15px; font-weight: 500; color: rgba(16, 48, 43, 0.62); min-width: 2ch; text-align: right; }
.reloj.urgente { color: var(--peligro); }
.respuesta {
  order: 1; flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent;
  font-family: var(--f-serif); font-style: italic; font-size: 19px; color: var(--tinta);
}
.respuesta::placeholder { color: rgba(16, 48, 43, 0.45); }
.respuesta:focus { outline: none; }
.respuesta:disabled { opacity: 1; }
.btn-lanzar {
  order: 3; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: var(--tinta); color: transparent; font-size: 0;
  display: grid; place-items: center;
  transition: transform 0.18s var(--e-out), opacity 0.3s;
}
.btn-lanzar::after {
  content: ''; width: 20px; height: 20px; background: var(--papel);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-lanzar:active { transform: scale(0.94); }
.btn-lanzar:disabled { opacity: 0.35; cursor: default; }

/* ---------- resultado: el nivel de la respuesta, en el lugar de la consigna ---------- */
.veredicto {
  --tc: var(--papel);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; max-width: 520px;
}
.sello { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 6px; transform: rotate(var(--rot, -6deg)); }
.res-nivel { margin: 0; font-weight: 520; font-size: clamp(30px, 8.6vw, 42px); line-height: 1.05; letter-spacing: -0.015em; color: var(--tc); font-variation-settings: 'SOFT' 100, 'WONK' 1; text-wrap: balance; }
.res-respuesta { margin: 4px 0 0; font-style: italic; font-size: 20px; color: var(--papel); }
.res-blurb { margin: 0; font-size: 15px; color: var(--papel-2); text-wrap: balance; }
.res-nota { margin: 2px 0 0; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--papel-3); }
.res-nota:empty { display: none; }
.res-puntos { margin: 8px 0 0; font-family: var(--f-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc); }
#btn-siguiente.esperando { opacity: 0; pointer-events: none; transform: translateY(8px); }
#btn-siguiente { transition: opacity 0.45s var(--e-out), transform 0.45s var(--e-out), background-color 0.2s; }

/* ---------- hojas: final, archivo y cómo se juega ---------- */
.view-panel { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: calc(60px + var(--safe-t)); }
.panel {
  width: min(560px, 100%); margin-bottom: 24px; padding: 26px 22px 28px; border-radius: 22px;
  background: var(--hoja); box-shadow: inset 0 0 0 1px var(--linea);
  display: flex; flex-direction: column; gap: 12px;
}
.f-titulo { margin: 0; font-weight: 480; font-size: clamp(36px, 10vw, 52px); line-height: 1.02; letter-spacing: -0.02em; color: var(--amarillo); font-variation-settings: 'SOFT' 100, 'WONK' 1; text-wrap: balance; }
.f-cifras { margin: 0; font-family: var(--f-mono); font-size: 14px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--papel); }
.f-texto { margin: 0; color: var(--papel-2); }
.f-emojis { margin: 6px 0 2px; display: flex; gap: 6px; flex-wrap: nowrap; }
.f-emojis .sello-ico { width: clamp(30px, 10vw, 42px) !important; height: clamp(30px, 10vw, 42px) !important; }
.f-acciones { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
.f-copiado { margin: 0; min-height: 1.2em; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amarillo); }
.f-share { width: 100%; min-height: 110px; padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(247, 240, 227, 0.06); color: var(--papel); font-family: var(--f-mono); font-size: 13px; box-shadow: inset 0 0 0 1.5px var(--linea); }
.stats { margin: 6px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.stats div { padding: 12px 4px; text-align: center; }
.stats div + div { border-left: 1px solid var(--linea); }
.stats dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--papel-2); }
.stats dd { margin: 2px 0 0; font-size: 26px; font-weight: 450; line-height: 1.1; }
.bitacora-titulo { margin: 14px 0 0; font-style: italic; font-weight: 450; font-size: 22px; }
.bitacora { list-style: none; margin: 0; padding: 0; }
.bitacora > li { --tc: var(--papel-2); padding: 14px 0; border-top: 1px solid var(--linea); display: flex; flex-direction: column; gap: 6px; }
.b-consigna { font-weight: 500; font-size: 16px; }
.b-tuya { font-style: italic; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b-chip { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc); }
.b-joya { font-size: 14px; color: var(--papel-2); }
.b-joya strong { font-weight: 600; color: var(--amarillo); }
.b-mas { align-self: flex-start; padding: 4px 0; border: 0; background: none; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--papel-2); text-decoration: underline; text-underline-offset: 3px; }
.b-mas:hover { color: var(--papel); }
.b-ejemplos { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.b-ejemplos li { display: flex; gap: 6px; align-items: baseline; color: var(--papel-2); }
.b-ejemplos li .sello-ico { align-self: center; }
.archivo-lista { list-style: none; margin: 4px 0 0; padding: 0; }
.archivo-lista button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 2px; border: 0; border-top: 1px solid var(--linea); background: none; text-align: left; }
.archivo-lista button:hover .a-num { color: var(--amarillo); }
.a-num { font-size: 17px; transition: color 0.2s; }
.a-fecha { grid-column: 1; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--papel-2); }
.a-estado { grid-column: 2; grid-row: 1 / 3; align-self: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--papel-2); }
.a-estado.hecho { color: var(--amarillo); }
.archivo-vacio { color: var(--papel-2); padding: 8px 0; }

.modal {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: calc(16px + var(--safe-t)) 10px 0; background: rgba(4, 14, 16, 0.6);
}
.panel.modal-panel { width: min(460px, 100%); margin: 0; padding: 26px 22px calc(22px + var(--safe-b)); border-radius: 24px 24px 0 0; gap: 10px; max-height: 100%; overflow-y: auto; }
.modal-panel .f-titulo { font-size: clamp(30px, 8vw, 38px); }
.como-lista { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.38; }
.como-lista li::marker { font-family: var(--f-mono); font-size: 11px; color: var(--papel-2); }
.tabla-niveles { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 14px; line-height: 1.25; }
.tabla-niveles td { padding: 7px 4px; border-top: 1px solid var(--linea); vertical-align: middle; }
.tabla-niveles td:first-child { width: 36px; padding-left: 0; }
.tabla-niveles td:last-child { text-align: right; padding-right: 0; font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.tabla-niveles .t-nombre { font-weight: 500; font-size: 15px; }
.tabla-niveles .t-desc { display: block; font-size: 12.5px; color: var(--papel-2); }

/* ---------- pantallas anchas ---------- */
@media (min-width: 640px) {
  .f-acciones { grid-template-columns: 1fr 1fr; }
  .panel { padding: 30px 32px 32px; }
  .modal { justify-content: center; padding-bottom: 16px; }
  .panel.modal-panel { border-radius: 24px; }
}
@media (max-height: 680px) {
  .view-inicio { padding-top: calc(26px + var(--safe-t)); }
  .marca { font-size: 60px; }
  .cuenta { --cuenta: 80px; }
  .cuenta.ya { --cuenta: 48px; }
}
/* Pantallas muy bajas (un teléfono acostado): todo más compacto, para que quede lugar para el camino */
@media (max-height: 480px) {
  .view-inicio { padding-top: calc(12px + var(--safe-t)); }
  .marca { font-size: 46px; }
  .lema { margin-top: 6px; font-size: 16px; }
  .reglas-cortas, .inicio-mision { display: none; }
  .inicio-bottom { width: min(640px, 100%); flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 16px; }
  .inicio-bottom .btn { width: auto; min-width: 230px; }
  .btn { height: 46px; }
  .hud { top: calc(8px + var(--safe-t)); gap: 6px; }
  .view-ronda, .view-resultado { padding-top: calc(60px + var(--safe-t)); }
  .consigna { gap: 4px; }
  .consigna-texto { font-size: 28px; }
  .cuenta { --cuenta: 60px; }
  .cuenta.ya { --cuenta: 38px; }
  .sello, .res-blurb { display: none; }
  .res-nivel { font-size: 26px; }
  .res-respuesta { margin-top: 0; font-size: 17px; }
  .res-puntos { margin-top: 2px; }
  .barra-form { height: 50px; }
  .btn-lanzar { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .pip.actual, .pip.recien, .segmentos.urgente::after { animation: none; }
  .consigna, #btn-siguiente { transition: none; }
}
