/* ==============================================
   doshit.live // STYLESHEET
   Core Theme: Dark mode, Glassmorphism, Cyberpunk
   ============================================== */

   :root {
    --bg-dark: #050508;
    --cyan: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.6);
    --magenta: #ff003c;
    --magenta-glow: rgba(255, 0, 60, 0.6);
    --text-main: #f0f0f5;
    --glass-bg: rgba(10, 10, 15, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    touch-action: manipulation;
}

/* Typography */
.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.mono-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    word-break: break-all;
}

.cyan { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
.magenta { color: var(--magenta); text-shadow: 0 0 8px var(--magenta-glow); }

/* View Management */
.view {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
}

.view.active {
    opacity: 1;
    pointer-events: all;
}

/* ==============================================
   LANDING VIEW
   ============================================== */
#landing-view {
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    z-index: 10;
}

.landing-content {
    max-width: 500px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Glitch Effect */
.glitch-container {
    margin-bottom: 0.5rem;
}

.glitch-logo {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 0 10px var(--cyan)) drop-shadow(0 0 5px var(--magenta));
    animation: glitch-flicker 4s infinite;
}

@keyframes glitch-flicker {
    0%, 96%, 100% { opacity: 1; transform: translate(0, 0); filter: drop-shadow(0 0 10px var(--cyan)) drop-shadow(0 0 5px var(--magenta)); }
    97% { opacity: 0.5; transform: translate(-3px, 2px); filter: drop-shadow(0 0 20px var(--magenta)); }
    98% { opacity: 0.8; transform: translate(3px, -2px); filter: drop-shadow(0 0 15px var(--cyan)); }
    99% { opacity: 0.2; transform: translate(0, 0); }
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--magenta);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(12px, 9999px, 44px, 0); }
    20% { clip: rect(65px, 9999px, 88px, 0); }
    40% { clip: rect(104px, 9999px, 13px, 0); }
    60% { clip: rect(32px, 9999px, 97px, 0); }
    80% { clip: rect(74px, 9999px, 22px, 0); }
    100% { clip: rect(88px, 9999px, 55px, 0); }
}

.cyber-line {
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    margin: 1rem 0 2rem;
}

.subtitle {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: #a0a0b0;
}

.lore-box {
    text-align: left;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.lore-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

.lore-box p, .lore-list, .warning-text {
    position: relative;
    z-index: 1;
}

.lore-box p {
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.lore-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.lore-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
}

.lore-list span {
    background: var(--cyan);
    color: var(--bg-dark);
    font-weight: bold;
    width: 20px; height: 20px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.warning-text {
    color: var(--magenta);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.pwa-hint {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #666;
    max-width: 80%;
}

/* Grid Background */
.bg-grid {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: 
        url('assets/rolling_glitch_tshirt_wrap_map.png'),
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 600px, 40px 40px, 40px 40px;
    background-position: center, 0 0, 0 0;
    background-blend-mode: screen;
    opacity: 0.3;
    transform: perspective(500px) rotateX(60deg) translateY(-100px);
    animation: grid-move 10s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px); }
}

/* Buttons */
.cyber-btn {
    background: transparent;
    color: var(--cyan);
    border: 2px solid var(--cyan);
    padding: 1rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--cyan-glow);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.1), 0 0 15px rgba(0, 243, 255, 0.2);
    width: 100%;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.cyber-btn:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.3), 0 0 25px rgba(0, 243, 255, 0.4);
}

.cyber-btn:hover::before {
    left: 100%;
}

.cyber-btn.outline {
    border-color: var(--text-main);
    color: var(--text-main);
    text-shadow: none;
    box-shadow: none;
}

.cyber-btn.outline:hover {
    background: rgba(255,255,255,0.1);
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ==============================================
   AR CAMERA VIEW
   ============================================== */
#camera-feed {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.ar-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none; /* Let clicks pass to video if needed */
}

/* Reticle */
.reticle-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 280px; height: 280px;
    z-index: 6;
}

.reticle-corner {
    position: absolute;
    width: 40px; height: 40px;
    border-color: var(--cyan);
    border-style: solid;
    border-width: 0;
    transition: all 0.3s ease;
}

.tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; }
.tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; }
.bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; }
.br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; }

.scan-laser {
    position: absolute;
    top: 0; left: 10%; width: 80%; height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
    animation: laser-scan 2s infinite ease-in-out;
}

@keyframes laser-scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* HUD Top */
.hud-top {
    margin: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(5,5,8,0.75);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--cyan);
}

.hud-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.hud-row:last-child { margin-bottom: 0; }

.pulse-text {
    animation: pulse-op 1.5s infinite;
}

