/* ============================================================
  STYLE.CSS — Newsgame "Proyecto Castor"
  Diseño de HUD con Barra Táctica Inferior (Cero superposiciones)
  ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800;900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Cinzel:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
 --gold: #0033CC;
 --gold-light: #4d79ff;
 --dark-panel: rgba(10, 16, 10, 0.94);
 --panel-border: rgba(0, 51, 204, 0.4);
 --danger: #e74c3c;
 --success: #2ecc71;
 --warning: #f39c12;
 --info: #3498db;
 --text: #f0f0f0;
 --text-dim: #b0b8b0;
 --radius: 8px;
 --shadow: 0 8px 32px rgba(0,0,0,0.85);
 /* Brutalist theme */
 --brut-bg: #ffffff;
 --brut-border: 4px solid #111;
 --brut-shadow: 12px 12px 0 #0033CC;
 --brut-text: #111111;
 --brut-text-dim: #444444;
}

html, body {
 width: 100%; height: 100%;
 overflow: hidden;
 background: #040804;
 font-family: 'Space Mono', monospace;
 color: var(--text);
 -webkit-font-smoothing: antialiased;
}

/* ── Game Container Responsivo ────────────────────────────── */

/* ============================================================
   OVERLAY "GIRAR DISPOSITIVO" — Solo visible en portrait móvil
   ============================================================ */
#rotate-overlay {
 display: none; /* oculto por defecto; CSS lo muestra en portrait */
 position: fixed;
 inset: 0;
 z-index: 999999;
 background: rgba(15, 23, 42, 0.85);
 backdrop-filter: blur(8px);
 -webkit-backdrop-filter: blur(8px);
 align-items: center;
 justify-content: center;
 padding: 20px;
 box-sizing: border-box;
}

.rotate-inner-card {
 background: #ffffff !important;
 border: 4px solid #111111 !important;
 box-shadow: 12px 12px 0 #0033CC !important;
 width: min(320px, 84vw);
 max-width: 320px;
 padding: 22px 18px;
 box-sizing: border-box;
 display: flex;
 flex-direction: column;
 align-items: center;
 text-align: center;
 gap: 14px;
 border-radius: 0 !important;
}

.rotate-icon-container {
 background: #f8f9ff;
 border: 2.5px solid #111111;
 box-shadow: 4px 4px 0 #0033CC;
 padding: 10px;
 display: flex;
 align-items: center;
 justify-content: center;
}

.rotate-icon-container svg {
 width: 68px;
 height: 68px;
 animation: rotate-hint 2.5s ease-in-out infinite;
}

@keyframes rotate-hint {
 0%, 100% { transform: rotate(0deg); }
 30% { transform: rotate(-15deg); }
 60% { transform: rotate(15deg); }
 80% { transform: rotate(0deg); }
}

.rotate-title {
 font-family: 'Archivo', sans-serif !important;
 font-size: clamp(18px, 5.5vw, 22px) !important;
 font-weight: 900 !important;
 color: #0033CC !important;
 letter-spacing: -0.5px;
 margin: 0;
 text-transform: uppercase;
}

.rotate-subtitle {
 font-family: 'Space Mono', monospace !important;
 font-size: 11px !important;
 color: #111111 !important;
 line-height: 1.5 !important;
 margin: 0;
 text-align: center;
}

.rotate-subtitle strong {
 color: #0033CC;
 font-weight: 700;
}

/* Portrait móvil: mostrar overlay, ocultar juego */
@media (max-width: 900px) and (orientation: portrait) {
 #rotate-overlay { display: flex !important; }
 #game-container { display: none !important; }
 #hud-container,
 #news-container,
 #tutorial-overlay { display: none !important; }
}

#game-container {
 position: relative;
 width: 100vw;
 height: 100vh;
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: hidden;
 background: #000;
}

#game-canvas {
 display: block;
 width: 100%;
 height: 100%;
 object-fit: cover;
 image-rendering: -webkit-optimize-contrast;
 image-rendering: crisp-edges;
 filter: saturate(0.95) contrast(1.05);
 touch-action: pan-x pan-y; /* permite scroll natural; evita que iOS retrase taps en botones adyacentes */
}

/* ── MENÚ LATERAL DERECHO TRANSPARENTE FLOTANTE SOBRE EL MAPA ── */
#hud-container {
 position: fixed;
 inset: 0;
 pointer-events: none;
 z-index: 100;
}

#hud-right-sidebar {
 position: absolute;
 right: clamp(8px, 1.2vw, 16px);
 top: clamp(8px, 1.2vh, 16px);
 width: clamp(200px, 22vw, 260px);
 max-height: calc(100vh - clamp(16px, 2.4vh, 32px));
 height: auto;
 overflow: hidden;
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 padding: clamp(10px, 1.5vh, 16px) clamp(10px, 1.2vw, 16px);
 display: flex;
 flex-direction: column;
 gap: clamp(6px, 1vh, 12px);
 color: var(--brut-text);
 box-shadow: var(--brut-shadow);
 backdrop-filter: none;
 pointer-events: auto;
 transition: all 0.35s ease;
}

/* ── Panel Compacto al Liberar Castores (Solo Botón de Velocidad) ── */
#hud-right-sidebar.beavers-released {
 width: auto;
 padding: 8px 12px;
 gap: 0;
 border-radius: 0;
}

#hud-right-sidebar.beavers-released .sidebar-top-brand,
#hud-right-sidebar.beavers-released .sidebar-guide-box,
#hud-right-sidebar.beavers-released .sidebar-section-title,
#hud-right-sidebar.beavers-released .central-beaver-btn-wrapper {
 display: none !important;
}

#hud-right-sidebar.beavers-released #hud-controls-vertical {
 margin-top: 0;
}

.sidebar-top-brand {
 display: flex;
 align-items: center;
 gap: 10px;
 padding-bottom: 8px;
 border-bottom: 2px solid #111;
}

.sidebar-game-title {
 font-family: 'Cinzel', serif;
 font-size: clamp(10.5px, 1.1vw, 13.5px);
 font-weight: 800;
 color: #0033CC;
 line-height: 1.3;
 letter-spacing: 0.8px;
}

.sidebar-guide-box {
 background: #f0f4ff;
 border: 2px solid #111;
 border-radius: 0;
 padding: clamp(7px, 1.1vh, 12px) clamp(9px, 1.1vw, 14px);
 margin-top: 2px;
 box-shadow: 4px 4px 0 #0033CC;
}

.guide-title {
 font-family: 'Cinzel', serif;
 font-size: clamp(9px, 0.95vw, 11px);
 font-weight: 700;
 color: #0033CC;
 margin-bottom: clamp(4px, 0.6vh, 8px);
 letter-spacing: 0.5px;
}

.guide-step {
 font-size: clamp(9.5px, 1vw, 11.5px);
 line-height: 1.4;
 color: #333333;
 margin-bottom: clamp(3px, 0.5vh, 6px);
}

.guide-step strong {
 color: #111;
}

.sidebar-section-title {
 font-family: 'Cinzel', serif;
 font-size: clamp(9px, 0.95vw, 11px);
 font-weight: 700;
 color: #0033CC;
 letter-spacing: 0.8px;
 border-bottom: 2px solid #111;
 padding-bottom: 3px;
 margin-top: 3px;
}

.hud-stats-vertical {
 display: flex;
 flex-direction: column;
 gap: 8px;
}

.hud-stats-vertical .stat-pill {
 display: flex;
 align-items: center;
 justify-content: space-between;
 background: rgba(0, 0, 0, 0.45);
 border: 1px solid rgba(0, 51, 204, 0.35);
 border-radius: 10px;
 padding: 8px 12px;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.pill-icon {
 font-size: 14px;
 margin-right: 4px;
}

.pill-label {
 font-size: 11px;
 font-weight: 700;
 color: #9ca3af;
 letter-spacing: 0.5px;
}

.pill-val {
 font-family: 'Cinzel', serif;
 font-size: 13.5px;
 font-weight: 700;
 color: var(--gold-light);
}

#hud-timeline {
 width: 100%;
 background: rgba(0, 0, 0, 0.3);
 border: 1px solid rgba(0, 51, 204, 0.25);
 border-radius: 10px;
 padding: 10px 12px;
}

.timeline-track {
 position: relative;
 height: 8px;
 background: rgba(255, 255, 255, 0.12);
 border-radius: 4px;
}

.timeline-fill {
 position: absolute;
 top: 0; left: 0;
 height: 100%;
 background: linear-gradient(90deg, #27ae60, var(--gold));
 border-radius: 4px;
 transition: width 0.3s ease;
}

.timeline-thumb {
 position: absolute;
 top: 50%;
 width: 16px;
 height: 16px;
 background: var(--gold);
 border: 2px solid #000;
 border-radius: 50%;
 transform: translate(-50%, -50%);
 box-shadow: 0 0 10px rgba(0, 51, 204, 0.8);
}

.timeline-labels {
 display: flex;
 justify-content: space-between;
 margin-top: 6px;
 font-family: 'Cinzel', serif;
 font-size: 10px;
 font-weight: 700;
 color: var(--gold-light);
}

#hud-controls-vertical {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 12px;
 margin-top: 4px;
}

#hud-controls-vertical .hud-speed-btn {
 width: 100%;
 justify-content: center;
 height: 42px;
 font-size: 13px;
}

.central-beaver-btn-wrapper {
 display: flex;
 justify-content: center;
 align-items: center;
 width: 100%;
 padding-top: 10px;
}

.central-beaver-btn-wrapper .pure-image-btn img {
 height: clamp(70px, 11vh, 110px);
 width: auto;
 transition: transform 0.2s ease, filter 0.2s ease;
}


.hud-speed-btn {
 background: linear-gradient(135deg, rgba(25, 40, 30, 0.9), rgba(10, 20, 15, 0.95));
 border: 1.5px solid var(--gold);
 border-radius: 20px;
 padding: 6px 14px;
 color: #fff;
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 6px;
 box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
 transition: all 0.2s ease;
 height: 40px;
}

.hud-speed-btn:hover {
 transform: translateY(-2px) scale(1.05);
 background: rgba(0, 51, 204, 0.2);
 box-shadow: 0 6px 20px rgba(0, 51, 204, 0.4);
}

