:root {
    --bg-color: #000000;
    --win-bg: #0a0a0a;
    --neon-cyan: #ffffff;
    --neon-amber: #888888;
    --neon-green: #ffffff;
    --font-main: 'Share Tech Mono', monospace;
}

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

body, html {
    width: 100%; height: 100%;
    background-color: var(--bg-color);
    color: var(--neon-cyan);
    font-family: var(--font-main);
    overflow: hidden;
}

.crt-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%), linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(150, 150, 150, 0.01), rgba(255, 255, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
}

#welcome-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh;
    background: #000; z-index: 1100; overflow: hidden;
    display: flex; justify-content: center; align-items: center;
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}

#welcome-rain {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; animation: w-rain-in 2.5s 0.4s ease forwards;
}
@keyframes w-rain-in { to { opacity: 0.5; } }

.w-vignette {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.05) 100%);
}

.w-scan {
    position: absolute; left: 0; top: -90px; width: 100%; height: 90px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.08), transparent);
    animation: w-scan 4.5s linear infinite;
}
@keyframes w-scan { to { transform: translateY(calc(100vh + 180px)); } }

.w-stage {
    position: relative; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center; padding: 20px;
    animation: w-power 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes w-power {
    0%   { transform: scale(0, 0.004); filter: brightness(4); }
    45%  { transform: scale(1, 0.004); filter: brightness(4); }
    100% { transform: scale(1, 1);     filter: brightness(1); }
}

.w-corner {
    position: absolute; width: 22px; height: 22px; border: 1px solid #fff; opacity: 0;
    animation: w-corner-in 0.6s ease forwards;
}
.w-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; animation-delay: 0.9s; }
.w-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; animation-delay: 1.0s; }
.w-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; animation-delay: 1.1s; }
.w-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; animation-delay: 1.2s; }
@keyframes w-corner-in {
    from { opacity: 0; transform: scale(2.4); }
    to   { opacity: 0.85; transform: scale(1); }
}

.w-hud {
    position: absolute; left: 46px; right: 46px; display: flex; justify-content: space-between;
    font-size: 10px; letter-spacing: 1px; color: var(--neon-amber);
    opacity: 0; animation: w-hud-in 0.8s 1.1s ease forwards;
}
.w-hud.top { top: 20px; }
.w-hud.bottom { bottom: 20px; }
@keyframes w-hud-in { to { opacity: 1; } }
.w-hint { animation: blink 1.2s steps(1) infinite; }

.welcome-box {
    width: 100%; max-width: 420px;
    display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}

