html { background: #031425 !important; }

:root {
    /* Luminous Arboretum v2 Core Tokens */
    --background: #031425;
    --bg-color: #031425;
    --primary: #51FF33;
    --on-primary: #031425;
    
    /* Dynamic Glass System */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Material 3 Tokens Restoration (v27.9.4) */
    --surface-container: #031425;
    --surface-container-low: #01080f;
    --surface-container-high: #051a2e;
    --surface-container-highest: #082a4a;
    --on-surface: #ffffff;
    --on-surface-variant: rgba(255, 255, 255, 0.7);
    --outline: rgba(255, 255, 255, 0.1);
    
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-data: 'Montserrat', sans-serif;
    
    /* Spacing & Radius */
    --spacing-xs: 4px;
    --spacing-s: 8px;
    --spacing-m: 16px;
    --spacing-l: 24px;
    --radius-card: 20px;
    --radius-pill: 100px;
    
    /* Semantic Colors */
    --success: #51FF33;
    --danger: #FF4757;
    --warning: #F1C40F;
    --neutral: rgba(255, 255, 255, 0.7);
    
    /* Z-Layers (Hardened v27.9.8) */
    --z-background: 10;
    --z-boot: 15;
    --z-base: 20;
    --z-hud: 200;
    --z-modal: 1000;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: #031425 !important;
    color: white;
    font-family: var(--font-data);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .kpi-label, .wealth-label {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- BOOTSTRAP DETERMINISTICO (v27.9.18) --- */
#boot-home-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-boot);
    background: radial-gradient(circle at center, rgba(3, 20, 37, 0.9) 0%, #031425 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#boot-home-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-content {
    text-align: center;
    color: var(--primary);
}

.boot-logo {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: bootPulse 1.5s infinite ease-in-out;
}

.boot-status {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.7;
}

@keyframes bootPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.main-game-container {
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
}

/* Background Animated Lines */
#background-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background) !important;
    background: transparent !important;
    pointer-events: none !important;
    overflow: hidden;
}

#background-lines::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(81, 255, 51, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(81, 255, 51, 0.03) 0%, transparent 40%);
    animation: backgroundGlow 20s infinite alternate;
}

@keyframes backgroundGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(10deg); }
}

.luminous-path-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    filter: blur(2px);
}

#luminous-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 1.5;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 12s linear infinite;
    stroke-linecap: round;
    opacity: 0.6;
}

@keyframes drawLine {
    0% { stroke-dashoffset: 1200; opacity: 0; }
    5% { opacity: 0.6; }
    95% { opacity: 0.6; }
    100% { stroke-dashoffset: -1200; opacity: 0; }
}

/* Base Layout Containers */
#game-wrapper {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100vw;
    overflow-x: hidden;
}

.main-game-container {
    flex: 1;
    display: flex;
    position: relative;
    width: 100%;
    overflow: hidden; /* Evitar scroll horizontal por desborde de HUD */
}

/* Beta 27.9.24: Estilos para la Planta en Grilla v2 */
.plant-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 12px;
    padding: 15px;
    animation: plantAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plant-img {
    max-width: 85%;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.plant-container:hover .plant-img {
    transform: scale(1.1) rotate(2deg);
}

.plant-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plant-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--neutral);
    letter-spacing: 1px;
}

.plant-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

@keyframes plantAppear {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- HUD v2 GLASSMORPHIC SYSTEM --- */
.kpi-glass-v2, .kpi-glass-t, .kpi-glass-m {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-card);
    padding: var(--spacing-m);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    border: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.kpi-glass-v2:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.kpi-label {
    font-family: var(--font-heading) !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--neutral);
    opacity: 0.8;
}

.kpi-value {
    font-family: var(--font-heading) !important;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.kpi-timestamp {
    font-family: var(--font-heading) !important;
    font-size: 9px;
    color: var(--neutral);
    opacity: 0.6;
}

/* --- SVG PROGRESS RINGS --- */
.wealth-ring-container-v2, .wealth-ring-t, .wealth-ring-mini {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-chart-v2, .circular-chart-t, .circular-chart {
    width: 140px;
    height: 140px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.wealth-info-v2, .wealth-info-t {
    position: absolute;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.wealth-label {
    font-size: 9px;
    color: var(--neutral);
}

.wealth-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
}

/* Desktop Sidebar Layout */
.sidebar-v2 {
    width: 280px;
    height: 100vh;
    padding: var(--spacing-l);
    background: rgba(3, 20, 37, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
    z-index: var(--z-hud);
}

.sidebar-actions-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.kpi-list-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
    flex: 1;
}

/* Grid & Responsive Adjustments */
.grid-luminous {
    display: grid;
    gap: var(--spacing-m);
    padding: var(--spacing-l);
    align-content: start;
}

.grid-4xN { grid-template-columns: repeat(4, 1fr); }

.sidebar-actions-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Separación aumentada según pedido */
    width: 100%;
    margin-top: 15px;
}

.centered-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    max-width: 800px;
}
.grid-3xN { grid-template-columns: repeat(3, 1fr); }
.grid-2xN { grid-template-columns: repeat(2, 1fr); }








/* Centrado exacto de los últimos 2 lotes (7 y 8) en grilla de 12 */
.grid-3-3-2 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-m);
}

.grid-3-3-2 > .plot-slot {
    grid-column: span 4;
}

.grid-3-3-2 > .plot-slot:nth-child(7) {
    grid-column: 3 / span 4;
}

.grid-3-3-2 > .plot-slot:nth-child(8) {
    grid-column: 7 / span 4;
}

/* Plot Slots v2 (Punto 3) */
.plot-slot {
    aspect-ratio: 1 / 1;
    height: auto !important;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible; /* Fix: No cortar plantas */
    position: relative;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plot-slot:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.plot-slot.empty {
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.plot-slot .btn-plantar {
    background: var(--primary);
    color: var(--on-primary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    white-space: nowrap; /* Punto 3 Fix */
    box-shadow: 0 4px 15px rgba(81, 255, 51, 0.3);
}

.plant-label {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

/* Tablet Layout v2 */
.hud-tablet-v2 {
    width: 100%;
    padding: var(--spacing-m);
    background: rgba(3, 20, 37, 0.9);
    border-bottom: 1px solid var(--glass-border);
}

.kpi-row-tablet {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    overflow-x: auto;
}

/* --- HUD MOBILE STACK (Punto 5) --- */
@media (max-width: 600px) {
    .main-game-container {
        flex-direction: column !important;
        align-items: center;
        gap: var(--spacing-m);
        padding: 0 10px;
    }
    
    .hud-mobile-v2 {
        width: 100%;
        order: 1;
    }
    
    .grid-luminous {
        order: 2;
        padding: 10px;
        width: 100%;
    }
    
    .btn-massive-action {
        order: 3;
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }

    .zucho-container {
        transform: scale(0.6);
        bottom: 80px !important;
        right: 10px !important;
    }
}

/* --- UI COMPONENTS RESTORATION --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
    padding: var(--spacing-l);
    border: none;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Duplicate body rule removed for Luminous Hardening */

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px 25px; /* Slight compact */
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
}

.hud-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--bioma-color);
    text-transform: uppercase;
}

.stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95em;
}

.stats p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

