/* Chainreactor Lisbon pitch. Ink on cream, plain rectangles, no glow, no glass, no pills.
   Orange is held for the loading doors in the scene; purple is for the dye only. */
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-SemiBold.otf") format("opentype"); font-weight: 500 700; font-display: swap; }
:root {
  --ink: #101a2c; --navy: #1d2c44; --cream: #efe8d6; --paper: #f7f2e6; --slate: #5d6d82; --line: rgba(16, 26, 44, .24);
  --dye: #7a4cb0;
  --sans: "PP Mori", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --pad: clamp(18px, 3.2vw, 44px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #bcd3e8; color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.is-inside :focus-visible { outline-color: var(--cream); }
[hidden] { display: none !important; }

.haze { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(16, 26, 44, calc(var(--vig, .22) * 1)) 100%); transition: opacity .8s; }
.haze::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to top, rgba(14, 22, 38, .5), transparent); transition: opacity .8s; }
body:not([data-state="outside"]) .haze::after { opacity: 0; }
#dip { position: fixed; inset: 0; background: #0c1626; opacity: 0; pointer-events: none; }

/* ---- soft panels: every box reads its look from --pn-* variables (panels.js, tuner Panels tab) */
.pn { opacity: 0; transform: translate3d(calc(var(--pn-sx, -1) * -14px), 8px, 0) scale(.985); transition-property: opacity, transform; transition-duration: var(--pn-exit, 260ms); transition-timing-function: var(--pn-ease, cubic-bezier(.22,.8,.3,1)); }
.pn.pn-in { opacity: 1; transform: none; transition-duration: var(--pn-enter, 420ms); }
[data-panel="station"], [data-panel="chapters"], [data-panel="header"], [data-panel="overview"] {
  background: var(--pn-bg); border: var(--pn-bw, 1px) solid var(--pn-bc); border-radius: var(--pn-r); box-shadow: var(--pn-shadow);
  -webkit-backdrop-filter: var(--pn-blur); backdrop-filter: var(--pn-blur); padding: var(--pn-pad); color: var(--pn-bo-c);
}
.eyebrow-t, .eyebrow { font: var(--pn-eb-w, 500) var(--pn-eb-size, 12px)/var(--pn-eb-lh, 1.2) var(--pn-eb-fam, var(--mono)); letter-spacing: var(--pn-eb-ls, .12em); color: var(--pn-eb-c, var(--slate)); }
[data-panel] h2, [data-panel] h3 { font-family: var(--pn-ti-fam, var(--sans)); font-weight: var(--pn-ti-w, 500); line-height: var(--pn-ti-lh, 1.06); letter-spacing: var(--pn-ti-ls, -.015em); color: var(--pn-ti-c, var(--ink)); }
[data-panel] dd, [data-panel] .lead, [data-panel] p { font-family: var(--pn-bo-fam, var(--sans)); font-weight: var(--pn-bo-w, 400); line-height: var(--pn-bo-lh, 1.42); letter-spacing: var(--pn-bo-ls, 0); }
[data-panel] dt, [data-panel] .legend, [data-panel] .st-foot { font-family: var(--pn-lb-fam, var(--mono)); font-weight: var(--pn-lb-w, 500); letter-spacing: var(--pn-lb-ls, .12em); line-height: var(--pn-lb-lh, 1.2); }

/* ---- header: a soft floating bar */
.bar { position: fixed; top: var(--pn-offy, 16px); left: var(--pn-offx, 18px); right: var(--pn-offx, 18px); display: flex; align-items: center; gap: 18px; z-index: 5; --pn-sx: 0; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-height: 44px; border-radius: var(--pn-r-in, 12px); }
.mark { height: 32px; width: auto; } .word { height: 15px; width: auto; }
.mark-cream, .word-cream { display: none; }
.tag { margin-left: auto; display: grid; justify-items: end; gap: 2px; text-align: right; }
.tag b { font: var(--pn-eb-w, 500) var(--pn-eb-size, 13px)/1.1 var(--pn-eb-fam, var(--mono)); letter-spacing: var(--pn-eb-ls, .06em); color: var(--pn-eb-c, var(--ink)); text-transform: uppercase; }
.tag i { font: normal var(--pn-lb-w, 500) 13px/1.2 var(--pn-bo-fam, var(--sans)); color: var(--pn-lb-c, var(--ink)); opacity: .78; }