.w-boot {
    width: 100%; max-width: 320px; text-align: left; font-size: 11px; letter-spacing: 1px; color: #aaa;
    display: flex; flex-direction: column; gap: 5px; transition: opacity 0.8s ease;
}
.w-boot.dim { opacity: 0.3; }
.w-boot-line { min-height: 1.4em; white-space: nowrap; }
.w-boot-line b { color: #fff; font-weight: normal; text-shadow: 0 0 6px rgba(255,255,255,0.7); }
.w-bar { width: 100%; height: 3px; background: #222; margin-top: 4px; }
.w-bar i { display: block; width: 0; height: 100%; background: #fff; transition: width 0.35s ease; box-shadow: 0 0 6px #fff; }

.w-titles { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.w-title {
    position: relative; font-weight: normal; color: #fff; white-space: nowrap;
    font-size: clamp(1.7rem, 9.5vw, 3.2rem); letter-spacing: 4px; line-height: 1.15; min-height: 1.15em;
    text-shadow: 0 0 12px rgba(255,255,255,0.55);
}

.w-title.glitch-on { animation: w-jitter 5s infinite; }
.w-title.glitch-on::before,
.w-title.glitch-on::after {
    content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden;
}
.w-title.glitch-on::before { transform: translateX(2px);  text-shadow: -2px 0 #999; animation: glitch-a 2.4s infinite linear alternate-reverse; }
.w-title.glitch-on::after  { transform: translateX(-2px); text-shadow: 2px 0 #666;  animation: glitch-b 3s infinite linear alternate-reverse; }
@keyframes glitch-a {
    0%, 88%, 100% { clip-path: inset(0 0 100% 0); }
    90% { clip-path: inset(15% 0 60% 0); }
    94% { clip-path: inset(55% 0 20% 0); }
    97% { clip-path: inset(80% 0 5% 0); }
}
@keyframes glitch-b {
    0%, 85%, 100% { clip-path: inset(0 0 100% 0); }
    87% { clip-path: inset(40% 0 35% 0); }
    92% { clip-path: inset(5% 0 80% 0); }
    96% { clip-path: inset(65% 0 10% 0); }
}
@keyframes w-jitter {
    0%, 92%, 100% { transform: none; }
    93% { transform: translate(-2px, 1px); }
    95% { transform: translate(3px, -1px); }
    97% { transform: translate(-1px, 0); }
}
@keyframes blink { 50% { opacity: 0; } }

.w-sub {
    font-size: clamp(10px, 3.2vw, 13px); color: var(--neon-amber); white-space: nowrap;
    letter-spacing: 5px; opacity: 0; transition: opacity 1s ease, letter-spacing 1.4s ease;
}
.w-sub.show { opacity: 1; letter-spacing: 2px; }

.w-agent {
    font-size: 12px; letter-spacing: 3px; color: #fff; border: 1px solid #444; padding: 5px 14px;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 1s ease;
}
.w-agent.show { opacity: 1; transform: none; border-color: #fff; }

#welcome-btn {
    margin-top: 6px; background: transparent; border: 1px solid var(--neon-cyan); color: var(--neon-cyan);
    font-family: var(--font-main); padding: 11px 30px; font-size: 13px; cursor: pointer;
    text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity 0.8s, background 0.2s, color 0.2s;
}
#welcome-btn.show { opacity: 1; pointer-events: auto; animation: pulse-border 1.6s infinite; }
#welcome-btn:hover { background: #fff; color: #000; }
@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
    50% { box-shadow: 0 0 14px rgba(255,255,255,0.5); }
}

.w-flash { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; opacity: 0; pointer-events: none; }
.w-flash.go { animation: w-flash 0.4s ease-out; }
@keyframes w-flash { 0% { opacity: 0.35; } 100% { opacity: 0; } }

#welcome-screen.burst .w-title { animation: w-burst 0.4s linear; }
#welcome-screen.burst .w-flash { animation: w-flash-strong 0.45s ease-out; }
@keyframes w-burst {
    0%   { transform: translate(0); }
    15%  { transform: translate(-6px, 2px) skewX(8deg); }
    30%  { transform: translate(7px, -2px) skewX(-8deg); }
    45%  { transform: translate(-4px, 1px); }
    60%  { transform: translate(5px, 0) skewX(6deg); }
    100% { transform: translate(0); }
}
@keyframes w-flash-strong { 0% { opacity: 0.8; } 100% { opacity: 0; } }

#welcome-screen.leaving { pointer-events: none; animation: w-bg-out 0.45s 0.5s forwards; }
#welcome-screen.leaving .w-stage { animation: w-power-off 0.55s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
@keyframes w-power-off {
    0%   { transform: scale(1, 1);     filter: brightness(1); }
    55%  { transform: scale(1, 0.004); filter: brightness(4); }
    100% { transform: scale(0, 0.004); filter: brightness(4); opacity: 0; }
}
@keyframes w-bg-out { to { opacity: 0; } }

body.intro #hack-screen .hack-box { opacity: 0; }
#hack-screen.show .hack-box { animation: hack-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
#hack-screen.show .hack-box > * { animation: hack-fade-up 0.5s ease backwards; }
#hack-screen.show .hack-box > *:nth-child(1) { animation-delay: 0.20s; }
#hack-screen.show .hack-box > *:nth-child(2) { animation-delay: 0.35s; }
#hack-screen.show .hack-box > *:nth-child(3) { animation-delay: 0.50s; }
#hack-screen.show .hack-box > *:nth-child(4) { animation-delay: 0.65s; }
#hack-screen.show .hack-box > *:nth-child(5) { animation-delay: 0.80s; }
#hack-screen.show .hack-box > *:nth-child(6) { animation-delay: 0.95s; }
@keyframes hack-in {
    0%   { opacity: 0; transform: scale(0.92); filter: brightness(2.5); }
    60%  { opacity: 1; filter: brightness(1.4); }
    100% { opacity: 1; transform: none; filter: none; }
}
@keyframes hack-fade-up { from { opacity: 0; transform: translateY(10px); } }

html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

#hack-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
    z-index: 1000;
}

.hack-box {
    width: 100%; max-width: 500px;
    border: 1px solid var(--neon-cyan);
    background: #050505; padding: 20px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    display: flex; flex-direction: column; gap: 15px;
}

.hack-header {
    font-size: 13px; color: var(--neon-amber);
    border-bottom: 1px dashed var(--neon-amber); padding-bottom: 8px;
}

.hack-target { font-size: 12px; }
.hack-target span { color: var(--neon-cyan); font-weight: bold; }

#hack-logs {
    height: 120px; background: #000; border: 1px solid #222;
    padding: 10px; font-size: 11px; overflow-y: auto; color: #aaa;
    display: flex; flex-direction: column; gap: 4px;
}

.progress-wrapper { display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--neon-amber); }
.progress-bar-bg { width: 100%; height: 14px; border: 1px solid var(--neon-cyan); background: #000; padding: 2px; }
#progress-bar-fill { width: 0%; height: 100%; background: var(--neon-cyan); transition: width 0.1s linear; }

#hack-btn {
    background: transparent; border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan); font-family: var(--font-main);
    padding: 10px; font-size: 13px; cursor: pointer; text-transform: uppercase; transition: 0.2s;
}
#hack-btn:hover { background: #ffffff; color: #000; }

#login-header-screen {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; justify-content: center; align-items: center; padding: 20px; z-index: 900;
}

