:root {
  --abyss: #05070E;
  --drowned: #0E1A24;
  --amber: #FFB154;
  --acid: #7CFF4F;
  --cyan: #5FE0FF;
  --violet: #B14BE0;
  --phosphor: #EAF6FF;
  --oxide: #6B4A38;
  --line: rgba(234, 246, 255, 0.34);
  --line-dim: rgba(234, 246, 255, 0.16);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--abyss);
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  font-family: 'Archivo', sans-serif;
  color: var(--phosphor);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; }
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--abyss);
  outline: none;
}

#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(120% 92% at 50% 46%, transparent 42%, rgba(5, 7, 14, 0.48) 78%, rgba(5, 7, 14, 0.9) 100%);
}
#scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.16;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(5,7,14,0.55) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply;
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
}
#hud button { pointer-events: auto; }

.hud-tl { position: absolute; top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
.timeblock { display: flex; align-items: flex-start; gap: 12px; }
.dialwrap { position: relative; width: 74px; height: 74px; flex: none; filter: drop-shadow(0 0 10px rgba(95, 224, 255, 0.18)); }
.dial { width: 100%; height: 100%; opacity: 0.88; }
.dialtime {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--phosphor);
  text-shadow: 0 0 8px rgba(234, 246, 255, 0.45);
}
.readouts { padding-top: 7px; display: flex; flex-direction: column; gap: 4px; font-family: 'IBM Plex Mono', monospace; font-weight: 400; font-size: 9px; letter-spacing: 0.14em; color: rgba(234, 246, 255, 0.62); }
.readout b { color: rgba(234, 246, 255, 0.95); font-weight: 500; margin-left: 7px; }
.phase { margin-top: 4px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 8px; letter-spacing: 0.26em; color: var(--cyan); opacity: 0.88; }
.vitals { margin-top: 8px; width: 136px; }
.vitalsframe { width: 100%; height: auto; opacity: 0.38; }
.vitalsOffline { margin-top: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 0.16em; color: rgba(234, 246, 255, 0.33); }

.hud-tr { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.shards { display: flex; align-items: center; gap: 9px; }
.shardicon { width: 21px; height: auto; opacity: 0.82; filter: drop-shadow(0 0 7px rgba(177, 75, 224, 0.45)); }
.shardtext { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.18em; color: rgba(234, 246, 255, 0.62); }
.shardtext b { color: var(--phosphor); font-weight: 500; letter-spacing: 0.06em; }
.compasswrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.compass { width: 22px; height: auto; opacity: 0.62; }
.heading { font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 0.2em; color: rgba(234, 246, 255, 0.45); }

.hud-bl { position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: 40vw; }
.objective { display: flex; flex-direction: column; gap: 4px; border-left: 1px solid rgba(95, 224, 255, 0.45); padding-left: 9px; }
.objective span:first-child { font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 0.28em; color: var(--cyan); opacity: 0.75; }
.objective span:last-child { font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 9px; letter-spacing: 0.18em; color: rgba(234, 246, 255, 0.78); }

.hud-br { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
.brandmark { width: 156px; height: auto; opacity: 0.6; }

#prompt {
  position: absolute;
  left: 50%;
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 54px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.18s ease;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
}
#prompt.show { opacity: 1; }
.pline { display: block; width: clamp(28px, 7vw, 76px); height: 1px; background: var(--line); }
.pglyph { width: 21px; height: 68px; object-fit: contain; opacity: 0.5; }
.pglyph.flip { transform: scaleX(-1); }
.pkey { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); color: var(--phosphor); font-size: 10px; font-weight: 600; background: rgba(5, 7, 14, 0.45); }
.ptext { color: rgba(234, 246, 255, 0.86); }

#subtitle {
  position: absolute;
  left: 50%;
  bottom: max(110px, calc(env(safe-area-inset-bottom) + 100px));
  transform: translateX(-50%);
  max-width: min(720px, 84vw);
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: rgba(234, 246, 255, 0.88);
  text-transform: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-shadow: 0 1px 12px rgba(5, 7, 14, 0.9);
}
#subtitle.show { opacity: 1; }
#subtitle em { font-style: normal; color: var(--amber); }

#toast {
  position: absolute;
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--phosphor);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(95, 224, 255, 0.5);
}
#toast.show { opacity: 1; }
#toast.amber { color: var(--amber); text-shadow: 0 0 18px rgba(255, 177, 84, 0.5); }

