:root {
  color-scheme: dark;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  color: #f4eee3;
  background: #101617;
  --amber: #ebc18b;
  --edge: rgba(233, 206, 167, .32);
  --left: max(22px, env(safe-area-inset-left));
  --right: max(22px, env(safe-area-inset-right));
  --top: max(18px, env(safe-area-inset-top));
  --bottom: max(13px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.caught, body.departing { background: #000; }
body.caught .global-controls, body.departing .global-controls { display: none; }
body.round-report-open .global-controls { display: none; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 2px solid #fff4cb; outline-offset: 4px; }
button:disabled { opacity: .48; cursor: wait; }
#station, .screen, #hud { position: fixed; inset: 0; width: 100%; height: 100%; }
#station { display: block; touch-action: none; background: #111a1c; }
#lobby-poster {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1s ease;
}
.scene-ready #lobby-poster { opacity: 0; }
.in-round #lobby-poster { opacity: 0; visibility: hidden; transition: none; }
body.preparing-game #lobby-poster { opacity: 1; visibility: visible; transition: none; }
#lobby { z-index: 2; }
.game-version { display: block; margin-top: .65rem; font-size: .65rem; color: #c1b5a1; }
#load-progress {
  position: fixed;
  z-index: 16;
  bottom: max(15px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 25vw;
  display: flex;
  align-items: center;
  color: #e7d7c0;
  font-size: .72rem;
  transition: opacity .6s;
  pointer-events: none;
}
.load-track { flex: none; width: 25vw; height: 4px; background: #e7c89c25; }
#load-percent {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 4ch;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.load-track span { display: block; height: 100%; width: calc(var(--load, 0) * 100%); background: #e7c89c; transition: width .16s linear; }
.scene-ready #load-progress { opacity: 0; }
.preparing-game #load-progress { opacity: 1; transition: none; }
.screen { display: grid; place-items: center; }
#lobby {
  place-items: center start;
}
.languages { position: absolute; top: var(--top); right: var(--right); display: flex; gap: 4px; background: #0b1113d9; padding: 4px; border: 1px solid var(--edge); }
.languages button { min-width: 43px; min-height: 40px; background: none; border: 0; color: #d1cbc2; font-size: .78rem; letter-spacing: .12em; }
.languages button[aria-pressed="true"] { color: #19100a; background: var(--amber); }
.arrival { margin-left: clamp(26px, 8vw, 130px); width: min(43vw, 535px); }
.arrival > :not(#load-progress) { filter: drop-shadow(0 3px 12px #000); }
.arrival img { display: block; width: 100%; max-height: 43dvh; object-fit: contain; object-position: left center; height: auto; }
body.preparing-game { --preparation-logo-width: min(62vw, 535px, 60dvh); }
.preparing-game .arrival {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: var(--preparation-logo-width);
}
.preparing-game .arrival > :not(img):not(#load-progress) { display: none; }
.preparing-game .arrival img {
  aspect-ratio: 887 / 1024;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
.preparing-game .global-controls, .preparing-game .languages { visibility: hidden; }
.preparing-game #load-progress {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  margin-top: 16px;
}
.preparing-game .load-track { width: 100%; }
.preparing-game .load-track span { transition: none; }
.level { margin: .75rem 0 1.5rem; color: var(--amber); font-size: clamp(.65rem, 1.2vw, .9rem); letter-spacing: .33em; text-transform: uppercase; }
.primary { display: inline-block; min-height: 50px; padding: .8rem 1.45rem; border: 1px solid #f4d7a8; background: #e9bc85; color: #20150d; font-weight: 700; }
.primary:hover { background: #f7d2a5; }
#loading { min-height: 1rem; color: #ddd3c3; font-size: .82rem; }
#hud { pointer-events: none; touch-action: none; }
#hud button { pointer-events: auto; }
.objective, .round-info { position: absolute; top: var(--top); }
.objective { left: var(--left); width: min(63vw, 460px); text-shadow: 0 2px 5px #000, 0 0 15px #000; }
#room { color: var(--amber); text-transform: uppercase; font-size: .7rem; letter-spacing: .18em; margin-bottom: .4rem; }
#task { font-size: clamp(.83rem, 2.5vw, 1.14rem); line-height: 1.24; font-weight: 650; }
.round-info { right: var(--right); display: flex; align-items: center; gap: .45rem; }
#pause { padding: .58rem; border: 1px solid var(--edge); background: #101617e6; color: #fff3dc; font-size: .86rem; }
#pause { min-width: 44px; min-height: 44px; }
#reticle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; width: 5px; height: 5px; background: #f6ecd7; box-shadow: 0 0 4px #1a100a; }
#reticle[data-active] { width: 14px; height: 14px; border: 1px solid #ffdaa3; background: transparent; }
#reticle[data-blocked] { border: 2px solid #ed7a68; background: none; width: 16px; height: 16px; }
#prompt, #notice { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(78vw, 440px); text-align: center; background: #0d1415ef; border: 1px solid var(--edge); padding: .5rem .75rem; font-size: .85rem; }
#prompt { top: calc(50% + 20px); }
#notice { bottom: calc(var(--bottom) + 104px); color: #ffdb9f; }
.bottom { position: absolute; left: 50%; bottom: var(--bottom); display: grid; place-items: center; transform: translateX(-50%); width: min(100%, 640px); }
.slots { display: flex; justify-content: center; gap: .43rem; }
.slot { position: relative; display: grid; place-items: center; width: clamp(51px, 12vw, 77px); height: clamp(46px, 9vh, 65px); background: #0d1518e8; border: 1px solid var(--edge); border-radius: 2px; color: #a8a29b; touch-action: none; }
.slot[aria-pressed="true"] { border: 1px solid #ffc47f; box-shadow: inset 0 -2px #ffc47f; color: #ffe7bf; }
.slot b { position: absolute; left: .28rem; top: .24rem; font-size: .63rem; font-weight: 500; }
.slot svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.slot span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .6rem; align-self: end; margin: 0 2px 3px; }
#controls { margin: .4rem 12px 0; color: #e9e4da; background: #11191acd; padding: .24rem .47rem; text-align: center; font-size: .72rem; }
.small-action { position: absolute; bottom: 19px; left: calc(50% + 100px); color: #fff2dc; background: #142123; border: 1px solid #c49a68; min-height: 44px; padding: .5rem .7rem; }
.dialog { background: #080d10df; text-align: center; padding: 1.5rem; }
#rotate { z-index: 5; background: #101617; }
.rotate-icon { display: block; font-size: 2.5rem; color: var(--amber); }
.panel { width: min(100%, 31rem); padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--edge); background: #111a1c; box-shadow: 0 16px 75px #000a; }
.panel h1 { margin: 0; font-size: clamp(1.5rem, 4.4vw, 2.8rem); line-height: 1.02; letter-spacing: -.035em; }
.panel p { color: #d4ccc0; line-height: 1.4; }
.secondary { display: block; margin: .35rem auto 0; background: transparent; border: 0; padding: .6rem; color: #efcfaa; min-height: 43px; }
#round-report {
  z-index: 10;
  background: #050606;
  overflow: auto;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  place-items: start center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.report-content { width: min(100%, 40rem); margin: clamp(0px, 3vh, 2rem) auto; }
.report-content h1 { margin: 0; color: #f5e6d6; font-family: "Germania One", Georgia, serif; font-size: clamp(2rem, 6vw, 3.6rem); }
.report-content .level { margin: .3rem 0 1rem; }
.report-content h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.55rem); }
.report-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.report-metrics > div { padding: .7rem; background: #101314; border: 1px solid var(--edge); }
.report-metrics dt { font-size: .82rem; color: #ded4c7; }
.report-metrics dd { margin: .25rem 0 0; color: #f9d7a4; font-size: clamp(.92rem, 3vw, 1.38rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.report-record { margin: .65rem 0; color: #ffce85; font-weight: 700; }
.report-scores { border-top: 1px solid var(--edge); margin-top: .8rem; }
.report-scores h3 { margin: .85rem 0 .3rem; font-size: 1rem; }
.report-scores [data-report="initial"], .report-local { margin: .2rem 0; color: #c6b9ac; font-size: .85rem; }
.report-scores ol { margin: .5rem 0; padding-left: 1.35rem; }
.report-scores li { padding: .26rem .08rem; }
.report-scores li span:last-child { float: right; color: #f5d4a6; font-variant-numeric: tabular-nums; }
.report-longest { display: flex; gap: .65rem; justify-content: space-between; border-top: 1px solid var(--edge); margin: .75rem 0 0; padding-top: .55rem; font-size: .88rem; }
.report-longest strong { font-variant-numeric: tabular-nums; color: #f5d4a6; }
.report-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.report-actions .secondary { margin: 0; }
#move-pad, #hold-ring { display: none; }
.touch #move-pad { display: grid; place-items: center; position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); width: 75px; height: 75px; border: 1px solid #f1e5cf60; border-radius: 50%; background: #101a2190; }
#move-pad i { display: block; width: 27px; height: 27px; border-radius: 50%; background: #efe0c09c; }
.touch #hold-ring[data-holding] { display: block; position: absolute; width: 44px; height: 44px; border-radius: 50%; transform: translate(-50%, -50%); background: conic-gradient(#ffda9d var(--progress), #111b20ba var(--progress)); border: 1px solid #fff1cf; }
#hold-ring::after { content: ""; position: absolute; inset: 4px; background: #131a20e0; border-radius: 50%; }
.touch #controls { display: none; }
.touch #notice { bottom: calc(var(--bottom) + 53px); }
.touch .small-action { bottom: 0; }
@media (max-height: 460px) {
  .level { margin: .5rem 0 .75rem; }
  .arrival img { max-height: 42dvh; }
  .panel { padding: .85rem; }
  .panel p { margin: .5rem 0; }
  #prompt { top: calc(50% + 11px); }
}
#look-pad { display: none; }
#fullscreen-status { position: absolute; top: 100%; right: 0; left: auto; width: max-content; max-width: min(380px, calc(100vw - var(--left) - var(--right))); overflow-wrap: anywhere; padding: .55rem .72rem; color: #fff3dc; background: #101617f4; border: 1px solid var(--edge); }
body.in-round #fullscreen-status { top: auto; bottom: 100%; }
.touch #look-pad { display: grid; place-items: center; position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 75px; height: 75px; border: 1px solid #f1e5cf60; border-radius: 50%; background: #101a2190; }
.touch #look-pad i { display: block; width: 27px; height: 27px; border-radius: 50%; background: #efe0c09c; }
@media (max-width: 650px) {
  .touch .objective { width: min(49vw, 390px); }
}
#main-goal { font-size: clamp(.93rem, 2.1vw, 1.33rem); font-weight: 800; margin-bottom: .23rem; }
#task { color: #f1d6b3; font-size: clamp(.73rem, 1.8vw, .97rem); font-weight: 550; }
.stages { display: flex; gap: .48rem; margin-top: .35rem; font-size: .7rem; color: #e1d6cb; }
.stages span { white-space: nowrap; }
.stages .done { color: #bdd8a6; }
#station-parts { margin-top: .28rem; color: #e1d6cb; font-size: .7rem; }
#check-panel { background: #090e11a3; }
#check-panel .panel h1 { font-size: clamp(1.4rem, 4vw, 2rem); }
.code-buttons { display: flex; justify-content: center; gap: .6rem; }
.code-buttons button { min-width: 52px; padding: .38rem; font-size: 1.25rem; }
#check-feedback { min-height: 1.5em; }
#station, #move-pad, #look-pad, #hold-ring, .slot {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.stamina-meters { margin-top: .48rem; display: grid; gap: .26rem; width: min(100%, 10.8rem); }
.stamina-meters div { display: grid; grid-template-columns: 4.1rem 1fr; align-items: center; gap: .28rem; }
.stamina-meters label { color: #f1ede4; text-shadow: 0 1px 4px #000; font-size: .66rem; }
.stamina-meters progress {
  display: block;
  width: 100%;
  height: 7px;
  appearance: none;
  border: 1px solid #dcc8ed66;
  border-radius: 1px;
  background: #0d1518ea;
  color: #cfaa74;
}
.stamina-meters progress::-webkit-progress-bar { background-color: #0d1518ea; }
.stamina-meters progress::-webkit-progress-value { background: #e0b57d; }
.stamina-meters progress::-moz-progress-bar { background: #e0b57d; }
.stamina-meters .low::-webkit-progress-value { background: #c27c60; }
.stamina-meters .low::-moz-progress-bar { background: #c27c60; }
#fred-stamina::-webkit-progress-value { background: #b36059; }
#fred-stamina::-moz-progress-bar { background: #b36059; }

.global-controls { position: fixed; z-index: 12; top: .8rem; left: .75rem; display: flex; gap: .35rem; }
.global-controls button {
  color: #f0e7d8;
  min-height: 38px;
  background: #10171beb;
  border: 1px solid #cab38c66;
  padding: .35rem .6rem;
}
body.in-round .global-controls { top: auto; bottom: max(.42rem, env(safe-area-inset-bottom)); }
.global-controls button[aria-pressed="true"] { color: #d0ae7b; }
.control-icon {
  display: none;
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#mute { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; }
.sound-icon { display: block; width: 16px; height: 16px; }
.sound-slash, #mute[aria-pressed="true"] .sound-wave { display: none; }
#mute[aria-pressed="true"] .sound-slash { display: block; }
body.in-round .global-controls button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 5px;
  background: #10171bce;
}
body.in-round .global-controls .control-icon { display: block; width: 20px; height: 20px; }
body.in-round .global-controls .control-label { display: none; }
.settings-panel {
  --settings-top: 3.6rem;
  position: fixed;
  z-index: 13;
  top: var(--settings-top);
  left: .8rem;
  width: min(18rem, calc(100vw - 1.6rem));
  max-height: calc(100dvh - var(--settings-top) - .8rem);
  overflow-y: auto;
  padding: 1rem;
  color: #f0e7d8;
  background: #11181ff5;
  border: 1px solid #cab38c66;
}
.settings-panel h2 { font-size: 1rem; margin: 0 0 .8rem; }
.settings-panel label { display: block; }
.settings-panel select {
  width: 100%;
  min-height: 2.25rem;
  margin: .25rem 0 .65rem;
  padding: .25rem .5rem;
  font: inherit;
  color: inherit;
  background: #1e282f;
  border: 1px solid #cab38c80;
}
#graphics-status { color: var(--amber); margin: -.3rem 0 .6rem; font-size: .8rem; }
.settings-panel input { width: 100%; accent-color: #e0b57d; }
body.in-round .settings-panel { top: auto; bottom: 3.7rem; }
#catch-title {
  position: fixed;
  z-index: 5;
  inset: 43% 0 auto;
  margin: 0;
  text-align: center;
  color: #f65459;
  font-size: clamp(1.45rem, 5vw, 3.2rem);
  font-weight: 850;
  text-shadow: 0 0 18px #380003, 1px 3px #000;
  pointer-events: none;
}
@media (pointer: coarse) and (orientation: landscape) {
  body.in-round .global-controls { left: auto; right: .5rem; bottom: auto; top: 4.15rem; }
  body.in-round #fullscreen-status { top: 100%; right: 0; bottom: auto; left: auto; }
  body.in-round .settings-panel { --settings-top: calc(4.15rem + 50px); left: auto; right: .5rem; bottom: auto; top: var(--settings-top); }
}

@font-face {
  font-family: "Germania One";
  src: url("/assets/fonts/GermaniaOne-Regular.ttf") format("truetype");
  font-display: swap;
}
#catch-title { font-family: "Germania One", "Barlow Condensed", Georgia, serif; }

.slot {
  grid-template-rows: 1fr auto;
  background: linear-gradient(155deg, #1e2a30f5, #0b1217f2);
  border-radius: 5px;
  box-shadow: inset 0 1px #ffe4b821, 0 4px 14px #0007;
}
.slot b { color: #d8c8af; }
.slot.occupied { color: #ead8b9; border-color: #9e8260a0; }
.slot svg { margin-top: .27rem; width: 23px; height: 23px; }
.slot span { font-size: .66rem; line-height: 1.35; margin: .13rem .18rem .24rem; }
.slot[aria-pressed="true"] { color: #fff0d2; box-shadow: inset 0 -2px #ffc47f, 0 0 14px #ffc47f32; }
#catch-title { inset: auto .7rem 13%; }

/* F1.4: persistent controls stay outside both thumb zones. */
.global-controls {
  top: var(--top);
  right: var(--right);
  left: auto;
  gap: 8px;
}
.global-controls button { min-width: 44px; min-height: 44px; }
body.in-round .global-controls,
body.touch.in-round .global-controls {
  top: var(--top);
  right: var(--right);
  left: auto;
  bottom: auto;
}
body.in-round .round-info { display: none; }
body.in-round .objective { width: min(57vw, 480px); }
body.in-round .objective > :not(#missing-parts):not(.stamina-meters) { display: none; }
#missing-parts {
  margin: 0;
  max-width: 100%;
  color: #f5ead8;
  font-size: clamp(.7rem, 1.65vw, .86rem);
  line-height: 1.45;
  text-shadow: 0 1px 3px #000, 0 0 8px #000;
}
.session-status {
  position: absolute;
  top: calc(var(--top) + 53px);
  right: var(--right);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  color: #e1ddcf;
  padding: 3px 5px;
  border-radius: 3px;
  background: #080e13b8;
  text-shadow: 0 1px 2px #000;
}
#clock { color: #c9c5b9; }
#clock, #fps { white-space: nowrap; }
.settings-panel,
body.in-round .settings-panel,
body.touch.in-round .settings-panel {
  --settings-top: calc(var(--top) + 52px);
  top: var(--settings-top);
  right: var(--right);
  left: auto;
  bottom: auto;
  max-height: calc(100dvh - var(--settings-top) - var(--bottom));
  width: min(20rem, calc(100vw - var(--left) - var(--right)));
  touch-action: pan-y;
}
.settings-panel #mute {
  min-height: 44px;
  width: 100%;
  margin-bottom: .5rem;
  color: inherit;
  background: #1e282f;
  border: 1px solid var(--edge);
}
.setting-toggle { display: flex !important; align-items: center; gap: .6rem; min-height: 44px; }
.settings-panel input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.settings-panel select, .settings-panel .secondary { min-height: 44px; }
#flashlight {
  pointer-events: auto;
  position: absolute;
  right: var(--right);
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 94px);
  width: 48px;
  height: 48px;
  padding: 11px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--edge);
  color: #f0e7d8;
  background: #10171bd9;
  touch-action: manipulation;
}
#flashlight .control-icon { display: block; width: 24px; height: 24px; }
#flashlight[aria-pressed="true"] { color: #ffe5ac; border-color: #ffe5ac; }
#flashlight[aria-pressed="true"] .flashlight-slash { display: none; }
#flashlight:active, .global-controls button:active, .slot:active { background: #63533d; }
body:not(.touch) #flashlight { bottom: calc(var(--bottom) + 84px); }
#station, #hud, #hud button, .global-controls button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
body.in-round #fullscreen-status,
body.touch.in-round #fullscreen-status {
  top: 100%;
  bottom: auto;
  right: 0;
  left: auto;
  max-width: min(78vw, 380px);
}
.touch .slot { min-width: 48px; min-height: 44px; }
#task-details { display: none; margin-top: .6rem; }
.in-round #task-details { display: block; }
#task-details summary { min-height: 44px; padding: .7rem 0; cursor: pointer; }
#task-details .stages { flex-wrap: wrap; }

/* Keep the lobby language switch clear of the persistent top-right tools. */
.languages { left: var(--left); right: auto; }
.languages button { min-width: 44px; min-height: 44px; }

.settings-panel input[type="range"] { min-height: 44px; touch-action: pan-y; }

/* Retain sprint feedback without bringing back the expanded objective panel. */
body.in-round .objective > .stamina-meters { display: block; width: 84px; margin-top: 5px; }
body.in-round .stamina-meters > div { display: block; }
body.in-round .stamina-meters label { display: block; font-size: .58rem; line-height: 1.3; }
body.in-round .stamina-meters progress { width: 84px; height: 5px; margin-top: 2px; }
body.in-round #fred-stamina-row { display: none; }
/* Keep the inventory compact independently of contextual actions. */
.touch .bottom { width: max-content; max-width: calc(100vw - var(--left) - var(--right)); }
body.in-round .objective {
  width: min(57vw, 480px, calc(100vw - var(--left) - var(--right) - 112px));
}
@media (max-width: 700px) {
  .touch #notice { top: calc(50% - 65px); bottom: auto; }
}
/* The filtered logo creates a stacking context; navigation must stay above it. */
.languages { z-index: 3; }

.touch #prompt {
  left: var(--left);
  right: var(--right);
  margin: 0 auto;
  transform: none;
  max-width: min(78vw, 440px, calc(100vw - var(--left) - var(--right) - 160px));
}

/* The key is marked by colour; its name remains readable on the dark HUD. */
.slot.occupied svg { color: var(--key-color); filter: drop-shadow(0 0 1px #fff); }
.slot[hidden] { display: none; }

/* One automatically used key, with its full name instead of slot selection. */
.slot { width: clamp(160px, 30vw, 240px); }
.slot span { white-space: normal; text-overflow: clip; text-align: center; }

/* Departure keeps only its quiet look-around hint; interaction and movement stop. */
body.departing #hud > :not(#notice) { visibility: hidden; }

/* Access blocks the complete game surface, not only its visible controls. */
#demo-content { width: 100%; height: 100%; height: 100dvh; }
#station, .screen, #hud { height: 100dvh; }
body.demo-locked #demo-content {
  filter: blur(24px);
  transform: scale(1.04);
  pointer-events: none;
  user-select: none;
}
#demo-access {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: auto;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(4, 8, 10, .48);
}
.demo-access-card {
  display: grid;
  gap: 12px;
  width: min(360px, 100%);
  padding: 26px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(15, 22, 24, .94);
  box-shadow: 0 12px 48px #0009;
}
.demo-access-card h1 { margin: 0 0 8px; text-align: center; font-size: 1.45rem; line-height: 1.2; font-weight: 600; }
.demo-access-card label { font-size: .83rem; color: #e4d5c0; }
#demo-password { width: 100%; min-height: 48px; padding: 11px 12px; font: inherit; font-size: 16px; color: #fff4e4; background: #0a1113; border: 1px solid var(--edge); border-radius: 3px; }
#demo-password:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
#demo-password[aria-invalid="true"] { border-color: #e69f84; }
#demo-access-message { margin: 0; min-height: 2.5em; font-size: .8rem; line-height: 1.25; color: #eeb397; }
@media (max-height: 420px) { .demo-access-card { gap: 8px; padding: 17px 22px; } .demo-access-card h1 { margin-bottom: 3px; font-size: 1.3rem; } #demo-access-message { min-height: 1.25em; } }