#biome-clima {
    font-weight: bold;
    color: var(--bioma-color);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 15px;
    margin-right: 15px;
}

.dashboard {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: stretch; /* Unifica alturas */
}

.card {
    flex: 1;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px; /* Asegura proporción con el barril */
}

.card h2 {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.card p {
    font-size: 1.8em;
    font-weight: bold;
    margin: 10px 0 0;
    color: var(--bioma-color);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--bioma-color);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

/* --- MENU PREMIUM v2.1 --- */
.glass-card-premium {
    background: rgba(3, 20, 37, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(81, 255, 51, 0.2);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(81, 255, 51, 0.05);
    text-align: center;
    position: relative;
    max-width: 380px;
    width: 90%;
}

.menu-title-luminous {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(81, 255, 51, 0.4);
}

.menu-actions-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-action-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 18px;
    border-radius: 15px;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.menu-action-item:hover {
    background: rgba(81, 255, 51, 0.1);
    border-color: var(--primary);
    transform: translateX(5px);
}

.menu-action-item.danger-action:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--neutral);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- MODO PRO ESTETICA (Punto 4) --- */
.expert-dashboard-full.pro-active {
    background-image: 
        linear-gradient(rgba(81, 255, 51, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(81, 255, 51, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 30px rgba(81, 255, 51, 0.1);
}

.pro-active .tech-chart {
    filter: contrast(1.2) brightness(1.1);
    border-color: var(--primary) !important;
}

/* Visibilidad de capas técnicas (Punto 4) */
.pro-only {
    display: none !important;
}

.pro-active .pro-only {
    display: block !important;
}

.pro-active .pro-only.hidden {
    display: none !important; /* Si el motor JS lo oculta por otra razón */
}

.market-item, .portfolio-item {
    background: rgba(40, 44, 52, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.market-item:hover {
    transform: translateY(-5px);
    border-color: rgba(46, 204, 113, 0.5);
    box-shadow: 0 8px 15px rgba(46, 204, 113, 0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-buy {
    background: var(--bioma-color);
    border: none;
    color: #1a1a2e;
    padding: 8px 15px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.2s;
}

/* Esconder fechas de input numérico en Laboratorio */
.trans-input::-webkit-inner-spin-button,
.trans-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.trans-input {
    -moz-appearance: textfield;
}

.btn-lab-convert {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.btn-buy:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.btn-buy:active {
    transform: scale(0.98);
}

.plant-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}

.plant-img {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

/* Estados de crecimiento (Auditoría Punto 8) */
.plot-growing .plant-img {
    transform: scale(0.7);
    opacity: 0.8;
}

.plot-ready .plant-img {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(81, 255, 51, 0.3));
}

.plot-ready::after {
    content: 'LISTO';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #51FF33;
    color: #031425;
    font-size: 0.6em;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    animation: flashReady 2s infinite;
}

@keyframes flashReady {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--bioma-color);
    color: #1a1a2e;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    min-width: 320px;
    max-width: 450px;
    border: 1px solid var(--bioma-color);
}

.modal-danger {
    border: 2px solid #ff4757;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* --- Modal Quiz (Beta 11.3) --- */
.modal-quiz {
    border: 2px solid var(--accent);
}

.quiz-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    text-align: left;
    transition: all 0.2s;
    line-height: 1.3;
}

.quiz-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.quiz-btn.correct {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.quiz-btn.wrong {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    color: #ff4757;
    opacity: 0.7;
}

.fertilizer-glow {
    animation: goldGlow 1s ease-in-out alternate infinite;
    color: #f1c40f;
    font-weight: bold;
}

@keyframes goldGlow {
    from { text-shadow: 0 0 5px #f1c40f; }
    to { text-shadow: 0 0 15px #f1c40f, 0 0 20px #f1c40f; }
}

.fertilizer-hud.hidden { display: none; }

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-main {
    font-size: 2.5em;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #fff, var(--bioma-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.btn-age {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-age:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px);
    border-color: var(--bioma-color);
}

.age-badge {
    background: var(--bioma-color, #2ecc71);
    color: #000;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75em;
    font-weight: 800;
    position: absolute;
    top: 15px;
    right: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.tutorial-banner {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--bioma-color);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.guide-icon {
    font-size: 1.25em;
    background: var(--bioma-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000;
}

.info-item span {
    display: block;
    font-size: 0.7em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 3px;
}

.info-item p {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
    color: var(--bioma-color);
}

.modal-desc-text {
    line-height: 1.5;
    font-size: 0.9em;
    opacity: 0.9;
}

hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 15px 0;
}

/* Progress Bars */
.bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--bioma-color);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--bioma-color);
}

/* Animations */
@keyframes flash-red {
    0% { color: var(--text-main); }
    50% { color: var(--red); transform: scale(1.1); }
    100% { color: var(--text-main); }
}

.flash-red-aggressive {
    animation: pulse-red 0.8s infinite alternate;
    color: #ff4d4d !important;
    font-weight: bold;
}

@keyframes pulse-red {
    from { text-shadow: 0 0 5px rgba(255, 77, 77, 0.4); }
    to { text-shadow: 0 0 15px rgba(255, 77, 77, 1), 0 0 30px rgba(255, 77, 77, 0.5); }
}

.benchmark-container {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid var(--bioma-color);
}

.flash-red {
    animation: flash-red 0.8s ease;
}

.market-item.locked {
    opacity: 0.6;
    filter: grayscale(0.8);
}

:root {
    --bioma-color: #2ecc71;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #f5f6fa;
    --green: #2ecc71;
    --red: #ff4757;
    --bioma-color-rgb: 46, 204, 113;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
    margin-right: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-back:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--bioma-color);
}

.market-item.locked {
    filter: grayscale(0.8) opacity(0.5);
    background: rgba(255,255,255,0.02);
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.05) !important;
    pointer-events: none; /* Disable all interactions including hover effects defined elsewhere */
}

.market-item.locked .btn-buy,
.market-item.locked .lock-icon {
    pointer-events: auto; /* Allow clicking the analyze button and seeing tooltip */
}

.market-item.locked:hover {
    transform: none;
    box-shadow: none;
}

button.disabled {
    background: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    filter: none !important;
    transform: none !important;
    opacity: 0.6;
}

.lock-icon {
    font-size: 0.8em;
    position: absolute;
    top: 5px; right: 5px;
}

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

.asset-ticker {
    font-size: 0.7em;
    background: rgba(255,255,255,0.1);
    padding: 2px 5px;
    border-radius: 3px;
    opacity: 0.6;
}

.market-stats-brief {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    margin: 10px 0 5px 0;
    opacity: 0.9;
}

.risk-badge {
    font-size: 0.6em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
}

.risk-low { background: #2ecc71; color: #000; }
.risk-medium { background: #f1c40f; color: #000; }
.risk-high { background: #e74c3c; color: #fff; }

.time-scale {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-bottom: 15px;
    overflow: hidden;
}

.time-scale-fill {
    height: 100%;
    background: var(--bioma-color);
    opacity: 0.7;
}

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

/* Mission Card */
.mission-card {
    background: linear-gradient(90deg, var(--card-bg), rgba(233, 69, 96, 0.1));
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--bioma-color);
    margin-bottom: 25px;
}

.mission-card h4 {
    margin: 0;
    color: var(--bioma-color);
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
}

.mission-card p {
    margin: 5px 0 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Nursery Grid */
.nursery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px; /* Increased gap */
    width: 100%;
}

.plot {
    width: 100%;
    min-height: 280px;
    aspect-ratio: 1 / 1.1;
    display: flex;
    flex-direction: column;
}

.plot-slot {
    width: 100%;
    height: 100%;
    min-height: 280px;
    aspect-ratio: 1 / 1.1;
    display: flex;
    flex-direction: column;
}


.plot:hover {
    border-color: var(--bioma-color);
    background: rgba(var(--bioma-color-rgb), 0.05);
    transform: translateY(-2px);
}

.plot-card {
    width: 100%;
    height: 100%;
    background: rgba(26, 30, 40, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.plot-card.eroding-plot {
    border-color: rgba(255, 71, 87, 0.4);
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.1);
}

.plot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    height: 100%;
    padding: 20px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.plantar-text {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--green);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: pulsePlantar 2s infinite ease-in-out;
}

@keyframes pulsePlantar {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

.empty-icon {
    font-size: 2.5em;
    margin-bottom: 5px;
    opacity: 0.7;
}

.plant-emoji {
    font-size: 3em;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--bioma-color));
}

.plant-details {
    margin-bottom: 10px;
}

.plant-name {
    display: block;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    color: var(--bioma-color);
}

.plant-ticker {
    font-size: 0.7em;
    opacity: 0.6;
}

.plant-value {
    display: block;
    font-size: 1.2em;
    font-weight: 700;
    margin: 5px 0;
}

.maturity-wrap {
    width: 100%;
    margin-bottom: 15px;
}

.maturity-bar-container {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.maturity-bar-fill {
    height: 100%;
    background: #95a5a6;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.maturity-bar-fill.mature {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

/* Marketplace Redesign (Auditoría Beta 27.0) */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px;
}

/* Grid 3-3-2 Centered (IP 8.1) */
.grid-3-3-2 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-3-3-2 > .plot-slot {
    grid-column: span 2;
}

.grid-3-3-2 > .plot-slot:nth-child(7) {
    grid-column: 2 / span 2;
}

.grid-3-3-2 > .plot-slot:nth-child(8) {
    grid-column: 4 / span 2;
}


.species-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: var(--spacing-l);
    display: flex;
    flex-direction: column;
    min-height: 520px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--glass-shadow);
}

.species-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.card-inner-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: var(--spacing-m);
}

.species-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.species-img-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-s);
}

.species-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.species-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-s);
    width: 100%;
}

.species-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-s);
    width: 100%;
    margin-top: auto;
}

