/* ==== css/site.css ==== */
/* 3D pre-vis: a PS2-era menu space rendered in WebGL. Indigo night, glowing orbit rings, glossy badges,
   amber numerals on angled plates, a red dot-matrix wall far below, generated ambient music. */
:root {
  --night: #04030f; --violet: #3b2f8f; --lav: #b9b1ff; --teal: #5ff2dc; --amber: #ffbf3c; --fg: #e9e6ff; --muted: #9a93cf; --red: #e0242d; --line: rgba(185,177,255,.35);
  --disp: "Orbitron", "Segoe UI", sans-serif; --mono: "Share Tech Mono", Consolas, monospace; --serif: "Cormorant Garamond", Georgia, serif; --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; color: var(--fg); font: 13px/1.5 var(--body);
  background: radial-gradient(70% 60% at 50% 45%, #0d0a2a 0%, #05041a 55%, #010008 100%) fixed; }
body::after { content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.42) 0 1px, transparent 1px 3px); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--teal); }
:focus-visible { outline: 1px solid var(--teal); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr:focus-within { position: fixed; z-index: 90; left: 12px; top: 60px; width: auto; height: auto; clip: auto; background: rgba(8,6,30,.95); border: 1px solid var(--line); padding: 8px; }
.sr button { display: block; margin: 2px 0; background: none; border: 0; color: var(--teal); cursor: pointer; font: 400 14px var(--mono); }

#gl { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.sig { position: fixed; left: -50px; top: 150px; transform: rotate(-58deg); transform-origin: left top; pointer-events: none; font: italic 500 34px/1 var(--serif); color: rgba(95,242,220,.33); letter-spacing: .04em; white-space: nowrap; }
.sig small { display: block; font-size: 15px; color: rgba(95,242,220,.2); margin-left: 40px; }
.brand { position: fixed; z-index: 50; left: max(18px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 16px); font: 700 18px/1 var(--disp); letter-spacing: .18em; pointer-events: none; }
.brand span { color: var(--amber); } .brand small { display: block; margin-top: 6px; font: 400 11px var(--mono); color: var(--muted); letter-spacing: .2em; }
.hint { position: fixed; z-index: 50; right: max(18px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 50px); font: 400 12px var(--mono); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }

/* Label plate */
.plate { position: fixed; z-index: 30; pointer-events: none; display: grid; gap: 2px; opacity: 0; transform: translateX(-12px); transition: opacity .25s, transform .25s; }
.plate.on { opacity: 1; transform: none; }
.plate .code { font: 700 38px/1 var(--disp); color: var(--amber); text-shadow: 0 0 12px rgba(255,191,60,.55), 2px 2px 0 #3a2400; }
.plate .bar { padding: 6px 34px 6px 14px; font: 400 17px/1 var(--mono); letter-spacing: .12em; color: var(--teal); background: linear-gradient(90deg, rgba(18,13,58,.92), rgba(18,13,58,.55));
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.plate .sub { font: 400 12px var(--mono); color: var(--muted); letter-spacing: .1em; padding-left: 14px; }
.glitchtxt { animation: gt .3s steps(3) 1; } @keyframes gt { 0% { transform: translateX(-3px); color: var(--red) } 60% { transform: translateX(2px) } 100% { transform: none } }

/* Panels (movable on desktop, bottom sheet on phones) */
.panel { position: fixed; z-index: 60; width: min(420px, calc(100vw - 24px)); perspective: 1100px; --rx: 0deg; --ry: 0deg; }
.panel .rig { position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .18s ease-out; }
.panel.opening .rig { animation: flyout .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes flyout { from { transform: translate(var(--ox), var(--oy)) translateZ(-420px) rotateY(var(--oy-r, 38deg)) rotateX(14deg) scale(.25); opacity: 0; } 60% { opacity: 1; } }
.panel .plate3d { position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(185,177,255,.22);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.panel .p1 { transform: translateZ(-26px) translate(10px, 10px); background: rgba(40,30,120,.22); }
.panel .p2 { transform: translateZ(-54px) translate(20px, 20px); background: rgba(95,242,220,.05); border-color: rgba(95,242,220,.18); }
.panel .p3 { transform: translateZ(-90px) translate(32px, 34px); border-style: dashed; border-color: rgba(224,36,45,.25); background: none; }
.panel .face { position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 100px); transform: translateZ(0);
  background: linear-gradient(160deg, rgba(30,22,90,.9), rgba(8,6,30,.94)); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 60px rgba(80,60,220,.18); }
.panel .face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, transparent 30%, transparent 70%, rgba(95,242,220,.06) 100%); transform: translateX(var(--sheen, 0%)); }
.panel .glowshadow { position: absolute; left: 6%; right: 6%; bottom: -40px; height: 40px; transform: translateZ(-120px) rotateX(70deg); background: radial-gradient(50% 50% at 50% 50%, rgba(124,108,255,.45), transparent 70%); filter: blur(8px); pointer-events: none; }
.panel .ph { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.panel .ph::before { content: ""; width: 8px; height: 8px; background: var(--amber); box-shadow: 0 0 8px var(--amber); flex: none; }
.panel .ph .t { flex: 1; min-width: 0; font: 400 15px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel .ph .x { border: 1px solid var(--line); background: none; width: 30px; height: 26px; cursor: pointer; color: var(--lav); flex: none; }
.panel .pb { padding: 14px; overflow: auto; overscroll-behavior: contain; }
.panel h2 { margin: 0 0 4px; font: 700 20px/1.15 var(--disp); letter-spacing: .03em; }
.panel .meta { color: var(--muted); margin: 0 0 10px; font-size: 12px; }
.panel .big { font: 700 34px/1 var(--disp); color: var(--amber); text-shadow: 0 0 10px rgba(255,191,60,.4); }
.panel .big small { font: 400 13px var(--mono); color: var(--muted); letter-spacing: .1em; }
.addr { display: flex; border: 1px solid var(--line); margin: 10px 0; }
.addr code { flex: 1; min-width: 0; padding: 8px 10px; font: 400 15px var(--mono); color: var(--fg); background: rgba(0,0,0,.35); overflow-wrap: anywhere; user-select: all; }
.btn { font: 400 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 9px 12px; border: 1px solid var(--line); background: rgba(124,108,255,.12); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn.go { background: linear-gradient(#7c6cff, #3b2f8f); border-color: #cfc8ff; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .who b { font: 400 12px var(--mono); border: 1px solid var(--line); padding: 1px 8px; color: var(--teal); }
details.man summary { cursor: pointer; font: 400 13px var(--mono); letter-spacing: .12em; color: var(--lav); padding: 6px 0; }
details.man ol { margin: 6px 0; padding-left: 1.3rem; display: grid; gap: 4px; }
details.man p { color: var(--muted); margin: 6px 0; }
.news ul { margin: 0; padding: 0; } .news li { list-style: none; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid rgba(185,177,255,.15); }
.news li:first-child { border-top: 0; } .news time { font: 400 13px var(--mono); color: var(--amber); } .news .g { display: block; font: 400 11px var(--mono); color: var(--muted); letter-spacing: .08em; }
.meter { height: 8px; border: 1px solid var(--line); margin: 10px 0; } .meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--lav)); }
.opt { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 12px; } .opt label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.lbl { font: 400 12px var(--mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
input[type=radio], input[type=checkbox] { accent-color: #7c6cff; }
.mapthumb { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--line); }
.mapthumb .t { position: absolute; inset: -20%; display: grid; grid-template-columns: 1fr 1fr; filter: saturate(.6) hue-rotate(-20deg) brightness(.85); }
.mapthumb .t div { position: relative; overflow: hidden; aspect-ratio: 1; } .mapthumb img { position: absolute; inset: 0; width: 100%; height: 200%; image-rendering: pixelated; }

/* Data strip + phone dock */
.strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(transparent, rgba(4,3,15,.9) 40%); font: 400 13px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.strip b { color: var(--amber); font-weight: 400; } .strip .sp { flex: 1; }
.strip button { background: none; border: 1px solid var(--line); padding: 4px 10px; cursor: pointer; font: inherit; letter-spacing: inherit; color: var(--lav); text-transform: uppercase; }
.strip button[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); }
.dock { display: none; }

/* Boot */
.boot { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; cursor: pointer; }
.boot .ln { width: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--lav), transparent); animation: bl 1.1s ease forwards; position: absolute; top: 50%; }
@keyframes bl { to { width: 70vw } }
.boot .w { text-align: center; opacity: 0; animation: bw 1s .9s ease forwards; } @keyframes bw { to { opacity: 1 } }
.boot .w b { display: block; font: 700 clamp(28px, 6vw, 54px)/1 var(--disp); letter-spacing: .22em; } .boot .w b span { color: var(--amber); }
.boot .w small { display: block; margin-top: 14px; font: 400 14px var(--mono); color: var(--muted); letter-spacing: .25em; text-transform: uppercase; }
.boot.out { animation: bo .8s ease forwards; } @keyframes bo { to { opacity: 0 } }

.gate { position: fixed; inset: 0; z-index: 100; background: #020108; cursor: pointer; transition: opacity .6s ease; }
.gate::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.75)); }
.gate.go { opacity: 0; pointer-events: none; }
.gate .gdot { position: absolute; left: 50%; top: 56%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #e9e6ff; box-shadow: 0 0 16px 5px rgba(124,108,255,.65); animation: gbreathe 3.8s ease-in-out infinite; }
.gate .gtxt { position: absolute; left: 0; right: 0; top: calc(56% + 34px); margin: 0; text-align: center; font: 400 13px 'Share Tech Mono', monospace; letter-spacing: .42em; padding-left: .42em; color: #e9e6ff; animation: gtext 3.8s ease-in-out infinite; }
.gate .gsub { top: calc(56% + 62px); font-size: 11px; letter-spacing: .3em; padding-left: .3em; color: #8f88c6; animation: none; opacity: .65; }
.gate .gsilent { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); transform: translateX(-50%); background: none; border: 0; color: #6b6699; font: 400 11px 'Share Tech Mono', monospace; letter-spacing: .2em; cursor: pointer; padding: 10px 14px; z-index: 1; }
.gate .gsilent:hover, .gate .gsilent:focus-visible { color: #cfc8ff; outline: 1px solid rgba(185,177,255,.4); outline-offset: 0; }
@keyframes gbreathe { 0%, 100% { transform: scale(.7); opacity: .55; } 45% { transform: scale(1.25); opacity: 1; } }
@keyframes gtext { 0%, 100% { opacity: .42; } 45% { opacity: .85; } }
.iwave { position: fixed; z-index: 101; left: 50%; top: 56%; width: 0; height: 0; border: 1.5px solid rgba(207,200,255,.75); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; animation: iwave 1.4s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes iwave { to { width: 260vmax; height: 46vmax; opacity: 0; border-width: .5px; } }
.introcatch { position: fixed; inset: 0; z-index: 99; cursor: default; }
.introcatch span { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); font: 400 11px 'Share Tech Mono', monospace; color: #6b6699; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.inline { position: fixed; left: 0; right: 0; z-index: 60; margin: 0; padding: 0 16px; text-align: center; pointer-events: none; font: 400 clamp(10px, 1.5vw, 13px)/1.5 'Share Tech Mono', monospace; letter-spacing: .08em; color: #5ff2dc; text-shadow: 0 0 8px rgba(95,242,220,.55); opacity: 0; }
.sig, .brand, .qj, .hint, .dock, .strip { transition: opacity .9s ease; }
body.intro .sig, body.intro .brand, body.intro .qj, body.intro .hint, body.intro .plate, body.intro .dock, body.intro .strip, body.intro .soundask, body.intro .css3d { opacity: 0 !important; pointer-events: none !important; }
body.nogl #viewbtn, body.nogl #flybtn, body.nogl #lightsbtn { display: none; }
/* content blocks in your own windows */
.blk-h { font: 400 14px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 14px 0 6px; }
.blk-h:first-child { margin-top: 2px; }
.blk-p { margin: 0 0 10px; line-height: 1.55; }
.blk-list { margin: 0 0 10px; padding-left: 18px; } .blk-list li { margin: 3px 0; }
.blk-link { display: inline-block; margin: 4px 6px 8px 0; text-decoration: none; }
.blk-img { display: block; max-width: 100%; height: auto; margin: 6px 0 10px; border: 1px solid var(--line); }
.blk-status { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; font: 400 13px var(--mono); }
.blk-status i { width: 8px; height: 8px; background: #3a3940; flex: none; } .blk-status i.up { background: var(--red); box-shadow: 0 0 6px var(--red); } .blk-status span { color: var(--muted); }
.blk-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.addr .lbl { margin-right: 4px; }
/* systems: arrival announcement and the switcher */
.sys-name { position: fixed; z-index: 65; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; font: 700 clamp(28px, 7vw, 76px)/1 var(--disp); letter-spacing: .32em; padding-left: .32em; color: var(--fg);
  text-shadow: -3px 0 rgba(255,40,80,.55), 3px 0 rgba(95,242,220,.55), 0 0 24px rgba(124,108,255,.6); animation: sysname 4.2s ease forwards; }
@keyframes sysname { 0% { opacity: 0; letter-spacing: .9em; filter: blur(8px); } 18% { opacity: 1; letter-spacing: .32em; filter: none; } 22% { transform: translateX(-6px); } 24% { transform: none; } 75% { opacity: 1; } 100% { opacity: 0; letter-spacing: .5em; } }
.sysnav { position: fixed; z-index: 52; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 56px); display: flex; gap: 4px; }
.sysnav[hidden] { display: none; }
.sysnav button { background: rgba(8,6,30,.72); border: 1px solid rgba(185,177,255,.3); color: var(--lav); font: 400 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; min-height: 32px; cursor: pointer; }
.sysnav button:hover { color: var(--teal); border-color: var(--teal); } .sysnav .nm { color: var(--fg); min-width: 90px; }
body.intro .sysnav, body.cinema .sysnav { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .sysnav { left: 0; right: 0; justify-content: center; top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 98px); } .sysnav button { min-height: 40px; } body.dock-empty .sysnav { bottom: calc(env(safe-area-inset-bottom, 0px) + 44px); } }
/* idle cinema */
body.cinema .sig, body.cinema .brand, body.cinema .qj, body.cinema .hint, body.cinema .plate, body.cinema .dock, body.cinema .strip, body.cinema .bulletin, body.cinema .css3d, body.cinema .soundask { opacity: 0 !important; pointer-events: none !important; }
body.cinema, body.cinema #gl { cursor: none; }
body.cinema.cinema-awake, body.cinema.cinema-awake #gl { cursor: pointer; }
.cine-hint { position: fixed; z-index: 61; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%); padding: 6px 12px; font: 400 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--fg); background: rgba(8,6,30,.72); border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
body.cinema.cinema-awake .cine-hint { opacity: .9; }
.cine-cut { position: fixed; inset: 0; z-index: 90; pointer-events: none; mix-blend-mode: screen; background: repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 2px, transparent 2px 5px), linear-gradient(90deg, rgba(255,40,80,.25), transparent 30%, transparent 70%, rgba(95,242,220,.25)); animation: cinecut .34s steps(4) forwards; }
@keyframes cinecut { 0% { opacity: 1; transform: translateX(-14px); } 50% { opacity: .7; transform: translateX(10px); } 100% { opacity: 0; transform: none; } }
.cine-mark { position: fixed; z-index: 60; left: max(18px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); font: 400 11px var(--mono); letter-spacing: .24em; color: var(--muted); opacity: 0; animation: cinemark 3s 1.5s ease forwards; pointer-events: none; }
.cine-mark b { font: 700 13px var(--disp); color: var(--fg); letter-spacing: .2em; } .cine-mark i { display: inline-block; width: 6px; height: 6px; margin-left: 4px; background: var(--red); box-shadow: 0 0 6px var(--red); animation: cineblink 1.6s steps(2) infinite; }
@keyframes cinemark { to { opacity: .7; } } @keyframes cineblink { 50% { opacity: .15; } }
.row-ctl { display: flex; align-items: center; gap: 10px; }
.bulletin { position: fixed; z-index: 51; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 46px); transform: translateX(-50%); max-width: min(640px, calc(100vw - 32px)); padding: 4px 12px; font: 400 12px/1.4 var(--mono); letter-spacing: .08em; color: var(--amber); background: rgba(8,6,30,.72); border: 1px solid rgba(255,191,60,.35); text-align: center; pointer-events: none; transition: opacity .9s ease; }
@media (max-width: 700px) { .bulletin { top: calc(env(safe-area-inset-top, 0px) + 62px); } }
body.is-simple .bulletin, body.intro .bulletin { display: none; }
.s-head .bul { color: var(--amber); font-family: var(--mono); letter-spacing: .06em; }
@keyframes crt-on { 0% { transform: scaleY(.004) scaleX(0); filter: brightness(4) } 30% { transform: scaleY(.004) scaleX(1); filter: brightness(4) } 60% { transform: scaleY(1) scaleX(1); filter: brightness(1.6) } 100% { transform: none; filter: none; background: #04030f } }
@keyframes tear { 0% { transform: none; filter: none } 30% { transform: translateX(-14px) skewX(-8deg); filter: hue-rotate(80deg) contrast(1.6) } 60% { clip-path: inset(30% 0 35% 0); transform: translateX(10px) } 100% { transform: scaleY(1.04); clip-path: none } }
.nogl { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }

/* ---------- Phones: the readable list (arranged layout) ---------- */
.plist { display: none; }
@media (max-width: 700px) {
  .plist { display: flex; flex-direction: column; gap: 6px; position: fixed; z-index: 50; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 98px); bottom: calc(env(safe-area-inset-bottom, 0px) + 112px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px max(14px, env(safe-area-inset-right, 0px)) 14px 74px; }
  .plist[hidden] { display: none; }
  body.has-bulletin .plist { top: calc(env(safe-area-inset-top, 0px) + 136px); }
  body.noqj .plist { top: calc(env(safe-area-inset-top, 0px) + 60px); } body.noqj.has-bulletin .plist { top: calc(env(safe-area-inset-top, 0px) + 92px); }
  body.dock-empty .plist { bottom: calc(env(safe-area-inset-bottom, 0px) + 48px); }
  body.has-systems .plist { bottom: calc(env(safe-area-inset-bottom, 0px) + 156px); } body.has-systems.dock-empty .plist { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
  body.intro .plist, body.cinema .plist, body.is-simple .plist { display: none !important; }
  body.plist-on .plate { display: none; }
  .pl-h { font: 400 11px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--teal); margin: 12px 0 2px; }
  .pl-h:first-child { margin-top: 4px; }
  .pl-row { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; text-align: left; background: rgba(8,6,30,.66); border: 1px solid rgba(185,177,255,.22); color: var(--fg); cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
  .pl-row.on { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(95,242,220,.25) inset; }
  .pl-row:active { background: rgba(124,108,255,.28); }
  .pl-row:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
  .pl-tx { display: grid; gap: 2px; min-width: 0; flex: 1; }
  .pl-tx b { font: 500 16px/1.25 var(--body); } .pl-row.srv .pl-tx b { font-size: 17px; }
  .pl-tx small { font: 400 13px/1.35 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pl-dot { width: 8px; height: 8px; flex: none; background: #3a3940; } .pl-dot.up { background: var(--red); box-shadow: 0 0 6px var(--red); }
  /* bigger text and real tap targets everywhere else */
  .brand small { font-size: 12px; }
  .qj .c { font-size: 13px; } .qj .c button { min-height: 32px; min-width: 54px; font-size: 12px; }
  .bulletin { top: calc(env(safe-area-inset-top, 0px) + 98px); font-size: 13px; }
  body.noqj .bulletin { top: calc(env(safe-area-inset-top, 0px) + 52px); }
  .dock button { width: 54px; height: 54px; } .dock button span { font-size: 11px; letter-spacing: .06em; color: var(--fg); }
  .strip { font-size: 12px; }
  .panel .pb { font-size: 15px; line-height: 1.5; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .panel .meta { font-size: 13.5px; } .panel h2 { font-size: 22px; }
  .panel .btn { min-height: 40px; padding: 8px 14px; font-size: 13px; } .panel .ph .x { width: 44px; height: 40px; font-size: 18px; }
  .panel .addr code { font-size: 16px; }
  .panel { --rx: 0deg !important; --ry: 0deg !important; } .panel .rig { transform: none !important; }   /* phones: a flat sheet, no tilt */
}
.flabels { position: fixed; inset: 0; z-index: 49; pointer-events: none; }
.flabels[hidden] { display: none; }
.flabel { position: absolute; left: 0; top: 0; pointer-events: auto; font: 400 13px/1 var(--mono); letter-spacing: .06em; color: var(--fg); background: rgba(8,6,30,.78); border: 1px solid rgba(185,177,255,.32);
  padding: 7px 10px; min-height: 30px; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; text-shadow: 0 1px 2px #000; }
.flabel.on { border-color: var(--teal); color: #fff; }
body.intro .flabels, body.cinema .flabels { display: none !important; }
/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .sig, .hint { display: none; }
  .brand { font-size: 16px; }
  .plate { left: 0 !important; right: 0; top: auto !important; bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); justify-items: center; text-align: center; transform: translateY(6px); }
  .plate.on { transform: none; }
  .plate .code { font-size: 34px; } .plate .bar { font-size: 14px; padding: 6px 28px 6px 14px; } .plate .sub { padding-left: 0; }
  .strip { gap: 2px 12px; font-size: 11px; padding-top: 6px; }
  .strip .st-extra { display: none; }
  .dock { display: flex; position: fixed; z-index: 51; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); justify-content: center; gap: 8px; padding: 0 12px; }
  .dock button { width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; position: relative;
    background: radial-gradient(120% 90% at 30% 25%, #cfc8ff 0%, #6d5fe0 34%, #2c2391 72%, #160f55 100%); box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 0 14px rgba(124,108,255,.45); }
  .dock button svg { width: 22px; height: 22px; }
  .dock button span { position: absolute; top: 100%; margin-top: 3px; font: 400 9px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
  .panel { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; z-index: 70; perspective: 900px; }
  .panel .face { max-height: 78vh; padding-bottom: env(safe-area-inset-bottom, 0px); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
  .panel .p1 { transform: translateZ(-20px) translate(0, -8px); } .panel .p2 { transform: translateZ(-44px) translate(0, -16px); } .panel .p3, .panel .glowshadow { display: none; }
  .panel.opening .rig { animation: sheet3d .45s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes sheet3d { from { transform: translateY(60%) rotateX(-28deg); opacity: 0 } }
  .panel .ph { cursor: default; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .panel.opening .rig { animation: none; } .panel .rig { transition: none; } }
/* windows living in the 3D scene (CSS3D, same camera as WebGL) */
.css3d { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.css3d * { pointer-events: none; }
.panel.win3d { position: relative; width: 440px; perspective: none; pointer-events: auto; }
.panel.win3d * { pointer-events: auto; }
.panel.win3d .face { max-height: 620px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.panel.win3d .ph { cursor: grab; }
.panel.win3d.drag .ph { cursor: grabbing; }
.strip .flying { color: var(--amber); border-color: var(--amber); }
.flyhelp { position: fixed; z-index: 50; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 16px); transform: translateX(-50%); font: 400 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); background: rgba(8,6,30,.7); border: 1px solid rgba(255,191,60,.4); padding: 6px 12px; pointer-events: none; }
.reticle { position: fixed; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 44; pointer-events: none; border: 1px solid rgba(95,242,220,.55); border-radius: 50%; }
.reticle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; margin: -1px; background: var(--teal); }
.toast { position: fixed; z-index: 95; left: 50%; top: 22%; transform: translateX(-50%); max-width: min(520px, 90vw); text-align: center; pointer-events: none;
  font: 400 15px/1.5 var(--mono); letter-spacing: .1em; color: var(--amber); background: rgba(8,6,30,.82); border: 1px solid rgba(255,191,60,.45); padding: 10px 16px;
  animation: toast 4.8s ease forwards; text-transform: lowercase; }
.toast b { display: block; font: 700 12px var(--disp); letter-spacing: .3em; color: var(--teal); margin-bottom: 4px; text-transform: uppercase; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 8px) } 8%, 82% { opacity: 1; transform: translate(-50%, 0) } 100% { opacity: 0 } }
body.wire .gl-wire-hint { display: block; }
/* quick-join bar */
.qj { position: fixed; z-index: 52; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); display: flex; gap: 6px; max-width: calc(100vw - 340px); }
.qj .c { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: rgba(8,6,30,.72); border: 1px solid rgba(185,177,255,.25); font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; }
.qj .c.last { border-color: var(--teal); }
.qj .c i { width: 7px; height: 7px; background: #3a3940; flex: none; } .qj .c i.up { background: var(--red); box-shadow: 0 0 6px var(--red); }
.qj .c b { font-weight: 400; color: var(--fg); letter-spacing: .04em; } .qj .c span { letter-spacing: .1em; text-transform: uppercase; }
.qj .c button { border: 1px solid rgba(185,177,255,.3); background: none; color: var(--lav); cursor: pointer; font: 400 11px var(--mono); letter-spacing: .1em; padding: 2px 6px; text-transform: uppercase; }
.qj .c button:hover { color: var(--teal); border-color: var(--teal); }
body.flying .qj, body.noqj .qj { display: none; }
.qj .hide { flex: none; align-self: center; width: 22px; height: 22px; border: 1px solid rgba(185,177,255,.25); background: rgba(8,6,30,.72); color: var(--muted); cursor: pointer; font: 400 13px/1 var(--mono); padding: 0; }
.qj .hide:hover, .qj .hide:focus-visible { color: var(--fg); border-color: var(--lav); }
body.noqj .bulletin { top: calc(env(safe-area-inset-top, 0px) + 14px); }
@media (max-width: 700px) { body.noqj .bulletin { top: calc(env(safe-area-inset-top, 0px) + 50px); } }
@media (max-width: 1100px) { .qj .c span { display: none; } .qj { max-width: calc(100vw - 260px); } }
@media (max-width: 700px) { .qj { left: 0; right: 0; transform: none; top: calc(env(safe-area-inset-top, 0px) + 48px); max-width: none; overflow-x: auto; padding: 0 12px; } }
/* settings panel */
.sets { display: grid; gap: 14px; }
.sets h3 { margin: 0 0 6px; font: 400 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); border-bottom: 1px solid rgba(185,177,255,.15); padding-bottom: 4px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); }
.seg button { background: none; border: 0; border-right: 1px solid var(--line); color: var(--muted); font: 400 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: rgba(124,108,255,.35); color: #fff; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0; flex-wrap: wrap; }
.row label { color: var(--fg); } .row small { color: var(--muted); display: block; font-size: 11px; }
.row input[type=range] { width: 140px; accent-color: #7c6cff; }
.presetnote { font: 400 12px var(--mono); color: var(--amber); letter-spacing: .1em; text-transform: uppercase; margin-left: 10px; }
body.large .panel .pb { font-size: 15.5px; } body.large .panel .meta, body.large .row small { font-size: 13.5px; } body.large .btn, body.large .seg button { font-size: 14px; } body.large .addr code { font-size: 17px; } body.large .qj .c { font-size: 14px; }
/* help overlay */
.help { position: fixed; z-index: 96; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 90vw); background: rgba(8,6,30,.95); border: 1px solid var(--line); padding: 16px 18px; font: 400 13px var(--mono); }
.help h3 { margin: 0 0 10px; font: 700 13px var(--disp); letter-spacing: .2em; color: var(--teal); }
.help div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-top: 1px solid rgba(185,177,255,.12); color: var(--muted); }
.help kbd { color: var(--amber); font: inherit; }
/* mods window */
.pb.mods { display: grid; gap: 10px; }
.mtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mtools input { flex: 1 1 180px; min-width: 0; background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--fg); font: 400 14px var(--mono); padding: 7px 10px; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; }
.mlist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 6px 0; border-top: 1px solid rgba(185,177,255,.12); }
.mlist .n a { color: var(--fg); text-decoration: none; } .mlist .n a:hover { color: var(--teal); }
.mlist .tg { font: 400 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: 0 5px; }
.mlist .tg.c { color: #c59bff; } .mlist .tg.o { color: var(--amber); } .mlist .d { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.chg { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; } .chg li { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 8px; font-size: 12.5px; } .chg time { color: var(--amber); font: 400 12px var(--mono); }
/* simple view */
.simple { display: none; }
body.is-simple .simple { display: block; position: fixed; inset: 0; z-index: 80; overflow: auto; background: linear-gradient(rgba(2,1,9,.35), rgba(2,1,9,.6));
  padding: calc(env(safe-area-inset-top, 0px) + 24px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 32px) max(16px, env(safe-area-inset-left, 0px)); }
body.is-simple #gl, body.is-simple .css3d, body.is-simple .sig, body.is-simple .brand, body.is-simple .hint, body.is-simple #qj, body.is-simple .plate, body.is-simple .strip, body.is-simple .dock, body.is-simple .flyhelp, body.is-simple .reticle { display: none !important; }
body.is-simple::after { display: none; }
body.is-simple .panel { z-index: 90 !important; }
.simple > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.s-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 20px; }
.s-head h1 { margin: 0; font: 700 26px/1 var(--disp); letter-spacing: .18em; } .s-head h1 span { color: var(--amber); }
.s-head p { margin: 0; flex: 1; min-width: 200px; font: 400 12px var(--mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.s-card, .s-box { background: linear-gradient(160deg, rgba(30,22,90,.75), rgba(8,6,30,.85)); border: 1px solid var(--line); padding: 16px; min-width: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.s-card.last { border-color: var(--teal); }
.s-card.s-wfb { box-shadow: inset 3px 0 0 #3fb8b0; } .s-card.s-dmz { box-shadow: inset 3px 0 0 #f07a18; } .s-card.s-af { box-shadow: inset 3px 0 0 #e8961a; }
.s-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.s-top h2 { margin: 0; font: 700 18px/1.2 var(--disp); }
.s-st { font: 400 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); } .s-st.up { color: var(--red); }
.s-st.up::before { content: "● "; }
.s-card .meta { margin: 6px 0; color: var(--muted); font-size: 12.5px; }
.s-card .who b { font: 400 12px var(--mono); border: 1px solid var(--line); padding: 1px 8px; color: var(--teal); }
.s-card details.man summary { cursor: pointer; font: 400 13px var(--mono); letter-spacing: .12em; color: var(--lav); padding: 6px 0; }
.s-card details.man ol { padding-left: 1.3rem; display: grid; gap: 4px; margin: 6px 0; }
.s-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 800px) { .s-row { grid-template-columns: 1fr; } }
.s-box h3 { margin: 0 0 10px; font: 400 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.s-box.news ul { margin: 0; padding: 0; } .s-box.news li { list-style: none; display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 10px; padding: 6px 0; border-top: 1px solid rgba(185,177,255,.12); }
.s-box.news li:first-child { border-top: 0; } .s-box.news time { color: var(--amber); font: 400 12px var(--mono); } .s-box.news .g { display: block; font: 400 11px var(--mono); color: var(--muted); }
.s-box .big { font: 700 30px/1 var(--disp); color: var(--amber); } .s-box .big small { font: 400 12px var(--mono); color: var(--muted); }
.simple footer { margin-top: 22px; font: 400 11px var(--mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; text-align: center; }
body.large .simple { font-size: 15.5px; } body.large .s-card .meta { font-size: 14px; }
@media (max-width: 700px) { .strip #viewbtn, .strip #lightsbtn, .strip #flybtn { display: none; } }
.soundask { position: fixed; z-index: 70; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 58px); transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px; background: rgba(8,6,30,.9); border: 1px solid var(--line); font: 400 13px var(--mono); letter-spacing: .08em; color: var(--lav); animation: pin .4s ease; max-width: calc(100vw - 24px); }
@media (max-width: 700px) { .soundask { bottom: calc(env(safe-area-inset-bottom, 0px) + 120px); } }
