/* ═══════════════════════════════════════════════════════════════════════════
   KRIMINIS v13.0 — ENHANCEMENT STYLESHEET
   Cold Open · Expediente Vivo · Modo Agente · Caso Completo "El Coleccionista"
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   #1 — COLD OPEN: Cinematic Intro
   ─────────────────────────────────────────────────────────────────────────*/

.cold-open {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    transition: opacity 0.8s ease;
}

.cold-open.fade-out {
    opacity: 0;
    pointer-events: none;
}

.cold-open__rain {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 4px,
        rgba(100, 130, 180, 0.03) 4px,
        rgba(100, 130, 180, 0.03) 5px
    );
    animation: coldOpenRain 0.3s linear infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.cold-open__rain.active { opacity: 1; }

@keyframes coldOpenRain {
    0% { transform: translateY(0); }
    100% { transform: translateY(5px); }
}

.cold-open__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.cold-open__typewriter {
    position: relative;
    z-index: 2;
    font-family: 'Share Tech Mono', monospace;
    color: #c8d6e5;
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    max-width: 700px;
    text-align: center;
    line-height: 1.8;
    padding: 0 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-shadow: 0 0 10px rgba(100, 150, 200, 0.3);
}

.cold-open__typewriter.active { opacity: 1; }

.cold-open__typewriter .cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--neon-cyan);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: coldCursorBlink 0.6s step-end infinite;
}

@keyframes coldCursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Flash Effect */
.cold-open__flash {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.08s ease;
}

.cold-open__flash.fire { opacity: 1; animation: cameraFlash 0.5s ease-out forwards; }

@keyframes cameraFlash {
    0% { opacity: 1; }
    15% { opacity: 0.9; }
    30% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* ASCII Crime Scene */
.cold-open__scene {
    position: relative;
    z-index: 2;
    font-family: 'Share Tech Mono', monospace;
    color: var(--neon-red);
    font-size: clamp(0.35rem, 0.8vw, 0.6rem);
    line-height: 1.1;
    white-space: pre;
    opacity: 0;
    transition: opacity 0.8s ease;
    text-shadow: 0 0 8px rgba(255, 0, 68, 0.5);
    margin: 20px 0;
    filter: contrast(1.2);
}

.cold-open__scene.active { opacity: 1; }

/* Pixel Dissolve */
.cold-open__scene.dissolve {
    animation: pixelDissolve 1.5s ease-in forwards;
}

@keyframes pixelDissolve {
    0% { filter: contrast(1.2) blur(0px); opacity: 1; }
    30% { filter: contrast(2) blur(1px); opacity: 0.8; }
    60% { filter: contrast(3) blur(3px); opacity: 0.5; transform: scale(0.95); }
    100% { filter: contrast(5) blur(8px); opacity: 0; transform: scale(0.8); }
}

/* Logo reveal */
.cold-open__logo {
    position: relative;
    z-index: 2;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta), var(--neon-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.4)) drop-shadow(0 0 60px rgba(255, 0, 255, 0.2));
}

.cold-open__logo.active {
    opacity: 1;
    transform: scale(1);
}

.cold-open__subtitle {
    position: relative;
    z-index: 2;
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    color: var(--text-muted);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.cold-open__subtitle.active { opacity: 1; }

/* CTA Button */
.cold-open__cta {
    position: relative;
    z-index: 2;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cold-open__cta.active {
    opacity: 1;
    transform: translateY(0);
}

.cold-open__cta button {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    padding: 16px 50px;
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: ctaPulse 2s ease-in-out infinite;
}

.cold-open__cta button:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5), inset 0 0 30px rgba(0, 255, 255, 0.1);
    animation: none;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 255, 0.5), 0 0 50px rgba(0, 255, 255, 0.1); }
}

/* Hero "file opening" animation */
.hero.file-opening {
    animation: fileOpen 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fileOpen {
    0% { opacity: 0; transform: perspective(1000px) rotateX(-15deg) scale(0.9); transform-origin: top center; }
    100% { opacity: 1; transform: perspective(1000px) rotateX(0deg) scale(1); }
}

/* Skip intro link */
.cold-open__skip {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 20;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
    letter-spacing: 0.1em;
}

.cold-open__skip:hover { color: rgba(255,255,255,0.7); }

/* Audio indicator */
.cold-open__audio-hint {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 20;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.1em;
}


/* ─────────────────────────────────────────────────────────────────────────
   #2 — EXPEDIENTE VIVO: Classified Document Files
   ─────────────────────────────────────────────────────────────────────────*/

.expediente-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}