.hud-speed-btn.active-2x {
 background: linear-gradient(135deg, #27ae60, #1e8449);
 border-color: #2ecc71;
 box-shadow: 0 0 20px rgba(46, 204, 113, 0.7);
 animation: pulse2x 1.5s infinite alternate;
}

@keyframes pulse2x {
 from { box-shadow: 0 0 12px rgba(46, 204, 113, 0.5); }
 to { box-shadow: 0 0 24px rgba(46, 204, 113, 0.9); }
}

.hud-speed-btn.active-4x {
 background: linear-gradient(135deg, #e74c3c, #c0392b);
 border-color: #e74c3c;
 box-shadow: 0 0 20px rgba(231, 76, 60, 0.85);
 animation: pulse4x 1.0s infinite alternate;
}

@keyframes pulse4x {
 from { box-shadow: 0 0 14px rgba(231, 76, 60, 0.6); }
 to { box-shadow: 0 0 28px rgba(231, 76, 60, 1.0); }
}

.pure-image-btn {
 background: transparent !important;
 border: none !important;
 padding: 0 !important;
 margin: 0 !important;
 cursor: pointer;
 outline: none;
 display: inline-block;
 box-shadow: none !important;
 pointer-events: auto !important;
 touch-action: manipulation !important;
 -webkit-tap-highlight-color: transparent;
}

.pure-image-btn img {
 height: clamp(70px, 11vh, 110px);
 width: auto;
 display: block;
 object-fit: contain;
 filter: drop-shadow(0 6px 14px rgba(0,0,0,0.8));
 transition: transform 0.2s ease, filter 0.2s ease;
 pointer-events: none !important;
}



.pure-image-btn:hover img {
 transform: scale(1.08) translateY(-3px);
 filter: drop-shadow(0 10px 24px rgba(0, 51, 204, 0.7));
}

.pure-image-btn:active img {
 transform: scale(0.95);
}

.news-btn {
 flex: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 10px;
 padding: 12px 20px;
 border-radius: 30px;
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 letter-spacing: 1px;
 cursor: pointer;
 border: 2px solid transparent;
 box-shadow: 0 4px 18px rgba(0,0,0,0.6);
 transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
 white-space: nowrap;
}

.news-btn:hover {
 transform: translateY(-2px);
}

.news-btn:active {
 transform: translateY(0);
}

.btn-danger {
 background: linear-gradient(135deg, #c0392b, #8e44ad);
 color: #fff;
 border-color: #e74c3c;
 box-shadow: 0 4px 18px rgba(231,76,60,0.4);
}
.btn-danger:hover {
 box-shadow: 0 6px 24px rgba(231,76,60,0.6);
}

.btn-success {
 background: linear-gradient(135deg, #16a085, #117864);
 color: #fff;
 border-color: #1abc9c;
 box-shadow: 0 4px 18px rgba(26,188,156,0.4);
}
.btn-success:hover {
 box-shadow: 0 6px 24px rgba(26,188,156,0.6);
}

.btn-plant {
 background: linear-gradient(135deg, #2ecc71, #27ae60);
 color: #fff;
 border-color: #27ae60;
 box-shadow: 0 4px 18px rgba(46,204,113,0.4);
}
.btn-plant:hover {
 box-shadow: 0 6px 24px rgba(46,204,113,0.6);
}

.btn-icon { font-size: 16px; }

/* ── Tarjetas Periodísticas Modales Grandes (Fijas en el centro) ── */
#news-container {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 z-index: 50;
 pointer-events: none;
 width: min(540px, 90vw);
 max-height: 90vh;
}

.news-card {
 pointer-events: all;
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 padding: clamp(14px, 2.5vw, 24px) clamp(16px, 3vw, 28px);
 box-shadow: var(--brut-shadow);
 backdrop-filter: none;
 animation: news-popup 0.4s cubic-bezier(0.17, 0.67, 0.36, 1.2) forwards;
 cursor: pointer;
 color: var(--brut-text);
 max-height: 90vh;
 overflow: hidden;
}

.news-card.news-exit {
 animation: news-popout 0.4s ease forwards;
}

@keyframes news-popup {
 from { opacity: 0; transform: scale(0.85) translateY(20px); }
 to  { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes news-popout {
 to  { opacity: 0; transform: scale(0.9) translateY(-20px); }
}

.news-badge {
 display: inline-block;
 font-size: 10px;
 font-weight: 700;
 letter-spacing: 1px;
 color: #0033CC;
 background: #f0f4ff;
 border: 2px solid #111;
 border-radius: 0;
 padding: 3px 8px;
 margin-bottom: 10px;
 text-transform: uppercase;
}

.news-title {
 font-family: 'Cinzel', serif;
 font-size: clamp(13px, 2vw, 18px);
 font-weight: 700;
 color: #111111;
 line-height: 1.3;
 margin-bottom: 8px;
 text-shadow: none;
}

.news-text {
 font-size: clamp(11px, 1.5vw, 13.5px);
 line-height: 1.55;
 color: #222222;
 margin-bottom: 12px;
}

.news-footer {
 font-size: 10.5px;
 color: var(--text-dim);
 text-align: right;
 font-style: italic;
 letter-spacing: 0.5px;
}

/* ── Tutorial Overlay ─────────────────────────────────────── */
#tutorial-overlay {
 position: fixed;
 inset: 0;
 background: rgba(0,0,0,0.88);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 9999;
 backdrop-filter: blur(8px);
 animation: fade-in 0.4s ease;
 pointer-events: auto;
}

#tutorial-overlay.fade-out {
 animation: fade-out 0.5s ease forwards;
 pointer-events: none !important;
}

@keyframes fade-in { from { opacity:0 } to { opacity:1 } }
@keyframes fade-out { to  { opacity:0 } }

.tutorial-box {
 max-width: 580px;
 width: 92%;
 max-height: calc(96vh - 16px);
 overflow: hidden;
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 padding: clamp(18px, 3.5vh, 36px) clamp(20px, 3.5vw, 40px);
 box-shadow: var(--brut-shadow);
 color: var(--brut-text);
 display: flex;
 flex-direction: column;
}

.tutorial-header { text-align: center; margin-bottom: clamp(10px, 2vh, 20px); flex-shrink: 0; }
.tutorial-logo { font-size: clamp(28px, 5vh, 44px); display: block; margin-bottom: 6px; }

.tutorial-header h2 {
 font-family: 'Cinzel', serif;
 font-size: clamp(15px, 2.5vw, 22px);
 color: #0033CC;
 letter-spacing: 1px;
}

.tutorial-subtitle { font-size: clamp(9px, 1vw, 11px); color: #555555; text-transform: uppercase; letter-spacing: 1px; }

.tutorial-body p { font-size: clamp(11.5px, 1.5vw, 13.5px); line-height: 1.55; color: #222222; margin-bottom: clamp(6px, 1vh, 12px); }
.tutorial-body strong { color: #0033CC; }
.tutorial-body em { color: #333333; font-style: italic; }

.tutorial-instructions {
 background: rgba(0,0,0,0.35);
 border: 1px solid rgba(0, 51, 204, 0.2);
 border-radius: var(--radius);
 padding: clamp(8px, 1.5vh, 14px) clamp(10px, 1.5vw, 16px);
 display: flex;
 flex-direction: column;
 gap: clamp(4px, 0.8vh, 8px);
 margin-top: clamp(6px, 1vh, 10px);
 flex-shrink: 0;
}

.ins-item { font-size: clamp(10.5px, 1.2vw, 12.5px); line-height: 1.45; color: var(--text-dim); }
.ins-item strong { color: var(--text); }

.tutorial-start-btn {
 display: block;
 width: 100%;
 margin-top: clamp(12px, 2vh, 24px);
 padding: clamp(10px, 1.5vh, 14px);
 background: linear-gradient(135deg, #27ae60, #1e8449);
 border: 1px solid var(--gold);
 border-radius: 30px;
 color: #fff;
 font-family: 'Cinzel', serif;
 font-size: clamp(12px, 1.5vw, 15px);
 font-weight: 700;
 letter-spacing: 1px;
 cursor: pointer;
 box-shadow: 0 0 24px rgba(46,204,113,0.3);
 transition: transform 0.15s, box-shadow 0.15s;
 flex-shrink: 0;
}

.tutorial-start-btn:hover {
 transform: translateY(-2px);
 box-shadow: 0 0 34px rgba(46,204,113,0.5);
}

#debug-panel {
 display: none !important;
}

.debug-btn {
 background: rgba(18, 28, 22, 0.85);
 color: #a3e635;
 border: 1px solid rgba(163, 230, 53, 0.4);
 border-radius: 6px;
 padding: 6px 12px;
 font-family: 'Inter', sans-serif;
 font-size: 11px;
 font-weight: 600;
 cursor: pointer;
 backdrop-filter: blur(8px);
 transition: all 0.2s ease;
}

/* ── MODAL DE GIF ANIMADO DE CAPTURA (SIN TÍTULO) ── */
.capture-gif-modal {
 width: min(520px, 92vw) !important;
 padding: 16px !important;
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.capture-gif-container {
 width: 100%;
 border-radius: 14px;
 overflow: hidden;
 border: 1.5px solid rgba(16, 185, 129, 0.6);
 box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.3) inset;
 background: #000000;
 display: flex;
 justify-content: center;
 align-items: center;
}

.capture-gif-img {
 width: 100%;
 height: auto;
 display: block;
 object-fit: cover;
 border-radius: 12px;
}

.catcher-badge-bar {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 8px;
}

.catcher-pill-badge {
 background: linear-gradient(90deg, #059669, #10b981);
 color: #ffffff;
 font-family: 'Inter', sans-serif;
 font-size: 11px;
 font-weight: 800;
 letter-spacing: 0.8px;
 padding: 3px 10px;
 border-radius: 20px;
 box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
 text-transform: uppercase;
}

.catcher-step-tag {
 font-family: 'Inter', sans-serif;
 font-size: 11px;
 font-weight: 700;
 color: #a7f3d0;
 opacity: 0.85;
}

/* ── MINIJUEGO DE REFORESTACIÓN NATIVA (DESCOMPRIMIDO Y CENTRADO) ── */
#beaver-catcher-panel {
 position: absolute;
 top: 50%;
 left: 45px;
 transform: translateY(-50%);
 width: 420px;
 max-width: 90vw;
 z-index: 200;
 animation: slideInLeft 0.4s cubic-bezier(0.17, 0.67, 0.36, 1.2);
}

#reforestation-minigame-panel {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 width: min(540px, 92vw);
 z-index: 200;
 animation: slideInCenter 0.4s cubic-bezier(0.17, 0.67, 0.36, 1.2);
}

@keyframes slideInCenter {
 from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
 to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.arcade-theme-card {
 background: linear-gradient(145deg, rgba(6, 32, 24, 0.95), rgba(12, 24, 18, 0.98)) !important;
 border: 1.5px solid #10b981 !important;
 box-shadow: 0 20px 60px rgba(0,0,0,0.92), 0 0 30px rgba(16, 185, 129, 0.25) inset !important;
 border-radius: 20px !important;
 padding: 20px !important;
}

.arcade-action-btn {
 width: 100%;
 margin-top: 14px;
 background: linear-gradient(135deg, #10b981, #059669) !important;
 border: 1px solid #6ee7b7 !important;
 color: #ffffff !important;
 font-family: 'Inter', sans-serif !important;
 font-weight: 800 !important;
 font-size: 14px !important;
 padding: 12px 24px !important;
 border-radius: 28px !important;
 box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5) !important;
 cursor: pointer;
 transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.arcade-action-btn:hover {
 transform: translateY(-2px) scale(1.02) !important;
 box-shadow: 0 6px 26px rgba(16, 185, 129, 0.7) !important;
}

.reforest-card {
 background: linear-gradient(145deg, rgba(6, 32, 24, 0.96), rgba(12, 24, 18, 0.98)) !important;
 border: 1.5px solid #10b981 !important;
 border-radius: 20px !important;
 padding: 22px 26px !important;
 color: #fff;
 box-shadow: 0 20px 60px rgba(0, 0, 0, 0.92), 0 0 35px rgba(16, 185, 129, 0.28) inset !important;
 backdrop-filter: blur(16px);
}

.reforest-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.reforest-step-tag {
 font-size: 11px;
 font-weight: 700;
 color: var(--gold-light);
 background: rgba(0, 51, 204, 0.2);
 border: 1px solid rgba(0, 51, 204, 0.4);
 padding: 3px 8px;
 border-radius: 6px;
}

.survival-status-box {
 background: rgba(0, 0, 0, 0.5);
 border: 1px solid rgba(0, 51, 204, 0.3);
 border-radius: 10px;
 padding: 8px 12px;
 margin-top: 10px;
}

.survival-info {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 5px;
}

.survival-pct {
 font-family: 'Cinzel', serif;
 font-size: 18px;
 font-weight: 700;
 color: #00C853;
}

.survival-bar-track {
 width: 100%;
 height: 10px;
 background: rgba(255, 255, 255, 0.1);
 border-radius: 5px;
 overflow: hidden;
}

.survival-bar-fill {
 height: 100%;
 background: #00C853;
 transition: width 0.3s ease, background 0.3s ease;
}

.reforest-canvas-container {
 position: relative;
 width: 100%;
 height: 240px !important;
 background: #18100c;
 border: 1.5px solid rgba(16, 185, 129, 0.6) !important;
 border-radius: 16px !important;
 margin-top: 14px;
 overflow: hidden;
 display: flex;
 align-items: center;
 justify-content: center;
 box-shadow: 0 8px 25px rgba(0, 0, 0, 0.85) inset, 0 0 20px rgba(16, 185, 129, 0.2) !important;
}

/* ── CITA DESTACADA DE REFLEXIÓN EN EL FINAL DEL JUEGO ── */
.final-reflection-quote {
 background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.10)) !important;
 border-left: 4px solid #10b981 !important;
 padding: 14px 18px !important;
 margin: 16px 0 !important;
 font-size: clamp(13px, 1.9vw, 14.5px) !important;
 line-height: 1.55 !important;
 color: #a7f3d0 !important;
 border-radius: 0 12px 12px 0 !important;
 box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15) !important;
}

.restart-game-btn {
 background: linear-gradient(135deg, #10b981, #059669) !important;
 border: 1.5px solid #6ee7b7 !important;
 box-shadow: 0 0 25px rgba(16, 185, 129, 0.6) !important;
 font-size: 15px !important;
 padding: 12px 36px !important;
 border-radius: 30px !important;
 transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.restart-game-btn:hover {
 transform: translateY(-2px) scale(1.04) !important;
 box-shadow: 0 0 35px rgba(16, 185, 129, 0.85) !important;
}

#reforest-inner-canvas {
 width: 100%;
 height: 100%;
 object-fit: contain;
 display: block;
 border-radius: 12px;
 background: transparent;
}

.reforest-controls-box {
 margin-top: 14px;
}

.reforest-instruction-text {
 font-size: 12px;
 line-height: 1.4;
 color: #e5e7eb;
 margin-bottom: 12px;
 text-align: center;
}

.reforest-success-badge {
 background: rgba(0, 200, 83, 0.2);
 border: 1.5px solid #00C853;
 color: #69f0ae;
 padding: 10px;
 border-radius: 10px;
 text-align: center;
 font-weight: 700;
 font-size: 13px;
 margin-bottom: 12px;
}

.reforest-fail-badge {
 background: rgba(239, 68, 68, 0.2);
 border: 1.5px solid #ef4444;
 color: #fca5a5;
 padding: 10px;
 border-radius: 10px;
 text-align: center;
 font-weight: 700;
 font-size: 13px;
 margin-bottom: 12px;
}

.catcher-stats-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 10px;
 margin-top: 12px;
}

.catcher-stat-box {
 background: rgba(0, 0, 0, 0.45);
 border: 1px solid rgba(0, 51, 204, 0.35);
 border-radius: 8px;
 padding: 10px 8px;
 text-align: center;
}

.stat-lbl {
 display: block;
 font-size: 10px;
 font-weight: 700;
 color: #9ca3af;
 margin-bottom: 3px;
 letter-spacing: 0.5px;
}

.stat-val {
 font-family: 'Cinzel', serif;
 font-size: 18px;
 font-weight: 700;
 color: #22c55e;
}

.timer-val {
 color: var(--gold-light);
}

/* ── BARRA DE PRECISIÓN EN LA ZONA VERDE ── */
.precision-bar-box {
 margin-top: 14px;
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.precision-bar-track {
 position: relative;
 width: 100%;
 height: 24px;
 background: rgba(0, 0, 0, 0.6);
 border: 1.5px solid var(--gold);
 border-radius: 12px;
 overflow: hidden;
 box-shadow: 0 0 10px rgba(0,0,0,0.8) inset;
}

.precision-green-zone {
 position: absolute;
 left: 42%;
 width: 24%;
 height: 100%;
 background: linear-gradient(135deg, #22c55e, #16a34a);
 box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.precision-needle {
 position: absolute;
 top: 0;
 width: 6px;
 height: 100%;
 background: #ef4444;
 box-shadow: 0 0 10px #ef4444, 0 0 15px #fff;
 border-radius: 3px;
 transition: background 0.15s ease, box-shadow 0.15s ease;
}

.precision-needle.hit-green {
 background: #22c55e !important;
 box-shadow: 0 0 25px #22c55e, 0 0 15px #fff !important;
}

.precision-needle.hit-miss {
 background: #ef4444 !important;
 box-shadow: 0 0 25px #ef4444 !important;
}

/* ── CAJA DE INGRESO DE INICIALES RETRO ARCADE ── */
.arcade-name-entry-box {
 margin: 14px 0 10px;
 background: rgba(0, 0, 0, 0.4);
 border: 1px dashed var(--gold);
 border-radius: 8px;
 padding: 12px;
 text-align: center;
}

.entry-label {
 display: block;
 font-family: 'Cinzel', serif;
 font-size: 11px;
 font-weight: 700;
 color: var(--gold-light);
 margin-bottom: 8px;
 letter-spacing: 1px;
}

.initials-input-group {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 10px;
}

#arcade-initials-input {
 width: 90px;
 height: 38px;
 background: rgba(0, 0, 0, 0.7);
 border: 2px solid var(--gold);
 border-radius: 6px;
 color: #22c55e;
 font-family: 'Cinzel', serif;
 font-size: 18px;
 font-weight: 800;
 text-align: center;
 letter-spacing: 4px;
 outline: none;
 box-shadow: 0 0 12px rgba(34, 197, 94, 0.3) inset;
}

.score-saved-badge {
 color: #22c55e;
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 padding: 6px;
}

.precision-feedback-lbl {
 font-size: 11px;
 font-weight: 700;
 text-align: center;
 color: var(--gold-light);
 min-height: 16px;
}

.precision-feedback-lbl.perfect { color: #22c55e; }
.precision-feedback-lbl.good { color: #0033CC; }
.precision-feedback-lbl.miss { color: #ef4444; }

/* ── TABLA DE CLASIFICACIÓN RETRO ARCADE (HIGH SCORES) ── */
.arcade-leaderboard-modal {
 width: 440px !important;
}

.leaderboard-table-container {
 display: flex;
 flex-direction: column;
 gap: 8px;
 margin: 16px 0;
 background: rgba(0, 0, 0, 0.45);
 border: 1.5px solid var(--gold);
 border-radius: 10px;
 padding: 12px;
}

.leaderboard-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 8px 12px;
 background: rgba(255, 255, 255, 0.05);
 border-radius: 6px;
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 color: #d1d5db;
}

.leaderboard-row.player-row {
 background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), rgba(0, 51, 204, 0.25));
 border: 1px solid var(--gold);
 color: #fff;
 box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.rank-num { color: var(--gold-light); width: 30px; }
.player-name { flex-grow: 1; text-align: left; margin-left: 10px; }
.player-score { color: #22c55e; }

/* ── VENTANA LATERAL IZQUIERDA DE INVENTARIO ENEEI (DEL LADO IZQUIERDO) ── */
#eneei-sidebar-panel {
 position: absolute;
 top: 30px;
 left: 24px;
 width: 280px;
 z-index: 180;
 animation: slideInLeft 0.4s cubic-bezier(0.17, 0.67, 0.36, 1.2);
}

.sidebar-card {
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 padding: 16px 18px;
 color: var(--brut-text);
 box-shadow: var(--brut-shadow);
 backdrop-filter: none;
}

.sidebar-header {
 display: flex;
 align-items: center;
 gap: 8px;
 margin-bottom: 8px;
 border-bottom: 2px solid #111;
 padding-bottom: 6px;
}

.sidebar-header h4 {
 font-family: 'Cinzel', serif;
 font-size: 13px;
 color: #0033CC;
 margin: 0;
}

.sidebar-desc {
 font-size: 11.5px;
 line-height: 1.4;
 color: #444444;
 margin-bottom: 12px;
}

.sidebar-items {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.sidebar-item {
 background: rgba(255, 255, 255, 0.06);
 border: 1.5px dashed rgba(0, 51, 204, 0.6);
 border-radius: 10px;
 padding: 10px;
 display: flex;
 align-items: center;
 gap: 12px;
 cursor: grab;
 user-select: none;
 transition: all 0.2s ease;
}

.sidebar-item:active {
 cursor: grabbing;
}

.sidebar-item:hover {
 transform: translateX(4px);
 background: rgba(0, 51, 204, 0.15);
 border-color: var(--gold);
}

.sidebar-item.installed {
 border-style: solid;
 border-color: #22c55e;
 background: rgba(34, 197, 94, 0.1);
 cursor: default;
}

.item-preview {
 width: 46px;
 height: 46px;
 background: rgba(0, 0, 0, 0.4);
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
}

.sidebar-img {
 max-width: 38px;
 max-height: 38px;
 object-fit: contain;
 filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
}

.item-info {
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.item-title {
 font-size: 12px;
 font-weight: 600;
 color: #fff;
}

.item-status {
 font-size: 11px;
 color: #9ca3af;
}

@keyframes slideInLeft {
 from { opacity: 0; transform: translateX(-40px); }
 to { opacity: 1; transform: translateX(0); }
}

/* ── TARJETA EMERGENTE IZQUIERDA CENTRADA — RECORTE DE DIARIO VINTAGE ── */
.left-center-news-popup {
 position: absolute;
 left: clamp(10px, 1.5vw, 20px);
 top: 50%;
 transform: translateY(-50%);
 width: clamp(320px, 42vw, 520px);
 max-width: calc(100vw - clamp(215px, 24vw, 285px) - 30px);
 max-height: calc(96vh - 20px);
 z-index: 220;
 pointer-events: auto;
 overflow: hidden;
 animation: slideInLeftCenter 0.45s cubic-bezier(0.17, 0.67, 0.36, 1.2);
}

.left-center-news-popup.slide-out-left {
 animation: slideOutLeftCenter 0.35s ease forwards;
}

/* ── MODAL EMERGENTE AAA DE JUEGO (CENTRADITO Y COMPACTO, NO EXTENDIDO) ── */
.centered-news-overlay {
 position: fixed; /* fixed para que cubra toda la pantalla al estar en document.body */
 inset: 0;
 background: rgba(4, 8, 6, 0.86);
 backdrop-filter: blur(14px);
 -webkit-backdrop-filter: blur(14px);
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 16px;
 z-index: 9000; /* sobre canvas, HUD y cualquier otro elemento */
 animation: fade-in 0.4s ease;
}

/* Theme overlays */
.centered-news-overlay.theme-danger,
.centered-news-overlay.bluish-theme,
.centered-news-overlay.reddish-theme {
 background: radial-gradient(circle at center, rgba(120, 15, 20, 0.94), rgba(28, 4, 6, 0.98));
}

.centered-news-overlay.theme-warning {
 background: radial-gradient(circle at center, rgba(110, 50, 10, 0.94), rgba(25, 12, 4, 0.98));
}

.centered-news-overlay.theme-success {
 background: radial-gradient(circle at center, rgba(10, 70, 45, 0.94), rgba(4, 20, 14, 0.98));
}

.centered-news-overlay.theme-info {
 background: radial-gradient(circle at center, rgba(65, 45, 12, 0.92), rgba(16, 12, 4, 0.98));
}

.centered-news-overlay.fade-out {
 animation: fade-out 0.35s ease forwards;
}

#tutorial-overlay {
 position: fixed;
 inset: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 9999;
 background: rgba(0, 0, 0, 0.75);
 backdrop-filter: blur(8px);
 animation: fade-in 0.4s ease;
}

.left-center-news-popup {
 position: absolute;
 left: clamp(10px, 1.5vw, 20px);
 top: 50%;
 transform: translateY(-50%);
 width: clamp(320px, 42vw, 520px);
 max-width: calc(100vw - clamp(215px, 24vw, 285px) - 30px);
 max-height: calc(96vh - 20px);
 z-index: 220;
 pointer-events: none;
 overflow: hidden;
 animation: slideInLeftCenter 0.45s cubic-bezier(0.17, 0.67, 0.36, 1.2);
}

.left-center-news-popup .left-center-card {
 pointer-events: auto;
}

.left-center-news-popup.slide-out-left {
 animation: slideOutLeftCenter 0.35s ease forwards;
}

/* ── NOTIFICACIÓN DE INSTRUCCIÓN / GUÍA DE JUEGO (HUD TOAST TOP-CENTER) ── */
.game-instruction-notification-wrapper {
 position: absolute;
 top: clamp(55px, 9vh, 105px);
 left: 50%;
 transform: translateX(-50%);
 width: clamp(290px, 50vw, 520px);
 max-width: calc(100vw - clamp(215px, 25vw, 285px) - 20px);
 max-height: calc(96vh - 20px);
 z-index: 380;
 pointer-events: auto;
 overflow: hidden;
 animation: notificationSlideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-instruction-notification-wrapper.slide-out-top {
 animation: notificationSlideUp 0.35s ease forwards;
}

@keyframes notificationSlideDown {
 from {
  opacity: 0;
  transform: translate(-50%, -40px) scale(0.95);
 }
 to {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
 }
}

@keyframes notificationSlideUp {
 from {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
 }
 to {
  opacity: 0;
  transform: translate(-50%, -40px) scale(0.95);
 }
}

.game-instruction-notification-card {
 background: var(--brut-bg);
 backdrop-filter: none;
 -webkit-backdrop-filter: none;
 border: var(--brut-border);
 box-shadow: var(--brut-shadow);
 border-radius: 0;
 padding: clamp(12px, 2vh, 18px) clamp(14px, 2vw, 22px);
 display: flex;
 flex-direction: column;
 gap: clamp(6px, 1vh, 10px);
 color: var(--brut-text);
 overflow: hidden;
}

.instruction-badge-bar {
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.instruction-pill-badge {
 background: linear-gradient(90deg, #059669, #10b981);
 color: #ffffff;
 font-family: 'Inter', sans-serif;
 font-size: 11px;
 font-weight: 800;
 letter-spacing: 1px;
 padding: 4px 12px;
 border-radius: 20px;
 box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
 display: flex;
 align-items: center;
 gap: 6px;
 text-transform: uppercase;
}

.instruction-step-year {
 font-family: 'Inter', sans-serif;
 font-size: 12px;
 font-weight: 700;
 color: #a7f3d0;
 opacity: 0.85;
}

.instruction-content {
 display: flex;
 flex-direction: column;
 gap: 3px;
}

.instruction-title {
 font-family: 'Inter', sans-serif;
 font-size: clamp(12px, 1.8vw, 18px);
 font-weight: 800;
 color: #0033CC;
 text-shadow: none;
 margin: 0;
 letter-spacing: -0.2px;
}

.instruction-subtitle {
 font-family: 'Inter', sans-serif;
 font-size: clamp(10.5px, 1.3vw, 13.5px);
 font-weight: 600;
 color: #555555;
 font-style: italic;
}

.instruction-text {
 font-family: 'Inter', sans-serif;
 font-size: clamp(11px, 1.4vw, 14px);
 line-height: 1.45;
 color: #222222;
 margin-top: 3px;
}

.instruction-text strong {
 color: #0033CC;
 font-weight: 700;
}

.instruction-footer {
 display: flex;
 justify-content: flex-end;
 margin-top: clamp(4px, 0.8vh, 6px);
}

.instruction-action-btn {
 background: linear-gradient(135deg, #10b981, #059669);
 border: 1px solid #6ee7b7;
 color: #ffffff;
 font-family: 'Inter', sans-serif;
 font-weight: 700;
 font-size: 13px;
 padding: 8px 22px;
 border-radius: 24px;
 cursor: pointer;
 box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.instruction-action-btn:hover {
 transform: translateY(-2px) scale(1.03);
 box-shadow: 0 6px 20px rgba(16, 185, 129, 0.65);
}

/* ── LOGO2 EN EL CIELO SUPERIOR SOBRE EL RÍO ── */


.center-footer {
 justify-content: center !important;
}

.start-game-btn-large {
 font-size: 15px !important;
 padding: 13px 40px !important;
 background: linear-gradient(135deg, #22c55e, #15803d) !important;
 border-radius: 30px !important;
 box-shadow: 0 0 30px rgba(34, 197, 94, 0.65) !important;
 letter-spacing: 0.5px !important;
}

.thanks-score-banner {
 background: #00C853;
 color: #ffffff;
 border: 3px solid #111111;
 box-shadow: 4px 4px 0 #000000;
 font-family: 'Space Mono', monospace;
 font-weight: 700;
 font-size: clamp(14px, 2.2vw, 17px);
 text-align: center;
 padding: 10px 14px;
 margin-bottom: 12px;
 text-transform: uppercase;
 letter-spacing: 0.5px;
 line-height: 1.35;
}

.thanks-score-banner strong {
 font-family: 'Archivo', sans-serif;
 font-weight: 900;
 font-size: 1.2em;
 color: #FFFF00;
 text-shadow: 1px 1px 0 #000;
}

.game-popup-modal {
 width: min(540px, 92vw);
 max-height: calc(92vh - 20px);
 overflow: hidden;
 margin: auto;
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 padding: clamp(14px, 2vw, 22px);
 color: var(--brut-text);
 box-shadow: var(--brut-shadow);
 backdrop-filter: none;
 -webkit-backdrop-filter: none;
 position: relative;
 box-sizing: border-box;
 display: flex;
 flex-direction: column;
}

/* Cuando está dentro del wrapper lateral, respetar el ancho del padre */
.left-center-news-popup .game-popup-modal {
 width: 100%;
}

.game-popup-modal::-webkit-scrollbar {
 width: 6px;
}
.game-popup-modal::-webkit-scrollbar-track {
 background: rgba(0, 51, 204, 0.06);
}
.game-popup-modal::-webkit-scrollbar-thumb {
 background: #0033CC;
}

/* El cuerpo interno del modal: flex para que el footer siempre sea visible */
.popup-modal-body {
 flex: 1 1 auto;
 min-height: 0;
 display: flex;
 flex-direction: column;
 overflow: hidden;
}

/* El texto principal con scroll vertical suave sin pisar el botón */
.popup-text-content {
 flex: 1 1 auto;
 min-height: 0;
 overflow-y: auto;
 padding-right: 6px;
 margin-bottom: 6px;
-webkit-overflow-scrolling: touch;
}

.popup-text-content::-webkit-scrollbar {
 width: 6px;
}
.popup-text-content::-webkit-scrollbar-track {
 background: rgba(0, 51, 204, 0.06);
 border-radius: 3px;
}
.popup-text-content::-webkit-scrollbar-thumb {
 background: #0033CC;
 border-radius: 3px;
}

/* El pie (botón) nunca se corta */
.popup-footer {
 flex-shrink: 0;
 margin-top: 10px;
 padding-top: 6px;
 display: flex;
 justify-content: flex-end;
}

/* Theme variants for .game-popup-modal — keep brutalist base, only accent shadow changes */
.game-popup-modal.theme-danger {
 background: var(--brut-bg);
 border: var(--brut-border);
 box-shadow: 12px 12px 0 #cc0000;
}

.game-popup-modal.theme-warning {
 background: var(--brut-bg);
 border: var(--brut-border);
 box-shadow: 12px 12px 0 #cc6600;
}

.game-popup-modal.theme-success {
 background: var(--brut-bg);
 border: var(--brut-border);
 box-shadow: 12px 12px 0 #007a3d;
}

.game-popup-modal.theme-info {
 background: var(--brut-bg);
 border: var(--brut-border);
 box-shadow: 12px 12px 0 #cc8800;
}

.popup-modal-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 6px;
 border-bottom: 2px solid #111;
 padding-bottom: 8px;
 margin-bottom: 10px;
 flex-shrink: 0;
}

.popup-category-stamp {
 font-family: 'Inter', sans-serif;
 font-size: 11px;
 font-weight: 800;
 letter-spacing: 0.8px;
 padding: 3px 10px;
 border-radius: 0;
 background: #f0f4ff;
 border: 2px solid #111;
 color: #111;
 text-transform: uppercase;
}

.theme-danger .popup-category-stamp {
 background: rgba(239, 68, 68, 0.2);
 border-color: #ef4444;
 color: #fca5a5;
}
.theme-warning .popup-category-stamp {
 background: rgba(249, 115, 22, 0.2);
 border-color: #f97316;
 color: #fdba74;
}
.theme-success .popup-category-stamp {
 background: rgba(16, 185, 129, 0.2);
 border-color: #10b981;
 color: #6ee7b7;
}
.theme-info .popup-category-stamp {
 background: rgba(245, 158, 11, 0.2);
 border-color: #f59e0b;
 color: #fde047;
}

.popup-year-badge {
 font-family: 'Cinzel', serif;
 font-size: 11px;
 font-weight: 700;
 color: #0033CC;
 background: #f0f4ff;
 border: 2px solid #111;
 border-radius: 0;
 padding: 3px 10px;
 letter-spacing: 0.8px;
}

.theme-danger .popup-year-badge {
 background: rgba(220, 38, 38, 0.3);
 color: #ffffff;
 border-color: #fca5a5;
}

.popup-headline {
 font-family: 'Cinzel', serif;
 font-size: clamp(13px, 2vw, 19px);
 font-weight: 800;
 color: #111111;
 line-height: 1.28;
 margin-bottom: clamp(4px, 0.8vh, 6px);
 text-shadow: none;
}

.popup-subhead {
 font-family: 'Inter', sans-serif;
 font-size: clamp(11px, 1.5vw, 13.5px);
 font-weight: 500;
 color: #555555;
 margin-bottom: clamp(6px, 1.2vh, 12px);
 font-style: italic;
 line-height: 1.4;
}

.popup-text-content {
 font-family: 'Inter', sans-serif;
 font-size: clamp(11px, 1.4vw, 13.5px);
 line-height: 1.5;
 color: #222222;
}

.popup-lead strong {
 color: #0033CC;
 font-weight: 700;
}

.popup-quote {
 background: #f0f4ff;
 border-left: 4px solid #0033CC;
 padding: clamp(7px, 1vh, 10px) clamp(10px, 1.4vw, 14px);
 margin: clamp(8px, 1.2vh, 12px) 0;
 font-style: italic;
 font-size: clamp(10.5px, 1.4vw, 13px);
 color: #0033CC;
 border-radius: 0;
 position: relative;
}

.quote-mark {
 font-size: 16px;
 font-weight: bold;
 opacity: 0.8;
}

.theme-danger .popup-quote {
 background: rgba(239, 68, 68, 0.12);
 border-left-color: #ef4444;
 color: #fecdd3;
}
.theme-warning .popup-quote {
 background: rgba(249, 115, 22, 0.12);
 border-left-color: #f97316;
 color: #ffedd5;
}
.theme-success .popup-quote {
 background: rgba(16, 185, 129, 0.12);
 border-left-color: #10b981;
 color: #d1fae5;
}

.popup-fact-box {
 background: #f0f4ff;
 border: 2px solid #111;
 border-radius: 0;
 padding: clamp(7px, 1vh, 10px) clamp(10px, 1.4vw, 14px);
 margin-top: clamp(8px, 1.2vh, 12px);
 display: flex;
 flex-direction: column;
 gap: 4px;
 cursor: pointer;
 user-select: none;
 transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.popup-fact-box:hover {
 transform: translate(-1px, -1px);
 box-shadow: 6px 6px 0 #0033CC !important;
 background-color: #f0f4ff !important;
}

.popup-fact-box:active {
 transform: translate(2px, 2px);
 box-shadow: 2px 2px 0 #0033CC !important;
}

.fact-box-title {
 font-size: clamp(9px, 0.95vw, 11px);
 font-weight: 800;
 letter-spacing: 0.6px;
 color: #0033CC;
 text-transform: uppercase;
 display: flex;
 justify-content: space-between;
 align-items: center;
 width: 100%;
}

.fact-toggle-btn {
 background: #0033CC !important;
 color: #ffffff !important;
 font-family: 'Archivo', sans-serif !important;
 font-weight: 800 !important;
 font-size: 9.5px !important;
 padding: 2px 7px !important;
 border: 2px solid #111 !important;
 box-shadow: 2px 2px 0 #111 !important;
 letter-spacing: 0.5px !important;
 border-radius: 0 !important;
 display: inline-flex !important;
 align-items: center !important;
 gap: 3px !important;
 transition: background 0.15s ease;
}

.popup-fact-box:hover .fact-toggle-btn {
 background: #002299 !important;
}

.popup-fact-box.expanded .fact-toggle-btn {
 background: #111111 !important;
 color: #ffffff !important;
}

.fact-box-body {
 font-size: clamp(10.5px, 1.3vw, 12.5px);
 line-height: 1.4;
 color: #222222;
 font-weight: 500;
 margin-top: 4px;
 padding-top: 4px;
 border-top: 1px dashed rgba(0, 51, 204, 0.25);
 animation: factBodyFade 0.2s ease-out forwards;
}

@keyframes factBodyFade {
 from { opacity: 0; transform: translateY(-3px); }
 to { opacity: 1; transform: translateY(0); }
}

.theme-danger .popup-fact-box {
 background: rgba(239, 68, 68, 0.15);
 border-color: rgba(239, 68, 68, 0.4);
}
.theme-danger .fact-box-title { color: #fca5a5; }

.theme-warning .popup-fact-box {
 background: rgba(249, 115, 22, 0.15);
 border-color: rgba(249, 115, 22, 0.4);
}
.theme-warning .fact-box-title { color: #fdba74; }

.popup-footer {
 margin-top: clamp(10px, 1.8vh, 18px);
 display: flex;
 justify-content: flex-end;
 flex-shrink: 0;
}

.popup-action-btn, .popup-start-btn {
 background: linear-gradient(135deg, #10b981, #059669);
 color: #ffffff;
 border: 1px solid #6ee7b7;
 border-radius: 26px;
 padding: 10px 30px;
 font-family: 'Inter', sans-serif;
 font-size: 13px;
 font-weight: 700;
 letter-spacing: 0.5px;
 cursor: pointer;
 box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.popup-action-btn:hover, .popup-start-btn:hover {
 transform: translateY(-2px) scale(1.03);
 box-shadow: 0 6px 24px rgba(16, 185, 129, 0.65);
}

.theme-danger .popup-action-btn {
 background: linear-gradient(135deg, #dc2626, #991b1b);
 border-color: #fca5a5;
 box-shadow: 0 4px 18px rgba(220, 38, 38, 0.5);
}
.theme-danger .popup-action-btn:hover {
 box-shadow: 0 6px 24px rgba(220, 38, 38, 0.7);
}

.theme-warning .popup-action-btn {
 background: linear-gradient(135deg, #ea580c, #c2410c);
 border-color: #fdba74;
 box-shadow: 0 4px 18px rgba(234, 88, 12, 0.5);
}
.theme-warning .popup-action-btn:hover {
 box-shadow: 0 6px 24px rgba(234, 88, 12, 0.7);
}

.theme-info .popup-action-btn {
 background: linear-gradient(135deg, #d97706, #b45309);
 border-color: #fde047;
 box-shadow: 0 4px 18px rgba(217, 119, 6, 0.5);
}
.theme-info .popup-action-btn:hover {
 box-shadow: 0 6px 24px rgba(217, 119, 6, 0.7);
}

@keyframes slideInLeftCenter {
 from { opacity: 0; transform: translate(-40px, -50%); }
 to { opacity: 1; transform: translate(0, -50%); }
}

@keyframes slideOutLeftCenter {
 from { opacity: 1; transform: translate(0, -50%); }
 to { opacity: 0; transform: translate(-40px, -50%); }
}

.centered-welcome-window {
 position: relative;
 z-index: 310;
}

@keyframes slideUpBottomLeft {
 from { opacity: 0; transform: translateY(50px); }
 to { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutBottomLeft {
 from { opacity: 1; transform: translateY(0); }
 to { opacity: 0; transform: translateY(50px); }
}

/* ── VENTANA EMERGENTE ESTILO DIARIO IMPRESO ── */
.news-journal-overlay {
 position: absolute;
 inset: 0;
 background: rgba(0, 0, 0, 0.75);
 backdrop-filter: blur(8px);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 300;
 animation: fadeIn 0.35s ease;
}

.journal-popup-window {
 background: var(--brut-bg);
 border: var(--brut-border);
 border-radius: 0;
 max-width: 580px;
 width: 92%;
 color: var(--brut-text);
 box-shadow: var(--brut-shadow);
 overflow: hidden;
 position: relative;
}

.popup-window-bar {
 background: rgba(0, 0, 0, 0.5);
 border-bottom: 1.5px solid rgba(0, 51, 204, 0.4);
 padding: 10px 18px;
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.window-bar-left {
 display: flex;
 align-items: center;
 gap: 10px;
}

.newspaper-icon-img {
 height: 30px;
 object-fit: contain;
 filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.brand-newspaper-img {
 height: 26px;
 object-fit: contain;
}

.sidebar-icon-img {
 height: 28px;
 object-fit: contain;
}

.popup-window-title {
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 color: var(--gold-light);
 letter-spacing: 1px;
}

.popup-close-x {
 background: none;
 border: none;
 color: #9ca3af;
 font-size: 18px;
 cursor: pointer;
 padding: 0 4px;
 transition: color 0.2s ease;
}

.popup-close-x:hover {
 color: #fff;
}

.popup-window-body {
 padding: 24px 30px;
}

.journal-headline {
 font-family: 'Cinzel', serif;
 font-size: 19px;
 font-weight: 700;
 line-height: 1.35;
 color: #fff;
 margin-bottom: 10px;
}

.journal-subhead {
 font-size: 13px;
 font-weight: 600;
 color: #cbd5e1;
 margin-bottom: 14px;
 line-height: 1.45;
}

.journal-text-content {
 font-size: 13px;
 line-height: 1.6;
 color: #e2e8f0;
}

.journal-lead {
 margin-bottom: 12px;
}

.journal-quote {
 font-style: italic;
 background: rgba(0, 51, 204, 0.08);
 border-left: 3px solid var(--gold);
 padding: 10px 14px;
 margin: 12px 0;
 border-radius: 0 8px 8px 0;
 color: #fef08a;
 font-size: 12.5px;
}

.journal-fact-box {
 background: rgba(255, 255, 255, 0.06);
 border: 1px solid rgba(255, 255, 255, 0.15);
 border-radius: 10px;
 padding: 10px 14px;
 margin-top: 12px;
 font-size: 12px;
 color: #a7f3d0;
}

.journal-footer {
 margin-top: 20px;
 display: flex;
 justify-content: flex-end;
}

.journal-action-btn {
 background: linear-gradient(135deg, #27ae60, #1e8449);
 border: 1px solid var(--gold);
 border-radius: 25px;
 padding: 10px 26px;
 color: #fff;
 font-family: 'Cinzel', serif;
 font-size: 12.5px;
 font-weight: 700;
 letter-spacing: 1px;
 cursor: pointer;
 box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.journal-action-btn:hover {
 transform: translateY(-2px) scale(1.03);
 box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
}
 color: #cbd5e1;
 margin-bottom: 16px;
 line-height: 1.45;
}

.journal-body {
 font-size: 13.5px;
 line-height: 1.6;
 color: #e2e8f0;
}

.journal-lead {
 margin-bottom: 14px;
}

.journal-quote {
 font-style: italic;
 background: rgba(0, 51, 204, 0.08);
 border-left: 3px solid var(--gold);
 padding: 10px 14px;
 margin: 12px 0;
 border-radius: 0 8px 8px 0;
 color: #fef08a;
 font-size: 13px;
}

.journal-fact-box {
 background: rgba(255, 255, 255, 0.06);
 border: 1px solid rgba(255, 255, 255, 0.15);
 border-radius: 10px;
 padding: 10px 14px;
 margin-top: 12px;
 font-size: 12.5px;
 color: #a7f3d0;
}

.journal-footer {
 margin-top: 24px;
 display: flex;
 justify-content: flex-end;
}

.journal-action-btn {
 background: linear-gradient(135deg, #27ae60, #1e8449);
 border: 1px solid var(--gold);
 border-radius: 25px;
 padding: 12px 28px;
 color: #fff;
 font-family: 'Cinzel', serif;
 font-size: 13px;
 font-weight: 700;
 letter-spacing: 1px;
 cursor: pointer;
 box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.journal-action-btn:hover {
 transform: translateY(-2px) scale(1.03);
 box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
}

/* ── MODALES DE INVENTARIO Y MINIJUEGOS ENEEI ── */
#precision-minigame-modal {
 position: absolute;
 inset: 0;
 background: rgba(0, 0, 0, 0.75);
 backdrop-filter: blur(8px);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 200;
 animation: fadeIn 0.3s ease;
}

.modal-card {
 background: linear-gradient(135deg, rgba(15, 25, 18, 0.95), rgba(5, 12, 8, 0.98));
 border: 2px solid var(--gold);
 border-radius: 16px;
 padding: 28px 32px;
 max-width: 480px;
 width: 90%;
 text-align: center;
 color: #fff;
 box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 51, 204, 0.3) inset;
}

.modal-card h3 {
 font-family: 'Cinzel', serif;
 font-size: 18px;
 color: var(--gold-light);
 margin-bottom: 12px;
}

.modal-card p {
 font-size: 13.5px;
 line-height: 1.5;
 color: #d1d5db;
 margin-bottom: 20px;
}

.drag-item-container {
 background: rgba(255, 255, 255, 0.08);
 border: 2px dashed var(--gold);
 border-radius: 12px;
 padding: 16px;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 10px;
 cursor: pointer;
 transition: transform 0.2s ease, background 0.2s ease;
}

.drag-item-container:hover {
 transform: scale(1.04);
 background: rgba(0, 51, 204, 0.15);
}

.cabin-icon-img {
 height: 64px;
 width: auto;
 object-fit: contain;
 filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

/* Barra del Minijuego de Precisión */
.meter-bar-container {
 width: 100%;
 height: 32px;
 background: #1e293b;
 border: 2px solid var(--gold);
 border-radius: 16px;
 position: relative;
 overflow: hidden;
 margin: 15px 0;
}

.meter-bar {
 width: 100%;
 height: 100%;
 position: relative;
}

.meter-zone-green {
 position: absolute;
 left: 42%;
 width: 16%;
 height: 100%;
 background: linear-gradient(to right, #22c55e, #16a34a);
 box-shadow: 0 0 10px #22c55e;
}

.meter-indicator {
 position: absolute;
 top: 0;
 width: 6px;
 height: 100%;
 background: #ef4444;
 box-shadow: 0 0 12px #ef4444;
 transform: translateX(-50%);
}

.debug-btn:hover {
 background: rgba(163, 230, 53, 0.2);
 border-color: #a3e635;
 color: #fff;
}

/* ============================================================
   RESPONSIVO ADAPTABLE — SIN SCROLL EN VENTANAS
   ============================================================ */

/* ── Canvas en landscape móvil: cubre toda la pantalla sin barras negras ── */
@media (max-height: 600px) and (orientation: landscape) {
 #game-canvas {
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  object-fit: cover !important;
  margin: 0 !important;
 }
}

/* ── Pantallas grandes 1280px+ ── */
@media (min-width: 1280px) {
 .game-popup-modal { width: min(560px, 42vw); }
}

/* ── Tablets 769-1024px ── */
@media (max-width: 1024px) and (min-width: 769px) {
 #hud-right-sidebar {
  width: clamp(190px, 23vw, 235px);
  padding: 10px;
  gap: 8px;
 }
 .game-popup-modal { width: min(480px, 54vw); }
 .left-center-news-popup {
  width: clamp(260px, 40vw, 400px);
  max-width: calc(100vw - clamp(200px, 25vw, 245px) - 20px);
 }
 .game-instruction-notification-wrapper {
  width: clamp(260px, 46vw, 480px);
  max-width: calc(100vw - clamp(200px, 25vw, 245px) - 20px);
 }
 .bottom-left-news-popup { width: 340px; }
}

/* ── Landscape Móvil: phones horizontales (exclusivo para dispositivos táctiles móviles) ── */
@media (pointer: coarse) and (max-height: 600px) and (orientation: landscape), (pointer: coarse) and (max-width: 900px) and (orientation: landscape) {

 /* Canvas */
 #game-canvas {
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  object-fit: cover !important;
  margin: 0 !important;
 }

 /* HUD Sidebar Esquina Superior Derecha - Compacto */
 #hud-right-sidebar {
  position: fixed !important;
  top: 4px !important;
  right: 4px !important;
  left: auto !important;
  bottom: auto !important;
  width: 105px !important;
  max-width: 22vw !important;
  padding: 3px 5px !important;
  gap: 2px !important;
  z-index: 99999 !important;
  box-shadow: 2px 2px 0 #0033CC !important;
  border: 2px solid #111 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
 }

 #hud-right-sidebar.beavers-released {
  width: auto !important;
  min-width: 80px !important;
  max-width: 105px !important;
  padding: 3px 4px !important;
 }

 .pill-label { font-size: 7px !important; }
 .pill-val { font-size: 8.5px !important; }
 .sidebar-game-title { font-size: 8px !important; line-height: 1.1 !important; }
 .sidebar-guide-box { padding: 2px 4px !important; margin-top: 1px !important; }
 .guide-title { font-size: 7px !important; margin-bottom: 1px !important; }
 .guide-step { font-size: 6.5px !important; line-height: 1.1 !important; }
 .sidebar-section-title { font-size: 7px !important; padding-bottom: 1px !important; margin-top: 1px !important; }

 #hud-controls-vertical { gap: 2px !important; margin-top: 1px !important; }
 #hud-controls-vertical .hud-speed-btn,
 .hud-speed-btn {
  height: 22px !important;
  font-size: 7.5px !important;
  padding: 1px 3px !important;
  border-width: 1.5px !important;
 }

 .pure-image-btn img,
 .central-beaver-btn-wrapper .pure-image-btn img {
  height: clamp(34px, 8vh, 46px) !important;
 }

 /* Panel ENEEI / Inventario (Cabaña, Cartel, Jaula) */
 #eneei-sidebar-panel {
  position: fixed !important;
  left: 4px !important;
  bottom: 4px !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 320px !important;
  z-index: 8000 !important;
  margin: 0 !important;
 }

 #eneei-sidebar-panel .sidebar-card {
  padding: 4px 6px !important;
  box-shadow: 2px 2px 0 #0033CC !important;
  border: 2px solid #111 !important;
  background: #ffffff !important;
 }

 #eneei-sidebar-panel .sidebar-header h4 { font-size: 8px !important; margin-bottom: 1px !important; }
 #eneei-sidebar-panel .sidebar-desc { font-size: 7px !important; margin-bottom: 2px !important; }
 #eneei-sidebar-panel .sidebar-items { display: flex !important; flex-direction: row !important; gap: 3px !important; }
 #eneei-sidebar-panel .sidebar-item { padding: 2px 3px !important; min-width: 50px !important; border: 1.5px solid #111 !important; }
 #eneei-sidebar-panel .sidebar-img { height: 22px !important; }
 #eneei-sidebar-panel .item-title { font-size: 6.5px !important; }
 #eneei-sidebar-panel .item-status { font-size: 6px !important; }

 /* Overlays Pantalla Completa */
 .centered-news-overlay,
 #tutorial-overlay,
 #arcade-leaderboard-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(5px) !important;
 }

 /* Modales de Noticias Periodísticas (Compactos y Centrados con Margen de Borde) */
 .left-center-news-popup {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(340px, 80vw) !important;
  max-width: 340px !important;
  max-height: 82vh !important;
  z-index: 9200 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
 }

 .game-instruction-notification-wrapper {
  position: fixed !important;
  top: max(8px, env(safe-area-inset-top)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(340px, 80vw) !important;
  z-index: 9500 !important;
 }

 /* Tarjetas Internas de Noticias / Tutorial */
 .game-popup-modal,
 .left-center-card,
 .editorial-card,
 .tutorial-box {
  width: 100% !important;
  max-width: 340px !important;
  max-height: 82vh !important;
  margin: auto !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
  border: 2.5px solid #111 !important;
  box-shadow: 4px 4px 0 #0033CC !important;
  background: #ffffff !important;
  color: #111111 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 12px !important;
 }

 .popup-modal-header { padding-bottom: 2px !important; margin-bottom: 3px !important; }
 .popup-category-stamp, .popup-year-badge { font-size: 7px !important; padding: 1px 3px !important; }
 .popup-modal-body { display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; min-height: 0 !important; overflow: hidden !important; }
 .popup-headline { font-size: clamp(10px, 2.2vw, 13px) !important; line-height: 1.2 !important; margin-bottom: 2px !important; }
 .popup-subhead { font-size: 8.5px !important; margin-bottom: 2px !important; }
 .popup-text-content { flex: 1 1 auto !important; min-height: 0 !important; max-height: 38vh !important; overflow-y: auto !important; padding-right: 3px !important; margin-bottom: 3px !important; }
 .popup-lead { font-size: 8.5px !important; line-height: 1.3 !important; }
 .popup-quote { font-size: 8px !important; padding: 3px 5px !important; margin: 2px 0 !important; }
 .popup-fact-box { font-size: 8px !important; padding: 2px 4px !important; margin-top: 2px !important; }

 .popup-footer { flex-shrink: 0 !important; margin-top: auto !important; padding-top: 3px !important; display: flex !important; justify-content: flex-end !important; }
 .popup-action-btn, .popup-start-btn, .start-game-btn-large {
  font-size: 9px !important;
  padding: 5px 8px !important;
  border-width: 2px !important;
  box-shadow: 2px 2px 0 #0033CC !important;
  min-height: 28px !important;
  width: 100% !important;
  box-sizing: border-box !important;
 }

 .score-table { font-size: 8.5px !important; }
 .score-row { padding: 3px 5px !important; }
 .initials-input { font-size: 14px !important; height: 32px !important; }

 /* ──────────────────────────────────────────────────────────
    VIDEO CAPTURA (captura-video-overlay)
    ────────────────────────────────────────────────────────── */
 #captura-video-overlay video {
  max-height: 82vh !important;
 }
 #btn-skip-captura-video {
  padding: 6px 14px !important;
  font-size: 9px !important;
  bottom: 12px !important;
  right: 12px !important;
 }
}

@media (hover: none) and (pointer: coarse) {
 .popup-action-btn,
 .sidebar-item,
 .malla-equip-box {
  min-height: 40px;
  touch-action: manipulation;
 }
}


/* ============================================================
   BRUTALIST GLOBAL OVERRIDES — Archivo + Space Mono + Square
   ============================================================ */

/* ── Tipografía: títulos → Archivo, texto → Space Mono ── */
h1, h2, h3, h4, h5, h6,
.popup-headline,
.news-title,
.tutorial-header h2,
.sidebar-game-title,
.sidebar-section-title,
.guide-title,
.sidebar-header h4,
.instruction-title,
.journal-headline,
.journal-section-title,
.fact-box-title,
.popup-category-stamp,
.popup-year-badge,
.news-badge,
.instruction-pill-badge,
.catcher-pill-badge {
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
}

body,
p, span, li, td, th, label, input, textarea, select,
.popup-lead,
.popup-subhead,
.popup-text-content,
.popup-quote,
.fact-box-body,
.news-text,
.news-footer,
.guide-step,
.tutorial-body p,
.tutorial-subtitle,
.sidebar-desc,
.instruction-text,
.instruction-subtitle,
.instruction-step-year,
.leaderboard-row,
.ins-item,
.reforest-instruction-text,
.catcher-step-tag,
.stat-lbl {
  font-family: 'Space Mono', monospace !important;
}

/* ── Botones: cuadrados, blancos, borde negro, sombra azul ── */
button,
.popup-action-btn,
.popup-start-btn,
.tutorial-start-btn,
.arcade-action-btn,
.restart-game-btn,
.btn-speed,
.btn-plant,
.btn-liberar,
.hud-btn,
.speed-toggle-btn,
.central-beaver-btn,
.start-game-btn-large,
.precision-submit-btn,
.initials-submit-btn,
.malla-deploy-btn,
.reforest-btn,
.dique-btn,
.debug-btn,
.arcade-leaderboard-btn {
  border-radius: 0 !important;
  background: #ffffff !important;
  border: 4px solid #111 !important;
  box-shadow: 6px 6px 0 #0033CC !important;
  color: #111 !important;
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-shadow: none !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

button:hover,
.popup-action-btn:hover,
.popup-start-btn:hover,
.tutorial-start-btn:hover,
.arcade-action-btn:hover,
.restart-game-btn:hover,
.btn-speed:hover,
.btn-plant:hover,
.btn-liberar:hover,
.hud-btn:hover,
.speed-toggle-btn:hover,
.central-beaver-btn:hover,
.start-game-btn-large:hover,
.malla-deploy-btn:hover,
.reforest-btn:hover,
.dique-btn:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 8px 8px 0 #0033CC !important;
  background: #f0f4ff !important;
}

button:active,
.popup-action-btn:active,
.popup-start-btn:active,
.tutorial-start-btn:active,
.arcade-action-btn:active,
.restart-game-btn:active,
.btn-speed:active,
.btn-liberar:active,
.hud-btn:active,
.speed-toggle-btn:active,
.central-beaver-btn:active,
.start-game-btn-large:active {
  transform: translate(4px, 4px) !important;
  box-shadow: 2px 2px 0 #0033CC !important;
}

/* ── Contenedores: sin bordes redondeados ── */
.game-popup-modal,
.sidebar-card,
.sidebar-guide-box,
.tutorial-box,
.news-card,
.journal-popup-window,
.game-instruction-notification-card,
.popup-fact-box,
.leaderboard-table-container,
#hud-right-sidebar,
#eneei-sidebar-panel .sidebar-card {
  border-radius: 0 !important;
}

/* ── Badges inline: cuadrados, fuente Archivo ── */

/* ============================================================
   BRUTALIST GLOBAL OVERRIDES — Archivo + Space Mono + Square
   ============================================================ */

/* ── Tipografía: títulos → Archivo, texto → Space Mono ── */
h1, h2, h3, h4, h5, h6,
.popup-headline,
.news-title,
.tutorial-header h2,
.sidebar-game-title,
.sidebar-section-title,
.guide-title,
.sidebar-header h4,
.instruction-title,
.journal-headline,
.journal-section-title,
.fact-box-title,
.popup-category-stamp,
.popup-year-badge,
.news-badge,
.instruction-pill-badge,
.catcher-pill-badge {
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
}

body,
p, span, li, td, th, label, input, textarea, select,
.popup-lead,
.popup-subhead,
.popup-text-content,
.popup-quote,
.fact-box-body,
.news-text,
.news-footer,
.guide-step,
.tutorial-body p,
.tutorial-subtitle,
.sidebar-desc,
.instruction-text,
.instruction-subtitle,
.instruction-step-year,
.leaderboard-row,
.ins-item,
.reforest-instruction-text,
.catcher-step-tag,
.stat-lbl {
  font-family: 'Space Mono', monospace !important;
}

/* ── Botones: cuadrados, blancos, borde negro, sombra azul ── */
button,
.popup-action-btn,
.popup-start-btn,
.tutorial-start-btn,
.arcade-action-btn,
.restart-game-btn,
.btn-speed,
.btn-plant,
.btn-liberar,
.hud-btn,
.speed-toggle-btn,
.central-beaver-btn,
.start-game-btn-large,
.precision-submit-btn,
.initials-submit-btn,
.malla-deploy-btn,
.reforest-btn,
.dique-btn,
.debug-btn,
.arcade-leaderboard-btn {
  border-radius: 0 !important;
  background: #ffffff !important;
  border: 4px solid #111 !important;
  box-shadow: 6px 6px 0 #0033CC !important;
  color: #111 !important;
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-shadow: none !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

button:hover,
.popup-action-btn:hover,
.popup-start-btn:hover,
.tutorial-start-btn:hover,
.arcade-action-btn:hover,
.restart-game-btn:hover,
.btn-speed:hover,
.btn-plant:hover,
.btn-liberar:hover,
.hud-btn:hover,
.speed-toggle-btn:hover,
.central-beaver-btn:hover,
.start-game-btn-large:hover,
.malla-deploy-btn:hover,
.reforest-btn:hover,
.dique-btn:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 8px 8px 0 #0033CC !important;
  background: #f0f4ff !important;
}

button:active,
.popup-action-btn:active,
.popup-start-btn:active,
.tutorial-start-btn:active,
.arcade-action-btn:active,
.restart-game-btn:active,
.btn-speed:active,
.btn-liberar:active,
.hud-btn:active,
.speed-toggle-btn:active,
.central-beaver-btn:active,
.start-game-btn-large:active {
  transform: translate(4px, 4px) !important;
  box-shadow: 2px 2px 0 #0033CC !important;
}

/* ── Contenedores: sin bordes redondeados ── */
.game-popup-modal,
.sidebar-card,
.sidebar-guide-box,
.tutorial-box,
.news-card,
.journal-popup-window,
.game-instruction-notification-card,
.popup-fact-box,
.leaderboard-table-container,
.arcade-theme-card,
.reforest-card,
#hud-right-sidebar,
#eneei-sidebar-panel .sidebar-card {
  border-radius: 0 !important;
}

/* ── Badges inline: cuadrados, fuente Archivo ── */
.news-badge,
.popup-category-stamp,
.popup-year-badge,
.instruction-pill-badge,
.catcher-pill-badge,
.reforest-step-tag {
  border-radius: 0 !important;
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
}

/* ============================================================
   PALETA ESTRICTA — Solo #ffffff / #111 / #0033CC
   Todas las ventanas, paneles y pastillas
   ============================================================ */

/* ── VENTANAS Y PANELES ── */
.game-popup-modal,
.game-popup-modal.theme-danger,
.game-popup-modal.theme-warning,
.game-popup-modal.theme-success,
.game-popup-modal.theme-info,
.game-popup-modal.bluish-theme,
.game-popup-modal.reddish-theme,
.tutorial-box,
.news-card,
.journal-popup-window,
.sidebar-guide-box,
.game-instruction-notification-card,
#hud-right-sidebar.beavers-released,
#eneei-sidebar-panel .sidebar-card,
.left-center-card,
.capture-gif-modal,
.leaderboard-table-container,
.popup-fact-box,
.tutorial-instructions,
.arcade-name-entry-box {
  background: #ffffff !important;
  border: 4px solid #111 !important;
  box-shadow: 4px 4px 0 #0033CC !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #111 !important;
}

/* ── POPUP MODALS INTERMEDIOS — fondo blanco plano ── */
.game-popup-modal,
.game-popup-modal.theme-danger,
.game-popup-modal.theme-warning,
.game-popup-modal.theme-success,
.game-popup-modal.theme-info,
.game-popup-modal.bluish-theme,
.game-popup-modal.reddish-theme,
.tutorial-box {
  background-color: #ffffff !important;
  background-image: none !important;
  border: 4px solid #111 !important;
  box-shadow: 4px 4px 0 #0033CC !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #111 !important;
}

/* ── FONDO CUADRICULADO — Solo inicio, final y sidebar ── */
.game-popup-modal.initial-start-modal,
.game-popup-modal.final-victory-modal,
#hud-right-sidebar {
  background-color: #f8f9ff !important;
  background-image:
    linear-gradient(rgba(0, 51, 204, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 204, 0.07) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
  border: 4px solid #111 !important;
  box-shadow: 4px 4px 0 #0033CC !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #111 !important;
}

/* ── OVERLAYS (fondo semitransparente detrás de modales) ── */
.centered-news-overlay,
.centered-news-overlay.theme-danger,
.centered-news-overlay.bluish-theme,
.centered-news-overlay.reddish-theme,
.centered-news-overlay.theme-warning,
.centered-news-overlay.theme-success,
.centered-news-overlay.theme-info,
.centered-news-overlay.theme-victory,
#tutorial-overlay,
.news-journal-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(6px) !important;
}

/* ── PASTILLAS / BADGES ── */
.popup-category-stamp,
.popup-year-badge,
.news-badge,
.instruction-pill-badge,
.catcher-pill-badge,
.reforest-step-tag,
.score-saved-badge,
.precision-feedback-lbl {
  background: #ffffff !important;
  border: 2px solid #111 !important;
  box-shadow: 3px 3px 0 #0033CC !important;
  color: #111 !important;
  border-radius: 0 !important;
  font-family: 'Archivo', sans-serif !important;
  font-weight: 800 !important;
}

/* ── SEPARADORES INTERNOS ── */
.popup-modal-header,
.sidebar-top-brand,
.sidebar-header,
.reforest-header {
  border-bottom: 2px solid #111 !important;
  border-color: #111 !important;
}

/* ── CITAS Y FACT BOXES ── */
.popup-quote,
.final-reflection-quote {
  background: #f0f4ff !important;
  border-left: 4px solid #0033CC !important;
  box-shadow: none !important;
  color: #0033CC !important;
  border-radius: 0 !important;
}

.popup-fact-box {
  background-color: #f8f9ff !important;
  background-image:
    linear-gradient(rgba(0, 51, 204, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 204, 0.12) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
  border: 2px solid #111 !important;
  box-shadow: 4px 4px 0 #0033CC !important;
}

.fact-box-title { color: #0033CC !important; }
.fact-box-body  { color: #111 !important; }

/* ── TEXTOS INTERNOS ── */
.popup-headline,
.news-title,
.instruction-title,
.guide-title,
.sidebar-game-title,
.sidebar-section-title,
.sidebar-header h4,
.tutorial-header h2 {
  color: #111 !important;
  text-shadow: none !important;
  text-transform: uppercase !important;
}

.popup-lead, .popup-text-content, .popup-subhead,
.guide-step, .news-text, .tutorial-body p,
.instruction-text, .sidebar-desc, .fact-box-body {
  color: #111 !important;
}

.popup-lead strong,
.tutorial-body strong,
.instruction-text strong {
  color: #0033CC !important;
}

/* ── FILAS DE TABLA ── */
.leaderboard-row {
  background: #ffffff !important;
  border: 2px solid #111 !important;
  box-shadow: none !important;
  color: #111 !important;
}

.leaderboard-row.player-row {
  background: #f0f4ff !important;
  border: 2px solid #0033CC !important;
  box-shadow: 3px 3px 0 #0033CC !important;
}

.rank-num   { color: #0033CC !important; }
.player-score { color: #0033CC !important; }

/* ── SCROLLBAR ── */
.game-popup-modal::-webkit-scrollbar-thumb {
  background: #0033CC !important;
}

/* ============================================================
   RESPONSIVO MÓVIL LANDSCAPE (Exclusivo para teléfonos táctiles en horizontal)
   Puesto al final del archivo para invalidar cualquier regla global en móviles.
   ============================================================ */
@media (pointer: coarse) and (max-height: 600px) and (orientation: landscape), (pointer: coarse) and (max-width: 900px) and (orientation: landscape) {

 /* Canvas */
 #game-canvas {
  width: 100vw !important;
  height: 100vh !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  object-fit: cover !important;
  margin: 0 !important;
 }

 /* HUD Sidebar Esquina Superior Derecha - Compacto */
 #hud-right-sidebar {
  position: fixed !important;
  top: 4px !important;
  right: 4px !important;
  left: auto !important;
  bottom: auto !important;
  width: 100px !important;
  max-width: 22vw !important;
  padding: 3px 4px !important;
  gap: 2px !important;
  z-index: 99999 !important;
  box-shadow: 2px 2px 0 #0033CC !important;
  border: 2px solid #111 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
 }

 #hud-right-sidebar.beavers-released {
  width: auto !important;
  min-width: 75px !important;
  max-width: 100px !important;
  padding: 2px 3px !important;
 }

 .pill-label { font-size: 6.5px !important; color: #111 !important; }
 .pill-val { font-size: 8px !important; color: #0033CC !important; }
 .sidebar-game-title { font-size: 7.5px !important; line-height: 1.1 !important; color: #111 !important; }
 .sidebar-guide-box { padding: 2px 3px !important; margin-top: 1px !important; background: #fff !important; }
 .guide-title { font-size: 6.5px !important; margin-bottom: 1px !important; color: #111 !important; }
 .guide-step { font-size: 6px !important; line-height: 1.1 !important; color: #333 !important; }
 .sidebar-section-title { font-size: 6.5px !important; padding-bottom: 1px !important; margin-top: 1px !important; color: #111 !important; }

 #hud-controls-vertical { gap: 2px !important; margin-top: 1px !important; }
 #hud-controls-vertical .hud-speed-btn,
 .hud-speed-btn {
  height: 20px !important;
  font-size: 7px !important;
  padding: 1px 3px !important;
  border-width: 1.5px !important;
 }

 .pure-image-btn img,
 .central-beaver-btn-wrapper .pure-image-btn img {
  height: clamp(32px, 8vh, 42px) !important;
 }

 /* Panel ENEEI / Inventario (Cabaña, Cartel, Jaula) */
 #eneei-sidebar-panel {
  position: fixed !important;
  left: 4px !important;
  bottom: 4px !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: 300px !important;
  z-index: 8000 !important;
  margin: 0 !important;
 }

 #eneei-sidebar-panel .sidebar-card {
  padding: 4px 6px !important;
  box-shadow: 2px 2px 0 #0033CC !important;
  border: 2px solid #111 !important;
  background: #ffffff !important;
 }

 #eneei-sidebar-panel .sidebar-header h4 { font-size: 7.5px !important; margin-bottom: 1px !important; color: #111 !important; }
 #eneei-sidebar-panel .sidebar-desc { font-size: 6.5px !important; margin-bottom: 2px !important; color: #333 !important; }
 #eneei-sidebar-panel .sidebar-items { display: flex !important; flex-direction: row !important; gap: 3px !important; }
 #eneei-sidebar-panel .sidebar-item { padding: 2px 3px !important; min-width: 48px !important; border: 1.5px solid #111 !important; }
 #eneei-sidebar-panel .sidebar-img { height: 20px !important; }
 #eneei-sidebar-panel .item-title { font-size: 6px !important; color: #111 !important; }
 #eneei-sidebar-panel .item-status { font-size: 5.5px !important; color: #0033CC !important; }

 /* Overlays Pantalla Completa */
 .centered-news-overlay,
 #tutorial-overlay,
 #arcade-leaderboard-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(5px) !important;
 }

 /* Modales de Noticias Periodísticas (Compactos) */
 .left-center-news-popup {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(360px, 86vw) !important;
  max-height: 90vh !important;
  z-index: 9200 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
 }

 .game-instruction-notification-wrapper {
  position: fixed !important;
  top: 4px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(360px, 86vw) !important;
  z-index: 9500 !important;
 }

 /* Tarjetas Internas de Noticias / Tutorial */
 .game-popup-modal,
 .left-center-card,
 .editorial-card,
 .tutorial-box {
  width: 100% !important;
  max-width: 360px !important;
  max-height: 88vh !important;
  margin: auto !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  border: 2.5px solid #111 !important;
  box-shadow: 3px 3px 0 #0033CC !important;
  background: #ffffff !important;
  color: #111111 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
 }

 .popup-modal-header { padding-bottom: 2px !important; margin-bottom: 3px !important; }
 .popup-category-stamp, .popup-year-badge { font-size: 7px !important; padding: 1px 3px !important; }

 /* ──────────────────────────────────────────────────────────
    MINIJUEGOS EN MÓVIL: Mantiene diseño arcade oscuro original con margen de bordes
    ────────────────────────────────────────────────────────── */
 #beaver-catcher-panel,
 #reforestation-minigame-panel,
 #precision-minigame-modal,
 .catcher-minigame-modal,
 .reforest-minigame-modal,
 .arcade-leaderboard-modal,
 .capture-gif-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(330px, 78vw) !important;
  max-width: 330px !important;
  max-height: 82vh !important;
  padding: 10px 12px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  z-index: 9700 !important;
  box-sizing: border-box !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.95), 0 0 25px rgba(16, 185, 129, 0.25) inset !important;
  background: linear-gradient(145deg, rgba(6, 32, 24, 0.98), rgba(12, 24, 18, 0.99)) !important;
  color: #ffffff !important;
  border-radius: 14px !important;
 }

 .arcade-theme-card, .catcher-card, .reforest-card {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #ffffff !important;
 }

 /* Beaver Catcher Minigame */
 #beaver-catcher-panel .sidebar-header h4,
 #reforestation-minigame-panel .sidebar-header h4 { font-size: 10px !important; color: #6ee7b7 !important; margin-bottom: 2px !important; text-transform: uppercase !important; }
 #beaver-catcher-panel .sidebar-desc,
 #beaver-catcher-panel .sidebar-desc *,
 #reforestation-minigame-panel .sidebar-desc,
 #reforestation-minigame-panel .sidebar-desc * { font-size: 8px !important; color: #e5e7eb !important; line-height: 1.2 !important; margin-bottom: 4px !important; }
 #beaver-catcher-panel .sidebar-desc strong { color: #34d399 !important; }
 .catcher-stats-grid { display: flex !important; gap: 6px !important; margin-bottom: 6px !important; justify-content: center !important; }
 .catcher-stat-box { flex: 1 !important; padding: 4px 6px !important; background: rgba(0,0,0,0.7) !important; border: 1px solid rgba(16,185,129,0.4) !important; border-radius: 6px !important; text-align: center !important; }
 .stat-lbl { font-size: 7px !important; color: #9ca3af !important; display: block !important; }
 .stat-val, .timer-val, .score-val { font-size: 13px !important; color: #34d399 !important; font-weight: 800 !important; font-family: 'Space Mono', monospace !important; }
 .precision-bar-box { margin-bottom: 6px !important; }
 .precision-bar-track { height: 22px !important; border-radius: 11px !important; background: rgba(0,0,0,0.8) !important; border: 1.5px solid #10b981 !important; position: relative !important; overflow: hidden !important; }
 .precision-feedback-lbl { font-size: 8px !important; margin-top: 2px !important; text-align: center !important; color: #a7f3d0 !important; }
  
 .arcade-action-btn, #btn-timing-catch {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 10px !important;
  padding: 4px 10px !important;
  margin-top: 6px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: 1px solid #6ee7b7 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
 }

 /* Reforestation Minigame */
 .reforest-canvas-container { height: 105px !important; margin-top: 4px !important; border-radius: 10px !important; border: 1.5px solid rgba(16, 185, 129, 0.6) !important; width: 100% !important; box-sizing: border-box !important; }
 #reforest-inner-canvas { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block !important; }
 .reforest-header { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 2px !important; }
 .reforest-header h4 { font-size: 9.5px !important; color: #a7f3d0 !important; margin: 0 !important; }
 .reforest-step-tag { font-size: 7px !important; padding: 1px 4px !important; background: rgba(16, 185, 129, 0.2) !important; border: 1px solid rgba(16, 185, 129, 0.5) !important; color: #a7f3d0 !important; border-radius: 4px !important; }
 .survival-status-box { margin-top: 4px !important; padding: 3px 6px !important; background: rgba(0,0,0,0.6) !important; border-radius: 6px !important; }
 .survival-info { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 2px !important; }
 .survival-pct { font-size: 11px !important; font-weight: 800 !important; color: #34d399 !important; }
 .survival-bar-track { height: 6px !important; background: rgba(255,255,255,0.15) !important; border-radius: 3px !important; }
 .reforest-controls-box { margin-top: 4px !important; }
 .reforest-instruction-text, .reforest-instruction-text * { color: #e5e7eb !important; font-size: 8.5px !important; line-height: 1.2 !important; margin-bottom: 4px !important; text-align: center !important; }
 .reforest-success-badge { font-size: 9px !important; padding: 4px 6px !important; margin-bottom: 4px !important; border-radius: 6px !important; text-align: center !important; }
 .malla-equip-box { padding: 4px 6px !important; margin-bottom: 4px !important; gap: 8px !important; border-radius: 8px !important; }
 .malla-equip-box img { height: 26px !important; }
 .malla-equip-box span { font-size: 8.5px !important; }

 .capture-gif-img { max-height: 38vh !important; width: 100% !important; object-fit: contain !important; }
 #captura-video-overlay video { max-height: 82vh !important; }
 #btn-skip-captura-video { padding: 5px 12px !important; font-size: 8.5px !important; bottom: 12px !important; right: 12px !important; background: #10b981 !important; color: #fff !important; }
}
