/* Dinosaurio Match — mundo único: selva prehistórica, botones gruesos, contornos marrones */
:root {
  --jungle-900: #12301f; --jungle-700: #1f4d3a; --jungle-500: #2f7a52;
  --lime: #9bd14b; --lime-dk: #5f9a22; --lava: #ff7a2f; --lava-dk: #c4501a;
  --amber: #ffc23d; --sand: #f6e6c4; --sand-dk: #e2c894; --bone: #fff8e8; --ink: #3a2618;
  --sky: #4fc3c7; --berry: #c2477a; --berry-dk: #8c2a55; --grey: #b8ad9c;
  --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body { background: var(--jungle-900); color: var(--ink); font-family: var(--font-body); overflow: hidden; -webkit-tap-highlight-color: transparent; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; }
#app { position: relative; height: 100%; max-width: 520px; margin: 0 auto; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: var(--jungle-700); }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen[hidden] { display: none !important; }

/* ---------- botones ---------- */
.btn { appearance: none; border: 3px solid var(--ink); border-radius: 16px; background: var(--lime); color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.02em; padding: 10px 18px; box-shadow: 0 5px 0 var(--ink), inset 0 -4px 0 rgba(0,0,0,0.15), inset 0 3px 0 rgba(255,255,255,0.45); cursor: pointer; transition: transform 0.06s, box-shadow 0.06s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-shadow: 0 1px 0 rgba(255,255,255,0.4); min-height: 48px; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), inset 0 -4px 0 rgba(0,0,0,0.15), inset 0 3px 0 rgba(255,255,255,0.45); }
.btn:focus-visible, .icon-btn:focus-visible, .node:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn.lava { background: var(--lava); color: #fff; text-shadow: 0 2px 0 rgba(58,38,24,0.6); }
.btn.sand { background: var(--sand); }
.btn.berry { background: var(--berry); color: #fff; text-shadow: 0 2px 0 rgba(58,38,24,0.6); }
.btn.sky { background: var(--sky); }
.btn.big { font-size: 1.5rem; padding: 12px 28px; min-height: 58px; border-radius: 20px; }
.btn.small { font-size: 0.95rem; padding: 6px 12px; min-height: 38px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
.btn.small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { filter: grayscale(0.8) brightness(0.85); pointer-events: none; }
.icon-btn { appearance: none; width: 46px; height: 46px; border-radius: 14px; border: 3px solid var(--ink); background: var(--sand); box-shadow: 0 4px 0 var(--ink); font-size: 1.35rem; display: grid; place-items: center; cursor: pointer; padding: 0; position: relative; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.badge { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--lava); color: #fff; border: 2px solid var(--ink); font: 13px/18px var(--font-display); text-align: center; padding: 0 4px; }

/* ---------- pastillas de recursos ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(18,48,31,0.8); border: 3px solid var(--ink); border-radius: 999px; padding: 3px 12px 3px 4px; color: #fff; font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 var(--ink); }
.pill .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: var(--amber); border: 2px solid var(--ink); }
.pill.stars .ic { background: #ffe27a; }

/* ---------- título ---------- */
#title { background: radial-gradient(120% 80% at 50% 25%, #8fe0b0 0%, #2f7a52 45%, #12301f 100%); align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 24px 16px; cursor: pointer; }
.logo { font-family: var(--font-display); color: var(--amber); font-size: clamp(2.6rem, 13vw, 4rem); line-height: 0.92; letter-spacing: 0.01em; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); transform: rotate(-3deg); }
.logo span { display: block; color: var(--lime); font-size: 1.15em; }
.tagline { font-family: var(--font-display); color: #fff; font-size: 1.2rem; text-shadow: 0 2px 0 var(--ink); }
.title-dino { font-size: 7rem; line-height: 1; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(0,0,0,0.25)); }
.tap-hint { font-family: var(--font-display); color: var(--bone); font-size: 1.3rem; animation: pulse 1.2s ease-in-out infinite; text-shadow: 0 2px 0 var(--ink); }
.title-joke { max-width: 30ch; color: var(--bone); font-weight: 700; font-size: 0.95rem; opacity: 0.9; min-height: 2.6em; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.96); } }

/* ---------- barras ---------- */
.topbar { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; display: flex; align-items: center; gap: 8px; z-index: 5; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar .grow { flex: 1; }
.navbar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(31,77,58,0) 0%, rgba(18,48,31,0.95) 30%); z-index: 5; }
.nav-btn { appearance: none; border: 3px solid var(--ink); border-radius: 14px; background: var(--sand); box-shadow: 0 4px 0 var(--ink); padding: 4px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 0; font-family: var(--font-display); font-size: 0.78rem; cursor: pointer; position: relative; min-height: 56px; justify-content: center; }
.nav-btn .e { font-size: 1.45rem; line-height: 1.15; }
.nav-btn.on { background: var(--amber); transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink); }
.nav-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }

/* ---------- mapa ---------- */
#map { background: var(--jungle-900); }
.map-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.map-inner { position: relative; width: 100%; }
.world { position: absolute; left: 0; right: 0; overflow: hidden; content-visibility: auto; }   /* con 100 mundos, pintar los 900 adornos de fuera de pantalla congelaba el mapa ~30 s en un móvil lento */
.world .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; opacity: 0.6; }
.world-banner { position: absolute; left: 50%; transform: translateX(-50%); top: 22px; background: var(--sand); border: 3px solid var(--ink); border-radius: 14px; padding: 6px 16px 8px; text-align: center; box-shadow: 0 4px 0 var(--ink); width: max-content; max-width: calc(100% - 24px); z-index: 2; }
.world-banner b { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }
.world-banner small { font-weight: 700; font-size: 0.8rem; opacity: 0.8; }
.decor { position: absolute; font-size: 2rem; opacity: 0.85; pointer-events: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.2)); }
.map-path { position: absolute; inset: 0; pointer-events: none; }
.node { position: absolute; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; border: 4px solid var(--ink); background: var(--lime); box-shadow: 0 5px 0 var(--ink), inset 0 -5px 0 rgba(0,0,0,0.18), inset 0 4px 0 rgba(255,255,255,0.5); font-family: var(--font-display); font-size: 1.45rem; display: grid; place-items: center; cursor: pointer; color: var(--ink); z-index: 3; padding: 0; appearance: none; }
.node.locked { background: var(--grey); color: rgba(58,38,24,0.55); }
.node.hard { background: var(--berry); color: #fff; text-shadow: 0 2px 0 var(--ink); }
.node.hard.locked { background: #b88aa0; }
.node.mini { background: var(--sky); border-radius: 18px; }
.node.mini.locked { background: #9ab9ba; }
.node.cur { animation: nodepulse 1.1s ease-in-out infinite; }
.node .tag { position: absolute; top: -12px; right: -12px; font-size: 1.1rem; }
.node .st { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 0.85rem; letter-spacing: -2px; white-space: nowrap; }
.node .st i { font-style: normal; filter: drop-shadow(0 1px 0 var(--ink)); }
.node .st i.off { filter: grayscale(1) opacity(0.45); }
.avatar { position: absolute; z-index: 4; font-size: 2.6rem; margin: -86px 0 0 -22px; animation: bob 1.4s ease-in-out infinite; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,0.3)); }
@keyframes nodepulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.map-chatter { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: flex-end; gap: 8px; pointer-events: none; transition: opacity 0.4s; }
.side-btns { position: absolute; z-index: 6; right: 12px; top: calc(70px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 10px; }
.side-btns .icon-btn { width: 54px; height: 54px; font-size: 1.6rem; }
.side-btns .icon-btn small { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font: 0.68rem var(--font-display); color: #fff; text-shadow: 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); white-space: nowrap; }

/* ---------- burbuja de Rexi ---------- */
.rexi { display: flex; align-items: flex-end; gap: 6px; }
.rexi .face { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.25)); flex: none; }
.bubble { background: var(--bone); border: 3px solid var(--ink); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-weight: 700; font-size: 0.95rem; line-height: 1.3; box-shadow: 0 4px 0 rgba(58,38,24,0.5); min-width: 0; text-wrap: pretty; }
.bubble b { font-family: var(--font-display); font-weight: 400; display: block; font-size: 1rem; color: var(--lava-dk); }

/* ---------- partida ---------- */
#game { background: linear-gradient(180deg, var(--sky-top, #7ed3e8) 0%, var(--sky-bot, #c9f0d6) 55%, var(--ground, #5fa84a) 100%); }
#game::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 26%; background: radial-gradient(60% 100% at 25% 100%, rgba(18,48,31,0.45) 0 60%, transparent 61%), radial-gradient(55% 90% at 80% 100%, rgba(18,48,31,0.35) 0 60%, transparent 61%); pointer-events: none; }
#board { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0; display: flex; flex-direction: column; gap: 6px; z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-row { display: flex; align-items: stretch; gap: 8px; }
.moves-box { flex: none; width: 76px; background: var(--jungle-700); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); color: #fff; text-align: center; display: flex; flex-direction: column; justify-content: center; padding: 4px 0; }
.moves-box b { font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.moves-box small { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.85; text-transform: uppercase; }
.moves-box.low { background: var(--berry); animation: pulse 0.8s ease-in-out infinite; }
.goals-box { flex: 1; min-width: 0; background: var(--sand); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); display: flex; align-items: center; justify-content: space-around; padding: 4px 6px; gap: 2px; }
.goal { position: relative; width: 52px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.goal canvas { width: 40px; height: 40px; }
.goal .n { position: absolute; bottom: -2px; right: -2px; min-width: 26px; height: 24px; border-radius: 12px; padding: 0 5px; background: #fff; border: 2.5px solid var(--ink); font: 1rem/19px var(--font-display); text-align: center; font-variant-numeric: tabular-nums; }
.goal.done .n { background: var(--lime); }
.goal.bump canvas { animation: bump 0.25s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.lvl-label { text-align: center; font-family: var(--font-display); color: #fff; font-size: 0.95rem; text-shadow: 0 2px 0 var(--ink), 0 -1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); }
.lvl-label .hard { color: #ffd0e2; }
.boosters { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; gap: 12px; z-index: 3; }
.bst { appearance: none; position: relative; width: 62px; height: 62px; border-radius: 18px; border: 3px solid var(--ink); background: var(--sand); box-shadow: 0 5px 0 var(--ink); font-size: 1.8rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.bst:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.bst.on { background: var(--amber); animation: nodepulse 0.8s ease-in-out infinite; }
.bst .cnt { position: absolute; bottom: -8px; right: -8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--lime); border: 2.5px solid var(--ink); font: 0.95rem/19px var(--font-display); text-align: center; padding: 0 4px; }
.bst .cnt.buy { background: var(--amber); font-size: 1rem; }
.bst.locked { filter: grayscale(1) opacity(0.6); }
.pause-btn { flex: none; }
.game-rexi { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transition: opacity 0.3s, transform 0.3s; }
.game-rexi.hide { opacity: 0; transform: translateY(20px); pointer-events: none; }
.booster-tip { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 14px; font-weight: 800; font-size: 0.9rem; white-space: nowrap; }
.shout { position: absolute; z-index: 7; left: 0; right: 0; top: 38%; text-align: center; font-family: var(--font-display); font-size: clamp(2rem, 11vw, 3.2rem); color: var(--amber); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); pointer-events: none; animation: shout 1.1s ease-out forwards; }
.shout.big { color: var(--lava); font-size: clamp(2.4rem, 13vw, 3.8rem); }
.shout.win { color: var(--lime); }
@keyframes shout { 0% { opacity: 0; transform: scale(0.3) rotate(-8deg); } 18% { opacity: 1; transform: scale(1.15) rotate(3deg); } 30% { transform: scale(1) rotate(-2deg); } 80% { opacity: 1; transform: scale(1) translateY(0); } 100% { opacity: 0; transform: scale(0.9) translateY(-30px); } }
.goal-intro { position: absolute; z-index: 7; left: 50%; top: 40%; transform: translate(-50%, -50%); background: var(--sand); border: 4px solid var(--ink); border-radius: 22px; padding: 14px 18px; box-shadow: 0 6px 0 var(--ink); text-align: center; animation: pop 0.35s ease-out; pointer-events: none; }
.goal-intro h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; }
.goal-intro .goals-line { display: flex; gap: 10px; justify-content: center; }

/* ---------- modales ---------- */
.modal-layer { position: absolute; inset: 0; z-index: 20; background: rgba(10,25,15,0.62); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade 0.2s; }
.modal-layer[hidden] { display: none; }
.modal { width: 100%; max-width: 380px; max-height: calc(100% - 24px); overflow-y: auto; background: var(--sand); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); padding: 18px 16px 18px; text-align: center; animation: pop 0.3s cubic-bezier(.2,1.4,.5,1); position: relative; }
.modal h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1.05; text-wrap: balance; }
.modal h2.hard { color: var(--berry-dk); }
.modal .sub { font-weight: 800; color: var(--jungle-500); margin: 4px 0 10px; }
.modal .ribbon { margin: -4px auto 10px; width: max-content; max-width: 100%; background: var(--lava); color: #fff; font-family: var(--font-display); font-size: 1.35rem; padding: 6px 22px; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); text-shadow: 0 2px 0 rgba(58,38,24,0.6); }
.modal .ribbon.green { background: var(--lime-dk); }
.modal .ribbon.berry { background: var(--berry); }
.modal .actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.modal .actions.row { flex-direction: row; }
.modal .actions.row > * { flex: 1; }
.modal .close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.1rem; }
.goal-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0; }
.goal-card { background: #fff8e8; border: 3px solid var(--ink); border-radius: 16px; padding: 6px 8px 4px; width: 74px; display: flex; flex-direction: column; align-items: center; }
.goal-card canvas { width: 44px; height: 44px; }
.goal-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.goal-card small { font-size: 0.68rem; font-weight: 800; line-height: 1.1; min-height: 1.6em; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; text-align: center; }
.info-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.info-row span { background: rgba(58,38,24,0.08); border-radius: 999px; padding: 4px 12px; }
.pre-boosters { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.pre-b { appearance: none; position: relative; width: 66px; height: 66px; border-radius: 18px; border: 3px solid var(--ink); background: #fff8e8; box-shadow: 0 4px 0 var(--ink); font-size: 1.9rem; cursor: pointer; padding: 0; display: grid; place-items: center; }
.pre-b canvas { width: 44px; height: 44px; }
.pre-b.on { background: var(--lime); box-shadow: 0 4px 0 var(--ink), 0 0 0 4px var(--amber); }
.pre-b .cnt { position: absolute; bottom: -8px; right: -8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--lime); border: 2.5px solid var(--ink); font: 0.9rem/19px var(--font-display); padding: 0 4px; }
.pre-b .cnt.buy { background: var(--amber); }
.pre-b .chk { position: absolute; top: -10px; left: -10px; width: 26px; height: 26px; border-radius: 50%; background: var(--lava); color: #fff; border: 2.5px solid var(--ink); font: 0.85rem/21px var(--font-display); }
.tut { display: flex; gap: 8px; align-items: flex-start; text-align: left; background: #fff8e8; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 10px; margin: 10px 0 2px; }
.tut .face { font-size: 2rem; line-height: 1; }
.tut p { margin: 0; font-weight: 700; font-size: 0.92rem; }
.tut p b { font-family: var(--font-display); font-weight: 400; color: var(--lava-dk); }
.stars-row { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin: 4px 0 10px; height: 74px; }
.stars-row .bigstar { font-size: 3.2rem; line-height: 1; filter: grayscale(1) opacity(0.35); transform: scale(0.8); transition: none; }
.stars-row .bigstar:nth-child(2) { font-size: 4rem; }
.stars-row .bigstar.on { filter: drop-shadow(0 4px 0 var(--ink)); animation: starpop 0.45s cubic-bezier(.2,1.6,.5,1) forwards; }
@keyframes starpop { 0% { transform: scale(0.2) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
.reward-line { display: flex; justify-content: center; gap: 10px; margin: 6px 0; }
.joke { font-weight: 800; font-style: italic; color: var(--jungle-500); margin: 8px 4px 0; font-size: 0.95rem; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- pantallas de lista (parque, logros, minijuegos) ---------- */
.page { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(74px + env(safe-area-inset-top, 0px)) 16px calc(100px + env(safe-area-inset-bottom, 0px)); }
.page h1 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; color: #fff; font-size: 2rem; text-shadow: 0 3px 0 var(--ink); text-wrap: balance; }
.page .lead { color: var(--bone); font-weight: 700; margin: 0 0 14px; opacity: 0.9; }
#park { background: linear-gradient(180deg, #2f7a52, #12301f); }
#ach { background: linear-gradient(180deg, #4a3370, #12301f); }
#minis { background: linear-gradient(180deg, #2a8a8e, #12301f); }
.card { background: var(--sand); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); padding: 12px; margin-bottom: 16px; }
.zone-scene { position: relative; height: 150px; border-radius: 14px; border: 3px solid var(--ink); overflow: hidden; margin-bottom: 10px; }
.zone-scene .gr { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; }
.zone-scene .it { position: absolute; font-size: 2.6rem; line-height: 1; transform: translate(-50%, -100%); filter: drop-shadow(0 4px 0 rgba(0,0,0,0.25)); }
.zone-scene .it.ghost { filter: grayscale(1) opacity(0.25); }
.zone-scene .it.new { animation: build 0.6s cubic-bezier(.2,1.6,.5,1); }
@keyframes build { 0% { transform: translate(-50%, -100%) scale(0) translateY(-40px); } 100% { transform: translate(-50%, -100%) scale(1); } }
.zone-scene .lock { position: absolute; inset: 0; background: rgba(18,48,31,0.75); color: #fff; display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-size: 1.1rem; padding: 10px; }
.zone-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.zone-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.zone-head span { font-weight: 800; font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zone-desc { margin: 2px 0 8px; font-size: 0.88rem; font-weight: 600; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 2px dashed rgba(58,38,24,0.25); }
.item-row .e { font-size: 1.9rem; width: 40px; text-align: center; flex: none; }
.item-row .t { flex: 1; min-width: 0; }
.item-row .t b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.02rem; line-height: 1.1; }
.item-row .t small { display: block; font-size: 0.78rem; font-weight: 600; opacity: 0.85; line-height: 1.25; }
.item-row .done { font-family: var(--font-display); color: var(--lime-dk); white-space: nowrap; }
.ach-row { display: flex; align-items: center; gap: 10px; }
.ach-row .medal { font-size: 2rem; flex: none; }
.ach-row .medal.off { filter: grayscale(1) opacity(0.4); }
.ach-row .t { flex: 1; min-width: 0; }
.ach-row .t b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; display: block; line-height: 1.15; }
.ach-row .t small { font-weight: 700; font-size: 0.8rem; display: block; }
.bar { height: 14px; border-radius: 7px; background: rgba(58,38,24,0.15); border: 2px solid var(--ink); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--lime); border-right: 2px solid var(--ink); }
.ach-row.claimed { opacity: 0.6; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-card { appearance: none; text-align: center; cursor: pointer; background: var(--sand); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mini-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.mini-card .e { font-size: 2.6rem; line-height: 1.1; }
.mini-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; line-height: 1.1; }
.mini-card small { font-weight: 700; font-size: 0.78rem; opacity: 0.85; }
.mini-card .lvl { font-family: var(--font-display); background: var(--jungle-700); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; }
.challenge-card { display: flex; align-items: center; gap: 12px; text-align: left; }
.challenge-card .e { font-size: 2.6rem; }
.challenge-card .t { flex: 1; min-width: 0; }
.challenge-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; display: block; }
.challenge-card small { font-weight: 700; font-size: 0.82rem; }

/* ---------- minijuego ---------- */
#mini { background: linear-gradient(180deg, #4fc3c7 0%, #2f7a52 100%); }
.mini-top { padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 8px; display: flex; align-items: center; gap: 10px; }
.mini-top h2 { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-weight: 400; color: #fff; font-size: 1.35rem; text-shadow: 0 2px 0 var(--ink); line-height: 1.05; }
.mini-top h2 small { display: block; font-size: 0.8rem; opacity: 0.9; }
.mini-how { margin: 0 12px 8px; }
.mini-host { flex: 1; min-height: 0; position: relative; margin: 0 8px calc(10px + env(safe-area-inset-bottom, 0px)); }

/* ---------- ajustes ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 2px dashed rgba(58,38,24,0.2); font-weight: 800; text-align: left; }
.set-row:first-of-type { border-top: 0; }
.set-row input[type=range] { width: 50%; accent-color: var(--lava); }
.toggle { appearance: none; width: 60px; height: 34px; border-radius: 17px; border: 3px solid var(--ink); background: var(--grey); position: relative; cursor: pointer; flex: none; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: left 0.15s; }
.toggle.on { background: var(--lime); }
.toggle.on::after { left: 29px; }
.credits { font-size: 0.8rem; font-weight: 600; opacity: 0.75; margin-top: 10px; }

/* ---------- premio diario ---------- */
.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.day { background: #fff8e8; border: 3px solid var(--ink); border-radius: 14px; padding: 6px 2px; font-family: var(--font-display); font-size: 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day .e { font-size: 1.4rem; }
.day.past { background: var(--lime); opacity: 0.75; }
.day.today { background: var(--amber); transform: scale(1.06); box-shadow: 0 0 0 3px var(--lava); }
.day.big { grid-column: span 2; }

/* ---------- avisos ---------- */
.toast-wrap { position: absolute; z-index: 30; left: 12px; right: 12px; top: calc(70px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,0.3); animation: toast 2.6s ease forwards; text-align: center; max-width: 100%; }
.toast b { font-family: var(--font-display); font-weight: 400; color: var(--amber); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-20px); } 10%, 85% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 25; }

/* ---------- mundos 11-20 (niveles 101-200) ---------- */
/* 5 potenciadores en la barra: caben a 360 px */
.bst { width: min(62px, calc((100vw - 24px - 32px) / 5)); height: min(62px, calc((100vw - 24px - 32px) / 5)); }
@media (max-width: 400px) { .boosters { gap: 8px; padding-left: 8px; padding-right: 8px; } }
.node.boss { background: var(--amber); width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.node.boss.locked { background: #c9b48a; }
.node .boss-face { position: absolute; top: -16px; left: -14px; font-size: 1.35rem; filter: drop-shadow(0 2px 0 var(--ink)); }
.node .tag.kind { right: auto; left: -12px; top: auto; bottom: -6px; font-size: 1.05rem; }
.node.boss .tag.kind { bottom: -10px; }
.world-banner.crowned { background: var(--amber); z-index: 4; }   /* encima del nodo del jefe: si no, tapa «Recoger» */
.world-banner .crown-btn { margin-top: 4px; }
.streak-badge { font-size: 0.95rem; background: var(--ink); color: var(--amber); border-radius: 999px; padding: 1px 8px; text-shadow: none; }
.notice { background: #fff8e8; border: 2.5px dashed var(--ink); border-radius: 14px; padding: 6px 10px; margin: 8px 0 2px; font-weight: 800; font-size: 0.88rem; }
.boss-card { display: flex; gap: 10px; align-items: center; text-align: left; background: #fff8e8; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 10px; margin: 8px 0; }
.boss-card .e { font-size: 2.2rem; line-height: 1; }
.boss-card b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.boss-card small { display: block; font-weight: 700; font-size: 0.8rem; opacity: 0.85; }
.boss-card small.n { opacity: 0.6; }
.album-title { font-family: var(--font-display); font-weight: 400; color: #fff; text-shadow: 0 2px 0 var(--ink); margin: 22px 0 4px; }
.album { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 440px) { .album { grid-template-columns: 1fr 1fr; } }
.album-card { margin: 0; }
.album-card.off { filter: grayscale(1); opacity: 0.7; }
.goal-emoji { display: grid; place-items: center; line-height: 1; }
.mini-card.locked { filter: grayscale(0.8); opacity: 0.75; }
.mech-hud { align-self: center; background: rgba(58,38,24,0.75); color: #fff; border-radius: 999px; padding: 2px 12px; font-family: var(--font-display); font-size: 0.85rem; white-space: pre; }

@media (prefers-reduced-motion: reduce) {
  .title-dino, .avatar, .node.cur, .tap-hint, .moves-box.low, .bst.on { animation: none; }
}