#chapterNote {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  text-align: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.36em;
  color: rgba(234, 246, 255, 0.58);
  opacity: 0;
  transition: opacity 0.8s ease;
  text-transform: uppercase;
}
#chapterNote.show { opacity: 1; }

#crosshair { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; opacity: 0.3; }
#crosshair i { display: block; width: 3px; height: 3px; background: var(--phosphor); box-shadow: 0 0 6px rgba(234, 246, 255, 0.6); }

#pauseBtn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 26px;
  height: 30px;
  padding: 4px;
  border: 0;
  background: transparent;
  opacity: 0.55;
  z-index: 8;
}
#pauseBtn img { width: 100%; height: 100%; object-fit: contain; }
#pauseBtn:hover { opacity: 1; }
.hud-tr { padding-top: 34px; }

#touchUI { position: absolute; inset: 0; pointer-events: none; display: none; }
body.touch #touchUI { display: block; }
#stick {
  position: absolute;
  z-index: 2;
  left: max(22px, env(safe-area-inset-left));
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px));
  width: 112px;
  height: 112px;
  border: 1px solid rgba(234, 246, 255, 0.22);
  border-radius: 50%;
  pointer-events: auto;
  background: rgba(5, 7, 14, 0.24);
}
#stick::before, #stick::after { content: ""; position: absolute; background: rgba(234, 246, 255, 0.12); }
#stick::before { left: 50%; top: 10%; width: 1px; height: 80%; }
#stick::after { top: 50%; left: 10%; height: 1px; width: 80%; }
#stickKnob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 1px solid rgba(95, 224, 255, 0.6);
  border-radius: 50%;
  background: rgba(95, 224, 255, 0.12);
  box-shadow: 0 0 14px rgba(95, 224, 255, 0.18);
}
#touchUse {
  position: absolute;
  z-index: 2;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(58px, calc(env(safe-area-inset-bottom) + 48px));
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 177, 84, 0.62);
  background: rgba(255, 177, 84, 0.08);
  color: var(--amber);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 18px;
  pointer-events: auto;
}
#touchUse:active { background: rgba(255, 177, 84, 0.22); }
#lookPad {
  position: absolute;
  right: 0;
  top: 16%;
  bottom: 150px;
  width: 55%;
  pointer-events: auto;
  z-index: 1;
}

#subtitleCinema {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  z-index: 9;
  max-width: min(820px, 86vw);
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.26em;
  line-height: 2;
  color: rgba(234, 246, 255, 0.9);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(5, 7, 14, 0.95);
}
#subtitleCinema.show { opacity: 1; }
#subtitleCinema em { font-style: normal; color: var(--amber); }

#wakeEye {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(95, 224, 255, 0.4));
  transition: opacity 1.4s ease;
}
#wakeEye.show { opacity: 0.72; }

#damageMark {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 86px;
  z-index: 11;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
#damageMark img { width: 100%; height: auto; }
#damageMark.flash { animation: damageflash 0.5s steps(2, end); }
@keyframes damageflash {
  0% { opacity: 0; transform: translateX(-50%) translateY(0); }
  20% { opacity: 0.85; transform: translateX(-50.4%) translateY(-2px); }
  50% { opacity: 0.3; transform: translateX(-49.6%) translateY(1px); }
  100% { opacity: 0; }
}

