:root {
  --bone: #d8d0c0;
  --dim: #8a8478;
  --blood: #8a0c0c;
  --panel: rgba(8, 7, 6, 0.92);
  --line: rgba(216, 208, 192, 0.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--bone); overflow: hidden; font-family: 'Inter', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; background: #000; }
.hidden { display: none !important; }
.dim { color: var(--dim); font-size: 13px; }
.center { text-align: center; }

#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.75) 100%); }
#flash { position: fixed; inset: 0; pointer-events: none; background: #fff; opacity: 0; }
#fade { position: fixed; inset: 0; pointer-events: none; background: #000; opacity: 1; transition: opacity 1.2s; }
#slats { position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.96) 0 34px, rgba(0,0,0,0.25) 34px 46px), radial-gradient(ellipse at center, transparent 20%, #000 80%); }

#hud { position: fixed; inset: 0; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: rgba(216,208,192,0.55); transition: transform .15s, background .15s; }
#crosshair.active { transform: scale(2.4); background: rgba(255,240,210,0.9); }
#prompt { position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%); font-size: 15px; letter-spacing: .04em; text-shadow: 0 0 6px #000, 0 0 2px #000; white-space: nowrap; }
#prompt kbd { display: inline-block; border: 1px solid var(--bone); border-radius: 3px; padding: 0 6px; margin-right: 6px; font-family: inherit; font-size: 12px; }
#objective { position: absolute; left: 24px; top: 22px; max-width: min(340px, 30vw); opacity: 0; transition: opacity 1s; text-shadow: 0 0 6px #000; }
#objective.show { opacity: .75; }
#objective.show.fresh { opacity: 1; }
#objective .label { display: block; font-size: 11px; letter-spacing: .3em; color: var(--dim); margin-bottom: 4px; }
#objective-text { font-family: 'IM Fell English', serif; font-size: 20px; }
#subtitles { position: absolute; left: 50%; bottom: 13vh; transform: translateX(-50%); width: min(820px, 92vw); text-align: center; font-size: 19px; line-height: 1.4; text-shadow: 0 0 8px #000, 0 0 2px #000; }
#subtitles b { color: #b8c8d8; font-weight: 600; letter-spacing: .08em; font-size: 14px; margin-right: 8px; }
#subtitles b.voice { color: #d04040; }
#subtitles b.harry { color: #d8c8a0; }
#toast { position: absolute; left: 50%; top: 18vh; transform: translateX(-50%); font-family: 'IM Fell English', serif; font-size: 22px; text-shadow: 0 0 8px #000; opacity: 0; transition: opacity .6s; text-align: center; width: 90vw; }
#toast.show { opacity: 1; }
#meters { position: absolute; right: 24px; bottom: 22px; display: grid; gap: 6px; opacity: .8; }
.meter { display: grid; grid-template-columns: 62px 120px 30px; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .22em; color: var(--dim); }
.bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--bone); transition: width .2s; }
#battery-spares { font-weight: 400; color: var(--bone); font-size: 11px; letter-spacing: 0; }
#hint-q { position: absolute; right: 24px; bottom: 76px; font-size: 12px; color: var(--dim); letter-spacing: .1em; }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 28px 32px; width: min(460px, 92vw); max-height: 88vh; overflow: auto; }
.panel.wide { width: min(860px, 94vw); }
.panel h2 { font-family: 'IM Fell English', serif; font-weight: 400; font-size: 28px; margin: 0 0 16px; }
.panel h3 { font-size: 13px; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.panel label { display: grid; gap: 6px; margin: 14px 0; font-size: 14px; }
.panel label.check { display: flex; gap: 10px; align-items: center; }
.panel input[type=range] { width: 100%; accent-color: #a08a70; }
.panel select { background: #141210; color: var(--bone); border: 1px solid var(--line); padding: 8px; font: inherit; }
.panel table { border-collapse: collapse; width: 100%; font-size: 14px; }
.panel td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.panel td:first-child { color: var(--dim); width: 45%; }
.panel p { font-size: 14px; line-height: 1.6; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .cols { grid-template-columns: 1fr; } }

#inventory { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); }
#inventory ul { list-style: none; margin: 0 0 18px; padding: 0; }
#inventory li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
#inventory li small { display: block; color: var(--dim); margin-top: 2px; }
#inventory li.doc { cursor: pointer; pointer-events: auto; }
#inventory li.doc:hover { color: #fff; }
#inventory { pointer-events: auto; }

#note { position: fixed; inset: 0; display: grid; place-content: center; gap: 12px; background: rgba(0,0,0,0.78); padding: 16px; }
#note-paper { width: min(620px, 92vw); max-height: 78vh; overflow: auto; padding: 38px 44px; color: #2a2016;
  background: #d9cfb4 radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.25), transparent 60%), #d9cfb4;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 0 60px rgba(90,60,20,0.35); transform: rotate(-0.6deg); }
#note-paper.file { font-family: 'Special Elite', monospace; background-color: #cfcab8; }
#note-paper.diary, #note-paper.letter { font-family: 'IM Fell English', serif; }
#note-title { margin: 0 0 18px; font-size: 20px; border-bottom: 1px solid rgba(40,30,20,0.3); padding-bottom: 10px; }
#note-body { white-space: pre-wrap; font: inherit; font-size: 17px; line-height: 1.6; margin: 0; }
#note-paper.file #note-body { font-size: 15px; }

#keypad { position: fixed; inset: 0; display: grid; place-content: center; background: rgba(0,0,0,0.6); }
.keypad-box { background: #1a1917; border: 1px solid #3a3834; padding: 24px; border-radius: 6px; box-shadow: 0 20px 50px #000; }
#keypad-display { font-family: 'Special Elite', monospace; font-size: 38px; letter-spacing: .4em; text-align: center; background: #0c1a0c; color: #7adf7a; padding: 12px 0 12px .4em; margin-bottom: 16px; border-radius: 3px; text-shadow: 0 0 8px #3a8a3a; }
#keypad-display.bad { color: #df4a4a; background: #1a0c0c; text-shadow: 0 0 8px #8a2a2a; }
.keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; justify-content: center; }
.keys button { height: 56px; font-size: 22px; background: linear-gradient(#3a3834, #24221f); color: var(--bone); border: 1px solid #4a4640; border-radius: 4px; cursor: pointer; font-family: inherit; }
.keys button:active { transform: translateY(1px); background: #1a1917; }

.screen { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.7); padding: 16px; }
#title { background: radial-gradient(ellipse at 50% 60%, rgba(20,10,8,0.05), rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%); }
.title-inner { text-align: center; max-width: 640px; }
.kicker { font-size: 12px; letter-spacing: .45em; color: var(--dim); text-transform: uppercase; }
h1 { font-family: 'IM Fell English', serif; font-weight: 400; font-size: clamp(64px, 16vw, 150px); letter-spacing: .12em; margin: 8px 0 0; color: var(--bone); text-shadow: 0 0 40px rgba(140,20,20,0.35); animation: flick 7s infinite; }
h1.red { color: #b01818; font-size: clamp(42px, 10vw, 96px); }
@keyframes flick { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .4; } 94% { opacity: 1; } 96% { opacity: .6; } }
.subtitle { font-family: 'IM Fell English', serif; font-style: italic; font-size: 20px; color: var(--dim); margin: 0 0 36px; }
.menu { display: grid; gap: 10px; justify-content: center; }
button { font-family: 'Inter', sans-serif; }
.menu button, .panel > button, .panel .back { min-width: 240px; padding: 12px 24px; background: transparent; color: var(--bone); border: 1px solid var(--line); font-size: 14px; letter-spacing: .25em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s; }
.panel > button { display: block; width: 100%; margin-top: 10px; }
.menu button:hover:not(:disabled), .panel button:hover { background: rgba(216,208,192,0.08); border-color: var(--bone); }
.menu button:disabled { opacity: .5; cursor: wait; }
#loadbar { width: 240px; height: 2px; margin: 24px auto 0; background: rgba(255,255,255,0.08); }
#loadbar i { display: block; height: 100%; width: 0; background: var(--bone); transition: width .3s; }
.note-small { font-size: 12px; color: var(--dim); margin-top: 28px; line-height: 1.6; }
#ending { background: #000; overflow: auto; }
.ending-inner { max-width: 680px; padding: 40px 12px; }
.ending-inner h1 { font-size: clamp(32px, 7vw, 60px); letter-spacing: .08em; animation: none; }
#ending-body { white-space: pre-wrap; font-family: 'IM Fell English', serif; font-size: 19px; line-height: 1.7; color: var(--bone); }
#ending-stats { color: var(--dim); font-size: 13px; letter-spacing: .1em; margin: 28px 0; }
#clicktoplay { cursor: pointer; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim);  flex-direction: column; gap: 10px; }
#clicktoplay .dim { font-size: 11px; letter-spacing: .15em; opacity: .7; }

@media (max-width: 700px) {
  #meters { right: 12px; bottom: auto; top: 16px; }
  .meter { grid-template-columns: 48px 70px 24px; }
  #objective { left: 12px; top: 12px; max-width: 55vw; }
  #objective-text { font-size: 15px; }
  #subtitles { font-size: 15px; bottom: 210px; }
}

/* phones and tablets */
@media (pointer: coarse) {
  #meters { right: auto; left: 50%; transform: translateX(-50%); top: 12px; bottom: auto; }
  .meter { grid-template-columns: 66px 80px 20px; }
  #subtitles { bottom: 34vh; width: min(640px, 60vw); font-size: 15px; }
  #hint-q { display: none; }
  #prompt { top: calc(50% + 24px); font-size: 14px; }
}
@media (max-height: 520px) {
  h1 { font-size: clamp(44px, 12vh, 90px); }
  .subtitle { margin-bottom: 14px; font-size: 16px; }
  .kicker { margin: 0; }
  .menu { gap: 6px; }
  .menu button { padding: 8px 18px; }
  .note-small { margin-top: 10px; }
  #loadbar { margin-top: 10px; }
  .screen { overflow: auto; align-items: start; }
  .title-inner { padding-top: 8px; }
  .ending-inner { padding-top: 12px; }
}

#guide { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,226,168,0.25); border-radius: 20px; font-size: 13px; letter-spacing: .04em; color: #ffe2a8; text-shadow: 0 0 4px #000; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#guide-arrow { width: 22px; height: 22px; flex: none; display: grid; place-items: center; transition: transform .15s linear; }
#guide-arrow::before { content: ''; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 16px solid #ffe2a8; filter: drop-shadow(0 0 3px rgba(255,200,120,0.7)); }
@media (pointer: coarse) { #guide { top: 44px; font-size: 12px; } }

/* ---------- touch controls: everything round ---------- */
#touch { position: fixed; inset: 0; pointer-events: none; --tb-bg: rgba(12,10,9,0.55); --tb-line: rgba(216,208,192,0.28); --tb-on: #ffe2a8; }
#touch button { font-family: 'Inter', sans-serif; }
#stick { position: absolute; left: calc(20px + env(safe-area-inset-left, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 132px; height: 132px; border-radius: 50%; pointer-events: auto; touch-action: none;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0 55%, rgba(0,0,0,0.35) 56%); border: 1.5px solid var(--tb-line); box-shadow: inset 0 0 24px rgba(0,0,0,0.6); }
#stick-ring { position: absolute; inset: 22%; border-radius: 50%; border: 1px dashed rgba(216,208,192,0.18); }
#stick-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.45), rgba(216,208,192,0.18) 60%); border: 1.5px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6); transition: transform .18s cubic-bezier(.3,1.6,.5,1); }
#stick.active #stick-knob { transition: none; background: radial-gradient(circle at 35% 30%, rgba(255,240,210,0.7), rgba(255,226,168,0.25) 60%); }

.tb { position: absolute; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 50%; pointer-events: auto; touch-action: none;
  width: 58px; height: 58px; padding: 0; color: #e8e0d0; background: var(--tb-bg); border: 1.5px solid var(--tb-line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 16px rgba(0,0,0,0.45);
  transition: transform .12s ease, background .2s, border-color .2s, box-shadow .2s, opacity .2s; }
.tb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tb span { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; line-height: 1; }
.tb.pressed { transform: scale(0.88); background: rgba(255,226,168,0.28); }
.tb.on { color: #1a1208; background: var(--tb-on); border-color: var(--tb-on); box-shadow: 0 0 18px rgba(255,226,168,0.55); }
.tb.off { opacity: .35; }
.tb.big { width: 82px; height: 82px; }
.tb.big svg { width: 30px; height: 30px; }
.tb.big.ready { border-color: var(--tb-on); box-shadow: 0 0 0 0 rgba(255,226,168,0.6); animation: ready 1.4s ease-out infinite; }
@keyframes ready { 0% { box-shadow: 0 0 0 0 rgba(255,226,168,0.55); } 100% { box-shadow: 0 0 0 18px rgba(255,226,168,0); } }
.tb.small { width: 46px; height: 46px; }
.tb.small svg { width: 19px; height: 19px; }
.tb.small span { display: none; }

/* action cluster: USE in the corner, the others on an arc around it */
#actions { position: absolute; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 176px; height: 176px; pointer-events: none; }
#actions .tb.big { right: 0; bottom: 0; }
#actions [data-t="run"] { right: 104px; bottom: 6px; }
#actions [data-t="crouch"] { right: 84px; bottom: 84px; }
#actions [data-t="light"] { right: 6px; bottom: 104px; }

/* small round menu buttons down the right edge */
#menu-btns { position: absolute; right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); display: grid; gap: 10px; pointer-events: none; }
#menu-btns .tb { position: static; }

@media (pointer: coarse) {
  #meters { right: auto; left: calc(20px + env(safe-area-inset-left, 0px)); top: auto; transform: none; bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
  .meter { grid-template-columns: 58px 64px 20px; font-size: 9px; }
  #objective { left: 14px; top: calc(12px + env(safe-area-inset-top, 0px)); max-width: calc(100vw - 90px); }
  #objective-text { font-size: 15px; }
  #guide { top: calc(60px + env(safe-area-inset-top, 0px)); max-width: calc(100vw - 90px); font-size: 12px; }
  #subtitles { bottom: calc(215px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 32px); font-size: 14px; }
  #prompt { font-size: 13px; }
  #toast { font-size: 17px; top: 26vh; }
  #hint-q { display: none; }
  #inventory { right: 8px; left: 8px; width: auto; }
}
/* landscape phones: less height, so controls sit lower and subtitles narrower */
@media (pointer: coarse) and (orientation: landscape) {
  #meters { left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  #subtitles { bottom: calc(46px + env(safe-area-inset-bottom, 0px)); width: min(520px, 56vw); }
  #guide { top: calc(12px + env(safe-area-inset-top, 0px)); }
  #objective { max-width: 30vw; }
  #menu-btns { grid-auto-flow: column; }
}

/* rounded menus to match the controls */
.menu button, .panel > button, .panel .back { border-radius: 999px; }
.menu button:active, .panel > button:active { transform: scale(0.97); }
.panel { border-radius: 22px; }
.panel select { border-radius: 12px; }
#inventory { border-radius: 22px; }
.keypad-box { border-radius: 26px; }
#keypad-display { border-radius: 14px; }
.keys { grid-template-columns: repeat(3, 68px); }
.keys button { width: 68px; height: 68px; border-radius: 50%; transition: transform .1s, background .15s; }
.keys button:active { transform: scale(0.9); background: #4a4640; }
#note-paper { border-radius: 10px; }
.keypad-box { position: relative; }
#keypad-close { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #24221f; color: var(--bone); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,0.6); }
#keypad-close:active { transform: scale(0.9); }
#touch.covered { visibility: hidden; }

/* frame-rate readout and the graphics line in Settings */
#fps { position: fixed; left: 12px; bottom: 10px; font: 11px/1.3 Inter, sans-serif; color: #9fe39f; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 10px; pointer-events: none; z-index: 5; }
.perf-info { font-size: 12px; line-height: 1.5; color: var(--dim); margin: 6px 0 12px; max-width: 420px; }

/* ---------- mini-map (turns with you; top right) ---------- */
#minimap-wrap { position: absolute; right: 22px; top: 18px; width: 190px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; pointer-events: auto; z-index: 3; }
#minimap { width: 190px; height: 190px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 6px 22px rgba(0,0,0,.6); display: block; }
#mm-floor { white-space: nowrap; font: 700 10px/1 Inter, sans-serif; letter-spacing: .18em; color: #111; background: #ffe2a8; padding: 4px 10px; border-radius: 999px; margin-bottom: 2px; position: relative; z-index: 1; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
#mm-room { font: 600 12px/1 Inter, sans-serif; color: #fff; background: rgba(0,0,0,.65); padding: 4px 12px; border-radius: 999px; margin-top: -14px; position: relative; letter-spacing: .04em; }
#mm-goal { margin-top: 4px; width: 230px; background: rgba(0,0,0,.62); border: 1px solid rgba(255,207,74,.35); border-radius: 14px; padding: 7px 12px; font: 12px/1.35 Inter, sans-serif; color: #fff; text-align: center; }
#mm-goal b { display: block; color: #ffcf4a; font-weight: 600; }
#mm-goal b::before { content: '★ '; }
#mm-goal span { color: #ddd; }
#guide { display: none !important; }

/* ---------- full map ---------- */
#bigmap { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: grid; place-items: center; z-index: 20; padding: 12px; }
.bigmap-box { box-sizing: border-box; position: relative; width: min(1100px, 100%); height: min(760px, calc(100vh - 24px), 100%); background: #101216; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
#bigmap-canvas { flex: 1; width: 100%; min-height: 0; border-radius: 14px; background: #0b0d10; }
#bigmap-goal { margin: 0 44px 0 4px; font: 14px/1.4 Inter, sans-serif; color: #fff; }
#bigmap-goal b { color: #ffcf4a; }
#bigmap-goal span { color: #bbb; margin-left: 6px; }
#bigmap-close { position: absolute; right: 12px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
#bigmap-close:hover { background: rgba(255,255,255,.18); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 12px/1.2 Inter, sans-serif; color: #ddd; }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { display: inline-grid; place-items: center; width: 18px; height: 18px; font-style: normal; font-size: 13px; }
.lg-you { clip-path: polygon(50% 0, 100% 100%, 50% 75%, 0 100%); background: #fff; }
.lg-goal { color: #ffcf4a; font-size: 16px !important; }
.lg-route { height: 4px !important; background: repeating-linear-gradient(90deg, #ffcf4a 0 6px, transparent 6px 10px); }
.lg-door { height: 5px !important; background: #e0a458; border-radius: 3px; }
.lg-open { height: 3px !important; background: repeating-linear-gradient(90deg, rgba(140,230,140,.8) 0 3px, transparent 3px 6px); }
.lg-locked { height: 5px !important; background: #ff5a4d; border-radius: 3px; }
.lg-hide { width: 11px !important; height: 16px !important; background: rgba(90,170,255,.9); border-radius: 3px; }
.lg-her { background: #ff2a2a; border-radius: 50%; color: #fff; font-weight: 800; }

@media (max-width: 700px) {
  #meters { right: auto; left: 12px; top: auto; bottom: 16px; }
  #minimap-wrap { right: 12px; top: 12px; width: 140px; }
  #minimap { width: 140px; height: 140px; }
  #mm-goal { width: 170px; font-size: 11px; }
}
@media (pointer: coarse) {
  #minimap-wrap { right: calc(80px + env(safe-area-inset-right, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); width: 124px; }
  #minimap { width: 124px; height: 124px; }
  #mm-floor { font-size: 9px; padding: 3px 8px; }
  #mm-room { font-size: 11px; }
  #mm-goal { width: 150px; font-size: 11px; padding: 5px 8px; }
  #objective { max-width: calc(100vw - 240px); }
  .legend { font-size: 11px; gap: 4px 10px; }
}
@media (pointer: coarse) and (orientation: landscape) {
  #minimap-wrap { right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(66px + env(safe-area-inset-top, 0px)); width: 98px; }
  #minimap { width: 98px; height: 98px; }
  #mm-floor { font-size: 8px; }
  #mm-room { font-size: 10px; padding: 3px 8px; }
  #mm-goal { position: absolute; right: calc(100% + 8px); top: 22px; width: 170px; margin: 0; }
  #objective { max-width: 30vw; }
}
