  
  :root {
    
    --horizon-boost: 0px;

    --lane-1-bottom: 115px;
    --lane-1-height: 11.2vh;
    --lane-3-height:  7.8vh;
    --lane-5-height:  5.6vh;

    --fahrbahn-1: 120px;
    --fahrbahn-factor: 0.85;
    --fahrbahn-2: calc(var(--fahrbahn-1) * 0.85);         
    --deko-lift: 60px;                                    

    --edge-3: calc(var(--lane-1-bottom) + var(--fahrbahn-1));
    --edge-5: calc(var(--edge-3) + var(--fahrbahn-2));

    --lane-3-bottom: calc(var(--edge-3) + var(--deko-lift));
    --lane-5-bottom: calc(var(--edge-5) + var(--deko-lift) + 20px);

    --lane-2-bottom: calc(var(--lane-1-bottom) + var(--lane-1-height) / 2 - 20px);
    --lane-4-bottom: calc(var(--lane-3-bottom) + 20px);
    --lane-7-bottom: calc(var(--lane-5-bottom) + 10px);

    --gradient-color-1: #5badff;
    --gradient-color-2: #cc0000;
    --gradient-color-3: #0000a0;
    --gradient-color-4: #ff8000;

    --floor-top:    rgba(15, 15, 20, 0.6);
    --floor-mid:    #17171d;
    --floor-bottom: #050508;

    --hex-size:            40;
    --hex-padding:         4;
    --hex-bottom-offset:   0;
    --hex-cols:            0;   
    --hex-rows:            12;  
    --hex-step-rows:       4;   
    --hex-left-margin:     3;   
    --hex-right-shift:     64;  
    --hex-fill:            rgba(15, 15, 20, 0.6);
    --hex-stroke:          rgba(255, 255, 255, 0.22);
    --hex-stroke-width:    1;

    --hex-highlight:       rgba(120, 200, 255, 0.85);
    --hex-flip-duration:   500;   

    --wave-mode:           0;     

    --wave-speed:          0.7;
    --wave-wavelength:     8;
    --wave-threshold:      0.75;
    --wave-tilt:           0.3;
    --wave-random-restart: 4000;

    --ekg-speed:           1.2;   
    --ekg-wavelength:      14;    
    --ekg-amplitude:       3.5;   
    --ekg-center-row:      9;     
    --ekg-thickness:       0.8;   

    --display-scale:       1;     
    --display-stretch-y:   2;     
    --display-center-row:  9;     
    --display-interval:    2000;  
    --display-repeat:      1;     

    --mouse-enabled:       1;     
    --mouse-radius:        90;    

    --loop-enabled:        0;     
    --loop-flash-ms:       400;   
    --loop-burn-ms:        4000;  
    --loop-spark-count:    3;     
    --loop-spark-ms:       200;   
    --loop-go-ms:          900;   
    --loop-cool-ms:        800;   
  }

  @font-face {
    font-family: 'Nunito';
    src: url('../../assets/fonts/nunito-v32-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Nunito';
    src: url('../../assets/fonts/nunito-v32-latin-italic.woff2') format('woff2');
    font-weight: 400; font-style: italic; font-display: swap;
  }
  @font-face {
    font-family: 'Nunito';
    src: url('../../assets/fonts/nunito-v32-latin-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
  }
  @font-face {
    font-family: 'Metamorphous';
    src: url('../../assets/fonts/metamorphous-v22-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
  }

  * { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    background: #0F0F14;
    overflow: hidden;
    
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: #ccc;
  }

  .stage { position: relative; width: 100%; height: 100vh; overflow: hidden; }

  #portal-overlay {
    position: fixed; inset: 0;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    clip-path: circle(0vmax at 50% 50%);   
    background: #0A0612;   
  }
  #portal-transition-canvas {
    display: block;
    width: 100%; height: 100%;
    
    --gradient-color-1: #A832F8;
    --gradient-color-2: #6614A0;
    --gradient-color-3: #300a60;
    --gradient-color-4: #0A0612;
  }

  #portal-level {
    position: fixed; inset: 0;
    z-index: 90000;   
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    overflow: hidden;
  }
  #portal-level.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  #portal-camera {
    position: absolute; top: 0; left: 0;
    width: 189vw; height: 100%;
    will-change: transform;
  }
  
  #portal-sky-canvas {
    position: absolute; top: 0; left: 0;
    
    width: 100vw; height: calc(80vh - var(--horizon-boost) / 2 - 40px);
    z-index: -1;   
    
    --gradient-color-1: #6614A0;
    --gradient-color-2: #A832F8;
    --gradient-color-3: #300a60;
    --gradient-color-4: #1a0838;
  }
  #portal-floor {
    position: absolute; bottom: 0; left: 0;
    
    width: 189vw; height: calc(20vh + var(--horizon-boost) / 2 + 40px);
    z-index: 0;   
    
    background: #14202a url('../../assets/floors/portal-demonic-floor-1.avif') 0 100% / auto 24vh repeat;
    image-rendering: auto;
  }
  
  .portal-lane {
    position: absolute; inset: 0;
    width: 189vw;
    pointer-events: none;
    will-change: transform;
    
  }
  
  #portal-lane-0-deko1  { z-index: 6000; }
  #portal-lane-2-deko2  { z-index: 4000; }
  #portal-lane-3-char2  { z-index: 3000; }
  #portal-lane-4-deko3  { z-index: 2000; }   
  #portal-lane-5-deko4  { z-index: 1000; }   
  
  .portal-lane > canvas {
    position: absolute;
    display: block;
  }
  
  #portal-exit-portal {
    position: absolute;
    right: 4vw; bottom: 20px;   
    height: 62vh;
    width: auto;
    aspect-ratio: 700 / 740;
    pointer-events: none;
    z-index: 4500;   
  }
  #portal-pip {
    position: absolute;
    bottom: 15px;   
    left: 50%;
    transform: translateX(-50%);   
    height: 44vh;   
    width: auto;
    aspect-ratio: 480 / 540;
    pointer-events: none;
    image-rendering: auto;
    z-index: 5000;   
  }
  
  .portal-sign {
    position: absolute;
    bottom: -40px;
    width: clamp(180px, 22vw, 330px);
    pointer-events: inherit;
    cursor: pointer;
    z-index: 5;
  }
  .portal-sign img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
  .portal-sign-left  { left: 0; }
  .portal-sign-right { right: 0; }
  
  .portal-sign-label {
    position: absolute;
    top: 21%;
    font-family: 'Metamorphous', 'Cinzel', 'Georgia', serif;
    font-size: clamp(16px, 3vw, 42px);
    letter-spacing: 0.05em;
    color: #3a2a1c;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
  }
  .portal-sign-left  .portal-sign-label { left:  25%; }
  .portal-sign-right .portal-sign-label { right: 25%; }
  @media (orientation: landscape) and (max-height: 500px) {
    .portal-sign { max-width: 20vw; }
  }

  @keyframes portal-clock-hand-backwards {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(-360deg); }
  }
  .portal-clock-hand-small,
  .portal-clock-hand-large {
    transform-origin: 50% 50%;
    animation: portal-clock-hand-backwards linear infinite;
    will-change: transform;
  }
  .portal-clock-hand-small { animation-duration: 60s; }    
  .portal-clock-hand-large { animation-duration: 20s; }    

  #portal-debug {
    position: absolute;
    top: 12px; right: 12px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.6);
    color: #A832F8;
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
    z-index: 20;
    pointer-events: none;
    border-radius: 4px;
  }
  
  @media (orientation: landscape) and (max-height: 500px) {
    .stage { transform: translateY(-25vh); }
    
    #floor { bottom: -50px; }
  }

  #gradient-canvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: calc(60vh - var(--horizon-boost));  
    display: block; z-index: 1;
  }

  #backdrop-landmark {
    
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: 2; pointer-events: none;
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  #aurora-overlay,
#aurora-overlay-dupli {
    position: absolute; top: 0;
    
    left: 100vw;
    width: 100vw; height: calc(60vh - var(--horizon-boost));
    z-index: 3; pointer-events: none;
    overflow: visible;   
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  }
  #aurora-overlay-dupli { left: 500vw; }   

  .honeycomb { display: block; width: 100%; height: 100%; overflow: visible; }
  .honeycomb .hex-inner {
    transform-origin: center;
    transform-box: fill-box;
    transition:
      transform calc(var(--hex-flip-duration) * 1ms) cubic-bezier(0.4, 0, 0.2, 1);
  }
  .honeycomb polygon {
    fill:   var(--hex-fill);
    stroke: var(--hex-stroke);
    stroke-width: var(--hex-stroke-width);
    stroke-linejoin: round;
    transition:
      fill calc(var(--hex-flip-duration) * 1ms * 0.5) ease-in-out;
  }
  
  .honeycomb .hex.is-flipped .hex-inner { transform: scaleY(-1); }
  .honeycomb .hex.is-flipped polygon    { fill: var(--hex-highlight); }
  
  .honeycomb .hex.is-active  .hex-inner { transform: scaleY(-1); }
  .honeycomb .hex.is-active  polygon    { fill: var(--hex-highlight); }
  
  .honeycomb .hex.is-hover-1 polygon { fill: var(--hex-highlight); }
  .honeycomb .hex.is-hover-2 polygon { fill: color-mix(in srgb, var(--hex-fill), var(--hex-highlight) 60%); }
  .honeycomb .hex.is-hover-3 polygon { fill: color-mix(in srgb, var(--hex-fill), var(--hex-highlight) 25%); }

  .honeycomb .hex.hex-menu { pointer-events: auto; cursor: pointer; }
  .honeycomb .hex.hex-menu polygon { fill: rgba(120, 200, 255, 0.15); transition: fill 200ms ease; }
  .honeycomb .hex.hex-menu:hover polygon { fill: rgba(120, 200, 255, 0.55); }
  .honeycomb .hex.hex-menu .hex-icon { color: rgba(255, 255, 255, 0.85); transition: color 200ms ease; pointer-events: none; }
  .honeycomb .hex.hex-menu:hover .hex-icon { color: #fff; }

  #floor {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: calc(46vh + var(--horizon-boost));
    z-index: 4;   

  }

  body.floor-cobble #floor {
    perspective: calc(500px + var(--horizon-boost));  
    overflow: hidden;
    background: transparent;
  }
  body.floor-cobble #floor::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -200%;
    width: 500%;
    height: 1200%;
    background: url('../../assets/cobblestone-tile-v1.avif') repeat;
    background-size: 300px 300px;
    transform-origin: bottom center;
    transform: rotateX(65deg);
    z-index: 0;
  }
  body.floor-cobble #floor::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 70% 100% at 50% 60%,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.85) 100%),
      linear-gradient(180deg,
        var(--floor-top)    0%,
        rgba(15, 15, 20, 0.3) 50%,
        rgba(5, 5, 8, 0.6)  100%);
    z-index: 1;
    pointer-events: none;
  }

  body.floor-grass { background: #71753d; }   

  body.season-summer    { background: #a9956b; }   
  body.season-autumn    { background: #7f513a; }   
  body.season-winter    { background: #b5bbc8; }   
  body.season-spring    { background: #516438; }   

  .floor-panorama {
    position: absolute; top: 0; left: 0;
    width: 600vw; height: 100%;
    z-index: 0;   
    pointer-events: none;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(-100vw);   
  }
  .floor-segment {
    position: absolute; top: 0; bottom: 0;
    width: 100vw;
    background-position: center bottom;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .floor-seg-fruehling-dupli { left:   0;    background-image: url('../../assets/floors/stage-floor-n4-ost.avif');  }
  .floor-seg-sommer          { left: 100vw;  background-image: url('../../assets/floors/stage-floor-n1-sued.avif'); }
  .floor-seg-herbst          { left: 200vw;  background-image: url('../../assets/floors/stage-floor-n2-west.avif'); }
  .floor-seg-winter          { left: 300vw;  background-image: url('../../assets/floors/stage-floor-n3-nord.avif'); }
  .floor-seg-fruehling       { left: 400vw;  background-image: url('../../assets/floors/stage-floor-n4-ost.avif');  }
  .floor-seg-sommer-dupli    { left: 500vw;  background-image: url('../../assets/floors/stage-floor-n1-sued.avif'); }

  .lane-stage {
    position: absolute;
    will-change: transform;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  .lane-deko[data-season="spring-dupli"] { --season-offset:    0; }
  .lane-deko[data-season="summer"]       { --season-offset: 100vw; }
  .lane-deko[data-season="autumn"]       { --season-offset: 200vw; }
  .lane-deko[data-season="winter"]       { --season-offset: 300vw; }
  .lane-deko[data-season="spring"]       { --season-offset: 400vw; }
  .lane-deko[data-season="summer-dupli"] { --season-offset: 500vw; }

  @keyframes windmill-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
  }
  .lane-10-bg-windmillwings {
    animation: windmill-spin 24s linear infinite;
    transform-origin: 50% 50%;
  }

  @keyframes chimney-smoke {
    0%,100% { transform: scaleY(0.85) scaleX(0.95); opacity: 0.60; }
    50%     { transform: scaleY(1.10) scaleX(1.05); opacity: 0.90; }
  }
  .lane-10-bg-smoke {
    transform-origin: bottom center;
    will-change: transform, opacity;
  }
  .smoke-left   { animation: chimney-smoke 4.5s ease-in-out infinite;              }
  .smoke-middle { animation: chimney-smoke 5.2s ease-in-out infinite;              animation-delay: 1.5s; }
  .smoke-right  { animation: chimney-smoke 4.8s ease-in-out infinite;              animation-delay: 2.8s; }

  .stage-info {
    position: fixed; bottom: 10px; right: 12px;
    font-size: 11px; color: #7EC8E3;   
    letter-spacing: 0.1em; text-transform: uppercase;
    z-index: 30000;   
  }
  .stage-info a { color: inherit; text-decoration: none; opacity: 0.85; transition: opacity 200ms ease; }
  .stage-info a:hover { opacity: 1; text-decoration: underline; }

  .world-container {
    position: absolute; inset: 0;
    transition: transform 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    
  }
  .world-container.slide-west,
  .world-container.slide-east { will-change: transform; }
  .world-container.slide-west { transform: translateX(-100vw); }
  .world-container.slide-east { transform: translateX( 100vw); }

  .foreground-plane {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 20000;
  }
  
  .foreground-plane .sign {
    position: absolute;
    bottom: -40px;
    
    width: clamp(180px, 22vw, 330px);
    pointer-events: auto;
    cursor: pointer;
    display: block;
  }
  
  @media (orientation: landscape) and (max-height: 500px) {
    .foreground-plane .sign {
      max-width: 20vw;
    }
  }
  .foreground-plane .sign img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
  }
  .foreground-plane .sign-left  { left: 0; }
  .foreground-plane .sign-right { right: 0; }

  .foreground-plane .sign-label {
    position: absolute;
    top: 21%;
    font-family: 'Metamorphous', 'Cinzel', 'Georgia', serif;
    font-size: clamp(16px, 3vw, 42px);   
    letter-spacing: 0.05em;
    color: #3a2a1c;   
    text-shadow: 0 1px 0 rgba(255, 240, 200, 0.4);   
    pointer-events: none;
    user-select: none;
    line-height: 1;
    white-space: nowrap;
  }
  .foreground-plane .sign-left  .sign-label { left:  25%; }
  .foreground-plane .sign-right .sign-label { right: 25%; }

  .cfg-toggle {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 200;
    background: rgba(20, 20, 28, 0.75);
    color: #ddd;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 12px;
    font: 12px/1 system-ui, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
  }
  .cfg-toggle:hover { background: rgba(30, 30, 45, 0.9); }

  .cfg-panel {
    position: fixed;
    top: 50px; right: 12px;
    z-index: 30000;   
    width: 320px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: rgba(14, 14, 20, 0.96);   
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 14px 16px 18px;
    color: #ccc;
    font: 12px/1.4 system-ui, sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  }
  .cfg-panel[hidden] { display: none; }
  .cfg-close {
    position: absolute;
    top: 8px; right: 10px;
    background: transparent;
    border: none;
    color: #999;
    font: 20px/1 system-ui;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: color 150ms ease, background 150ms ease;
  }
  .cfg-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

  .content-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;   
    background: rgba(0, 0, 0, 0.82);   
    display: flex;
    align-items: center;
    justify-content: center;
    animation: contentFadeIn 220ms ease;
  }
  .content-overlay[hidden] { display: none; }
  @keyframes contentFadeIn { from { opacity: 0; } to { opacity: 1; } }
  .content-box {
    position: relative;
    width: min(680px, 90vw);
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(14, 14, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 28px 32px 26px;
    color: #ddd;
    font: 14px/1.5 system-ui, sans-serif;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
  }
  .content-close {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent;
    border: none;
    color: #999;
    font: 24px/1 system-ui;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 3px;
    transition: color 150ms ease, background 150ms ease;
  }
  .content-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
  .content-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 18px;
    padding-bottom: 0;
  }
  .content-tabs button {
    background: transparent;
    border: none;
    color: #999;
    padding: 8px 14px;
    font: 12px system-ui;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 150ms ease, border-color 150ms ease;
  }
  .content-tabs button:hover { color: #fff; }
  .content-tabs button.is-active {
    color: var(--gradient-color-1);
    border-bottom-color: var(--gradient-color-1);
  }
  .content-body h2 { font-size: 18px; margin: 0 0 12px; color: var(--gradient-color-1); font-weight: 500; letter-spacing: 0.02em; }
  .content-body h3 { font-size: 14px; margin: 18px 0 6px; color: #ccc; }
  .content-body p { margin: 0 0 10px; }
  .content-body a { color: var(--gradient-color-1); text-decoration: none; }
  .content-body a:hover { text-decoration: underline; }
  .content-body strong { color: #fff; }
  .cfg-panel h3 {
    margin: 14px 0 6px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gradient-color-1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 3px;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 18px;
  }
  .cfg-panel h3::after {
    content: '▾';
    position: absolute;
    right: 3px; top: 2px;
    color: #666;
    transition: transform 180ms ease;
    font-size: 10px;
  }
  .cfg-panel h3.collapsed::after { transform: rotate(-90deg); }
  .cfg-panel h3:first-child { margin-top: 0; }
  .cfg-section-body[hidden] { display: none; }
  .cfg-row {
    display: grid;
    grid-template-columns: 100px 1fr 45px;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
  }
  .cfg-row label { color: #999; font-size: 11px; }
  .cfg-row input[type=range] {
    width: 100%; height: 4px;
    -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
  }
  .cfg-row input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: var(--gradient-color-1);
    border-radius: 50%; cursor: pointer;
  }
  .cfg-row input[type=range]::-moz-range-thumb {
    width: 12px; height: 12px;
    background: var(--gradient-color-1);
    border: none; border-radius: 50%; cursor: pointer;
  }
  .cfg-row input[type=color] {
    -webkit-appearance: none; appearance: none;
    background: none; border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px; height: 22px; width: 100%; padding: 0;
    cursor: pointer;
  }
  .cfg-row input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
  .cfg-row input[type=color]::-webkit-color-swatch { border: none; border-radius: 2px; }
  .cfg-row .val { text-align: right; color: #bbb; font-variant-numeric: tabular-nums; font-size: 11px; }
  .cfg-actions { display: flex; gap: 6px; margin-top: 12px; }
  .cfg-actions button {
    flex: 1;
    background: rgba(255,255,255,0.06);
    color: #ddd;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 6px;
    font: 11px/1 system-ui;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
  }
  .cfg-actions button:hover { background: rgba(255,255,255,0.12); }

  .lane-char {
    border: 0px solid red;   
    position: absolute;
    left: 0;
    aspect-ratio: 8 / 9;
    pointer-events: none;
    will-change: transform, filter;
    image-rendering: auto;
    transform: translateX(-9999px);   
    transform-origin: bottom center;   
    
  }
  
  .lane-stage {
    position: absolute;
    left: 0;
    bottom: -60px;
    width: 100%;
    height: calc(34vh + var(--horizon-boost) + 60px);
    
  }

  #lane-0-char1 { bottom: 0;                                             height: 36vh; z-index: 5000; }
  #lane-2-char2 { bottom: var(--lane-2-bottom);                          height: 30vh; z-index: 4000; }
  #lane-4-char3 { bottom: var(--lane-4-bottom);                          height: 27vh; z-index: 3000; }
  
  #lane-7-char4 { bottom: var(--lane-7-bottom);                          height: 22vh; z-index: 2000; }
  
  #lane-0-char1b { bottom: 15px;                                          height: 32.4vh; z-index: 4800; }
  #lane-2-char2b { bottom: calc(var(--lane-2-bottom) + 15px);             height: 27vh;   z-index: 3800; }
  #lane-4-char3b { bottom: calc(var(--lane-4-bottom) + 15px);             height: 24.3vh; z-index: 2800; }
  #lane-7-char4b { bottom: calc(var(--lane-7-bottom) + 15px);             height: 19.8vh; z-index: 1800; }

  .lane-deko {
    border: 0px solid green;  
    position: absolute;
    pointer-events: none;
    image-rendering: auto;
    will-change: transform;
    transform: translateX(-50%);

  }

  @media (max-height: 1300px) {
    :root {
      --fahrbahn-1: 95px;                              
      --fahrbahn-factor: 0.82;                         
      --lane-1-bottom: 100px;                          
      --deko-lift: 45px;                               
    }
  }
  @media (max-height: 1080px) {
    :root {
      --fahrbahn-1: 80px;
      --fahrbahn-factor: 0.80;
      --lane-1-bottom: 85px;
      --deko-lift: 35px;
    }
  }
  @media (max-height: 900px) {
    :root {
      --fahrbahn-1: 65px;
      --fahrbahn-factor: 0.78;
      --lane-1-bottom: 70px;
      --deko-lift: 25px;
    }
  }
  @media (max-height: 700px) {
    
    #lane-7-char4,
    .lane-5-deko3-1, .lane-5-deko3-2, .lane-5-deko3-3 { display: none; }
    :root {
      --fahrbahn-1: 55px;
      --fahrbahn-factor: 0.75;
      --lane-1-bottom: 55px;
    }
  }
  @media (max-height: 550px) {
    
    #lane-4-char3,
    .lane-3-deko2-1, .lane-3-deko2-2 { display: none; }
    :root {
      --fahrbahn-1: 45px;
    }
  }

  body.floor-test-bright {
    --floor-top:    rgba(240, 240, 240, 0.7);
    --floor-mid:    #d5d5d8;
    --floor-bottom: #a8a8ac;
  }
  #ground-control button {
    background: rgba(255,255,255,0.06);
    color: #ddd;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 4px 10px;
    font: 11px system-ui;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
  }
  #ground-control button.is-on {
    background: rgba(120, 200, 255, 0.25);
    border-color: rgba(120, 200, 255, 0.6);
    color: #fff;
  }
  #ground-control {
    position: fixed;
    bottom: 40px; left: 12px;
    background: rgba(30, 30, 40, 0.85);
    padding: 8px 14px; border-radius: 6px;
    color: #ccc; font: 11px system-ui, sans-serif;
    display: flex; gap: 14px; align-items: center;
    z-index: 30001;  
    letter-spacing: 0.06em;
  }
  #ground-control[hidden] { display: none; }
  #ground-control label { display: flex; gap: 8px; align-items: center; }
  #ground-control input[type=range] { width: 140px; }
  #ground-control .val { min-width: 46px; text-align: right; color: #eee; font-variant-numeric: tabular-nums; }

  @font-face {
    font-family: 'PressStart2P';
    src: url('../../assets/fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
  }

  .rpg-box {
    background: #000;
    color: #39FF14;                                
    font-family: 'PressStart2P', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.03em;
    padding: 14px 18px;
    
    border: 3px solid #666;
    box-shadow:
      inset -2px -2px 0 #222,                      
      inset  2px  2px 0 #999,                      
      0 0 0 1px #000,                              
      0 0 20px rgba(57, 255, 20, 0.18);            
    text-shadow: 0 0 4px rgba(57, 255, 20, 0.55);
    image-rendering: pixelated;
  }

  .ui-toast-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200000;                               
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
  }
  .ui-toast-container-top    { top: 32px; }
  .ui-toast-container-bottom { bottom: 32px; }

  .ui-toast {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: auto;
  }
  .ui-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .ui-toast-speaker {
    color: #FFD700;                                
    font-size: 10px;
    margin-bottom: 6px;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
  }

  .ui-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: rgba(0, 0, 0, 0);                  
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: none;
  }
  .ui-dialog-overlay.is-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
  }
  .ui-dialog {
    pointer-events: auto;
  }
  .ui-dialog-top    { align-self: flex-start; }
  .ui-dialog-center { align-self: center; }
  .ui-dialog-bottom { align-self: flex-end; }

  .ui-dialog-overlay:has(.ui-dialog-top)    { align-items: flex-start; }
  .ui-dialog-overlay:has(.ui-dialog-center) { align-items: center; }
  .ui-dialog-overlay:has(.ui-dialog-bottom) { align-items: flex-end; }

  .ui-dialog-speaker {
    color: #FFD700;
    font-size: 11px;
    margin-bottom: 10px;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
  }
  .ui-dialog-text {
    margin-bottom: 12px;
    white-space: pre-line;                         
  }
  .ui-dialog.is-clickable {
    cursor: pointer;
  }
  .ui-dialog.is-clickable:not(.pip-com-770)::after {
    content: '▼';                                  
    display: block;
    margin-top: 8px;
    text-align: right;
    color: #39FF14;
    animation: rpg-blink 1s steps(2) infinite;
  }
  @keyframes rpg-blink { 50% { opacity: 0; } }

  .ui-dialog-choices {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
  }
  .ui-dialog-choices li {
    cursor: pointer;
    padding: 4px 8px;
    transition: background 0.1s, color 0.1s;
  }
  .ui-dialog-choices li:hover,
  .ui-dialog-choices li.is-selected {
    background: #39FF14;
    color: #000;
    text-shadow: none;
  }

  #preloader-screen {
    position: fixed;
    inset: 0;
    z-index: 300000;                               
    background: #0a0612;                           
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.6s ease;
  }
  #preloader-screen.is-hidden {
    opacity: 0;
    pointer-events: none;
  }
  .preloader-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    padding: 20px;
    flex-wrap: wrap;                                
    justify-content: center;
  }
  #preloader-pip {
    width: 240px;
    height: 240px;
    image-rendering: pixelated;
    display: block;
  }

  .pip-tv {
    flex-shrink: 0;
    background: linear-gradient(180deg, #b8b0a0 0%, #8a8272 50%, #6a6252 100%);
    border-radius: 14px;
    padding: 18px 20px 16px 20px;
    box-shadow:
      inset -3px -3px 0 rgba(0,0,0,0.35),
      inset  3px  3px 0 rgba(255,255,255,0.25),
      inset  0    0   0 2px #2a2418,
      0 8px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 340px;
  }
  
  .pip-tv-readout {
    background: #0a1408;
    color: #39FF14;
    font-family: 'PressStart2P', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: 0.03em;
    padding: 12px 14px;
    border-radius: 5px;
    box-shadow:
      inset  3px  3px 0 rgba(0,0,0,0.6),
      inset -2px -2px 0 rgba(80,120,80,0.12),
      0 0 10px rgba(57,255,20,0.15);
    text-shadow: 0 0 3px rgba(57,255,20,0.5);
    min-height: 80px;
    position: relative;
  }
  
  .pip-tv-readout::after {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 3px
    );
    border-radius: 5px;
  }
  .pip-tv-readout .ui-dialog-speaker {
    color: #FFD700;
    font-size: 9px;
    margin-bottom: 8px;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
  }
  .pip-tv-readout .preloader-text {
    white-space: pre-line;
    margin-bottom: 10px;
  }
  .pip-tv-readout .ui-dialog-choices {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
  }
  .pip-tv-readout .ui-dialog-choices li {
    cursor: pointer;
    padding: 3px 6px;
    transition: background 0.1s, color 0.1s;
  }
  .pip-tv-readout .ui-dialog-choices li:hover {
    background: #39FF14;
    color: #0a1408;
    text-shadow: none;
  }
  .pip-tv-brand {
    font-family: 'PressStart2P', 'Courier New', monospace;
    font-size: 9px;
    color: #2a2418;
    text-align: center;
    letter-spacing: 0.12em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
    padding-bottom: 4px;
  }
  .pip-tv-screen {
    background: #0a0f0a;
    border-radius: 6px;
    padding: 6px;
    box-shadow:
      inset  3px  3px 0 rgba(0,0,0,0.7),
      inset -2px -2px 0 rgba(80,120,80,0.15),
      0 0 12px rgba(57,255,20,0.18);
    position: relative;
    overflow: hidden;
  }
  
  .pip-tv-screen::after {
    content: '';
    position: absolute; inset: 6px;
    pointer-events: none;
    background: repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 3px
    );
    border-radius: 4px;
  }
  .pip-tv-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
  }
  
  .pip-tv-speaker {
    flex: 1;
    height: 22px;
    background-image: radial-gradient(circle at center, #2a2418 1.5px, transparent 2px);
    background-size: 8px 8px;
    background-position: 0 0;
    border-radius: 3px;
    box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px -1px 0 rgba(255,255,255,0.15);
    background-color: rgba(0,0,0,0.15);
  }
  .pip-tv-knobs {
    display: flex; gap: 8px; align-items: center;
  }
  .pip-tv-knob {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #d8d0bc, #8a7f66 60%, #4a4232);
    box-shadow:
      inset -1px -1px 2px rgba(0,0,0,0.5),
      0 1px 0 rgba(0,0,0,0.4);
    position: relative;
  }
  .pip-tv-knob::after {
    content: ''; position: absolute;
    top: 50%; left: 50%; width: 2px; height: 7px;
    background: #2a2418;
    transform: translate(-50%, -50%) rotate(35deg);
    border-radius: 1px;
  }
  .pip-tv-led {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #39FF14;
    box-shadow: 0 0 6px #39FF14, inset 0 0 2px rgba(255,255,255,0.6);
    animation: pip-tv-led-blink 2.5s ease-in-out infinite;
  }
  @keyframes pip-tv-led-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
  }

  .pip-com-770 {
    background: linear-gradient(180deg, #b8b0a0 0%, #8a8272 50%, #6a6252 100%);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow:
      inset -3px -3px 0 rgba(0,0,0,0.35),
      inset  3px  3px 0 rgba(255,255,255,0.25),
      inset  0    0   0 2px #2a2418,
      0 8px 20px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 770px;
    max-width: 92vw;
  }
  .pip-com-monitor {
    flex-shrink: 0;
    background: #0a0f0a;
    border-radius: 5px;
    padding: 4px;
    box-shadow:
      inset  3px  3px 0 rgba(0,0,0,0.7),
      inset -2px -2px 0 rgba(80,120,80,0.15),
      0 0 10px rgba(57,255,20,0.15);
    position: relative;
    overflow: hidden;
  }
  .pip-com-face {
    display: block;
    width: 96px; height: 96px;
    image-rendering: pixelated;
  }
  .pip-com-monitor::after {
    content: '';
    position: absolute; inset: 4px;
    pointer-events: none;
    background: repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 3px
    );
    border-radius: 3px;
  }
  .pip-com-knob-grid {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
  }
  .pip-com-knob-grid .pip-tv-knob {
    width: 16px; height: 16px;
  }
  .pip-com-readout {
    flex: 1 1 auto;
    background: #0a1408;
    color: #39FF14;
    font-family: 'PressStart2P', 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.6;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    border-radius: 5px;
    box-shadow:
      inset  3px  3px 0 rgba(0,0,0,0.6),
      inset -2px -2px 0 rgba(80,120,80,0.12),
      0 0 10px rgba(57,255,20,0.15);
    text-shadow: 0 0 3px rgba(57,255,20,0.5);
    min-height: 76px;
    position: relative;
    overflow: hidden;
  }
  .pip-com-readout::after {
    content: '';
    position: absolute; inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.18) 2px,
      rgba(0,0,0,0.18) 3px
    );
    border-radius: 5px;
  }
  .pip-com-readout .ui-dialog-speaker {
    color: #FFD700;
    font-size: 9px;
    margin-bottom: 6px;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
  }
  .pip-com-text {
    white-space: pre-line;
  }
  .pip-com-readout .ui-dialog-choices {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
  }
  .pip-com-readout .ui-dialog-choices li {
    cursor: pointer;
    padding: 3px 6px;
    transition: background 0.1s, color 0.1s;
  }
  .pip-com-readout .ui-dialog-choices li:hover {
    background: #39FF14;
    color: #0a1408;
    text-shadow: none;
  }
  
  .pip-com-speaker-vent {
    flex-shrink: 0;
    width: 60px;
    height: 90px;
    background-image: radial-gradient(circle at center, #2a2418 1.8px, transparent 2.4px);
    background-size: 9px 9px;
    background-color: rgba(0,0,0,0.15);
    border-radius: 4px;
    box-shadow: inset 1px 1px 0 rgba(0,0,0,0.3), inset -1px -1px 0 rgba(255,255,255,0.15);
  }
  
  .pip-com-770.is-clickable {
    cursor: pointer;
  }
  .pip-com-770.is-clickable .pip-com-readout::before {
    content: '▼';
    position: absolute;
    bottom: 4px; right: 8px;
    color: #39FF14;
    font-size: 10px;
    animation: rpg-blink 1s steps(2) infinite;
    z-index: 2;
  }
  .preloader-sprech {
    max-width: 480px;
    flex: 1 1 auto;
    min-width: 280px;
  }
  .preloader-text {
    white-space: pre-line;
    margin: 10px 0 14px 0;
  }