#titleScreen {
  position: absolute;
  inset: 0;
  z-index: 40;
  overflow: hidden;
  background: var(--abyss);
}
.title-bg {
  position: absolute;
  inset: -2%;
  background-image: url('../assets/alley_street_backdrop.webp');
  background-size: cover;
  background-position: center 54%;
  transform: scale(1.02);
  animation: bgdrift 40s ease-in-out infinite alternate;
  filter: saturate(1.02) brightness(0.9);
}
@keyframes bgdrift {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.09) translate(-1.2%, -1.6%); }
}
.title-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5, 7, 14, 0.56) 0%, rgba(5, 7, 14, 0.1) 34%, rgba(5, 7, 14, 0.44) 72%, rgba(5, 7, 14, 0.96) 100%),
    radial-gradient(90% 70% at 50% 42%, transparent 30%, rgba(5, 7, 14, 0.55) 100%);
}
.title-glitchline {
  position: absolute;
  left: 0;
  right: 0;
  top: 53%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 177, 84, 0.5), rgba(234, 246, 255, 0.65), rgba(95, 224, 255, 0.5), transparent);
  opacity: 0.25;
  animation: glitchline 9s steps(1, end) infinite;
}
@keyframes glitchline {
  0%, 88%, 100% { transform: translateX(0); opacity: 0.18; }
  89% { transform: translateX(7px); opacity: 0.5; }
  91% { transform: translateX(-5px); opacity: 0.3; }
  93% { transform: translateX(0); opacity: 0.18; }
}
.title-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(6vh, 30px) 22px max(4vh, 24px);
}
.stepline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.34em;
  color: rgba(234, 246, 255, 0.55);
  margin-bottom: 5vh;
}
.dot { width: 4px; height: 4px; background: var(--cyan); opacity: 0.7; }
.wordmarkwrap {
  position: relative;
  width: min(78vw, 780px);
  aspect-ratio: 1024 / 208;
}
.wm { position: absolute; inset: 0; width: 100%; height: 100%; }
.wm-top { clip-path: inset(0 0 50.5% 0); }
.wm-bottom { clip-path: inset(49.5% 0 0 0); animation: wmslip 7.5s steps(1, end) infinite; }
@keyframes wmslip {
  0%, 62%, 100% { transform: translateX(0); }
  63% { transform: translateX(7px); }
  65% { transform: translateX(-3px); }
  67% { transform: translateX(4px); }
  69% { transform: translateX(0); }
}
.tagline {
  margin-top: 2.4vh;
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.46em;
  color: rgba(234, 246, 255, 0.62);
}
.loadline { margin-top: 7vh; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.loadbar { width: min(300px, 62vw); height: 1px; background: rgba(234, 246, 255, 0.16); overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0%; background: linear-gradient(to right, var(--amber), var(--cyan)); transition: width 0.3s ease; }
.loadlabel { font-family: 'IBM Plex Mono', monospace; font-size: 8px; letter-spacing: 0.3em; color: rgba(234, 246, 255, 0.45); }
#enterBtn {
  margin-top: 4vh;
  padding: 15px 34px;
  border: 1px solid rgba(234, 246, 255, 0.42);
  background: rgba(5, 7, 14, 0.32);
  color: var(--phosphor);
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background 0.2s, opacity 0.2s;
}
#enterBtn:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); background: rgba(255, 177, 84, 0.07); }
#enterBtn:disabled { opacity: 0.3; cursor: default; }
#enterBtn:not(:disabled) { animation: enterpulse 3.4s ease-in-out infinite; }
@keyframes enterpulse {
  0%, 100% { box-shadow: 0 0 0 rgba(95, 224, 255, 0); }
  50% { box-shadow: 0 0 24px rgba(95, 224, 255, 0.09); }
}
.titlefoot {
  margin-top: auto;
  padding-top: 4vh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(234, 246, 255, 0.36);
}
.soundbtn {
  border: 1px solid rgba(234, 246, 255, 0.22);
  background: transparent;
  color: rgba(234, 246, 255, 0.55);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.22em;
  padding: 6px 10px;
  text-transform: uppercase;
}
.soundbtn:hover { color: var(--cyan); border-color: rgba(95, 224, 255, 0.5); }
.titlebuild { position: absolute; right: 14px; bottom: 10px; z-index: 3; font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 0.18em; color: rgba(234, 246, 255, 0.25); }

#pauseScreen, #completeScreen {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pause-veil, .complete-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 80% at 50% 50%, rgba(14, 26, 36, 0.86), rgba(5, 7, 14, 0.97)),
    repeating-linear-gradient(to bottom, rgba(95, 224, 255, 0.02) 0, rgba(95, 224, 255, 0.02) 1px, transparent 1px, transparent 4px);
}
.pause-inner { position: relative; width: min(560px, 92vw); text-align: center; }
.pausebars { width: 44px; height: auto; margin: 0 auto 16px; opacity: 0.82; }
.pausetitle { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: clamp(16px, 3.4vw, 24px); letter-spacing: 0.24em; color: var(--phosphor); }
.pausesub { margin-top: 7px; font-family: 'IBM Plex Mono', monospace; font-size: 8px; letter-spacing: 0.3em; color: rgba(234, 246, 255, 0.4); }
.pausegrid {
  margin: 28px auto 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(234, 246, 255, 0.1);
  border: 1px solid rgba(234, 246, 255, 0.12);
  max-width: 440px;
  text-align: left;
}
.pausegrid div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: rgba(5, 7, 14, 0.86); }
.pausegrid span { font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 0.24em; color: rgba(95, 224, 255, 0.6); }
.pausegrid b { font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 9px; letter-spacing: 0.18em; color: rgba(234, 246, 255, 0.82); }
.pausestats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 22px; font-family: 'IBM Plex Mono', monospace; font-size: 8px; letter-spacing: 0.22em; color: rgba(234, 246, 255, 0.48); }
.pausestats b { color: var(--phosphor); font-weight: 500; }
.pausebtns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pausebtns button, #continueBtn {
  padding: 13px 26px;
  border: 1px solid rgba(234, 246, 255, 0.4);
  background: rgba(5, 7, 14, 0.4);
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pausebtns button:hover, #continueBtn:hover { border-color: var(--amber); color: var(--amber); background: rgba(255, 177, 84, 0.07); }

