/* ==========================================================================
   BÚNKER OMEGA - tema postapocalíptico: hormigón, óxido, ámbar de emergencia y verde de terminal.
   Capas animadas de fondo: ceniza/brasas (canvas), niebla, baliza roja, parpadeo de lámpara, líneas de monitor.
   ========================================================================== */
:root {
	--bg: #07080a; --steel: #14171b; --steel2: #1c2025; --line: #2c3036; --rust: #b5541c; --rust2: #7a3512;
	--amber: #e8a33d; --amber-glow: rgba(232, 163, 61, .5); --toxic: #8fd14f; --blood: #c0392b; --bone: #d9d2c0; --muted: #8b8577;
	--f-head: 'Stardos Stencil', 'Impact', sans-serif; --f-type: 'Special Elite', 'Courier New', monospace; --f-mono: 'Share Tech Mono', 'Courier New', monospace; --f-body: 'Rajdhani', 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }   /* sin esto, width:100% + padding desborda la pantalla (cortaba el botón burger y el borde derecho en móvil) */
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--bone); font-family: var(--f-body); font-weight: 500; font-size: 1.08rem; overflow-x: hidden; }
a { color: var(--amber); } a:hover { color: #ffd089; }
::selection { background: var(--rust); color: #fff; }
.stencil { font-family: var(--f-head); letter-spacing: 2px; text-transform: uppercase; }
.mono { font-family: var(--f-mono); }
.type { font-family: var(--f-type); }
.muted { color: var(--muted); }

/* ---------------- Capas de fondo ---------------- */
#ash { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -5; pointer-events: none; }
.bg-base { position: fixed; inset: 0; z-index: -7; background:
	radial-gradient(120% 80% at 50% 0%, #1a1712 0%, transparent 60%),
	radial-gradient(90% 60% at 80% 100%, #11160f 0%, transparent 65%), var(--bg); }
.bg-fog { position: fixed; inset: -20%; z-index: -6; pointer-events: none; opacity: .5;
	background: radial-gradient(40% 30% at 20% 40%, rgba(120, 130, 110, .16), transparent 70%), radial-gradient(35% 28% at 75% 65%, rgba(150, 120, 80, .12), transparent 70%), radial-gradient(30% 25% at 50% 90%, rgba(100, 110, 100, .14), transparent 70%);
	animation: fog 38s ease-in-out infinite alternate; }
.bg-fog.f2 { opacity: .4; animation-duration: 55s; animation-direction: alternate-reverse; transform: scaleX(-1); }
@keyframes fog { from { transform: translate3d(-6%, -2%, 0) scale(1); } to { transform: translate3d(7%, 3%, 0) scale(1.15); } }
.bg-lamp { position: fixed; left: 50%; top: -12vh; width: 90vmax; height: 60vmax; transform: translateX(-50%); z-index: -4; pointer-events: none;
	background: radial-gradient(closest-side, rgba(232, 163, 61, .17), transparent 70%); animation: lampflicker 7s steps(1) infinite; }
@keyframes lampflicker { 0%, 100% { opacity: 1; } 8% { opacity: .65; } 9% { opacity: 1; } 31% { opacity: .85; } 32% { opacity: .5; } 33% { opacity: 1; } 61% { opacity: .9; } 63% { opacity: .55; } 64% { opacity: 1; } 87% { opacity: .75; } 88% { opacity: 1; } }
.bg-alarm { position: fixed; left: -18vmax; top: -18vmax; width: 36vmax; height: 36vmax; border-radius: 50%; z-index: -3; pointer-events: none; filter: blur(30px); opacity: .35;
	background: conic-gradient(from 0deg, rgba(220, 50, 40, .85), transparent 22%, transparent 78%, rgba(220, 50, 40, .85)); animation: beacon 4s linear infinite; }
@keyframes beacon { to { transform: rotate(360deg); } }
.bg-vignette { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .78) 100%); }
.bg-scan { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .9) 0 1px, transparent 1px 3px); animation: scandrift 9s linear infinite; }
@keyframes scandrift { to { background-position: 0 60px; } }
.bg-grain { position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .06;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------------- Cabecera ---------------- */
.hdr { background: linear-gradient(180deg, rgba(8, 9, 11, .94), rgba(8, 9, 11, .7)); border-bottom: 1px solid #3a2f22; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.hdr::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #15130d 10px 20px); opacity: .55; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 0 6px var(--amber-glow)); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand b { font-family: var(--f-head); font-size: 1.45rem; letter-spacing: 3px; color: var(--amber); text-shadow: 0 0 12px var(--amber-glow); }
.brand small { display: block; font-family: var(--f-mono); font-size: .62rem; letter-spacing: 2px; color: var(--muted); margin-top: -4px; }
.nav-b { display: flex; gap: .2rem; align-items: center; flex-wrap: wrap; }
.nav-b a { font-family: var(--f-head); text-transform: uppercase; letter-spacing: 2px; font-size: .95rem; color: #b9b19b; text-decoration: none; padding: .45rem .8rem; border: 1px solid transparent; position: relative; }
.nav-b a:hover, .nav-b a.on { color: var(--amber); border-color: #3a2f22; background: rgba(232, 163, 61, .07); text-shadow: 0 0 8px var(--amber-glow); }
.hud-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .8rem; border: 1px solid #5b4a2c; background: linear-gradient(180deg, #1d1912, #100e0a); font-family: var(--f-mono); color: var(--amber); letter-spacing: 1px; box-shadow: inset 0 0 12px rgba(0, 0, 0, .7); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); padding-inline: 1.1rem; }
.hud-pill.lvl { color: var(--toxic); border-color: #3b5a22; }
.hud-pill.bump { animation: bump .6s ease; }
@keyframes bump { 40% { transform: scale(1.12); filter: brightness(1.6) drop-shadow(0 0 10px var(--amber)); } }
.nav-collapse { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-left: auto; }
.burger { flex-shrink: 0; display: none; background: none; border: 1px solid #5b4a2c; color: var(--amber); padding: .3rem .6rem; font-size: 1.2rem; line-height: 1; cursor: pointer; }
@media (max-width: 991px) { .burger { display: block; margin-left: auto; } .nav-collapse { display: none; width: 100%; margin-left: 0; padding-top: .6rem; } .nav-collapse.open { display: flex; } .nav-b { flex-direction: column; align-items: stretch; width: 100%; } }

/* Cabecera: logo a la izquierda, menú en el centro, cuenta y sonido a la derecha */
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .6rem; }
.hud-group { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
@media (min-width: 992px) { .nav-collapse { display: contents; } .hdr-in .nav-b { margin-inline: auto; } .hdr-in .hud-group { justify-content: flex-end; } }
@media (min-width: 1280px) { .hdr-in { display: grid; grid-template-columns: 1fr auto 1fr; } .hdr-in .nav-b { margin-inline: 0; justify-self: center; } .hdr-in .hud-group { justify-self: end; } }
/* Páginas a ancho completo (búnker, habilidades, almacén, ranking, boss): se activan con $rp_wide = true */
body.wide .container-b { max-width: none; padding-inline: clamp(10px, 2vw, 28px); }
.btn-b[hidden] { display: none; }      /* .btn-b usa display:inline-flex, que anula el atributo hidden */
.btn-b.off { opacity: .55; filter: grayscale(.8); }
.btn-b.snd-fx.off::before { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; height: 2px; background: #ff7a6b; transform: rotate(-35deg); box-shadow: 0 0 4px #000; }      /* nota tachada: efectos de sonido apagados */

/* ---------------- Botones y paneles ---------------- */
.btn-b { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--f-head); letter-spacing: 2px; text-transform: uppercase; font-size: .95rem; cursor: pointer; text-decoration: none;
	color: var(--amber); padding: .6rem 1.3rem; border: 1px solid #6b5a3a; background: linear-gradient(180deg, #3a3125, #1f1912); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 0 #000; transition: all .18s; position: relative; overflow: hidden; }
.btn-b:hover { color: #ffd089; border-color: var(--amber); box-shadow: 0 0 18px var(--amber-glow), inset 0 0 14px rgba(232, 163, 61, .12); transform: translateY(-1px); }
.btn-b:active { transform: translateY(1px); }
.btn-b:disabled, .btn-b.disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); transform: none; box-shadow: none; }
.btn-b.primary { color: #130c04; background: linear-gradient(180deg, #f2b957, #e8a33d 55%, #b9771d); border-color: #ffd089; text-shadow: 0 1px 0 rgba(255, 255, 255, .3); box-shadow: 0 3px 0 #6b4310, 0 0 22px rgba(232, 163, 61, .35); }
.btn-b.primary:hover { color: #130c04; box-shadow: 0 3px 0 #6b4310, 0 0 34px rgba(232, 163, 61, .7); }
.btn-b.primary::after { content: ''; position: absolute; top: 0; left: -80%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: sweep 4.5s ease-in-out infinite; }
@keyframes sweep { 0%, 55% { left: -80%; } 85%, 100% { left: 140%; } }
.btn-b.danger { color: #ff9a8f; border-color: #7a2c24; background: linear-gradient(180deg, #3a1a17, #1f0e0c); }
.btn-b.sm { padding: .3rem .8rem; font-size: .8rem; }
.btn-b.block { display: flex; width: 100%; }

.plate { position: relative; background:
	radial-gradient(circle at 9px 9px, #6a6f75 1.6px, transparent 2.4px), radial-gradient(circle at calc(100% - 9px) 9px, #6a6f75 1.6px, transparent 2.4px),
	radial-gradient(circle at 9px calc(100% - 9px), #6a6f75 1.6px, transparent 2.4px), radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #6a6f75 1.6px, transparent 2.4px),
	linear-gradient(180deg, rgba(30, 34, 39, .92), rgba(16, 18, 21, .94)); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06); padding: 1.3rem; }
.plate.amber { border-color: #5b4a2c; box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 26px rgba(232, 163, 61, .1), inset 0 1px 0 rgba(255, 255, 255, .06); }
.plate h2, .plate h3 { font-family: var(--f-head); letter-spacing: 2px; text-transform: uppercase; color: var(--amber); }
.sec-title { font-family: var(--f-head); text-transform: uppercase; letter-spacing: 4px; color: var(--bone); font-size: clamp(1.4rem, 4vw, 2.1rem); text-align: center; margin-bottom: 1.6rem; position: relative; }
.sec-title::after { content: ''; display: block; width: 120px; height: 6px; margin: .6rem auto 0; background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, #15130d 8px 16px); }
.hazard { height: 14px; background: repeating-linear-gradient(-45deg, var(--amber) 0 14px, #15130d 14px 28px); opacity: .8; border-block: 2px solid #15130d; }

/* ---------------- Portada ---------------- */
.hero { position: relative; padding: 3.5rem 0 2.5rem; text-align: center; }
.hero h1 { font-family: var(--f-head); text-transform: uppercase; font-size: clamp(2.8rem, 10vw, 6.4rem); line-height: .95; letter-spacing: 6px; margin: 0; color: var(--bone); text-shadow: 0 0 40px rgba(232, 163, 61, .25), 0 4px 0 #000; }
.hero h1 .o { color: var(--amber); text-shadow: 0 0 18px var(--amber-glow), 0 0 60px rgba(232, 163, 61, .45), 0 4px 0 #000; animation: neonflick 6s infinite; }
@keyframes neonflick { 0%, 100% { opacity: 1; } 91% { opacity: 1; } 92% { opacity: .5; } 93% { opacity: 1; } 95% { opacity: .65; } 96% { opacity: 1; } }
.hero .tag { font-family: var(--f-type); color: var(--muted); letter-spacing: 3px; font-size: .95rem; margin-top: .8rem; }
.hero p.lead { max-width: 640px; margin: 1.2rem auto 0; font-size: 1.2rem; color: #c9c1ac; }
.door { width: min(300px, 62vw); margin: 0 auto 1.4rem; filter: drop-shadow(0 0 30px rgba(232, 163, 61, .25)); }
.door .wheel { transform-origin: 150px 150px; animation: spin 50s linear infinite; }
.door .led-r { animation: blink 1.6s steps(1) infinite; } .door .led-g { animation: blink 2.3s steps(1) infinite reverse; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.steam { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: rgba(210, 210, 200, .22); filter: blur(7px); animation: steam 5s ease-out infinite; }
@keyframes steam { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: .5; } 100% { transform: translateY(-120px) scale(3.2); opacity: 0; } }
.step { text-align: left; height: 100%; }
.step .n { font-family: var(--f-head); font-size: 3rem; color: rgba(232, 163, 61, .25); line-height: 1; }
/* Novedades del almacén: centradas (con auto-fill las columnas vacías dejaban los objetos pegados a la izquierda en pantallas anchas) */
.showcase { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.showcase .it { text-align: center; flex: 0 1 150px; min-width: 130px; }
.frame { position: relative; overflow: hidden; background: linear-gradient(180deg, #1b1e22, #101215); border: 1px solid var(--line); padding: 10px; box-shadow: inset 0 0 20px rgba(0, 0, 0, .8), 0 6px 14px rgba(0, 0, 0, .5); }
.frame svg { display: block; width: 100%; height: 150px; }
.frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .07) 48%, transparent 56%); transform: translateX(-120%); animation: glint 7s ease-in-out infinite; }
@keyframes glint { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.neon-flicker { animation: neonflick 5s infinite; }
.lamp-glow { animation: lampflicker 6s steps(1) infinite; }
.promise { border: 1px solid #3b5a22; background: linear-gradient(180deg, rgba(40, 60, 24, .35), rgba(14, 20, 10, .6)); }
.promise li { margin-bottom: .4rem; list-style: none; padding-left: 1.6rem; position: relative; }
.promise li::before { content: '✔'; position: absolute; left: 0; color: var(--toxic); }

/* ---------------- Búnker (juego) ---------------- */
.hud-bar { height: 16px; background: #0b0c0e; border: 1px solid #3a3d42; position: relative; overflow: hidden; box-shadow: inset 0 0 8px #000; }
.hud-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5d8a2a, var(--toxic)); box-shadow: 0 0 14px rgba(143, 209, 79, .6); transition: width .9s cubic-bezier(.2, .8, .2, 1); position: relative; }
.hud-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, .55) 18px 20px); }
.stat-l { font-family: var(--f-mono); font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.stat-v { font-family: var(--f-mono); font-size: 1.5rem; color: var(--amber); }
.rooms { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.room-tab { font-family: var(--f-head); text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; padding: .4rem .9rem; border: 1px solid #3a3d42; background: #111316; color: #9b9481; cursor: pointer; }
.room-tab.on { color: var(--amber); border-color: var(--amber); background: rgba(232, 163, 61, .08); box-shadow: 0 0 14px rgba(232, 163, 61, .25); }
.room-tab.lock { opacity: .5; cursor: not-allowed; }
.scene-wrap { position: relative; border: 2px solid #2c2f34; box-shadow: 0 0 0 1px #000, 0 18px 40px rgba(0, 0, 0, .7), inset 0 0 40px rgba(0, 0, 0, .9); background: #0c0d0f; }
.scene-wrap svg.scene { display: block; width: 100%; height: auto; }
.scene .slot { cursor: pointer; }
.scene .slot .hit { fill: rgba(255, 255, 255, .0); stroke: rgba(232, 163, 61, .35); stroke-width: 1.5; stroke-dasharray: 6 5; transition: all .2s; }
.scene .slot:hover .hit { fill: rgba(232, 163, 61, .12); stroke: var(--amber); }
.scene .slot .plus { font-family: var(--f-head); font-size: 28px; fill: rgba(232, 163, 61, .5); text-anchor: middle; }
.scene .dust { animation: dustfloat 9s ease-in-out infinite; }
@keyframes dustfloat { 50% { transform: translateY(-14px); opacity: .5; } }
.scene .mon-line { animation: monscroll 3s linear infinite; }
@keyframes monscroll { to { transform: translateY(-24px); } }
.scene .pulse { animation: blink 1.4s steps(1) infinite; }
.task { display: grid; grid-template-columns: 52px 1fr auto; gap: .8rem; align-items: center; padding: .7rem; border: 1px solid #2f3338; background: rgba(10, 11, 13, .6); margin-bottom: .6rem; transition: border-color .2s; }
.task:hover { border-color: #5b4a2c; }
.task .ic { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; background: #0c0d0f; border: 1px solid #2f3338; }
.task h4 { margin: 0; font-family: var(--f-head); letter-spacing: 1.5px; font-size: 1rem; text-transform: uppercase; color: var(--bone); }
.task small { color: var(--muted); display: block; line-height: 1.2; }
.task .rw { font-family: var(--f-mono); font-size: .78rem; color: var(--toxic); }
.slot-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .8rem; }
.slot-picker button { background: #0f1113; border: 1px solid var(--line); padding: 8px; color: var(--bone); cursor: pointer; font-size: .8rem; }
.slot-picker button:hover { border-color: var(--amber); box-shadow: 0 0 14px var(--amber-glow); }
.slot-picker svg { width: 100%; height: 90px; display: block; margin-bottom: 4px; }
.radio { font-family: var(--f-mono); }
.radio .disp { background: #070a06; border: 1px solid #2c3f1c; color: var(--toxic); padding: .5rem .7rem; text-shadow: 0 0 8px rgba(143, 209, 79, .7); min-height: 3.2rem; overflow: hidden; white-space: nowrap; position: relative; }
.radio .disp span { display: inline-block; animation: marquee 12s linear infinite; padding-left: 100%; }
@keyframes marquee { to { transform: translateX(-100%); } }
.radio input[type=range] { accent-color: var(--amber); width: 100%; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; } .eq i { width: 3px; background: var(--toxic); animation: eq 0.9s ease-in-out infinite; } .eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; } .eq.off i { animation: none; height: 3px; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 16px; } }

/* ---------------- Sistemas vitales del búnker ---------------- */
.vit-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.vit-name { font-family: var(--f-head); letter-spacing: 2px; text-transform: uppercase; font-size: 1.35rem; color: var(--amber); text-shadow: 0 0 10px var(--amber-glow); overflow-wrap: anywhere; }
.vit-alert { margin-bottom: .9rem; padding: .6rem .9rem; border: 1px solid; font-family: var(--f-mono); font-size: .9rem; }
.vit-alert.warn { color: var(--amber); border-color: #5b4a2c; background: rgba(232, 163, 61, .08); }
.vit-alert.bad { color: #ff9a8f; border-color: #7a2c24; background: rgba(192, 57, 43, .12); animation: alertpulse 2s ease-in-out infinite; }
@keyframes alertpulse { 50% { box-shadow: 0 0 18px rgba(192, 57, 43, .45); } }
.vit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; }
.vit { display: grid; gap: .4rem; padding: .7rem; border: 1px solid #2f3338; background: rgba(10, 11, 13, .6); align-content: start; }
.vit-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.vit-top b { font-family: var(--f-head); letter-spacing: 1.5px; text-transform: uppercase; font-size: .95rem; color: var(--bone); }
.vit-val { font-family: var(--f-mono); color: var(--toxic); }
.vit-eta { font-family: var(--f-mono); font-size: .75rem; letter-spacing: 1px; color: var(--muted); }
.vit.low .vit-fill { background: linear-gradient(90deg, #8a5a1c, var(--amber)); box-shadow: 0 0 14px var(--amber-glow); }
.vit.low .vit-val { color: var(--amber); }
.vit.broken { border-color: #7a2c24; }
.vit.broken .vit-val, .vit.broken .vit-eta { color: #ff7a6b; }

/* ---------------- Taller y reciclaje ---------------- */
.work-list { display: grid; gap: .5rem; align-content: start; }
.work-row { display: grid; grid-template-columns: 40px 1fr auto; gap: .7rem; align-items: center; padding: .5rem .6rem; border: 1px solid #2f3338; background: rgba(10, 11, 13, .6); }
.work-row .ic { font-size: 1.5rem; width: 40px; height: 40px; display: grid; place-items: center; background: #0c0d0f; border: 1px solid #2f3338; }
.work-row b { font-family: var(--f-head); letter-spacing: 1.2px; text-transform: uppercase; font-size: .92rem; color: var(--bone); }
.work-row small { display: block; color: var(--muted); line-height: 1.2; }
.work-bar { height: 8px; margin-top: .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid #3a3d42; background: #0f1113; padding: .25rem .6rem; font-family: var(--f-mono); font-size: .85rem; color: var(--bone); }
.chip b { color: var(--amber); margin-left: .2rem; }
.chip.zero { opacity: .45; }
@media (max-width: 575px) { .work-row { grid-template-columns: 36px 1fr; } .work-row .ic { width: 36px; height: 36px; } .work-row .go { grid-column: 1 / -1; } .work-row .go .btn-b { width: 100%; } }

/* ---------------- Terminal de tareas ---------------- */
#taskOv { position: fixed; inset: 0; z-index: 1500; display: none; align-items: center; justify-content: center; padding: 12px; background: rgba(2, 3, 2, .88); backdrop-filter: blur(5px); }
#taskOv.on { display: flex; }
.term { width: min(560px, 100%); max-height: 94vh; overflow: auto; background: #070a07; border: 2px solid #2c4a1c; box-shadow: 0 0 0 1px #000, 0 0 50px rgba(143, 209, 79, .18), inset 0 0 40px rgba(0, 0, 0, .9); position: relative; font-family: var(--f-mono); color: var(--toxic); }
.term::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px); z-index: 2; }
.term-h { display: flex; justify-content: space-between; align-items: center; padding: .6rem .9rem; border-bottom: 1px solid #2c4a1c; background: rgba(143, 209, 79, .06); letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; }
.term-h button { background: none; border: 1px solid #2c4a1c; color: var(--toxic); padding: 0 .6rem; cursor: pointer; font-size: 1.1rem; }
.term-b { padding: 1.2rem; min-height: 300px; position: relative; z-index: 3; }
.term .btn-b { color: var(--toxic); border-color: #3b5a22; background: linear-gradient(180deg, #1a2a10, #0e1709); }
.term .btn-b:hover { box-shadow: 0 0 18px rgba(143, 209, 79, .5); color: #c6ff8a; border-color: var(--toxic); }
.term .msg { min-height: 1.6rem; text-align: center; margin: .6rem 0; font-size: .95rem; }
.wire-board { display: grid; grid-template-columns: 1fr 1fr; gap: 0; position: relative; height: 250px; }
.wire-board svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wire-col { display: flex; flex-direction: column; justify-content: space-around; align-items: flex-start; z-index: 1; } .wire-col.r { align-items: flex-end; }
.pin { width: 46px; height: 30px; border: 2px solid #000; box-shadow: 0 0 0 2px #333, 0 0 12px var(--c); background: var(--c); cursor: pointer; transition: transform .15s; }
.pin.sel { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 20px var(--c); } .pin.done { opacity: .85; }
.gen-gauge { position: relative; height: 54px; border: 2px solid #2c4a1c; background: #040704; margin: 1.6rem 0 1rem; box-shadow: inset 0 0 14px #000; }
.gen-zone { position: absolute; top: 0; bottom: 0; background: rgba(143, 209, 79, .28); border-inline: 2px solid var(--toxic); box-shadow: 0 0 18px rgba(143, 209, 79, .45); }
.gen-needle { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; background: #ff5a3c; box-shadow: 0 0 14px #ff5a3c; }
.code-show { font-size: clamp(2.2rem, 11vw, 3.6rem); letter-spacing: .4em; text-align: center; margin: 1.2rem 0; text-shadow: 0 0 18px rgba(143, 209, 79, .8); padding-left: .4em; }
.timer-bar { height: 6px; background: #14210c; } .timer-bar i { display: block; height: 100%; background: var(--toxic); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 300px; margin: .8rem auto 0; }
.keypad button { padding: .8rem; font-family: var(--f-mono); font-size: 1.3rem; background: #0e1709; border: 1px solid #3b5a22; color: var(--toxic); cursor: pointer; } .keypad button:hover { background: #17260e; box-shadow: 0 0 12px rgba(143, 209, 79, .4); }
.pads { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 300px; margin: 1rem auto; }
.pad { aspect-ratio: 1.3; border: 3px solid #000; cursor: pointer; background: var(--c); opacity: .35; transition: opacity .08s, transform .08s, box-shadow .08s; box-shadow: inset 0 0 20px rgba(0, 0, 0, .6); }
.pad.lit { opacity: 1; transform: scale(1.04); box-shadow: 0 0 34px var(--c), inset 0 0 12px rgba(255, 255, 255, .5); }
.res { text-align: center; padding: 1rem 0; } .res .big { font-size: 2.4rem; font-family: var(--f-head); letter-spacing: 3px; text-transform: uppercase; } .res.ok .big { color: var(--toxic); text-shadow: 0 0 20px rgba(143, 209, 79, .8); } .res.no .big { color: #ff7a6b; text-shadow: 0 0 20px rgba(255, 90, 60, .6); }
#lvlOv { position: fixed; inset: 0; z-index: 1600; display: none; place-items: center; background: radial-gradient(circle, rgba(232, 163, 61, .25), rgba(0, 0, 0, .92) 65%); padding: 16px; text-align: center; }
#lvlOv.on { display: grid; animation: fadein .4s; } @keyframes fadein { from { opacity: 0; } }
#lvlOv .big { font-family: var(--f-head); font-size: clamp(3rem, 14vw, 7rem); color: var(--amber); text-shadow: 0 0 40px var(--amber), 0 0 100px rgba(232, 163, 61, .6); letter-spacing: 8px; animation: pop .7s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } }

/* ---------------- Árbol de habilidades ---------------- */
.tree { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; position: relative; }
.branch { position: relative; padding: 1rem .6rem 1.2rem; }
.branch > h3 { text-align: center; font-size: 1.05rem; margin-bottom: 1rem; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 1.8rem; }
.node-wrap:not(:last-child)::after { content: ''; position: absolute; bottom: -1.8rem; left: 50%; width: 3px; height: 1.8rem; margin-left: -1.5px; background: #2c3036; }
.node-wrap.linked:not(:last-child)::after { background: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.node { width: 100%; max-width: 230px; text-align: center; padding: .7rem .6rem; border: 2px solid #2c3036; background: linear-gradient(180deg, #181b1f, #0d0f11); cursor: pointer; color: var(--bone); position: relative; transition: all .2s; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.node .t { font-family: var(--f-head); letter-spacing: 1px; text-transform: uppercase; font-size: .92rem; line-height: 1.1; }
.node .d { font-size: .86rem; color: #a59e8b; line-height: 1.15; margin-top: .3rem; }
.node .c { font-family: var(--f-mono); font-size: .75rem; margin-top: .3rem; color: var(--muted); }
.node.owned { border-color: var(--amber); background: linear-gradient(180deg, #2a2112, #15100a); box-shadow: 0 0 20px var(--amber-glow); cursor: default; }
.node.owned .t { color: var(--amber); }
.node.avail { border-color: var(--toxic); animation: availpulse 1.8s ease-in-out infinite; }
.node.avail:hover { background: #161f0f; }
@keyframes availpulse { 50% { box-shadow: 0 0 22px rgba(143, 209, 79, .55); } }
.node.locked { opacity: .5; cursor: not-allowed; }
.tier-tag { font-family: var(--f-mono); font-size: .7rem; letter-spacing: 2px; color: var(--muted); text-align: center; margin-bottom: .3rem; }
@media (max-width: 767px) { .tree { grid-template-columns: 1fr; } }

/* ---------------- Tienda ---------------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.card-i { display: flex; flex-direction: column; gap: .5rem; align-self: stretch; }
.card-i .frame svg { height: 170px; }
.card-i h4 { font-family: var(--f-head); letter-spacing: 1.5px; font-size: 1rem; text-transform: uppercase; margin: 0; color: var(--bone); }
.card-i p { margin: 0; color: #a59e8b; font-size: .95rem; flex: 1; }
.price { font-family: var(--f-mono); color: var(--amber); font-size: 1.25rem; }
.tag-own { font-family: var(--f-mono); font-size: .75rem; letter-spacing: 2px; color: var(--toxic); border: 1px solid #3b5a22; padding: .15rem .5rem; align-self: flex-start; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.4rem; }
.filters button { font-family: var(--f-head); text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; padding: .35rem .9rem; background: #111316; border: 1px solid #3a3d42; color: #9b9481; cursor: pointer; }
.filters button.on { color: var(--amber); border-color: var(--amber); background: rgba(232, 163, 61, .08); }
/* Packs de diamantes (almacén) */
.gem-shop .gem-h { margin: 0 0 .4rem; color: #6fe3ff; text-shadow: 0 0 14px rgba(111, 227, 255, .45); }
.gem-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gem-pack .frame svg { height: 150px; }
.gem-pack-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.gem-have { color: #6fe3ff; }
.save-tag { position: absolute; top: 10px; right: 10px; z-index: 2; font-family: var(--f-mono); font-size: .85rem; letter-spacing: 1px; color: #130c04; background: var(--amber); padding: .15rem .6rem; box-shadow: 0 0 14px var(--amber-glow); transform: rotate(3deg); }

/* ---------------- Modales, toasts, formularios ---------------- */
.mdl-bg { position: fixed; inset: 0; z-index: 1400; display: none; align-items: center; justify-content: center; padding: 12px; background: rgba(2, 2, 2, .85); backdrop-filter: blur(4px); overflow-y: auto; }
.mdl-bg.on { display: flex; }
.mdl { width: min(480px, 100%); max-height: 94vh; overflow-y: auto; animation: mdlin .25s ease; }
@keyframes mdlin { from { transform: translateY(14px); opacity: 0; } }
.mdl .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; z-index: 5; } .mdl .x:hover { color: var(--amber); }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: -.3rem -.3rem 1rem; }
.tabs button { flex: 1; font-family: var(--f-head); text-transform: uppercase; letter-spacing: 2px; background: none; border: 0; color: #9b9481; padding: .8rem; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--amber); border-bottom-color: var(--amber); }
.fld { margin-bottom: 1rem; } .fld label { display: block; font-family: var(--f-mono); font-size: .78rem; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: .3rem; }
.fld input[type=text], .fld input[type=email], .fld input[type=password], .fld input[type=number], .fld select { width: 100%; background: #0b0c0e; border: 1px solid #3a3d42; color: var(--bone); padding: .65rem .8rem; font-family: var(--f-mono); font-size: 1rem; } .fld input:focus, .fld select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 12px var(--amber-glow); }
.chk { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: #bdb5a0; margin-bottom: .7rem; } .chk input { margin-top: .25rem; accent-color: var(--amber); }
#rp-toasts { position: fixed; right: 14px; bottom: 14px; z-index: 2000; display: grid; gap: 10px; width: min(380px, calc(100vw - 28px)); }
.rp-toast { padding: .8rem 1rem; background: #0d0f11; border-left: 5px solid var(--amber); border-top: 1px solid #333; box-shadow: 0 8px 26px rgba(0, 0, 0, .7); font-size: 1rem; animation: toastin .3s ease; }
.rp-toast.ok { border-left-color: var(--toxic); } .rp-toast.err { border-left-color: var(--blood); }
@keyframes toastin { from { transform: translateX(30px); opacity: 0; } }
#fxc { position: fixed; inset: 0; z-index: 1700; pointer-events: none; width: 100%; height: 100%; }
#card-element { background: #0b0c0e; border: 1px solid #3a3d42; padding: 13px; }
.price-tag { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border: 1px dashed #5b4a2c; margin-bottom: 1rem; }

/* ---------------- Pie ---------------- */
.ftr { border-top: 1px solid #2a2c30; background: rgba(5, 6, 7, .85); font-size: .92rem; color: #837d6e; }
.ftr a { color: #9b9481; text-decoration: none; } .ftr a:hover { color: var(--amber); }
.legal-text { color: #c4bca7; line-height: 1.7; } .legal-text h2 { font-size: 1.15rem; margin-top: 1.6rem; } .legal-text a { color: var(--amber); }
table.b { width: 100%; border-collapse: collapse; } table.b th, table.b td { padding: .45rem .6rem; border-bottom: 1px solid #25282c; } table.b th { font-family: var(--f-mono); font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-align: left; }

/* ---------------- Responsive y accesibilidad ---------------- */
@media (max-width: 575px) { body { font-size: 1rem; } .plate { padding: 1rem; } .task { grid-template-columns: 44px 1fr; } .task .go { grid-column: 1 / -1; } .hero { padding-top: 2rem; } .brand b { font-size: 1.15rem; } }
.container-b { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.row-b { display: grid; gap: 1.2rem; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g-main { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 991px) { .g-main { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr; } } @media (max-width: 575px) { .g2 { grid-template-columns: 1fr; } }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } #ash { display: none; } }