.btn { appearance: none; border: 1.5px solid var(--ink); background: transparent; border-radius: var(--pn-r-in, 12px); padding: 0 20px; min-height: 48px; cursor: pointer; font-weight: 500; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 10px; transition-property: background-color, color, scale; transition-duration: .15s; transition-timing-function: ease-out; }
.btn:active { scale: .96; }
.btn-solid { background: var(--ink); color: var(--cream); }
.btn-line { border-color: var(--line); }
@media (hover: hover) { .btn-solid:hover { background: var(--navy); } .btn-line:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); } }
.link { appearance: none; border: 0; background: none; padding: 0; min-height: 44px; font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.eyebrow { margin: 0 0 18px; }
.sub { font-size: clamp(18px, 1.5vw, 24px); margin: 0 0 28px; max-width: 30ch; }
.note { font: 400 13px/1.45 var(--mono); letter-spacing: .02em; margin: 26px 0 0; opacity: .8; max-width: 44ch; }

/* ---- loading */
#loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #bcd3e8; z-index: 20; transition: opacity .7s; }
#loading p { margin: 0; font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
#loading i { display: block; width: 180px; height: 3px; background: rgba(16, 26, 44, .18); }
#loading b { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s; }
body:not([data-state="loading"]) #loading { opacity: 0; pointer-events: none; }

/* ---- the street: copy sits in the cool shade on the right of the façade */
#intro { position: fixed; right: calc(var(--pad) + var(--pn-offx, 0px)); bottom: calc(var(--pad) + 10px + var(--pn-offy, 0px)); width: var(--pn-w, 500px); max-width: calc(100vw - 2 * var(--pad)); z-index: 4; transition: opacity .7s, transform .9s; background: var(--pn-bg); border: var(--pn-bw, 1px) solid var(--pn-bc); border-radius: var(--pn-r); box-shadow: var(--pn-shadow); -webkit-backdrop-filter: var(--pn-blur); backdrop-filter: var(--pn-blur); padding: var(--pn-pad); color: var(--pn-bo-c, var(--ink)); }
#intro h1 { font-family: var(--pn-ti-fam, var(--sans)); font-weight: var(--pn-ti-w, 500); font-size: var(--pn-ti-size, 44px); line-height: var(--pn-ti-lh, 1.04); letter-spacing: var(--pn-ti-ls, -.02em); color: var(--pn-ti-c, var(--ink)); margin: 0 0 14px; text-wrap: balance; }
#intro .eyebrow { margin: 0 0 12px; }
#intro .sub { font-family: var(--pn-bo-fam, var(--sans)); font-size: var(--pn-bo-size, 18px); line-height: var(--pn-bo-lh, 1.4); margin: 0 0 18px; max-width: 34ch; }
.street-note { position: fixed; left: var(--pad); bottom: 64px; z-index: 4; margin: 0; max-width: 34ch; color: var(--cream); text-shadow: 0 1px 10px rgba(16,26,44,.45); transition: opacity .7s; }
body:not([data-state="outside"]) .street-note { opacity: 0; pointer-events: none; }
body:not([data-state="outside"]) #intro { opacity: 0; transform: translateY(12px); pointer-events: none; }

#threshold { position: fixed; left: 50%; bottom: 20vh; transform: translateX(-50%); text-align: center; color: var(--cream); opacity: 0; transition: opacity 1s; z-index: 4; pointer-events: none; width: fit-content; max-width: min(90vw, 940px); padding: 22px 38px 24px; border-radius: 26px; background: rgba(14, 24, 42, .46); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); box-shadow: 0 1px 2px rgba(12, 20, 36, .2), 0 14px 40px -10px rgba(12, 20, 36, .4); }
#threshold span { display: block; font: 500 14px var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; opacity: .92; }
#threshold strong { display: block; font-weight: 500; font-size: clamp(26px, 3.4vw, 50px); letter-spacing: -.015em; line-height: 1.08; }
#threshold.on { opacity: 1; }

/* ---- inside */
#overview { position: fixed; left: var(--pad); bottom: calc(var(--pad) + 76px); width: min(36vw, 520px); z-index: 4; --pn-sx: -1; }
#overview h2 { font-weight: 500; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.03; letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; }
#overview .btn-solid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
#overview .sub { margin-bottom: 20px; }
#overview .eyebrow { margin-bottom: 12px; }

#station { position: fixed; top: calc(var(--pn-offy, 108px)); width: var(--pn-w, 440px); max-width: calc(100vw - 2 * var(--pad)); max-height: var(--pn-maxh, 74dvh); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; z-index: 4; --pn-sx: -1; }
#station[data-side="left"] { left: calc(var(--pad) + var(--pn-offx, 0px)); --pn-sx: -1; }
#station[data-side="right"] { right: calc(var(--pad) + var(--pn-offx, 0px)); --pn-sx: 1; }
.kicker { display: flex; gap: 14px; align-items: baseline; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: var(--pn-gap, 14px); }
.kicker span:first-child { font-size: 28px; letter-spacing: 0; font-weight: 500; color: var(--pn-ti-c, var(--ink)); }
#station h2 { font-size: var(--pn-ti-size, 34px); margin: 0 0 18px; text-wrap: balance; }
#station dl { margin: 0; display: grid; gap: var(--pn-gap, 14px); }
#station dt { font-size: var(--pn-lb-size, 12px); text-transform: uppercase; color: var(--pn-lb-c, var(--slate)); margin-bottom: 3px; }
#station dd { margin: 0; font-size: var(--pn-bo-size, 17px); color: var(--pn-bo-c, var(--ink)); }
/* grow process strip: the active step is highlighted, purple only where dye is present */
.process { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; overflow: hidden; }
.process li { min-width: 0; }
.process button { appearance: none; width: 100%; min-height: 56px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--pn-r-in2, 10px); padding: 12px 3px 8px; cursor: pointer; position: relative; font-family: var(--pn-bo-fam, var(--sans)); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--pn-lb-c, var(--slate)); transition-property: background-color, border-color, color; transition-duration: .15s; transition-timing-function: ease-out; }
.process button::before { content: ""; position: absolute; left: 3px; right: 3px; top: 0; height: 4px; border-radius: 2px; background: var(--line); transition: background-color .15s ease-out; }
.process li.dye button::before { background: var(--pn-dye, var(--dye)); }
.process button b { display: block; font-size: 15px; letter-spacing: 0; color: var(--pn-bo-c, var(--ink)); }
.process button span { display: block; overflow: hidden; text-overflow: clip; white-space: nowrap; letter-spacing: 0 !important; }
.process li.on button { background: color-mix(in srgb, var(--pn-accent, var(--ink)) 8%, transparent); border-color: color-mix(in srgb, var(--pn-accent, var(--ink)) 40%, transparent); color: var(--pn-bo-c, var(--ink)); }
.process li.on:not(.dye) button::before { background: var(--pn-accent, var(--ink)); }
.process li.hot button { background: color-mix(in srgb, var(--pn-accent, var(--ink)) 6%, transparent); }
.process button:active { scale: .97; }
.legend { margin: 10px 0 0; font-size: 11px; text-transform: uppercase; color: var(--pn-lb-c, var(--slate)); display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 22px; height: 4px; border-radius: 2px; background: var(--pn-dye, var(--dye)); display: inline-block; }
.st-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .1em; color: var(--pn-lb-c, var(--slate)); }
.st-nav { display: flex; gap: 8px; }
.st-nav button { width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: var(--pn-r-in, 12px); background: transparent; cursor: pointer; font-size: 20px; transition-property: background-color, color, scale; transition-duration: .15s; transition-timing-function: ease-out; }
.st-nav button:active { scale: .96; }
@media (hover: hover) { .st-nav button:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); } }