.expediente-overlay.active { opacity: 1; }

.expediente {
    width: 100%;
    max-width: 900px;
    background: #1c1915;
    border: 1px solid #3a3228;
    position: relative;
    transform: translateY(30px) rotateX(-2deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 1px rgba(200,170,130,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.expediente-overlay.active .expediente {
    transform: translateY(0) rotateX(0);
}

/* Manila folder tab */
.expediente__tab {
    position: absolute;
    top: -28px;
    left: 40px;
    background: #2a2318;
    padding: 6px 25px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #3a3228;
    border-bottom: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #8a7a65;
    letter-spacing: 0.15em;
}

/* Classified stamp */
.expediente__stamp {
    position: absolute;
    top: 30px;
    right: 30px;
    font-family: 'Creepster', cursive;
    font-size: 1.8rem;
    color: rgba(180, 30, 30, 0.6);
    transform: rotate(-12deg);
    border: 3px solid rgba(180, 30, 30, 0.4);
    padding: 5px 15px;
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: 2;
}

/* Staple detail */
.expediente__staple {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 12px;
    height: 6px;
    background: linear-gradient(to bottom, #888, #666);
    border-radius: 1px;
    transform: rotate(-5deg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    z-index: 2;
}

.expediente__staple::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 2px;
    right: 2px;
    height: 4px;
    background: linear-gradient(to bottom, #777, #555);
    border-radius: 0 0 1px 1px;
}

/* Close button */
.expediente__close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
}

.expediente__close:hover {
    background: rgba(255, 0, 68, 0.2);
    color: var(--neon-red);
    border-color: var(--neon-red);
}

/* Header / Mugshot */
.expediente__header {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    padding: 40px 30px 30px;
    border-bottom: 1px dashed #3a3228;
    position: relative;
}

.expediente__mugshot {
    width: 180px;
    height: 220px;
    background: #0d0b09;
    border: 3px solid #3a3228;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.expediente__mugshot::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(200,170,130,0.15);
    pointer-events: none;
}

.expediente__mugshot-icon {
    font-size: 5rem;
    filter: grayscale(30%) contrast(1.1);
}

.expediente__mugshot-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: #5a4a35;
    letter-spacing: 0.2em;
    margin-top: 10px;
    text-transform: uppercase;
}

.expediente__identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.expediente__name {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.expediente__alias {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.expediente__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.expediente__meta-item {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    padding: 4px 10px;
    border: 1px solid #3a3228;
    color: #8a7a65;
    background: rgba(0,0,0,0.3);
}

/* Tabs */
.expediente__tabs {
    display: flex;
    border-bottom: 1px solid #3a3228;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(0,0,0,0.2);
}

.expediente__tabs::-webkit-scrollbar { display: none; }

.expediente__tab-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.08em;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.expediente__tab-btn:hover {
    color: #c8d6e5;
    background: rgba(255,255,255,0.03);
}

.expediente__tab-btn.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.03);
}

/* Tab Content */
.expediente__content {
    padding: 30px;
    min-height: 300px;
}

.expediente__panel {
    display: none;
    animation: expPanelIn 0.3s ease;
}

.expediente__panel.active { display: block; }

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

/* Panel titles */
.exp-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
}

/* Radar Chart */
.exp-radar-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.exp-radar {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

.exp-radar-stats {
    flex: 1;
    min-width: 200px;
}

.exp-stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.exp-stat-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100px;
    flex-shrink: 0;
}

.exp-stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.exp-stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.exp-stat-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    width: 35px;
    text-align: right;
}

/* Profile text with highlighted extracts */
.exp-profile-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: #c8d6e5;
    line-height: 1.7;
}

.exp-highlight {
    background: rgba(255, 215, 0, 0.15);
    border-bottom: 2px solid rgba(255, 215, 0, 0.4);
    padding: 0 3px;
}

