/* THE FAR BACKROOMS - Stage 3C UI (main menu, sheets, settings, credits; HUD / run-state / customize sections follow).
 * Loaded after the bundle's stylesheet. Every colour, face and timing is a token below; components use only tokens.
 * Motion: transforms and opacity only; html.rm (reduced motion: the user's setting or the system's) turns it all off. */

:root{
  --u-void:#060504; --u-ink:#0c0a06; --u-panel:#13100a; --u-panel2:#1b160c; --u-field:#0b0905;
  --u-tube:#f7eab0; --u-sick:#e3c768; --u-sick-hi:#f2d987; --u-on-sick:#211907;
  --u-cream:#ece4c6; --u-text:#d6cdab; --u-mute:#a39b7d;
  --u-moss:#9aa58f; --u-moss-dim:#848d7b;   /* moss-dim: 5:1 or better on every panel (small text) */
  --u-line:rgba(222,203,140,.16); --u-line2:rgba(222,203,140,.32); --u-line-hi:rgba(227,199,104,.78);
  --u-danger:#c4503f; --u-danger-hi:#e3836c;
  --u-display:"Barlow Condensed","Arial Narrow","Roboto Condensed","DejaVu Sans Condensed",sans-serif;
  --u-mono:"IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace;
  --u-ease:cubic-bezier(.2,.7,.2,1);
  --u-fast:.16s; --u-mid:.38s; --u-slow:.9s;
}
html.rm{--u-fast:.01s;--u-mid:.01s;--u-slow:.01s}
html.rm *,html.rm *::before,html.rm *::after{animation:none!important;transition-duration:.01s!important;scroll-behavior:auto!important}

/* ---------------------------------------------------------------- shared controls */
.u-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:0 18px;border:1px solid var(--u-line2);background:var(--u-ink);
  color:var(--u-cream);font:500 12px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase;transition:background-color var(--u-fast),border-color var(--u-fast),color var(--u-fast),transform var(--u-fast)}
.u-btn:hover{border-color:var(--u-line-hi);color:#fff8de;background:var(--u-panel2)}
.u-btn.on,.u-btn[aria-pressed=true],.u-btn[aria-checked=true]{border-color:var(--u-sick);color:var(--u-on-sick);background:var(--u-sick)}
.u-btn.ghost{background:none}
.u-btn.danger:hover{border-color:var(--u-danger-hi);color:var(--u-danger-hi)}
.u-btn:focus-visible,.u-sw:focus-visible,.u-switch:focus-visible,.u-range:focus-visible,.mm-item:focus-visible,.us-close:focus-visible,.us-pages button:focus-visible,#menu input:focus-visible,#name:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:3px}
.u-primary{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:58px;margin:0;padding:0 22px;border:1px solid var(--u-sick-hi);background:var(--u-sick);
  color:var(--u-on-sick);font:600 20px/1 var(--u-display);letter-spacing:.14em;text-transform:uppercase;transition:background-color var(--u-fast),transform var(--u-fast)}
.u-primary span{font:400 22px/1 var(--u-mono);transition:transform var(--u-mid) var(--u-ease)}
.u-primary:hover{background:var(--u-sick-hi);color:var(--u-on-sick);border-color:var(--u-tube)}
.u-primary:hover span{transform:translate(3px,-3px)}
.u-primary:focus-visible{outline:2px solid var(--u-tube);outline-offset:4px}
.u-label{display:block;margin:0 0 8px;color:var(--u-moss);font:500 11px/1.3 var(--u-mono);letter-spacing:.06em}
.u-note{color:var(--u-mute);font:400 11.5px/1.65 var(--u-mono);margin:0}

/* a switch: a rectangular track, a square knob */
.u-switch{position:relative;flex:none;width:44px;height:24px;padding:0;border:1px solid var(--u-line2);background:var(--u-field);transition:background-color var(--u-fast),border-color var(--u-fast)}
.u-switch::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;background:var(--u-moss-dim);transition:transform var(--u-fast) var(--u-ease),background-color var(--u-fast)}
.u-switch[aria-checked=true]{background:#2a2310;border-color:var(--u-sick)}
.u-switch[aria-checked=true]::after{transform:translateX(20px);background:var(--u-sick-hi)}
.u-switch:hover{border-color:var(--u-line-hi)}

/* a range: thin track, square thumb */
.u-range{-webkit-appearance:none;appearance:none;width:100%;height:28px;margin:0;padding:0;border:0;background:none;cursor:pointer}
.u-range::-webkit-slider-runnable-track{height:3px;background:linear-gradient(90deg,var(--u-sick) var(--p,50%),var(--u-line2) var(--p,50%))}
.u-range::-moz-range-track{height:3px;background:var(--u-line2)}
.u-range::-moz-range-progress{height:3px;background:var(--u-sick)}
.u-range::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin-top:-6.5px;background:var(--u-tube);border:2px solid var(--u-on-sick);box-shadow:0 0 0 1px var(--u-sick)}
.u-range::-moz-range-thumb{width:14px;height:14px;border-radius:0;background:var(--u-tube);border:2px solid var(--u-on-sick)}