.btn-plant-action.locked {
    opacity: 0.3;
    filter: grayscale(1);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.species-stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item-glass {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-val {
    display: block;
    font-weight: 800;
    color: var(--primary-fixed-dim);
}

.stat-label {
    font-size: 0.8em;
    opacity: 0.6;
    text-transform: uppercase;
}

.btn-ghost-luminous {
    background: rgba(255, 255, 255, 0.05); /* Sutil glass base */
    border: 2px solid var(--bioma-color); /* Color de bioma coherente */
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: technical-pulse 2.5s infinite ease-in-out; /* Latido educativo */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-ghost-luminous:hover {
    background: var(--bioma-color);
    color: #031425;
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--bioma-color);
    animation-play-state: paused; /* Pausar latido al interactuar */
}

.btn-plant-action {
    background: #2ecc71; /* Verde Lalo */
    color: #031425;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-plant-action:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}
.btn-sell {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sell:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.btn-mature {
    background: var(--green) !important;
    color: #000 !important;
    border: none !important;
}

.btn-mature:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.plot .maturation-tag {
    position: absolute;
    bottom: -5px;
    font-size: 0.6em;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-color);
    border: 1px solid var(--bioma-color);
}

.stat-box {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-label {
    display: block;
    font-size: 0.7em;
    opacity: 0.6;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    font-weight: bold;
    color: var(--bioma-color);
}

.benchmark-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    border-left: 3px solid var(--bioma-color);
    font-size: 0.9em;
}

.hidden { 
    display: none !important; 
    pointer-events: none !important; 
    visibility: hidden !important; 
}

/* Feedback Toast */
.buy-feedback-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: #000;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 800;
    z-index: 5000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    animation: slide-up-fade 3.5s forwards;
    pointer-events: auto; /* Enable interaction for [X] button */
}

.buy-feedback-toast.toast-error {
    background: var(--red);
    color: #fff;
    animation: slide-up-only 0.5s forwards; /* Error stays until timeout or manual close */
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

@keyframes slide-up-only {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slide-up-fade {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

.pulse-highlight {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { border-color: rgba(255,255,255,0.1); box-shadow: 0 0 0 0 rgba(var(--bioma-color-rgb), 0); }
    50% { border-color: var(--bioma-color); box-shadow: 0 0 15px 2px rgba(var(--bioma-color-rgb), 0.3); }
    100% { border-color: rgba(255,255,255,0.1); box-shadow: 0 0 0 0 rgba(var(--bioma-color-rgb), 0); }
}

/* Lock overlay removed in v3.0 */

/* Overlay selection */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Crucial for scrollable flex content visibility */
    text-align: center;
    padding: 60px 20px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.age-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
    align-items: center;
}

.level-selection-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.btn-age-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    width: 100%;
}

.btn-age-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--bioma-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.onboarding-step {
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

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

/* Older input-age style cleanup (removing it if not used) */
.input-age {
    display: none;
}

.overlay-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center; /* Asegura que todos los hijos se centren */
    text-align: center;
}

.overlay-footer {
    position: relative;
    margin-top: 60px; /* More space */
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    font-size: 0.8em;
    opacity: 0.6;
    color: rgba(255,255,255,0.7);
    z-index: 10001;
    padding-bottom: 40px;
    flex-shrink: 0; /* Don't collapse */
}

.btn-age {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 20px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-age:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-5px);
    border-color: var(--text-color);
}

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

.difficulty {
    font-size: 0.8em;
    color: var(--text-color);
    letter-spacing: 2px;
}

.age-desc {
    font-size: 0.9em;
    opacity: 0.7;
}

.age-mechanics {
    font-size: 0.8em;
    color: var(--green);
    background: rgba(46, 204, 113, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    align-self: flex-start;
}

/* --- Bioma Selection Grid 2x2 --- */
#age-options.grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 30px auto;
}

/* Beta 27.2: Resume Session Panel (Frosted Glass - Luminous Arboretum) */
.resume-panel {
    background: rgba(3, 20, 37, 0.7);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(81, 255, 51, 0.4);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101000; /* Above all onboarding */
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 100px rgba(81, 255, 51, 0.1);
    animation: resumeEntrance 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes resumeEntrance {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); filter: blur(10px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

.resume-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--primary));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.resume-content h4 {
    color: var(--primary);
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.resume-content p {
    color: var(--neutral);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.resume-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-resume {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-resume:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(81, 255, 51, 0.6);
}

.btn-forget {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-forget:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Bioma Guide Box --- */
.bioma-guide-box {
    margin-top: 40px;
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bioma-guide-box h3 {
    margin-bottom: 15px;
    color: var(--bioma-color);
    font-size: 1.25em;
    font-weight: 700;
}

.bioma-guide-box p {
    font-size: 0.95em;
    line-height: 1.6;
    opacity: 0.95;
    color: #ffffff;
}

@media (max-width: 768px) {
    #age-options.grid {
        grid-template-columns: 1fr;
    }
    .bioma-guide-box {
        margin: 20px;
    }
}

/* --- Tutorial Beta 3.6 --- */
.step-disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.guide-highlight {
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.8), 0 0 20px var(--bioma-color) !important;
    z-index: 1001 !important; /* Above static content (100) but below modal (2000) */
    animation: pulse-guide 1.5s infinite;
}

@keyframes pulse-guide {
    0% { outline: 0px solid var(--bioma-color); }
    50% { outline: 15px solid rgba(var(--bioma-color-rgb), 0.3); }
    100% { outline: 0px solid var(--bioma-color); }
}

/* --- Responsive Adaptations (Mobile Beta 5.1) --- */

@media (max-width: 600px) {
    body {
        padding: 10px;
        padding-bottom: 50px; /* Safety margin for mobile browser bars */
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding-bottom: 20px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center; /* Force center alignment in mobile */
    }

    #biome-clima {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-right: 0;
        padding-bottom: 5px;
        margin-right: 0;
        width: 100%;
    }

    .dashboard {
        flex-direction: column;
    }

    .card {
        padding: 15px;
    }

    .card p {
        font-size: 1.5em;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nursery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .plot {
        min-height: auto;
    }

    .modal-content {
        width: 95%;
        min-width: unset;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }

    .logo-main {
        font-size: 1.8em;
    }

    .overlay-content {
        padding: 20px;
        width: 95%;
    }

    .bioma-guide-box {
        padding: 15px;
        font-size: 0.85em;
    }

    /* Adjust toasts for mobile */
    .achievement-toast {
        width: 280px;
        padding: 10px;
    }

    .buy-feedback-toast {
        width: 90%;
        bottom: 80px; /* Above Next Turn button */
        font-size: 0.9em;
    }

    /* Compact Market for Mobile */
    .market-item {
        padding: 15px;
    }
    
    .market-stats {
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .market-stats .stat {
        font-size: 0.85em;
    }

    footer {
        padding-bottom: 60px; /* Even more safety margin */
    }
}

/* Scroll To Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--bioma-color);
    color: var(--bioma-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Projection Slider Card */
.projection-slider-card {
    background: rgba(var(--bioma-color-rgb), 0.05);
    border: 1px solid rgba(var(--bioma-color-rgb), 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.slider-control {
    margin: 20px 0;
}

.slider-control input[type=range] {
    width: 100%;
    margin-bottom: 10px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    opacity: 0.6;
}

#projection-label {
    color: var(--bioma-color);
    font-weight: bold;
    opacity: 1;
}

.projection-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.summary-box {
    flex: 1;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.summary-box span {
    display: block;
    font-size: 0.75em;
    opacity: 0.6;
    text-transform: uppercase;
}

.summary-box /* Drag & Drop Beta 23.0 */
.tactile-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.draggable-rain {
    background: rgba(var(--bioma-color-rgb), 0.2);
    border: 1px solid var(--bioma-color);
    padding: 15px 30px;
    border-radius: 50px;
    cursor: grab;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(var(--bioma-color-rgb), 0.3);
    transition: transform 0.2s, background 0.2s;
    user-select: none;
}

.draggable-rain:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.sell-drop-zone {
    margin-top: 30px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.sell-drop-zone.drag-over {
    border-color: var(--bioma-color);
    background: rgba(var(--bioma-color-rgb), 0.1);
    transform: scale(1.02);
}

.sell-drop-zone .zone-icon {
    font-size: 2em;
    margin-bottom: 10px;
    opacity: 0.5;
}

.sell-drop-zone .zone-text {
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 2px;
    opacity: 0.5;
}

.plot-slot.drag-over {
    background: rgba(var(--bioma-color-rgb), 0.1);
    border-color: var(--bioma-color);
    transition: all 0.2s;
}

.plot-slot.occupied {
    cursor: grab;
}

.plot-slot.occupied:active {
    cursor: grabbing;
}

/* Nutrient Silo Vivero View */
.nutrient-silo {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    background: rgba(var(--blue-rgb), 0.1);
    border-color: var(--blue);
}

.silo-icon { font-size: 1.2em; }
.silo-value { font-weight: 800; font-size: 1.1em; color: var(--blue); }
.silo-label { font-size: 0.7em; opacity: 0.6; font-weight: bold; }

.summary-box.highlight {
    border: 1px solid var(--bioma-color);
    box-shadow: 0 0 15px rgba(var(--bioma-color-rgb), 0.2);
}

.projection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.projection-item {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.projection-item span {
    font-size: 1.5em;
    display: block;
}

.projection-item small {
    display: block;
    font-size: 0.7em;
    opacity: 0.6;
    margin: 4px 0;
}

.projection-item strong {
    font-size: 1em;
    color: var(--bioma-color);
}

/* Tooltip System */
.tooltip-trigger {
    border-bottom: 1px dashed var(--bioma-color);
    cursor: help;
    position: relative;
    display: inline-block;
}

.tooltip-box {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(20, 30, 48, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bioma-color);
    border-radius: 12px;
    padding: 12px 15px;
    width: 240px;
    font-size: 0.85em;
    line-height: 1.4;
    color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--bioma-color) transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-box {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .tooltip-box {
        width: 180px;
        left: auto;
        right: 0;
        transform: translateY(10px);
    }
    .tooltip-trigger:hover .tooltip-box {
        transform: translateY(0);
    }
    .tooltip-box::after {
        left: auto;
        right: 20px;
    }
}

/* Bioma 2 - Beta 8.0 Specifics */
.bar-container {
    position: relative;
}

.shadow-marker {
    position: absolute;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    z-index: 5;
    transition: left 0.5s ease;
}

.shadow-label {
    position: absolute;
    top: -20px;
    font-size: 0.65em;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    transform: translateX(-50%);
}

.real-rate-hud {
    background: rgba(0,0,0,0.3);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85em;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.real-rate-positive { color: var(--green); }
.real-rate-negative { color: var(--red); }

/* Accrual (Abono) mechanics */
.accrual-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #f1c40f;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: bounce 2s infinite;
}

.btn-accrue {
    background: #f1c40f !important;
    border: none !important;
    color: #000 !important;
    font-weight: 800 !important;
    margin-top: 5px;
    padding: 8px !important;
    font-size: 0.75em !important;
}

.btn-accrue:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.accrual-particle {
    position: fixed;
    pointer-events: none;
    z-index: 15000;
    animation: growAndFade 1s ease-out forwards;
}

@keyframes growAndFade {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}
/* Custom Confirm Modal */
.confirm-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30000;
    animation: fadeIn 0.3s ease;
}

.confirm-modal-content {
    background: var(--card-bg);
    border: 2px solid var(--red);
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.3);
}

.confirm-modal-content h4 {
    margin-top: 0;
    color: var(--red);
    font-size: 1.4em;
    text-transform: uppercase;
}

.confirm-modal-content p {
    margin: 20px 0;
    line-height: 1.5;
    opacity: 0.9;
}

.confirm-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-confirm-yes {
    background: var(--red);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-confirm-no {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-confirm-yes:hover, .btn-confirm-no:hover {
    transform: scale(1.05);
}

/* Bioma Intro Modal */
#bioma-intro-modal {
    z-index: 25000;
}

.bioma-intro-content {
    background: var(--card-bg);
    border: 2px solid var(--bioma-color, #2ecc71);
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bioma-intro-content h2 {
    color: var(--bioma-color, #2ecc71);
    margin: 0;
    font-size: 2em;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.intro-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.intro-section.highlight-section {
    background: rgba(46, 204, 113, 0.1);
    border: 1px dashed var(--bioma-color, #2ecc71);
}

.intro-icon {
    font-size: 1.8em;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.intro-section h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1em;
}

.intro-section p {
    margin: 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

.btn-start-bioma {
    background: var(--bioma-color, #2ecc71);
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    margin-top: 10px;
}

.btn-start-bioma:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Controles de Audio */
.btn-sound {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.btn-sound:hover {
    transform: scale(1.1);
}

/* --- Beta 11.4: Dashboard Final (Golpe de Realidad) --- */
.modal-report {
    background: linear-gradient(135deg, #1A1C29 0%, #0F1016 100%);
    border: 1px solid #3d4b66;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.05);
}

#report-title {
    text-align: center;
    color: #fff;
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.report-verdict-box {
    background: rgba(255,255,255,0.03);
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 4px 8px 8px 4px;
    margin-bottom: 25px;
}

.verdict-text {
    font-size: 1.05em;
    line-height: 1.5;
    margin: 0;
    color: #e2e8f0;
}

/* La Curva de la Verdad (Bar Chart) */
.report-chart-container {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.truth-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-bar-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chart-label {
    width: 120px;
    font-size: 0.9em;
    font-weight: 600;
    color: #a0aec0;
    text-align: right;
}

.chart-bar {
    flex: 1;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.chart-fill {
    height: 100%;
    background: #2ecc71; /* Verde base para Nominal */
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.real-bar .chart-fill {
    background: #3498db; /* Azul base para Real */
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.chart-loss {
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(231, 76, 60, 0.2),
        rgba(231, 76, 60, 0.2) 10px,
        rgba(231, 76, 60, 0.4) 10px,
        rgba(231, 76, 60, 0.4) 20px
    );
    border-left: 2px dashed #e74c3c;
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.chart-value {
    width: 80px;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.1em;
}

/* KPI Grid */
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Zucho Lab Carousel (Beta 27.0) */
.zucho-lab-carousel {
    margin-top: 30px;
    background: rgba(var(--primary-fixed-dim-rgb), 0.05);
    border: 1px solid rgba(var(--primary-fixed-dim-rgb), 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.carousel-header {
    background: rgba(0,0,0,0.2);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75em;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-fixed-dim);
}

.carousel-nav {
    display: flex;
    gap: 8px;
}

.carousel-nav button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-nav button:hover {
    background: var(--primary-fixed-dim);
    color: #000;
}

.carousel-body {
    padding: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--on-surface-variant);
}

/* Lab Cards Enhancements */
.lab-card {
    background: var(--surface-container-low);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--outline-variant);
    transition: transform 0.3s ease;
}

.lab-card:hover {
    transform: scale(1.02);
    border-color: var(--primary-fixed-dim);
}

.kpi-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08);
}

.kpi-title {
    font-size: 0.8em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 1.5em;
    font-family: monospace;
    font-weight: 800;
    color: #fff;
}

/* Sistema de Partículas (Glitters) */
.glitter-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--bioma-color, gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    box-shadow: 0 0 10px var(--bioma-color, gold), 0 0 20px #fff;
    animation: glitterAnim 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes glitterAnim {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* Modificadores para el botón Mutante (Cosechar Frutos) */
.btn-harvest-mutant {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
    color: #000 !important;
    font-size: 1.1em !important;
    font-weight: 900 !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.6) !important;
    animation: pulseHarvestBtn 1.5s infinite alternate;
}

@keyframes pulseHarvestBtn {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(241, 196, 15, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 0 30px rgba(241, 196, 15, 0.8); border-color: #f1c40f; }
}

/* --- Panel de Noticias (Beta 11.0) --- */
.news-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 25000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeInModal 0.3s ease-out;
}

.news-panel-content {
    background: rgba(20, 30, 48, 0.98);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    text-align: center;
    position: relative;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.news-title {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 1.1em;
    font-weight: 700;
}

#news-content {
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #e0e0e0;
}

.btn-news-ack {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-news-ack:hover {
    background: var(--accent);
    color: #000;
}

/* Estado deshabilitado para btn-primary (v27.9.19) */
.btn-primary:disabled {
    background: #082847 !important;
    color: rgba(255, 255, 255, 0.2) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.identity-error {
    color: #ff4757;
    font-size: 0.75rem;
    margin: 5px 0 0 5px;
    font-weight: 500;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.identity-error.hidden {
    display: none !important;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cancel:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}


/* Zucho NPC Styles */
#zucho-avatar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: auto;
    height: auto;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
    opacity: 1 !important;
}

.zucho-bubble {
    background: var(--surface-container-high);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--on-surface);
    padding: 12px 16px;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--outline);
    font-size: 0.95em;
    font-weight: 500;
    max-width: 280px;
    box-shadow: var(--shadow-deep);
    margin-bottom: 12px;
    position: relative;
    pointer-events: auto;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bubble-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.zucho-label {
    font-size: 0.65em;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary-fixed-dim);
}

.btn-minimize-zucho {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0.8;
    transition: all 0.2s;
    pointer-events: auto;
}

.btn-minimize-zucho:hover {
    opacity: 1;
    background: var(--error);
    border-color: var(--error);
}

.zucho-bubble::after {
    display: none; /* Eliminamos el pico clásico por uno más moderno si fuera necesario, o lo dejamos limpio */
}

/* Zucho Mobile Icon (Auditoría Punto 9) */
.zucho-icon-mobile {
    width: 60px;
    height: 60px;
    background: var(--surface-container-high);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-fixed-dim);
    border-radius: 50%;
    display: none; /* Hidden by default, shown by media query */
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    box-shadow: 0 5px 20px rgba(81, 255, 51, 0.4);
    pointer-events: auto;
    cursor: pointer;
}

@media (max-width: 600px) {
    #zucho-avatar {
        left: auto;
        right: 15px;
        bottom: 120px; 
    }
    .zucho-bubble {
        position: fixed;
        bottom: 190px;
        right: 15px;
        max-width: 220px;
    }
    #zucho-avatar canvas {
        display: none !important; /* Hide 3D mesh on mobile to save perf */
    }
    .zucho-icon-mobile {
        display: flex;
    }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.zucho-modal {
    border: 2px solid #2ecc71;
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.2);
}

.zucho-chat-history {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zucho-message {
    margin: 0;
    padding: 10px;
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.4;
}

.user-message {
    margin: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-right: 3px solid #ccc;
    border-radius: 4px;
    align-self: flex-end;
    font-size: 0.9em;
    opacity: 0.8;
}

#zucho-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

#zucho-input:focus {
    outline: none;
    border-color: #2ecc71;
}
/* Beta 16.0: Audit Dashboard Styles */
.audit-bar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.audit-bar-wrapper {
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}
.audit-bar-fill {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.audit-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    opacity: 0.8;
}
.audit-card-highlight {
    border-color: #3498db !important;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.2) !important;
}

/* --- Audit Dashboard (Beta 21.5) --- */
.audit-modal {
    max-width: 500px !important;
    border: 1px solid rgba(155, 89, 182, 0.4);
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
}

.audit-title {
    color: var(--purple, #9b59b6);
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.5em;
}

.audit-subtitle {
    font-size: 0.85em;
    opacity: 0.7;
    margin-bottom: 25px;
}

.audit-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 30px;
}

.audit-stat {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    text-align: center;
}

.audit-stat span {
    font-size: 0.7em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 5px;
}

.audit-stat strong {
    font-size: 1.1em;
}

.audit-stat.red strong { color: #e74c3c; }
.audit-stat.green strong { color: #2ecc71; }

.audit-viz-container {
    height: 180px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.truth-curve-viz {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 100%;
    gap: 40px;
}

.curve-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.curve-fill {
    width: 60px;
    border-radius: 8px 8px 0 0;
    transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.curve-fill.nominal {
    background: linear-gradient(to top, #34495e, #95a5a6);
    box-shadow: 0 0 15px rgba(149, 165, 166, 0.3);
}

.curve-fill.real {
    background: linear-gradient(to top, #27ae60, #2ecc71);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.curve-bar span {
    font-size: 0.75em;
    margin-top: 10px;
    opacity: 0.8;
}

.audit-list h3 {
    font-size: 0.9em;
    opacity: 0.6;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.audit-scroll-area {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.audit-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.audit-item-info {
    display: flex;
    flex-direction: column;
}

.audit-item-info strong { font-size: 0.9em; }
.audit-item-info small { font-size: 0.75em; opacity: 0.5; }

.audit-item-yield {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.audit-item-yield span { font-size: 0.9em; }
.audit-item-yield span.loss { font-size: 0.75em; color: #e74c3c; }

/* ========================================= */
/* Opcion 3: Framework de Foco Absoluto      */
/* ========================================= */

.layout-3zones {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-bottom: 90px;
    overflow: hidden;
}

.header-contextual {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    background: rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.bioma-name-tag { font-weight: 700; color: var(--bioma-color); letter-spacing: 1px; font-size: 1.1em;}
.turn-tag { background: rgba(255,255,255,0.1); padding: 5px 12px; border-radius: 20px; font-size: 0.9em; font-weight:bold;}
.btn-icon-minimal { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; border-radius: 8px; padding: 6px 12px; font-size: 0.85em; margin-left: 5px; cursor: pointer; font-weight: bold;}

.loop-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7em;
    font-weight: bold;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    padding: 8px 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.05);
}

.tracker-step { position: relative; }
.tracker-step.active { color: var(--bioma-color); text-shadow: 0 0 8px var(--bioma-color); }
.tracker-step::after { content: "→"; position: absolute; right: -25px; color: rgba(255,255,255,0.1); }
@media (max-width: 600px) { .tracker-step::after { right: -15px; } }
.tracker-step:last-child::after { content: ""; }

.hud-recursos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    background: rgba(15, 52, 96, 0.4);
    backdrop-filter: blur(5px);
    z-index: 9;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.kpi-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 8px;
}

@media (max-width: 600px) {
    .kpi-box { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; }
    .kpi-icon { font-size: 1em; }
    .kpi-value { font-size: 0.85em; }
    .kpi-label { font-size: 0.55em; }
}

.kpi-icon { font-size: 1.2em; }
.kpi-data { display: flex; flex-direction: column; }
.kpi-label { font-size: 0.65em; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight:bold;}
.kpi-value { font-size: 0.95em; font-weight: bold; }
.kpi-riesgo .kpi-value, .kpi-riesgo .kpi-icon { color: var(--orange); }

.vivero-main { flex: 1; overflow-y: auto; position: relative; }

.technical-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(15, 52, 96, 0.98);
    backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 10001; /* Beta 27.8.4: Over HUD */
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex !important;
    flex-direction: column;
}

.technical-drawer.show,
.technical-drawer.overlay-active { 
    right: 0 !important; 
    transform: translateX(0) !important;
    visibility: visible !important;
}

.technical-drawer.hidden { 
    right: -420px !important; 
    transform: translateX(100%) !important;
    visibility: hidden !important;
}


.drawer-header-unified { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.3);}
.drawer-header-unified h2 { margin: 0; font-size: 1.2em; }
.btn-close-drawer { background: rgba(255,255,255,0.1); border:none; border-radius: 50%; width: 35px; height: 35px; color:white; cursor:pointer;}

.drawer-tabs { display: flex; width: 100%; top: 0; background: rgba(0,0,0,0.4);}
.drawer-tab { flex: 1; padding: 15px; background: transparent; border: none; color: white; font-weight: bold; opacity: 0.5; border-bottom: 2px solid transparent; cursor: pointer; transition: 0.2s; font-size:1.1em;}
.drawer-tab.active { opacity: 1; border-bottom-color: var(--bioma-color); color: var(--bioma-color); background: rgba(255,255,255,0.05); }

.drawer-content-area { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-tab-content.hidden { display: none !important; }

.action-bar-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,1) 30%, rgba(0,0,0,0.7) 70%, transparent);
    padding: 20px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-massive-action {
    width: 100%;
    max-width: 600px;
    background: var(--bioma-color);
    color: #111;
    font-size: 1.4em;
    font-weight: bold;
    padding: 20px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(46, 204, 113, 0.5);
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulse 2.5s infinite;
}
.btn-massive-action:active { transform: scale(0.97); }

/* =========================================================
   SPRINT 2: EL VIVERO DE ZUCHO (BETA 25.4.2)
   Estados Visuales de Parcelas
   ========================================================= */

/* Suelo Resquebrajado por Inflación >= 10% */
.plot-slot.soil-cracked::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at center, transparent 30%, rgba(200, 100, 50, 0.4) 100%),
                      repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(139, 69, 19, 0.2) 10px, rgba(139, 69, 19, 0.2) 12px),
                      repeating-linear-gradient(-45deg, transparent, transparent 15px, rgba(139, 69, 19, 0.15) 15px, rgba(139, 69, 19, 0.15) 18px);
    pointer-events: none;
    z-index: 1;
    border-radius: 15px;
    opacity: 0.8;
}

/* Estado: Creciendo */
.plot-creciendo .plant-growing {
    filter: saturate(0.8) brightness(0.9);
    transition: all 0.5s ease;
}

/* Estado: Lista */
.plot-listo {
    box-shadow: 0 0 25px rgba(241, 196, 15, 0.4);
    border-color: #f1c40f;
    animation: pulseHarvest 2s infinite alternate;
}

.plot-listo .plant-ready {
    filter: drop-shadow(0 0 15px rgba(241, 196, 15, 0.8));
    animation: gentleSway 3s infinite ease-in-out;
}

.glow-active {
    box-shadow: inset 0 0 30px rgba(241, 196, 15, 0.3);
}

@keyframes pulseHarvest {
    from { box-shadow: 0 0 15px rgba(241, 196, 15, 0.3); }
    to { box-shadow: 0 0 30px rgba(241, 196, 15, 0.6); }
}

@keyframes gentleSway {
    0% { transform: scale(1.2) rotate(-2deg); }
    50% { transform: scale(1.2) rotate(2deg); }
    100% { transform: scale(1.2) rotate(-2deg); }
}

/* Progress Tracker de la Planta */
.plot-progress-bar {
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    z-index: 5;
}

.plot-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    transition: width 0.5s ease;
}

/* Badge de Estado */
.plot-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 5;
    backdrop-filter: blur(2px);
}

.plot-listo .plot-status-badge {
    background: #f1c40f;
    color: #000;
    border-color: #fff;
}

/* --- MODO PRO TOGGLE (IP-5) --- */
.switch-pro {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}
.switch-pro input { opacity: 0; width: 0; height: 0; }
.slider-pro {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.2);
}
.slider-pro:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider-pro { background-color: #3498db; }
input:checked + .slider-pro:before { transform: translateX(24px); }

/* Context Shift Visual */
#technical-drawer.expert-technical-mode {
    background: var(--lab-pro-bg) !important;
    border-left: 2px solid #3498db;
    box-shadow: -15px 0 40px rgba(52, 152, 219, 0.2);
}

/* --- ZUCHO MARGINS (IP-5) --- */
.zucho-bubble {
    margin-bottom: 30px !important;
    z-index: 1001 !important;
    border: 1px solid rgba(52, 152, 219, 0.5);
    backdrop-filter: blur(10px);
}
.zucho-container {
    z-index: 1000 !important;
    bottom: 25px !important;
}

/* --- FINAL HARDENING (IP-6): Overlay & Menu --- */
.overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: var(--z-modal);
}

.overlay-modal.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.modal-content.glass-card {
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.menu-options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 1rem;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-btn.danger-zone {
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.2);
}

.menu-btn.danger-zone:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: #ff4757;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover { color: #fff; }

/* =========================================
   LUMINOUS ARBORETUM CORE SYSTEM (IP-3)
   ========================================= */

.main-game-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--background);
    color: var(--on-surface);
    font-family: 'Montserrat', sans-serif;
}

/* Layout Responsivo de 3 Zonas */
@media (min-width: 1024px) {
    .main-game-container {
        flex-direction: row;
        padding: var(--spacing-l);
        gap: var(--spacing-l);
        height: 100vh;
        overflow: hidden;
    }
    
    .sidebar-luminous {
        width: 360px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: var(--spacing-l);
        overflow-y: auto;
    }
    
    .grid-luminous {
        flex-grow: 1;
        overflow-y: auto;
        padding: var(--spacing-m);
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-m);
        align-content: start;
    }
}

/* Tablet & Mobile Layouts */
@media (max-width: 1023px) {
    .sidebar-luminous { display: none; }
    
    .tablet-layout {
        display: flex;
        flex-direction: column;
    }
    
    .tablet-layout .sidebar-hud {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: var(--spacing-m);
        padding: var(--spacing-m);
        overflow-x: auto;
        border-bottom: 1px solid var(--outline);
    }
    
    .tablet-layout #hud-tablet {
        display: flex;
        flex-direction: row !important;
        gap: var(--spacing-m);
        width: 100%;
    }
    
    .tablet-layout #hud-tablet > div {
        flex: 1;
        min-width: 0;
    }

    .mobile-layout .hud-mobile {
        padding: var(--spacing-m);
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: var(--surface-container);
        border-bottom: 1px solid var(--outline);
    }

    .grid-luminous {
        display: grid;
        gap: var(--spacing-s);
        padding: var(--spacing-m);
        padding-bottom: 120px; /* Espacio para el boton flotante y Zucho */
    }
}

@media (min-width: 600px) and (max-width: 1023px) {
    .grid-luminous { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 599px) {
    .grid-luminous { grid-template-columns: repeat(2, 1fr); }
}

/* Glassmorphism & UI Tokens */
.kpi-glass, .kpi-glass-v, .glass-card, .inspector-card {
    background: var(--surface-container);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none; /* No-Line Rule */
    border-radius: var(--radius-card);
    padding: var(--spacing-m);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05); /* Subtle inner edge instead of border */
    transition: transform 0.2s ease, background 0.2s ease;
}

.kpi-glass:hover {
    border-color: var(--primary-container);
    background: var(--surface-container-high);
}

/* Wealth Ring Progress */
.progress-ring-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--surface-container-low);
    border-radius: var(--radius-modal);
    border: 1px solid var(--outline);
}

.progress-ring-fill {
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-content .ring-value {
    color: var(--primary-container);
    text-shadow: 0 0 15px rgba(81, 255, 51, 0.3);
}

/* Parcelas (Grid Slots) Refined */
.plot-slot {
    aspect-ratio: 1/1;
    min-width: 140px;
    min-height: 140px;
    background: var(--surface-container-high);
    border: 1px solid var(--outline);
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.plot-slot:hover {
    background: var(--surface-container-highest);
    border-color: var(--primary-fixed-dim);
    transform: translateY(-4px);
}

.plot-empty {
    border: 2px dashed var(--outline);
    background: var(--surface-container-low);
}

.plantar-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--primary-container);
    animation: pulse-luminous 2s infinite;
}

@keyframes pulse-luminous {
    0% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); text-shadow: 0 0 10px var(--primary-container); }
    100% { opacity: 0.6; transform: scale(0.95); }
}

/* Laboratorio Cards Hardening */
.lab-card {
    background: var(--surface-container);
    border: 1px solid var(--outline);
    border-radius: var(--radius-card);
    min-height: 220px;
    padding: var(--spacing-l);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.lab-card h2 {
    font-size: 0.8em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: var(--spacing-s);
}

.dashboard-luminous {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-m);
    padding: var(--spacing-m);
}

.wealth-value-large {
    font-size: 2em;
    font-weight: 800;
    color: var(--primary-container);
    margin: var(--spacing-m) 0;
}

.progress-bar-container {
    background: var(--surface-container-highest);
    height: 8px;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Luminous Controls */
.top-bar-luminous {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-s) 0;
    margin-bottom: var(--spacing-m);
}

.switch-luminous {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-luminous input { opacity: 0; width: 0; height: 0; }

.slider-luminous {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--surface-container-highest);
    transition: .4s;
    border-radius: var(--radius-pill);
    border: 1px solid var(--outline);
}

.slider-luminous:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--on-surface-variant);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-luminous {
    background-color: var(--glow-suttle);
    border-color: var(--primary-container);
}

input:checked + .slider-luminous:before {
    transform: translateX(20px);
    background-color: var(--primary-container);
    box-shadow: 0 0 8px var(--primary-container);
}

.btn-massive-luminous {
    width: 100%;
    padding: var(--spacing-l);
    background: linear-gradient(135deg, var(--primary-container), var(--primary-fixed-dim));
    color: var(--on-primary-container);
    border: none;
    border-radius: var(--radius-card);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(81, 255, 51, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-massive-luminous:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(81, 255, 51, 0.3);
}

.btn-icon-glass {
    background: var(--surface-container-highest);
    border: 1px solid var(--outline);
    color: var(--on-surface);
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    backdrop-filter: blur(8px);
}

/* --- MODO PRO TOGGLE V2 --- */
.pro-toggle-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pro-toggle-v2:hover {
    background: rgba(81, 255, 51, 0.1);
    transform: scale(1.1);
}

.pro-toggle-v2.active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(81, 255, 51, 0.4);
}

/* Beta 27.1: Carousel Dots & Pro HUD */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.2);
}

.pro-metric-card {
    border-color: rgba(81, 255, 51, 0.2) !important;
    background: rgba(81, 255, 51, 0.03) !important;
    margin-bottom: 8px;
    text-align: left;
    padding: 12px;
}

.pro-stat {
    display: flex;
    gap: 5px;
    font-weight: bold;
}

.pro-stat span:first-child {
    color: var(--primary);
    opacity: 0.8;
}

.pro-only.hidden {
    display: none !important;
}

.pro-toggle-drawer-luminous {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-container-high);
    padding: var(--spacing-m) var(--spacing-l);
    border-bottom: 1px solid var(--outline);
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9em;
    color: var(--primary-container);
}

