html, body { margin: 0; height: 100%; overflow: hidden; background: #edebe5; }
canvas { display: block; width: 100vw; height: 100vh; }
#caption {
  position: fixed; left: 18px; bottom: 14px; pointer-events: none;
  font: italic 13px/1.3 Georgia, 'Times New Roman', serif; color: #2a2826; opacity: 0.7;
}
#caption i { font-style: normal; }

/* walk mode overlay: a toggle, a centre dot and a hint line, all set like pencil notes on the margin */
#walk-btn, #sound-btn {
  position: fixed; left: 18px; top: 14px; z-index: 2; cursor: pointer;
  font: 13px/1 Georgia, 'Times New Roman', serif; letter-spacing: 0.04em; color: #2a2826;
  background: rgba(237, 235, 229, 0.85); border: 1px solid #2a2826; padding: 7px 12px;
}
#sound-btn { top: 48px; }
#walk-btn:hover, #sound-btn:hover { background: #2a2826; color: #edebe5; }
#dot, #hint { display: none; }
body.walking #dot {
  display: block; position: fixed; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: #1a1918; opacity: 0.75; pointer-events: none;
}
body.walking #hint {
  display: block; position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); max-width: 80vw;
  text-align: center; pointer-events: none; font: italic 13px/1.4 Georgia, serif; color: #2a2826;
  background: rgba(237, 235, 229, 0.8); padding: 4px 10px;
}
body.walking.hide-hint #hint, body.walking #caption { display: none; }

/* reference overlay for lining up the print view: the print, 50%, scaled to the canvas height */
#overlay { display: none; position: fixed; top: 0; left: 50%; height: 100vh; transform: translateX(-50%); opacity: 0.5; pointer-events: none; z-index: 1; }
#overlay.on { display: block; }
body.walking #overlay { display: none; }

/* F target: the dot becomes a ring with a short prompt; a miss shakes it. The prompt ignores H. */
#aim { display: none; position: fixed; left: 50%; top: calc(50% + 14px); transform: translateX(-50%); pointer-events: none;
  font: italic 12px/1 Georgia, serif; color: #1a1918; background: rgba(237, 235, 229, 0.75); padding: 2px 6px; }
body.walking.aiming #aim { display: block; }
body.walking.aiming #dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: none; border: 1.5px solid #1a1918; }
body.walking #dot.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
body.walking .lil-gui.root { display: none; }
#hint { white-space: nowrap; }

/* standing on a viewpoint plinth */
#plinth { display: none; position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); pointer-events: none;
  font: italic 13px/1.3 Georgia, serif; color: #1a1918; background: rgba(237, 235, 229, 0.85); padding: 3px 9px; }
body.walking.on-plinth #plinth { display: block; }