.login-intercept-box {
    width: 100%; max-width: 420px; border: 1px solid var(--neon-cyan);
    background: #050505; padding: 25px; box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    display: flex; flex-direction: column; gap: 15px;
}

.intercept-title { font-size: 13px; font-weight: bold; color: var(--neon-cyan); border-bottom: 1px dashed var(--neon-amber); padding-bottom: 8px; }
.intercept-sub { font-size: 12px; color: var(--neon-amber); line-height: 1.4; }
.credential-row { display: flex; justify-content: space-between; background: #000; border: 1px solid #333; padding: 8px 12px; font-size: 13px; }
.cred-label { color: var(--neon-amber); font-weight: bold; }
.cred-val { color: var(--neon-cyan); }

#auth-btn {
    background: transparent; border: 1px solid var(--neon-cyan); color: var(--neon-cyan);
    font-family: var(--font-main); padding: 10px; font-size: 13px; cursor: pointer; text-transform: uppercase; transition: 0.2s; margin-top: 5px;
}
#auth-btn:hover { background: #ffffff; color: #000; }

.crt-turn-on { animation: turn-on 1.2s ease-out forwards; }
@keyframes turn-on {
    0% { transform: scaleY(0.005) scaleX(0); filter: brightness(3) grayscale(100%); opacity: 1; }
    50% { transform: scaleY(0.005) scaleX(1); filter: brightness(3) contrast(1) grayscale(100%); }
    100% { transform: scaleY(1) scaleX(1); filter: brightness(1) contrast(1) grayscale(100%); opacity: 1; }
}

#dossier-container {
    display: none; width: 98vw; height: 95vh; height: 95dvh; margin: 2.5vh auto;
    border: 2px solid var(--neon-cyan); background-color: var(--win-bg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15); position: relative; flex-direction: column;
}