/* Inspector Luminous (Desktop Sidebar & Mobile Modal) */
.inspector-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-m);
    margin-bottom: var(--spacing-l);
    padding-bottom: var(--spacing-m);
    border-bottom: 1px solid var(--outline);
}

.inspector-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--glow-suttle));
}

.inspector-main-info h2 {
    margin: 0;
    font-size: 1.25rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--on-surface);
}

.asset-type-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--surface-container-highest);
    border-radius: var(--radius-pill);
    color: var(--on-surface-variant);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inspector-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-s);
    margin-bottom: var(--spacing-l);
}

.insp-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-s) var(--spacing-m);
    background: var(--surface-container-low);
    border-radius: var(--radius-card);
    border: 1px solid var(--outline);
}

.insp-label {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
}

.insp-value {
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.inspector-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-s);
}

.btn-luminous {
    padding: var(--spacing-m);
    border-radius: var(--radius-card);
    border: 1px solid var(--primary-container);
    background: var(--glow-suttle);
    color: var(--primary-container);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-luminous:hover {
    background: var(--primary-container);
    color: var(--on-primary-container);
    box-shadow: 0 0 15px var(--primary-container);
}

.btn-sell-action {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-sell-action:hover {
    background: #e74c3c;
    color: white;
    box-shadow: 0 0 15px #e74c3c;
}

/* Modal Luminous Override */
.modal-luminous-content {
    background: var(--background);
    padding: var(--spacing-xl);
    border-radius: var(--radius-modal) var(--radius-modal) 0 0;
    border-top: 2px solid var(--primary-container);
    width: 100%;
    max-width: 500px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: slideUpModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpModal {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

.modal-header-luminous {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-l);
}

.btn-close-luminous {
    background: var(--surface-container-highest);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.text-pos { color: var(--primary-container); }
.text-neg { color: #ff4d4d; }

/* Stitch CTA Standard */
.stitch-cta {
    width: 100%;
    padding: var(--spacing-l);
    background: var(--primary-container);
    color: var(--on-primary-container);
    border: none;
    border-radius: var(--radius-card);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(81, 255, 51, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stitch-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(81, 255, 51, 0.3);
}

.btn-massive-action {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-active-luminous {
    background: #51FF33;
    color: #031425;
    box-shadow: 0 0 20px rgba(81, 255, 51, 0.3);
}

.btn-active-luminous:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(81, 255, 51, 0.5);
}

.btn-blocked-luminous {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.btn-harvest-mutant {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}
.stitch-cta.btn-disabled {
    background: var(--surface-container-highest);
    color: var(--on-surface-variant);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

/* --- Beta 27.2: Laboratorio Pro Style --- */
.lab-stats-compact {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.lab-balances-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.lab-pill {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s;
}

.pill-label {
    font-size: 0.65em;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
}

.pill-val {
    font-weight: 800;
    font-size: 1.1em;
    color: var(--bioma-color);
}

.lab-pill.glass-rain .pill-val { color: #3498db; }
.lab-pill.glass-fert .pill-val { color: #f1c40f; }
.lab-pill.glass-wealth .pill-val { color: #2ecc71; }

/* Swapper / Transformer */
.lab-transformer-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.lab-transformer-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, #3498db, #f1c40f);
    opacity: 0.5;
}

.transformer-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: #fff;
    font-weight: 700;
}

.transformer-desc {
    font-size: 0.8em;
    opacity: 0.6;
    margin-bottom: 20px;
}

.transformer-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.trans-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    transition: border-color 0.3s;
}

.trans-panel:focus-within {
    border-color: var(--bioma-color);
}

.trans-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.trans-header span {
    font-size: 0.7em;
    font-weight: bold;
    opacity: 0.5;
}

.trans-max {
    color: var(--bioma-color);
    cursor: pointer;
    text-decoration: underline;
}

.trans-max:hover { opacity: 1; }

.trans-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8em;
    font-weight: 800;
    width: 100%;
    outline: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.trans-middle {
    height: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.btn-swap-toggle {
    background: #1a1a1a;
    border: 3px solid #333;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.btn-swap-toggle:hover {
    border-color: var(--bioma-color);
    transform: rotate(180deg);
}

.trans-output {
    min-height: 40px;
    display: flex;
    align-items: center;
}

#lab-swap-result {
    font-size: 1.8em;
    font-weight: 800;
    color: #f1c40f;
}


.from-panel.mep-mode #lab-swap-amount { color: #f1c40f; }
.to-panel.ars-mode #lab-swap-result { color: #3498db; }

/* Layout 3-3-2 Centrado (Beta 27.8.4 - Absolute Bottom Override) */
.grid-luminous.grid-3-3-2 {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 32px !important;
    padding: 32px !important;
    max-width: 1400px !important; /* Slightly wider for symmetry */
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.grid-luminous.grid-3-3-2 > .plot-slot {
    grid-column: span 4 !important;
    min-height: 280px !important;
    width: 100% !important;
}

/* Row 3 Centering with absolute precision (Beta 27.8.4) */
.grid-luminous.grid-3-3-2 > .plot-slot:nth-child(7) {
    grid-column: 3 / span 4 !important;
}

.grid-luminous.grid-3-3-2 > .plot-slot:nth-child(8) {
    grid-column: 7 / span 4 !important;
}

/* Zucho Minimalist Carousel */
.zucho-transformer-carousel {
    padding: 15px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zucho-tip-text {
    font-size: 1.1em;
    line-height: 1.5;
    color: var(--on-surface);
    font-style: italic;
    opacity: 0.9;
    animation: fadeInOut 5s infinite;
    font-family: 'Montserrat', sans-serif;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(5px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
}

.trans-input::-webkit-inner-spin-button,
.trans-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.trans-input {
    -moz-appearance: textfield;
}

.menu-toggle-btn {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
}

/* --- Beta 27.9.17: Audit Consistency --- */
@keyframes technical-pulse {
    0% {
        box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px 2px var(--bioma-color);
        transform: scale(1.01);
        border-color: #fff;
    }
    100% {
        box-shadow: 0 0 0px 0px rgba(255, 255, 255, 0);
        transform: scale(1);
    }
}