/* Theory section */
.exp-theory-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid #3a3228;
    padding: 20px;
    margin-top: 15px;
}

.exp-theory-icon { font-size: 2rem; margin-bottom: 10px; }

.exp-theory-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.exp-theory-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mini Nexus */
.exp-mini-nexus {
    width: 100%;
    height: 280px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #3a3228;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
}

.exp-mini-nexus svg {
    width: 100%;
    height: 100%;
}

.exp-mini-nexus-node {
    cursor: default;
    transition: transform 0.3s ease;
}

.exp-mini-nexus-node:hover { transform: scale(1.1); }

/* Timeline */
.exp-timeline {
    position: relative;
    padding: 20px 0;
    overflow-x: auto;
}

.exp-timeline-track {
    display: flex;
    gap: 0;
    min-width: max-content;
    padding: 0 20px;
    position: relative;
}

.exp-timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #3a3228;
    transform: translateY(-50%);
}

.exp-timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    position: relative;
    padding: 0 10px;
}

.exp-timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    background: #1c1915;
    z-index: 1;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.exp-timeline-dot.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.exp-timeline-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 130px;
    line-height: 1.4;
}

.exp-timeline-phase {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.55rem;
    color: var(--neon-cyan);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

/* Analyst Notes */
.exp-notes-area {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 200, 0.03);
    border: 1px dashed #5a4a35;
    padding: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #c8d6e5;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
}

.exp-notes-area:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.02);
}

.exp-notes-area::placeholder {
    color: #5a4a35;
    font-style: italic;
}

.exp-notes-saved {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.exp-notes-saved.visible { opacity: 1; }

/* Quotes / Interrogation tape */
.exp-quote {
    position: relative;
    padding: 20px 25px;
    background: rgba(0,0,0,0.4);
    border-left: 3px solid;
    margin-bottom: 15px;
    font-style: italic;
    color: #c8d6e5;
    font-size: 0.95rem;
}

.exp-quote::before {
    content: 'REC ●';
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--neon-red);
    font-style: normal;
    animation: recBlink 1.5s step-end infinite;
}

@keyframes recBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Verdict section */
.exp-verdict-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.exp-verdict-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #3a3228;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.exp-verdict-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--neon-cyan);
}

.exp-verdict-btn.selected {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Coffee stain effect */
.expediente__coffee-stain {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(ellipse, transparent 35%, rgba(90, 60, 30, 0.06) 40%, rgba(90, 60, 30, 0.1) 50%, transparent 55%);
    pointer-events: none;
    z-index: 1;
}

/* Responsive */
@media (max-width: 700px) {
    .expediente__header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .expediente__mugshot {
        width: 120px;
        height: 160px;
        margin: 0 auto;
    }
    .expediente__mugshot-icon { font-size: 3.5rem; }
    .exp-radar-container { flex-direction: column; align-items: center; }
}


/* ─────────────────────────────────────────────────────────────────────────
   #3 — MODO AGENTE: PWA Missions & Notifications
   ─────────────────────────────────────────────────────────────────────────*/

/* Missions Panel */
.missions-panel {
    position: fixed;
    top: 70px;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    max-height: calc(100vh - 90px);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 215, 0, 0.15);
    z-index: var(--z-modal);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

.missions-panel.open { right: 0; }

.missions-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 2;
}

.missions-panel__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neon-gold);
    letter-spacing: 0.1em;
}

.missions-panel__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.missions-panel__body { padding: 15px; }

/* Mission Card */
.mission-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

.mission-card:hover { border-color: rgba(255, 215, 0, 0.2); }

.mission-card.completed {
    opacity: 0.5;
    border-color: rgba(0, 255, 136, 0.3);
}

.mission-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mission-card__icon { font-size: 1.3rem; }

.mission-card__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
}

.mission-card__xp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--neon-gold);
    padding: 2px 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.mission-card__desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
}