@keyframes pulse-op {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* HUD Bottom */
.hud-bottom {
    display: flex;
    padding: 1.5rem;
    gap: 1rem;
    pointer-events: all;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.glass-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(20,20,25,0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-btn svg {
    opacity: 0.7;
}

.glass-btn:active {
    transform: scale(0.95);
}

.glass-btn.active {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.glass-btn.active svg {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--cyan));
}


/* ==============================================
   MODALS
   ============================================== */
.modal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    pointer-events: all;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: translateY(20px);
}

.modal h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.modal-desc {
    color: #b0b0c0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.qr-wrapper {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.success-icon {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.success-panel {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.override-panel {
    border-color: var(--magenta);
    box-shadow: 0 0 40px rgba(255, 0, 60, 0.3);
}

.override-animation {
    background: var(--magenta);
    color: var(--bg-dark);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    padding: 1rem;
    margin: 1.5rem 0;
    animation: flash 0.5s infinite alternate;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0.6; }
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }

.modal-img { 
    width: 100%; 
    max-height: 120px; 
    object-fit: contain; 
    margin-bottom: 1rem; 
    mix-blend-mode: screen; 
    opacity: 0.8; 
}

.btn-icon { 
    font-size: 1.5rem; 
    display: block; 
    margin-bottom: 5px; 
}

#scan-canvas { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    z-index: 2; 
    pointer-events: none; 
}

/* Gait Meter */
.gait-meter-container { 
    position: absolute; 
    top: 20%; left: 50%; 
    transform: translateX(-50%); 
    width: 80%; 
    text-align: center; 
}
.meter-bg { 
    width: 100%; height: 30px; 
    background: rgba(255,255,255,0.1); 
    border: 2px solid var(--cyan); 
    border-radius: 15px; 
    overflow: hidden; 
    margin-top:1rem; 
}
.meter-fill { 
    width: 0%; height: 100%; 
    background: var(--magenta); 
    transition: width 0.1s, background 0.3s; 
}
.meter-fill.safe { 
    background: var(--cyan); 
}

/* Jam Module Styles */
.jam-ui {
    width: 100%; max-width: 450px;
    padding: 2rem;
    text-align: center;
}

.terminal-header { 
    color: var(--cyan); 
    margin-bottom: 0.5rem; 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 1.2rem; 
}
.terminal-output { 
    background: #000; 
    opacity: 0.85; 
    padding: 1rem; 
    margin-top: 0.5rem; 
    border: 1px solid rgba(0,243,255,0.3); 
    text-align: left;
}
.badge.signal-cloak { 
    background: var(--magenta); 
    color: #111; 
    padding: 0.3rem 0.6rem; 
    font-weight: bold; 
    border-radius: 4px; 
}
.glow-button { 
    background: var(--magenta); 
    color: #fff; 
    border: none; 
    padding: 1rem 1.2rem; 
    cursor: pointer; 
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255,0,60,0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}
.glow-button:hover {
    box-shadow: 0 0 25px rgba(255,0,60,0.8);
}
#visualizer { 
    width: 100%; 
    height: 80px; 
    background: rgba(0,0,0,0.5); 
    border-radius: 4px; 
    border: 1px solid rgba(255,255,255,0.1);
}
.neon-cyan { filter: hue-rotate(180deg) saturate(2); }

/* Override Module Styles */
.sequence-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    letter-spacing: 4px;
    padding: 1rem;
    color: var(--cyan);
    text-align: center;
    background: rgba(0,243,255,0.05);
    border: 1px solid var(--cyan);
    border-radius: 4px;
}

.hex-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 1rem;
    transition: opacity 0.3s ease;
}

.hex-btn {
    background: rgba(20,20,25,0.8);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    padding: 12px 0;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.1s ease;
}

.hex-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--cyan);
    color: var(--cyan);
}

.hex-btn.selected {
    background: var(--magenta);
    border-color: var(--magenta);
    color: #111;
}

.hex-btn.correct {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #111;
}

.req-met span {
    background: var(--cyan) !important;
    color: #111 !important;
}
.req-met {
    color: var(--text-main) !important;
    opacity: 0.5;
}

/* ==============================================
   HUB ARCHITECTURE (menu + screens)
   ============================================== */

/* The old sheet only defined .modal.hidden — bare .hidden did nothing, so
   "hidden" buttons and override states were actually visible. Load-bearing. */
.hidden { display: none !important; }

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

/* ---- main menu ---- */
.menu-scroll {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#menu-view .bg-grid {
    position: fixed;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

#profile-avatar {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}
#profile-avatar svg { width: 100%; height: 100%; display: block; }

.profile-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

#profile-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #a0a0b0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.chip-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.status-strip {
    display: flex;
    padding: 0.75rem 0.5rem;
}

.status-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.status-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: #7a7a8a;
}

.status-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-card {
    text-align: left;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}
.feature-card:hover, .feature-card:active {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
    transform: translateY(-2px);
}

.fc-icon { font-size: 1.6rem; }
.fc-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--cyan);
}
.fc-desc { font-size: 0.75rem; color: #a0a0b0; line-height: 1.4; }
.fc-req {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: var(--magenta);
}

.camera-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #7a7a8a;
    margin-top: 0.6rem;
    line-height: 1.5;
}

/* ---- feature screen chrome ---- */
.screen-body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.screen-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.screen-head h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    letter-spacing: 2px;
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.back-btn {
    background: rgba(20,20,25,0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.back-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.pad {
    padding: 1.25rem;
    text-align: center;
}
.pad h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--cyan);
    margin-bottom: 0.75rem;
}