.win-header { background: rgba(255, 255, 255, 0.05); border-bottom: 1px solid var(--neon-cyan); padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.win-controls span { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--neon-cyan); margin-left: 5px; }
.win-controls span.close { background: var(--neon-amber); border-color: var(--neon-amber); }

.sec-warning { border-bottom: 1px dashed var(--neon-amber); color: var(--neon-amber); padding: 5px; text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

.dossier-body { display: flex; flex: 1; overflow: hidden; }

.sidebar {
    width: 220px; border-right: 1px solid var(--neon-cyan); padding: 10px;
    display: flex; flex-direction: column; gap: 8px; background: rgba(20, 20, 20, 0.9);
}

.logo-box { text-align: center; border: 1px solid var(--neon-cyan); padding: 8px; margin-bottom: 5px; }
.logo-text { font-size: 22px; font-weight: bold; line-height: 1; }
.logo-sub { font-size: 9px; opacity: 0.8; }

.nav-btn {
    background: transparent; border: 1px solid transparent; color: var(--neon-cyan);
    font-family: var(--font-main); padding: 10px; text-align: left; cursor: pointer; transition: 0.2s; text-transform: uppercase; font-size: 13px;
}
.nav-btn:hover, .nav-btn.active { border: 1px solid var(--neon-cyan); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); }

.content-area { flex: 1; min-height: 0; padding: 20px 20px 80px; overflow-y: auto; position: relative; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-content.active .reveal-item {
    opacity: 0;
    transform: translateY(12px);
    animation: lineReveal 0.5s forwards;
}

@keyframes lineReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 { border-bottom: 2px solid var(--neon-cyan); padding-bottom: 5px; margin-bottom: 20px; color: var(--neon-cyan); text-transform: uppercase; font-size: 1.3rem; }

.data-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); padding-bottom: 6px; }
.data-label { min-width: 140px; color: var(--neon-amber); font-weight: bold; flex-shrink: 0; }
.data-value { flex: 1; color: var(--neon-cyan); word-break: break-word; }

.tactical-grid-box { width: 100%; height: 180px; background-color: #050505; border: 1px solid var(--neon-cyan); display: flex; position: relative; overflow: hidden; margin-bottom: 20px; }
.agent-photo { width: 50%; height: 100%; object-fit: cover; object-position: top center; display: block; border-right: 1px solid var(--neon-cyan); filter: grayscale(100%) contrast(1.1); }
.grid-side { width: 50%; height: 100%; background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px); background-size: 16px 16px; display: flex; justify-content: center; align-items: center; color: rgba(255, 255, 255, 0.7); font-size: 11px; letter-spacing: 1px; text-align: center; padding: 10px; }

.bio-text { text-align: left; line-height: 1.5; margin-top: 15px; font-size: 14px; }
.bio-text p { color: var(--neon-cyan); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); }

@media (max-width: 768px) {
    #dossier-container { width: 100vw; height: 100vh; height: 100dvh; margin: 0; border: none; }
    .dossier-body { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 5px; border-right: none; border-bottom: 1px solid var(--neon-cyan); gap: 5px; }
    .logo-box { width: 100%; margin-bottom: 2px; padding: 4px; }
    .logo-text { font-size: 16px; }
    .logo-sub { display: none; }
    .nav-btn { flex: 1; text-align: center; padding: 6px 2px; font-size: 11px; border: 1px solid var(--neon-cyan); }
    .data-label { min-width: 110px; font-size: 13px; }
    .data-value { font-size: 13px; }
}

.hack-box { position: relative; }

#hack-hex {
    font-size: 10px; color: #555; white-space: nowrap; overflow: hidden;
    letter-spacing: 1px; height: 1.2em;
}
#hack-hex.run { color: #888; }