/* chapter bar: a soft row, inner radius concentric with the outer one */
#chapters { position: fixed; left: 50%; bottom: calc(var(--pn-offy, 22px)); display: flex; gap: var(--pn-gap, 2px); z-index: 5; max-width: calc(100vw - 2 * var(--pad)); overflow-x: auto; scrollbar-width: none; --pn-sx: 0; }
#chapters.pn:not(.pn-in) { transform: translateX(-50%) translateY(10px); }
#chapters.pn.pn-in { transform: translateX(-50%); }
#chapters button { appearance: none; border: 0; background: transparent; border-radius: var(--pn-r-in, 12px); min-height: 44px; padding: 0 16px; cursor: pointer; font-family: var(--pn-lb-fam, var(--mono)); font-weight: 500; font-size: var(--pn-lb-size, 13px); letter-spacing: var(--pn-lb-ls, .06em); color: var(--pn-lb-c, var(--ink)); text-transform: uppercase; white-space: nowrap; transition-property: background-color, color, scale; transition-duration: .15s; transition-timing-function: ease-out; }
#chapters button span { opacity: .55; margin-right: 6px; }
#chapters button:active { scale: .96; }
@media (hover: hover) { #chapters button:hover { background: color-mix(in srgb, var(--pn-accent, var(--ink)) 8%, transparent); } }
#chapters button[aria-current="true"] { background: var(--pn-accent, var(--ink)); color: var(--cream); }
#chapters button[aria-current="true"] span { opacity: .7; }
#hint { position: fixed; left: 50%; bottom: calc(var(--pad) + 62px); transform: translateX(-50%); margin: 0; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); opacity: .75; z-index: 3; pointer-events: none; white-space: nowrap; }

.foot { position: fixed; left: var(--pad); right: var(--pad); bottom: 10px; display: flex; justify-content: space-between; align-items: center; font: 500 12px var(--mono); letter-spacing: .1em; z-index: 4; pointer-events: none; opacity: .85; }
.foot .link { pointer-events: auto; font-size: 12px; }
.is-inside .foot { color: var(--cream); }

/* ---- credits dialog (soft) */
dialog { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: clamp(24px, 4vw, 48px); width: min(860px, calc(100vw - 2 * var(--pad))); max-height: calc(100dvh - 2 * var(--pad)); overflow: auto; overscroll-behavior: contain; border-radius: 24px; box-shadow: 0 1px 2px rgba(16,26,44,.08), 0 8px 24px -4px rgba(16,26,44,.14), 0 28px 64px -14px rgba(16,26,44,.22); }
dialog::backdrop { background: rgba(12, 22, 38, .6); backdrop-filter: blur(6px); }
dialog .x { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border: 0; border-radius: 14px; background: none; font-size: 30px; cursor: pointer; transition: background-color .15s ease-out; }
#proposal .x { position: fixed; top: 16px; right: max(18px, calc(var(--pad) + 14px)); z-index: 3; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(16,26,44,.3); transition: background-color .15s ease-out; }
@media (hover: hover) { #proposal .x:hover { background: #fff; } }
@media (hover: hover) { dialog .x:hover, .pr-sheet .x:hover { background: rgba(16,26,44,.07); } }
dialog h2 { font-weight: 500; font-size: clamp(30px, 4vw, 56px); line-height: 1; letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance; }
dialog .row, .pr-sheet .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
#credits p { max-width: 70ch; font-size: 17px; }

/* ---- the proposal: a full-page view over the scene */
#proposal { position: fixed; inset: 0; z-index: 9; background: var(--pn-bg); -webkit-backdrop-filter: var(--pn-blur); backdrop-filter: var(--pn-blur); color: var(--pn-bo-c, var(--ink)); --pn-sx: 0; }
#proposal.pn:not(.pn-in) { transform: scale(1.012); }
.pr-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(18px, 4vw, 64px) var(--pad); }
.pr-sheet { position: relative; width: min(var(--pn-w, 1120px), 100%); margin: 0 auto; padding: var(--pn-pad, 52px); }
.pr-sheet h2 { font-size: clamp(34px, 5vw, var(--pn-ti-size, 64px)); margin: 0 0 18px; text-wrap: balance; max-width: 18ch; }
.pr-sheet .lead { font-size: clamp(18px, 1.6vw, 24px); max-width: 52ch; margin: 0 0 32px; color: var(--pn-bo-c, var(--ink)); }
.asks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--pn-gap, 14px); }
.asks article { padding: 22px 24px 26px; border: var(--pn-bw, 1px) solid var(--pn-bc); border-radius: var(--pn-r, 22px); background: color-mix(in srgb, var(--paper) 70%, transparent); box-shadow: var(--pn-shadow); }
.asks span { font: 500 13px var(--mono); letter-spacing: .12em; color: var(--slate); }
.asks h3 { font-size: 24px; line-height: 1.12; margin: 8px 0 10px; }
.asks p { margin: 0; font-size: 16.5px; }
.exchange { margin-top: var(--pn-gap, 14px); padding: 26px 30px; background: var(--ink); color: var(--cream); border-radius: var(--pn-r, 22px); box-shadow: var(--pn-shadow); }
.exchange span { font: 500 12px var(--mono); letter-spacing: .14em; opacity: .75; }
.exchange p { margin: 8px 0 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.25; max-width: 40ch; color: var(--cream); }
.pr-sheet .fine { font: 400 13px/1.5 var(--mono); color: var(--slate); margin: 28px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 90ch; }
.pr-sheet .fine span { display: block; }
.pr-sheet .fine span + span { margin-top: 8px; }
body.reduced #proposal.pn { transform: none; transition-property: opacity; transition-duration: .25s !important; }