.complete-inner { position: relative; width: min(640px, 92vw); text-align: center; }
.complete-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.38em; color: var(--cyan); }
.complete-wordmark { width: min(440px, 70vw); height: auto; margin: 18px auto 20px; opacity: 0.9; }
.complete-title { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: clamp(15px, 3vw, 22px); letter-spacing: 0.18em; color: var(--amber); }
.complete-copy { margin: 18px auto 0; max-width: 480px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; line-height: 1.9; letter-spacing: 0.06em; color: rgba(234, 246, 255, 0.72); text-transform: none; }
.complete-stats { margin: 22px 0; font-family: 'IBM Plex Mono', monospace; font-size: 8px; letter-spacing: 0.22em; color: rgba(234, 246, 255, 0.5); }
#continueBtn { margin-top: 8px; }

#rotateNote, #errorNote {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(5, 7, 14, 0.94);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.14em;
  color: rgba(234, 246, 255, 0.8);
  text-align: center;
}

@media (max-width: 720px) {
  .hud-tl { top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); }
  .hud-tr { top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); gap: 8px; padding-top: 30px; }
  .dialwrap { width: 62px; height: 62px; }
  .dialtime { font-size: 10px; }
  .readout { font-size: 8px; }
  .phase { font-size: 7px; letter-spacing: 0.2em; }
  .vitals { width: 116px; }
  .vitalsOffline { font-size: 6px; }
  .brandmark { width: 118px; }
  .hud-br { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .hud-bl { bottom: max(150px, calc(env(safe-area-inset-bottom) + 140px)); left: max(14px, env(safe-area-inset-left)); max-width: 52vw; }
  #prompt { bottom: max(128px, calc(env(safe-area-inset-bottom) + 120px)); }
  #subtitle { bottom: max(178px, calc(env(safe-area-inset-bottom) + 170px)); font-size: 10px; }
  .shardicon { width: 17px; }
  .shardtext { font-size: 8px; }
  .compass { width: 24px; }
  .stepline { margin-bottom: 3.4vh; }
  .tagline { letter-spacing: 0.3em; font-size: 8px; }
  .loadline { margin-top: 5vh; }
  .titlefoot { font-size: 7px; gap: 6px 12px; }
  #subtitleCinema { font-size: 10px; letter-spacing: 0.16em; bottom: 20%; }
}
@media (orientation: portrait) {
  .hud-bl { bottom: max(156px, calc(env(safe-area-inset-bottom) + 146px)); }
  .brandmark { width: 96px; opacity: 0.6; }
  .wordmarkwrap { width: min(92vw, 620px); }
  .title-inner { padding-top: max(5vh, 26px); }
  .pausegrid { grid-template-columns: 1fr; max-width: 330px; }
  #chapterNote { top: 22%; white-space: nowrap; }
  #toast { top: 27%; }
  #prompt { bottom: max(196px, calc(env(safe-area-inset-bottom) + 186px)); }
  .pglyph { height: 44px; }
}
@media (max-height: 520px) {
  .vitals { display: none; }
  .stepline { margin-bottom: 2vh; }
  .tagline { margin-top: 1.2vh; }
  .loadline { margin-top: 3vh; }
  #enterBtn { margin-top: 2.4vh; padding: 12px 26px; }
  .titlefoot { padding-top: 2vh; }
  .hud-bl { bottom: 16px; }
  #prompt { bottom: max(40px, calc(env(safe-area-inset-bottom) + 32px)); }
  #subtitle { bottom: max(82px, calc(env(safe-area-inset-bottom) + 74px)); }
}
@media (prefers-reduced-motion: reduce) {
  .title-bg, #enterBtn:not(:disabled), .wm-bottom, .title-glitchline { animation: none !important; }
}
