/* Snake Odyssey: estilos de la interfaz (sobre el lienzo 3D). */
:root {
  --bg: #10233b; --bg2: #0a1828; --panel: #183453; --panel2: #21446a; --line: rgba(170,215,255,.18); --text: #f4fbff; --muted: #9fbad6;
  --accent: #ffd23f; --accent2: #ff9a3c; --accent-text: #2a1a05; --mint: #47d96b; --mint2: #22a84a; --danger: #ff5a5a; --gem: #4ff0ff;
  --font: 'Fredoka', 'Baloo 2', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --sky1: #8fd4ff; --sky2: #e6f7ff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overflow: hidden; }
#app { position: fixed; inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--sky1), var(--sky2)); transition: background .6s; touch-action: none; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }
a { color: var(--accent); }

/* ---------- botones ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: .45em 1.3em; border-radius: 18px; font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; color: var(--accent-text); text-decoration: none;
  background: linear-gradient(180deg, #fff1a6, var(--accent) 55%, #f2a922); box-shadow: 0 5px 0 #b77812, 0 10px 22px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.6); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b77812, inset 0 2px 0 rgba(255,255,255,.6); }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.btn small { font-size: .62em; font-weight: 600; opacity: .8; letter-spacing: 0; margin-top: .15em; }
.btn.mint { color: #06301a; background: linear-gradient(180deg, #b9ffc9, var(--mint) 55%, var(--mint2)); box-shadow: 0 5px 0 #157233, 0 10px 22px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.6); }
.btn.mint:active { box-shadow: 0 1px 0 #157233, inset 0 2px 0 rgba(255,255,255,.6); }
.btn.ghost { color: var(--text); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:active { transform: translateY(2px); }
.btn.big { min-height: 64px; font-size: 1.45rem; padding: .4em 1.6em; border-radius: 22px; }
.btn.small { min-height: 40px; font-size: .92rem; padding: .3em .9em; border-radius: 13px; }
.btn[disabled] { filter: grayscale(.7) brightness(.85); pointer-events: none; }
.icon-btn { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: var(--text); background: rgba(16,35,59,.72); box-shadow: inset 0 0 0 2px var(--line), 0 4px 12px rgba(0,0,0,.2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn:active { transform: scale(.94); }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.25); font-weight: 700; }
.pill svg { width: 20px; height: 20px; fill: var(--gem); }

/* ---------- pantallas ---------- */
#screens { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; animation: in .25s ease-out both; padding: calc(14px + var(--safe-t)) calc(14px + var(--safe-r)) calc(14px + var(--safe-b)) calc(14px + var(--safe-l)); }
.screen.out { animation: out .2s ease-in both; pointer-events: none; }
@keyframes in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes out { to { opacity: 0; transform: scale(.98); } }
.overlay { justify-content: center; background: rgba(6,18,32,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.card { width: min(420px, 100%); max-height: 100%; overflow: auto; padding: 22px 20px; border-radius: 26px; background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: inset 0 0 0 2px var(--line), 0 20px 50px rgba(0,0,0,.4); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 1.9rem; line-height: 1.1; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.card .sub { margin: 0; color: var(--muted); font-size: 1rem; }
.card.scroll { max-height: min(86vh, 720px); }

/* portada */
.title-screen { justify-content: space-between; }
.logo { text-align: center; margin-top: 2vh; filter: drop-shadow(0 6px 0 rgba(0,0,0,.15)); }
.logo .h1 { display: flex; flex-direction: column; align-items: center; line-height: .82; font-weight: 700; }
.logo .l1 { font-size: clamp(3.4rem, 15vw, 6.4rem); color: #6fe36a; -webkit-text-stroke: 3px #155a2a; paint-order: stroke fill; text-shadow: 0 6px 0 #155a2a, 0 10px 20px rgba(0,0,0,.25); letter-spacing: -.01em; transform: rotate(-3deg); }
.logo .l2 { font-size: clamp(2.1rem, 9.5vw, 4rem); color: #ffd23f; -webkit-text-stroke: 3px #8a4a0a; paint-order: stroke fill; text-shadow: 0 5px 0 #8a4a0a; transform: rotate(2deg); margin-top: .1em; }
.logo p { margin: .7em auto 0; display: inline-block; padding: .3em .9em; border-radius: 99px; background: rgba(16,35,59,.7); font-weight: 600; font-size: 1.05rem; }
.title-bottom { display: flex; flex-direction: column; gap: 14px; align-items: stretch; width: min(360px, 100%); margin-bottom: 1vh; }
.title-bottom .btn.big { justify-content: flex-start; }
.portal-link { position: absolute; left: calc(12px + var(--safe-l)); top: calc(12px + var(--safe-t)); display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(16,35,59,.7); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.portal-link svg { width: 28px; height: 28px; }

/* mapa */
.map-screen { padding: 0; background: linear-gradient(180deg, rgba(16,35,59,.4), rgba(16,35,59,.85)); }
.map-screen .bar { width: 100%; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l)); }
.map-screen .bar h2 { flex: 1; margin: 0; font-size: 1.6rem; }
.worlds { width: 100%; flex: 1; overflow-y: auto; padding: 4px 14px calc(30px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; align-items: center; touch-action: pan-y; }
.world { width: min(560px, 100%); border-radius: 26px; padding: 14px 14px 18px; position: relative; box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 12px 30px rgba(0,0,0,.25); }
.w-meadow { background: linear-gradient(160deg, #7ad15a, #3f9a4c); }
.w-temple { background: linear-gradient(160deg, #f2c26b, #c9813a); }
.w-glacier { background: linear-gradient(160deg, #9fe0ff, #4f9cd0); }
.w-volcano { background: linear-gradient(160deg, #ff7a4a, #7a2a2a); }
.world.locked { filter: grayscale(.75) brightness(.75); }
.world-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.world-head .wn { font-size: .85rem; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.world-head b { font-size: 1.4rem; }
.world-head em { font-style: normal; font-size: .85rem; display: flex; align-items: center; gap: 4px; opacity: .9; }
.world-head em svg { width: 16px; height: 16px; }
.path { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; }
.node .num { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; color: #2a1a05; background: radial-gradient(circle at 35% 30%, #fff8c8, #ffd23f 55%, #e59a17); box-shadow: 0 4px 0 #9a6410, 0 8px 14px rgba(0,0,0,.25); }
.node.boss .num { width: 62px; height: 62px; background: radial-gradient(circle at 35% 30%, #ffd0d0, #ff6a5a 55%, #b8302a); color: #fff; box-shadow: 0 4px 0 #7a1a12, 0 8px 14px rgba(0,0,0,.3); }
.node .num svg { width: 30px; height: 30px; }
.node.done .num { background: radial-gradient(circle at 35% 30%, #d9ffe0, #5be07a 55%, #22a84a); box-shadow: 0 4px 0 #157233, 0 8px 14px rgba(0,0,0,.25); }
.node.cur .num { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.1); } }
.node.off .num { background: #5a6b7d; box-shadow: 0 4px 0 #3a4652; color: #c8d4e0; }
.node .gems { display: flex; gap: 1px; }
.node .gems i svg { width: 14px; height: 14px; fill: rgba(0,0,0,.28); }
.node .gems i.on svg { fill: var(--gem); filter: drop-shadow(0 0 3px rgba(79,240,255,.8)); }
.node .nm { font-size: .7rem; font-weight: 600; line-height: 1.05; text-align: center; text-shadow: 0 1px 0 rgba(0,0,0,.35); max-width: 100%; }
.node:active .num { transform: scale(.93); }

/* marcador */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.hud-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) 0 calc(10px + var(--safe-l)); }
.hud-top > * { pointer-events: auto; }
.hud-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none !important; }
.goal, .bossbar, .score { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(16,35,59,.72); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; font-size: 1.25rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.goal svg { width: 26px; height: 26px; }
.goal.done { background: rgba(34,168,74,.85); }
.bossbar { font-size: 1rem; }
.bossbar .hp { display: flex; gap: 2px; }
.bossbar .hp svg, .lives svg { width: 20px; height: 20px; fill: rgba(255,255,255,.2); }
.bossbar .hp i.on svg { fill: #ff5a6a; }
.score { font-size: 1.7rem; padding: 4px 18px; }
.score .sc.bump { animation: bump .25s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.combo { color: var(--accent); font-size: 1.2rem; display: none; }
.combo.on { display: inline; animation: bump .3s; }
.hud-mid .sub { display: flex; gap: 10px; font-size: .9rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: rgba(16,35,59,.6); }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gems-h, .lives { display: flex; gap: 2px; padding: 5px 8px; border-radius: 99px; background: rgba(16,35,59,.72); box-shadow: inset 0 0 0 2px var(--line); }
.gems-h svg { width: 20px; height: 20px; fill: rgba(255,255,255,.2); }
.gems-h i.on svg { fill: var(--gem); filter: drop-shadow(0 0 3px rgba(79,240,255,.9)); }
.lives i.on svg { fill: #ff5a6a; }
.powers { position: absolute; left: 50%; transform: translateX(-50%); top: calc(64px + var(--safe-t)); display: flex; gap: 6px; }
.hud[data-mode="endless"] .powers, #hud[data-mode="endless"] .powers { top: calc(92px + var(--safe-t)); }
.pw { display: flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 99px; background: rgba(16,35,59,.75); font-weight: 700; font-size: .95rem; animation: bump .3s; }
.shed-btn { position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); width: 84px; height: 84px; border-radius: 50%; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: #06301a; font-weight: 700; font-size: .85rem;
  background: radial-gradient(circle at 35% 30%, #d9ffe0, var(--mint) 55%, var(--mint2)); box-shadow: 0 5px 0 #157233, 0 10px 20px rgba(0,0,0,.3); touch-action: none; }
.shed-btn svg { width: 36px; height: 36px; }
.shed-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #157233; }
.shed-btn.off, .shed-btn.cool { filter: grayscale(.85) brightness(.8); opacity: .65; }
.dpad { position: absolute; left: calc(16px + var(--safe-l)); bottom: calc(14px + var(--safe-b)); width: 168px; height: 168px; pointer-events: auto; }
.dp { position: absolute; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: rgba(16,35,59,.7); box-shadow: inset 0 0 0 2px var(--line); touch-action: none; }
.dp svg { width: 30px; height: 30px; }
.dp.d3 { left: 55px; top: 0; } .dp.d1 { left: 55px; bottom: 0; } .dp.d1 svg { transform: rotate(180deg); }
.dp.d2 { left: 0; top: 55px; } .dp.d2 svg { transform: rotate(-90deg); } .dp.d0 { right: 0; top: 55px; } .dp.d0 svg { transform: rotate(90deg); }
.dp:active { background: rgba(71,217,107,.6); }

/* avisos */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 1.15rem; color: #fff; -webkit-text-stroke: 2px rgba(0,0,0,.5); paint-order: stroke fill; animation: popup 1.05s ease-out forwards; white-space: nowrap; }
.pop.gold { color: var(--accent); font-size: 1.5rem; }
.pop.gem { color: var(--gem); font-size: 1.35rem; }
.pop.lasso { color: #ffe066; font-size: 1.9rem; }
.pop.bad { color: #ff6a6a; }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 700; color: #fff; -webkit-text-stroke: 3px rgba(0,0,0,.45); paint-order: stroke fill; text-align: center; white-space: nowrap; animation: banner 1.7s ease-out forwards; }
.banner.gold { color: var(--accent); } .banner.mint { color: #8affa0; } .banner.red { color: #ff7a7a; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 22% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
#toasts { position: absolute; left: 0; right: 0; top: calc(110px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 30; }
.toast { padding: 8px 16px; border-radius: 14px; background: rgba(16,35,59,.92); box-shadow: inset 0 0 0 2px var(--line), 0 6px 16px rgba(0,0,0,.3); font-weight: 600; animation: in .25s both; max-width: 90vw; text-align: center; }
.toast.gold { background: linear-gradient(180deg, #fff1a6, var(--accent)); color: var(--accent-text); }
.toast.red { background: #b8302a; }
.toast.out { animation: out .3s both; }
.intro { position: absolute; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); width: min(460px, calc(100% - 28px)); z-index: 7; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; animation: in .35s both; }
.intro .lv { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 99px; background: rgba(16,35,59,.85); box-shadow: inset 0 0 0 2px var(--line); }
.intro .lv span { padding: 3px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.intro .lv b { font-size: 1.2rem; }
.intro p { margin: 0; padding: 12px 16px; border-radius: 18px; background: rgba(255,255,255,.95); color: #183453; font-weight: 600; font-size: 1.02rem; line-height: 1.3; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.intro .go { padding: 6px 14px; border-radius: 99px; background: rgba(16,35,59,.8); font-weight: 600; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .55; } }
.intro.out { animation: out .3s both; }

/* tarjetas de resultado */
.lvname { margin: 0; font-weight: 600; color: var(--muted); }
.big-gems { display: flex; justify-content: center; gap: 10px; }
.big-gems svg { width: 64px; height: 64px; fill: rgba(255,255,255,.15); }
.big-gems i.on svg { fill: var(--gem); animation: gemin .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--d); filter: drop-shadow(0 0 10px rgba(79,240,255,.8)); }
@keyframes gemin { from { transform: scale(0) rotate(-40deg); } }
.stat { margin: 0; font-size: 1.1rem; }
.over-score { display: flex; flex-direction: column; gap: 4px; }
.over-score b { font-size: 3.2rem; line-height: 1; color: var(--accent); text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.over-score span { color: var(--muted); font-weight: 600; }
.record .card h2 { color: var(--accent); }
.ad-slot:empty { display: none; }

/* ajustes, cómo se juega, ranking */
.settings { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.06); font-weight: 600; }
.setting select, .setting input { font-family: inherit; font-size: 1rem; font-weight: 600; padding: 7px 10px; border-radius: 10px; border: 0; background: #0d2238; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); max-width: 55%; }
.tog { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(0,0,0,.3); font-weight: 700; min-width: 74px; }
.tog i { width: 26px; height: 26px; border-radius: 50%; background: #5a6b7d; transition: .2s; }
.tog.on i { background: var(--mint); transform: translateX(2px); }
.links { margin-top: 6px; }
.howto-body { text-align: left; }
.howto-body .t1 { font-size: 1.35rem; font-weight: 700; margin: 0 0 .4em; color: var(--accent); }
.howto-body h2 { font-size: 1.15rem; margin: 1em 0 .3em; }
.howto-body ul { padding-left: 1.2em; margin: .3em 0; }
.howto-body li { margin: .25em 0; line-height: 1.35; }
.howto-body p { line-height: 1.4; }
.rank-list ol { list-style: none; margin: 0; padding: 0; text-align: left; counter-reset: r; }
.rank-list li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; counter-increment: r; }
.rank-list li::before { content: counter(r); width: 2em; color: var(--muted); font-weight: 700; }
.rank-list li span { flex: 1; } .rank-list li.me { background: rgba(255,210,63,.18); }
.rank-list li:nth-child(odd) { background: rgba(255,255,255,.04); }

/* anuncio de prueba */
.dev-ad { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.75); }
.dev-ad-box { width: min(340px, 90%); padding: 20px; border-radius: 20px; background: #111; color: #fff; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.dev-ad-tag { font-size: .8rem; color: #aaa; }
.dev-ad-art { width: 100%; aspect-ratio: 16/9; border-radius: 12px; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #333 0 12px, #2a2a2a 12px 24px); font-size: 2rem; font-weight: 700; }

/* carga */
#loader { position: absolute; inset: 0; display: grid; place-items: center; z-index: 60; background: var(--bg); transition: opacity .4s; }
#loader.out { opacity: 0; pointer-events: none; }
.loader-snake { width: 64px; height: 64px; border-radius: 50%; border: 8px solid rgba(71,217,107,.25); border-top-color: var(--mint); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }

/* pantallas bajas (móvil en horizontal) */
@media (max-height: 520px) {
  .logo .l1 { font-size: 3rem; } .logo .l2 { font-size: 1.9rem; } .logo p { display: none; }
  .title-screen { flex-direction: row; align-items: center; justify-content: space-around; }
  .btn.big { min-height: 52px; font-size: 1.2rem; }
  .shed-btn { width: 70px; height: 70px; }
  .card { padding: 14px; gap: 10px; } .card h2 { font-size: 1.5rem; } .big-gems svg { width: 46px; height: 46px; }
  .intro { bottom: calc(14px + var(--safe-b)); }
  #toasts { top: calc(70px + var(--safe-t)); }
}
@media (max-height: 520px) {
  .settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .setting { padding: 4px 8px; } .settings .links { grid-column: 1 / -1; }
  .card .b-close { position: sticky; bottom: 0; }
  .settings-p .card { width: min(720px, 100%); }
}
@media (max-aspect-ratio: 3/4) { .intro { left: 12px; transform: none; width: calc(100% - 118px); align-items: flex-start; text-align: left; } }
.over .row .btn, .done .row .btn { flex: 1 1 0; min-width: 0; padding-left: .6em; padding-right: .6em; font-size: 1rem; }
.over .row, .done .row { flex-wrap: nowrap; }
@media (prefers-reduced-motion: reduce) { .node.cur .num, .intro .go { animation: none; } }

/* ficha de la página (texto rastreable bajo el juego) — la añade tools/fichas.py del portal */
.howto-src { display: none; }

/* fichas.py: ficha del juego bajo la pantalla de juego (visible al desplazarse; al jugar la página vuelve arriba y no se mueve) */
html, body { height: auto !important; min-height: 100%; overflow-x: hidden !important; overflow-y: auto !important; }
html:has(body.playing), body.playing { overflow: hidden !important; }
body:not(.playing) { touch-action: pan-y; }
#wrap, #app { position: relative !important; inset: auto !important; width: 100% !important; height: 100vh !important; height: 100dvh !important; }
.game-info { max-width: 860px; margin: 0 auto; padding: 26px 18px 40px; font-family: Fredoka, ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #f4f0ff; line-height: 1.55; user-select: text; -webkit-user-select: text; }
.game-info .crumbs { font-size: .92rem; color: #b9b0d8; margin-bottom: 10px; } .game-info .crumbs a { color: #b9b0d8; } .game-info .crumbs span { margin: 0 6px; opacity: .6; }
.game-info .howto-src { display: block; } .game-info .howto { background: none; color: inherit; padding: 0; border-radius: 0; box-shadow: none; border: 0; }
.game-info h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.15; margin: 0 0 10px; color: #fff; }
.game-info h2 { font-size: 1.3rem; margin: 26px 0 8px; color: #ffd23f; }
.game-info p, .game-info li { color: #e8e2fa; } .game-info ul { padding-left: 1.2em; } .game-info a { color: #ffd23f; }
.game-info details { margin: 8px 0; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(190,160,255,.22); }
.game-info summary { cursor: pointer; font-weight: 600; } .game-info details p { margin: 6px 0 0; }
.game-info .more { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.game-info .more a { display: block; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(190,160,255,.22); text-decoration: none; color: #fff; }
.game-info .more img { display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; } .game-info .more b { display: block; padding: 8px 10px 0; } .game-info .more span { display: block; padding: 0 10px 10px; font-size: .88rem; color: #c9c0e6; }
.game-info .foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 34px; padding-top: 16px; border-top: 1px solid rgba(190,160,255,.22); font-size: .92rem; } .game-info .foot a { color: #b9b0d8; }
.howto .t1 { font-size: 1.25rem; font-weight: 700; margin: .67em 0; }