.mission-card__progress {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.mission-card__progress-fill {
    height: 100%;
    background: var(--neon-gold);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Mission trigger button */
.missions-trigger {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1.1rem;
    color: var(--neon-gold);
    transition: transform 0.2s;
}

.missions-trigger:hover { transform: scale(1.1); }

.missions-trigger__badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--neon-red);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Streak danger notification */
.streak-danger {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--neon-red);
    padding: 15px 25px;
    z-index: var(--z-notification);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.2);
}

.streak-danger.show { transform: translateX(-50%) translateY(0); }

.streak-danger__text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--neon-red);
}


/* ─────────────────────────────────────────────────────────────────────────
   #4 — CASO COMPLETO: "EL COLECCIONISTA" — Full Playable Case
   ─────────────────────────────────────────────────────────────────────────*/

/* Case briefing overlay */
.caso-briefing-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.caso-briefing-overlay.active { opacity: 1; }

.caso-briefing {
    max-width: 700px;
    width: 100%;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.caso-briefing-overlay.active .caso-briefing {
    transform: translateY(0);
}

.caso-briefing__classified {
    font-family: 'Creepster', cursive;
    font-size: 1.2rem;
    color: var(--neon-red);
    letter-spacing: 0.3em;
    border: 2px solid var(--neon-red);
    display: inline-block;
    padding: 5px 20px;
    margin-bottom: 30px;
    transform: rotate(-2deg);
}

.caso-briefing__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-gold), var(--neon-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.caso-briefing__subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

.caso-briefing__phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 30px;
}

.caso-briefing__phase {
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.caso-briefing__phase-icon { font-size: 1.5rem; margin-bottom: 5px; }

.caso-briefing__phase-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.caso-briefing__start {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 16px 50px;
    background: linear-gradient(135deg, var(--neon-gold), var(--neon-orange));
    color: #000;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.caso-briefing__start:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.caso-briefing__est {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 15px;
}

/* Enhanced Caso Completo progress bar */
.caso-completo-bar.v13 {
    background: linear-gradient(180deg, rgba(15, 12, 8, 0.98), rgba(20, 16, 10, 0.95));
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(10px);
}

.caso-completo-bar.v13 .caso-completo-bar__label {
    color: var(--neon-gold);
    font-size: 0.65rem;
}

.caso-step.v13-active {
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.caso-step.v13-locked {
    opacity: 0.3;
    pointer-events: none;
}

/* Caso narrative cards */
.caso-narrative {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 215, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

.caso-narrative__speaker {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--neon-gold);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.caso-narrative__text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: #c8d6e5;
    line-height: 1.7;
}

/* Phase completion card */
.caso-phase-complete {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 255, 136, 0.03);
    border: 1px solid rgba(0, 255, 136, 0.15);
    margin: 20px 0;
}

.caso-phase-complete__icon { font-size: 3rem; margin-bottom: 15px; }

.caso-phase-complete__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--neon-green);
    margin-bottom: 8px;
}

.caso-phase-complete__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.caso-phase-complete__next {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    padding: 12px 30px;
    background: var(--neon-green);
    color: #000;
    border: none;
    cursor: pointer;
    letter-spacing: 0.1em;
    font-weight: 700;
    transition: all 0.3s;
}

.caso-phase-complete__next:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}


/* ─────────────────────────────────────────────────────────────────────────
   #5 — PWA MANIFEST ADDITIONS
   ─────────────────────────────────────────────────────────────────────────*/

/* Install prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--bg-secondary);
    border: 1px solid var(--neon-cyan);
    padding: 15px 25px;
    z-index: var(--z-notification);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 90vw;
}

.pwa-install-prompt.show { transform: translateX(-50%) translateY(0); }

.pwa-install-prompt__text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #c8d6e5;
}

.pwa-install-prompt__btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    padding: 8px 16px;
    background: var(--neon-cyan);
    color: #000;
    border: none;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.pwa-install-prompt__dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}


/* ─────────────────────────────────────────────────────────────────────────
   ACCESSIBILITY: Reduced motion
   ─────────────────────────────────────────────────────────────────────────*/

@media (prefers-reduced-motion: reduce) {
    .cold-open__typewriter,
    .cold-open__scene,
    .cold-open__logo,
    .cold-open__cta,
    .expediente,
    .caso-briefing {
        transition: none !important;
        animation: none !important;
    }
}