#hack-stage.flick { animation: stage-flick 0.35s steps(2) 1; }
@keyframes stage-flick {
    0%   { opacity: 0; color: #fff; }
    50%  { opacity: 1; color: #fff; text-shadow: 0 0 8px #fff; }
    100% { opacity: 1; }
}
#hack-percent.hot { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.8); }

#progress-bar-fill.run {
    background-image: repeating-linear-gradient(-45deg, #fff 0 6px, #9a9a9a 6px 12px);
    background-size: 17px 100%;
    animation: bar-move 0.6s linear infinite;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
@keyframes bar-move { to { background-position: 17px 0; } }

#hack-logs div { animation: log-in 0.25s ease; }
#hack-logs div.ok { color: #fff; text-shadow: 0 0 6px rgba(255,255,255,0.6); }
@keyframes log-in { from { opacity: 0; transform: translateX(-8px); } }

#hack-screen.show .hack-box.shake { animation: box-shake 0.5s linear; }
@keyframes box-shake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-5px, 2px); }
    20% { transform: translate(6px, -2px); }
    30% { transform: translate(-4px, 0); }
    40% { transform: translate(5px, 3px); }
    50% { transform: translate(-3px, -2px); }
    60% { transform: translate(4px, 1px); }
    80% { transform: translate(-2px, 0); }
}

#hack-alert {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.93);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px;
    opacity: 0; pointer-events: none;
}
#hack-screen #hack-alert.show { opacity: 1; animation: alert-in 0.5s steps(6) both; }
.alert-title {
    font-size: clamp(1.2rem, 6.5vw, 1.8rem); letter-spacing: 3px; white-space: nowrap;
    animation: alert-glow 1s infinite alternate, w-jitter 2.5s infinite;
}
.alert-sub { font-size: 11px; color: #888; letter-spacing: 3px; }
@keyframes alert-in { 0% { opacity: 0; } 20% { opacity: 1; } 30% { opacity: 0.2; } 50% { opacity: 1; } 60% { opacity: 0.4; } 100% { opacity: 1; } }
@keyframes alert-glow { from { text-shadow: 0 0 8px rgba(255,255,255,0.5); } to { text-shadow: 0 0 22px rgba(255,255,255,1); } }

#hack-screen.out, #login-header-screen.out { animation: screen-glitch-out 0.45s ease forwards; }
@keyframes screen-glitch-out {
    0%   { opacity: 1; transform: none; filter: none; }
    20%  { transform: translateX(-8px) skewX(4deg); filter: brightness(2); }
    40%  { transform: translateX(10px) skewX(-6deg); }
    60%  { opacity: 0.8; transform: translateX(-4px); }
    100% { opacity: 0; transform: scale(1.04); filter: brightness(3); }
}

#login-header-screen.in .login-intercept-box { animation: hack-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
#login-header-screen.in .login-intercept-box > * { animation: hack-fade-up 0.5s ease backwards; }
#login-header-screen.in .login-intercept-box > *:nth-child(1) { animation-delay: 0.15s; }
#login-header-screen.in .login-intercept-box > *:nth-child(2) { animation-delay: 0.30s; }
#login-header-screen.in .login-intercept-box > *:nth-child(3) { animation-delay: 0.45s; }
#login-header-screen.in .login-intercept-box > *:nth-child(4) { animation-delay: 0.60s; }
#login-header-screen.in .login-intercept-box > *:nth-child(5) { animation-delay: 0.75s; }

.credential-row { min-height: 36px; align-items: center; transition: border-color 0.2s, box-shadow 0.2s; }
.credential-row.active { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.3); }
.cred-val.typing::after { content: '█'; margin-left: 2px; animation: blink 0.7s steps(1) infinite; }

#auth-btn:disabled { opacity: 0.35; cursor: default; }
#auth-btn.ready { opacity: 1; animation: pulse-border 1.6s infinite; }
#auth-btn.busy { opacity: 1; animation: none; }