/* ---- static fallback */
#fallback { position: fixed; inset: 0; overflow: auto; background: var(--cream); z-index: 30; }
.fb-wrap { max-width: 880px; margin: 0 auto; padding: clamp(28px, 6vw, 80px) var(--pad); }
.fb-wrap h1 { font-weight: 500; font-size: clamp(40px, 7vw, 84px); line-height: 1; letter-spacing: -.025em; margin: 0 0 18px; }
.fb-note { font: 400 14px var(--mono); color: var(--slate); }
#fbList { padding: 0; list-style: none; margin: 28px 0; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
#fbList li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 70px 1fr; gap: 14px; }
#fbList b { font: 500 26px var(--mono); }
#fbList h3 { margin: 0 0 4px; font-weight: 500; font-size: 22px; } #fbList p { margin: 0 0 4px; font-size: 16.5px; }

/* ---- phones */
@media (max-width: 760px) {
  html, body { font-size: 17px; }
  .tag { display: none; } .bar { gap: 10px; left: 10px; right: 10px; } .bar .btn-line { margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 15px; }
  .word { display: none; }
  .street-note { display: none; }
  #intro { right: var(--pad); left: var(--pad); top: auto; bottom: calc(var(--pad) + 18px); transform: none; width: auto; background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 24px -4px rgba(16,26,44,.16), 0 24px 56px -14px rgba(16,26,44,.24); padding: 18px 18px 16px; color: var(--ink); }
  #intro .btn-solid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  body:not([data-state="outside"]) #intro { transform: translateY(10px); }
  #intro h1 { font-size: 30px; margin-bottom: 12px; } #intro .eyebrow { margin-bottom: 10px; } #intro .sub { margin-bottom: 16px; font-size: 17px; } #intro .note { display: none; }
  #overview { left: var(--pad); right: var(--pad); width: auto; bottom: calc(var(--pad) + 70px); }
  #overview h2 { font-size: 30px; }
  #station { left: var(--pad) !important; right: var(--pad) !important; top: auto; bottom: calc(var(--pad) + 66px); width: auto; max-height: 46dvh; overflow: auto; padding: 16px 18px 12px; }
  #station dd { font-size: 15.5px; } #station h2 { font-size: 24px; margin-bottom: 10px; } .process button { padding: 12px 4px 6px; } .pr-sheet { padding: 28px 0; } .kicker { margin-bottom: 10px; padding-bottom: 8px; }
  #chapters, #chapters.pn.pn-in, #chapters.pn:not(.pn-in) { left: var(--pad); right: var(--pad); transform: none; max-width: none; bottom: 10px; }
  #hint, .foot { display: none; }
  #threshold { bottom: 28vh; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body.reduced *:not(#gl) { transition-duration: .01ms !important; animation-duration: .01ms !important; }
@media print {
  html, body { overflow: visible; background: #fff; }
  canvas, .haze, #dip, .bar, #loading, #intro, #threshold, #overview, #station, #chapters, #hint, .foot, #fallback { display: none !important; }
  dialog { display: none !important; }
  #proposal { position: static !important; display: block !important; opacity: 1 !important; transform: none !important; background: #fff !important; backdrop-filter: none !important; }
  .pr-scroll { position: static; overflow: visible; padding: 0; } .pr-sheet { width: auto; padding: 0; } .pr-sheet .x, .pr-sheet .row { display: none; }
  .exchange { background: none; color: #000; border: 1.5px solid #000; box-shadow: none; } .exchange p { color: #000; } .asks article { box-shadow: none; }
}

/* ?ui=0 : the picture alone, for review captures */
.no-ui .street-note, .no-ui .bar, .no-ui #proposal, .no-ui #intro, .no-ui #overview, .no-ui #station, .no-ui #chapters, .no-ui #hint, .no-ui .foot, .no-ui .haze { display: none !important; }

#fbList img { width: 100%; max-width: 520px; display: block; margin-bottom: 10px; border: 1.5px solid var(--ink); }

@media (max-height: 800px) and (min-width: 761px) { #station { padding: 18px 22px 12px; } #station dd { font-size: 15.5px; line-height: 1.36; } #station h2 { font-size: 26px; margin-bottom: 10px; } #station dl { gap: 9px; } .kicker { margin-bottom: 10px; padding-bottom: 8px; } .process { margin-top: 10px; padding-top: 10px; } .st-foot { margin-top: 12px; } .st-nav button { width: 44px; height: 44px; } }

/* ---- tuning panel (press T, or open with ?tune=1): a property panel */
#tune { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); background: var(--paper); color: var(--ink); border-left: 1px solid var(--line); box-shadow: -12px 0 40px -16px rgba(16,26,44,.3); z-index: 40; display: flex; flex-direction: column; font-size: 13px; }
#tune[hidden] { display: none; }
#tune header { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
#tune header b { font-size: 17px; font-weight: 500; }
#tune .st { font: 500 10px var(--mono); letter-spacing: .08em; color: var(--slate); margin: 0 auto 0 8px; text-transform: uppercase; }
#tune header button { width: 34px; height: 34px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 8px; }
#tune header button:disabled { opacity: .3; cursor: default; }
#tune .tabs { display: flex; border-bottom: 1px solid var(--line); }
#tune .tabs button { flex: 1; min-height: 38px; border: 0; background: none; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; color: var(--slate); }
#tune .tabs button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
#tune .tab { overflow: auto; overscroll-behavior: contain; padding: 8px 12px 28px; flex: 1; }
#tune .tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; align-items: center; }
#tune .tools > select, #tune .tools > input { flex: 1; min-width: 0; }
#tune button, #tune select, #tune input[type=text], #tune input[type=search] { font: 500 12px var(--sans); border: 1px solid var(--line); background: #fff9; padding: 5px 9px; min-height: 32px; border-radius: 8px; cursor: pointer; color: var(--ink); }
#tune input[type=text], #tune input[type=search] { cursor: text; }
@media (hover: hover) { #tune button:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); } }
#tune .baked { font: 400 11px/1.45 var(--mono); color: var(--slate); margin: 8px 0; }
#tune .sec { border-bottom: 1px solid var(--line); }
#tune summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; min-height: 34px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
#tune summary::-webkit-details-marker { display: none; }
#tune summary::before { content: "▸"; margin-right: 6px; transition: rotate .15s ease-out; display: inline-block; }
#tune details[open] > summary::before { rotate: 90deg; }
#tune summary > span { flex: 1; }
#tune .srs { min-height: 22px; padding: 0 7px; font: 500 10px var(--mono); border-radius: 6px; }
#tune .pr { display: grid; grid-template-columns: 116px 1fr 22px; gap: 6px; align-items: center; padding: 3px 0 3px 4px; }
#tune .pr[hidden] { display: none; }
#tune .pl { font-size: 12px; line-height: 1.2; color: var(--slate); }
#tune .pr.dirty .pl { color: var(--ink); font-weight: 600; }
#tune .pr.inh .pl { text-decoration: underline dotted; text-underline-offset: 3px; }
#tune .pc { display: flex; gap: 6px; align-items: center; min-width: 0; }
#tune .pc input[type=range] { flex: 1; min-width: 0; accent-color: var(--ink); }
#tune .pc input[type=number] { width: 62px; font: 500 11px var(--mono); border: 1px solid var(--line); border-radius: 6px; background: #fff9; padding: 3px 4px; }
#tune .pc .pu { font: normal 10px var(--mono); color: var(--slate); width: 18px; }
#tune .pc.col input[type=color] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
#tune .pc.col input[type=text] { flex: 1; min-width: 0; font: 500 11px var(--mono); min-height: 26px; padding: 2px 6px; }
#tune .pc select { flex: 1; min-height: 28px; }
#tune .rs { width: 22px; min-height: 22px; padding: 0; border-radius: 6px; font-size: 13px; line-height: 1; }
#tune .rs[hidden] { display: none; }
#tune label.c { display: block; margin: 8px 0; }
#tune .cl { display: flex; justify-content: space-between; align-items: center; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-bottom: 3px; }
#tune textarea { width: 100%; font: 400 13px/1.35 var(--sans); border: 1px solid var(--line); border-radius: 8px; background: #fff9; padding: 6px 8px; resize: vertical; color: var(--ink); }
#tune .chip { display: inline-flex; } #tune .chip button:first-child { border-radius: 8px 0 0 8px; } #tune .chip button:last-child { border-radius: 0 8px 8px 0; border-left: 0; padding: 0 7px; }
#tune code { font: 400 11px var(--mono); }
body.tuning #station[data-side="right"], body.tuning #intro { right: calc(min(400px, 100vw) + var(--pad)); }
@media (max-width: 760px) { #tune { width: 100vw; } }

/* ---- the stage: one live canvas */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #bcd3e8; touch-action: none; cursor: grab; }
#gl.drag { cursor: grabbing; }
#nogpu { position: fixed; inset: 0; background: #e9eef2; display: grid; place-items: center; z-index: 30; padding: var(--pad); }
#nogpu .fb-wrap { max-width: 640px; }
#nogpu a { text-decoration: none; display: inline-block; }
.haze { display: none !important; }
#plates { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#plates .plate { pointer-events: auto; }
.no-ui #plates, .no-ui #fpsTag, .no-ui #threshold { display: none !important; }
.plate { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); font: 600 15px var(--mono); cursor: pointer; display: grid; place-items: center; }
.plate:hover { background: var(--ink); color: var(--cream); }

/* ---- legibility over a light, live scene: soft navy scrims under the header and the overview text */
.is-inside .foot::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(rgba(16, 26, 44, 0), rgba(16, 26, 44, .45)); z-index: -1; pointer-events: none; }
#fpsTag { position: fixed; right: 12px; top: 74px; font: 500 11px var(--mono); color: var(--cream); background: rgba(16, 26, 44, .6); padding: 2px 6px; z-index: 6; }

/* overview headline: an opaque soft card so the copy never sits on the dark tank */
#overview { background: rgba(247, 242, 230, .96) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
#overview .eyebrow { color: #46566c; }

/* ---- proposal board (the 3D board in the yard): a small control strip, the rest of the page UI steps aside */
#boardUI { position: fixed; right: 14px; top: 14px; z-index: 8; display: flex; gap: 10px; align-items: center; padding: 8px; background: rgba(247, 242, 230, .94); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px -8px rgba(16, 26, 44, .35); }
#boardUI .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
#boardUI .btn-line { background: transparent; color: var(--ink); border-color: rgba(16, 26, 44, .35); }
@media (hover: hover) { #boardUI .btn-line:hover { background: var(--ink); color: var(--cream); } }
body.board-open .bar, body.board-open .foot, body.board-open #chapters, body.board-open #hint, body.board-open #plates, body.board-open #station, body.board-open #overview, body.board-open .haze { display: none !important; }
.no-ui #boardUI { display: none !important; }
