@font-face {
  font-family: "Achemost";
  src: local("Achemost"), local("Achemost Regular");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #1A1008;
  --ink-2: #4F2E0E;
  --gold: #AF782F;
  --gold-2: #C98E45;
  --text: #fff9f0;
  --muted: #ead7bd;
  --font-title: "Achemost", "Cormorant Garamond", Georgia, serif;
  --font-body: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --danger: #ff8a78;
  --success: #dff5cb;
  --shadow: rgba(0, 0, 0, 0.55);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: #090604; overflow: hidden; }
body { font-family: var(--font-body); color: var(--text); }
button { font: inherit; }
.game {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background: #080503;
  isolation: isolate;
}
.scene { position: absolute; inset: 0; overflow: hidden; background: #080503; }
.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  user-select: none;
  pointer-events: none;
  filter: saturate(0.98) contrast(1.04);
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 54%, rgba(0,0,0,0.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.50));
  z-index: 2;
}
.scene-content { position: absolute; inset: 0; z-index: 5; }
.hud {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 18px;
  right: 18px;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
  opacity: 1;
  transition: opacity .25s ease;
}
.hud.is-hidden { opacity: 0; visibility: hidden; }
.hud__left {
  max-width: min(58vw, 860px);
  padding: 12px 16px 14px;
  background: linear-gradient(90deg, rgba(17,11,7,.78), rgba(17,11,7,.42), rgba(17,11,7,0));
  border-left: 2px solid rgba(223,184,107,.8);
  text-shadow: 0 2px 10px #000;
}
.hud__title {
  display: block;
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 29px);
  line-height: 1.05;
}
.hud__objective {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(12px, 1.1vw, 16px);
  line-height: 1.35;
}
.hud__right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(13, 8, 5, .74);
  border: 1px solid rgba(223,184,107,.28);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}
.hud-block { display: grid; gap: 3px; min-width: 76px; }
.hud-label { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.hud-value { color: var(--gold-2); font-family: var(--font-title); font-weight: 800; font-size: 19px; }
.lives { display: flex; gap: 4px; height: 26px; align-items: center; }
.life { width: 16px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(255, 193, 83, .35)); transition: opacity .2s ease, filter .2s ease; }
.life.off { opacity: .24; filter: grayscale(1) brightness(.55); }
.hud-btn, .audio-toggle, .btn, .inline-btn {
  border: 1px solid rgba(223,184,107,.65);
  background: linear-gradient(180deg, rgba(65,45,25,.88), rgba(29,18,11,.9));
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, filter .16s ease;
}
.hud-btn { height: 40px; padding: 0 16px; }
.hud-btn:hover, .audio-toggle:hover, .btn:hover, .inline-btn:hover { transform: translateY(-1px); border-color: var(--gold-2); filter: brightness(1.12); }
.audio-toggle {
  position: absolute;
  right: 18px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 110;
  padding: 10px 14px;
  background: rgba(16,10,6,.7);
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(6px);
}
.audio-toggle.is-muted { opacity: .55; }
.toast {
  position: absolute;
  left: 50%;
  top: calc(104px + var(--safe-top));
  transform: translate(-50%, -12px);
  z-index: 120;
  min-width: min(90vw, 460px);
  max-width: min(90vw, 840px);
  padding: 13px 18px;
  text-align: center;
  color: var(--text);
  background: rgba(14, 8, 5, .86);
  border: 1px solid rgba(223,184,107,.35);
  box-shadow: 0 16px 45px rgba(0,0,0,.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: clamp(13px, 1.3vw, 18px);
  line-height: 1.35;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { color: var(--success); }
.toast.error { color: #ffd2ca; border-color: rgba(255,138,120,.45); }

.boot, .menu, .outcome, .level-intro, .codex-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 58px);
}
.menu { place-items: stretch; padding: clamp(24px, 5vw, 70px); }
.menu-copy {
  align-self: center;
  justify-self: start;
  width: min(720px, 86vw);
  margin-left: min(5vw, 70px);
  text-shadow: 0 4px 22px #000;
}
.kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .24em;
  font-weight: 900;
  font-size: clamp(11px, 1vw, 14px);
  margin: 0 0 10px;
}
.main-title {
  font-family: var(--font-title);
  font-size: clamp(52px, 8vw, 122px);
  line-height: .88;
  margin: 0 0 20px;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.typewriter {
  white-space: pre-line;
  color: #f4e8d4;
  font-size: clamp(16px, 1.6vw, 24px);
  line-height: 1.55;
  max-width: 710px;
}
.menu-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.menu-actions.ready { opacity: 1; transform: translateY(0); }
.btn {
  min-width: 190px;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 0;
  font-size: clamp(14px, 1.2vw, 17px);
}
.btn.primary { background: linear-gradient(180deg, rgba(104,73,34,.96), rgba(43,27,14,.96)); }
.btn.ghost { background: rgba(17,10,6,.48); }
.boot-box, .intro-copy, .outcome-copy, .codex-copy {
  width: min(900px, 92vw);
  text-align: center;
  text-shadow: 0 4px 20px #000;
}
.boot-title, .intro-title, .outcome-title, .codex-title {
  font-family: var(--font-title);
  margin: 0 0 18px;
  text-transform: uppercase;
  font-size: clamp(34px, 5vw, 70px);
  line-height: 1;
}
.boot-line {
  width: min(560px, 76vw);
  height: 7px;
  margin: 28px auto 0;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.boot-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #8a6233, var(--gold-2)); transition: width .2s ease; }
.level-intro, .codex-overlay { background: rgba(0,0,0,.66); z-index: 140; }
.intro-copy, .codex-copy, .outcome-copy {
  background: linear-gradient(180deg, rgba(18,11,7,.64), rgba(18,11,7,.34));
  border-left: 2px solid rgba(223,184,107,.8);
  border-right: 1px solid rgba(223,184,107,.24);
  padding: clamp(24px, 4vw, 48px);
  backdrop-filter: blur(5px);
}
.intro-body, .outcome-body, .codex-body {
  color: #f2e5d0;
  font-size: clamp(16px, 1.45vw, 23px);
  line-height: 1.55;
  white-space: pre-line;
}
.codex-body { text-align: left; max-height: 48vh; overflow: auto; padding-right: 10px; }
.codex-entry { margin-bottom: 22px; }
.codex-entry strong { display: block; color: var(--gold-2); font-family: var(--font-title); font-size: 20px; margin-bottom: 5px; }

.item, .symbol, .distractor, .timeline-piece {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  z-index: 18;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.48));
  transition: filter .18s ease, opacity .22s ease, transform .18s ease;
}
.item:hover, .symbol:hover, .distractor:hover, .timeline-piece:hover { filter: drop-shadow(0 12px 22px rgba(223,184,107,.42)); }
.item.found, .symbol.placed, .timeline-piece.placed { pointer-events: none; opacity: .92; }
.hit-label {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 24;
  color: #f8e7c6;
  background: rgba(18, 10, 5, .74);
  border: 1px solid rgba(223,184,107,.4);
  padding: 7px 11px;
  font-size: 13px;
  white-space: nowrap;
  animation: floatUp .9s ease forwards;
  pointer-events: none;
}
@keyframes floatUp { to { opacity: 0; transform: translate(-50%, -92%); } }
.flashlight-layer {
  --x: 50%;
  --y: 50%;
  --r: 175px;
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(0,0,0,0) 0%, rgba(0,0,0,.1) 38%, rgba(0,0,0,.95) 78%);
  transition: opacity .2s ease;
}
.darkness-extra {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background: #000;
  opacity: 0;
  transition: opacity .3s ease;
}
.shake { animation: shake .22s linear; }
@keyframes shake {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-8px,2px); }
  45% { transform: translate(8px,-2px); }
  70% { transform: translate(-4px,3px); }
}
.error-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 160;
  pointer-events: none;
  background: rgba(185, 25, 14, .24);
  animation: fadeFlash .28s ease forwards;
}
@keyframes fadeFlash { to { opacity: 0; } }
.burst {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 90;
  background: var(--gold-2);
  box-shadow: 0 0 22px var(--gold-2);
  animation: burst .7s ease-out forwards;
}
@keyframes burst {
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); }
}