/* colour swatches */
.u-sws{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.u-sw{position:relative;width:30px;height:30px;padding:0;border:1px solid var(--u-line2);background:var(--sw);box-shadow:inset 0 0 0 3px var(--u-panel)}
.u-sw.on,.u-sw[aria-checked=true]{border-color:var(--u-tube);box-shadow:inset 0 0 0 3px var(--u-panel),0 0 0 1px var(--u-tube)}
.u-sw.pick{background:conic-gradient(from 90deg,#d9604e,#e3c768,#9fd16a,#6fd0c7,#7c86d6,#c58bd0,#d9604e);overflow:hidden}
.u-sw.pick input{position:absolute;inset:-8px;width:48px;height:48px;opacity:0;cursor:pointer;border:0;padding:0}

/* ---------------------------------------------------------------- the main menu (QA1: the user's rough draft)
   The draft's composition, finished: THE FAR / BACKROOMS large and centred near the top over black; PLAY low and centred, the
   strongest thing on the screen, with CUSTOMIZE / SETTINGS / CREDITS in one row under it; a tall rail on the left (who you are,
   your light, the connection, where the draft had a profile, "stuff" and a chat); a narrow utility rail on the right (settings,
   wanderer, sound, help); the version in the bottom-right corner. Phones keep the same places: the identity block top left,
   the utility rail top right, the title, then PLAY at the bottom.
   Nothing here moves while the menu idles (QA2: no entrance; the boot gate reveals the menu whole): the title's light dips only when ui.js asks for it (every
   half minute or so), and the title leans with the pointer (one style write per frame, only while the mouse moves). Since post-3H Trial 1
   the title also drifts on its own, a few pixels (below: --dx, --dy from ui.js), unless motion is reduced; nothing else moves. */
#menu{position:fixed;inset:0;top:0;left:0;z-index:15;width:auto;max-width:none;max-height:none;overflow:hidden;color:var(--u-text);font-family:var(--u-mono);-webkit-tap-highlight-color:transparent;
  --edge:clamp(16px,3.2vw,40px);
  --sl:max(var(--edge),env(safe-area-inset-left));--sr:max(var(--edge),env(safe-area-inset-right));--st:max(var(--edge),env(safe-area-inset-top));--sb:max(var(--edge),env(safe-area-inset-bottom));
  --uw:44px;                                                     /* a utility cell */
  --lw:min(86vw,460px);--ttop:calc(var(--st) + 4 * var(--uw) + 28px);      /* QA2: --lw, the logo's sign width (its box is 1230 x 422) */
  --stw:min(560px,calc(100vw - var(--sl) - var(--sr)));--ew:min(640px,calc(100vw - var(--sl) - var(--sr)));
  --ph:clamp(64px,10vh,104px);--pf:clamp(34px,5.4vh,56px);--rh:clamp(48px,6.6vh,64px);--rf:min(clamp(14px,2vh,18px),3.6vw);--rk:.12em;--df:clamp(15px,2.2vh,20px);
  --stb:calc(var(--sb) + 40px)}
#menu::before{content:none}
#menu [hidden]{display:none!important}
.u-vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* QA2: the main menu's field is black. Level 0 is not shown behind it: the scrim is opaque black and covers the whole screen, and while
   the main menu (or anything opened from it) is up the page behind is black too (html.tfb-black). The world's own layers stay as they
   are underneath, covered: hiding them would stop the browser presenting the game's canvas while the game keeps drawing into it, and
   under a software GPU that work piles up (measured at QA2-2: screenshots and page loads stalled for seconds). */
.mm-scrim{position:absolute;inset:0;pointer-events:none;background:#000}
html.tfb-black{background:#000}
.mm-center{position:absolute;inset:0;pointer-events:none}
.mm-center>*{pointer-events:auto}

/* the identity: the user's logo (QA2), exactly as supplied. The title box is the sign's own box (1230 x 422 of the 2048 x 1152
   image: every pixel of the file that is not fully transparent lies inside it), centred; the image is placed so its sign fills
   that box, never cropped, stretched, recoloured or filtered. The rest of the image - alpha 0 everywhere - is clipped by the box,
   so it adds nothing to the page's layout (no overflow to scroll). Its glow is the image's own. It dips only on request. */
/* post-3H Trial 1: the drift is ui.js's --dx and --dy (each within -1..1) times --drx and --dry, added to the pointer's lean; the
   title takes no pointer events, so no control moves with it. Reduced motion leaves --dx and --dy unset (0): the title rests as before. */
.mm-title{position:absolute;left:50%;top:var(--ttop);width:var(--lw);aspect-ratio:1230/422;margin:0;overflow:hidden;pointer-events:none;--drx:3px;--dry:3px;
  transform:translate3d(calc(-50% + var(--mx,0) * 6px + var(--dx,0) * var(--drx)),calc(var(--my,0) * 4px + var(--dy,0) * var(--dry)),0)}
.mm-logo{position:absolute;left:-33.252%;top:-97.156%;width:166.504%;height:auto;max-width:none;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
@keyframes mmHum{0%,100%{opacity:1}14%{opacity:.5}20%{opacity:.94}31%{opacity:.68}44%{opacity:1}}
.mm-title.hum .mm-logo{animation:mmHum .9s linear}
/* QA2: the menu's entrance - the first reveal and every return from a run. On the black field the logo powers on first, like a
   tube striking (the menu theme starts in the same step); LEVEL 0 and PLAY follow, then the row, the left rail, the right rail and
   the footer. One-shot animations (opacity, and a few pixels of translate that composes with each part's own transform); ui.js
   removes the classes once they are over, so nothing runs on an idle menu. Reduced motion keeps the order with short plain fades. */
#menu.mm-intro :is(.mm-title,.mm-dest,.mm-play,.mm-row,.mm-rail,.mm-util,.mm-foot){opacity:0}
#menu.mm-intro.mm-go :is(.mm-title,.mm-dest,.mm-play,.mm-row,.mm-rail,.mm-util,.mm-foot){opacity:1}
#menu.mm-intro.mm-go .mm-logo{animation:mmIgnite .6s linear both}
#menu.mm-intro.mm-go .mm-dest{animation:mmArrive .5s cubic-bezier(.2,.7,.2,1) .2s both}
#menu.mm-intro.mm-go .mm-play{animation:mmArrive .55s cubic-bezier(.2,.7,.2,1) .26s both}
#menu.mm-intro.mm-go .mm-row{animation:mmArrive .5s cubic-bezier(.2,.7,.2,1) .4s both}
#menu.mm-intro.mm-go .mm-rail{animation:mmArriveL .55s cubic-bezier(.2,.7,.2,1) .52s both}
#menu.mm-intro.mm-go .mm-util{animation:mmArriveR .55s cubic-bezier(.2,.7,.2,1) .6s both}
#menu.mm-intro.mm-go .mm-foot{animation:mmFade .5s ease .72s both}
@keyframes mmIgnite{0%{opacity:0}5%{opacity:.6}9%{opacity:.04}17%{opacity:.85}22%{opacity:.18}31%{opacity:.95}36%{opacity:.55}46%,100%{opacity:1}}
@keyframes mmArrive{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@keyframes mmArriveL{from{opacity:0;translate:-12px 0}to{opacity:1;translate:0 0}}
@keyframes mmArriveR{from{opacity:0;translate:12px 0}to{opacity:1;translate:0 0}}
html.rm #menu.mm-intro.mm-go .mm-logo{animation:mmFade .22s ease both!important}
html.rm #menu.mm-intro.mm-go .mm-dest{animation:mmFade .18s ease .1s both!important}
html.rm #menu.mm-intro.mm-go .mm-play{animation:mmFade .18s ease .13s both!important}
html.rm #menu.mm-intro.mm-go .mm-row{animation:mmFade .18s ease .18s both!important}
html.rm #menu.mm-intro.mm-go .mm-rail{animation:mmFade .18s ease .24s both!important}
html.rm #menu.mm-intro.mm-go .mm-util{animation:mmFade .18s ease .28s both!important}
html.rm #menu.mm-intro.mm-go .mm-foot{animation:mmFade .18s ease .32s both!important}
#menu.mm-tight .mm-title{visibility:hidden}
@media (hover:hover) and (pointer:fine){.mm-title{will-change:transform}}   /* the logo is one cached layer: the pointer lean only moves it */
#menu.mm-drift .mm-title{will-change:transform}   /* post-3H Trial 1: while it drifts (touch screens too), the same cached layer */

/* PLAY and its row: one block, low and centred */
.mm-stage{position:absolute;left:0;right:0;bottom:var(--stb);width:var(--stw);margin:0 auto}
.mm-dest{display:flex;justify-content:center;align-items:baseline;gap:14px;margin:0 0 12px;line-height:1}
.mm-dest b{color:var(--u-cream);font:600 var(--df)/1 var(--u-display);letter-spacing:.24em;text-transform:uppercase}
.mm-dest span{color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.2em;text-transform:uppercase}
#menu .mm-play{position:relative;display:grid;place-items:center;width:100%;height:var(--ph);margin:0;padding:0;border:1px solid #e3c7688a;border-radius:0;background:#0b0905d4;color:var(--u-cream);
  font:600 var(--pf)/1 var(--u-display);letter-spacing:.4em;text-transform:uppercase;cursor:pointer;
  box-shadow:0 0 0 1px #000a,0 0 42px #e3c76816,inset 0 0 52px #e3c7680b;transition:background-color var(--u-fast),color var(--u-fast),border-color var(--u-fast),box-shadow var(--u-mid),transform var(--u-fast)}
#menu .mm-play span{display:block;padding-left:.4em;text-shadow:0 0 22px #f7eab044}
#menu .mm-play::before{content:"";position:absolute;left:22px;right:22px;top:9px;height:2px;pointer-events:none;background:linear-gradient(90deg,#f7eab000,var(--u-tube) 14%,var(--u-tube) 86%,#f7eab000);opacity:.5;
  box-shadow:0 0 10px 1px #f7eab03d;transition:opacity var(--u-fast)}
@media (hover:hover){
  #menu .mm-play:hover{background:var(--u-sick);color:var(--u-on-sick);border-color:var(--u-tube);box-shadow:0 0 0 1px #000a,0 0 80px #e3c76844}
  #menu .mm-play:hover span{text-shadow:none}
  #menu .mm-play:hover::before{opacity:0}
}
#menu .mm-play:focus-visible{background:var(--u-sick);color:var(--u-on-sick);border-color:var(--u-tube);outline:2px solid var(--u-tube);outline-offset:4px}
#menu .mm-play:focus-visible span{text-shadow:none}
#menu .mm-play:focus-visible::before{opacity:0}
#menu .mm-play:active{transform:scale(.994)}
.mm-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:-1px}
#menu .mm-item{position:relative;display:grid;place-items:center;height:var(--rh);margin:0;padding:0 4px 0 calc(4px + var(--rk));border:1px solid var(--u-line2);border-radius:0;background:#0a0805c4;color:var(--u-cream);opacity:.84;
  font:600 var(--rf)/1 var(--u-display);letter-spacing:var(--rk);text-transform:uppercase;white-space:nowrap;transition:opacity var(--u-fast),color var(--u-fast),background-color var(--u-fast),box-shadow var(--u-fast)}
#menu .mm-item+.mm-item{border-left:0}
@media (hover:hover){#menu .mm-item:hover{opacity:1;color:var(--u-tube);background:#17130be6;box-shadow:inset 0 0 0 1px var(--u-line-hi)}}
#menu .mm-item:focus-visible{z-index:1;opacity:1;color:var(--u-tube);background:#17130be6;outline:2px solid var(--u-sick-hi);outline-offset:2px}
#menu .mm-item.on{opacity:1;color:var(--u-sick-hi);box-shadow:inset 0 -2px 0 var(--u-sick)}

/* the rail: who you are (the draft's profile), your light ("stuff"), the connection (where the draft had a chat) */
.mm-rail{position:absolute;left:var(--sl);top:var(--st);right:calc(var(--sr) + var(--uw) + 14px);max-width:340px}
.mm-id{display:flex;align-items:center;gap:10px;min-width:0;padding:6px 12px 6px 8px;border:1px solid var(--u-line2);background:#0a0805d9}
.mm-glyph{position:relative;flex:none;width:30px;height:28px}
.mm-glyph::before{content:"";position:absolute;left:5px;top:0;width:20px;height:20px;border-radius:50%;background:var(--gm,#ffcc77);box-shadow:inset -3px -4px 0 #0000002e}
.mm-glyph i{position:absolute;bottom:0;width:8px;height:8px;border-radius:50%;background:var(--gh,#ffcc77);box-shadow:inset -1px -2px 0 #00000026}
.mm-glyph i:first-child{left:0}
.mm-glyph i:last-child{right:0}
#menu #name{flex:1;min-width:0;height:38px;margin:0;padding:0 2px;border:0;border-bottom:1px dashed var(--u-line2);border-radius:0;background:none;color:#fff4cf;font:500 15px/1 var(--u-mono);letter-spacing:.04em}
#menu #name::placeholder{color:#8f8668;opacity:1}
#menu #name:hover{border-bottom-color:var(--u-line-hi)}
#menu #name:focus{outline:none;border-bottom:1px solid var(--u-sick)}
#menu #name:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:3px}

/* the utility rail: settings, your wanderer, sound, help */
.mm-util{position:absolute;top:var(--st);right:var(--sr);display:flex;flex-direction:column}
#menu .mm-util button{position:relative;display:grid;place-items:center;width:var(--uw);height:var(--uw);margin:0;padding:0;border:1px solid var(--u-line2);border-radius:0;background:#0a0805d9;color:var(--u-cream);letter-spacing:0;
  transition:background-color var(--u-fast),border-color var(--u-fast),color var(--u-fast)}
#menu .mm-util button+button{margin-top:-1px}
.mm-util svg{width:calc(var(--uw) * .46);height:calc(var(--uw) * .46);fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;pointer-events:none}
/* pre-Trial 3 polish P3: the Account panel - beside the Account button (the rail's second cell), in the rail's own frame: a hairline,
 * the near-black ground, cream text; below the rail where the rail lies along the top (a short screen, below) */
.mm-pop{position:absolute;z-index:4;top:calc(var(--st) + var(--uw) - 1px);right:calc(var(--sr) + var(--uw) + 10px);width:max-content;max-width:min(300px,calc(100vw - var(--sl) - var(--sr) - var(--uw) - 22px));
  display:grid;gap:12px;justify-items:start;padding:14px 16px;border:1px solid var(--u-line2);background:#0a0805f2;color:var(--u-cream);box-shadow:0 10px 28px #000a}
.mm-pop[hidden]{display:none}
#menu .mm-util button[aria-expanded=true]{z-index:1;color:var(--u-tube);border-color:var(--u-line-hi);background:#17130b}   /* (P3: its panel is open) */
.mm-pop-t{margin:0;font:500 13px/1.45 var(--u-mono);letter-spacing:.02em;color:var(--u-cream)}
#menu .mm-pop .mm-pop-x{min-height:36px;padding:0 14px;font-size:11px}
@media (pointer:coarse){#menu .mm-pop .mm-pop-x{min-height:44px}}
@media (hover:hover){#menu .mm-util button:hover{z-index:1;border-color:var(--u-line-hi);color:var(--u-tube);background:#17130b}}
#menu .mm-util button:focus-visible{z-index:2;color:var(--u-tube);background:#17130b;outline:2px solid var(--u-sick-hi);outline-offset:2px}
#menu .mm-util button.on{z-index:1;color:var(--u-sick-hi);border-color:var(--u-sick)}
#mmSound .off{display:none}
#mmSound[aria-pressed=false] .on{display:none}
#mmSound[aria-pressed=false] .off{display:inline}
#menu #mmSound[aria-pressed=false]{color:var(--u-mute)}

/* the corner: the version (pre-Trial 3 polish P6: the source credit beside it moved to Credits -> Source material) */
.mm-foot{position:absolute;left:var(--sl);right:var(--sr);bottom:var(--sb);display:flex;align-items:flex-end;justify-content:flex-end;gap:16px;pointer-events:none}
.mm-foot>*{pointer-events:auto}
.mm-ver{margin:0;flex:none;color:var(--u-moss-dim);font:500 11px/1 var(--u-mono);letter-spacing:.14em}

/* PLAY opens the entry: Level 0, your name and light, ENTER LEVEL 0 (the game's own start) */
.mm-entry{position:absolute;left:0;right:0;bottom:var(--stb);width:var(--ew);max-height:calc(100% - var(--st) - var(--stb));margin:0 auto;overflow:auto;padding:24px 26px 16px;
  border:1px solid var(--u-line2);background:linear-gradient(170deg,#17130bf6,#0d0b07f8 70%);box-shadow:0 30px 90px #000e;animation:uPanelIn .4s var(--u-ease) both;scrollbar-width:thin;scrollbar-color:#5b5236 transparent}
.mm-entry::before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:2px;background:var(--u-sick);transform-origin:0 50%;animation:uLine .7s .1s var(--u-ease) both}
.mm-entry-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 10px}
#menu .mm-entry-head h2{margin:0;color:var(--u-cream);font:600 clamp(28px,4.2vh,40px)/1 var(--u-display);letter-spacing:.16em;text-transform:uppercase}
.mm-entry-head span{color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.2em;text-transform:uppercase}
.mm-brief{margin:0 0 16px;max-width:62ch;color:var(--u-text);font:400 12.5px/1.7 var(--u-mono)}
.mm-kitrow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);margin:0 0 16px;border-top:1px solid var(--u-line);border-bottom:1px solid var(--u-line)}
.mm-who,.mm-what{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;column-gap:12px;row-gap:4px;min-width:0;padding:12px 14px 12px 0}
.mm-what{grid-template-columns:44px minmax(0,1fr) auto;padding:12px 0 12px 14px;border-left:1px solid var(--u-line)}
.mm-what canvas{grid-row:1/3;width:44px;height:44px}
.mm-kitrow .k{color:var(--u-moss);font:500 10.5px/1 var(--u-mono);letter-spacing:.04em}
.mm-kitrow b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--u-cream);font:600 20px/1.05 var(--u-display);letter-spacing:.06em;text-transform:uppercase}
.mm-kitrow .k{grid-row:1;align-self:end}
.mm-kitrow b{grid-row:2;align-self:start}
.mm-who .k,.mm-who b{grid-column:1}
.mm-what .k,.mm-what b{grid-column:2}
.mm-who .mm-link{grid-column:2;grid-row:1/3}
.mm-what .mm-link{grid-column:3;grid-row:1/3}
#menu .mm-link{min-height:36px;margin:0;padding:0 4px;border:0;border-radius:0;background:none;color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase;
  text-decoration:underline;text-decoration-color:var(--u-line2);text-underline-offset:5px;transition:color var(--u-fast)}
@media (hover:hover){#menu .mm-link:hover{color:var(--u-cream);text-decoration-color:var(--u-line-hi)}}
#menu .mm-link:focus-visible{color:var(--u-cream);outline:2px solid var(--u-sick-hi);outline-offset:2px}
#menu .mm-entry .u-primary{min-height:60px}
.mm-entry-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:8px}
/* (Trial 3 R26 C) the launch sheet: the levels (Level 0 chosen, the rest coming and not playable), the room line, your name (required:
   ENTER waits for it, and says why beside the field) */
.mm-levels{display:grid;grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(0,1fr));gap:8px;margin:0 0 18px}
#menu .mm-lv{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;min-height:62px;margin:0;padding:10px 12px;border:1px solid var(--u-line);border-radius:0;background:none;
  color:var(--u-mute);font:400 11px/1.25 var(--u-mono);letter-spacing:.04em;text-align:left;text-transform:none;cursor:default}
#menu .mm-lv.on{border-color:var(--u-line-hi);background:linear-gradient(var(--u-panel2),var(--u-panel));color:var(--u-text);box-shadow:inset 3px 0 0 var(--u-sick)}
#menu .mm-lv.soon{border-style:dashed;opacity:.62;pointer-events:none}
.mm-lv-n{color:var(--u-cream);font:600 15px/1 var(--u-display);letter-spacing:.14em;text-transform:uppercase}
.mm-lv.soon .mm-lv-n{color:var(--u-mute)}
.mm-lv-t{color:var(--u-moss);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase}
.mm-lv-s{margin-top:auto;font-size:10px;letter-spacing:.06em;text-transform:uppercase}
.mm-lv.on .mm-lv-s{color:var(--u-sick)}
#menu .mm-lv:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:2px}
.mm-eroom{margin:-6px 0 14px;color:var(--u-moss);font:400 11px/1.4 var(--u-mono);letter-spacing:.04em}
.mm-eroom:empty{display:none}
#menu .mm-who{grid-template-columns:minmax(0,1fr);row-gap:6px}
#menu #mmNameIn{width:100%;min-width:0;height:36px;margin:0;padding:0 10px;border:1px solid var(--u-line2);border-radius:0;background:var(--u-field);color:var(--u-cream);
  font:600 18px/1 var(--u-display);letter-spacing:.06em;text-transform:none}
#menu #mmNameIn::placeholder{color:var(--u-moss-dim);opacity:1;font-weight:400}
#menu #mmNameIn[aria-invalid=true]{border-color:var(--u-danger-hi)}
.mm-err{margin:0;color:var(--u-danger-hi);font:400 11px/1.4 var(--u-mono)}
.mm-err[hidden]{display:none}
#menu .mm-entry .u-primary:disabled{border-color:var(--u-line2);background:var(--u-panel2);color:var(--u-mute);cursor:not-allowed}
#menu .mm-entry .u-primary:disabled span{transform:none}
.mm-entry-foot .u-note{text-align:right;max-width:52ch;font-size:10.5px;line-height:1.5}
#menu:focus,.mm-entry:focus,#dialog .panel:focus,#caught .panel:focus,#won .panel:focus,#runMenu .panel:focus{outline:none}

/* the game's own connection line is shown inside the rail while the menu is up */
body.ui-menu #net{display:none}
body.ui-menu>header,body.ui-menu .location,body.ui-menu .coordinates,body.ui-menu #touch,body.ui-menu #hud{visibility:hidden}

/* QA2: no entrance. The menu appears whole, revealed by the boot gate (the menu never assembles in front of the player) */
@keyframes mmFade{from{opacity:0}to{opacity:1}}
@keyframes uLine{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* small screens: the entry's two facts stack; the source credit takes two lines under PLAY */
@media (max-width:420px){#menu{--stb:calc(var(--sb) + 50px)}}
@media (max-width:420px){#menu .mm-entry{--stb:calc(var(--sb) + 14px)}}   /* ((R26 C) the sheet, taller with its levels and name field, sits lower: the corner under it is empty since R25 K) */
@media (max-width:520px){
  .mm-kitrow{grid-template-columns:minmax(0,1fr)}
  .mm-levels{grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(0,1fr));gap:6px;margin-bottom:12px}
  #menu .mm-lv{min-height:48px;padding:7px 8px}
  /* ((R26 C) on a phone the chosen level's card names it: the sheet's heading stays only for its label, so the sheet keeps clear of the
     rail and the utility buttons, as R25's did) */
  #menu .mm-entry .mm-entry-head{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .mm-lv-np{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .mm-lv-n{font-size:13px;letter-spacing:.1em}
  .mm-lv-s{font-size:9px}
  #menu #mmNameIn{height:44px;font-size:18px}
  .mm-what{padding-left:0;border-left:0;border-top:1px solid var(--u-line)}
  .mm-who{padding-right:0}
  .mm-entry{padding:20px 18px 12px}
  .mm-entry-foot{flex-direction:row-reverse}
  .mm-entry-foot .u-note{display:none}
  .mm-brief{font-size:12px;line-height:1.6}
}
@media (max-height:700px) and (max-width:1179px){.mm-brief{display:none}}

/* a phone on its side (and any short window): the utility rail lies along the top, the title rises, PLAY stays on the first screen */
@media (max-height:560px){
  #menu{--uw:40px;--lw:min(40vw,calc(100vw - 2 * (230px + var(--edge) + 12px)),calc((100vh - 230px) * 2.914));--ttop:var(--st);--ph:clamp(50px,14vh,64px);--pf:clamp(28px,8.4vh,40px);--rh:clamp(40px,11vh,48px);--rf:14px;--df:14px;
    --stw:min(520px,calc(100vw - var(--sl) - var(--sr)));--stb:calc(var(--sb) + 4px)}
  .mm-util{flex-direction:row}
  #menu .mm-util button+button{margin:0 0 0 -1px}
  .mm-pop{top:calc(var(--st) + var(--uw) + 8px);right:var(--sr);max-width:min(300px,calc(100vw - var(--sl) - var(--sr)))}   /* (P3) */
  .mm-rail{right:auto;width:min(230px,calc(50vw - var(--lw) / 2 - 24px));min-width:170px}
  .mm-conn p{display:none}
  .mm-dest{margin-bottom:8px}
  .mm-foot{left:auto;width:auto;bottom:var(--sb)}
  .mm-ver{font-size:10px}
  .mm-entry{padding:16px 20px 10px;--ew:min(620px,calc(100vw - var(--sl) - var(--sr) - 40px))}
  #menu .mm-entry-head h2{font-size:26px}
  .mm-kitrow{margin-bottom:12px}
  .mm-who,.mm-what{padding-top:8px;padding-bottom:8px}
  #menu .mm-entry .u-primary{min-height:48px}
  #menu.in-entry .mm-foot{visibility:hidden}
}
@media (max-height:560px){
  /* ((R26 C) a short screen: the levels a line of chips, the sheet's heading kept only as its label, the name field lower - so the sheet
     keeps clear of the rail and the utility buttons, and ENTER stays on the first screen) */
  .mm-levels{gap:6px;margin:0 0 10px}
  #menu .mm-lv{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-height:0;padding:6px 9px}
  .mm-lv-n{font-size:13px;letter-spacing:.1em}
  .mm-lv-s{margin-top:0}
  .mm-lv-np,#menu .mm-entry .mm-entry-head{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .mm-eroom{margin:0 0 8px}
  #menu #mmNameIn{height:34px;font-size:16px}
  #menu .mm-entry{padding-top:12px;padding-bottom:6px}
  .mm-kitrow{margin-bottom:8px}
  .mm-who,.mm-what{padding-top:5px;padding-bottom:5px}
}
@media (max-height:560px) and (max-width:760px){
  /* a small phone on its side: the logo goes under the identity block, PLAY's block narrows so the version keeps its corner */
  #menu{--ttop:calc(var(--st) + 84px);--lw:min(56vw,calc((100vh - var(--ttop) - 150px) * 2.914));--stw:min(520px,calc(100vw - var(--sl) - var(--sr) - 140px))}
  .mm-rail{width:min(230px,calc(100vw - var(--sl) - var(--sr) - 4 * var(--uw) - 20px))}
}

/* a wide screen: the tall left rail of the draft, the cells of its right rail, the title at full size */
@media (min-width:1180px) and (min-height:620px){
  #menu{--edge:clamp(24px,2.5vw,48px);--railw:clamp(270px,20.5vw,400px);--uw:60px;
    --ttop:clamp(40px,6.6vh,84px);
    --stw:min(640px,calc(100vw - 2 * (var(--railw) + var(--edge) + 40px)));--ew:min(680px,calc(100vw - 2 * (var(--railw) + var(--edge) + 28px)));
    --ph:clamp(96px,15.2vh,168px);--pf:clamp(54px,8vh,88px);--rh:clamp(60px,9vh,100px);--rf:min(clamp(18px,2.3vh,25px),calc(var(--stw) / 26));--rk:.16em;--df:clamp(16px,2vh,21px);
    --stb:var(--sb)}
  #menu{--lw:min(44vw,calc(100vw - 2 * (var(--railw) + var(--edge) + 40px)),920px,calc((100vh - var(--ttop) - var(--ph) - var(--rh) - var(--stb) - 120px) * 2.914))}
  .mm-rail{right:auto;bottom:var(--sb);width:var(--railw);max-width:none;display:flex;flex-direction:column;border:1px solid var(--u-line2);background:#0a0805e3}
  .mm-id{padding:10px 16px 10px 14px;border:0;border-bottom:1px solid var(--u-line2);background:#110e09}
  .mm-foot{left:auto;flex-direction:column;align-items:flex-end;gap:10px;max-width:min(320px,calc(50vw - var(--stw) / 2 - var(--edge) - 24px))}
  .mm-ver{font-size:12px}
  .mm-entry{padding:28px 32px 18px}
  @media (hover:hover){
    .mm-util button::after{content:attr(data-tip);position:absolute;right:calc(100% + 10px);top:50%;padding:7px 10px;border:1px solid var(--u-line2);background:#0a0805f2;color:var(--u-cream);
      font:500 11px/1 var(--u-mono);letter-spacing:.06em;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(6px,-50%);transition:opacity var(--u-fast),transform var(--u-fast)}
    .mm-util button:hover::after,.mm-util button:focus-visible::after{opacity:1;transform:translate(0,-50%)}
  }
}
@media (min-width:1180px) and (min-height:620px) and (max-height:820px){
}

/* ---------------------------------------------------------------- sheets (settings, credits, controls) */
.ui-sheet{position:fixed;inset:0;z-index:40;display:flex;justify-content:flex-end;color:var(--u-text);font-family:var(--u-mono)}
.ui-sheet[hidden]{display:none}
.ui-sheet:not(.in){pointer-events:none}   /* closing: the fade-out never catches a click */
.us-back{position:absolute;inset:0;background:#030201b8;opacity:0;transition:opacity var(--u-mid) ease}
.us-card{position:relative;display:flex;flex-direction:column;width:min(780px,100vw);height:100%;height:100dvh;background:linear-gradient(180deg,#16120bfa,#0f0c07fc 60%);border-left:1px solid var(--u-line2);
  box-shadow:-30px 0 90px #000c;opacity:0;transform:translate3d(36px,0,0);transition:opacity var(--u-mid) ease,transform var(--u-mid) var(--u-ease)}
.us-card::before{content:"";position:absolute;left:-1px;top:0;bottom:0;width:2px;background:var(--u-sick);transform-origin:50% 0;transform:scaleY(0);transition:transform var(--u-slow) .1s var(--u-ease)}
.ui-sheet.in .us-back{opacity:1}
.ui-sheet.in .us-card{opacity:1;transform:none}
.ui-sheet.in .us-card::before{transform:scaleY(1)}
.us-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:34px 36px 18px;border-bottom:1px solid var(--u-line)}
.us-head h2{margin:0;font:600 clamp(32px,3vw,42px)/1 var(--u-display);letter-spacing:.06em;text-transform:uppercase;color:var(--u-cream)}
.us-head p{margin:8px 0 0;color:var(--u-moss);font:400 11.5px/1.5 var(--u-mono)}
.us-close{display:inline-flex;align-items:center;gap:10px;flex:none;min-height:40px;padding:0 12px 0 14px;border:1px solid var(--u-line2);background:none;color:var(--u-cream);font:500 11px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
.us-close kbd{margin:0;padding:3px 5px;border:1px solid var(--u-line2);color:var(--u-moss);font:500 9.5px/1 var(--u-mono);letter-spacing:.04em}
.us-close:hover{border-color:var(--u-line-hi);color:#fff8de}
.us-body{flex:1;min-height:0;overflow:auto;padding:26px 36px 48px;scrollbar-width:thin;scrollbar-color:#5b5236 transparent;overscroll-behavior:contain}
@media (max-width:640px){.us-head{padding:22px 18px 14px}.us-body{padding:18px 18px 36px}.us-close kbd{display:none}}
@media (pointer:coarse){.us-close kbd{display:none}}

/* settings: a page list and a page */
.us-split{display:grid;grid-template-columns:150px 1fr;gap:30px;align-items:start}
.us-pages{position:sticky;top:0;display:flex;flex-direction:column;gap:2px}
.us-pages button{min-height:40px;margin:0;padding:0 0 0 14px;text-align:left;background:none;border:0;border-left:2px solid var(--u-line);color:var(--u-mute);
  font:600 17px/1 var(--u-display);letter-spacing:.08em;text-transform:uppercase;transition:color var(--u-fast),border-color var(--u-fast)}
.us-pages button:hover{color:var(--u-cream);border-left-color:var(--u-line2)}
.us-pages button[aria-selected=true]{color:var(--u-sick-hi);border-left-color:var(--u-sick)}
.us-page[hidden]{display:none}
.us-page{animation:mmFade .3s ease both}
.us-page h3{margin:0 0 4px;font:600 22px/1.1 var(--u-display);letter-spacing:.06em;text-transform:uppercase;color:var(--u-cream)}
.us-page>.u-note{margin-bottom:18px}
.us-row{display:grid;grid-template-columns:1fr auto;gap:6px 18px;align-items:center;padding:15px 0;border-bottom:1px solid var(--u-line)}
.us-row>span{color:var(--u-cream);font:500 12.5px/1.4 var(--u-mono)}
.us-row>span small{display:block;margin-top:4px;color:var(--u-mute);font:400 11px/1.5 var(--u-mono)}
.us-row.wide{grid-template-columns:1fr}
.us-row output{color:var(--u-sick-hi);font:500 12px/1 var(--u-mono);min-width:44px;text-align:right}
.us-slider{display:grid;grid-template-columns:1fr auto;gap:4px 14px;align-items:center;margin:0;color:var(--u-cream);font:500 12.5px/1.4 var(--u-mono);letter-spacing:0}
.us-slider .u-range{grid-column:1/-1}
.us-slider>span small{display:block;margin-top:4px;color:var(--u-mute);font:400 11px/1.5 var(--u-mono)}   /* (pre-Trial 3 polish P8: Music and UI volume say what they cover) */
.us-seg{display:flex;gap:6px;flex-wrap:wrap}
.us-seg .u-btn{min-height:38px;padding:0 14px;font-size:11px}
.us-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.us-prev{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin:4px 0 6px;padding:16px;border:1px dashed var(--u-line2);background:#050403;
  font-size:calc(11px * var(--ps,1));letter-spacing:.12em;color:var(--hd,#c8c2a2);opacity:var(--ho,1)}
.us-prev b{font-weight:500;color:var(--hv,#f3e7a7);margin-left:6px}
.us-prev i{display:inline-block;width:52px;height:4px;margin-left:8px;background:#ffffff1f;vertical-align:middle}
.us-prev i::after{content:"";display:block;width:82%;height:100%;background:var(--hv,#f3e7a7)}
.us-keys{display:grid;grid-template-columns:1fr auto;gap:0 18px}
.us-keys>*{padding:11px 0;border-bottom:1px solid var(--u-line)}
.us-keys span{color:var(--u-text);font:400 12px/1.4 var(--u-mono)}
.us-keys b{color:var(--u-cream);font:500 11.5px/1.4 var(--u-mono);letter-spacing:.06em;text-align:right}
.us-keys h4{grid-column:1/-1;margin:20px 0 0;padding:0 0 8px;color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.08em;border-bottom:1px solid var(--u-line2)}
.us-keys h4:first-child{margin-top:0}
@media (max-width:640px){
  .us-split{grid-template-columns:1fr;gap:16px}
  .us-pages{position:static;flex-direction:row;overflow-x:auto;gap:0;border-bottom:1px solid var(--u-line);scrollbar-width:none}
  .us-pages button{flex:1 0 auto;padding:0 12px;border-left:0;border-bottom:2px solid transparent;text-align:center;font-size:15px}
  .us-pages button[aria-selected=true]{border-bottom-color:var(--u-sick)}
}

/* credits */
.cr-sec{margin:0 0 30px}
.cr-sec h3{margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid var(--u-line2);color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.08em}
.cr-entry{display:grid;grid-template-columns:minmax(150px,auto) 1fr;gap:4px 22px;padding:9px 0}
.cr-entry b{color:var(--u-cream);font:600 21px/1.1 var(--u-display);letter-spacing:.05em}
.cr-entry span{color:var(--u-text);font:400 12px/1.6 var(--u-mono)}
.cr-entry a,.cr-text a,.cr-links a{color:var(--u-sick-hi);text-underline-offset:3px}
.cr-entry a:focus-visible,.cr-text a:focus-visible,.cr-links a:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:2px}
.cr-text{margin:0;color:var(--u-text);font:400 12px/1.75 var(--u-mono);max-width:62ch}
/* pre-Trial 3 polish P6: a paragraph's links on a line of their own; the two lead developers in their own colours (neon green: RoYoshi,
   neon purple: Mariikyu - credits_data.js says which), lit with a faint glow of the same colour */
.cr-links{margin:10px 0 0;color:var(--u-moss-dim);font:400 12px/1.9 var(--u-mono);max-width:62ch}
.cr-sec{--cr-green:#5cff8a;--cr-purple:#c58cff}
.cr-entry.cr-green b{color:var(--cr-green);text-shadow:0 0 14px #5cff8a59,0 0 2px #5cff8a80}
.cr-entry.cr-purple b{color:var(--cr-purple);text-shadow:0 0 14px #c58cff59,0 0 2px #c58cff80}
/* help (the menu's "i") */
.hp-sec{margin:0 0 30px}
.hp-sec h3{margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid var(--u-line2);color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.08em}
.hp-sec p{margin:0 0 12px;max-width:62ch;color:var(--u-text);font:400 12px/1.75 var(--u-mono)}
.hp-sec .u-btn{margin-top:6px}
.cr-fine{margin-top:36px;color:var(--u-moss-dim);font:400 11px/1.6 var(--u-mono)}
@media (max-width:640px){.cr-entry{grid-template-columns:1fr;gap:2px}}

/* the pause dialog's way into settings / customize (C2 restyles the dialog) */
.pz-more{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pz-more .u-btn{width:100%}

/* ================================================================ C2: the HUD, pause, run states, hints, touch
   Presentation only: every readout keeps its id and its writer (the game bundle, hud.js, camcorder.js, mp.js). The HUD
   settings still drive it: --hs (size), --ho (opacity), --hv / --hd / --ht (colour, from hud.js). */

/* header during play: the brand goes (the HUD already says where you are); two quiet controls on the right */
header .brand{display:none}
header:before{height:118px;background:linear-gradient(#060504b3,#0000)}
header .tools{gap:8px;align-items:center;margin-left:auto}
header .tools button{display:inline-flex;align-items:center;gap:10px;min-height:40px;padding:0 14px;border:1px solid var(--u-line2);background:#0c0a06b8;color:var(--u-cream);
  font:500 11px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
header .tools button:hover{border-color:var(--u-line-hi);color:#fff8de;background:#1b160cd9;transform:none}
header .tools button:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:3px}
#hudPause kbd{margin:0;padding:3px 5px;border:1px solid var(--u-line2);color:var(--u-moss);font:500 9.5px/1 var(--u-mono);letter-spacing:.04em}

/* the objective: top left, the one thing to do */
.hud-obj{position:fixed;top:30px;left:38px;pointer-events:none;transform:scale(var(--hs));transform-origin:left top;opacity:var(--ho);isolation:isolate;transition:opacity .6s ease;text-shadow:0 1px 8px #000d}
#hud[hidden]~.hud-obj,body.ui-menu .hud-obj{display:none}
body.captured .hud-obj{opacity:.2}
.hud-obj::before{content:"";position:absolute;z-index:-1;inset:-30px -80px -26px -40px;pointer-events:none;background:radial-gradient(ellipse 70% 80% at 22% 40%,#040302b8,#0000 72%)}
.hud-obj .objective{display:grid;gap:7px}
.hud-obj small{color:var(--hd);font:500 10.5px/1 var(--u-mono);letter-spacing:.22em;text-transform:uppercase}
.hud-obj b{color:var(--hv);font:600 25px/1 var(--u-display);letter-spacing:.08em;text-transform:uppercase}
#hud:not([hidden])~.hud-obj .objective{animation:hudIn .9s cubic-bezier(.2,.7,.2,1) both}   /* on the child: the block itself carries the HUD size */
/* the connection line sits under the objective */
body:not(.ui-menu) #net{top:calc(30px + 54px * var(--hs,1));left:38px;color:var(--hd);font:500 10px/1.4 var(--u-mono);letter-spacing:.16em;text-shadow:0 1px 6px #000c}

/* the status line, bottom left: who, how you move, stamina, light */
#hud{left:38px;bottom:30px}
#hud .walk{font-family:var(--u-mono);letter-spacing:.14em;margin-bottom:14px}
#hud .walk #nameplate{font:600 15px/1 var(--u-display);letter-spacing:.14em}
#hud .walk>span+span{margin-left:14px;padding-left:14px}
.staminaHud i{width:84px!important;height:5px!important;border-radius:0!important;background:#ffffff1c!important}
.staminaHud em{border-radius:0!important}
#hud .keyline kbd{padding-bottom:3px}

/* hints: off the centre, never flashing */
#encounterHint{bottom:132px;padding:11px 18px 11px 16px;border:1px solid var(--u-line2);border-left:2px solid var(--u-moss);background:#0b0906e6;color:var(--u-cream);
  font:400 12px/1.45 var(--u-mono);letter-spacing:.04em;box-shadow:0 10px 40px #0009;animation:uHintIn .6s var(--u-ease) both}
#blackoutHint{top:26px;padding:10px 18px;border:1px solid #c4503f66;border-top:2px solid var(--u-danger);background:#0c0605eb;color:#f1dccb;
  font:600 15px/1 var(--u-display);letter-spacing:.26em;box-shadow:0 10px 40px #000a;animation:uHintIn .6s var(--u-ease) both}
@keyframes uHintIn{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}

/* ---------------------------------------------------------------- pause, caught, won, run: one panel family */
#dialog,#caught,#won,#runMenu{padding:20px;overflow:auto;background:#060504c4;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#caught{background:#0b0504d1}
#dialog .panel,#caught .panel,#won .panel,#runMenu .panel{position:relative;width:min(460px,100%);max-width:none;margin:auto;padding:34px 34px 30px;border:1px solid var(--u-line2);
  background:linear-gradient(170deg,#17130bf4,#0d0b07f7 70%);box-shadow:0 34px 90px #000d;color:var(--u-text);font-family:var(--u-mono);animation:uPanelIn .45s var(--u-ease) both}
#dialog .panel::before,#caught .panel::before,#won .panel::before,#runMenu .panel::before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:2px;background:var(--u-sick);transform-origin:0 50%;animation:uLine .8s .15s var(--u-ease) both}
#caught .panel::before{background:var(--u-danger)}
@keyframes uPanelIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
#dialog .eyebrow,#caught .eyebrow,#won .eyebrow,#runMenu .eyebrow{margin:0;color:var(--u-moss);font:500 11px/1.4 var(--u-mono);letter-spacing:.2em}
#caught .eyebrow{color:var(--u-danger-hi)}
#dialog .panel h2,#caught .panel h2,#won .panel h2,#runMenu .panel h2{margin:12px 0 14px;color:var(--u-cream);font:500 clamp(34px,3.6vw,46px)/1.02 var(--u-display);letter-spacing:.01em}
#caught .panel h2{font-size:clamp(40px,5vw,58px)}
#dialog .intro,#caught .intro,#won .intro,#runMenu .intro{margin:0 0 22px;color:var(--u-text);font:400 12.5px/1.75 var(--u-mono)}
#dialog .primary,#caught .primary,#won .primary,#runMenu .primary{min-height:56px;margin:0;padding:0 20px;border:1px solid var(--u-sick-hi);background:var(--u-sick);color:var(--u-on-sick);
  font:600 18px/1 var(--u-display);letter-spacing:.14em;text-transform:uppercase;transition:background-color var(--u-fast)}
#dialog .primary:hover,#caught .primary:hover,#won .primary:hover,#runMenu .primary:hover{background:var(--u-sick-hi);color:var(--u-on-sick);border-color:var(--u-tube)}
#dialog .primary span,#caught .primary span,#won .primary span,#runMenu .primary span{font:400 21px/1 var(--u-mono);transition:transform var(--u-mid) var(--u-ease)}
#dialog .primary:hover span,#caught .primary:hover span,#won .primary:hover span,#runMenu .primary:hover span{transform:translate(3px,-3px)}
#dialog .secondary,#caught .secondary,#runMenu .secondary,#loadoutBtn{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin:10px 0 0;padding:0 16px;border:1px solid var(--u-line2);
  background:var(--u-ink);color:var(--u-cream);font:500 12px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase;transition:background-color var(--u-fast),border-color var(--u-fast),color var(--u-fast)}
#dialog .secondary:hover,#caught .secondary:hover,#runMenu .secondary:hover,#loadoutBtn:hover{border-color:var(--u-line-hi);color:#fff8de;background:var(--u-panel2)}
#dialog #reset:hover{border-color:var(--u-danger-hi);color:var(--u-danger-hi)}
#dialog .panel button:focus-visible,#caught .panel button:focus-visible,#won .panel button:focus-visible,#runMenu .panel button:focus-visible,#dialog a:focus-visible{outline:2px solid var(--u-tube);outline-offset:3px}
#dialog .lore-credit,#dialog #onlineNote{margin:20px 0 0;color:var(--u-mute);font:400 11px/1.6 var(--u-mono)}
#dialog #onlineNote{color:var(--u-moss)}
#dialog .lore-credit a{color:var(--u-moss)}
#won .soon{margin:0 0 10px;color:var(--u-moss);font:500 11px/1.4 var(--u-mono);letter-spacing:.32em}
#won .stats{margin:0 0 16px;color:var(--u-sick-hi);font:500 12px/1.4 var(--u-mono);letter-spacing:.08em}
#won .panel h2{font-size:clamp(36px,6vh,50px);line-height:.98;text-transform:uppercase;letter-spacing:.03em}

/* pause: the actions on the left, the controls on the right */
#dialog .panel.pz{display:grid;grid-template-columns:minmax(0,350px) minmax(0,1fr);gap:0 44px;width:min(900px,100%);padding:36px 38px 32px}
.pz-main{display:flex;flex-direction:column;min-width:0}
.pz-main #resume{margin-top:8px}
.pz-more{margin-top:10px}
.pz-keys{min-width:0;padding-left:40px;border-left:1px solid var(--u-line)}
.pz-keys h3{margin:2px 0 6px;color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.2em;text-transform:uppercase}
#dialog .controlRows{margin:0}
#dialog .controlRows p{display:flex;justify-content:space-between;gap:16px;margin:0;padding:8.5px 0;border-bottom:1px solid var(--u-line);color:var(--u-text);font:400 12px/1.4 var(--u-mono)}
#dialog .controlRows b{color:var(--u-cream);font:500 11.5px/1.4 var(--u-mono);letter-spacing:.06em;text-align:right}
@media (max-width:820px){
  #dialog .panel.pz{grid-template-columns:minmax(0,1fr);gap:26px;width:min(480px,100%);padding:28px 24px 24px}
  .pz-keys{padding:20px 0 0;border-left:0;border-top:1px solid var(--u-line)}
}

/* ---------------------------------------------------------------- touch and small screens */
@media (pointer:coarse),(max-width:700px){
  header{top:14px;left:16px;right:16px}
  header:before{height:200px;background:linear-gradient(#060504c4,#06050400)}
  .hud-obj{top:16px;left:16px}
  .hud-obj b{font-size:19px}
  .hud-obj small{font-size:9.5px}
  #hud{top:calc(16px + 46px * var(--hs,1));bottom:auto;left:16px;transform-origin:left top}
  #hud::before{inset:-20px -40px -20px -20px;background:radial-gradient(ellipse 80% 90% at 20% 30%,#040302b0,#0000 72%)}
  #hud .walk{display:grid;grid-template-columns:auto auto;justify-content:start;gap:7px 14px;margin:0;font-size:10px;letter-spacing:.12em;max-width:calc(64vw / var(--hs))}
  #hud .walk .staminaHud,#hud .walk #lightStatus{grid-column:1/-1}   /* name and pace, then stamina, then the light: a narrow column clear of the level title */
  #hud .walk>span+span{margin-left:0;padding-left:0}
  #hud .walk>span+span::before{display:none}
  #hud .walk #nameplate{font-size:13px}
  .staminaHud i{width:52px!important}
  #hud .keyline{display:none}
  .location{top:64px;right:16px}
  .location h1{margin:4px 0;font-size:20px}
  .location h1 b{font-size:32px}
  .location .eyebrow,.location>span:last-child{font-size:10px}
  .coordinates{top:156px;bottom:auto;right:16px;transform-origin:right top}
  .coordinates span:last-child{display:none}
  body:not(.ui-menu) #net{display:none}
  body.ui-paused #net{display:block;top:14px;left:16px;right:16px;font-size:9.5px;text-align:center}
  #blackoutHint{top:auto;bottom:calc(var(--touch-h,0px) + 74px);max-width:calc(100vw - 32px);font-size:13px;letter-spacing:.2em}
  #encounterHint{bottom:calc(var(--touch-h,0px) + 26px);max-width:calc(100vw - 32px)}
  #hudPause kbd{display:none}
}
@media (pointer:coarse){
  /* the pad on the left, the actions on the right: the light and the inventory, then run and crouch at the thumb */
  body.playing #touch{display:grid;grid-template-columns:auto minmax(0,1fr) repeat(2,64px);grid-template-rows:repeat(4,auto);gap:8px;align-items:end;
    left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom))}
  #touch .dpad{grid-column:1/3;grid-row:1/-1;align-self:end;justify-self:start;grid-template-columns:repeat(3,52px);gap:6px}
  #touch .dpad button{width:52px;height:52px}
  #touch button{border:1px solid var(--u-line2);background:#0c0a06c7;color:var(--u-cream);border-radius:0;-webkit-tap-highlight-color:transparent}
  #touch>button{min-width:0;min-height:52px;padding:0 2px;font:600 13px/1 var(--u-display);letter-spacing:.06em;text-transform:uppercase;overflow:hidden}
  #touch button:active{background:var(--u-sick);color:var(--u-on-sick);border-color:var(--u-sick-hi)}
  #touch [data-key=ShiftLeft]{grid-column:3;grid-row:4}
  #touch [data-key=KeyC]{grid-column:4;grid-row:4}
  #touchFlash{grid-column:3;grid-row:3}
  #touchInv{grid-column:4;grid-row:3}
  #touchNV{grid-column:3;grid-row:2}
  #touchIR{grid-column:4;grid-row:2}
  #touchZoom{grid-column:3/5;grid-row:1}
  body.playing{--touch-h:136px}
  body.playing.cam-kind{--touch-h:254px}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:520px){
  /* a phone on its side: the actions in two rows of four, so the cluster stays low */
  body.playing #touch{grid-template-columns:auto minmax(0,1fr) repeat(4,60px);grid-template-rows:repeat(2,auto)}
  #touch [data-key=ShiftLeft]{grid-column:5;grid-row:2}
  #touch [data-key=KeyC]{grid-column:6;grid-row:2}
  #touchFlash{grid-column:3;grid-row:2}
  #touchInv{grid-column:4;grid-row:2}
  #touchNV{grid-column:3;grid-row:1}
  #touchIR{grid-column:4;grid-row:1}
  #touchZoom{grid-column:5/7;grid-row:1}
  body.playing,body.playing.cam-kind{--touch-h:112px}
  .coordinates{top:150px}
}

/* the game's own message if the renderer cannot start (it replaces the menu's contents) */
#menu>h2{position:relative;z-index:1;max-width:22ch;margin:22vh clamp(24px,6.5vw,124px) 14px;color:var(--u-cream);font:500 clamp(32px,4vw,46px)/1.05 var(--u-display)}
#menu>p{position:relative;z-index:1;max-width:52ch;margin:0 clamp(24px,6.5vw,124px);color:var(--u-text);font:400 13px/1.7 var(--u-mono)}

/* run-state overlays sit above the touch pad and the HUD (the connection line stays readable over the pause) */
#dialog{z-index:17}
body.ui-paused #net{z-index:18}
@media (pointer:coarse){
  .pz-keys{display:none}                                      /* touch has its own pad: the keyboard reference is noise */
  #dialog .panel.pz{grid-template-columns:minmax(0,1fr);width:min(460px,100%)}
}
@media (pointer:coarse),(max-width:700px){
  header #sound{display:none}                                 /* in Settings and on the pause screen's Settings */
  .hud-obj b{font-size:17px}
  .location .eyebrow{display:none}
  #dialog{padding-top:44px}
  body.cam-raised #camHud .rec{top:132px}                     /* the viewfinder's lines move below the status block */
  body.cam-raised #camHud .hint{top:156px}
  #camHud .hint{width:calc(100vw - 32px);white-space:normal;text-align:center;line-height:1.6}   /* the viewfinder's key line wraps instead of running off a phone */
}
@media (max-width:420px){
  #dialog .primary,#caught .primary,#won .primary,#runMenu .primary{padding:0 16px;font-size:16px;letter-spacing:.1em}
}

/* ================================================================ C3: customize - WANDERER and LOADOUT
   (#appearancePanel is the game's panel; inventory.js injects its loadout-card styles at run time, hence the #appearancePanel prefix) */
#appearancePanel{padding:20px;background:#060504d1;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#appearancePanel .appearance-card.cz{position:relative;display:flex;flex-direction:column;width:min(920px,100%);max-height:calc(100dvh - 40px);padding:0;overflow:hidden;
  border:1px solid var(--u-line2);background:linear-gradient(170deg,#17130bf6,#0d0b07f8 70%);box-shadow:0 34px 90px #000d;color:var(--u-text);font-family:var(--u-mono);animation:uPanelIn .45s var(--u-ease) both}
#appearancePanel .cz::before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:2px;background:var(--u-sick);transform-origin:0 50%;animation:uLine .8s .15s var(--u-ease) both}
#appearancePanel .cz-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:26px 30px 0}
#appearancePanel .cz-head h2{margin:0;color:var(--u-cream);font:600 clamp(28px,3vw,38px)/1 var(--u-display);letter-spacing:.06em;text-transform:uppercase}
#closeAppearance{display:inline-flex;align-items:center;gap:10px;flex:none;min-height:40px;padding:0 12px 0 14px;border:1px solid var(--u-line2);background:none;color:var(--u-cream);
  font:500 11px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
#closeAppearance kbd{margin:0;padding:3px 5px;border:1px solid var(--u-line2);color:var(--u-moss);font:500 9.5px/1 var(--u-mono);letter-spacing:.04em}
#closeAppearance:hover{border-color:var(--u-line-hi);color:#fff8de}
.cz-tabs{display:flex;padding:16px 30px 0;border-bottom:1px solid var(--u-line)}
.cz-tabs [role=tab]{display:grid;gap:5px;margin:0 30px -1px 0;padding:10px 0 12px;text-align:left;background:none;border:0;border-bottom:2px solid transparent;color:var(--u-mute);transition:color var(--u-fast),border-color var(--u-fast)}
.cz-tabs [role=tab] b{font:600 22px/1 var(--u-display);letter-spacing:.08em;text-transform:uppercase}
.cz-tabs [role=tab] small{color:var(--u-moss-dim);font:400 10.5px/1.3 var(--u-mono)}
.cz-tabs [role=tab]:hover{color:var(--u-cream)}
.cz-tabs [role=tab][aria-selected=true]{color:var(--u-sick-hi);border-bottom-color:var(--u-sick)}
.cz-tabs [role=tab][aria-selected=true] small{color:var(--u-moss)}
#appearancePanel .cz-body{display:block;flex:1;min-height:0;overflow:auto;padding:24px 30px;scrollbar-width:thin;scrollbar-color:#5b5236 transparent;overscroll-behavior:contain}
#czWanderer[hidden],#czLoadout[hidden],#czBeam[hidden]{display:none!important}
.cz-label{color:var(--u-moss);font:500 11px/1.3 var(--u-mono);letter-spacing:.06em}

/* wanderer: the live preview beside the choices */
.cz-wanderer{display:grid;grid-template-columns:minmax(0,330px) minmax(0,1fr);gap:28px;align-items:start}
.cz-stage{position:sticky;top:0;display:grid;justify-items:center;padding:18px 12px 14px;border:1px solid var(--u-line);background:radial-gradient(ellipse 60% 55% at 50% 48%,#3a3118,#0c0a06 72%)}
#appearancePanel #avatarPreview{display:grid;place-items:center;width:300px;max-width:100%;height:150px;margin:0;background:none}
#appearancePanel #avatarPreview canvas{width:300px;height:150px;max-width:100%;object-fit:contain}
.cz-cap{margin:10px 0 0;color:var(--u-mute);font:400 11px/1.55 var(--u-mono);text-align:center}
.cz-field{display:grid;gap:10px;margin:0 0 18px;padding:0 0 18px;border-bottom:1px solid var(--u-line)}
.cz-field:last-of-type{border-bottom:0}
#appearancePanel .cz-pick{display:inline-flex;align-items:center;gap:10px;margin:0;color:var(--u-mute);font:400 11px/1 var(--u-mono);letter-spacing:.04em;cursor:pointer}
#appearancePanel .cz-pick input[type=color]{width:46px;height:30px;margin:0;padding:2px;border:1px solid var(--u-line2);background:var(--u-field);cursor:pointer}
#appearancePanel .cz-pick.on input[type=color]{outline:2px solid var(--u-tube);outline-offset:2px}
.cz-chips{display:flex;flex-wrap:wrap;gap:8px}
.cz-chip{min-height:40px;padding:0 15px;border:1px solid var(--u-line2);background:var(--u-ink);color:var(--u-cream);font:500 11.5px/1 var(--u-mono);letter-spacing:.06em;text-transform:uppercase;
  transition:background-color var(--u-fast),border-color var(--u-fast),color var(--u-fast)}
.cz-chip:hover{border-color:var(--u-line-hi);background:var(--u-panel2)}
.cz-chip[aria-checked=true]{background:var(--u-sick);color:var(--u-on-sick);border-color:var(--u-sick-hi)}
.cz-chip:focus-visible,#appearancePanel .u-sw:focus-visible,.cz-tabs [role=tab]:focus-visible,#closeAppearance:focus-visible,#appearancePanel button:focus-visible{outline:2px solid var(--u-tube);outline-offset:3px}

/* loadout: choose the device on the left, colour it on the right */
#czLoadout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-areas:"cards parts" "lock parts" "note parts" "beam parts" ". parts";gap:14px 30px;align-items:start}
#appearancePanel #lightCards{grid-area:cards;margin:0;gap:8px}
#appearancePanel #lightCards .lc{grid-template-columns:56px 1fr;gap:4px 12px;padding:10px;border:1px solid var(--u-line2);background:var(--u-ink);color:var(--u-text);font:400 11px var(--u-mono);letter-spacing:.02em}
#appearancePanel #lightCards .lc:hover:not(:disabled){border-color:var(--u-line-hi)}
#appearancePanel #lightCards .lc.on{border-color:var(--u-sick);background:#211b0d;box-shadow:inset 0 0 0 1px var(--u-sick)}
#appearancePanel #lightCards canvas{width:56px;height:56px;background:#090705;border:1px solid var(--u-line)}
#appearancePanel #lightCards b{color:var(--u-cream);font:600 15px/1.05 var(--u-display);letter-spacing:.06em}
#appearancePanel #lightCards small{color:var(--u-mute);font:400 10.5px/1.45 var(--u-mono);letter-spacing:0}
#appearancePanel #lightCards i{margin-top:5px;color:var(--u-sick-hi);font:500 9.5px/1.3 var(--u-mono);letter-spacing:.08em}
#appearancePanel #lightLock{grid-area:lock;margin:0;padding:2px 0 2px 10px;border-left:2px solid var(--u-danger);color:var(--u-danger-hi);font:400 11px/1.55 var(--u-mono);letter-spacing:.02em}
.cz-note{grid-area:note;margin:0;color:var(--u-text);font:400 12px/1.65 var(--u-mono)}
.cz-note b{display:block;margin-bottom:4px;color:var(--u-cream);font:600 17px/1.1 var(--u-display);letter-spacing:.06em;text-transform:uppercase}
.cz-beam{grid-area:beam;display:grid;gap:10px}
#appearancePanel #lightParts{grid-area:parts;margin:0;padding:0;border:0}
#appearancePanel #lightZoom{width:100%;height:170px;margin:0 0 12px;border:1px solid var(--u-line);background:radial-gradient(ellipse 60% 70% at 50% 50%,#3b3218,#0b0905 75%)}
#appearancePanel .lp-head{margin:0 0 8px;color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.08em}
#appearancePanel #lpReset{min-height:32px;padding:0 12px;border:1px solid var(--u-line2);background:var(--u-ink);color:var(--u-cream);font:500 10.5px/1 var(--u-mono);letter-spacing:.08em}
#appearancePanel .lp-fields{grid-template-columns:1fr 1fr;gap:0 18px}
#appearancePanel .lp-fields label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;padding:8px 0;border-bottom:1px solid var(--u-line);color:var(--u-text);font:400 12px/1.3 var(--u-mono);letter-spacing:0}
#appearancePanel .lp-fields input[type=color]{flex:none;width:46px;height:28px;margin:0;padding:2px;border:1px solid var(--u-line2);background:var(--u-field)}

/* the foot: what saving means, and Done */
.cz-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 30px 20px;border-top:1px solid var(--u-line)}
#appearancePanel .appearance-note{margin:0;color:var(--u-mute);font:400 11px/1.5 var(--u-mono);text-align:left}
#appearancePanel #doneAppearance{display:flex;align-items:center;justify-content:center;width:auto;min-width:180px;min-height:50px;margin:0;padding:0 26px;border:1px solid var(--u-sick-hi);background:var(--u-sick);
  color:var(--u-on-sick);font:600 18px/1 var(--u-display);letter-spacing:.14em;text-transform:uppercase}
#appearancePanel #doneAppearance:hover{background:var(--u-sick-hi)}

@media (max-width:760px){
  #appearancePanel{padding:0}
  #appearancePanel .appearance-card.cz{width:100%;max-height:100dvh;height:100dvh;border:0}
  #appearancePanel .cz-head{padding:18px 18px 0}
  .cz-tabs{padding:10px 18px 0}
  .cz-tabs [role=tab]{margin-right:22px}
  .cz-tabs [role=tab] small{display:none}
  #appearancePanel .cz-body{padding:18px}
  .cz-wanderer{grid-template-columns:minmax(0,1fr);gap:18px}
  .cz-stage{position:static}
  #czLoadout{grid-template-columns:minmax(0,1fr);grid-template-areas:"cards" "lock" "note" "beam" "parts"}
  #appearancePanel .lp-fields{grid-template-columns:1fr}
  .cz-foot{padding:12px 18px max(14px,env(safe-area-inset-bottom))}
  #appearancePanel .appearance-note{font-size:10px}
  #appearancePanel #doneAppearance{min-width:120px}
}
@media (max-width:760px),(pointer:coarse){#closeAppearance kbd{display:none}#closeAppearance span{display:inline}}
@media (max-height:640px) and (min-width:761px){#appearancePanel .cz-head{padding-top:18px}.cz-tabs [role=tab] small{display:none}#appearancePanel .cz-body{padding:16px 30px}}

/* ================================================================ QA1 (Q3): the minimal HUD - status, not a dashboard
   During play the screen is the world. What stays: stamina while it changes (bottom left), the dormant health slot above it
   (hidden: the game has no health yet), PAUSE (top right), the game's own contextual hints and the camcorder's viewfinder. What
   goes: the name, the pace, the light's state, the controls strip, the permanent objective, LEVEL 0 / sector, the connection
   line (all still written by the game, only not shown; the objective and the connection are on the pause screen). Coordinates
   are an option, off by default. Where you are arrives as an event: the reveal below. True darkness stays dark: no element
   here lights the world; readability comes from text shadow and the HUD's own colour. */
body:not(.ui-menu) .hud-obj,.location{display:none}
#hud .walk #nameplate,#hud .walk #pace,#hud .walk #lightStatus,#hud .keyline{display:none}
#hud .walk{margin:0}
#hud .walk>span+span{margin-left:0;padding-left:0}
#hud .walk>span+span::before{display:none}
body:not(.ui-paused):not(.ui-menu) #net{display:none}
@media (pointer:fine) and (min-width:701px){body.ui-paused #net{top:30px}}   /* the objective block it sat under is gone */
body:not(.ui-menu) header #sound{display:none}
header:before{display:none}
header .tools button#hudPause{background:#0a0805a6;opacity:.72;transition:opacity var(--u-fast),border-color var(--u-fast),color var(--u-fast)}
header .tools button#hudPause:hover,header .tools button#hudPause:focus-visible{opacity:1}
#hud::before{inset:-34px -70px -26px -40px;background:radial-gradient(ellipse 75% 85% at 18% 80%,#0403029e,#0000 72%);opacity:0;transition:opacity .9s ease}
body.stam-on #hud::before,#hud:has(.hud-hp:not([hidden]))::before{opacity:1}

/* stamina: appears the moment it changes, stays while below full, fades a moment after it is full again */
#hud .walk>.staminaHud{gap:10px;opacity:0;transform:translateY(4px);transition:opacity 1.1s ease,transform 1.1s ease;color:var(--hd);font:500 10px/1 var(--u-mono);letter-spacing:.22em;text-shadow:0 1px 6px #000d}
body.stam-on #hud .walk>.staminaHud{opacity:1;transform:none;transition-duration:.25s}
#hud .staminaHud #staminaText{display:none}
.staminaHud i{width:150px!important;height:4px!important;border:0!important;background:#ffffff1f!important;box-shadow:0 1px 6px #000c}
.staminaHud em{background:var(--hv)!important;transition:width .12s linear,background-color .4s ease}
body[data-stam=low] #hud .staminaHud{color:var(--u-danger-hi)}
.staminaHud em[data-lv=low]{background:var(--u-danger-hi)!important}
body[data-stam=low].stam-on #hud .staminaHud i{height:5px!important}
/* the dormant health slot: the same family, above stamina; hidden until the game gives it a real value */
.hud-hp{display:grid;gap:7px;margin:0 0 14px;color:var(--hd);font:500 10px/1 var(--u-mono);letter-spacing:.22em;text-shadow:0 1px 6px #000d}
.hud-hp[hidden]{display:none}
.hud-hp span{text-transform:uppercase}
.hud-hp i{display:block;width:150px;height:4px;background:#ffffff1f;overflow:hidden}
.hud-hp em{display:block;height:100%;width:100%;background:var(--hv)}
.hud-hp[data-lv=full]{opacity:.45}
.hud-hp[data-lv=low] em{background:var(--u-danger-hi)}
.hud-hp[data-lv=low] span{color:var(--u-danger-hi)}

/* coordinates, when switched on: one quiet line, bottom right */
.coordinates span:last-child{display:none}
.coordinates{gap:0}

/* the reveal: THRESHOLD / LEVEL 0 as a run begins (with the objective and, if wanted, a line of keys); a part of the level's name
   as you walk into it. High in the frame, never in the centre; it fades. The HUD settings reach it too: size (within limits, so
   LEVEL 0 still fits a phone), opacity, and a custom colour for the name (the default look is unchanged). */
.hud-reveal{position:fixed;left:50%;top:max(15vh,72px);z-index:12;display:grid;justify-items:center;gap:10px;width:min(92vw,980px);pointer-events:none;text-align:center;
  --rvs:clamp(.8,var(--hs,1),1.2);transform-origin:50% 0;
  transform:translate(-50%,8px) scale(var(--rvs));opacity:0;transition:opacity 1.2s ease,transform 1.6s var(--u-ease)}
.hud-reveal[hidden]{display:none}
.hud-reveal.in{opacity:var(--ho,1);transform:translate(-50%,0) scale(var(--rvs));transition-duration:.8s,1.2s}
.hud-reveal>[hidden]{display:none}
.hud-reveal::before{content:"";position:absolute;inset:-40px -60px;z-index:-1;background:radial-gradient(closest-side,#030201a8,#03020100)}
.rv-eye{color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.42em;padding-left:.42em;text-transform:uppercase;text-shadow:0 1px 6px #000}
.rv-title{color:#efe3b4;font:600 clamp(40px,6.4vw,84px)/1 var(--u-display);letter-spacing:.34em;padding-left:.34em;text-transform:uppercase;
  text-shadow:0 2px 0 #000,0 0 22px #000c}   /* no glow: in true darkness the name may darken what is behind it, never light it */
body.hudc .rv-title{color:var(--hc)}
.rv-sub{color:var(--u-cream);font:500 13px/1.4 var(--u-mono);letter-spacing:.06em;text-shadow:0 1px 8px #000}
.rv-sub::before{content:"";display:block;width:56px;height:1px;margin:2px auto 12px;background:var(--u-line-hi)}
.rv-keys{color:var(--u-mute);font:400 11px/1.5 var(--u-mono);letter-spacing:.06em;white-space:pre-wrap;text-shadow:0 1px 6px #000}
.hud-reveal.sector{top:max(11vh,64px);gap:6px}
.hud-reveal.sector .rv-eye{font-size:10px}
.hud-reveal.sector .rv-title{font-size:clamp(20px,2.4vw,30px);letter-spacing:.22em;padding-left:.22em}
body.captured .hud-reveal{display:none}

/* the pause screen keeps what left the HUD: the objective (and the connection line above it, 3C) */
.pz-obj{display:grid;gap:6px;margin:0 0 18px;padding:12px 0;border-top:1px solid var(--u-line);border-bottom:1px solid var(--u-line)}
.pz-obj small{color:var(--u-moss);font:500 10.5px/1 var(--u-mono);letter-spacing:.2em;text-transform:uppercase}
.pz-obj b{color:var(--u-cream);font:600 19px/1.1 var(--u-display);letter-spacing:.08em;text-transform:uppercase}
.pz-keys{position:relative}
.pz-keys #pzKeys{position:absolute;top:-8px;right:0;min-height:32px;padding:0 10px;font-size:10px}

/* Settings > Controls: the key slots */
.us-keys.kb{grid-template-columns:1fr auto;column-gap:0;align-items:stretch}
.us-keys.kb>span{display:flex;flex-direction:column;justify-content:center;padding-right:16px}
.us-keys.kb>.kb-pair{flex-direction:row;align-items:center;padding-right:0}
.us-keys.kb>span small{display:block;margin-top:3px;color:var(--u-mute);font-size:10.5px}
.kb-pair{display:flex;gap:6px;justify-content:flex-end}
.kb-pair b{min-width:66px;padding:8px 10px;text-align:center;color:var(--u-moss);border:1px dashed var(--u-line);font:500 11px/1 var(--u-mono)}
.kb-slot{min-width:66px;min-height:34px;margin:0;padding:0 10px;border:1px solid var(--u-line2);border-radius:0;background:var(--u-field);color:var(--u-cream);font:500 12px/1 var(--u-mono);letter-spacing:.04em;
  transition:border-color var(--u-fast),background-color var(--u-fast),color var(--u-fast)}
.kb-slot:hover{border-color:var(--u-line-hi);color:#fff8de}
.kb-slot:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:2px}
.kb-slot.empty{color:var(--u-mute);border-style:dashed}
.kb-slot.cap{border-color:var(--u-sick);background:#2a2310;color:var(--u-sick-hi)}
.kb-msg{min-height:20px;margin:14px 0 0;color:var(--u-moss);font:400 11.5px/1.6 var(--u-mono)}
.kb-msg.warn{color:var(--u-cream)}
.kb-msg .u-btn{min-height:32px;margin:6px 6px 0 0;padding:0 12px;font-size:10.5px}
.us-prev .pv-rv{color:var(--hv,#f3e7a7);font:600 calc(16px * var(--ps,1))/1 var(--u-display);letter-spacing:.3em}
.us-prev .pv-st{display:inline-flex;align-items:center;gap:8px}

@media (pointer:coarse),(max-width:700px){
  #hud{top:calc(16px + env(safe-area-inset-top));bottom:auto;left:max(16px,env(safe-area-inset-left))}   /* touch: the stick owns the lower left, so status sits high on the left */
  .staminaHud i,.hud-hp i{width:110px!important}
  .hud-reveal{top:max(12vh,64px)}
  .rv-title{font-size:clamp(34px,11vw,56px)}
  .hud-reveal.sector .rv-title{font-size:18px}
  .pz-keys #pzKeys{position:static;margin:0 0 6px}
}

/* ================================================================ QA1 (Q4): the touch stick, the action buttons, safe areas
   The four-way pad is gone from view (kept in the page: the game binds its buttons at start); a floating stick takes the lower
   left. The actions stay on the right, bigger, run and crouch at the thumb. Everything keeps clear of notches, rounded corners
   and the home indicator (env(safe-area-inset-*); the page asks for the whole screen with viewport-fit=cover). */
#touch .dpad{display:none}
.stick-zone{display:none}
@media (pointer:coarse){
  body.playing #touch{pointer-events:none;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));
    grid-template-columns:auto minmax(0,1fr) repeat(2,68px);gap:10px}
  body.playing #touch>button{pointer-events:auto}
  #touch>button{min-height:56px}
  #touch [data-key=ShiftLeft],#touch [data-key=KeyC]{min-height:68px}
  body.playing{--touch-h:156px}
  body.playing.cam-kind{--touch-h:276px}
  /* the stick's zone: the lower left, clear of the buttons and of the status at the top */
  body.playing .stick-zone{display:block;position:fixed;left:0;bottom:0;width:52vw;height:56vh;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
  .stick-base{position:absolute;left:var(--sx,calc(max(16px,env(safe-area-inset-left)) + 70px));top:var(--sy,calc(100% - max(16px,env(safe-area-inset-bottom)) - 82px));
    width:124px;height:124px;margin:-62px 0 0 -62px;border-radius:50%;border:1px solid #ece4c63d;background:radial-gradient(circle,#0c0a0629 0,#0c0a0666 70%);
    opacity:.2;transition:opacity .45s ease}
  .stick-zone.on .stick-base{opacity:1;transition-duration:.06s}
  .stick-knob{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;border-radius:50%;border:1px solid #f7eab07a;background:#ece4c647;box-shadow:0 2px 10px #0009}
  .stick-zone.on .stick-knob{background:#f2d9875e;border-color:#f7eab0b3}
  /* safe areas for everything else that touches an edge */
  header{top:max(14px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
  #dialog,#caught,#won,#runMenu{padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
  #dialog{padding-top:max(44px,env(safe-area-inset-top))}
  #inventory{top:calc(96px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left))}
  #encounterHint{bottom:calc(var(--touch-h,0px) + 26px + env(safe-area-inset-bottom))}
  #blackoutHint{bottom:calc(var(--touch-h,0px) + 74px + env(safe-area-inset-bottom))}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:520px){
  body.playing #touch{grid-template-columns:auto minmax(0,1fr) repeat(4,62px)}
  #touch [data-key=ShiftLeft],#touch [data-key=KeyC]{min-height:58px}
  #touch>button{min-height:52px}
  body.playing .stick-zone{width:46vw;height:74vh}
  .stick-base{width:112px;height:112px;margin:-56px 0 0 -56px;top:var(--sy,calc(100% - max(12px,env(safe-area-inset-bottom)) - 70px));left:var(--sx,calc(max(16px,env(safe-area-inset-left)) + 66px))}
  body.playing,body.playing.cam-kind{--touch-h:122px}
}
/* customize: a framed panel on wide screens, the whole screen on narrow ones (as the first candidate), inside the safe area */
@media (pointer:coarse) and (min-width:761px){#appearancePanel{padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}}
@media (max-width:760px){
  #appearancePanel{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
  #appearancePanel .appearance-card.cz{height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
/* sheets: their head and body stay inside the safe area too */
.us-head{padding-top:max(34px,calc(env(safe-area-inset-top) + 14px));padding-right:max(36px,calc(env(safe-area-inset-right) + 16px))}
.us-body{padding-right:max(36px,calc(env(safe-area-inset-right) + 16px));padding-bottom:calc(48px + env(safe-area-inset-bottom))}
@media (max-width:640px){.us-head{padding-top:max(22px,calc(env(safe-area-inset-top) + 10px));padding-right:max(18px,calc(env(safe-area-inset-right) + 12px))}.us-body{padding-right:max(18px,calc(env(safe-area-inset-right) + 12px))}}

/* ---------------------------------------------------------------- post-3H Trial 2: the chats (assets/chat.js; docs/architecture/CHAT.md)
   MENU, the lounge: on a wide screen a panel at the lower right, under the utility rail and above the corner (the left rail is you, this
   is everyone else); foldable to its title. Smaller screens: a Lounge button at the end of the left rail opens it over the menu, the
   full width of a phone held upright, the right side of one on its side. It arrives with the utility rail when the menu enters.
   IN LEVEL, nearby: the bubbles over the speakers (or a small hint at the edge for a speaker off screen), the composer, its toast, and
   on touch screens a SAY button. Quiet: no motion but a short fade as a bubble ends, none with reduced motion; every text is plain. */
/* (Trial 3 R26 A, the owner's R26 V2 master prompt and the pack's 03_XP_MESSENGER_LOUNGE.md; not owner-approved) the lounge as a small
   chat application from the early 2000s, out of place on the menu on purpose: a bright cobalt title bar (an original glyph of two
   speech balloons, "The Far Backrooms - Lounge", a minimize / restore key, or close on the sheet), a warm grey window face with a working
   menu row (File, View, Help: chat.js), a white transcript with coloured names and plain dark text, a field and Send, and a status bar
   whose light and words are the connection's real state.  Original CSS and one small inline SVG: no operating system's artwork, icons,
   wallpaper or font files (the type is whatever sans-serif of that era the device has: Tahoma, Segoe UI, Verdana, DejaVu Sans).  This
   look is the lounge's alone (and its rail button's); the menu and every other part of the game keep theirs.  It replaces R25 O's
   terminal look only: the place, the size, the roll (260 / 220 ms), the socket, the counts, the mutes and the keys are R25's.  */
#lounge,#menu .mm-lounge{--xp-font:Tahoma,"Segoe UI",Verdana,"DejaVu Sans","Bitstream Vera Sans",Geneva,sans-serif;
  --xp-face:#ece9d8;--xp-edge:#aca899;--xp-dark:#716f64;--xp-line:#7f9db9;--xp-ink:#000;--xp-soft:#4b4a43;--xp-sel:#316ac5;
  --xp-t1:#3d86f2;--xp-t2:#1d5ddb;--xp-t3:#1550cc;--xp-t4:#0e3ea8;--xp-frame:#1a52cf;--xp-outer:#0a2a82;
  --xp-on:#2fa84f;--xp-wait:#d89a1c;--xp-down:#cf3a24;--xp-off:#8d8b80;font-family:var(--xp-font)}
.lg{display:none}
#lounge button,#menu .mm-lounge{transition:none}
#menu .mm-lounge{display:inline-flex;align-items:center;gap:7px;min-height:34px;margin:8px 0 0;padding:0 12px 0 8px;border:1px solid var(--xp-outer);border-radius:3px;
  background:linear-gradient(180deg,#4a8ff5 0,var(--xp-t2) 45%,var(--xp-t3) 100%);color:#fff;box-shadow:inset 1px 1px 0 #ffffff59;font:700 12px/1 var(--xp-font);
  letter-spacing:0;text-shadow:1px 1px 0 #0a246a;cursor:pointer}
.mm-lounge-k{color:#fff;font-weight:700}
.mm-lounge-n{color:#dce8ff;font-weight:400}
.mm-lounge-n:empty{display:none}
#menu .mm-lounge.on{background:linear-gradient(180deg,#1846b4 0,#1d55cf 100%);box-shadow:inset 1px 1px 2px #00000080}
#menu .mm-lounge:focus-visible{outline:2px solid #fff;outline-offset:2px}
.mm-lounge .lg-badge{min-width:16px;height:16px;padding:0 4px;border:1px solid #8a4b00;border-radius:2px;background:#f7a33b;color:#000;font:700 10px/14px var(--xp-font);font-style:normal;text-align:center;text-shadow:none}
.mm-lounge .lg-led{width:8px;height:8px;border-radius:50%}
.lg-glyph{flex:none;display:block;width:16px;height:16px}
.mm-lounge .lg-glyph{width:16px;height:16px}
/* the window: its outer edge, the title bar, then the face; a blue frame round the face (left, right, bottom) */
.lg:is(.lg-sheet,.lg-out){display:flex;flex-direction:column;position:fixed;z-index:35;left:var(--sl);right:var(--sr);bottom:var(--sb);height:min(68vh,560px);
  border:1px solid var(--xp-outer);background:var(--xp-frame);box-shadow:0 20px 70px #000c}
@media (max-height:560px){.lg:is(.lg-sheet,.lg-out){left:auto;top:var(--st);height:auto;width:min(440px,calc(100vw - var(--sl) - var(--sr)))}}
@media (min-width:1180px) and (min-height:620px){
  #menu .mm-lounge{display:none}
  .lg{position:absolute;right:var(--sr);bottom:calc(var(--sb) + 96px);display:flex;flex-direction:column;width:var(--railw);
    height:min(420px,calc(100% - var(--st) - 4 * var(--uw) - 24px - var(--sb) - 96px));border:1px solid var(--xp-outer);background:var(--xp-frame);box-shadow:3px 4px 0 #00000059}
  .lg.lg-folded{height:auto}
  .lg.lg-folded .lg-body{display:none}
}
/* the roll (chat.js): the window's edge uncovers or covers the face, which keeps its full size meanwhile; the sheet stays drawn while it
   rolls away (inert) */
.lg.lg-anim{overflow:hidden;overflow:clip}                         /* (clip: not a scroll box - focusing the field cannot scroll the title bar away) */
.lg.lg-anim .lg-body{flex:none;height:var(--lg-bh,auto)}
.lg.lg-folded.lg-anim .lg-body{display:flex}
#menu.mm-intro .lg{opacity:0}
#menu.mm-intro.mm-go .lg{opacity:1;animation:mmArriveR .55s cubic-bezier(.2,.7,.2,1) .66s both}
html.rm #menu.mm-intro.mm-go .lg{animation:mmFade .18s ease .3s both!important}
/* the title bar */
.lg-head{flex:none;display:flex;flex-direction:column}
.lg-bar{display:flex;align-items:center;gap:5px;height:25px;padding:0 3px 0 5px;background:linear-gradient(180deg,var(--xp-t1) 0,var(--xp-t2) 12%,var(--xp-t3) 55%,var(--xp-t4) 100%);
  box-shadow:inset 0 1px 0 #8fbaff,inset 1px 0 0 #5e97f3}
#menu .lg-head h2{flex:1;min-width:0;margin:0;overflow:hidden;white-space:nowrap;display:flex;align-items:center;gap:6px}
.lg-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;color:#fff;font:700 12px/25px var(--xp-font);letter-spacing:0;text-shadow:1px 1px 0 #0a246a}
.lg-unread{flex:none;padding:1px 5px;border:1px solid #8a4b00;border-radius:2px;background:#f7a33b;color:#000;font:700 10px/12px var(--xp-font);white-space:nowrap;text-shadow:none}
.lg-unread[hidden]{display:none}
#menu .lg-fold{flex:none;display:grid;place-items:center;width:21px;height:21px;min-height:0;margin:0;padding:0;border:1px solid #fff;border-radius:3px;
  background:linear-gradient(180deg,#5d9cf8 0,#2a68e2 50%,#1f58d2 100%);color:#fff;box-shadow:inset -1px -1px 0 #0f3ca5;cursor:pointer}
#menu .lg-fold:active{background:linear-gradient(180deg,#1a4ec0 0,#2a62da 100%);box-shadow:inset 1px 1px 0 #0b2f86}
.lg:is(.lg-sheet,.lg-out) .lg-fold{background:linear-gradient(180deg,#ee8a69 0,#d9542d 50%,#c24019 100%);box-shadow:inset -1px -1px 0 #8e2a0c}
.lg-fold-i{position:relative;display:block;width:11px;height:11px}
.lg-fold-i::before,.lg-fold-i::after{content:"";position:absolute;left:1px;width:7px;bottom:1px;height:3px;background:currentColor}
.lg-fold-i::after{content:none}
.lg-folded .lg-fold-i::before{top:1px;left:1px;right:1px;bottom:1px;width:auto;height:auto;border:1px solid currentColor;border-top-width:3px;background:none}
.lg:is(.lg-sheet,.lg-out) .lg-fold-i::before,.lg:is(.lg-sheet,.lg-out) .lg-fold-i::after{content:"";left:0;right:0;width:auto;top:4px;bottom:auto;height:2px;border:0;background:currentColor;rotate:45deg}
.lg:is(.lg-sheet,.lg-out) .lg-fold-i::after{rotate:-45deg}
/* the face */
.lg-body{display:flex;flex:1;min-height:0;flex-direction:column;margin:0;border:3px solid var(--xp-frame);border-top:0;background:var(--xp-face);color:var(--xp-ink)}
/* the menu row and its menus (chat.js: each one a real action; arrows, Home, End, Esc and Tab as menus have them) */
.lg-mbar{position:relative;z-index:2;flex:none;display:flex;gap:0;height:21px;padding:1px 2px 0;border-bottom:1px solid var(--xp-edge);box-shadow:0 1px 0 #fff}
.lg-mw{position:relative}
#menu .lg-mi{min-height:0;height:19px;margin:0;padding:0 7px;border:0;border-radius:0;background:none;color:var(--xp-ink);font:400 11px/19px var(--xp-font);letter-spacing:0;text-transform:none;cursor:default}
#menu .lg-mi[aria-expanded=true]{background:var(--xp-sel);color:#fff}
@media (hover:hover){#menu .lg-mi:hover{background:var(--xp-sel);color:#fff}}
.lg-pop{position:absolute;z-index:3;top:100%;left:0;min-width:184px;padding:2px;border:1px solid var(--xp-edge);background:#fff;box-shadow:2px 2px 0 #0000004d;list-style:none;margin:0}
.lg-pop[hidden]{display:none}
#menu .lg-pi{display:block;width:100%;min-height:0;margin:0;padding:3px 18px 3px 20px;border:0;border-radius:0;background:none;color:var(--xp-ink);font:400 11px/16px var(--xp-font);letter-spacing:0;text-align:left;text-transform:none;white-space:nowrap;cursor:default}
#menu .lg-pi:focus{outline:none;background:var(--xp-sel);color:#fff}
@media (hover:hover){#menu .lg-pi:not([aria-disabled=true]):hover{background:var(--xp-sel);color:#fff}}
#menu .lg-pi[aria-disabled=true]{color:#aca899}
#menu .lg-pi[aria-disabled=true]:focus{background:#d8d4c4;color:#8d8b80}
.lg-sep{height:1px;margin:3px 1px;background:var(--xp-edge)}
/* the transcript */
#menu .lg-log{flex:1;min-height:0;margin:4px 4px 0;padding:3px 6px 2px;overflow:auto;list-style:none;border:1px solid var(--xp-line);background:#fff;
  scrollbar-width:thin;scrollbar-color:#c3c0b0 #f2f0e6;overscroll-behavior:contain}
#menu .lg-log li{margin:0 0 3px;color:var(--xp-ink);font:400 12px/16px var(--xp-font);overflow-wrap:anywhere}
.lg-big .lg-log li{font-size:14px;line-height:19px}
#menu .lg-who{display:inline;margin:0 4px 0 0;padding:0;border:0;border-radius:0;background:none;color:#1f4fa8;font:inherit;font-weight:700;line-height:inherit;letter-spacing:0;text-align:left;text-transform:none;cursor:pointer}
#menu .lg-who::after{content:":";color:var(--xp-ink);font-weight:700}
#menu span.lg-who{cursor:default}
#menu .lg-c0 .lg-who{color:#b3261e}#menu .lg-c1 .lg-who{color:#1d55c4}#menu .lg-c2 .lg-who{color:#7a35a8}#menu .lg-c3 .lg-who{color:#0d7a37}
#menu .lg-c4 .lg-who{color:#a14f00}#menu .lg-c5 .lg-who{color:#b0145a}#menu .lg-c6 .lg-who{color:#006f79}#menu .lg-c7 .lg-who{color:#5e5700}
#menu .lg-own .lg-who{color:#00006e}
@media (hover:hover){#menu button.lg-who:hover{text-decoration:underline}}
.lg-text{color:var(--xp-ink)}
#menu .lg-sys{color:#5f5d55}
#menu .lg-sys::before{content:"* "}
#menu .lg-undo{margin:0;padding:0 2px;border:0;background:none;color:#1d4fb0;font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
#menu .lg-note{margin:0;padding:3px 6px 0;color:var(--xp-soft);font:400 11px/14px var(--xp-font)}
#menu .lg-note:empty{display:none}
/* the field and Send */
.lg-form{display:flex;align-items:stretch;gap:4px;padding:4px}
#menu .lg-input{flex:1;min-width:0;height:24px;margin:0;padding:0 5px;border:1px solid var(--xp-line);border-radius:0;background:#fff;color:var(--xp-ink);caret-color:#000;font:400 12px/1 var(--xp-font);letter-spacing:0;text-transform:none}
#menu .lg-input::placeholder{color:#7a786e;opacity:1}
#menu .lg-input:disabled{background:#f4f3ee;color:#8d8b80}
#menu .lg-input:focus{outline:none;border-color:#3c6fd1;box-shadow:inset 0 0 0 1px #9ebef5}
#menu .lg-send,#menu .lg-on{flex:none;min-width:62px;height:24px;min-height:0;margin:0;padding:0 10px;border:1px solid #003c74;border-radius:3px;
  background:linear-gradient(180deg,#fff 0,#f4f3ee 60%,#e3dfd2 100%);color:var(--xp-ink);font:400 11px/1 var(--xp-font);letter-spacing:0;text-transform:none;text-decoration:none;cursor:pointer}
#menu .lg-send:disabled{border-color:#c9c7ba;background:#f4f3ee;color:#aca899;cursor:default}
@media (hover:hover){#menu :is(.lg-send:not(:disabled),.lg-on):hover{box-shadow:inset 0 0 0 2px #f6c45d}#menu .lg-fold:hover{filter:brightness(1.12)}}
#menu :is(.lg-send,.lg-on):active{background:linear-gradient(180deg,#e3dfd2 0,#f4f3ee 100%)}
.lg-tools{display:flex;justify-content:space-between;gap:8px;padding:0 4px 3px}
#menu .lg-tool{min-height:22px;margin:0;padding:0 2px;border:0;border-radius:0;background:none;color:#1d4fb0;font:400 11px/1 var(--xp-font);letter-spacing:0;text-transform:none;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
#menu .lg-tools .lg-tool:last-child{margin-left:auto}
.lg-offbox{flex:1;padding:14px 10px;border:1px solid var(--xp-line);margin:4px;background:#fff}
#menu .lg-offbox p{margin:0 0 10px;color:var(--xp-ink);font:400 12px/17px var(--xp-font)}
/* the status bar: the connection's light and its state in words, who is here */
.lg-sbar{flex:none;display:flex;gap:2px;height:20px;padding:2px 2px 1px;border-top:1px solid var(--xp-edge);box-shadow:inset 0 1px 0 #fff}
.lg-sp{display:flex;align-items:center;gap:5px;min-width:0;padding:0 5px;border:1px solid;border-color:var(--xp-edge) #fff #fff var(--xp-edge);color:var(--xp-ink);font:400 11px/1 var(--xp-font);white-space:nowrap}
.lg-sp:first-child{flex:1;overflow:hidden}
.lg-sp:empty{display:none}
.lg-state{overflow:hidden;text-overflow:ellipsis}
.lg-count{font-variant-numeric:tabular-nums}
.lg-led{flex:none;display:block;width:8px;height:8px;border-radius:50%;background:var(--xp-off);box-shadow:inset 0 0 0 1px #0000004d}
.lg[data-state=online] .lg-led,.mm-lounge[data-state=online] .lg-led{background:var(--xp-on)}
.lg[data-state=connecting] .lg-led,.mm-lounge[data-state=connecting] .lg-led{background:var(--xp-wait)}
.lg[data-state=down] .lg-led,.mm-lounge[data-state=down] .lg-led{background:var(--xp-down)}
/* focus: the period's dotted rectangle, and a ring the eye can find */
#menu :is(.lg-send,.lg-tool,.lg-who,.lg-undo,.lg-on,.lg-mi):focus-visible{outline:1px dotted #000;outline-offset:1px}
#menu .lg-mi:focus-visible{outline-offset:-2px}
#menu .lg-fold:focus-visible{outline:2px solid #fff;outline-offset:1px}
#menu .lg-log:focus-visible{outline:1px dotted #000;outline-offset:-3px}
@media (pointer:coarse){.lg-bar{height:30px}.lg-name{font-size:13px;line-height:30px}#menu .lg-fold{width:34px;height:26px}.lg-mbar{height:30px}#menu .lg-mi{height:28px;font-size:13px;line-height:28px}#menu .lg-input{font-size:16px;height:32px}#menu .lg-send{height:32px}#menu .lg-mi{padding:0 10px}#menu .lg-pi{padding:9px 18px 9px 20px;font-size:13px}#menu .lg-log li{font-size:13px;line-height:18px}}

/* in a run: the bubbles */
.chat-layer{position:fixed;inset:0;z-index:4;overflow:hidden;pointer-events:none}
.bb{position:absolute;left:0;top:0;max-width:240px;padding:6px 10px 7px;border:1px solid var(--u-line2);background:#0b0906ea;color:var(--u-cream);
  font:400 12.5px/1.45 var(--u-mono);overflow-wrap:anywhere;box-shadow:0 6px 18px #000a;transition:opacity .4s ease}   /* it appears at once; it fades out over its last 0.4 s */
.bb.bb-own{border-color:#e3c76899}
.bb.bb-big{max-width:300px;font-size:15px}
.bb.bb-on::after{content:"";position:absolute;left:calc(50% - 5px);bottom:-6px;width:9px;height:9px;border:inherit;border-top:0;border-left:0;background:inherit;transform:rotate(45deg)}
.bb-arrow{display:none}
.bb.bb-hint{display:flex;align-items:center;gap:8px;max-width:210px;padding:5px 9px 5px 7px;opacity:.86;font-size:11px}
.bb.bb-hint.bb-big{max-width:260px;font-size:13px}
.bb.bb-hint .bb-arrow{display:block;flex:none;width:0;height:0;border:5px solid transparent;border-left:8px solid var(--u-sick-hi);border-right:0}
.bb.bb-out{opacity:0}
html.rm .bb{transition:none}
/* post-Trial 4 chat polish (C3): a typed-out line is one flow, its written part then the rest laid out but invisible, so the bubble's
   size and line breaks never move while it writes.  (Trial 3 R20, Nearby chat polish: the edge hint wraps its whole line too - it was
   cut to one line with an ellipsis, so a speaker off screen never had their line read whole) */
.bb-yet{visibility:hidden}
.bb.bb-hint .bb-line{display:block;min-width:0}

/* in a run: the composer, its options, its toast; SAY on touch screens */
.say{position:fixed;z-index:16;left:50%;bottom:calc(var(--touch-h,0px) + 92px);display:flex;align-items:stretch;width:min(580px,calc(100vw - 32px));transform:translateX(-50%);
  border:1px solid var(--u-sick);background:#0d0b07f5;box-shadow:0 18px 60px #000d;color:var(--u-text);font-family:var(--u-mono)}
.say[hidden]{display:none}
.say-scope{display:flex;align-items:center;flex:none;padding:0 12px;border-right:1px solid var(--u-line2);background:#1b160c;color:var(--u-sick-hi);font:600 12px/1 var(--u-mono);letter-spacing:.06em}
.say-input{flex:1;min-width:0;height:44px;margin:0;padding:0 12px;border:0;border-radius:0;background:none;color:#fff4cf;font:400 14px/1 var(--u-mono)}
.say-input::placeholder{color:#8f8668;opacity:1}
.say-input:focus{outline:none}
.say-go,.say-more{flex:none;margin:0;padding:0 14px;border:0;border-left:1px solid var(--u-line2);border-radius:0;background:none;color:var(--u-cream);font:600 11.5px/1 var(--u-mono);letter-spacing:.06em;cursor:pointer}
.say-go{background:var(--u-sick);color:var(--u-on-sick);text-transform:uppercase}
.say-more{color:var(--u-moss);font-weight:500}
.say :is(.say-go,.say-more,.say-opt):focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:-3px}
.say-opts{position:absolute;left:-1px;right:-1px;bottom:calc(100% + 6px);display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-height:50vh;overflow:auto;padding:10px 12px;border:1px solid var(--u-line2);background:#0d0b07f8}
.say-opts[hidden]{display:none}
.say-opt{min-height:32px;margin:0;padding:0 4px;border:0;background:none;color:var(--u-cream);font:500 12px/1.3 var(--u-mono);text-align:left;text-decoration:underline;text-decoration-color:var(--u-line2);text-underline-offset:4px;cursor:pointer}
.say-opt[aria-pressed=true]{color:var(--u-sick-hi)}
.say-opt-h{margin:8px 0 2px 4px;color:var(--u-moss-dim);font:400 10.5px/1.4 var(--u-mono)}
.say-toast{position:fixed;z-index:16;left:50%;bottom:calc(var(--touch-h,0px) + 150px);max-width:calc(100vw - 32px);margin:0;padding:7px 12px;transform:translateX(-50%);border:1px solid var(--u-line2);background:#0d0b07f0;color:var(--u-cream);font:500 12px/1.4 var(--u-mono);pointer-events:none}
.say-toast[hidden]{display:none}
@media (pointer:coarse){
  .say{top:max(12px,env(safe-area-inset-top));bottom:auto}
  .say-opts{top:calc(100% + 6px);bottom:auto}
  .say-toast{top:calc(max(12px,env(safe-area-inset-top)) + 58px);bottom:auto}
}

/* post-Trial 4 chat polish (C1): the chat icon, low on the right, in place of Trial 4's bottom-centre hint and Trial 2's touch SAY.
   Quiet like the pause button (dim until hovered or focused); its key as a small cap beside it on keyboard screens; a short label
   above it on hover or focus.  Desktop: the corner the coordinates use (lifted over them when they are on), scaled with the HUD.
   Touch: a 48 px square just above the right-hand action buttons, inside the safe area. */
.chat-icon{position:fixed;z-index:6;right:35px;bottom:25px;display:inline-flex;align-items:center;gap:8px;height:34px;margin:0;padding:0 9px 0 8px;
  border:1px solid var(--u-line2);border-radius:0;background:#0a0805a6;color:var(--u-cream);opacity:.72;cursor:pointer;
  transform:scale(var(--hs,1));transform-origin:right bottom;transition:opacity var(--u-fast),border-color var(--u-fast),color var(--u-fast);-webkit-tap-highlight-color:transparent}
.chat-icon[hidden]{display:none}
body:not(.hud-nocoords) .chat-icon{bottom:74px}
.chat-icon svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.chat-icon svg circle{fill:currentColor;stroke:none}
.chat-icon-k{padding:3px 5px;border:1px solid var(--u-line2);color:var(--u-moss);font:500 9.5px/1 var(--u-mono);letter-spacing:.04em;white-space:nowrap}
.chat-icon-tip{position:absolute;right:0;bottom:calc(100% + 6px);padding:4px 7px;border:1px solid var(--u-line2);background:#0d0b07f0;color:var(--u-cream);
  font:500 10.5px/1.2 var(--u-mono);letter-spacing:.04em;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity var(--u-fast)}
.chat-icon:hover,.chat-icon:focus-visible{opacity:1;border-color:var(--u-line-hi);color:#fff8de;background:#1b160cd9}
.chat-icon:hover .chat-icon-tip,.chat-icon:focus-visible .chat-icon-tip{opacity:1}
.chat-icon:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:3px}
@media (pointer:coarse){
  .chat-icon{right:max(16px,env(safe-area-inset-right));bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--touch-h,0px) + 12px);
    justify-content:center;width:48px;height:48px;padding:0;opacity:.85;background:#0c0a06c7;transform:none}
  body:not(.hud-nocoords) .chat-icon{bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--touch-h,0px) + 12px)}
  .chat-icon svg{width:22px;height:22px}
  .chat-icon-k,.chat-icon-tip{display:none}
  .chat-icon:active{background:var(--u-sick);color:var(--u-on-sick);border-color:var(--u-sick-hi);opacity:1}
  /* the passing hints stay clear of the icon's column while it is shown */
  body.chat-icon-on :is(#encounterHint,#blackoutHint){max-width:calc(100vw - 2 * (max(16px,env(safe-area-inset-right)) + 56px))}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:520px){
  /* a phone on its side: on the bottom row, just left of the action buttons (four 62 px columns, 10 px apart), clear of the stick */
  .chat-icon,body:not(.hud-nocoords) .chat-icon{right:calc(max(16px,env(safe-area-inset-right)) + 4 * 62px + 3 * 10px + 12px);bottom:max(16px,env(safe-area-inset-bottom))}
}

/* Trial 4 — sender-owned, server-sanitized speech accents. Text remains cream on a dark substrate. */
.bb{border-color:var(--bb-accent,#e3c768);background:#0b0906f2;color:#f6eed9}
.bb.bb-own{border-color:var(--bb-accent,#e3c768)}
.bb.bb-hint .bb-arrow{border-left-color:var(--bb-accent,#e3c768)}

/* Trial 4 — additive RGB channels beside existing pickers. */
.rgb-trio{display:grid;gap:5px;min-width:0;width:100%;padding:8px 10px;margin:8px 0 12px;
  border:1px solid var(--u-line2,#555);background:#0b0905b5;color:var(--u-cream,#eee)}
.rgb-trio legend{padding:0 5px;font:600 10px/1.4 var(--u-mono,monospace);letter-spacing:.1em}
.rgb-channel{display:grid;grid-template-columns:42px minmax(72px,1fr) 33px;align-items:center;gap:9px;
  font:500 11px/1.4 var(--u-mono,monospace)}
.rgb-channel input{width:100%;min-width:0;accent-color:#b5c793;cursor:pointer}
/* post-Trial 4 review: the game's own field style (.appearance-fields input: 42 px tall, a margin, padding, a border and a field
   background) reached these sliders in Customize; a slider is drawn as a slider there as in Settings */
.rgb-channel input[type=range]{height:auto;margin:0;padding:0;border:0;background:none}
.rgb-channel output{min-width:0;text-align:right;font-variant-numeric:tabular-nums}   /* (post-Trial 4 review: Settings' .us-row output is 44 px wide; the column is 33) */
/* pre-Trial 3 polish P4: each channel's number is a field you can type in (0-255), beside its slider; the browser's colour chooser is no
   way in any more - the picker stays in the page as the game's adapter, out of sight, and "Custom" shows the colour in effect */
.rgb-channel{grid-template-columns:42px minmax(72px,1fr) 54px}
.rgb-channel input.rgb-num{width:100%;min-width:0;height:28px;margin:0;padding:0 6px;border:1px solid var(--u-line2);border-radius:0;background:var(--u-field);color:var(--u-cream);
  font:500 12px/1 var(--u-mono);font-variant-numeric:tabular-nums;text-align:right;cursor:text;-moz-appearance:textfield;appearance:textfield}
.rgb-channel input.rgb-num::-webkit-inner-spin-button,.rgb-channel input.rgb-num::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.rgb-channel input.rgb-num:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
.rgb-channel input.rgb-num[aria-invalid=true]{border-color:var(--u-danger-hi)}
input.rgb-native{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)}
.rgb-way{cursor:pointer}
.rgb-chip{display:inline-block;width:30px;height:20px;border:1px solid var(--u-line2);background:var(--rgb-c,#f3e7a7);box-shadow:inset 0 0 0 2px var(--u-panel)}
#appearancePanel .cz-pick.on .rgb-chip{outline:2px solid var(--u-tube);outline-offset:2px}
@media (pointer:coarse){.rgb-channel input.rgb-num{height:36px}}

/* post-Trial 4 chat polish (C4): Customize -> Wanderer -> Voice. The chips are the texture and hat chips; pitch and speed are drawn as
   the RGB sliders are (the game's field style undone); Preview writes its sample line out as a bubble does. */
.vx-about{margin:-2px 0 2px;color:var(--u-mute);font:400 11px/1.5 var(--u-mono)}
.vx-row{display:grid;grid-template-columns:52px minmax(80px,1fr) 44px;align-items:center;gap:10px;margin:0;color:var(--u-cream);font:500 11px/1.4 var(--u-mono)}
.vx-row input[type=range]{width:100%;min-width:0;height:auto;margin:0;padding:0;border:0;background:none;accent-color:#b5c793;cursor:pointer}
.vx-row output{text-align:right;color:var(--u-sick-hi);font-variant-numeric:tabular-nums}
.vx-row:focus-within{color:#f3e7a7}
.vx-actions{display:flex;flex-wrap:wrap;gap:8px}
#appearancePanel .vx-actions .u-btn{min-height:38px;width:auto;margin:0;padding:0 14px;font-size:11px}
.vx-sample{min-height:1.5em;margin:0;padding:7px 10px;border:1px solid var(--u-line);background:#0b0906b5;color:#f6eed9;font:400 12px/1.45 var(--u-mono)}
.vx-yet{visibility:hidden}
.rgb-channel:focus-within{color:#f3e7a7}

/* Trial 4: no photosensitive full-screen white/red capture pulse, even when reduced motion is switched off.
 * This stylesheet is the maintained FRONT presentation source for capture overlay styling.
 * Pre-Trial 3 polish P1 (the owner's request): ONE red impact at a capture, never white and never repeated.  The bundle's white-first
 * `flashout` (and index.html's copy of it) stay switched off.  A red layer over the scene (#dread::after, above the darkness) rises in
 * about 75 ms and fades over a second, once - it runs when body gets `captured`, and again only at the next capture.  What stays is
 * Trial 4's dim vignette, unchanged: the same colours at the same strength (its .62 opacity is now folded into the colours, so the
 * red layer above it can reach full strength).  Reduced motion: a softer red that rises and fades slowly, with no sharp onset. */
body.captured #dread{
  animation:none!important;
  opacity:1!important;
  background:radial-gradient(ellipse at center,transparent 24%,rgba(38,6,8,.1674) 63%,rgba(6,2,3,.4836) 100%)!important;
}
html.rm body.captured #dread{animation:none!important}
/* Pre-Trial 3 polish P1: #light - the darkness overlay BR-RoLE lights through - always at full opacity.  Near a monster the dread hook in
 * B++'s core (public/mp.js) still writes a random flicker (.35-.75) into #light's inline style on some frames, as B++ always has; at
 * those frames the darkness was lifted off the whole screen - the bright scene-wide flash, which also showed what lies behind walls.
 * This rule outranks that inline value, so nothing changes in B++'s client code or its golden traces and the flash never shows.  Nothing
 * else sets #light's opacity.  The heartbeat, the drone, the red vignette (#dread), the shake and the stings are untouched. */
#light{opacity:1!important}
body.captured #dread::after{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:0;
  background:radial-gradient(ellipse at center,rgba(150,10,8,.6) 0%,rgba(122,6,6,.78) 55%,rgba(58,0,0,.92) 100%);
  animation:tfbCaptureRed 1.25s cubic-bezier(.25,.6,.35,1) 1 both;
}
@keyframes tfbCaptureRed{0%{opacity:0}6%{opacity:1}100%{opacity:0}}
html.rm body.captured #dread::after{animation:tfbCaptureRedCalm 1.9s ease-in-out 1 both!important}   /* (outranks the reduced-motion rule at the top, on purpose: a slow fade, no movement) */
@keyframes tfbCaptureRedCalm{0%{opacity:0}28%{opacity:.5}100%{opacity:0}}

/* Trial 4: photosensitivity review of inherited effect timelines.
 * These defaults do not depend on user reduced-motion preferences:
 *  - no 5+ Hz full-viewport tear movement or screen inversion
 *  - no high-brightness exit-filter burst
 *  - no staccato logo or stamina opacity pulse
 * Keep horror readability through static, muted scene shading and slow fades. */
#glitchTear{
  animation:none!important;
  mix-blend-mode:normal!important;
  filter:brightness(.3) saturate(.55)!important;
}
body.gl-out #game canvas,body.gl-out #mp{
  animation:none!important;
  filter:brightness(.55) saturate(.7)!important;
}
.staminaHud em[data-lv=low]{animation:none!important}
.mm-title.hum .mm-logo{animation:none!important}
#menu.mm-intro.mm-go .mm-logo{animation:mmFade .55s ease both!important}
html.rm #menu.mm-intro.mm-go .mm-logo{animation:none!important}

/* Trial 3 R20: the death screen - the wanderer's own corpse, the camera kept on it, the cause-of-death record above and RESPAWN
   below (ui.js owns its timing; R22: in blood red, YOU ARE DEAD over the record - its block at the end of this file).  No backdrop and no blur: the game's view stays, darkened only toward the edges (a vignette)
   and under a faint grain; the record keeps to the top and the button to the bottom, so the centre - where the camera holds the body -
   is never covered. */
#caught{display:block;padding:0;overflow:hidden;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
#caught[hidden]{display:none}
#caught::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 58% 54% at 50% 50%,#0000 0 34%,#1402038c 66%,#080102eb 100%),linear-gradient(#080102bf,#0000 24%,#0000 72%,#080102cc);
  animation:drVeil 1.8s ease both}
#caught::after{content:"";position:absolute;inset:-60px;pointer-events:none;opacity:.12;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:drGrain .7s steps(3) infinite}
@keyframes drVeil{from{opacity:0}to{opacity:1}}
@keyframes drGrain{0%{transform:translate(0,0)}33%{transform:translate(-37px,21px)}66%{transform:translate(19px,-43px)}100%{transform:translate(0,0)}}
#caught .panel{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:auto;max-width:none;margin:0;
  padding:max(clamp(26px,7vh,76px),env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(clamp(30px,8vh,88px),env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  border:0;background:none;box-shadow:none;text-align:center;pointer-events:none;overflow-y:auto}
#caught .panel::before{display:none}
#caught .dr-record{position:relative;max-width:min(94vw,1180px)}
#caught .dr-record::before{content:"";position:absolute;inset:-26% -12% -30%;z-index:-1;pointer-events:none;opacity:0;   /* (a soft dark under the words: read over a lit room) */
  background:radial-gradient(closest-side,#0a0102e6 45%,#0a0102a6 72%,#0a010200)}
#caught.dr-on .dr-record::before{animation:drRecord 1.2s ease both}
html.rm #caught.dr-on .dr-record::before{opacity:1}
#caught .dr-announce{margin:0;color:var(--dr-crimson);font:700 clamp(40px,min(9vw,14vh),124px)/.92 var(--u-display);letter-spacing:.05em;text-indent:.05em;
  text-shadow:0 0 1px #000,0 0 28px #c8101b47,0 4px 24px #000d;text-wrap:balance;opacity:0}
#caught.dr-on .dr-announce{animation:drAnnounce 2.4s .15s cubic-bezier(.2,.7,.2,1) both}
@keyframes drAnnounce{from{opacity:0;letter-spacing:.15em;text-indent:.15em;filter:blur(7px)}to{opacity:1;letter-spacing:.05em;text-indent:.05em;filter:none}}
#caught .dr-record .eyebrow,#caught .dr-term,#caught .dr-rule{opacity:0}
#caught.dr-on .dr-record .eyebrow,#caught.dr-on .dr-term,#caught.dr-on .dr-rule{animation:drRecord 1.4s 1.15s ease both}
@keyframes drRecord{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
#caught .dr-record .eyebrow{margin:clamp(16px,3vh,30px) 0 0;color:var(--dr-rose);font:600 11px/1.4 var(--u-mono);letter-spacing:.44em;text-indent:.44em;text-shadow:0 1px 10px #000,0 0 2px #000}
#caught .dr-term{margin:.34em 0 0;color:var(--dr-bone);font:600 clamp(26px,min(4.6vw,7.5vh),60px)/1 var(--u-display);letter-spacing:.09em;text-indent:.09em;
  text-shadow:0 0 18px #7a08105c,0 2px 24px #000,0 0 3px #000c;overflow-wrap:anywhere}
#caught .dr-rule{display:block;width:clamp(80px,14vw,200px);height:1px;margin:clamp(14px,2.4vh,22px) auto 0;background:linear-gradient(90deg,#c8101b00,#c8101bd9,#c8101b00)}
#caught .primary#retry{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:min(240px,80vw);min-height:52px;margin:auto 0 0;padding:0 26px 0 calc(26px + .42em);
  border:1px solid #c8101b99;background:#1a0306b8;color:var(--dr-bone);font:600 13px/1 var(--u-mono);letter-spacing:.42em;box-shadow:0 0 26px #7a081033,inset 0 0 0 1px #0007;
  opacity:0;visibility:hidden;transition:opacity 1.1s ease,visibility 0s 1.1s,border-color .25s,background .25s}
#caught.dr-ready .primary#retry{opacity:1;visibility:visible;transition:opacity 1.1s ease,visibility 0s,border-color .25s,background .25s}
#caught .primary#retry:hover{border-color:#e0222c;background:#5a0710e0;color:#fff3ef}
#caught .primary#retry:focus-visible{outline:2px solid var(--dr-bone);outline-offset:4px}
#caught .primary#retry:disabled{cursor:default}
#caught #loadoutBtn{pointer-events:auto;display:inline-flex;width:auto;min-height:0;margin:14px 0 0;padding:6px 10px;border:0;background:none;color:var(--dr-rose);
  font:500 10.5px/1.4 var(--u-mono);letter-spacing:.3em;opacity:0;visibility:hidden;transition:opacity 1.1s ease,visibility 0s 1.1s,color .25s}
#caught.dr-ready #loadoutBtn{opacity:.9;visibility:visible;transition:opacity 1.1s ease,visibility 0s,color .25s}
#caught #loadoutBtn:hover{color:var(--dr-bone);background:none}
#caught #loadoutBtn:focus-visible{outline:1px solid var(--dr-bone);outline-offset:3px}
#caught.dr-leaving .dr-record,#caught.dr-leaving .primary#retry,#caught.dr-leaving #loadoutBtn{opacity:0!important;animation:none;pointer-events:none;transition:opacity .42s ease}
#deathDark{position:fixed;inset:0;z-index:21;background:#000;opacity:0;pointer-events:none;transition:opacity .7s ease}
#deathDark.dd-on{opacity:1;pointer-events:auto;transition:opacity .65s .3s ease-in}
#deathDark[hidden]{display:none}
html.rm #caught.dr-on .dr-announce,html.rm #caught.dr-on .dr-record .eyebrow,html.rm #caught.dr-on .dr-term,html.rm #caught.dr-on .dr-rule{opacity:1}   /* (reduced motion: the game's own setting, html.rm, stops every animation and transition) */
/* (Trial 3 R20 hotfix, the owner's QA) EXIT TO MENU beside CHANGE LOADOUT, under RESPAWN: two quiet words on one line; a hint that the
   view can be moved, gone once it has been; a drag on a touch screen moves the view, not the page */
#caught .dr-links{pointer-events:none;text-shadow:0 0 8px #000,0 1px 2px #000;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px clamp(10px,3vw,30px);margin:14px 0 0}
#caught .dr-links #loadoutBtn{margin:0;text-indent:.3em}
#caught #exitMenu{pointer-events:auto;display:inline-flex;width:auto;min-height:0;margin:0;padding:6px 10px;border:0;background:none;color:var(--dr-rose);cursor:pointer;
  font:500 10.5px/1.4 var(--u-mono);letter-spacing:.3em;text-indent:.3em;opacity:0;visibility:hidden;transition:opacity 1.1s ease,visibility 0s 1.1s,color .25s}
#caught.dr-ready #exitMenu{opacity:.9;visibility:visible;transition:opacity 1.1s ease,visibility 0s,color .25s}
#caught #exitMenu:hover{color:var(--dr-bone)}
#caught #exitMenu:focus-visible{outline:1px solid var(--dr-bone);outline-offset:3px}
#caught #exitMenu:disabled,#caught #loadoutBtn:disabled{cursor:default}
#caught.dr-leaving #exitMenu,#caught.dr-leaving .dr-hint{opacity:0!important;pointer-events:none;transition:opacity .42s ease}
#caught .dr-hint{margin:12px 0 0;color:#a3716e;font:500 9.5px/1.4 var(--u-mono);letter-spacing:.28em;text-indent:.28em;opacity:0;transition:opacity 1.2s ease}
#caught .dr-hint-touch,#caught .dr-hint-keys{display:none}
html.rm #caught .dr-hint-fine{display:none}html.rm #caught .dr-hint-keys{display:inline}   /* (reduced motion: the view does not follow the mouse) */
@media (pointer:coarse){#caught .dr-hint-fine,html.rm #caught .dr-hint-keys{display:none}#caught .dr-hint-touch{display:inline}
  #caught .dr-links #loadoutBtn,#caught #exitMenu{min-height:44px;padding:0 12px;align-items:center}}   /* (a finger's target) */
#caught.dr-ready.dr-look .dr-hint{opacity:.55;transition:opacity 1.2s 1s ease}
#caught.dr-ready.dr-looked .dr-hint{opacity:0;transition:opacity .8s ease}
#caught.dr-look{touch-action:none}

/* Trial 3 R22 (the owner's brief: "it must feel like DEATH"; not owner-approved): the death screen in blood red - YOU ARE DEAD, then the
   clinical heading and the cause (ui.js's table, unchanged), RESPAWN in the death's red - and the red vision loss.  Two layers of the
   page's own (ui.js makes them; above the game's canvases, under the record): #deathTint reddens what is still seen (multiplied over it)
   and #deathVeil closes in on the body - two soft, uneven rings of near-black red creeping in from the edges (dv-s2) - then lays an opaque
   blood-red field over all of it (dv-s3).  ui.js owns the timing (DEATH.VEIL, which sets the durations below); once the field is opaque
   (dv-full) the game stops drawing the world under it.  Reduced motion: the same stages as steps, the second a quieter one. */
:root{--dr-blood:#7a0810;--dr-crimson:#c8101b;--dr-rose:#c2918e;--dr-bone:#f2e4df;--dr-clot:#2b040a;--dr-void:#060102}
@property --dv-a{syntax:'<percentage>';inherits:false;initial-value:170%}
@property --dv-b{syntax:'<percentage>';inherits:false;initial-value:185%}
#deathTint,#deathVeil{position:fixed;inset:0;z-index:19;pointer-events:none;--dv-creep:6500ms;--dv-close:1500ms;--dv-lift:380ms}
#deathTint[hidden],#deathVeil[hidden]{display:none}
#deathTint{background:#9c0d16;mix-blend-mode:multiply;opacity:0;transition:opacity var(--dv-lift) ease}
#deathTint.dv-s2{opacity:.82;transition:opacity var(--dv-creep) cubic-bezier(.35,.1,.65,.9)}
#deathVeil{overflow:hidden;opacity:1;transition:opacity var(--dv-lift) ease}
#deathVeil i{position:absolute;inset:0;display:block}
#deathVeil .dv-a{opacity:0;background:radial-gradient(ellipse var(--dv-a) var(--dv-a) at 50% 50%,#0000 0 40%,#3c040b9e 58%,#1d0206ee 76%,var(--dr-void) 100%);
  transition:--dv-a var(--dv-creep) cubic-bezier(.42,0,.58,1),opacity calc(var(--dv-creep) * .4) ease-out}
#deathVeil .dv-b{opacity:0;background:radial-gradient(ellipse var(--dv-b) calc(var(--dv-b) * .9) at 45% 58%,#0000 0 42%,#5a050d80 60%,#260308d9 80%,var(--dr-void) 100%);
  transition:--dv-b calc(var(--dv-creep) - 900ms) 900ms cubic-bezier(.55,0,.7,1),opacity calc(var(--dv-creep) * .5) 900ms ease-out}
#deathVeil .dv-field{opacity:0;background:radial-gradient(ellipse 70% 62% at 50% 48%,var(--dr-clot) 0,#1b0206 46%,#0b0103 78%,var(--dr-void) 100%);
  transition:opacity var(--dv-close) cubic-bezier(.4,0,.6,1)}
#deathVeil.dv-s2 .dv-a{--dv-a:40%;opacity:1}
#deathVeil.dv-s2 .dv-b{--dv-b:46%;opacity:.78}
#deathVeil.dv-s3 .dv-field{opacity:1}
#deathVeil.dv-lift{opacity:0}
html.rm #deathVeil.dv-s2 .dv-a{--dv-a:86%}html.rm #deathVeil.dv-s2 .dv-b{--dv-b:96%}html.rm #deathTint.dv-s2{opacity:.55}   /* (reduced motion: one quiet step, then the field) */
#caught.dr-veiled::after{animation-play-state:paused}   /* (the grain stands still on the field: nothing under it moves) */
#caught.dr-veiled .dr-hint{opacity:0!important;transition:opacity .8s ease}   /* (nothing left to look around at) */

/* Trial 3 R24 C (dev/trial-3-r24-overseer-menu/; not owner-approved): the menu's entrance on the music's notes (ui.js: the startup
   sequence and menuEntrance). #menu.mm-seq conceals every part of the menu (visibility: hidden - nothing can be seen, pressed or
   focused). On the Intro's first note .mm-t shows the title, whose logo ui.js lets emerge from the dark (one smooth rise of opacity and
   brightness: no flicker, after Trial 4's photosensitivity review); on its third .mm-m lets the rest in, each part arriving inside one
   short beat. The motion itself is ui.js's: Web Animations started at the note's own moment on the page's clock, holding each part
   hidden until then, so a slow page cannot start it early or late. Reduced motion: the same moments, no movement. ui.js removes the
   classes and its animations once the entrance is over. */
#menu.mm-seq :is(.mm-title,.mm-dest,.mm-play,.mm-row,.mm-rail,.mm-util,.mm-foot,.mm-entry,.lg){visibility:hidden}
#menu.mm-seq.mm-t .mm-title{visibility:visible}   /* (its logo stays dark until the note; the title takes no input) */
#menu.mm-seq.mm-m :is(.mm-dest,.mm-play,.mm-row,.mm-rail,.mm-util,.mm-foot,.mm-entry,.lg){visibility:visible}

/* Trial 3 R24 D (dev/trial-3-r24-overseer-menu/; not owner-approved): the pause, compact and at the side. The halls stay in view - a
   gentle dim that deepens only toward the panel's side and a slight blur - and the panel is a narrow column (its own blur is only behind
   it). CONTINUE first; Settings and Customize; the keys behind the Controls disclosure; NEW RUN; the source credit as fine print. A phone
   gets a bottom sheet with full-size targets (and no keyboard reference, as before). #caught, #won and #runMenu keep their own rules.
   (64 px at the top: the connection line stays above the panel when the Controls list makes it as tall as the screen allows.) */
#dialog{padding:max(64px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(clamp(20px,4.2vw,64px),env(safe-area-inset-left));
  background:linear-gradient(90deg,#060504b8 0,#0605046b min(520px,46vw),#06050429 100%);-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px)}
#dialog:not([hidden]){display:flex;align-items:center;justify-content:flex-start}
#dialog .panel.pz{display:block;width:min(340px,100%);max-height:100%;margin:0;padding:22px 22px 18px;overflow:auto;overscroll-behavior:contain;
  background:linear-gradient(170deg,#17130bdb,#0d0b07e3 70%);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 22px 60px #000a}
#dialog .panel.pz h2{margin:8px 0 12px;font-size:30px}
#dialog .pz-obj{margin:0 0 14px;padding:10px 0}
#dialog .pz-obj b{font-size:16px}
#dialog .primary{width:100%;min-height:50px;font-size:16px;letter-spacing:.12em}
#dialog .pz-main #resume{margin-top:0}
#dialog .pz-more{margin-top:8px;gap:8px}
#dialog .pz-more .u-btn{min-height:44px}
.pz-disc{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:8px 0 0;padding:0 2px;border:0;border-bottom:1px solid var(--u-line);
  background:none;color:var(--u-moss);font:500 11px/1 var(--u-mono);letter-spacing:.2em;text-transform:uppercase;cursor:pointer}
.pz-disc:hover{color:var(--u-cream)}
.pz-disc i{width:8px;height:8px;margin-right:4px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform var(--u-fast)}
.pz-disc[aria-expanded=true]{color:var(--u-cream)}
.pz-disc[aria-expanded=true] i{transform:rotate(225deg) translate(-2px,-1px)}
#dialog .pz-disc:focus-visible{outline:2px solid var(--u-tube);outline-offset:3px}
#dialog .pz-keys{min-width:0;max-height:min(42vh,340px);margin:0;padding:4px 0 2px;overflow:auto;border:0}
#dialog .pz-keys[hidden]{display:none}
#dialog .pz-keys #pzKeys{position:static;margin:8px 0 6px}
#dialog .controlRows p{padding:6px 0;font-size:11.5px}
#dialog .controlRows b{font-size:11px}
#dialog #reset{margin-top:12px;min-height:44px}
#dialog .lore-credit,#dialog #onlineNote{margin:14px 0 0;font-size:10.5px;line-height:1.55}
#dialog #onlineNote+.lore-credit{margin-top:8px}
@media (pointer:coarse),(max-width:700px){
  #dialog{padding:max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    background:linear-gradient(0deg,#060504b8 0,#0605046b 52%,#06050429 100%)}
  #dialog:not([hidden]){align-items:flex-end;justify-content:center}
  #dialog .panel.pz{width:min(460px,100%);max-height:min(74vh,100%);padding:18px 18px 14px}
  #dialog .panel.pz h2{font-size:26px;margin:6px 0 10px}
  #dialog .primary{min-height:54px}
  #dialog .pz-more .u-btn,#dialog #reset{min-height:48px}
}
@media (pointer:coarse){ .pz-disc{display:none} }                /* (touch has its own pad: the keyboard reference stays out, as before) */
/* Trial 3 R24 D: Customize -> Colours. The HUD colour and the chat colour side by side, each with its preview drawn in the colour in
   effect (--cz-c, set by ui.js: the chosen colour, or that setting's Default), its swatches, its custom colour and R/G/B, its Default. */
.cz-colours{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px;align-items:start}
.cz-colours[hidden]{display:none}
.cz-col{--cz-c:#f3e7a7;margin:0;padding:0;border-bottom:0}
.cz-col .cz-note{grid-area:auto;margin:-4px 0 2px;color:var(--u-mute);font:400 11.5px/1.6 var(--u-mono)}   /* (not the Wanderer tab's note area: one column) */
.cz-prev{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;min-height:74px;padding:14px 16px;border:1px dashed var(--u-line2);background:#050403}
.cz-pv-rv{color:var(--cz-c);font:600 16px/1 var(--u-display);letter-spacing:.3em}
.cz-pv-st{display:inline-flex;align-items:center;gap:8px;color:#c8c2a2;font:400 11px/1 var(--u-mono);letter-spacing:.12em}
.cz-pv-st i{display:inline-block;width:52px;height:4px;background:#ffffff1f}
.cz-pv-st i::after{content:"";display:block;width:82%;height:100%;background:var(--cz-c)}
.cz-pv-ob{flex-basis:100%;color:var(--cz-c);font:600 15px/1 var(--u-display);letter-spacing:.08em;text-transform:uppercase}
.cz-pv-bb{max-width:240px;padding:6px 10px 7px;border:1px solid var(--cz-c);background:#0b0906f2;color:#f6eed9;font:400 12.5px/1.45 var(--u-mono)}
.cz-col .cz-reset{justify-self:start;min-height:36px;padding:0 12px;font-size:10.5px}
@media (max-width:760px){ .cz-colours{grid-template-columns:minmax(0,1fr);gap:22px} .cz-col{padding-bottom:20px;border-bottom:1px solid var(--u-line)} .cz-col:last-child{border-bottom:0} }
/* (Trial 3 R24 owner-expanded O; not owner-approved) Hack, the owner's choice for the Inventory, the HUD, Customize and Overseer V2:
   Regular 400 and Bold 700, self-hosted from the official release (source-foundry/Hack v3.003, build/web/fonts; its licences in
   hack-LICENSE.md beside them).  Only these areas take it - the title, the menu, the credits and every other text keep their faces.
   swap: the fallbacks draw at once and Hack replaces them when it has loaded; the areas' own line heights and sizes keep the panels
   from changing height when it does. */
@font-face{font-family:"Hack";src:url("hack-regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Hack";src:url("hack-bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
#hud,.hud-obj,#hudReveal,#appearancePanel,#inventory,#invToast,#lightCards{--u-mono:"Hack","IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace;--u-display:"Hack","IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace}
#inventory,#inventory *,#invToast,#lightCards,#lightCards *{font-family:"Hack","IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace!important}
/* (R, found by ov_font_browser.js) the areas themselves in Hack too, not only what names the tokens: text they hold directly, and every
   child that only inherits, takes Hack; a child that sets its own size or weight keeps it.  The HUD's two hints over the halls (a
   creature about, the lights out) are the HUD's too */
#encounterHint,#blackoutHint{--u-mono:"Hack","IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace;--u-display:"Hack","IBM Plex Mono",ui-monospace,"DejaVu Sans Mono",Menlo,Consolas,monospace}
#hud,.hud-obj,#hudReveal,#appearancePanel,#encounterHint,#blackoutHint{font-family:var(--u-mono)}

/* (Trial 3 R25 Operational Polish L; not owner-approved) SERVER / ROOMS and the connection: pitch black against the warm menu, hairline
   borders; the chosen room's row clearly marked; the link light (not the player's light: a status lamp) green and blinking only on a live
   connection the server has greeted, amber connecting, reconnecting or moving, dark red offline, still with reduced motion, its state
   always in words beside it */
.mm-rooms{display:flex;flex-direction:column;min-height:0;margin-top:8px;border:1px solid #262626;background:#000}
.mm-rooms-head{display:flex;align-items:center;gap:10px;min-height:34px;padding:0 6px 0 12px;border-bottom:1px solid #1d1d1d}
#menu .mm-rooms h2{margin:0;flex:1;color:#e8e2cf;font:500 11px/1 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
.mm-rooms-n{color:#8f8a78;font:500 10.5px/1 var(--u-mono);letter-spacing:.06em;text-transform:uppercase}
#menu .mm-rooms-re{min-height:28px;padding:0 9px;border:1px solid #2e2e2e;border-radius:0;background:#000;color:#bdb6a0;font:500 10px/1 var(--u-mono);letter-spacing:.06em;text-transform:uppercase;cursor:pointer}
@media (hover:hover){#menu .mm-rooms-re:hover{border-color:#5a5a5a;color:#f1ebd6}}
#menu .mm-rooms-re:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
.mm-roomlist{list-style:none;margin:0;padding:6px;overflow:auto;min-height:0;display:grid;gap:5px;align-content:start;scrollbar-width:thin;scrollbar-color:#333 #000}
.mm-room{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:3px 10px;padding:8px 10px 8px 12px;border:1px solid #1f1f1f;background:#000;color:#e9e3cf;cursor:pointer;
  font:400 10.5px/1.2 var(--u-mono);letter-spacing:.04em;-webkit-tap-highlight-color:transparent}
.mm-room .mr-name{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff6dd;font:600 12.5px/1.15 var(--u-mono);letter-spacing:.06em;text-transform:uppercase}
.mm-room .mr-pop{grid-column:2;grid-row:1;justify-self:end;color:#fff6dd;font:600 12px/1.15 var(--u-mono);font-variant-numeric:tabular-nums}
.mm-room .mr-level,.mm-room .mr-mode{grid-row:2;color:#8f8a78;text-transform:uppercase}
.mm-room .mr-level{grid-column:1}
.mm-room .mr-mode{grid-column:1;padding-left:68px}
.mm-room .mr-state{grid-column:2;grid-row:2;justify-self:end;color:#9fd8a8;text-transform:uppercase;letter-spacing:.08em}
.mm-room[data-state=FULL] .mr-state{color:#e07a5f}
.mm-room[data-state=EMPTY] .mr-state{color:#8f8a78}
.mm-room[aria-disabled=true]{cursor:not-allowed;opacity:.62}
@media (hover:hover){.mm-room:hover{border-color:#3b3b3b}}
.mm-room[aria-selected=true]{border-color:#e9dfb9;box-shadow:inset 3px 0 0 #e9dfb9}
.mm-room:focus{outline:none}.mm-room:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
.mm-rooms-note{margin:0;padding:8px 12px 10px;color:#a29c88;font:400 10.5px/1.5 var(--u-mono)}
.mm-rooms-note[hidden]{display:none}
/* (R5 expansion G5) Create Room: a button beside Refresh and a form in the rooms' own place (the list and its note step aside while it is
   open); the rail's black, its mono type and its pale borders; a disabled control says so and why (aria-disabled, the title) */
#menu .mm-rooms-mk{min-height:28px;padding:0 9px;border:1px solid #4a4636;border-radius:0;background:#000;color:#f1ebd6;font:500 10px/1 var(--u-mono);letter-spacing:.06em;text-transform:uppercase;cursor:pointer}
#menu .mm-rooms-mk[aria-expanded=true]{border-color:#e9dfb9;box-shadow:inset 0 -2px 0 #e9dfb9}
#menu .mm-rooms-mk[aria-disabled=true]{border-color:#262626;color:#6c675a;cursor:not-allowed}
@media (hover:hover){#menu .mm-rooms-mk:not([aria-disabled=true]):hover{border-color:#8a8470}}
#menu .mm-rooms-mk:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
.mm-rooms.mk-open .mm-roomlist,.mm-rooms.mk-open .mm-rooms-note{display:none}
.mm-mk{display:grid;gap:10px;margin:0;padding:10px 12px 12px;overflow:auto;min-height:0;color:#e9e3cf;font:400 11px/1.45 var(--u-mono);scrollbar-width:thin;scrollbar-color:#333 #000}
.mm-mk[hidden]{display:none}
#menu .mm-mk h3{margin:0;color:#fff6dd;font:600 11.5px/1.2 var(--u-mono);letter-spacing:.04em}
.mm-mk fieldset{margin:0;padding:0;border:0;display:grid;gap:6px;min-width:0}
.mm-mk legend,.mm-mk-field>label{padding:0;margin:0 0 2px;color:#8f8a78;font:500 10px/1.3 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
.mm-mk-opt{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 8px;padding:8px 10px;border:1px solid #1f1f1f;background:#000;cursor:pointer}
.mm-mk-opt input{grid-row:1/3;margin:2px 0 0;accent-color:#e9dfb9}
.mm-mk-opt .t{color:#fff6dd;font:600 12px/1.15 var(--u-mono);letter-spacing:.06em;text-transform:uppercase}
.mm-mk-opt .d{color:#a29c88;font:400 10.5px/1.4 var(--u-mono)}
.mm-mk-opt:has(input:checked){border-color:#e9dfb9;box-shadow:inset 3px 0 0 #e9dfb9}
.mm-mk-opt:has(input:focus-visible){outline:2px solid var(--u-sick-hi);outline-offset:1px}
.mm-mk-row{display:flex;gap:6px;min-width:0}
#menu .mm-mk input:not([type]),#menu .mm-mk input[readonly]{flex:1;min-width:0;min-height:30px;padding:0 8px;border:1px solid #3a3a3a;border-radius:0;background:#050505;color:#fff6dd;font:500 12px/1 var(--u-mono);letter-spacing:.03em}
#menu .mm-mk input:not([type]):focus-visible,#menu .mm-mk input[readonly]:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:0}
#menu .mm-mk input[aria-invalid=true]{border-color:#e07a5f}
#menu .mm-mk button{min-height:30px;padding:0 10px;border:1px solid #3a3a3a;border-radius:0;background:#000;color:#e8e2cf;font:500 10px/1 var(--u-mono);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;white-space:nowrap}
@media (hover:hover){#menu .mm-mk button:not(:disabled):hover{border-color:#8a8470;color:#fff6dd}}
#menu .mm-mk button:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
#menu .mm-mk button:disabled{color:#6c675a;border-color:#262626;cursor:progress}
#menu .mm-mk #mmMkGo{border-color:#e9dfb9;color:#fff6dd}
.mm-mk-vis label{display:flex;gap:8px;align-items:center;color:#d6cfba;cursor:pointer}
.mm-mk-vis input{margin:0;accent-color:#e9dfb9}
.mm-mk-vis label[data-off="1"]{color:#6c675a;cursor:not-allowed}
.mm-mk-hint{margin:0;color:#8f8a78;font:400 10px/1.4 var(--u-mono)}
.mm-mk-hint[hidden]{display:none}
.mm-mk-st{margin:0;min-height:1.4em;color:#d9cfa8;font:400 10.5px/1.45 var(--u-mono)}
.mm-mk-st[data-kind=err]{color:#f0a08a}
.mm-mk-st[data-kind=ok]{color:#9fd8a8}
.mm-mk-done{display:grid;gap:6px}
.mm-mk-done[hidden]{display:none}
.mm-mk-done p{margin:0;color:#fff6dd}
.mm-mk-act{display:flex;gap:6px;justify-content:flex-end}
.mm-room[data-state=GENERATING] .mr-state{color:#e0c35f}
@media (pointer:coarse){#menu .mm-rooms-mk{min-height:40px}#menu .mm-mk button,#menu .mm-mk input:not([type]){min-height:40px}.mm-mk-opt{min-height:44px}}
@media (prefers-reduced-motion:reduce){#menu .mm-rooms-mk{transition:none}}
/* the connection: pitch black, its facts in rows */
#menu .mm-conn{margin-top:8px;border:1px solid #262626;background:#000}
#menu .mm-conn h2{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:10px 12px;border-bottom:1px solid #1d1d1d;background:#000;color:#e8e2cf;font:500 11px/1.2 var(--u-mono);letter-spacing:.08em;text-transform:uppercase}
#menu .mm-conn h2 b{display:inline-flex;align-items:center;gap:8px;color:#bdb6a0;font-weight:500;letter-spacing:.08em}
#menu .mm-conn h2 b::before{content:none}
.mm-led{position:relative;display:inline-block;width:8px;height:8px;border-radius:50%;background:#3a1010;box-shadow:inset 0 0 0 1px #00000080}
#mmLink[data-mode=online]{color:#9fe0aa}
#mmLink[data-mode=online] .mm-led{background:#3ee06a;box-shadow:0 0 6px #3ee06a99;animation:mmLed 1.8s ease-in-out infinite}
#mmLink[data-mode=connecting] .mm-led,#mmLink[data-mode=reconnecting] .mm-led,#mmLink[data-mode=switching] .mm-led{background:#e2a33a;box-shadow:0 0 5px #e2a33a66;animation:mmLedSlow 2.8s ease-in-out infinite}
#mmLink[data-mode=connecting],#mmLink[data-mode=reconnecting],#mmLink[data-mode=switching]{color:#e8c07a}
#mmLink[data-mode=offline] .mm-led{background:#5a1717}
#mmLink[data-mode=offline]{color:#c98a7c}
@keyframes mmLed{0%,62%,100%{opacity:1}74%{opacity:.35}86%{opacity:1}}
@keyframes mmLedSlow{0%,100%{opacity:1}50%{opacity:.45}}
html.rm .mm-led{animation:none!important}
/* (R25 L) the sizes.  Below a wide screen the rail has to stay above the title (it had about 60 px to spare under the old connection
   line): the connection is its heading, the chosen room on a button that opens the rooms over the menu (a pick, Esc, a press outside or
   the focus leaving closes them), and one line of facts - the level, the players, the mode (the level's and the mode's labels are read
   out, not shown: their values say what they are).  On a wide screen the rooms are the rail's own column and the facts are rows. */
.mm-facts{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0;padding:5px 10px 6px}
.mm-facts>div{display:flex;align-items:baseline;gap:6px;min-width:0}
.mm-facts .f-room{display:none}
.mm-facts .f-level dt,.mm-facts .f-mode dt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.mm-facts dt{color:#8f8a78;font:500 10px/1.3 var(--u-mono);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.mm-facts dd{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff6dd;font:500 11px/1.3 var(--u-mono);letter-spacing:.04em;font-variant-numeric:tabular-nums}
.mm-facts .f-level dd,.mm-facts .f-mode dd{text-transform:uppercase}
#menu .mm-conn p#mmInside{display:none;margin:0;padding:6px 12px 10px;color:#a29c88;font:400 10.5px/1.5 var(--u-mono)}
#menu .mm-conn h2{padding:5px 10px}
.mm-rooms{position:absolute;z-index:6;top:100%;left:0;width:min(340px,calc(100vw - 2 * var(--sl)));max-height:min(62vh,380px);margin-top:6px;display:none;box-shadow:0 12px 30px #000c}
.mm-rail.rooms-open .mm-rooms{display:flex}
.mm-roomlist{max-height:none;flex:1}
#menu .mm-rooms-open{display:flex;align-items:center;gap:8px;width:calc(100% - 20px);min-height:28px;margin:6px 10px 0;padding:0 8px 0 10px;border:1px solid #2e2e2e;border-radius:0;background:#000;color:#fff6dd;
  font:500 10px/1 var(--u-mono);letter-spacing:.08em;text-align:left;text-transform:uppercase;cursor:pointer}
#menu .mm-rooms-open .k{color:#8f8a78}
#menu .mm-rooms-open b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 11px/1 var(--u-mono);letter-spacing:.04em;text-transform:none}
#menu .mm-rooms-open .n{margin-left:auto;color:#8f8a78;white-space:nowrap}
#menu .mm-rooms-open i{font-style:normal;color:#bdb6a0;transition:transform .12s}
#menu .mm-rooms-open[aria-expanded=true]{border-color:#e9dfb9}
#menu .mm-rooms-open[aria-expanded=true] i{transform:rotate(180deg)}
@media (hover:hover){#menu .mm-rooms-open:hover{border-color:#5a5a5a}}
#menu .mm-rooms-open:focus-visible{outline:2px solid var(--u-sick-hi);outline-offset:1px}
@media (max-height:560px){.mm-rooms{top:0;margin-top:0;max-height:calc(100vh - 2 * var(--st))}}
@media (max-width:520px){.mm-room .mr-mode{display:none}}
@media (pointer:coarse){#menu .mm-rooms-open{min-height:34px}#menu .mm-rooms-re{min-height:40px}.mm-room{min-height:44px}}
@media (min-width:1180px) and (min-height:620px){
  .mm-rooms{position:static;display:flex;flex:1;width:auto;max-height:none;margin:0;border:0;border-bottom:1px solid #1d1d1d;box-shadow:none}
  #menu .mm-rooms-open{display:none}
  .mm-facts{display:grid;justify-content:normal;align-items:normal;gap:6px;padding:10px 12px 4px}
  .mm-facts>div,.mm-facts .f-room{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px}
  .mm-facts .f-level dt,.mm-facts .f-mode dt{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
  .mm-facts dd{font-size:11.5px;text-align:right}
  .mm-facts .f-mode dd{text-transform:none}
  #menu .mm-conn p#mmInside{display:block}
  #menu .mm-conn h2{padding:10px 12px}
  #menu .mm-conn{margin:0;border:0}
}

/* (Trial 3 R25 Operational Polish M; not owner-approved) the performance stats (assets/perf.js): small, in Hack, in the top left corner
   during a run, never taking a click, under the level's title cards; Compact one line, Detailed five short rows. A touch screen or a
   narrow window keeps its HUD and PAUSE along the top, so the stats sit below them there */
.perf-hud{position:fixed;z-index:11;left:calc(16px + env(safe-area-inset-left,0px));top:calc(14px + env(safe-area-inset-top,0px));pointer-events:none;
  padding:5px 9px 6px;border:1px solid #ffffff1c;background:#000000b3;color:#efe9d6;font:500 11px/1.5 var(--u-mono);letter-spacing:.03em;
  font-variant-numeric:tabular-nums;white-space:nowrap;-webkit-user-select:none;user-select:none}
.perf-hud[hidden]{display:none}
.perf-hud[data-mode=compact]{display:flex;align-items:baseline;gap:6px}
.perf-hud[data-mode=compact] .pf-k:not(:first-child){margin-left:6px}
.perf-hud .pf-k{color:#9a947f;font-weight:500;letter-spacing:.08em}
.perf-hud b{font-weight:600;color:#fff6dd}
.perf-hud i{font-style:normal;color:#9a947f}
.perf-hud .pf-row{display:grid;grid-template-columns:5.5ch auto auto 1fr;align-items:baseline;gap:0 6px}
.perf-hud .pf-row b{min-width:6ch;text-align:right}
.perf-hud .pf-s{color:#9a947f}
.perf-hud .pf-tag{margin-left:8px;padding:0 5px;border:1px solid #ffffff33;color:#e8c07a;font-size:10px;letter-spacing:.08em}
body:not(.playing) .perf-hud{display:none}
@media (pointer:coarse),(max-width:700px){.perf-hud{top:calc(64px + env(safe-area-inset-top,0px))}}
@media (max-width:420px){.perf-hud{font-size:10px;padding:4px 7px 5px}}
