        :root {
            --system-pulse: 1;
        }

        @keyframes systemBreathing {
            0% {
                --system-pulse: 1;
                opacity: 1;
            }

            50% {
                --system-pulse: 0.7;
                opacity: 0.8;
            }

            100% {
                --system-pulse: 1;
                opacity: 1;
            }
        }

        :root {
            --font-primary: 'Arial Black', Impact, sans-serif;
            --font-secondary: 'Courier New', Courier, monospace;
            --white: #ffffff;
            --black: #000000;
        }

        /* DARK MODE - The elegant solution to invert lightness without destroying colors */
        html.dark-mode {
            filter: invert(1) hue-rotate(180deg);
        }

        /* Ensure HTML background is solidly defined so the inversion has a canvas to flip */
        html {
            background-color: var(--white);
            color: var(--black);
        }

        /* Core Layout */
        body {
            margin: 0;
            padding: 0;
            font-family: sans-serif;
            display: flex;
            height: 100vh;
            overflow: hidden;
            background-color: #ffffff;
        }

        /* --- BLOG IMAGE STYLING --- */
        .sap-doc-body img,
        .saw-field-value img {
            max-width: 100%;
            height: auto;
            border: 5px solid #000000;
            margin: 20px 0;
            display: block;
        }

        /* Hide Scrollbars Globally */
        ::-webkit-scrollbar {
            display: none;
        }

        * {
            scrollbar-width: none;
        }

        /* Loading Screen */
        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: #ffffff;
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 1;
            transition: opacity 0.5s ease;
        }

        #loading-screen img {
            width: 150px;
            animation: spin 3s linear infinite;
            opacity: 0;
            /* Wait for grace period before showing spinner */
            transition: opacity 0.3s ease;
            transform-origin: center center;
            display: block;
        }

        @keyframes spin {
            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes dropDownPrint {
            0% {
                opacity: 0;
                transform: translateY(-40px);
            }

            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes centerDropDown {
            0% {
                opacity: 0;
                transform: translate(-50%, -100%);
            }

            100% {
                opacity: 1;
                transform: translate(-50%, -50%);
            }
        }

        /* ---------------------------------------------------
           GATEWAY OVERLAY 
           --------------------------------------------------- */
        #gateway-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: #ffffff;
            z-index: 10000;
            /* Highest priority, above loading screen initially */
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        #gateway-screen.unlocked {
            opacity: 0;
            transform: scale(1.1);
            pointer-events: none;
        }

        .gateway-box {
            border: 8px solid #000000;
            padding: 40px;
            text-align: center;
            width: 400px;
            max-width: 90vw;
        }

        .gateway-title {
            font-size: 1.5rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 20px;
            font-weight: bold;
        }

        .gateway-input {
            width: 100%;
            padding: 15px;
            font-size: 1.2rem;
            border: 4px solid #000000;
            margin-bottom: 20px;
            text-align: center;
            box-sizing: border-box;
            outline: none;
            text-transform: uppercase;
            font-family: monospace;
        }

        .gateway-input::placeholder {
            color: #aaaaaa;
        }

        .gateway-btn {
            background-color: #000000;
            color: #ffffff;
            border: none;
            padding: 15px 30px;
            font-size: 1.2rem;
            font-weight: bold;
            text-transform: uppercase;
            cursor: pointer;
            width: 100%;
            transition: background-color 0.2s, color 0.2s;
        }

        .gateway-btn:hover {
            background-color: #ffffff;
            color: #000000;
            outline: 4px solid #000000;
            outline-offset: -4px;
        }

        .gateway-error {
            color: #ff0000;
            font-size: 0.9rem;
            font-weight: bold;
            margin-top: 15px;
            min-height: 20px;
            /* Keep space even when empty */
            text-transform: uppercase;
        }

        .gateway-links {
            margin-top: 20px;
            font-size: 0.9rem;
        }

        .gateway-links a {
            color: #000000;
            text-decoration: underline;
            cursor: pointer;
            font-weight: bold;
        }

        /* Prevent 1-frame flicker for returning users */
        html.gateway-bypassed #gateway-screen {
            display: none !important;
        }

        .gateway-view {
            display: none;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        .gateway-view.active {
            display: flex;
        }

        .drop-down-print {
            animation: dropDownPrint 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        .centerDropDown {
            animation: centerDropDown 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        .main-canvas {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: right 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 1;
        }

        /* When shelf is open, shift whole workspace away from it */
        body:not(:has(#shelf.closed)) .main-canvas {
            right: 140px;
            /* Shrinks the container width */
        }

        /* Asset Placement Containers */
        .top-logo-container {
            position: absolute;
            top: 30px;
            left: 30px;
            opacity: 0;
            z-index: 20;
            /* Ensures it sits above #desktop-container */
            /* Hide initially for drop-down */
        }

        .center-asset-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 400px;
            z-index: 1;
            /* Above canvas */
            opacity: 0;
            z-index: 5;
            /* Above desktop carpet, below drawers */
            pointer-events: none;
            transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .center-asset-container.booted {
            opacity: 1;
            transform: translate(-50%, -50%);
        }

        #asset-center {
            cursor: pointer;
            /* No native CSS transition on properties GSAP controls, let GSAP handle it */
            filter: grayscale(0%);
            transition: filter 0.3s ease;
            pointer-events: auto;
            /* ENABLE CLICK */
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .center-logo-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            /* Animation will be applied here */
        }

        .top-logo-container img {
            height: 30px;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .top-logo-container img:hover {
            transform: scale(1.05);
        }

        .center-asset-container img {
            height: 200px;
        }

        /* Desktop Injection Container */
        #desktop-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2;
            /* Sits above wallpaper, below shelf/drawers */
            pointer-events: none;
            /* Let clicks pass through when empty */
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: rgba(255, 255, 255, 0);
            transition: background-color 0.6s ease;
        }

        /* Active class allows interaction when a component is loaded and fades in the background */
        #desktop-container.active {
            pointer-events: auto;
            background-color: rgba(255, 255, 255, 1);
            z-index: 10;
            /* Above center logo (z-index 5) so injected components are not obscured */
        }

        /* Base class for injected components to animate in */
        .desktop-component {
            opacity: 0;
            transform: scale(0.95);
            transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .desktop-component.loaded {
            opacity: 1;
            transform: scale(1);
        }

        /* The Shelf */
        .shelf {
            position: fixed;
            right: 0;
            top: 0;
            height: 100vh;
            width: 140px;
            border-left: 8px solid #000000;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 120px;
            transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 1000;
            user-select: none;
        }

        /* Dragged Closed State */
        .shelf.closed {
            transform: translateX(148px);
        }

        /* Edge trigger to pull shelf back out */
        .shelf-trigger {
            position: absolute;
            right: 0;
            top: 0;
            height: 100vh;
            width: 20px;
            z-index: 1100;
            /* Highest priority for access */
            cursor: pointer;
        }

        .shelf-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            gap: 15px;
            /* Space between icon and label */
            transition: transform 0.2s ease;
        }

        .shelf-item:hover {
            transform: scale(1.05);
            /* Hover effect applies to the whole icon+text group */
        }

        .shelf-label {
            font-size: 1.8rem;
            font-weight: bold;
            text-transform: uppercase;
            transition: opacity 0.3s ease, transform 0.3s ease;
            opacity: 1;
            transform: translateX(0);
        }

        /* Hide the label by sliding it left as if it dragged into the drawer */
        .shelf-label.hidden {
            opacity: 0;
            transform: translateX(-40px);
            pointer-events: none;
        }



        .top-logo-container img {
            height: 30px;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .top-logo-container img:hover {
            transform: scale(1.05);
        }

        .center-asset-container img {
            height: 200px;
        }

        /* Desktop Injection Container */
        #desktop-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2;
            /* Sits above wallpaper, below shelf/drawers */
            pointer-events: none;
            /* Let clicks pass through when empty */
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: rgba(255, 255, 255, 0);
            transition: background-color 0.6s ease;
        }

        /* Active class allows interaction when a component is loaded and fades in the background */
        #desktop-container.active {
            pointer-events: auto;
            background-color: rgba(255, 255, 255, 1);
            z-index: 10;
            /* Above center logo (z-index 5) so injected components are not obscured */
        }

        .desktop-component {
            opacity: 0;
            transform: scale(0.95);
            transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            will-change: opacity, transform;
        }

        .desktop-component.loaded {
            opacity: 1;
            transform: scale(1);
        }

        /* The Shelf */
        .shelf {
            position: fixed;
            right: 0;
            top: 0;
            height: 100vh;
            width: 140px;
            border-left: 8px solid #000000;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 120px;
            transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: transform;
            z-index: 1000;
            user-select: none;
        }

        /* Dragged Closed State */
        .shelf.closed {
            transform: translateX(148px);
        }

        /* Edge trigger to pull shelf back out */
        .shelf-trigger {
            position: absolute;
            right: 0;
            top: 0;
            height: 100vh;
            width: 20px;
            z-index: 1100;
            /* Highest priority for access */
            cursor: pointer;
        }

        .shelf-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            gap: 15px;
            /* Space between icon and label */
            transition: transform 0.2s ease;
        }

        .shelf-item:hover {
            transform: scale(1.05);
            /* Hover effect applies to the whole icon+text group */
        }

        .shelf-label {
            font-size: 1.8rem;
            font-weight: bold;
            text-transform: uppercase;
            transition: opacity 0.3s ease, transform 0.3s ease;
            opacity: 1;
            transform: translateX(0);
        }

        /* Hide the label by sliding it left as if it dragged into the drawer */
        .shelf-label.hidden {
            opacity: 0;
            transform: translateX(-40px);
            pointer-events: none;
        }

        .icon-btn {
            width: 80px;
            pointer-events: none;
            /* Clicks are handled by the parent .shelf-item */
        }

        /* Drawer Logic (Fade In + Slide In) */
        .drawer {
            position: fixed;
            right: 140px;
            width: 300px;
            /* height is managed dynamically by JS based on state (docked/floating) */
            background: #ffffff;
            border: 8px solid #000000;
            border-radius: 0;
            padding: 0;
            box-sizing: border-box;
            background: #ffffff;
            box-shadow: none;
            z-index: 5;
            overflow: hidden;
            pointer-events: none;
            opacity: 0;
            transform: translateY(-50%) translateX(40px);
            transition: opacity 0.2s ease-in, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: transform, opacity, width, height, top, left, right;
        }

        /* The active state (Visible and resting in place) */
        .drawer.open {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
            pointer-events: auto;
        }

        .drawer-header {
            font-weight: bold;
            font-size: 1.8rem;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-transform: uppercase;
            cursor: grab;
            user-select: none;
            /* Restore border so minimized view has a label separator */
            border-bottom: 4px solid #000000;
        }

        .drawer-header:active {
            cursor: grabbing;
        }

        /* Floating on desktop state */
        .drawer.floating {
            /* Fills the absolute entirety of the workspace. 
               Width is computed dynamically via JS when shelf opens/closes. */
            width: auto !important;
            /* Allow stretch between left and right */
            height: 100vh !important;
            top: 0px !important;
            left: 0px !important;
            /* right is handled in JS to sync with shelf */
            transform: none !important;
            /* Critical to prevent translateY jumping */
            transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: none;
            overflow: hidden;
        }

        /* Specific z-indexes for drawers so they layer properly if multiple are dragged out */
        #drawer-sap.floating {
            z-index: 50;
        }

        #drawer-saw.floating {
            z-index: 51;
        }

        #drawer-sam.floating {
            z-index: 52;
        }

        /* Dragging state (when actively held by the mouse) */
        .drawer.dragging {
            transition: none !important;
            /* Move instantly with cursor */
            transform: none !important;
            /* Snap visually to exact mouse coords */
            opacity: 0.95;
            z-index: 100 !important;

            /* While dragging, it shrinks slightly to feel grabbable before it expands on drop */
            width: 500px !important;
            height: 400px !important;

            box-shadow: none !important;
        }

        /* --- ANTI-CRUNCH VISIBILITY RULES --- */
        /* By default, hide anything intended for expanded/floating views */
        [id$="-extended"] {
            display: none !important;
        }

        /* By default, show minimized content */
        [class$="-minimized-view"] {
            display: flex !important;
        }

        /* If the drawer is floating, flip the visibility instantly */
        .drawer.floating [id$="-extended"] {
            display: block !important;
            height: calc(100% - 60px);
        }

        .drawer.floating [class$="-minimized-view"] {
            display: none !important;
        }

        .drawer-content {
            height: auto !important;
            min-height: 160px;
            /* Allows content to dictate exact height, while asserting a tight minimum */
            box-sizing: border-box;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px 10px 25px 10px;
            /* Stronger asymmetric padding to hold the content frame perfectly */
            gap: 8px;
        }

        .drawer-spinner-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 40px 0;
        }

        .drawer-spinner {
            width: 60px;
            animation: spin 3s linear infinite;
            transform-origin: center center;
            display: block;
        }

        /* Settings Icon inside Drawer Header */
        .drawer-settings-btn {
            position: absolute;
            right: 15px;
            top: 15px;
            width: 30px;
            height: 30px;
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.2s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 200;
            /* Elevated to stay above all content */
        }

        .drawer-settings-btn:hover {
            opacity: 1;
            transform: rotate(90deg);
        }

        .drawer-settings-btn img {
            width: 100%;
            height: 100%;
            display: block;
        }

        /* --- SETTINGS MODAL --- */
        #settings-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            width: 500px;
            max-width: 90vw;
            background: #ffffff;
            border: 8px solid #000000;
            z-index: 5000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            display: flex;
            flex-direction: column;
        }

        #settings-modal.active {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }

        .settings-header {
            height: 60px;
            border-bottom: 4px solid #000000;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            background: #ffffff;
        }

        .settings-close-btn {
            cursor: pointer;
            font-size: 1.5rem;
            line-height: 1;
            padding: 5px;
            transition: transform 0.2s;
        }

        .settings-close-btn:hover {
            transform: scale(1.2);
        }

        .settings-content {
            padding: 30px;
            overflow-y: auto;
            max-height: 70vh;
            scrollbar-width: thin;
            scrollbar-color: #000 #fff;
        }

        .settings-section {
            margin-bottom: 40px;
        }

        .settings-section-title {
            font-size: 0.7rem;
            font-weight: 900;
            text-transform: uppercase;
            opacity: 0.4;
            letter-spacing: 0.2em;
            margin-bottom: 15px;
            border-bottom: 2px solid #eee;
            padding-bottom: 5px;
        }

        .settings-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .settings-label {
            font-weight: 900;
            font-size: 0.9rem;
            text-transform: uppercase;
        }

        /* Industrial Toggle */
        .settings-toggle {
            width: 50px;
            height: 24px;
            border: 3px solid #000;
            position: relative;
            cursor: pointer;
            transition: background 0.2s;
        }

        .settings-toggle.on {
            background: #000;
        }

        .settings-toggle::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 14px;
            height: 14px;
            background: #000;
            transition: transform 0.2s, background 0.2s;
        }

        .settings-toggle.on::after {
            transform: translateX(26px);
            background: #fff;
        }

        /* Industrial Slider */
        .settings-slider-container {
            width: 150px;
            height: 6px;
            background: #eee;
            position: relative;
            border: 4px solid #000;
            cursor: pointer;
        }

        .settings-slider-fill {
            height: 100%;
            background: #000;
            width: 50%;
        }

        .settings-slider-thumb {
            position: absolute;
            top: -6px;
            left: 50%;
            width: 14px;
            height: 14px;
            background: #000;
            transform: translateX(-50%);
        }

        #hub-core {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #fff;
            z-index: 900;
            /* Below shelf (1000) so shelf glides over it */
            opacity: 0;
            pointer-events: none;
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 60px 1fr 1fr;
            border: 8px solid #000;
            box-sizing: border-box;
            transition: opacity 0.5s ease, right 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: opacity, right;
        }

        body:not(:has(#shelf.closed)) #hub-core {
            right: 140px;
        }

        #hub-core.active {
            opacity: 1;
            pointer-events: auto;
        }

        .hub-quadrant {
            border: 4px solid #000;
            overflow: hidden;
            position: relative;
            background: #fff;
            display: flex;
            flex-direction: column;
        }

        #hub-quad-sap {
            grid-column: 1;
            grid-row: 2;
        }

        #hub-quad-saw {
            grid-column: 2;
            grid-row: 2;
        }

        #hub-quad-sam {
            grid-column: 1 / span 2;
            grid-row: 3;
        }

        .hub-quadrant-label {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 0.7rem;
            font-weight: 900;
            opacity: 0.3;
            letter-spacing: 0.2em;
            z-index: 10;
        }

        .hub-header {
            grid-column: 1 / span 2;
            grid-row: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #fff;
            padding: 0 40px;
            border-bottom: 4px solid #000;
        }

        .hub-header-title {
            font-size: 2rem;
            font-weight: 900;
            letter-spacing: 0.5em;
            text-transform: uppercase;
        }

        .guide-arrow-label {
            background: #000;
            color: #fff;
            padding: 12px 25px;
            font-weight: 900;
            font-size: 1.2rem;
            text-transform: uppercase;
            margin-top: 10px;
            white-space: nowrap;
            font-family: var(--font-primary);
            border: 5px solid #000;
            box-shadow: 0 0 0 4px #fff;
            /* Inner white gap effect */
            outline: 5px solid #000;
            /* Thick outer black border */
        }

        .hub-close-btn {
            background: #000;
            color: #fff;
            padding: 10px 40px;
            font-weight: 900;
            letter-spacing: 0.3em;
            cursor: pointer;
            border: 4px solid #000;
            transition: background 0.2s ease, color 0.2s ease;
            text-transform: uppercase;
        }

        .hub-close-btn:hover {
            background: #fff;
            color: #000;
        }

        #asset-center {
            cursor: pointer;
            pointer-events: auto;
            transition: opacity 0.6s ease;
        }

        body.desktop-active .center-asset-container {
            opacity: 0 !important;
            pointer-events: none !important;
        }

        /* --- GLASS BOX CANVAS --- */
        #glass-box-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 0;
            opacity: 0.2;
            pointer-events: none;
        }

        /* --- CLI OVERLAY --- */
        #cli-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(255, 255, 255, 0.95);
            z-index: 15000;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: opacity 0.3s ease;
        }

        #cli-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .cli-container {
            width: 800px;
            max-width: 90vw;
            background: #000;
            padding: 40px;
            display: flex;
            align-items: center;
            border: 8px solid #000;
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
        }

        .cli-prefix {
            color: #fff;
            font-family: var(--font-secondary);
            font-size: 2rem;
            font-weight: 900;
            margin-right: 20px;
        }

        #cli-input {
            flex-grow: 1;
            background: transparent;
            border: none;
            color: #fff;
            font-family: var(--font-secondary);
            font-size: 2rem;
            font-weight: 900;
            outline: none;
            text-transform: uppercase;
        }

        #cli-input::placeholder {
            color: #333;
        }

        /* --- TACTICAL UTILITIES --- */
        .monospace {
            font-family: var(--font-secondary) !important;
        }

        .tactical-log {
            font-family: var(--font-secondary);
            font-size: 0.85rem;
            line-height: 1.4;
            color: #000;
        }

        .tactical-timestamp {
            opacity: 0.5;
            margin-right: 10px;
            font-weight: bold;
        }

        /* --- CITIZEN GUIDE ARROW --- */
        .guide-arrow {
            position: fixed;
            top: 75px;
            left: 40px;
            z-index: 10001;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .guide-arrow.visible {
            opacity: 1;
        }

        .guide-arrow-icon {
            font-size: 3.5rem;
            color: #000;
            animation: guideBounce 1s infinite ease-in-out;
            line-height: 1;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
        }

        .guide-arrow-label {
            background: #fff;
            color: #000;
            padding: 12px 25px;
            font-weight: 900;
            font-size: 1.2rem;
            text-transform: uppercase;
            margin-top: 10px;
            white-space: nowrap;
            font-family: var(--font-primary);
            border: 5px solid #000;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        @keyframes guideBounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-20px);
            }
        }

        /* --- VISUAL FILTERS --- */
        body.scanlines-active::after {
            content: " ";
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
            z-index: 99999;
            background-size: 100% 4px, 6px 100%;
            pointer-events: none;
        }

        body::before {
            content: " ";
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            z-index: 99998;
            pointer-events: none;
            background-color: transparent;
            opacity: 0.15;
            mix-blend-mode: multiply;
            transition: background-color 0.5s ease;
        }

        html.dark-mode body::before {
            mix-blend-mode: screen;
            opacity: 0.25;
        }

        body.tint-r::before {
            background-color: #ffb3b3;
        }

        body.tint-y::before {
            background-color: #ffffb3;
        }

        body.tint-g::before {
            background-color: #b3ffb3;
        }

        body.tint-c::before {
            background-color: #b3ffff;
        }

        body.tint-b::before {
            background-color: #b3b3ff;
        }

        body.tint-m::before {
            background-color: #ffb3ff;
        }



        /* --- PILLAR SPECIFIC SETTINGS --- */
        /* SAP Compact Mode */
        body.sap-compact .sap-item {
            padding: 6px 15px;
            font-size: 0.75rem;
        }

        body.sap-compact .sap-doc-content {
            padding: 30px 40px;
        }

        body.sap-compact .sap-doc-title {
            font-size: 2.5rem;
            margin-bottom: 15px;
        }

        body.sap-compact .sap-pdf-viewer {
            height: 85vh;
        }

        /* SAW Hide Completed */
        body.saw-hide-completed .saw-stack-item.status-complete {
            display: none !important;
        }

        body.saw-hide-completed .saw-item.completed {
            display: none !important;
        }


        /* --- TERMINAL MODE OVERRIDES --- */
        body.terminal-mode {
            --font-primary: 'Courier New', Courier, monospace !important;
            --font-secondary: 'Courier New', Courier, monospace !important;
            background-color: #050505 !important;
            color: #ffffff !important;
            text-shadow: 0 0 3px currentColor;
        }

        body.terminal-mode * {
            font-family: 'Courier New', Courier, monospace !important;
        }

        body.terminal-mode .gateway-box,
        body.terminal-mode .drawer,
        body.terminal-mode .drawer-header,
        body.terminal-mode .settings-section,
        body.terminal-mode input,
        body.terminal-mode button,
        body.terminal-mode .saw-search-wrap,
        body.terminal-mode .saw-search-input,
        body.terminal-mode .saw-record-header,
        body.terminal-mode .sap-sidebar,
        body.terminal-mode .sap-doc-display,
        body.terminal-mode .sam-hud-block,
        body.terminal-mode .sam-readout-box,
        body.terminal-mode .saw-stack-item,
        body.terminal-mode #system-prompt-modal>div {
            border-style: dashed !important;
            border-color: #fff !important;
            border-width: 2px !important;
            background-color: #000 !important;
            color: #fff !important;
        }

        body.terminal-mode .drawer-header,
        body.terminal-mode .gateway-title,
        body.terminal-mode .saw-panel-header,
        body.terminal-mode .sap-panel-header,
        body.terminal-mode .settings-section-title {
            background-color: transparent !important;
            color: #fff !important;
            border-bottom: 2px dashed #fff !important;
        }

        body.terminal-mode .gateway-btn,
        body.terminal-mode #apply-calibration-btn,
        body.terminal-mode button {
            background: transparent !important;
            color: #fff !important;
            transition: none !important;
        }

        body.terminal-mode .gateway-btn:hover,
        body.terminal-mode #apply-calibration-btn:hover,
        body.terminal-mode button:hover {
            background: #fff !important;
            color: #000 !important;
            text-shadow: none !important;
        }

        /* Fix pastel tints on black background */
        body.terminal-mode::before {
            mix-blend-mode: screen !important;
            opacity: 0.3 !important;
        }

        body.terminal-mode .center-asset-container {
            filter: invert(1);
        }

        body.terminal-mode .sap-item:hover,
        body.terminal-mode .saw-item:hover {
            background-color: transparent !important;
            border-left: 2px dashed #fff !important;
        }

        body.terminal-mode .sap-item.active,
        body.terminal-mode .saw-item.active {
            background-color: #fff !important;
            color: #000 !important;
            border-left: 4px solid #fff !important;
            text-shadow: none !important;
        }