.symbols-base {
  position: absolute;
  left: 3vw;
  right: 3vw;
  bottom: calc(18px + var(--safe-bottom));
  height: min(21vh, 168px);
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 54px);
  align-items: center;
  background: linear-gradient(90deg, rgba(10,6,4,0), rgba(10,6,4,.62), rgba(10,6,4,0));
  pointer-events: none;
}
.slot {
  width: clamp(116px, 14vw, 185px);
  height: clamp(82px, 11vh, 124px);
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(223,184,107,.42);
  background: rgba(12,7,4,.58);
  pointer-events: auto;
}
.slot::before {
  content: attr(data-label);
  position: absolute;
  bottom: 8px;
  left: 6px;
  right: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.slot img { max-width: 58%; max-height: 65%; opacity: .16; filter: grayscale(1) sepia(.4); pointer-events: none; }
.slot.complete { background: rgba(59, 42, 21, .76); border-color: rgba(243,211,145,.8); }
.slot.complete img { opacity: .05; }

.timeline-slots {
  position: absolute;
  left: 7vw;
  right: 7vw;
  top: 43%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 36px);
  z-index: 12;
}
.time-slot {
  min-height: min(16vh, 140px);
  border: 1px solid rgba(223,184,107,.5);
  background: rgba(14,8,5,.62);
  display: grid;
  place-items: center;
  position: relative;
  padding: 14px;
}
.time-slot::before {
  content: attr(data-order);
  position: absolute;
  top: -18px;
  left: 16px;
  color: var(--gold-2);
  font-family: var(--font-title);
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 900;
  text-shadow: 0 2px 18px #000;
}
.time-slot span { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; text-align: center; }
.time-slot.complete { background: rgba(56, 39, 20, .78); border-color: var(--gold-2); }
.timeline-pieces {
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: calc(36px + var(--safe-bottom));
  min-height: min(20vh, 176px);
  z-index: 18;
}
.timeline-piece {
  width: clamp(180px, 20vw, 290px);
  min-height: 82px;
  padding: 16px 18px;
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(130,90,43,.25) 10px 11px, transparent 11px calc(100% - 11px), rgba(130,90,43,.25) calc(100% - 11px) calc(100% - 10px), transparent calc(100% - 10px)),
    linear-gradient(180deg, #f3e3c2, #d1b47d);
  border: 1px solid rgba(93, 58, 26, .78);
  color: #2b1a0d;
  text-align: center;
  font-weight: 900;
  line-height: 1.22;
  box-shadow: inset 0 0 20px rgba(95,58,25,.18), 0 16px 30px rgba(0,0,0,.34);
}
.lightbar {
  position: absolute;
  top: calc(104px + var(--safe-top));
  right: 20px;
  width: min(34vw, 450px);
  z-index: 85;
  display: none;
}
.lightbar.show { display: block; }
.lightbar-label { display: flex; justify-content: space-between; color: var(--gold-2); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; text-shadow: 0 2px 12px #000; }
.lightbar-track { height: 12px; background: rgba(7,4,2,.72); border: 1px solid rgba(223,184,107,.36); overflow: hidden; }
.lightbar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #bd522f, #efad53, #fff0a8); transform-origin: left center; }
.help-btn { position: absolute; right: 20px; top: calc(150px + var(--safe-top)); z-index: 86; display: none; }
.help-btn.show { display: inline-block; }

@media (max-width: 850px) {
  .hud { left: 10px; right: 10px; top: 10px; gap: 8px; }
  .hud__left { max-width: 56vw; padding: 9px 10px; }
  .hud__right { gap: 7px; padding: 7px; }
  .hud-block { min-width: auto; }
  .hud-label { font-size: 8px; }
  .hud-value { font-size: 14px; }
  .life { width: 12px; height: 24px; }
  .hud-btn { height: 32px; padding: 0 9px; font-size: 12px; }
  .menu-copy { margin-left: 0; width: 94vw; }
  .main-title { font-size: clamp(42px, 13vw, 80px); }
  .timeline-slots { left: 3vw; right: 3vw; gap: 8px; }
  .timeline-piece { width: 42vw; font-size: 13px; }
  .timeline-pieces { bottom: 18px; }
  .lightbar { top: 88px; right: 10px; width: 42vw; }
  .help-btn { top: 134px; right: 10px; }
}

/* --- Dinámica reforzada: linterna, búsqueda, pistas y cinemática final --- */
.flashlight-control {
  position: absolute;
  left: 22px;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 58;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(18, 10, 6, .76);
  backdrop-filter: blur(7px);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: 12px;
}
.flashlight-control.is-on { box-shadow: 0 0 24px rgba(243, 211, 145, .24); }
.flashlight-control.is-off { border-color: rgba(255, 138, 120, .72); color: #ffd6cf; }
.flashlight-layer.is-off {
  background: rgba(0,0,0,.985);
}
.hard-hidden {
  opacity: .86;
  transform: translate(-50%, -50%) scale(.92) rotate(-2deg);
  filter: brightness(.72) contrast(1.08) drop-shadow(0 8px 14px rgba(0,0,0,.55));
}
.modern-decoy {
  opacity: .94;
  filter: brightness(.78) saturate(.82) drop-shadow(0 10px 16px rgba(0,0,0,.55));
}
.document-reveal {
  animation: documentFlip .78s cubic-bezier(.2,.9,.25,1.1) forwards;
  filter: drop-shadow(0 0 22px rgba(243,211,145,.95)) drop-shadow(0 16px 24px rgba(0,0,0,.6));
}
@keyframes documentFlip {
  0% { transform: translate(-50%, -50%) rotateY(0deg) scale(.92); }
  45% { transform: translate(-50%, -50%) rotateY(180deg) scale(1.2); }
  100% { transform: translate(-50%, -50%) rotateY(360deg) scale(1.06); }
}
.discovery-overlay {
  position: absolute;
  inset: 0;
  z-index: 145;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 60px);
  background: radial-gradient(circle at center, rgba(0,0,0,.42), rgba(0,0,0,.78));
}
.discovery-card {
  width: min(760px, 92vw);
  padding: clamp(24px, 4vw, 46px);
  background: linear-gradient(180deg, rgba(26,17,11,.9), rgba(11,7,5,.82));
  border: 1px solid rgba(223,184,107,.52);
  border-left: 3px solid rgba(243,211,145,.95);
  box-shadow: 0 25px 80px rgba(0,0,0,.6), inset 0 0 60px rgba(223,184,107,.08);
  text-align: left;
  animation: cardIn .32s ease forwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.discovery-title {
  font-family: var(--font-title);
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.02;
}
.discovery-body {
  color: #f0dfc5;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.55;
  white-space: pre-line;
}
.symbol-search-mask {
  --x: 50%;
  --y: 50%;
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  background: radial-gradient(circle 210px at var(--x) var(--y), rgba(0,0,0,0) 0%, rgba(0,0,0,.08) 34%, rgba(0,0,0,.68) 78%);
  mix-blend-mode: multiply;
}
.level-two .symbols-base {
  z-index: 36;
  height: min(19vh, 150px);
  background: linear-gradient(90deg, rgba(10,6,4,.08), rgba(10,6,4,.78), rgba(10,6,4,.08));
}
.search-object {
  z-index: 18;
  opacity: .9;
  filter: brightness(.78) drop-shadow(0 12px 18px rgba(0,0,0,.55));
}
.search-object:hover,
.search-object.is-dragging {
  opacity: 1;
  filter: brightness(1.15) drop-shadow(0 0 22px rgba(243,211,145,.42)) drop-shadow(0 16px 20px rgba(0,0,0,.55));
}
.decoy-a { filter: grayscale(.25) sepia(.25) brightness(.72) drop-shadow(0 12px 18px rgba(0,0,0,.55)); }
.decoy-b { filter: hue-rotate(22deg) saturate(.65) brightness(.76) drop-shadow(0 12px 18px rgba(0,0,0,.55)); }
.decoy-c { filter: grayscale(.12) contrast(.9) brightness(.72) drop-shadow(0 12px 18px rgba(0,0,0,.55)); }
.slot {
  border-radius: 18px;
  box-shadow: inset 0 0 28px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.28);
}
.slot.complete {
  animation: slotPulse .42s ease;
}
@keyframes slotPulse {
  0% { transform: scale(.98); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.timeline-piece {
  display: grid;
  gap: 6px;
  align-content: center;
}
.timeline-piece strong {
  display: block;
  font-size: clamp(13px, 1.2vw, 18px);
  line-height: 1.1;
}
.timeline-piece small {
  display: block;
  font-size: clamp(10px, .85vw, 13px);
  line-height: 1.22;
  font-weight: 700;
  opacity: .78;
}
.timeline-piece.is-dragging {
  filter: drop-shadow(0 0 24px rgba(243,211,145,.6)) drop-shadow(0 18px 28px rgba(0,0,0,.5));
}
.cinematic-wrap {
  position: absolute;
  inset: 0;
  z-index: 35;
  overflow: hidden;
  background: #000;
  display: grid;
  place-items: center;
}
.final-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  animation: cinematicZoom 7s ease forwards;
}
@keyframes cinematicZoom { from { transform: scale(1.04); } to { transform: scale(1.14); } }
.legacy-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255,226,136,.38), rgba(180,96,24,.12) 24%, rgba(0,0,0,.48) 70%);
  animation: glowBreath 2.4s ease-in-out infinite;
}
@keyframes glowBreath { 50% { opacity: .62; transform: scale(1.04); } }
.legacy-star, .final-star {
  color: #fff0a8;
  text-shadow: 0 0 18px rgba(255,240,168,.95), 0 0 44px rgba(223,184,107,.85);
}
.legacy-star {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(82px, 12vw, 180px);
  animation: starRise 2.6s ease forwards;
}
@keyframes starRise {
  0% { opacity: 0; transform: translate(-50%, -25%) scale(.45) rotate(-25deg); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(6deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}
.legacy-message {
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%);
  width: min(860px, 92vw);
  text-align: center;
  font-family: var(--font-title);
  font-size: clamp(34px, 6vw, 82px);
  line-height: .96;
  text-transform: uppercase;
  color: #fff7e8;
  text-shadow: 0 4px 30px #000, 0 0 34px rgba(223,184,107,.55);
}
.legacy-message span {
  display: inline-block;
  opacity: 0;
  animation: messageIn 1.2s ease 1.2s forwards;
}
@keyframes messageIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.cinematic-skip {
  position: absolute;
  right: 26px;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}
.cinematic-skip.show {
  opacity: 1;
  pointer-events: auto;
}
.final-outcome {
  text-align: center;
}
.final-star {
  font-size: clamp(54px, 8vw, 110px);
  line-height: .8;
  margin-bottom: 18px;
  animation: starRise 1.2s ease forwards;
}
.legacy-final {
  margin: -4px 0 20px;
  color: var(--gold-2);
  font-family: var(--font-title);
  text-transform: uppercase;
  font-size: clamp(22px, 3vw, 42px);
  line-height: 1;
}

@media (max-width: 850px) {
  .flashlight-control { left: 10px; bottom: 12px; padding: 9px 12px; font-size: 10px; }
  .symbol-search-mask { background: radial-gradient(circle 145px at var(--x) var(--y), rgba(0,0,0,0) 0%, rgba(0,0,0,.1) 34%, rgba(0,0,0,.72) 78%); }
  .level-two .symbols-base { height: 17vh; gap: 7px; bottom: 8px; }
  .slot { width: 22vw; min-width: 72px; }
  .timeline-piece small { display: none; }
  .legacy-message { bottom: 25%; }
}

/* --- Corrección solicitada: Nivel 2 sin linterna, visible y con distractores clickeables --- */
.level2-visibility-layer {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  background:
    radial-gradient(circle at 52% 42%, rgba(255,221,150,.12), rgba(0,0,0,0) 42%),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.18));
}
.level-two .vignette {
  background:
    radial-gradient(circle at 50% 48%, rgba(0,0,0,0) 0%, rgba(0,0,0,.10) 58%, rgba(0,0,0,.38) 100%),
    linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.05) 45%, rgba(0,0,0,.30));
}
.level-two .symbol-search-mask { display: none !important; }
.level-two .search-object {
  opacity: .96;
  filter: brightness(.92) contrast(1.04) drop-shadow(0 10px 14px rgba(0,0,0,.55));
}
.level-two .sacred-object {
  animation: hiddenBreath 2.8s ease-in-out infinite;
}
@keyframes hiddenBreath {
  50% { filter: brightness(1.04) contrast(1.08) drop-shadow(0 0 13px rgba(243,211,145,.20)) drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
}
.level-two .clickable-decoy {
  cursor: pointer;
}
.level-two .clickable-decoy::after { display: none; }
.level-two .symbols-base {
  z-index: 36;
  height: min(20vh, 158px);
  background: linear-gradient(90deg, rgba(10,6,4,.05), rgba(10,6,4,.72), rgba(10,6,4,.05));
}
.level-two .slot {
  width: clamp(126px, 14vw, 190px);
  height: clamp(86px, 12vh, 130px);
  border: 1px solid rgba(223,184,107,.55);
  background: rgba(12,7,4,.50);
}
.level-two .slot img {
  max-width: 64%;
  max-height: 70%;
  opacity: .34;
  filter: grayscale(1) sepia(.45) brightness(1.18) drop-shadow(0 0 12px rgba(243,211,145,.18));
}
.level-two .slot::before {
  color: #f1dfbd;
  text-shadow: 0 2px 10px #000;
}
.level-two .slot.complete::before { color: var(--gold-2); }
.level-two .slot.complete img { opacity: .16; }
.decoy-d { filter: grayscale(.45) sepia(.25) brightness(.82) saturate(.75) drop-shadow(0 10px 14px rgba(0,0,0,.55)); transform: translate(-50%, -50%) scale(.94) rotate(8deg); }
.decoy-e { filter: hue-rotate(-18deg) saturate(.58) brightness(.86) drop-shadow(0 10px 14px rgba(0,0,0,.55)); transform: translate(-50%, -50%) scale(.9); }
.decoy-f { filter: hue-rotate(30deg) saturate(.55) brightness(.82) drop-shadow(0 10px 14px rgba(0,0,0,.55)); transform: translate(-50%, -50%) scale(.85) rotate(-5deg); }
.decoy-g { filter: grayscale(.25) contrast(.85) brightness(.82) drop-shadow(0 10px 14px rgba(0,0,0,.55)); transform: translate(-50%, -50%) scale(.88) rotate(5deg); }
.modern-low { opacity: .72; filter: grayscale(.15) brightness(.75) drop-shadow(0 10px 14px rgba(0,0,0,.55)); }

/* --- Corrección solicitada: Nivel 3 tarjetas compactas y ayuda visible --- */
.level-three .timeline-slots {
  top: 39%;
  left: 6vw;
  right: 6vw;
  gap: clamp(10px, 1.5vw, 24px);
}
.level-three .time-slot {
  min-height: min(13vh, 112px);
  background: rgba(14,8,5,.58);
}
.level-three .timeline-pieces {
  left: 3vw;
  right: 3vw;
  bottom: calc(30px + var(--safe-bottom));
  min-height: min(15vh, 128px);
}
.level-three .timeline-piece {
  width: clamp(150px, 15vw, 214px);
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
}
.level-three .timeline-piece strong {
  font-size: clamp(11px, .98vw, 15px);
  line-height: 1.08;
}
.level-three .timeline-piece small {
  font-size: clamp(9px, .70vw, 11px);
  line-height: 1.15;
  opacity: .75;
}
.help-zone {
  position: absolute;
  right: 24px;
  top: calc(158px + var(--safe-top));
  z-index: 90;
  display: none;
  width: min(30vw, 360px);
  pointer-events: auto;
}
.help-zone.show {
  display: grid;
  gap: 8px;
}
.help-zone .help-btn {
  position: static;
  display: inline-block;
  width: max-content;
  min-width: 128px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  justify-self: end;
  box-shadow: 0 0 26px rgba(223,184,107,.18);
}
.hint-panel {
  background: rgba(11,7,4,.78);
  border: 1px solid rgba(223,184,107,.38);
  border-left: 3px solid rgba(243,211,145,.85);
  padding: 12px 14px;
  color: #f3e4ca;
  text-shadow: 0 2px 12px #000;
  backdrop-filter: blur(6px);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.hint-panel strong {
  display: block;
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  margin-bottom: 5px;
}
.hint-panel span {
  display: block;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.35;
}
.hint-panel.active { animation: cardIn .28s ease; }
.level-three .help-btn { top: auto; right: auto; }
.level-three .lightbar {
  top: calc(102px + var(--safe-top));
  right: 24px;
  width: min(31vw, 390px);
}

@media (max-width: 850px) {
  .level-two .symbols-base { height: 18vh; gap: 8px; bottom: 8px; }
  .level-two .slot { width: 22vw; min-width: 76px; }
  .level-two .slot img { max-width: 58%; }
  .level-three .timeline-slots { top: 36%; left: 3vw; right: 3vw; }
  .level-three .timeline-piece { width: 39vw; min-height: 56px; padding: 8px 9px; }
  .level-three .timeline-piece small { display: none; }
  .help-zone { right: 10px; top: 122px; width: 46vw; }
  .hint-panel span { font-size: 11px; }
  .level-three .lightbar { top: 82px; right: 10px; width: 48vw; }
}


/* Modo Historia: dinamismo narrativo */
.chapter-map {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(18px, 5vw, 74px);
  background:
    radial-gradient(circle at 50% 42%, rgba(223,184,107,.14), rgba(0,0,0,0) 36%),
    linear-gradient(90deg, rgba(0,0,0,.68), rgba(0,0,0,.15), rgba(0,0,0,.66));
}
.chapter-head { text-align: center; max-width: 920px; text-shadow: 0 5px 28px #000; }
.chapter-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(42px, 6vw, 92px);
  line-height: .92;
  text-transform: uppercase;
}
.chapter-copy {
  margin: 16px auto 0;
  max-width: 720px;
  color: #ecd9b7;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.45;
}
.chapter-grid {
  width: min(1050px, 94vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
}
.chapter-card {
  min-height: clamp(188px, 28vh, 300px);
  border: 1px solid rgba(223,184,107,.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(243,211,145,.15), rgba(0,0,0,0) 45%),
    linear-gradient(180deg, rgba(31,20,12,.82), rgba(8,5,3,.72));
  color: var(--text);
  padding: clamp(18px, 2.4vw, 30px);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 0 60px rgba(223,184,107,.04);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  animation: chapterIn .55s ease forwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes chapterIn { to { opacity: 1; transform: translateY(0); } }
.chapter-card::after {
  content: '';
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 90deg, transparent, rgba(243,211,145,.18), transparent 26%);
  animation: relicSweep 5.5s linear infinite;
  opacity: .42;
}
@keyframes relicSweep { to { transform: rotate(360deg); } }
.chapter-card > * { position: relative; z-index: 2; }
.chapter-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(243,211,145,.75);
  color: var(--gold-2);
  font-family: var(--font-title);
  font-weight: 900;
  margin-bottom: 24px;
}
.chapter-card strong {
  display: block;
  font-family: var(--font-title);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.05;
}
.chapter-card small {
  display: block;
  margin-top: 10px;
  color: #d8c6a7;
  font-size: clamp(13px, 1.1vw, 16px);
}
.chapter-card em {
  display: inline-block;
  margin-top: 24px;
  color: var(--gold-2);
  font-style: normal;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 12px;
}
.chapter-card.is-sealed {
  filter: grayscale(.85) brightness(.62);
  cursor: not-allowed;
}
.map-archive { margin-top: 2px; }

.object-discovery {
  position: absolute;
  z-index: 155;
  width: min(390px, 36vw);
  min-width: 290px;
  transform: translate(-50%, -50%);
  padding: clamp(16px, 1.6vw, 24px);
  background:
    radial-gradient(circle at 20% 0%, rgba(243,211,145,.14), rgba(0,0,0,0) 48%),
    linear-gradient(180deg, rgba(30,19,12,.96), rgba(10,6,4,.90));
  border: 1px solid rgba(223,184,107,.62);
  border-left: 3px solid rgba(243,211,145,.95);
  box-shadow: 0 20px 70px rgba(0,0,0,.65), 0 0 38px rgba(223,184,107,.16);
  color: var(--text);
  pointer-events: auto;
  animation: memoryCardIn .25s ease forwards;
}
.object-discovery::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 32px;
  width: 20px;
  height: 20px;
  background: rgba(30,19,12,.96);
  border-left: 1px solid rgba(223,184,107,.62);
  border-bottom: 1px solid rgba(223,184,107,.62);
  transform: rotate(45deg);
}
.object-discovery.closing { animation: memoryCardOut .22s ease forwards; }
@keyframes memoryCardIn { from { opacity: 0; transform: translate(-50%, -43%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes memoryCardOut { to { opacity: 0; transform: translate(-50%, -58%) scale(.96); } }
.object-discovery-title {
  margin: 2px 0 10px;
  font-family: var(--font-title);
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.03;
}
.object-discovery-body {
  color: #f1dfc3;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.5;
}
.mini-btn {
  margin-top: 14px !important;
  min-height: 42px;
  padding: 10px 18px !important;
  font-size: 13px !important;
}
.memory-focus {
  animation: memoryFocus 1.2s ease-in-out infinite;
}
@keyframes memoryFocus {
  50% { filter: brightness(1.42) drop-shadow(0 0 26px rgba(243,211,145,.78)) drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
}

.score-pop {
  position: absolute;
  z-index: 180;
  transform: translate(-50%, -50%);
  color: #ffe9a6;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(18px, 1.8vw, 28px);
  text-shadow: 0 2px 12px #000;
  pointer-events: none;
  animation: scorePop .9s ease forwards;
}
@keyframes scorePop {
  to { opacity: 0; transform: translate(-50%, -145%) scale(1.15); }
}

.level-one .item.hard-hidden {
  opacity: .86;
  transform-origin: center;
}
.level-one .item.hard-hidden:hover {
  filter: brightness(1.15) drop-shadow(0 0 18px rgba(243,211,145,.3));
}
.level-two .bg {
  filter: brightness(1.16) saturate(1.05) contrast(1.02) !important;
}
.level-two .vignette {
  background:
    radial-gradient(circle at 50% 48%, rgba(0,0,0,0) 0%, rgba(0,0,0,.04) 58%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.02) 45%, rgba(0,0,0,.16)) !important;
}
.level-two .level2-visibility-layer {
  background:
    radial-gradient(circle at 52% 42%, rgba(255,221,150,.11), rgba(0,0,0,0) 42%),
    linear-gradient(180deg, rgba(255,240,190,.04), rgba(0,0,0,.05)) !important;
}
.level-two .slot {
  border-radius: 18px;
  box-shadow: inset 0 0 24px rgba(223,184,107,.08), 0 12px 30px rgba(0,0,0,.28);
}
.level-two .slot img {
  opacity: .24;
  max-width: 64%;
}
.level-two .slot.complete img { opacity: .08; }
.level-two .symbol {
  transform-origin: center;
}
.level-two .symbol.is-dragging {
  filter: brightness(1.22) drop-shadow(0 0 26px rgba(243,211,145,.38)) drop-shadow(0 16px 26px rgba(0,0,0,.55));
}

.timeline-info {
  position: absolute;
  right: clamp(16px, 2.5vw, 40px);
  top: clamp(170px, 21vh, 220px);
  z-index: 42;
  width: min(330px, 30vw);
  min-height: 130px;
  padding: 18px 20px;
  border: 1px solid rgba(223,184,107,.42);
  background: linear-gradient(180deg, rgba(24,15,9,.86), rgba(10,6,4,.76));
  box-shadow: 0 18px 52px rgba(0,0,0,.45);
  opacity: .88;
}
.timeline-info strong {
  display: block;
  color: var(--gold-2);
  font-family: var(--font-title);
  font-size: clamp(19px, 1.6vw, 25px);
  line-height: 1.1;
  margin-bottom: 8px;
}
.timeline-info span {
  display: block;
  color: #ecdcc2;
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.45;
}
.timeline-info.active {
  animation: panelPulse .38s ease;
}
@keyframes panelPulse {
  50% { transform: translateY(-4px); box-shadow: 0 18px 56px rgba(0,0,0,.5), 0 0 28px rgba(223,184,107,.18); }
}
.level-three .timeline-piece {
  width: min(13.2vw, 172px) !important;
  min-height: 78px;
  padding: 12px 12px 10px;
  border-radius: 12px;
}
.level-three .timeline-piece strong {
  font-size: clamp(15px, 1.15vw, 20px);
}
.level-three .timeline-piece small {
  font-size: clamp(10px, .78vw, 13px);
  line-height: 1.25;
}
.level-three .timeline-slots {
  top: 39%;
  gap: clamp(8px, 1.2vw, 18px);
}
.level-three .time-slot {
  min-height: 112px;
}
.help-zone {
  max-width: min(380px, 32vw);
}
.hint-panel strong {
  font-family: var(--font-title);
}
.final-outcome {
  width: min(760px, 84vw);
  padding-block: clamp(32px, 5vw, 58px);
}
.final-star {
  animation: starPulse 1.3s ease-in-out infinite;
}
@keyframes starPulse {
  50% { transform: scale(1.12) rotate(6deg); filter: drop-shadow(0 0 25px rgba(255,235,150,.92)); }
}

@media (max-width: 900px) {
  .chapter-grid { grid-template-columns: 1fr; max-height: 56vh; overflow: auto; }
  .chapter-card { min-height: 140px; }
  .object-discovery { width: min(92vw, 380px); left: 50% !important; top: 46% !important; }
  .timeline-info { display: none; }
  .level-three .timeline-piece { width: min(36vw, 150px) !important; }
}

/* =====================================================
   CORRECCIONES FINALES GAMIFICACIÓN
   - Interfaz más compacta en PC/laptop.
   - Menú de umbrales visible completo en 1366x768.
   - Scrollbar visual oculta sin alterar interacción interna.
   - Activos WebP reducidos para cargar más rápido.
   ===================================================== */
html,
body,
.codex-body,
.chapter-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.codex-body::-webkit-scrollbar,
.chapter-grid::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.bg {
  transform: scale(1.005);
}

.menu {
  padding: clamp(18px, 3.2vw, 46px);
}
.menu-copy {
  width: min(620px, 84vw);
  margin-left: min(4vw, 52px);
}
.main-title {
  font-size: clamp(40px, 6.25vw, 88px);
  line-height: .9;
  margin-bottom: 14px;
}
.typewriter {
  max-width: 620px;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.45;
}
.menu-actions {
  margin-top: 20px;
  gap: 10px;
}
.btn {
  min-width: 160px;
  min-height: 46px;
  padding: 11px 18px;
}

.hud {
  top: calc(12px + var(--safe-top));
  left: 14px;
  right: 14px;
  gap: 12px;
}
.hud__left {
  max-width: min(52vw, 720px);
  padding: 10px 14px 12px;
}
.hud__title {
  font-size: clamp(16px, 1.55vw, 24px);
}
.hud__objective {
  font-size: clamp(11px, .95vw, 14px);
}
.hud__right {
  gap: 9px;
  padding: 8px 10px;
}
.hud-value { font-size: 16px; }
.hud-btn { height: 36px; padding: 0 12px; }
.life { width: 14px; height: 26px; }

.chapter-map {
  align-content: center;
  gap: clamp(12px, 2vw, 22px);
  padding: clamp(16px, 3vw, 44px);
}
.chapter-head {
  max-width: 780px;
}
.chapter-title {
  max-width: 780px;
  font-size: clamp(34px, 4.6vw, 66px);
  line-height: .92;
  letter-spacing: -.01em;
}
.chapter-copy {
  max-width: 660px;
  margin-top: 10px;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.38;
}
.chapter-grid {
  width: min(980px, 92vw);
  gap: clamp(10px, 1.45vw, 18px);
}
.chapter-card {
  min-height: clamp(150px, 22vh, 210px);
  padding: clamp(14px, 1.8vw, 22px);
}
.chapter-mark {
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
}
.chapter-card strong {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.06;
}
.chapter-card small {
  margin-top: 8px;
  font-size: clamp(12px, .95vw, 14px);
  line-height: 1.3;
}
.chapter-card em {
  margin-top: 16px;
  font-size: 11px;
}
.map-archive {
  margin-top: 0;
  min-height: 42px;
}

.boot-title,
.intro-title,
.outcome-title,
.codex-title {
  font-size: clamp(30px, 4.2vw, 56px);
}
.boot-box,
.intro-copy,
.outcome-copy,
.codex-copy {
  width: min(820px, 90vw);
}
.intro-body,
.outcome-body,
.codex-body {
  font-size: clamp(14px, 1.1vw, 18px);
}

.object-discovery {
  width: min(350px, 32vw);
  min-width: 260px;
  padding: clamp(14px, 1.35vw, 20px);
}
.object-discovery-title,
.discovery-title {
  font-size: clamp(24px, 3vw, 42px);
}
.object-discovery-body,
.discovery-body {
  font-size: clamp(13px, 1.05vw, 16px);
}

.level-two .symbols-base {
  height: min(16vh, 122px);
}
.level-two .slot {
  width: clamp(106px, 11vw, 156px);
  height: clamp(74px, 10vh, 104px);
}
.level-three .timeline-slots {
  top: 37%;
  left: 5vw;
  right: 5vw;
}
.level-three .time-slot {
  min-height: min(12vh, 96px);
}
.level-three .timeline-pieces {
  bottom: calc(22px + var(--safe-bottom));
  min-height: min(13vh, 108px);
}
.level-three .timeline-piece {
  width: min(12vw, 156px) !important;
  min-height: 64px;
  padding: 9px 10px;
}
.level-three .timeline-piece strong {
  font-size: clamp(12px, .95vw, 16px);
}
.level-three .timeline-piece small {
  font-size: clamp(9px, .68vw, 11px);
}
.timeline-info {
  width: min(300px, 27vw);
  top: clamp(142px, 18vh, 188px);
  min-height: 112px;
  padding: 14px 16px;
}
.help-zone {
  top: calc(138px + var(--safe-top));
  max-width: min(330px, 28vw);
}
.level-three .lightbar {
  top: calc(88px + var(--safe-top));
  width: min(29vw, 340px);
}

@media (max-height: 780px) and (min-width: 900px) {
  .chapter-map { gap: 12px; padding: 18px 28px; }
  .chapter-title { font-size: clamp(32px, 4.2vw, 56px); }
  .chapter-copy { font-size: 14px; line-height: 1.32; }
  .chapter-card { min-height: 150px; padding: 14px 18px; }
  .chapter-mark { width: 34px; height: 34px; margin-bottom: 12px; }
  .chapter-card strong { font-size: clamp(19px, 1.85vw, 25px); }
  .chapter-card small { font-size: 12px; }
  .chapter-card em { margin-top: 12px; }
  .map-archive { min-height: 40px; padding-block: 8px; }

  .main-title { font-size: clamp(38px, 5.7vw, 72px); }
  .menu-copy { width: min(560px, 82vw); }
  .typewriter { font-size: 14px; max-width: 560px; }
  .btn { min-height: 42px; }
}

@media (max-width: 900px) {
  .chapter-map { align-content: start; overflow: hidden; }
  .chapter-grid { max-height: 58vh; overflow-y: auto; }
  .chapter-title { font-size: clamp(34px, 10vw, 58px); }
  .chapter-card { min-height: 122px; }
  .menu-copy { margin-left: 0; width: 92vw; }
}

/* =====================================================
   AJUSTES SOLICITADOS - FLUJO AUTOMÁTICO + MOBILE
   ===================================================== */
html,
body,
.game {
  overscroll-behavior: none;
}
body {
  touch-action: none;
}
.menu-actions {
  opacity: 1;
  transform: none;
}
.typewriter,
.intro-body,
.object-discovery-body {
  animation: none !important;
}

/* Menú de niveles retirado del flujo del juego */
.chapter-map-scene .chapter-map {
  display: none !important;
}

/* Cinemática/recompensa automática por nivel */
.reward-cinematic {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, 4vw, 54px);
  background: radial-gradient(circle at 50% 42%, rgba(236, 177, 78, .22), rgba(0,0,0,.52) 56%, rgba(0,0,0,.84) 100%);
}
.reward-glow {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,240,168,.36), rgba(223,184,107,.10) 24%, rgba(0,0,0,0) 58%),
    conic-gradient(from 0deg, rgba(223,184,107,0), rgba(223,184,107,.22), rgba(223,184,107,0), rgba(223,184,107,.18), rgba(223,184,107,0));
  filter: blur(2px);
  animation: rewardGlow 5.2s linear forwards;
}
@keyframes rewardGlow {
  from { transform: scale(1) rotate(0deg); opacity: .8; }
  to { transform: scale(1.12) rotate(18deg); opacity: .42; }
}
.reward-badge {
  position: absolute;
  top: clamp(42px, 10vh, 98px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  text-shadow: 0 5px 26px #000;
  pointer-events: none;
}
.reward-star {
  color: #fff0a8;
  font-size: clamp(76px, 12vw, 172px);
  line-height: .7;
  text-shadow: 0 0 20px rgba(255,240,168,.96), 0 0 52px rgba(223,184,107,.86);
  animation: starRise 1.35s cubic-bezier(.18,.9,.2,1.14) forwards, starPulse 1.6s ease-in-out 1.35s infinite;
}
.reward-fragment {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 230, 157, .62);
  border-radius: 999px;
  background: rgba(14, 8, 5, .68);
  color: #ffe7a4;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 900;
  backdrop-filter: blur(6px);
}
.reward-card {
  position: relative;
  z-index: 2;
  width: min(760px, 90vw);
  margin-top: clamp(130px, 22vh, 210px);
  padding: clamp(22px, 4vw, 44px);
  text-align: center;
  border: 1px solid rgba(223,184,107,.52);
  border-left: 3px solid rgba(255,230,157,.86);
  border-right: 3px solid rgba(255,230,157,.22);
  background: linear-gradient(180deg, rgba(24,15,9,.88), rgba(9,6,4,.78));
  box-shadow: 0 26px 76px rgba(0,0,0,.55), inset 0 0 58px rgba(223,184,107,.08);
  backdrop-filter: blur(7px);
  animation: rewardCardIn .62s ease .42s both;
}
@keyframes rewardCardIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.reward-title {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 66px);
  line-height: .96;
  text-transform: uppercase;
}
.reward-body {
  color: #f2e3c9;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.48;
  white-space: pre-line;
}
.reward-prize {
  display: inline-grid;
  gap: 4px;
  margin: 18px auto 16px;
  padding: 12px 18px;
  min-width: min(420px, 84vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 230, 157, .42);
  background: radial-gradient(circle at 50% 0%, rgba(255,226,137,.18), rgba(56,35,18,.58));
  box-shadow: inset 0 0 34px rgba(223,184,107,.09);
}
.reward-prize strong {
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
}
.reward-prize span {
  color: #fff3d0;
  font-family: var(--font-title);
  font-size: clamp(18px, 2.1vw, 30px);
  line-height: 1;
}
.reward-progress {
  width: min(460px, 80vw);
  height: 7px;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 1px solid rgba(223,184,107,.38);
  background: rgba(6,4,3,.68);
}
.reward-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #8a6233, #efad53, #fff0a8);
  animation: rewardProgress 5.2s linear forwards;
}
@keyframes rewardProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.reward-next {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 800;
}
.reward-skip {
  min-height: 42px;
  min-width: 150px;
  padding-block: 9px;
}