/* ---- camera plumbing ---- */
#video-park { display: none; }

.camera-slot,
.camera-bg {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 0;
    overflow: hidden;
}
.camera-slot video,
.camera-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 1.5rem;
    gap: 1rem;
}
.scan-overlay #scan-hint {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 8px rgba(0,0,0,0.9);
}
.scan-overlay .cyber-btn {
    position: relative;
    z-index: 2;
}

/* ---- toasts (reciprocal sync, etc.) ---- */
#toast-host {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: calc(100% - 2rem);
    max-width: 380px;
    pointer-events: none;
}
.toast {
    background: rgba(10,10,15,0.96);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 1px;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 0 18px rgba(0,243,255,0.25);
    text-align: center;
    animation: toast-in 0.25s ease, toast-out 0.4s ease 3.2s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ==============================================
   DEADZONE — Panopticon sector-incursion sim
   ============================================== */

/* mid-band integrity (also fixes the OVERRIDE proxy meter, which already
   uses .meter-fill.warning in markup) */
.meter-fill.warning { background: #ffb000; }

/* featured hub card — spans the grid, marks the arcade */
.dz-card {
    grid-column: 1 / -1;
    border-color: rgba(0, 243, 255, 0.35);
    box-shadow: inset 0 0 25px rgba(0, 243, 255, 0.06), 0 0 15px rgba(0, 243, 255, 0.08);
}
.dz-new-tag {
    background: var(--magenta);
    color: #111;
    font-size: 0.55rem;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 6px;
    animation: pulse-op 1.5s infinite;
}

/* stage: full-bleed canvas + overlaid HUD */
.dz-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--bg-dark);
    touch-action: none;
}
#dz-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.dz-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    box-shadow: inset 0 0 120px rgba(255, 0, 60, 0.55);
}
.dz-vignette.dz-critical {
    animation: pulse-op 1.2s infinite;
    opacity: 0.75;
}

.dz-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.dz-hud-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: calc(0.6rem + env(safe-area-inset-top)) 0.6rem 0;
}
.dz-hud .back-btn,
.dz-icon-btn {
    pointer-events: auto;
}
.dz-icon-btn {
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dz-icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.dz-icon-btn:active { transform: scale(0.95); }

.dz-meters {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dz-hp {
    height: 12px;
    margin-top: 0;
    border-width: 1px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
}
.dz-statline {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: #a0a0b0;
}
.dz-seen { color: #7a7a8a; }
.dz-seen-bad { color: var(--magenta); text-shadow: 0 0 8px var(--magenta-glow); }
.dz-seen-ghost { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }

/* overlays (briefing / cache / pause / traced) — NOT .modal, so the screen
   manager's modal sweep never touches game state */
.dz-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 5, 8, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
}
.dz-panel {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    text-align: center;
    margin: auto;
}
.dz-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #7a7a8a;
    margin-bottom: 0.5rem;
}
.dz-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--cyan);
    text-shadow: 0 0 18px var(--cyan-glow);
    margin-bottom: 1rem;
    animation: glitch-flicker 4s infinite;
}
.dz-title-red {
    color: var(--magenta);
    text-shadow: 0 0 18px var(--magenta-glow);
}
.dz-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 1rem;
}
.dz-howto {
    list-style: none;
    text-align: left;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.dz-howto li {
    font-size: 0.8rem;
    color: #b0b0c0;
    line-height: 1.45;
}
.dz-howto li > span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 2px;
    margin-bottom: 2px;
}
.dz-best {
    font-size: 0.7rem;
    color: #ffb000;
    margin-bottom: 1.25rem;
}

/* supply cache cards */
#dz-upgrade-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dz-upgrade-card {
    text-align: left;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-left-width: 4px;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}
.dz-upgrade-card:hover { transform: translateY(-2px); }
.dz-upgrade-card:active { transform: scale(0.97); }
.dz-rarity-common { border-left-color: var(--cyan); }
.dz-rarity-common:hover { box-shadow: 0 0 18px rgba(0, 243, 255, 0.25); }
.dz-rarity-rare { border-left-color: #ffb000; }
.dz-rarity-rare:hover { box-shadow: 0 0 18px rgba(255, 176, 0, 0.25); }
.dz-rarity-epic { border-left-color: #39ff14; }
.dz-rarity-epic:hover { box-shadow: 0 0 18px rgba(57, 255, 20, 0.25); }
.dz-up-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 2px;
    color: #7a7a8a;
}
.dz-rarity-common .dz-up-tag { color: rgba(0, 243, 255, 0.8); }
.dz-rarity-rare .dz-up-tag { color: rgba(255, 176, 0, 0.9); }
.dz-rarity-epic .dz-up-tag { color: rgba(57, 255, 20, 0.9); }
.dz-up-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.dz-up-desc { font-size: 0.75rem; color: #a0a0b0; line-height: 1.4; }

/* traced report */
.dz-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 1rem 0 0.5rem;
    text-align: left;
}
.dz-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 6px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.dz-stat-k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 2px;
    color: #7a7a8a;
}
.dz-stat-v {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--cyan);
}