.auth-bar { height: 3px; background: #222; opacity: 0; transition: opacity 0.3s; margin-top: -6px; }
.auth-bar.show { opacity: 1; }
.auth-bar i { display: block; height: 100%; width: 0; background: #fff; box-shadow: 0 0 6px #fff; transition: width 0.4s ease; }

#access-splash {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh;
    background: #000; z-index: 1050; justify-content: center; align-items: center; overflow: hidden;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 4px);
}
#access-splash.show { display: flex; }
#access-splash.leaving { animation: splash-off 0.5s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
@keyframes splash-off {
    0%   { transform: scale(1, 1); filter: brightness(1); }
    55%  { transform: scale(1, 0.004); filter: brightness(4); }
    100% { transform: scale(0, 0.004); filter: brightness(4); opacity: 0; }
}
.splash-inner { text-align: center; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.splash-title {
    position: relative; white-space: nowrap; min-height: 1.2em; color: #fff;
    font-size: clamp(1.2rem, 6.2vw, 2.6rem); letter-spacing: 3px;
    text-shadow: 0 0 14px rgba(255,255,255,0.7);
}
.splash-sub { font-size: clamp(10px, 3vw, 13px); letter-spacing: 2px; color: #888; min-height: 1.4em; white-space: nowrap; }
.splash-title.glitch-on { animation: w-jitter 3s infinite; }
.splash-title.glitch-on::before,
.splash-title.glitch-on::after {
    content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden;
}
.splash-title.glitch-on::before { transform: translateX(2px);  text-shadow: -2px 0 #999; animation: glitch-a 2.4s infinite linear alternate-reverse; }
.splash-title.glitch-on::after  { transform: translateX(-2px); text-shadow: 2px 0 #666;  animation: glitch-b 3s infinite linear alternate-reverse; }

.sec-warning { animation: warn-pulse 2.4s ease-in-out infinite; }
@keyframes warn-pulse {
    0%, 100% { color: #888; }
    50% { color: #fff; text-shadow: 0 0 6px rgba(255,255,255,0.5); }
}

.tab-content.active h2 { animation: h2-wipe 0.6s ease backwards; }
@keyframes h2-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.nav-btn.flash { animation: nav-flash 0.4s ease; }
@keyframes nav-flash {
    0%   { background: #fff; color: #000; box-shadow: 0 0 14px #fff; }
    100% { background: rgba(255,255,255,0.1); color: #fff; box-shadow: 0 0 5px rgba(255,255,255,0.3); }
}

.tactical-grid-box.pre .agent-photo { clip-path: inset(0 0 100% 0); }
.tactical-grid-box.scanning .agent-photo { animation: photo-scan 1.8s linear both; }
@keyframes photo-scan {
    0%   { clip-path: inset(0 0 100% 0); filter: grayscale(100%) contrast(1.7) brightness(2.2) blur(3px); }
    100% { clip-path: inset(0 0 0 0);    filter: grayscale(100%) contrast(1.1) brightness(1) blur(0); }
}
.scan-line {
    position: absolute; left: 0; top: 0; width: 50%; height: 2px; background: #fff;
    box-shadow: 0 0 12px 3px rgba(255,255,255,0.7); opacity: 0; pointer-events: none;
}
.tactical-grid-box.scanning .scan-line { animation: scan-line 1.8s linear both; }
@keyframes scan-line {
    0%   { top: 0; opacity: 1; }
    95%  { opacity: 1; }
    100% { top: calc(100% - 2px); opacity: 0; }
}
.photo-label {
    position: absolute; left: 6px; bottom: 6px; font-size: 9px; letter-spacing: 1px; color: #fff;
    background: rgba(0,0,0,0.65); padding: 2px 5px; pointer-events: none;
}

#sound-toggle {
    position: fixed; bottom: 44px; right: 14px; z-index: 10000;
    background: rgba(0,0,0,0.7); border: 1px solid #555; color: #aaa;
    font-family: var(--font-main); font-size: 10px; letter-spacing: 1px;
    padding: 6px 9px; cursor: pointer; text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
}
#sound-toggle.on { color: #fff; border-color: #fff; }
#sound-toggle.pulse { animation: pulse-border 1.6s infinite; }