        body {
            background-color: #050508;
            color: #e2e8f0;
            background-image: 
                radial-gradient(circle at 50% 0%, rgba(255, 0, 85, 0.12) 0%, transparent 70%),
                linear-gradient(to bottom, rgba(5, 5, 8, 0.95), rgba(5, 5, 8, 0.98));
            background-attachment: fixed;
            transition: background-color 0.5s ease;
        }

        /* Alert Themes */
        body.alert-yellow {
            background-color: #121003 !important;
            background-image: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
        }
        body.alert-red {
            background-color: #1a0305 !important;
            background-image: radial-gradient(circle at 50% 0%, rgba(255, 30, 39, 0.25) 0%, transparent 70%);
        }
        body.alert-black {
            background-color: #000000 !important;
            background-image: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
        }

        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        input[type=number] { -moz-appearance: textfield; }

        .scanlines {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            pointer-events: none;
            z-index: 9999;
            background: linear-gradient(
                rgba(18, 16, 16, 0) 50%, 
                rgba(0, 0, 0, 0.25) 50%
            );
            background-size: 100% 4px;
            opacity: 0.35;
        }

        .redacted {
            background-color: #ff1e27;
            color: transparent;
            padding: 0 4px;
            user-select: none;
            transition: all 0.25s ease;
            cursor: pointer;
            border-radius: 2px;
            display: inline-block;
        }
        .redacted:hover {
            background-color: rgba(255, 30, 39, 0.2);
            color: #ff4d4d;
            box-shadow: 0 0 8px rgba(255, 30, 39, 0.5);
        }
        .redacted.revealed {
            background-color: rgba(255, 30, 39, 0.15);
            color: #fca5a5;
            border-bottom: 1px dashed #ff1e27;
        }

        .reality-critical {
            animation: realityCriticalPulse 1.2s infinite alternate;
        }

        @keyframes realityCriticalPulse {
            0% {
                opacity: 0.35;
                transform: translate(0, 0);
                background-image:
                    radial-gradient(circle at 50% 50%, rgba(255, 0, 85, 0.15) 0%, transparent 70%),
                    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
            }
            20% { transform: translate(-3px, 1px); }
            40% { transform: translate(3px, -2px); }
            60% {
                opacity: 0.7;
                transform: translate(-2px, -2px);
                background-image:
                    radial-gradient(circle at 50% 50%, rgba(255, 0, 85, 0.35) 0%, transparent 70%),
                    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
            }
            80% { transform: translate(2px, 2px); }
            100% {
                opacity: 0.7;
                transform: translate(0, 0);
                background-image:
                    radial-gradient(circle at 50% 50%, rgba(255, 0, 85, 0.35) 0%, transparent 70%),
                    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
            }
        }

        .glow-red { box-shadow: 0 0 15px rgba(255, 30, 39, 0.25); }
        .glow-apeiron { box-shadow: 0 0 20px rgba(255, 0, 85, 0.45); }

        @keyframes pulse-red-border {
            0%, 100% { border-color: rgba(239, 68, 68, 0.3); }
            50% { border-color: rgba(255, 30, 39, 0.9); }
        }
        .border-pulse-keter { animation: pulse-red-border 2s infinite; }

        @keyframes apeiron-glitch {
            0% { border-color: #ff0055; box-shadow: 0 0 10px rgba(255,0,85,0.4); }
            33% { border-color: #9900ff; box-shadow: 0 0 15px rgba(153,0,255,0.6); }
            66% { border-color: #ff0000; box-shadow: 0 0 12px rgba(255,0,0,0.5); }
            100% { border-color: #ff0055; box-shadow: 0 0 10px rgba(255,0,85,0.4); }
        }
        .apeiron-border { animation: apeiron-glitch 2.5s infinite; }

        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #050508; }
        ::-webkit-scrollbar-thumb {
            background: #2a1215;
            border: 1px solid #ff1e27;
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover { background: #ff1e27; }

.clip-corner {
            clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
        }

        .nav-tabs {
            scrollbar-width: none;
        }
        .nav-tabs::-webkit-scrollbar {
            display: none;
        }
        .nav-tab-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            white-space: nowrap;
            transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
        }
        .nav-tab-btn:hover {
            transform: translateY(-1px);
        }
        @media (max-width: 767px) {
            .nav-tabs {
                width: 100%;
                justify-content: flex-start;
                overflow-x: auto;
                padding-bottom: 2px;
                flex-wrap: nowrap;
            }
            .nav-tab-btn {
                flex: 0 0 auto;
                min-width: 122px;
                padding-inline: 0.75rem;
            }
        }

        /* Custom themed dropdowns (replace native <select> popups, which can't be
           restyled consistently across browsers/OS) */
        .scip-select-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            background-color: #0e0e14;
            border: 1px solid #2a1215;
            color: #e2e8f0;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            padding: 0.55rem 0.7rem;
            border-radius: 0.375rem;
            cursor: pointer;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }
        .scip-select-btn:hover { border-color: rgba(255, 30, 39, 0.5); }
        .scip-select-btn.open {
            outline: none;
            border-color: #ff1e27;
            box-shadow: 0 0 0 3px rgba(255, 30, 39, 0.15);
        }
        .scip-select-chevron {
            color: #94a3b8;
            flex-shrink: 0;
            transition: transform 0.15s ease, color 0.15s ease;
        }
        .scip-select-btn.open .scip-select-chevron { transform: rotate(180deg); color: #ff1e27; }

        .scip-select-menu {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 6px);
            z-index: 30;
            width: 100%;
            max-width: 92vw;
            background-color: #14141d;
            border: 1px solid #2a1215;
            border-radius: 0.5rem;
            padding: 0.375rem;
            box-shadow: 0 12px 28px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,30,39,0.05);
            animation: scipMenuIn 0.12s ease-out;
        }
        @media (min-width: 640px) {
            .scip-select-menu {
                right: auto;
                width: max-content;
                min-width: 100%;
                max-width: none;
            }
        }
        @keyframes scipMenuIn {
            from { opacity: 0; transform: translateY(-4px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .scip-select-option {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            width: 100%;
            text-align: left;
            background: transparent;
            border: none;
            color: #cbd5e1;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.375rem;
            cursor: pointer;
            white-space: nowrap;
            transition: background-color 0.12s ease, color 0.12s ease;
        }
        .scip-select-option:hover { background-color: rgba(255, 30, 39, 0.12); color: #ffffff; }
        .scip-select-option.active {
            background-color: rgba(255, 30, 39, 0.16);
            color: #ffffff;
            box-shadow: inset 2px 0 0 #ff1e27;
        }
        .scip-select-option-locked { color: #fbbf24; }
        .scip-select-option-locked i { font-size: 10px; }
        .scip-select-option-locked:hover { background-color: rgba(251, 191, 36, 0.12); color: #fcd34d; }
        .scip-select-divider { height: 1px; background-color: rgba(42, 18, 21, 0.9); margin: 0.3rem 0.2rem; }
        .scip-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