/* Nivel 2: PNG únicos sin bordes y siluetas oscuras legibles */
.level-two .slot {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(221, 176, 102, .20), rgba(15, 9, 5, .62));
  border-color: rgba(245, 211, 145, .62);
  box-shadow: inset 0 0 30px rgba(0,0,0,.18), 0 14px 34px rgba(0,0,0,.34);
}
.level-two .slot img {
  opacity: .48 !important;
  filter: brightness(0) saturate(0) opacity(.82) drop-shadow(0 0 14px rgba(255,225,150,.16)) !important;
  max-width: 70% !important;
  max-height: 72% !important;
}
.level-two .slot.complete img {
  opacity: .09 !important;
}
.level-two .symbol,
.level-two .distractor {
  image-rendering: auto;
  backface-visibility: hidden;
}

/* Mobile: interfaz compacta y elementos jugables con dedo */
@media (max-width: 700px), (pointer: coarse) {
  html, body { height: 100svh; }
  .game { height: 100svh; min-height: 100svh; }
  .bg { transform: scale(1.01); }
  .hud {
    top: calc(6px + var(--safe-top));
    left: 8px;
    right: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .hud__left {
    max-width: none;
    padding: 7px 10px;
    border-left-width: 1px;
    background: linear-gradient(90deg, rgba(17,11,7,.82), rgba(17,11,7,.36));
  }
  .hud__title { font-size: clamp(14px, 4.4vw, 18px); }
  .hud__objective { display: none; }
  .hud__right {
    justify-content: space-between;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 14px;
  }
  .hud-label { font-size: 7px; letter-spacing: .08em; }
  .hud-value { font-size: 13px; }
  .life { width: 11px; height: 21px; }
  .hud-btn { height: 30px; padding: 0 9px; font-size: 11px; }
  .audio-toggle { right: 8px; bottom: calc(8px + var(--safe-bottom)); padding: 7px 10px; font-size: 10px; }
  .toast { top: calc(92px + var(--safe-top)); padding: 10px 12px; font-size: 12px; }

  .menu { padding: 18px; place-items: center; }
  .menu-copy { width: 92vw; margin-left: 0; }
  .main-title { font-size: clamp(38px, 15vw, 68px); }
  .typewriter { font-size: 13px; line-height: 1.42; }
  .menu-actions { gap: 8px; margin-top: 16px; }
  .btn { min-width: 144px; min-height: 42px; padding: 10px 14px; font-size: 13px; }

  .intro-copy,
  .outcome-copy,
  .codex-copy {
    width: min(92vw, 480px);
    padding: 20px 18px;
  }
  .intro-title,
  .outcome-title,
  .codex-title { font-size: clamp(28px, 9vw, 44px); }
  .intro-body,
  .outcome-body,
  .codex-body { font-size: 13px; line-height: 1.42; }

  .flashlight-control { left: 8px; bottom: calc(8px + var(--safe-bottom)); padding: 8px 11px; font-size: 9px; }
  .flashlight-layer { --r: 118px; }
  .level-one .item { width: clamp(42px, 11vw, 66px) !important; }
  .level-one .distractor { width: clamp(42px, 10vw, 64px) !important; }
  .object-discovery {
    width: min(92vw, 360px) !important;
    min-width: 0;
    left: 50% !important;
    top: 50% !important;
    padding: 16px;
  }
  .object-discovery::before { display: none; }

  .level-two .symbols-base {
    left: 2vw;
    right: 2vw;
    bottom: calc(8px + var(--safe-bottom));
    height: 14.5vh;
    gap: 5px;
  }
  .level-two .slot {
    width: 23vw !important;
    min-width: 68px !important;
    height: clamp(70px, 11vh, 88px) !important;
    border-radius: 12px;
  }
  .level-two .slot::before { bottom: 5px; font-size: 8px; letter-spacing: .02em; }
  .level-two .slot img { max-width: 62% !important; max-height: 62% !important; }
  .level-two .symbol,
  .level-two .distractor {
    width: clamp(46px, 13vw, 76px) !important;
  }

  .level-three .lightbar { top: calc(72px + var(--safe-top)); left: 8px; right: auto; width: 46vw; }
  .help-zone { top: calc(72px + var(--safe-top)); right: 8px; width: 46vw; }
  .hint-panel { padding: 8px 9px; }
  .hint-panel strong { font-size: 9px; }
  .hint-panel span { font-size: 10px; line-height: 1.25; }
  .level-three .timeline-slots {
    top: 31%;
    left: 5vw;
    right: 5vw;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }
  .level-three .time-slot {
    min-height: 72px;
    padding: 8px;
  }
  .time-slot::before { top: -14px; left: 8px; font-size: 26px; }
  .time-slot span { font-size: 10px; }
  .level-three .timeline-pieces {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 32vh;
  }
  .level-three .timeline-piece {
    width: min(38vw, 148px) !important;
    min-height: 58px;
    padding: 8px 9px;
  }
  .level-three .timeline-piece strong { font-size: 12px; }
  .level-three .timeline-piece small { display: none; }
  .timeline-info { display: none; }

  .reward-cinematic { padding: 14px; place-items: end center; }
  .reward-badge { top: calc(42px + var(--safe-top)); }
  .reward-star { font-size: clamp(72px, 26vw, 118px); }
  .reward-card {
    width: 92vw;
    margin-top: 0;
    margin-bottom: calc(18px + var(--safe-bottom));
    padding: 18px 16px;
  }
  .reward-title { font-size: clamp(28px, 9.5vw, 44px); }
  .reward-body { font-size: 12px; line-height: 1.35; }
  .reward-prize { margin: 12px auto; padding: 10px 12px; border-radius: 14px; }
  .reward-prize span { font-size: 18px; }
  .reward-next { font-size: 10px; }
  .legacy-message { bottom: 20%; font-size: clamp(30px, 10vw, 52px); }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hud { flex-direction: row; align-items: flex-start; }
  .hud__left { max-width: 45vw; }
  .hud__objective { display: none; }
  .level-two .symbols-base { height: 18vh; }
  .level-two .slot { height: 66px !important; }
  .level-three .timeline-slots { top: 30%; grid-template-columns: repeat(4, 1fr); }
  .level-three .time-slot { min-height: 62px; }
  .level-three .timeline-piece { width: min(21vw, 132px) !important; min-height: 50px; }
  .reward-card { margin-bottom: 10px; padding: 14px 18px; }
  .reward-badge { top: 18px; }
  .reward-star { font-size: 72px; }
}
.reward-prize::before {
  content: '★';
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: -2px auto 2px;
  border-radius: 50%;
  color: #2b1a0d;
  background: linear-gradient(180deg, #fff0a8, #c98e45);
  box-shadow: 0 0 24px rgba(255,240,168,.48);
  font-weight: 900;
}

/* =====================================================
   AJUSTES EXTRA SOLICITADOS 25/06
   ===================================================== */

/* Nivel 1: ocultar cursor dentro de la escena de linterna */
.level-one,
.level-one .scene-content,
.level-one .item,
.level-one .distractor,
.level-one .flashlight-layer,
.level-one .darkness-extra {
  cursor: none !important;
}
.level-one .flashlight-control,
.level-one .btn,
.level-one .hud-btn,
.level-one .audio-toggle {
  cursor: pointer !important;
}

/* Recompensa entre niveles: más compacta y centrada */
.reward-cinematic {
  place-items: center !important;
  padding: clamp(16px, 2.6vw, 28px) !important;
}
.reward-badge {
  top: clamp(22px, 7vh, 54px) !important;
}
.reward-card {
  width: min(640px, 78vw) !important;
  margin-top: clamp(112px, 15vh, 148px) !important;
  padding: clamp(18px, 2.6vw, 28px) !important;
}
.reward-title {
  font-size: clamp(28px, 4.2vw, 54px) !important;
}
.reward-body {
  font-size: clamp(13px, 1.08vw, 16px) !important;
}
.reward-prize {
  min-width: min(360px, 74vw) !important;
}
@media (max-width: 700px), (pointer: coarse) {
  .reward-cinematic {
    place-items: center !important;
  }
  .reward-card {
    width: min(92vw, 450px) !important;
    margin-top: 94px !important;
    margin-bottom: 0 !important;
  }
}

/* Nivel 2: elementos más visibles, siluetas más oscuras y grandes */
.level-two .search-object {
  opacity: 1 !important;
  filter: brightness(.96) saturate(1.03) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important;
}
.level-two .search-object:hover,
.level-two .search-object.is-dragging {
  filter: brightness(1.12) saturate(1.08) drop-shadow(0 0 28px rgba(243,211,145,.40)) drop-shadow(0 18px 28px rgba(0,0,0,.60)) !important;
}
.level-two .decoy-a { filter: hue-rotate(-8deg) saturate(.92) brightness(.88) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-b { filter: hue-rotate(18deg) saturate(.84) brightness(.84) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-c { filter: hue-rotate(36deg) saturate(.78) brightness(.86) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-d { filter: hue-rotate(52deg) saturate(.82) brightness(.88) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-e { filter: hue-rotate(74deg) saturate(.80) brightness(.87) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-f { filter: hue-rotate(98deg) saturate(.84) brightness(.86) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-g { filter: hue-rotate(126deg) saturate(.76) brightness(.84) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-h { filter: hue-rotate(146deg) saturate(.85) brightness(.87) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .decoy-i { filter: hue-rotate(176deg) saturate(.82) brightness(.86) drop-shadow(0 18px 26px rgba(0,0,0,.62)) !important; }
.level-two .symbols-base {
  height: min(22vh, 182px) !important;
  gap: clamp(12px, 2.2vw, 34px) !important;
}
.level-two .slot {
  width: clamp(136px, 16.4vw, 220px) !important;
  height: clamp(98px, 13.2vh, 146px) !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(225,182,109,.23), rgba(16,10,6,.70)) !important;
  box-shadow: inset 0 0 38px rgba(0,0,0,.28), 0 18px 36px rgba(0,0,0,.40) !important;
}
.level-two .slot::before {
  bottom: 7px !important;
  font-size: 13px !important;
}
.level-two .slot img {
  opacity: .82 !important;
  filter: brightness(0) saturate(0) contrast(1.18) opacity(.95) drop-shadow(0 0 26px rgba(0,0,0,.26)) !important;
  max-width: 84% !important;
  max-height: 82% !important;
}
.level-two .slot.complete img {
  opacity: .12 !important;
}
@media (max-width: 700px), (pointer: coarse) {
  .level-two .symbols-base {
    height: 16vh !important;
    gap: 6px !important;
  }
  .level-two .slot {
    width: 23.5vw !important;
    min-width: 72px !important;
    height: clamp(76px, 12vh, 96px) !important;
  }
  .level-two .slot img {
    max-width: 78% !important;
    max-height: 76% !important;
  }
  .level-two .symbol,
  .level-two .distractor {
    width: clamp(54px, 14vw, 84px) !important;
  }
}

/* Nivel 3: cards más grandes y paneles separados */
.level-three .lightbar {
  top: calc(106px + var(--safe-top)) !important;
  right: 18px !important;
  width: min(25vw, 340px) !important;
}
.level-three .timeline-slots {
  left: 4vw !important;
  right: min(31vw, 410px) !important;
  top: 39% !important;
  gap: clamp(12px, 1.4vw, 20px) !important;
}
.level-three .time-slot {
  min-height: 124px !important;
  padding: 14px 10px !important;
  background: rgba(14,8,5,.68) !important;
}
.level-three .time-slot span {
  font-size: 13px !important;
}
.level-three .timeline-pieces {
  left: 3vw !important;
  right: 3vw !important;
  bottom: calc(28px + var(--safe-bottom)) !important;
  min-height: 22vh !important;
}
.level-three .timeline-piece {
  width: min(16vw, 214px) !important;
  min-height: 104px !important;
  padding: 14px 14px 12px !important;
  border-radius: 14px !important;
}
.level-three .timeline-piece strong {
  font-size: clamp(17px, 1.28vw, 22px) !important;
}
.level-three .timeline-piece small {
  display: block !important;
  font-size: clamp(11px, .92vw, 14px) !important;
  line-height: 1.3 !important;
}
.help-zone {
  top: calc(160px + var(--safe-top)) !important;
  right: 18px !important;
  width: min(25vw, 340px) !important;
  max-width: none !important;
}
.hint-panel,
.timeline-info {
  border-radius: 18px;
  border: 1px solid rgba(223,184,107,.48) !important;
  background: linear-gradient(180deg, rgba(24,15,9,.92), rgba(10,6,4,.82)) !important;
  box-shadow: 0 18px 52px rgba(0,0,0,.46) !important;
}
.hint-panel {
  min-height: 126px;
}
.hint-panel strong,
.timeline-info strong {
  font-size: clamp(20px, 1.55vw, 26px) !important;
}
.hint-panel span,
.timeline-info span {
  font-size: clamp(13px, 1.02vw, 16px) !important;
  line-height: 1.48 !important;
}
.timeline-info {
  right: 18px !important;
  top: calc(318px + var(--safe-top)) !important;
  width: min(25vw, 340px) !important;
  min-height: 200px !important;
}
@media (max-width: 1100px) {
  .level-three .timeline-slots {
    right: min(34vw, 360px) !important;
  }
  .level-three .timeline-piece {
    width: min(18vw, 196px) !important;
  }
}
@media (max-width: 700px), (pointer: coarse) {
  .level-three .lightbar {
    top: calc(72px + var(--safe-top)) !important;
    left: 8px !important;
    right: auto !important;
    width: 44vw !important;
  }
  .help-zone {
    top: calc(72px + var(--safe-top)) !important;
    right: 8px !important;
    width: 44vw !important;
  }
  .hint-panel {
    min-height: 118px;
  }
  .timeline-info {
    display: none !important;
  }
  .level-three .timeline-slots {
    left: 4vw !important;
    right: 4vw !important;
    top: 33% !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 10px !important;
  }
  .level-three .time-slot {
    min-height: 84px !important;
  }
  .level-three .timeline-pieces {
    min-height: 34vh !important;
  }
  .level-three .timeline-piece {
    width: min(41vw, 176px) !important;
    min-height: 74px !important;
    padding: 10px 10px 9px !important;
  }
  .level-three .timeline-piece strong {
    font-size: 13px !important;
  }
  .level-three .timeline-piece small {
    display: block !important;
    font-size: 10px !important;
  }
}

/* Final del nivel 3: animación + QR + botón YouTube */
.final-portal {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
  padding: clamp(18px, 4vw, 54px);
}
.final-stage,
.final-side-card {
  position: relative;
  border: 1px solid rgba(223,184,107,.46);
  background: linear-gradient(180deg, rgba(18,11,7,.84), rgba(10,6,4,.72));
  box-shadow: 0 26px 70px rgba(0,0,0,.52), inset 0 0 42px rgba(223,184,107,.08);
  backdrop-filter: blur(6px);
}
.final-stage {
  min-height: min(66vh, 620px);
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(28px, 4vw, 48px);
}
.final-stage-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 38%, rgba(255,226,136,.24), rgba(176,95,23,.10) 28%, rgba(0,0,0,0) 60%);
  animation: glowBreath 2.6s ease-in-out infinite;
}
.final-stage-ring {
  position: absolute;
  left: 50%;
  top: 40%;
  border-radius: 50%;
  border: 1px solid rgba(255,226,136,.22);
  transform: translate(-50%, -50%);
}
.final-stage-ring.ring-a {
  width: clamp(180px, 28vw, 340px);
  height: clamp(180px, 28vw, 340px);
  animation: slowSpin 14s linear infinite;
}
.final-stage-ring.ring-b {
  width: clamp(240px, 36vw, 430px);
  height: clamp(240px, 36vw, 430px);
  animation: slowSpinReverse 18s linear infinite;
}
@keyframes slowSpin { from { transform: translate(-50%, -50%) rotate(0deg);} to { transform: translate(-50%, -50%) rotate(360deg);} }
@keyframes slowSpinReverse { from { transform: translate(-50%, -50%) rotate(360deg);} to { transform: translate(-50%, -50%) rotate(0deg);} }
.final-stage-star {
  position: relative;
  z-index: 2;
  color: #fff0a8;
  font-size: clamp(84px, 12vw, 180px);
  line-height: .8;
  text-shadow: 0 0 20px rgba(255,240,168,.96), 0 0 52px rgba(223,184,107,.86);
  animation: starPulse 1.6s ease-in-out infinite;
}
.final-stage-title {
  position: relative;
  z-index: 2;
  margin: 10px 0 12px;
  font-family: var(--font-title);
  font-size: clamp(38px, 5vw, 74px);
  line-height: .92;
  text-transform: uppercase;
}
.final-stage-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  color: #f2e3c9;
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.52;
}
.final-side-card {
  padding: clamp(20px, 2.5vw, 28px);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.final-side-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(28px, 3vw, 44px);
  line-height: .98;
  text-transform: uppercase;
}
.final-qr-wrap {
  width: min(240px, 62vw);
  aspect-ratio: 1;
  padding: 14px;
  background: #fff9f0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.28);
}
.final-qr {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.final-side-text {
  margin: 0;
  color: #ead7bd;
  font-size: 14px;
  line-height: 1.45;
}
.final-go-btn,
.final-restart-btn {
  width: min(280px, 100%);
}
@media (max-width: 900px) {
  .final-portal {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .final-stage {
    min-height: 48vh;
  }
  .final-side-card {
    padding: 18px;
  }
  .final-qr-wrap {
    width: min(220px, 58vw);
  }
}

/* =====================================================
   AJUSTES EXTRA V3
   ===================================================== */

/* Nivel 2: siluetas dentro del recuadro */
.level-two .slot {
  overflow: hidden !important;
  isolation: isolate;
  padding: 8px 10px 24px !important;
}
.level-two .slot img {
  position: absolute !important;
  left: 50% !important;
  top: 44% !important;
  transform: translate(-50%, -50%) !important;
  width: 72% !important;
  height: 72% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  filter: brightness(0) saturate(0) contrast(1.12) opacity(.9) !important;
}
.level-two .slot.complete img {
  opacity: .1 !important;
}

/* Nivel 1: indicador de selección */
.select-hint {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(243,211,145,.62);
  background: rgba(15, 9, 5, .88);
  color: #fff4d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.select-hint.show {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 6px));
}
.select-finger {
  font-size: 16px;
  line-height: 1;
  animation: fingerPulse 1s ease-in-out infinite;
}
@keyframes fingerPulse {
  50% { transform: translateY(-2px) scale(1.12); }
}
@media (max-width: 700px), (pointer: coarse) {
  .select-hint { display: none !important; }
}

/* Nivel 3: lado derecho más sutil */
.level-three .lightbar {
  width: min(22vw, 290px) !important;
}
.help-zone {
  width: min(22vw, 290px) !important;
  top: calc(156px + var(--safe-top)) !important;
}
.help-zone .help-btn {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}
.hint-panel {
  min-height: 88px !important;
  padding: 12px 14px !important;
  opacity: .82;
}
.hint-panel strong {
  font-size: clamp(16px, 1.24vw, 21px) !important;
  margin-bottom: 4px;
}
.hint-panel span {
  font-size: clamp(12px, .92vw, 14px) !important;
  line-height: 1.36 !important;
}
.timeline-info {
  width: min(22vw, 290px) !important;
  min-height: 116px !important;
  top: calc(274px + var(--safe-top)) !important;
  padding: 14px 16px !important;
  opacity: .7;
}
.timeline-info strong {
  font-size: clamp(16px, 1.18vw, 20px) !important;
  margin-bottom: 5px;
}
.timeline-info span {
  font-size: clamp(12px, .9vw, 14px) !important;
  line-height: 1.38 !important;
}
.level-three .timeline-slots {
  right: min(27vw, 330px) !important;
}
@media (max-width: 700px), (pointer: coarse) {
  .help-zone {
    width: 42vw !important;
    top: calc(72px + var(--safe-top)) !important;
  }
  .hint-panel {
    min-height: 74px !important;
    padding: 10px 11px !important;
  }
}

/* Recompensa de nivel: poco texto, centrada y más pequeña */
.reward-cinematic--compact {
  place-items: center !important;
}
.reward-cinematic--compact .reward-badge {
  top: 24% !important;
}
.reward-card--compact {
  width: min(470px, 64vw) !important;
  margin-top: 110px !important;
  padding: 18px 22px !important;
  text-align: center;
}
.reward-card--compact .kicker {
  margin-bottom: 8px;
}
.reward-card--compact .reward-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.3vw, 42px) !important;
}
.reward-card--compact .reward-next {
  margin: 0 0 12px;
  font-size: 11px !important;
}
.reward-card--compact .reward-skip {
  min-width: 132px;
  min-height: 38px;
  padding: 8px 14px;
}
@media (max-width: 700px), (pointer: coarse) {
  .reward-cinematic--compact .reward-badge {
    top: 18% !important;
  }
  .reward-card--compact {
    width: min(88vw, 390px) !important;
    margin-top: 84px !important;
    padding: 16px 18px !important;
  }
}

/* Reintento del mismo nivel */
.retry-outcome {
  width: min(440px, 82vw) !important;
  padding: 24px 22px !important;
  text-align: center;
}

/* =====================================================
   AJUSTES EXTRA V4
   ===================================================== */

/* Eliminar globo de seleccionar anterior */
.select-hint {
  display: none !important;
}

/* Cursor dedito para nivel 1 */
.level-one,
.level-one .scene-content,
.level-one .item,
.level-one .distractor,
.level-one .flashlight-layer,
.level-one .darkness-extra {
  cursor: none !important;
}
.pointer-finger-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 180;
  pointer-events: none;
  transform: translate(-35%, -8%);
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.55));
  user-select: none;
}

/* Nivel 3: paneles derechos bien separados */
.level-three .lightbar {
  top: calc(86px + var(--safe-top)) !important;
  right: 16px !important;
  width: min(21vw, 280px) !important;
}
.level-three .help-zone {
  top: calc(150px + var(--safe-top)) !important;
  right: 16px !important;
  width: min(21vw, 280px) !important;
  max-width: min(21vw, 280px) !important;
}
.level-three .help-zone.show {
  display: grid !important;
  gap: 10px !important;
}
.level-three .help-zone .help-btn {
  justify-self: stretch !important;
  width: 100% !important;
}
.level-three .hint-panel {
  min-height: 80px !important;
  max-height: 88px !important;
  overflow: hidden !important;
}
.level-three .timeline-info {
  right: 16px !important;
  top: calc(292px + var(--safe-top)) !important;
  width: min(21vw, 280px) !important;
  min-height: 96px !important;
  max-height: 108px !important;
  overflow: hidden !important;
}
.level-three .timeline-slots {
  right: min(25vw, 310px) !important;
}
@media (max-width: 700px), (pointer: coarse) {
  .pointer-finger-cursor { display: none !important; }
  .level-three .lightbar {
    top: calc(72px + var(--safe-top)) !important;
    left: 8px !important;
    right: auto !important;
    width: 42vw !important;
  }
  .level-three .help-zone {
    top: calc(72px + var(--safe-top)) !important;
    right: 8px !important;
    width: 42vw !important;
    max-width: 42vw !important;
  }
  .level-three .timeline-info { display: none !important; }
  .level-three .timeline-slots {
    right: 4vw !important;
  }
}

/* Pantalla final ajustada al viewport sin desbordar */
.final-portal {
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  padding: 14px !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.75fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
}
.final-stage,
.final-side-card {
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
}
.final-stage {
  min-height: 0 !important;
  padding: 24px !important;
}
.final-stage-star {
  font-size: clamp(72px, 9vw, 130px) !important;
}
.final-stage-title {
  font-size: clamp(30px, 4.5vw, 58px) !important;
  margin: 8px 0 10px !important;
}
.final-stage-copy {
  font-size: clamp(13px, 1.05vw, 17px) !important;
  line-height: 1.4 !important;
  max-width: 520px !important;
}
.final-side-card {
  padding: 18px !important;
  gap: 10px !important;
  justify-items: center !important;
  align-content: start !important;
}
.final-side-title {
  font-size: clamp(24px, 3.2vw, 40px) !important;
}
.final-qr-wrap {
  width: min(190px, 18vw) !important;
  padding: 10px !important;
  border-radius: 16px !important;
}
.final-side-text {
  font-size: 12px !important;
  line-height: 1.35 !important;
}
.final-go-btn,
.final-restart-btn {
  width: min(240px, 100%) !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
}
@media (max-width: 900px) {
  .final-portal {
    grid-template-columns: 1fr !important;
    height: 100svh !important;
    max-height: 100svh !important;
    padding: 10px !important;
    gap: 10px !important;
  }
  .final-stage,
  .final-side-card {
    max-height: none !important;
  }
  .final-stage {
    min-height: 44vh !important;
    padding: 18px !important;
  }
  .final-side-card {
    padding: 14px !important;
  }
  .final-qr-wrap {
    width: min(170px, 46vw) !important;
  }
}
