    /* 10a (P3-A): czcionki obudowy lokalnie (SIL OFL, pliki z @fontsource; licencje w fonts/) – bez żądań do Google Fonts.
       Share Tech Mono ma tylko podzbiór łaciński (jak w Google Fonts); polskie znaki diakrytyczne w tej czcionce biorą się z czcionki zapasowej. */
    @font-face {
      font-family: 'Share Tech Mono';
      font-style: normal;
      font-weight: 400;
      font-display: swap;
      src: url('../fonts/share-tech-mono-latin-400.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 400;
      font-display: swap;
      unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
      src: url('../fonts/ibm-plex-mono-latin-ext-400.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 400;
      font-display: swap;
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
      src: url('../fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 500;
      font-display: swap;
      unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
      src: url('../fonts/ibm-plex-mono-latin-ext-500.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 500;
      font-display: swap;
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
      src: url('../fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 600;
      font-display: swap;
      unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
      src: url('../fonts/ibm-plex-mono-latin-ext-600.woff2') format('woff2');
    }

    @font-face {
      font-family: 'IBM Plex Mono';
      font-style: normal;
      font-weight: 600;
      font-display: swap;
      unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
      src: url('../fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
      -webkit-user-select: none;
    }

    :root {
      /* CRT Optical & Physics Tokens */
      --crt-duration: 750ms;
      --crt-glow-color: #00ff66;
      --crt-glow-dim: #008833;
      --crt-bg-color: #031408;
      --crt-flare-color: #38bdf8;
      --crt-decay-start: #ffffff;
      --crt-decay-mid: #fbbf24;
      --crt-decay-end: #7f1d1d;
      --crt-scanline-opacity: 0.85;
      --crt-vignette-opacity: 0.95;

      /* Dynamic Aspect Ratio Tokens (4:3 -> 1.3333, 16:10 -> 1.6, 16:9 -> 1.7778) */
      --crt-aspect-ratio: 4 / 3;
      --crt-aspect-ratio-val: 1.3333;

      /* Hardware Cabinet Palettes */
      --cabinet-bg-top: #2c2f37;
      --cabinet-bg-bottom: #191a1e;
      --cabinet-border: #3d414e;
      --cabinet-shadow: rgba(0, 0, 0, 0.85);
      --bezel-inner: #0d0e12;
      --knob-metal-rim: #424652;
      --knob-cap: #1f2127;
      --accent-cyan: #38bdf8;
    }

    html,
    body {
      width: 100%;
      height: 100%;
    }

    body {
      background-color: #080a0f;
      background-image:
        radial-gradient(circle at 50% 35%, #161e2b 0%, #06080c 78%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
      background-size: 100% 100%, 32px 32px, 32px 32px;
      color: #e2e8f0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", monospace, sans-serif;
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: clamp(8px, 2vw, 20px);
      overflow-x: hidden;
    }

    /* M11: niskie okna (do 1100 px, w tym 1080p) – mniejszy margines strony, żeby obudowa mniej traciła na wysokości */
    @media (max-height: 1100px) {
      body {
        padding-top: 8px;
        padding-bottom: 8px;
      }
    }

    .crt-appliance-stage {
      width: 100%;
      display: grid;
      place-items: center;
      position: relative;
      z-index: 10;
      pointer-events: none;
    }

    /* 10j: poświata ekranu. Zmienne ustawia sterownik w skrypcie (zdarzenia, bez odpytywania): kolor (--gl-r/g/b),
       natężenie (--gi, rośnie z gałką ANALOG, 0 przy wyłączonym kineskopie) i rozmycie (--gb, rośnie z ANALOG).
       Rozmyte cienie są rysowane raz na własnej warstwie, a natężenie to tylko jej przezroczystość (kompozytor, bez ponownego
       rysowania) – pierwsza wersja z cieniami skalowanymi alfą spowalniała pierwszą klatkę po wznowieniu symulacji. */
    .crt-monitor-casing {
      position: relative;
      z-index: 10;
      pointer-events: auto;
      width: 100%;
      /* M11: --case-max-w liczone w JS (fitCase) z faktycznej wysokości ramy, kratek i rzędu gałek – obudowa mieści się w oknie;
         wzór 85vh jest tylko wartością zapasową przed pierwszym pomiarem */
      max-width: min(100%, var(--case-max-w, calc(85vh * var(--crt-aspect-ratio-val, 1.3333) + 72px)));
      /* 10j: jedno źródło światła (lewa-góra) – ten sam kierunek oświetlenia co w małym monitorze */
      background: linear-gradient(162deg, #333741 0%, #2a2d35 22%, #202228 58%, #17181c 100%);
      border: 2px solid var(--cabinet-border);
      border-color: #454a58 #2c2f38 #1d1f25 #3b3f4c;
      border-radius: clamp(16px, 3.2vw, 28px);
      padding: clamp(12px, 2.5vw, 24px) clamp(14px, 3.2vw, 32px) clamp(12px, 2vw, 18px) clamp(14px, 3.2vw, 32px);
      box-shadow:
        0 35px 70px -15px var(--cabinet-shadow),
        0 18px 36px -18px rgba(0, 0, 0, 0.95),
        inset 2px 2px 1px rgba(255, 255, 255, 0.17),
        inset -1px -4px 3px rgba(0, 0, 0, 0.72),
        inset 0 0 44px rgba(0, 0, 0, 0.18);
      contain: layout paint;
      transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Top Heat Dissipation Vents */
    .casing-vents {
      display: flex;
      justify-content: center;
      gap: clamp(6px, 1.2vw, 10px);
      margin-bottom: clamp(8px, 1.6vw, 14px);
    }

    .vent-slit {
      width: clamp(26px, 5.5vw, 44px);
      height: 4px;
      background: #0d0e11;
      border-radius: 2px;
      box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .crt-bezel-frame {
      position: relative;
      background: var(--bezel-inner);
      padding: clamp(6px, 1.05vw, 11px);
      /* 9k: węższa szara ramka kineskopu (było 8–16 px) – więcej miejsca na obraz */
      border-radius: clamp(16px, 3.2vw, 28px);
      /* 10j: wnęka ekranu – ściana od strony światła w cieniu, dolna i prawa krawędź łapią światło */
      box-shadow:
        inset 3px 6px 16px rgba(0, 0, 0, 0.97),
        inset 0 0 0 2px #1e2026,
        1px 1px 0 rgba(255, 255, 255, 0.10),
        -1px -1px 0 rgba(0, 0, 0, 0.5);
    }

    /* 10j: zarejestrowane zmienne poświaty dla płynnej interpolacji barw CSS */
    @property --gl-r {
      syntax: '<number>';
      inherits: true;
      initial-value: 250;
    }

    @property --gl-g {
      syntax: '<number>';
      inherits: true;
      initial-value: 190;
    }

    @property --gl-b {
      syntax: '<number>';
      inherits: true;
      initial-value: 60;
    }

    /* 10j: zewnętrzny pierścień poświaty ekranu. Leży pod szkłem, więc widać tylko to, co wychodzi poza szkło.
       Płynne przejście kolorów (box-shadow) i subtelna, organiczna fluktuacja jasności kineskopu
       działają całkowicie na kompozytorze GPU (filter / opacity), bez narzutu na wątek główny i fizykę symulacji. */
    .crt-bezel-frame::before {
      content: '';
      position: absolute;
      inset: clamp(6px, 1.05vw, 11px);
      border-radius: clamp(10px, 2.2vw, 18px);
      pointer-events: none;
      box-shadow:
        0 0 calc(14px * var(--gb, 1)) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / 0.25),
        0 0 calc(32px * var(--gb, 1)) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / 0.15),
        0 0 calc(70px * var(--gb, 1)) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / 0.08),
        0 0 calc(125px * var(--gb, 1)) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / 0.04);
      opacity: var(--gi, 0);
      will-change: opacity, filter;
      transition: opacity 0.6s ease, box-shadow 1.1s cubic-bezier(0.16, 1, 0.3, 1);
      animation: crt-glow-fluctuate 12s ease-in-out infinite;
    }

    /* 10n: subtelna fluktuacja jasności poświaty ekranu (mikro-wahania zasilania kineskopu CRT).
       Przez większość czasu stabilna (brightness 1.0), co kilkanaście sekund delikatnie i miękko faluje (3–5%). */
    @keyframes crt-glow-fluctuate {

      0%,
      100% {
        filter: brightness(1);
      }

      14% {
        filter: brightness(1);
      }

      15.2% {
        filter: brightness(0.96);
      }

      15.8% {
        filter: brightness(1.025);
      }

      16.5% {
        filter: brightness(0.975);
      }

      17.4% {
        filter: brightness(1);
      }

      38% {
        filter: brightness(1);
      }

      39.1% {
        filter: brightness(1.03);
      }

      39.8% {
        filter: brightness(0.965);
      }

      40.6% {
        filter: brightness(1);
      }

      63% {
        filter: brightness(1);
      }

      64.0% {
        filter: brightness(0.96);
      }

      64.7% {
        filter: brightness(1.02);
      }

      65.5% {
        filter: brightness(1);
      }

      86% {
        filter: brightness(1);
      }

      87.1% {
        filter: brightness(1.025);
      }

      87.8% {
        filter: brightness(0.97);
      }

      88.6% {
        filter: brightness(1);
      }
    }

    .crt-screen-glass {
      position: relative;
      width: 100%;
      aspect-ratio: var(--crt-aspect-ratio, 4 / 3);
      background-color: var(--crt-bg-color, #020403);
      border-radius: clamp(10px, 2.2vw, 18px);
      overflow: hidden;
      box-shadow: inset 0 0 clamp(30px, 8vw, 70px) rgba(0, 0, 0, 0.98);
      transform: translateZ(0);
      backface-visibility: hidden;
      contain: layout style paint;
      transition: aspect-ratio 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* 10o: wewnętrzny świetlny rant szyby kineskopu (Inner Phosphor Rim) – miękkie przejście krawędzi obrazu.
       Imituje załamanie światła luminoforu na krawędzi grubej szklanej bańki CRT; znika ostre cyfrowe odcięcie ramki.
       Działa w całości na kompozytorze GPU, gaśnie z kineskopem (--gi) i płynnie zmienia barwę. */
    .crt-screen-glass::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      z-index: 32;
      box-shadow:
        inset 0 0 clamp(12px, 2.2vw, 24px) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / calc(0.18 * var(--gi, 1))),
        inset 0 0 clamp(28px, 4.5vw, 52px) 0 rgb(var(--gl-r, 250) var(--gl-g, 190) var(--gl-b, 60) / calc(0.08 * var(--gi, 1)));
      opacity: var(--gi, 0);
      transition: opacity 0.6s ease, box-shadow 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Hidden SVG Filter Definitions (0x0 layout, never display:none so url(#...) stays active) */
    .crt-svg-defs {
      position: absolute;
      width: 0;
      height: 0;
      overflow: hidden;
      pointer-events: none;
    }

    /* Deflection Chamber */
    .crt-deflection-chamber {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      transform-origin: center center;
      display: flex;
      flex-direction: column;
      /* A4: will-change ustawiane z JS tylko na czas włączania/wyłączania (CRTEngine.setState) */
      contain: layout style paint;
    }

    /* Isolated Optical Plane: Signal Pass -> Phosphor Mask -> Scanlines -> Luminance/Contrast Restorer */
    .crt-optical-plane {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      isolation: isolate;
      contain: layout style paint;
    }

    .crt-optical-plane.is-restored {
      filter: brightness(var(--crt-gain, 1)) contrast(var(--crt-contrast, 1));
    }

    .crt-content-stage {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      z-index: 10;
    }

    .crt-content-stage.is-signal-active {
      filter: url(#crt-signal-filter);
    }

    .crt-phosphor-mask {
      position: absolute;
      inset: 0;
      pointer-events: none;
      display: none;
      background-repeat: repeat;
      background-position: 0 0;
      background-image: var(--crt-mask-url, none);
      background-size: var(--crt-mask-w, 6px) var(--crt-mask-h, 6px);
      image-rendering: auto;
    }

    .crt-phosphor-mask.is-on {
      display: block;
    }

    .crt-phosphor-mask-mul {
      z-index: 12;
      mix-blend-mode: multiply;
      opacity: var(--crt-mask-mul-op, 0);
    }

    .crt-phosphor-mask-ovl {
      z-index: 13;
      mix-blend-mode: overlay;
      opacity: var(--crt-mask-ovl-op, 0);
    }

    .crt-viewport-frame {
      width: 100%;
      height: 100%;
      flex: 1;
      border: none;
      display: block;
      background: #000;
      transition: pointer-events 0.05s ease;
    }

    .crt-raster-grid {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 15;
      /* Pasy skanowania (gałka SCANLINES) – jedyne źródło pasów na ekranie (D1″, 3.10.2026).
         Okres --scan-period wyrównany do pełnych pikseli urządzenia (skrypt na początku <script>): bez dudnienia
         przy niecałkowitym DPR. 9a: granica jasny/ciemny też na pełnym pikselu urządzenia (--scan-light = floor(P/2) px urz.,
         ciemny pas ceil(P/2)) – przy nieparzystym okresie P (DPR 1; 1,5; 1,75…) połowa okresu wypadała w środku piksela
         i zaokrąglenie gradientu dawało miejscami pasy 2/3 zamiast 3/2 (nierówne pasy). 9a′: ciemny pas 0,30 zamiast 0,44 –
         jaśniejszy obraz przy włączonych pasach bez filtra (rozjaśnianie filtrem = dodatkowe przejście co klatkę i przepalone
         jasne prążki). Zwykłe nałożenie zamiast mix-blend-mode: multiply – dla czarnego paska z przezroczystością
         wynik jest identyczny (kolor × (1 − α)), a odpada osobne mieszanie całego ekranu przy każdej klatce. */
      background: repeating-linear-gradient(to bottom,
          rgba(0, 0, 0, 0) 0,
          rgba(0, 0, 0, 0) var(--scan-light, 1px),
          rgba(0, 0, 0, 0.30) var(--scan-light, 1px),
          rgba(0, 0, 0, 0.30) var(--scan-period, 3px));
      opacity: var(--crt-scanline-opacity);
      transition: opacity 0.2s ease;
    }

    .crt-singularity-flare {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 3px;
      transform: translateY(-50%) scale(1, 0);
      background: #ffffff;
      box-shadow:
        0 0 16px 5px #ffffff,
        0 0 35px 12px var(--crt-flare-color),
        0 0 70px 25px rgba(56, 189, 248, 0.35);
      opacity: 0;
      pointer-events: none;
      z-index: 25;
      mix-blend-mode: screen;
      will-change: transform, opacity, box-shadow;
    }

    .crt-thermal-afterglow {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      transform: translate(-50%, -50%) scale(0);
      opacity: 0;
      pointer-events: none;
      z-index: 35;
      will-change: transform, opacity, background-color, box-shadow;
    }

    .crt-glass-vignette {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 30;
      background: radial-gradient(circle at 50% 50%,
          transparent 56%,
          rgba(0, 0, 0, 0.22) 82%,
          rgba(0, 0, 0, 0.65) 100%);
      box-shadow: inset 0 0 clamp(20px, 4.5vw, 48px) rgba(0, 0, 0, 0.55);
      border-radius: clamp(10px, 2.2vw, 18px);
      transition: opacity 0.25s ease;
    }

    /* O1: optyka krawędzi (gałka ANALOG) – tylko pasy przy krawędziach, środek ekranu nietknięty.
       backdrop-filter z funkcjami CSS (blur, saturate) liczy kompozytor na GPU i tylko w obszarze pasów; bez filtrów SVG url(),
       bez mix-blend-mode – to one wymuszały wcześniej przeliczanie całego obrazu WebGL poza GPU (spadek klatek rzędu 90 %).
       Pasy: rozogniskowanie narastające ku krawędzi (maska), na rogach nakładają się = najmocniej, jak w prawdziwym kineskopie.
       Pierścień barwny: słaby czerwony obrys na zewnątrz i cyjan bliżej środka – jak boczna aberracja chromatyczna szkła. */
    .crt-edge-optics {
      position: absolute;
      inset: 0;
      z-index: 29;
      pointer-events: none;
      display: none;
      border-radius: inherit;
      overflow: hidden;
    }

    .crt-edge-optics.is-on {
      display: block;
    }

    .crt-edge-band {
      position: absolute;
      -webkit-backdrop-filter: blur(var(--eo-blur, 0px)) saturate(var(--eo-sat, 1));
      backdrop-filter: blur(var(--eo-blur, 0px)) saturate(var(--eo-sat, 1));
    }

    .crt-edge-optics.is-lite .crt-edge-band {
      display: none;
    }

    .crt-edge-band.eo-t {
      top: 0;
      left: 0;
      right: 0;
      height: var(--eo-h, 15%);
      -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
      mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    }

    .crt-edge-band.eo-b {
      bottom: 0;
      left: 0;
      right: 0;
      height: var(--eo-h, 15%);
      -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
      mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    }

    .crt-edge-band.eo-l {
      top: 0;
      bottom: 0;
      left: 0;
      width: var(--eo-w, 11%);
      -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
      mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    }

    .crt-edge-band.eo-r {
      top: 0;
      bottom: 0;
      right: 0;
      width: var(--eo-w, 11%);
      -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
      mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
    }

    .crt-edge-tint {
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 72% 72% at 50% 50%,
          transparent 70%,
          rgba(80, 210, 255, var(--eo-cy, 0)) 86%,
          rgba(255, 70, 60, var(--eo-red, 0)) 100%);
    }

    /* 10l: szkło kineskopu (gałka ANALOG, --tg 0…1) – kształt ekranu się nie zmienia. Jedna nieruchoma warstwa: odbicie okna/lampy
       z lewej-góry (to samo światło co w obudowie), wąskie pasmo światła przy górnej krawędzi i lekkie przyciemnienie wzdłuż
       krawędzi (grubsze szkło i winieta lampy). Gradienty są stałe, natężenie to przezroczystość warstwy (kompozytor, bez przerysowania). */
    .crt-tube-glass {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 30;
      display: none;
      border-radius: inherit;
      opacity: var(--tg, 0);
      background:
        radial-gradient(ellipse 14% 7% at 16% 11%, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(ellipse 52% 34% at 24% 17%, rgba(255, 255, 255, 0.060) 0%, rgba(255, 255, 255, 0.022) 45%, rgba(255, 255, 255, 0) 78%),
        radial-gradient(ellipse 34% 8% at 50% 3.5%, rgba(255, 255, 255, 0.040) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(ellipse 120% 110% at 50% 50%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.10) 80%, rgba(0, 0, 0, 0.30) 100%);
    }

    .crt-tube-glass.is-on {
      display: block;
    }

    .crt-glass-glare {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 31;
      background: linear-gradient(135deg,
          rgba(255, 255, 255, 0.07) 0%,
          rgba(255, 255, 255, 0.02) 28%,
          transparent 40%,
          transparent 100%);
    }

    .casing-bottom-bar {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: clamp(8px, 1.8vw, 18px);
      margin-top: clamp(10px, 1.8vw, 16px);
      padding: 0 4px;
      container-type: inline-size;
      /* G2: zob. @container niżej */
    }


    .monitor-emblem {
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    /* E1: emblemat KUNCES // LAB – nadruk tampodrukowy w lekkim wgłębieniu tworzywa (światło z góry:
       ciemna krawędź nad znakiem, mikroskopijne rozjaśnienie pod nim) */
    .badge-brand {
      font-family: "Courier New", monospace;
      font-size: clamp(12px, 1.55vw, 14px);
      font-weight: 900;
      letter-spacing: 0.21em;
      color: #a3abb8;
      text-shadow:
        0 -1px 0 rgba(0, 0, 0, 0.78),
        0 1px 0 rgba(255, 255, 255, 0.07);
      font-variant-ligatures: none;
      line-height: 1;
      white-space: nowrap;
    }

    .model-subtext {
      font-family: 'Share Tech Mono', 'Space Mono', 'Consolas', monospace;
      font-size: 7px;
      font-weight: 600;
      letter-spacing: 0.24em;
      /* B-2 / 29.10.2026: kontrast ≥ 4,5:1 na najjaśniejszym kolorze gradientu obudowy rgb(51,55,65) – 4,61:1 (było #8d97a6 = 4,03:1) */
      color: var(--emblem-microprint, #97a2b2);
      text-shadow:
        0 -1px 0 rgba(0, 0, 0, 0.7),
        0 1px 0 rgba(255, 255, 255, 0.05);
      font-variant-ligatures: none;
      line-height: 1;
      margin-top: 3px;
      white-space: nowrap;
    }

    .hardware-controls {
      display: flex;
      align-items: center;
      gap: clamp(8px, 1.6vw, 18px);
    }

    .rotary-knobs-group {
      display: flex;
      align-items: center;
      gap: clamp(6px, 1.4vw, 15px);
    }

    .knob-assembly {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
    }

    .knob-dial-plate {
      position: relative;
      width: clamp(32px, 4.2vw, 40px);
      height: clamp(32px, 4.2vw, 40px);
      display: grid;
      place-items: center;
      touch-action: none;
    }

    .bezel-rotary-knob {
      width: clamp(28px, 3.6vw, 34px);
      height: clamp(28px, 3.6vw, 34px);
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, #4b505c 0%, #1c1e24 75%, #131418 100%);
      border: 1px solid #3d424e;
      box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.75),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.6);
      cursor: grab;
      position: relative;
      outline: none;
      transform: rotate(0deg);
      transition: box-shadow 0.15s ease;
      touch-action: none;
    }

    .bezel-rotary-knob:focus-visible {
      box-shadow:
        0 0 0 2px var(--accent-cyan),
        0 4px 8px rgba(0, 0, 0, 0.75);
    }

    .bezel-rotary-knob.is-dragging {
      cursor: grabbing;
      box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 0 1px var(--accent-cyan);
    }

    .bezel-rotary-knob::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 50%;
      transform: translateX(-50%);
      width: 2px;
      height: clamp(7px, 1.1vw, 10px);
      background: #e2e8f0;
      border-radius: 1px;
      box-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
    }

    .knob-label {
      font-size: 8px;
      font-family: monospace;
      font-weight: 700;
      letter-spacing: 0.8px;
      color: #93a3b8;
      /* B-2 / 29.10.2026: kontrast ≥ 4,5:1 na najjaśniejszym kolorze gradientu obudowy rgb(51,55,65) – 4,63:1 (było #64748b, potem #8a99ad = 4,11:1) */
      text-transform: uppercase;
      line-height: 1;
    }

    .knob-val-subtext {
      font-size: 7.5px;
      font-family: monospace;
      font-weight: 600;
      color: #94a3b8;
      line-height: 1;
    }

    /* G1/U1: DEGAUSS – okrągły przycisk chwilowy w wgłębionym kołnierzu; czasza z tego samego materiału co gałki,
       wyraźnie mniejsza, żeby czytała się jako przycisk, nie gałka */
    .degauss-button {
      position: relative;
      display: grid;
      place-items: center;
      width: clamp(25px, 3.2vw, 30px);
      height: clamp(25px, 3.2vw, 30px);
      padding: 0;
      border-radius: 50%;
      border: 1px solid #0a0b0e;
      background: radial-gradient(circle at 50% 38%, #101114 0%, #181a1f 62%, #22252b 100%);
      box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        0 -1px 0 rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.10);
      cursor: pointer;
      outline: none;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .degauss-button:focus-visible {
      box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 2px var(--accent-cyan);
    }

    .degauss-cap {
      position: relative;
      width: clamp(17px, 2.2vw, 21px);
      height: clamp(17px, 2.2vw, 21px);
      border-radius: 50%;
      border: 1px solid #3d424e;
      background:
        radial-gradient(circle at 50% 56%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.12) 38%, rgba(0, 0, 0, 0) 62%),
        radial-gradient(circle at 35% 35%, #4b505c 0%, #1c1e24 75%, #131418 100%);
      box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.85),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.30),
        inset 0 -2px 3px rgba(0, 0, 0, 0.6);
      transform: translateY(-0.5px);
      transition: transform 0.07s ease-out, box-shadow 0.07s ease-out, filter 0.08s ease;
      pointer-events: none;
    }

    /* wklęsła czasza: krawędź wgłębienia */
    .degauss-cap::before {
      content: '';
      position: absolute;
      inset: 22%;
      border-radius: 50%;
      box-shadow:
        inset 0 1px 1.5px rgba(0, 0, 0, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.07);
    }

    .degauss-button:hover .degauss-cap {
      filter: brightness(1.12);
    }

    .degauss-button:active .degauss-cap {
      transform: translateY(0.5px) scale(0.95);
      filter: brightness(0.9);
      box-shadow:
        0 0 1px rgba(0, 0, 0, 0.9),
        inset 0 1px 1px rgba(255, 255, 255, 0.18),
        inset 0 -1px 2px rgba(0, 0, 0, 0.6);
    }

    .degauss-button[aria-disabled="true"] {
      cursor: default;
    }

    @media (prefers-reduced-motion: reduce) {
      .degauss-cap {
        transition: none;
      }
    }

    /* U1: POWER jako moduł jak gałki – przełącznik w polu sterowania */
    /* U2: dioda na stałe obok wyłącznika – zmienia tylko kolor; pod DEGAUSS i POWER brak napisów stanu (jak w prawdziwym
       monitorze), pusta linia zachowuje wspólną linię etykiet z gałkami */
    .power-plate {
      width: auto;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .knob-val-spacer::before {
      content: '\00a0';
    }

    /* U1: grupa akcji (DEGAUSS, POWER) – ten sam rytm co rząd gałek, oddzielona kreską */
    .power-cluster {
      display: flex;
      align-items: center;
      gap: clamp(6px, 1.4vw, 15px);
      align-self: stretch;
      padding-left: clamp(8px, 1.5vw, 14px);
      border-left: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: -1px 0 0 rgba(0, 0, 0, 0.45);
    }

    .bezel-led {
      display: inline-block;
      flex: none;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 7px #10b981, inset 0 1px 2px rgba(255, 255, 255, 0.5);
      transition: background-color 0.25s, box-shadow 0.25s;
    }

    /* E3: zasilanie wyłączone = czerwona dioda czuwania (zamiast zgaszonej) */
    .bezel-led.off {
      background: #ef4444;
      box-shadow: 0 0 7px rgba(239, 68, 68, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.35);
    }

    .bezel-led.standby {
      background: #f59e0b;
      box-shadow: 0 0 7px #f59e0b, inset 0 1px 2px rgba(255, 255, 255, 0.45);
    }

    /* E2 (przełącznik suwakowy POWER) zastąpiony w 8h okrągłym przyciskiem ⏻ – blok 8h niżej */

    /* G2: wąska obudowa (niskie okno + ekran 4:3) – ciaśniejsze odstępy i rozstrzelenie mikrodruku, żeby rząd gałek
       z przyciskiem DEGAUSS nie łamał się do drugiej linii. Przy zwykłych rozmiarach bez zmian. */
    @container (max-width: 640px) {
      .model-subtext {
        letter-spacing: 0.14em;
      }

      .rotary-knobs-group {
        gap: 8px;
      }

      .power-cluster {
        gap: 8px;
      }

      .hardware-controls {
        gap: 10px;
      }
    }

    @container (max-width: 560px) {
      .model-subtext {
        letter-spacing: 0.08em;
      }

      .rotary-knobs-group {
        gap: 5px;
      }

      .hardware-controls {
        gap: 8px;
      }

      .power-cluster {
        gap: 5px;
        padding-left: 8px;
      }
    }

    /* D2: błędy czystości koloru podczas rozmagnesowania – plamy przyklejone do szkła (nad obrazem, pod winietą),
       zmieniają tylko barwę i nasycenie (mix-blend-mode: color), mocniejsze przy krawędziach i w rogach */
    .crt-purity-field {
      position: absolute;
      inset: 0;
      z-index: 20;
      pointer-events: none;
      opacity: 0;
      overflow: hidden;
      border-radius: inherit;
      mix-blend-mode: color;
      -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.80) 55%, #000 100%);
      mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.80) 55%, #000 100%);
    }

    .crt-purity-swirl {
      position: absolute;
      inset: -35%;
      background:
        radial-gradient(ellipse 24% 27% at 28% 30%, hsl(305, 95%, 58%) 0%, hsla(305, 95%, 58%, 0) 100%),
        radial-gradient(ellipse 25% 23% at 71% 27%, hsl(135, 90%, 46%) 0%, hsla(135, 90%, 46%, 0) 100%),
        radial-gradient(ellipse 23% 26% at 73% 71%, hsl(215, 95%, 58%) 0%, hsla(215, 95%, 58%, 0) 100%),
        radial-gradient(ellipse 26% 24% at 27% 73%, hsl(40, 95%, 55%) 0%, hsla(40, 95%, 55%, 0) 100%),
        radial-gradient(ellipse 15% 15% at 50% 50%, hsl(340, 90%, 58%) 0%, hsla(340, 90%, 58%, 0) 100%);
    }

    /* Accessibility overrides */
    @media (prefers-reduced-motion: reduce) {

      .crt-deflection-chamber,
      .crt-singularity-flare,
      .crt-thermal-afterglow {
        will-change: opacity !important;
        animation: none !important;
      }
    }

    /* 8g: niskie okna (laptop Full HD ze skalowaniem 125/150 %, 1366×768) – kompaktowy profil obudowy: cieńsza rama,
       mniejszy margines, niższy rząd gałek; ekran zyskuje ok. 75 px wysokości. Telefon (bypass niżej) bez zmian. */
    @media (max-height: 900px) {
      .crt-monitor-casing {
        padding: 8px clamp(12px, 1.8vw, 20px) 6px;
        border-radius: clamp(14px, 2.2vw, 22px);
      }

      .casing-vents {
        margin-bottom: 5px;
      }

      .crt-bezel-frame {
        padding: 6px;
        border-radius: clamp(10px, 1.6vw, 16px);
      }

      /* 9k: było 8 px */
      .casing-bottom-bar {
        margin-top: 5px;
      }

      .knob-assembly {
        gap: 2px;
      }

      .knob-dial-plate:not(.power-plate) {
        width: 30px;
        height: 30px;
      }

      .knob-dial-plate.power-plate {
        height: 30px;
      }

      .bezel-rotary-knob {
        width: 26px;
        height: 26px;
      }

      .bezel-rotary-knob::after {
        height: 7px;
      }

      .degauss-button {
        width: 24px;
        height: 24px;
      }

      .degauss-cap {
        width: 17px;
        height: 17px;
      }

      .power-button {
        width: 28px;
        height: 28px;
      }

      .power-button .degauss-cap {
        width: 20px;
        height: 20px;
      }
    }

    /* 8g/8h: EXPAND – wygląd jak DEGAUSS (rodzina przycisków niżej, blok 8h) */

    /* 8h: jedna rodzina przycisków – DEGAUSS, EXPAND i POWER to ten sam okrągły przycisk we wgłębionym kołnierzu,
       ze znakiem tłoczonym na czaszy (≈ pole rozmagnesowania, ⤢ bez obudowy, ⏻ zasilanie – IEC 60417-5009).
       Stan zasilania pokazuje dioda obok POWER. Znaki to statyczne SVG – bez kosztu na klatkę. */
    .hw-glyph::before {
      display: none;
    }

    .hw-glyph {
      background-size: 62% 62%, 100% 100%, 100% 100% !important;
      background-position: center !important;
      background-repeat: no-repeat !important;
    }

    .hw-glyph-degauss {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab3c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9c2-3 4-3 6 0s4 3 6 0 4-3 4 0'/%3E%3Cpath d='M4 15c2-3 4-3 6 0s4 3 6 0 4-3 4 0'/%3E%3C/svg%3E"), radial-gradient(circle at 50% 56%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.12) 38%, rgba(0, 0, 0, 0) 62%), radial-gradient(circle at 35% 35%, #4b505c 0%, #1c1e24 75%, #131418 100%);
    }

    .hw-glyph-expand {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab3c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-7 7'/%3E%3Cpath d='M10 20H4v-6'/%3E%3Cpath d='M4 20l7-7'/%3E%3C/svg%3E"), radial-gradient(circle at 50% 56%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.12) 38%, rgba(0, 0, 0, 0) 62%), radial-gradient(circle at 35% 35%, #4b505c 0%, #1c1e24 75%, #131418 100%);
    }

    .hw-glyph-power {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab3c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v7'/%3E%3Cpath d='M7.3 6.8a7 7 0 1 0 9.4 0'/%3E%3C/svg%3E"), radial-gradient(circle at 50% 56%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.12) 38%, rgba(0, 0, 0, 0) 62%), radial-gradient(circle at 35% 35%, #4b505c 0%, #1c1e24 75%, #131418 100%);
    }

    .expand-button:disabled {
      cursor: default;
      opacity: 0.45;
    }

    .expand-button:hover:not(:disabled) .degauss-cap {
      filter: brightness(1.12);
    }

    .expand-button.is-suggested {
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px #fbbf24, 0 0 10px rgba(251, 191, 36, 0.45);
    }

    .power-button {
      width: clamp(29px, 3.7vw, 34px);
      height: clamp(29px, 3.7vw, 34px);
    }

    .power-button .degauss-cap {
      width: clamp(20px, 2.6vw, 25px);
      height: clamp(20px, 2.6vw, 25px);
    }

    .power-button:active .degauss-cap {
      transform: translateY(0.5px) scale(0.95);
      filter: brightness(0.9);
    }

    .power-button:hover .degauss-cap {
      filter: brightness(1.12);
    }

    /* kropki położeń przy pokrętłach skokowych (SCANLINES: 2, ASPECT: 3) – na płytce pod gałką */
    /* skala na płytce pod gałką: pokrętła płynne (SPEED, ANALOG) – 7 kropek co 45° w zakresie −135°…+135°,
       pokrętła skokowe – kropki tylko w położeniach (SCANLINES: 2, ASPECT: 3); ten sam rozmiar, kolor i promień */
    .knob-dial-plate.has-scale {
      background: radial-gradient(circle at 16.8% 83.2%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 3% 50%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 16.8% 16.8%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 50% 3%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 83.2% 16.8%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 97% 50%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 83.2% 83.2%, #8a99ad 0 1.2px, transparent 1.6px);
    }

    .knob-dial-plate.has-detents-2 {
      background: radial-gradient(circle at 16.8% 16.8%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 83.2% 16.8%, #8a99ad 0 1.2px, transparent 1.6px);
    }

    .knob-dial-plate.has-detents-3 {
      background: radial-gradient(circle at 16.8% 16.8%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 50% 3%, #8a99ad 0 1.2px, transparent 1.6px), radial-gradient(circle at 83.2% 16.8%, #8a99ad 0 1.2px, transparent 1.6px);
    }

    /* D-11a: płynne skalowanie pionowe ramki (zamiast skoku 900/1100 px). --ch = postęp 0…740 px między wysokością okna 900 px (profil kompaktowy,
       ramka 94 px) a 1640 px (pełny profil, 164 px – wygląd 4K bez zmian; padding boczny bez zmian). Każdy składnik = round(min(dawna wartość pełna, kompakt + postęp · różnica / 740), 1px): pełne piksele (jak w dawnych profilach) trzymają górną krawędź ekranu na siatce pikseli urządzenia (pasy SCANLINES, samokontrola 9a); przeglądarka bez round() zostaje przy dawnych wartościach pełnych. */
    :root {
      --ch: clamp(0px, calc(100vh - 900px), 740px);
      --cp: clamp(0px, calc(100vh - 1100px), 540px);
    }

    @media (min-height: 901px) {
      .crt-monitor-casing {
        padding-top: round(min(clamp(12px, 2.5vw, 24px), calc(8px + var(--ch) * 16 / 740)), 1px);
        padding-bottom: round(min(clamp(12px, 2vw, 18px), calc(6px + var(--ch) * 12 / 740)), 1px);
        border-radius: round(min(clamp(16px, 3.2vw, 28px), calc(22px + var(--ch) * 6 / 740)), 1px);
      }

      .casing-vents {
        margin-bottom: round(min(clamp(8px, 1.6vw, 14px), calc(5px + var(--ch) * 9 / 740)), 1px);
      }

      .crt-bezel-frame {
        padding: round(min(clamp(6px, 1.05vw, 11px), calc(6px + var(--ch) * 5 / 740)), 1px);
        border-radius: round(min(clamp(16px, 3.2vw, 28px), calc(16px + var(--ch) * 12 / 740)), 1px);
      }

      .casing-bottom-bar {
        margin-top: round(min(clamp(10px, 1.8vw, 16px), calc(5px + var(--ch) * 11 / 740)), 1px);
      }

      .knob-assembly {
        gap: round(calc(2px + var(--ch) * 1 / 740), 1px);
      }

      .knob-dial-plate:not(.power-plate) {
        width: round(min(clamp(32px, 4.2vw, 40px), calc(30px + var(--ch) * 10 / 740)), 1px);
        height: round(min(clamp(32px, 4.2vw, 40px), calc(30px + var(--ch) * 10 / 740)), 1px);
      }

      .knob-dial-plate.power-plate {
        height: round(min(clamp(32px, 4.2vw, 40px), calc(30px + var(--ch) * 10 / 740)), 1px);
      }

      .bezel-rotary-knob {
        width: round(min(clamp(28px, 3.6vw, 34px), calc(26px + var(--ch) * 8 / 740)), 1px);
        height: round(min(clamp(28px, 3.6vw, 34px), calc(26px + var(--ch) * 8 / 740)), 1px);
      }

      .bezel-rotary-knob::after {
        height: round(min(clamp(7px, 1.1vw, 10px), calc(7px + var(--ch) * 3 / 740)), 1px);
      }

      .degauss-button:not(.power-button) {
        width: round(min(clamp(25px, 3.2vw, 30px), calc(24px + var(--ch) * 6 / 740)), 1px);
        height: round(min(clamp(25px, 3.2vw, 30px), calc(24px + var(--ch) * 6 / 740)), 1px);
      }

      .degauss-button:not(.power-button) .degauss-cap {
        width: round(min(clamp(17px, 2.2vw, 21px), calc(17px + var(--ch) * 4 / 740)), 1px);
        height: round(min(clamp(17px, 2.2vw, 21px), calc(17px + var(--ch) * 4 / 740)), 1px);
      }
    }

    @media (min-height: 1101px) {
      body {
        padding-top: round(min(clamp(8px, 2vw, 20px), calc(8px + var(--cp) * 12 / 540)), 1px);
        padding-bottom: round(min(clamp(8px, 2vw, 20px), calc(8px + var(--cp) * 12 / 540)), 1px);
      }
    }

    /* ==========================================================================
       6. MOBILE CLEAN BYPASS & SCREENSAVER EXPAND: DIRECT FULL-SCREEN APP VIEW
       ========================================================================== */
    body.crt-saver-expanded,
    body.crt-lab-expanded {
      padding: 0 !important;
      margin: 0 !important;
      background: #000 !important;
      overflow: hidden !important;
      display: block !important;
      width: 100vw !important;
      height: 100vh !important;
      height: 100dvh !important;
    }

    body.crt-saver-expanded .crt-appliance-stage, body.crt-lab-expanded .crt-appliance-stage,
    body.crt-saver-expanded .crt-monitor-casing, body.crt-lab-expanded .crt-monitor-casing,
    body.crt-saver-expanded .crt-bezel-frame, body.crt-lab-expanded .crt-bezel-frame,
    body.crt-saver-expanded .crt-screen-glass, body.crt-lab-expanded .crt-screen-glass,
    body.crt-saver-expanded .crt-deflection-chamber, body.crt-lab-expanded .crt-deflection-chamber,
    body.crt-saver-expanded .crt-optical-plane, body.crt-lab-expanded .crt-optical-plane,
    body.crt-saver-expanded .crt-content-stage, body.crt-lab-expanded .crt-content-stage {
      position: fixed !important;
      inset: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      height: 100dvh !important;
      max-width: none !important;
      max-height: none !important;
      padding: 0 !important;
      margin: 0 !important;
      border: none !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      background: #000 !important;
      transform: none !important;
      filter: none !important;
      isolation: auto !important;
      aspect-ratio: auto !important;
      contain: none !important;
    }

    body.crt-saver-expanded .casing-vents, body.crt-lab-expanded .casing-vents,
    body.crt-saver-expanded .casing-bottom-bar, body.crt-lab-expanded .casing-bottom-bar,
    body.crt-saver-expanded .crt-bezel-frame::before, body.crt-lab-expanded .crt-bezel-frame::before,
    body.crt-saver-expanded .crt-glass-vignette, body.crt-lab-expanded .crt-glass-vignette,
    body.crt-saver-expanded .crt-edge-optics, body.crt-lab-expanded .crt-edge-optics,
    body.crt-saver-expanded .crt-glass-glare, body.crt-lab-expanded .crt-glass-glare,
    body.crt-saver-expanded .crt-screen-glass::after, body.crt-lab-expanded .crt-screen-glass::after,
    body.crt-saver-expanded .crt-tube-glass, body.crt-lab-expanded .crt-tube-glass,
    body.crt-saver-expanded .crt-phosphor-mask, body.crt-lab-expanded .crt-phosphor-mask,
    body.crt-saver-expanded .crt-raster-grid, body.crt-lab-expanded .crt-raster-grid,
    body.crt-saver-expanded .crt-singularity-flare, body.crt-lab-expanded .crt-singularity-flare,
    body.crt-saver-expanded .crt-thermal-afterglow, body.crt-lab-expanded .crt-thermal-afterglow,
    body.crt-saver-expanded .aux-desk-monitor, body.crt-lab-expanded .aux-desk-monitor,
    body.crt-saver-expanded .aux-coiled-cable, body.crt-lab-expanded .aux-coiled-cable,
    body.crt-saver-expanded .aux-cable-hitbox-layer, body.crt-lab-expanded .aux-cable-hitbox-layer {
      display: none !important;
    }

    body.crt-saver-expanded .crt-viewport-frame, body.crt-lab-expanded .crt-viewport-frame {
      width: 100% !important;
      height: 100% !important;
      border: none !important;
      pointer-events: auto !important;
    }

    /* D-11g (16.11.2026): EXPAND w miejscu – powrót do obudowy. Po rozwinięciu przez 5 s pełny przycisk (podpowiedź), potem
       uchwyt u góry środka ekranu (8 px – pas wolny w nagłówkach QOL, Black Hole i SPECTRO przy 1366 i 1920 px), który po najechaniu
       wysuwa przycisk. D-11h (1.12.2026, zgłoszenie Łukasza „nie widzę guzika powrotu”): uchwyt wyraźny – jasna ramka i kreska-uchwyt
       na pełnym kryciu zamiast szarego paska 10 px przy przezroczystości 55 % (na ciemnych modułach niewidocznego). */
    .crt-collapse-button {
      display: none;
    }

    body.crt-lab-expanded .crt-collapse-button:not([hidden]) {
      display: flex;
      align-items: center;
      gap: 6px;
      position: fixed;
      z-index: 2147483000;
      top: 0;
      left: 50%;
      transform: translate(-50%, calc(-100% + 8px));
      height: 26px;
      padding: 0 12px 0 9px;
      border: 1px solid rgba(214, 222, 233, 0.85);
      border-top: none;
      border-radius: 0 0 7px 7px;
      background: rgba(28, 30, 36, 0.96);
      box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
      color: #c9d1dc;
      font: 600 11px/1 ui-monospace, "JetBrains Mono", monospace;
      letter-spacing: 0.12em;
      cursor: pointer;
      opacity: 1;
      transition: transform 0.18s ease;
    }

    /* uchwyt: kreska w widocznym pasie 8 px; napis i ikona wysuwają się razem z przyciskiem */
    body.crt-lab-expanded .crt-collapse-button:not([hidden])::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 3px;
      width: 34px;
      height: 2px;
      margin-left: -17px;
      border-radius: 1px;
      background: #e3e9f1;
      transition: opacity 0.18s ease;
    }

    body.crt-lab-expanded .crt-collapse-button:not([hidden]):hover,
    body.crt-lab-expanded .crt-collapse-button:not([hidden]):focus-visible,
    body.crt-lab-expanded .crt-collapse-button.is-hint:not([hidden]) {
      transform: translate(-50%, 0);
    }

    body.crt-lab-expanded .crt-collapse-button:not([hidden]):hover::after,
    body.crt-lab-expanded .crt-collapse-button:not([hidden]):focus-visible::after,
    body.crt-lab-expanded .crt-collapse-button.is-hint:not([hidden])::after {
      opacity: 0;
    }

    .crt-collapse-glyph {
      width: 14px;
      height: 14px;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab3c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10h-6V4'/%3E%3Cpath d='M14 10l7-7'/%3E%3Cpath d='M4 14h6v6'/%3E%3Cpath d='M10 14l-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    @media (prefers-reduced-motion: reduce) {
      body.crt-lab-expanded .crt-collapse-button:not([hidden]) {
        transition: none;
      }
    }

    @media (max-width: 768px),
    (pointer: coarse) and (max-width: 1024px) {

      body,
      body.crt-mobile-bypass {
        padding: 0 !important;
        margin: 0 !important;
        background: #000 !important;
        overflow: hidden !important;
        display: block !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
      }

      body .crt-appliance-stage,
      body.crt-mobile-bypass .crt-appliance-stage,
      body .crt-monitor-casing,
      body.crt-mobile-bypass .crt-monitor-casing,
      body .crt-bezel-frame,
      body.crt-mobile-bypass .crt-bezel-frame,
      body .crt-screen-glass,
      body.crt-mobile-bypass .crt-screen-glass,
      body .crt-deflection-chamber,
      body.crt-mobile-bypass .crt-deflection-chamber,
      body .crt-optical-plane,
      body.crt-mobile-bypass .crt-optical-plane,
      body .crt-content-stage,
      body.crt-mobile-bypass .crt-content-stage {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #000 !important;
        transform: none !important;
        filter: none !important;
        isolation: auto !important;
        aspect-ratio: auto !important;
        contain: none !important;
      }

      body .casing-vents,
      body.crt-mobile-bypass .casing-vents,
      body .casing-bottom-bar,
      body.crt-mobile-bypass .casing-bottom-bar,
      body .crt-glass-vignette,
      body.crt-mobile-bypass .crt-glass-vignette,
      body .crt-edge-optics,
      body.crt-mobile-bypass .crt-edge-optics,
      body .crt-glass-glare,
      body.crt-mobile-bypass .crt-glass-glare,
      body .crt-screen-glass::after,
      body.crt-mobile-bypass .crt-screen-glass::after,
      body .crt-tube-glass,
      body.crt-mobile-bypass .crt-tube-glass,
      body .crt-phosphor-mask,
      body.crt-mobile-bypass .crt-phosphor-mask,
      body .crt-raster-grid,
      body.crt-mobile-bypass .crt-raster-grid,
      body .crt-singularity-flare,
      body.crt-mobile-bypass .crt-singularity-flare,
      body .crt-thermal-afterglow,
      body.crt-mobile-bypass .crt-thermal-afterglow,
      .aux-desk-monitor,
      .aux-coiled-cable,
      .aux-cable-hitbox-layer {
        display: none !important;
      }

      body .crt-viewport-frame,
      body.crt-mobile-bypass .crt-viewport-frame {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        pointer-events: auto !important;
      }

      .storage-notice-overlay {
        padding: 10px !important;
      }

      .storage-notice-card {
        max-width: 100% !important;
        padding: 14px 12px !important;
      }

      .st-btn-confirm {
        min-height: 52px !important;
        font-size: 13px !important;
      }
    }

    @media (max-width: 480px) {
      .storage-notice-card {
        padding: 14px 10px !important;
      }

      .st-card-header {
        gap: 8px;
        padding-bottom: 8px;
      }

      .st-header-title {
        font-size: 12px;
        letter-spacing: 0.1em;
      }

      .st-status-row {
        flex-wrap: wrap;
        gap: 4px 10px;
        font-size: 10px;
      }

      .st-spec-list {
        padding: 10px;
        gap: 10px;
      }

      .st-spec-item {
        grid-template-columns: 88px 1fr;
        gap: 10px;
      }

      .st-spec-tag {
        font-size: 10px;
        padding: 2px 4px;
        letter-spacing: 0.08em;
      }

      .st-spec-desc strong {
        font-size: 12px;
      }

      .st-spec-desc span {
        font-size: 10.5px;
      }

      .st-btn-confirm {
        min-height: 50px;
        padding: 8px 10px;
        font-size: 11.5px;
        letter-spacing: 0.06em;
      }
    }

    /* ==========================================================================
       STORAGE & PRIVACY NOTICE (SYS_ALERT // KUNCES LAB WORKSTATION)
       ========================================================================== */
    .storage-notice-overlay {
      position: absolute;
      inset: 0;
      z-index: 45;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: clamp(12px, 3vw, 24px);
      background: rgba(3, 8, 5, 0.78);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .storage-notice-overlay.is-active {
      opacity: 1;
      pointer-events: auto;
    }

    .storage-notice-card {
      position: relative;
      width: 100%;
      max-width: 520px;
      background: linear-gradient(180deg, #0b0f0d 0%, #050706 100%);
      border: 1px solid rgba(251, 191, 36, 0.45);
      border-radius: 6px;
      box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.2),
        0 24px 60px rgba(0, 0, 0, 0.95),
        0 0 35px rgba(251, 191, 36, 0.12);
      padding: clamp(14px, 2.5vw, 22px);
      color: #e2e8f0;
      font-family: 'Share Tech Mono', 'IBM Plex Mono', 'Space Mono', monospace;
      transform: translateY(12px) scale(0.98);
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .storage-notice-overlay.is-active .storage-notice-card {
      transform: translateY(0) scale(1);
    }

    /* Cyberpunk Corner Brackets */
    .storage-notice-card::before,
    .storage-notice-card::after {
      content: '';
      position: absolute;
      width: 10px;
      height: 10px;
      pointer-events: none;
    }

    .storage-notice-card::before {
      top: -2px;
      left: -2px;
      border-top: 2px solid #38bdf8;
      border-left: 2px solid #38bdf8;
    }

    .storage-notice-card::after {
      bottom: -2px;
      right: -2px;
      border-bottom: 2px solid #38bdf8;
      border-right: 2px solid #38bdf8;
    }

    .st-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(251, 191, 36, 0.25);
    }

    .st-header-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: clamp(13px, 1.8vw, 15px);
      letter-spacing: 0.14em;
      color: #fbbf24;
      text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    }

    .st-badge-alert {
      display: inline-flex;
      align-items: center;
      padding: 2px 6px;
      font-size: 10px;
      letter-spacing: 0.18em;
      font-weight: bold;
      background: rgba(251, 191, 36, 0.15);
      border: 1px solid #fbbf24;
      color: #fbbf24;
      border-radius: 2px;
      animation: alertPulse 2s ease-in-out infinite;
    }

    @keyframes alertPulse {

      0%,
      100% {
        opacity: 1;
        box-shadow: 0 0 4px rgba(251, 191, 36, 0.4);
      }

      50% {
        opacity: 0.7;
        box-shadow: none;
      }
    }

    /* Language micro-switch */
    .st-lang-switch {
      display: inline-flex;
      border: 1px solid rgba(251, 191, 36, 0.4);
      background: rgba(0, 0, 0, 0.5);
      border-radius: 3px;
      overflow: hidden;
    }

    .st-lang-btn {
      min-width: 34px;
      min-height: 26px;
      padding: 0 8px;
      border: none;
      background: transparent;
      color: #a1865a;
      font-family: inherit;
      font-size: 11px;
      font-weight: bold;
      letter-spacing: 0.12em;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .st-lang-btn:hover {
      color: #fbbf24;
      background: rgba(251, 191, 36, 0.1);
    }

    .st-lang-btn.is-active {
      background: #fbbf24;
      color: #050807;
      box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
    }

    .st-status-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 8px 0;
      font-size: 11px;
      letter-spacing: 0.1em;
      color: #a1865a;
    }

    .st-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #38bdf8;
    }

    .st-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #38bdf8;
      box-shadow: 0 0 6px #38bdf8;
    }

    .st-host-tag {
      font-size: 10px;
      color: #718096;
      letter-spacing: 0.15em;
    }

    .st-card-body {
      padding: 10px 0 16px;
      font-size: clamp(12px, 1.4vw, 13.5px);
      line-height: 1.55;
      color: #d6c7a1;
    }

    .st-lead {
      margin-bottom: 12px;
      color: #e2e8f0;
      font-size: clamp(12.5px, 1.5vw, 14px);
    }

    .st-lead strong {
      color: #fbbf24;
    }

    .st-spec-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      background: rgba(0, 0, 0, 0.45);
      border: 1px solid rgba(251, 191, 36, 0.15);
      border-radius: 4px;
      padding: 12px 14px;
    }

    .st-spec-item {
      display: grid;
      grid-template-columns: 104px 1fr;
      align-items: baseline;
      gap: 14px;
    }

    .st-spec-tag {
      width: 100%;
      box-sizing: border-box;
      font-size: 11px;
      font-weight: bold;
      letter-spacing: 0.12em;
      text-align: center;
      padding: 3px 6px;
      border-radius: 2px;
      white-space: nowrap;
    }

    .st-spec-tag.privacy {
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.08);
      border: 1px solid rgba(56, 189, 248, 0.35);
      text-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
    }

    .st-spec-tag.storage {
      color: #fbbf24;
      background: rgba(251, 191, 36, 0.08);
      border: 1px solid rgba(251, 191, 36, 0.35);
      text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
    }

    .st-spec-desc {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }

    .st-spec-desc strong {
      color: #f8fafc;
      font-size: 13px;
      letter-spacing: 0.04em;
      line-height: 1.4;
    }

    .st-spec-desc span {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11.5px;
      line-height: 1.5;
      color: #94a3b8;
    }

    .st-card-footer {
      padding-top: 6px;
    }

    .st-btn-confirm {
      width: 100%;
      min-height: 46px;
      padding: 10px 18px;
      background: rgba(251, 191, 36, 0.08);
      border: 1px solid #fbbf24;
      border-radius: 4px;
      color: #fbbf24;
      font-family: inherit;
      font-size: clamp(12.5px, 1.6vw, 14px);
      font-weight: bold;
      letter-spacing: 0.14em;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
      transition: all 0.2s ease;
      touch-action: manipulation;
    }

    .st-btn-confirm:hover,
    .st-btn-confirm:focus-visible {
      background: #fbbf24;
      color: #060907;
      box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
      outline: none;
    }

    .st-btn-confirm:active {
      transform: scale(0.99);
    }

    .st-btn-arrow {
      color: inherit;
      transition: transform 0.2s ease;
    }

    .st-btn-confirm:hover .st-btn-arrow {
      transform: translateX(4px);
    }

    /* ==========================================================================
       AUXILIARY MINI-CRT COMPANION SUBSYSTEM (KO-FI GRANT & COFFEE TERMINAL)
       Compact laboratory micro-tube placed on the left side of the workstation desk.
       Scaled, simplified companion sharing the cabinet finish & amber phosphor palette.
       ========================================================================== */
    .aux-desk-monitor {
      position: fixed;
      left: clamp(10px, 1.4vw, 22px);
      bottom: var(--aux-desk-bottom, clamp(12px, 1.6vh, 22px));
      z-index: 6 !important;
      display: none;
      font-family: 'Share Tech Mono', 'IBM Plex Mono', monospace;
      user-select: none;
      -webkit-user-select: none;
      opacity: 1;
      transform: translateX(0);
      contain: layout style;
      will-change: transform;
      transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, bottom 0.25s ease-out;
    }

    /* Desktop workspace visibility gate (sufficient width & height) */
    @media (min-width: 1180px) and (min-height: 520px) {
      .aux-desk-monitor {
        display: block;
      }
    }

    /* Performance optimization: pause keyframe animations when docked (hidden behind main casing) */
    .aux-desk-monitor.is-docked:not(:hover):not(.is-hovered) .aux-steam-path,
    .aux-desk-monitor.is-docked:not(:hover):not(.is-hovered) .aux-crt-sweep {
      animation-play-state: paused !important;
    }

    /* Docked & Sliding modes: strictly behind the main monitor casing (z-index: 6 vs casing 10, in front of cable 5) */
    .aux-desk-monitor.is-docked:not(.is-compact):not(.is-compact-token),
    .aux-desk-monitor.is-sliding-out:not(.is-compact):not(.is-compact-token),
    .aux-desk-monitor.is-sliding-in:not(.is-compact):not(.is-compact-token) {
      z-index: 6 !important;
      transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .aux-desk-monitor.is-docked {
      transform: translateX(var(--aux-dock-tucked, 140px));
    }

    /* Slid-out mode on hover: slide out as far as desk space allows, strictly behind the casing */
    .aux-desk-monitor.is-docked:hover,
    .aux-desk-monitor.is-docked:focus-within,
    .aux-desk-monitor.is-docked.is-hovered {
      z-index: 6 !important;
      transform: translateX(var(--aux-dock-slidout, 0px)) !important;
      transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Active hover bridge: hit area over the exposed peek tab */
    .aux-desk-monitor.is-docked::after {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      width: 28px;
      pointer-events: auto;
      z-index: 15;
    }

    /* Outer Chassis: Matched to the main cabinet's graphite finish */
    .aux-monitor-chassis {
      position: relative;
      cursor: pointer;
      width: clamp(130px, 8.4vw, 146px);
      background: linear-gradient(180deg, var(--cabinet-bg-top, #2c2f37) 0%, var(--cabinet-bg-bottom, #191a1e) 100%);
      border: 2px solid var(--cabinet-border, #3d414e);
      border-radius: 9px;
      padding: 6px 6px 5px 6px;
      box-shadow:
        0 16px 36px -8px var(--cabinet-shadow, rgba(0, 0, 0, 0.85)),
        0 6px 14px rgba(0, 0, 0, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.22),
        inset 0 -3px 6px rgba(0, 0, 0, 0.75);
      transition: width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
    }

    /* Precision Corner Screws */
    .aux-screw {
      position: absolute;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: radial-gradient(circle at 40% 35%, #7e8794 0%, #2e323b 65%, #18191d 100%);
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.9);
      pointer-events: none;
      transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    }

    .aux-screw-tl {
      top: 3.5px;
      left: 4px;
    }

    .aux-screw-tr {
      top: 3.5px;
      right: 4px;
    }

    .aux-screw-bl {
      bottom: 4px;
      left: 4px;
    }

    .aux-screw-br {
      bottom: 4px;
      right: 4px;
    }

    /* Recessed CRT Bezel Frame (matching --bezel-inner) */
    .aux-crt-bezel {
      background: var(--bezel-inner, #0d0e12);
      border-radius: 7px;
      padding: 4px;
      box-shadow:
        inset 0 3px 9px rgba(0, 0, 0, 0.96),
        inset 0 0 0 1px #1e2026,
        0 1px 0 rgba(255, 255, 255, 0.08);
      transition: border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Convex CRT Screen Glass (Interactive Ko-fi Link) */
    .aux-crt-screen {
      position: relative;
      z-index: 10;
      display: block;
      width: 100%;
      height: 100px;
      background: #050505;
      border-radius: 5px;
      overflow: hidden;
      text-decoration: none;
      cursor: pointer;
      box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.98);
      outline: none;
      transition: width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.25s ease,
        box-shadow 0.25s ease;
      touch-action: manipulation;
      pointer-events: auto;
    }

    .aux-crt-screen:focus-visible {
      outline: 2px solid var(--amber, #fbbf24);
      outline-offset: 2px;
    }

    /* CRT Phosphor Layer: Amber / Gold Lab Theme */
    .aux-crt-phosphor {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 6px 7px 5px;
      color: var(--amber, #fbbf24);
      text-shadow: 0 0 4px rgba(251, 191, 36, 0.45);
      background: radial-gradient(circle at 50% 45%, #140f06 0%, #080602 70%, #030201 100%);
      transition: padding 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* CRT Scanlines Overlay */
    .aux-crt-scanlines {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: repeating-linear-gradient(to bottom,
          rgba(0, 0, 0, 0) 0px,
          rgba(0, 0, 0, 0) 1.5px,
          rgba(0, 0, 0, 0.35) 1.5px,
          rgba(0, 0, 0, 0.35) 3px);
      opacity: 0.85;
      z-index: 5;
    }

    /* Curved Glass Vignette & Glare */
    .aux-crt-vignette {
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: 5px;
      box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.92);
      z-index: 6;
      transition: border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .aux-crt-glare {
      position: absolute;
      top: 0;
      right: 0;
      width: 55px;
      height: 32px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
      border-radius: 0 5px 0 25px;
      pointer-events: none;
      z-index: 7;
    }

    /* CRT Sweep Beam */
    .aux-crt-sweep {
      position: absolute;
      left: 0;
      right: 0;
      height: 10px;
      background: linear-gradient(180deg, transparent 0%, rgba(251, 191, 36, 0.16) 50%, transparent 100%);
      pointer-events: none;
      opacity: 0;
      z-index: 8;
    }

    /* Screen HUD Layout */
    .aux-crt-hud {
      position: relative;
      z-index: 10;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Top HUD Status Row - High Clarity & Centered (PUNKT 1) */
    .aux-hud-status {
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      width: 100%;
      font-size: 8.5px;
      font-weight: 700;
      letter-spacing: 0.08em;
      opacity: 0.95;
      transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .aux-status-text {
      text-align: center;
      width: 100%;
    }

    /* Central Oscilloscope Flask / Coffee Graphic */
    .aux-hud-graphic {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 1px 0;
      transition: margin 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .aux-flask-svg {
      width: 42px;
      height: 30px;
      overflow: visible;
      transition: width 0.38s cubic-bezier(0.16, 1, 0.3, 1), height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Steaming Thermodynamic Vapor Wave Animation */
    .aux-steam-path {
      opacity: 0.8;
      animation: auxSteamRise 3.2s ease-in-out infinite alternate;
      transform-origin: 50% 16px;
    }

    .steam-1 {
      animation-delay: 0s;
    }

    .steam-2 {
      animation-delay: 0.6s;
    }

    @keyframes auxSteamRise {
      0% {
        transform: translateY(0) scaleY(0.9) skewX(-2deg);
        opacity: 0.5;
      }

      50% {
        opacity: 0.85;
      }

      100% {
        transform: translateY(-2px) scaleY(1.1) skewX(2deg);
        opacity: 0.95;
      }
    }

    /* Action Interactive Prompt - Bold CRT Button */
    .aux-hud-action {
      margin-top: 1px;
      padding: 3px 2px;
      border: 1px solid rgba(251, 191, 36, 0.4);
      background: rgba(251, 191, 36, 0.09);
      border-radius: 3px;
      font-size: clamp(8px, 0.65vw, 9px);
      letter-spacing: 0.04em;
      text-align: center;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      box-shadow: inset 0 0 6px rgba(251, 191, 36, 0.12);
      transition: all 0.2s ease;
    }

    .aux-action-idle {
      display: inline-block;
      white-space: nowrap;
      color: #fbbf24;
    }

    .aux-action-hover {
      display: none;
      white-space: nowrap;
      color: #38bdf8;
      text-shadow: 0 0 6px rgba(56, 189, 248, 0.85);
    }

    /* ==========================================================================
       COMPACT COFFEE TOKEN / BUTTON MODE (.is-compact, .is-compact-token)
       When launcher is active and side desk space is restricted (< 155px),
       the aux monitor smoothly transforms into a tactical circular token.
       Rendered ON TOP of the CRT casing (z-index: 30) in the lower-left corner.
       ========================================================================== */
    .aux-desk-monitor.is-compact,
    .aux-desk-monitor.is-compact-token {
      z-index: 30 !important;
      transform: none !important;
      pointer-events: auto !important;
    }

    .aux-desk-monitor.is-compact .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token .aux-monitor-chassis {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      padding: 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.85),
        0 2px 6px rgba(0, 0, 0, 0.7),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .aux-desk-monitor.is-compact:hover .aux-monitor-chassis,
    .aux-desk-monitor.is-compact:focus-within .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token:hover .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token:focus-within .aux-monitor-chassis {
      border-color: rgba(251, 191, 36, 0.65);
      box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(251, 191, 36, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.45);
    }

    .aux-desk-monitor.is-compact .aux-screw,
    .aux-desk-monitor.is-compact .aux-chassis-footer,
    .aux-desk-monitor.is-compact .aux-desk-stand,
    .aux-desk-monitor.is-compact .aux-hud-status,
    .aux-desk-monitor.is-compact .aux-hud-action,
    .aux-desk-monitor.is-compact-token .aux-screw,
    .aux-desk-monitor.is-compact-token .aux-chassis-footer,
    .aux-desk-monitor.is-compact-token .aux-desk-stand,
    .aux-desk-monitor.is-compact-token .aux-hud-status,
    .aux-desk-monitor.is-compact-token .aux-hud-action {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      position: absolute;
      transform: scale(0.6);
    }

    .aux-desk-monitor.is-compact .aux-crt-bezel,
    .aux-desk-monitor.is-compact-token .aux-crt-bezel {
      width: 28px;
      height: 28px;
      padding: 1.5px;
      border-radius: 50%;
      box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.96),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .aux-desk-monitor.is-compact .aux-crt-screen,
    .aux-desk-monitor.is-compact-token .aux-crt-screen {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.95);
    }

    .aux-desk-monitor.is-compact .aux-crt-phosphor,
    .aux-desk-monitor.is-compact-token .aux-crt-phosphor {
      padding: 0;
      border-radius: 50%;
      align-items: center;
      justify-content: center;
    }

    .aux-desk-monitor.is-compact .aux-crt-hud,
    .aux-desk-monitor.is-compact-token .aux-crt-hud {
      height: 100%;
      width: 100%;
      align-items: center;
      justify-content: center;
    }

    .aux-desk-monitor.is-compact .aux-hud-graphic,
    .aux-desk-monitor.is-compact-token .aux-hud-graphic {
      margin: 0;
      width: 100%;
      height: 100%;
    }

    .aux-desk-monitor.is-compact .aux-flask-svg,
    .aux-desk-monitor.is-compact-token .aux-flask-svg {
      width: 19px;
      height: 15px;
    }

    /* Compact Token Hover Badge (Floating Tactical Chip) - Centered over token */
    .aux-token-chip {
      position: absolute;
      bottom: calc(100% + 7px);
      left: 50%;
      transform: translateX(-50%) translateY(4px);
      background: rgba(18, 20, 26, 0.96);
      border: 1px solid rgba(251, 191, 36, 0.45);
      border-radius: 4px;
      padding: 3px 8px;
      font-family: 'Share Tech Mono', 'IBM Plex Mono', monospace;
      font-size: 8.5px;
      font-weight: 700;
      letter-spacing: 0.06em;
      color: var(--amber, #fbbf24);
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 10px rgba(251, 191, 36, 0.2);
      transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
      z-index: 35;
    }

    .aux-token-chip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-width: 3.5px 3.5px 0 3.5px;
      border-style: solid;
      border-color: rgba(251, 191, 36, 0.5) transparent transparent transparent;
    }

    .aux-desk-monitor.is-compact:hover .aux-token-chip,
    .aux-desk-monitor.is-compact:focus-within .aux-token-chip,
    .aux-desk-monitor.is-compact.is-hovered .aux-token-chip,
    .aux-desk-monitor.is-compact-token:hover .aux-token-chip,
    .aux-desk-monitor.is-compact-token:focus-within .aux-token-chip,
    .aux-desk-monitor.is-compact-token.is-hovered .aux-token-chip {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }

    .aux-desk-monitor:not(.is-compact-token):not(.is-compact) .aux-token-chip {
      display: none !important;
    }

    /* Interactive :hover and :focus-visible States */
    .aux-crt-screen:hover,
    .aux-crt-screen:focus-visible {
      filter: brightness(1.15) contrast(1.05);
      box-shadow:
        inset 0 0 16px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(251, 191, 36, 0.35);
    }

    .aux-crt-screen:hover .aux-crt-phosphor,
    .aux-crt-screen:focus-visible .aux-crt-phosphor {
      animation: auxPhosphorFlicker 0.15s ease infinite alternate;
      color: #fef08a;
      text-shadow: 0 0 5px #fbbf24, 0 0 10px rgba(251, 191, 36, 0.6);
    }

    .aux-crt-screen:hover .aux-hud-action,
    .aux-crt-screen:focus-visible .aux-hud-action {
      border-color: #38bdf8;
      background: rgba(56, 189, 248, 0.16);
      box-shadow: 0 0 8px rgba(56, 189, 248, 0.45);
    }

    .aux-crt-screen:hover .aux-action-idle,
    .aux-crt-screen:focus-visible .aux-action-idle {
      display: none;
    }

    .aux-crt-screen:hover .aux-action-hover,
    .aux-crt-screen:focus-visible .aux-action-hover {
      display: inline-block;
    }

    .aux-crt-screen:hover .aux-crt-sweep,
    .aux-crt-screen:focus-visible .aux-crt-sweep {
      opacity: 1;
      animation: auxCrtSweep 1.6s linear infinite;
    }

    @keyframes auxCrtSweep {
      0% {
        top: -12px;
        opacity: 0;
      }

      15% {
        opacity: 0.75;
      }

      85% {
        opacity: 0.75;
      }

      100% {
        top: 100%;
        opacity: 0;
      }
    }

    @keyframes auxPhosphorFlicker {
      0% {
        filter: brightness(1);
      }

      100% {
        filter: brightness(1.06);
      }
    }

    /* Bottom Mechanical Controls & Ports - Symmetrically Padded Away from Screws */
    .aux-chassis-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 4px;
      padding: 0 13px;
      font-size: 6.8px;
      letter-spacing: 0.1em;
      color: #8a99ad;
      line-height: 1;
    }

    .aux-brand-sub {
      font-weight: 600;
      letter-spacing: 0.12em;
      color: #aab3c2;
    }

    .aux-led-cluster {
      display: flex;
      align-items: center;
      gap: 3px;
    }

    .aux-sub-led {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: #00ff66;
      box-shadow: 0 0 4px #00ff66;
    }

    /* Desk Base Stand Shadow */
    .aux-desk-stand {
      position: absolute;
      left: 10%;
      right: 10%;
      bottom: -5px;
      height: 6px;
      background: rgba(0, 0, 0, 0.65);
      filter: blur(4px);
      border-radius: 50%;
      z-index: -1;
    }

    /* Motion Accessibility Override */
    @media (prefers-reduced-motion: reduce) {

      .aux-steam-path,
      .aux-crt-sweep,
      .aux-crt-screen:hover .aux-crt-phosphor {
        animation: none !important;
      }
    }

    /* ==========================================================================
       AUXILIARY SPRING-COILED HELICAL CABLE (LABORATORY DESK UMBILICAL)
       Hardware telephone handset coil cord bridging mini-CRT to main casing.
       Active whenever the aux monitor is on desk, with interactive fidget physics.
       ========================================================================== */
    .aux-coiled-cable {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 5;
      /* Strictly behind aux monitor (6) and main casing (10) */
      opacity: 0;
      visibility: hidden;
      contain: strict;
      overflow: hidden;
      transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
    }

    .aux-coiled-cable.is-visible {
      opacity: 1;
      visibility: visible;
    }

    .aux-cable-hitbox-layer {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 7;
      /* Placed above monitor base (6) for reliable hit-testing */
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
    }

    .aux-cable-hitbox-layer.is-visible {
      opacity: 1;
      visibility: visible;
    }

    .cable-hitbox {
      pointer-events: stroke;
      cursor: grab;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    .cable-hitbox:active,
    .aux-cable-hitbox-layer.is-dragging .cable-hitbox {
      cursor: grabbing;
    }

    /* ==========================================================================
       10j: REALIZM MONITORÓW – mały monitor i guzik kompaktowy
       Jedno źródło światła (lewa-góra) dla obu monitorów. Same wartości wyglądu: logika pokazywania, chowania i przejść
       (.is-compact, .is-compact-token, .is-docked, …) oraz kabel i jego strefa kliknięcia pozostają bez zmian.
       ========================================================================== */
    .aux-monitor-chassis {
      background: linear-gradient(158deg, #363a45 0%, #272a32 36%, #1b1c21 72%, #15161a 100%);
      border-color: #474c5a #2b2e37 #1b1d23 #3b3f4c;
      box-shadow:
        0 18px 28px -10px rgba(0, 0, 0, 0.92),
        0 7px 12px rgba(0, 0, 0, 0.7),
        inset 1.5px 1.5px 1px rgba(255, 255, 255, 0.22),
        inset -1px -2px 2px rgba(0, 0, 0, 0.7),
        inset 0 0 16px rgba(0, 0, 0, 0.28);
    }

    /* cokół: obudowa stoi na blacie, a nie wisi nad nim */
    .aux-desk-monitor:not(.is-compact):not(.is-compact-token) .aux-monitor-chassis::before {
      content: '';
      position: absolute;
      left: -2px;
      right: -2px;
      bottom: -6px;
      height: 7px;
      z-index: -1;
      border-radius: 2px 2px 5px 5px;
      background: linear-gradient(180deg, #17181c 0%, #0b0c0e 100%);
      box-shadow: 0 5px 10px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.07);
      pointer-events: none;
    }

    .aux-desk-stand {
      left: -4%;
      right: -4%;
      bottom: -12px;
      height: 10px;
      background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 75%);
      filter: blur(3px);
    }

    /* zagłębienie ekranu: ściana od strony światła w cieniu, dolna krawędź łapie światło */
    .aux-crt-bezel {
      position: relative;
      box-shadow:
        inset 2px 3px 9px rgba(0, 0, 0, 0.97),
        inset 0 0 0 1px #1a1c22,
        1px 1px 0 rgba(255, 255, 255, 0.10),
        -1px -1px 0 rgba(0, 0, 0, 0.55);
    }

    /* śruby: szczeliny pod różnymi kątami, odblask od lewej-góry */
    .aux-screw {
      background:
        linear-gradient(calc(var(--sa, 30) * 1deg), transparent 40%, rgba(0, 0, 0, 0.78) 40%, rgba(0, 0, 0, 0.78) 58%, transparent 58%),
        radial-gradient(circle at 36% 30%, #8d96a4 0%, #353a44 62%, #17181c 100%);
      box-shadow: inset 0.5px 0.5px 0.8px rgba(255, 255, 255, 0.35), 0.5px 1px 1.5px rgba(0, 0, 0, 0.9);
    }

    .aux-screw-tl {
      --sa: 28;
    }

    .aux-screw-tr {
      --sa: 74;
    }

    .aux-screw-bl {
      --sa: 112;
    }

    .aux-screw-br {
      --sa: 151;
    }

    /* odblask szkła po stronie światła (był w prawym górnym rogu – wbrew oświetleniu) */
    .aux-crt-glare {
      left: 0;
      right: auto;
      border-radius: 5px 0 25px 0;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, transparent 60%);
    }

    /* ekran małego monitora też świeci: miękka poświata na jego ramce (stała, bursztynowa jak jego luminofor) */
    .aux-crt-bezel::before {
      content: '';
      position: absolute;
      inset: 4px;
      border-radius: 5px;
      pointer-events: none;
      box-shadow: 0 0 5px 1px rgba(251, 191, 36, 0.20), 0 0 14px 2px rgba(251, 191, 36, 0.08);
    }

    .aux-desk-monitor.is-compact .aux-crt-bezel::before,
    .aux-desk-monitor.is-compact-token .aux-crt-bezel::before {
      display: none;
    }

    /* dioda zasilania z poświatą rozlewającą się na obudowę (dioda małego monitora zostaje) */
    .aux-led-cluster {
      position: relative;
    }

    .aux-led-cluster::before {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      width: 22px;
      height: 22px;
      transform: translate(-50%, -50%);
      background: radial-gradient(circle, rgba(0, 255, 102, 0.22) 0%, rgba(0, 255, 102, 0) 70%);
      pointer-events: none;
    }

    .aux-sub-led {
      box-shadow: 0 0 3px #00ff66, 0 0 7px rgba(0, 255, 102, 0.55);
    }

    /* Guzik kompaktowy (bez diody): w języku przycisków DEGAUSS / POWER – wgłębiony pierścień, wypukła soczewka ze szkłem */
    .aux-desk-monitor.is-compact .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token .aux-monitor-chassis {
      background: radial-gradient(circle at 50% 38%, #0f1013 0%, #181a1f 62%, #24272e 100%);
      border: 1px solid #0a0b0e;
      box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.10),
        0 -1px 0 rgba(0, 0, 0, 0.5),
        0 9px 16px -5px rgba(0, 0, 0, 0.85);
    }

    .aux-desk-monitor.is-compact .aux-crt-bezel,
    .aux-desk-monitor.is-compact-token .aux-crt-bezel {
      background:
        radial-gradient(circle at 50% 56%, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.10) 38%, rgba(0, 0, 0, 0) 62%),
        radial-gradient(circle at 35% 33%, #565c69 0%, #1f2127 72%, #131418 100%);
      border: 1px solid #3d424e;
      box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.85),
        inset 0 1px 1.5px rgba(255, 255, 255, 0.30),
        inset 0 -2px 3px rgba(0, 0, 0, 0.6);
    }

    .aux-desk-monitor.is-compact .aux-crt-screen,
    .aux-desk-monitor.is-compact-token .aux-crt-screen {
      box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 4px rgba(251, 191, 36, 0.18);
    }

    .aux-desk-monitor.is-compact:hover .aux-monitor-chassis,
    .aux-desk-monitor.is-compact:focus-within .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token:hover .aux-monitor-chassis,
    .aux-desk-monitor.is-compact-token:focus-within .aux-monitor-chassis {
      border-color: rgba(251, 191, 36, 0.7);
      box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(251, 191, 36, 0.25),
        0 0 14px rgba(251, 191, 36, 0.40),
        0 9px 16px -5px rgba(0, 0, 0, 0.85);
    }

    .aux-token-chip {
      background: linear-gradient(180deg, #1f2127 0%, #14151a 100%);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 10px rgba(251, 191, 36, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    @media (prefers-reduced-motion: reduce) {

      .crt-bezel-frame::before,
      .crt-screen-glass::after {
        transition: none;
        animation: none;
      }
    }