:root { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #3f5143; background: #eae3d5; }
* { box-sizing: border-box; }
body { margin: 0; }
#viewer { position: relative; width: 100%; height: 100svh; min-height: 400px; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -4px; }
canvas:focus-visible { outline: 2px solid #527660; }
canvas { cursor: grab; }
canvas.dragging { cursor: grabbing; }
canvas.walking { cursor: crosshair; }
.modes button { padding: 9px 15px; }
button[hidden] { display: none; }
#walkpad { display: grid; grid-template-columns: repeat(4, 52px); gap: 6px; pointer-events: auto; }
#walkpad[hidden] { display: none; }
#walkpad button { background: #f5f0e5e8; border: 1px solid #fff9; font-size: 18px; padding: 12px 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#walkpad button:active { background: #44634c; color: #fff; }
@media (hover: hover) and (pointer: fine) { #walkpad { display: none !important; } }
header { position: absolute; top: 34px; left: 40px; pointer-events: none; }
.eyebrow { margin: 0 0 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.22em; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; background: #c18747; border-radius: 50%; }
h1 { font-family: Georgia, serif; font-size: clamp(28px, 3vw, 42px); font-weight: 400; letter-spacing: -0.045em; margin: 0; }
.subtitle { margin: 10px 0 0; font-size: 12px; color: #65695b; }
footer { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; }
.hint { font-size: 11px; margin: 0; letter-spacing: .03em; color: #535d50; background: #eee7d9bb; padding: 5px 10px; border-radius: 20px; }
.hint span { padding: 0 8px; }
nav { display: flex; gap: 5px; padding: 6px; border: 1px solid #fff9; background: #f5f0e5e8; border-radius: 30px; box-shadow: 0 6px 30px #534c3312; pointer-events: auto; }
button { border: none; border-radius: 22px; padding: 12px 17px; background: transparent; color: #455947; font-size: 16px; cursor: pointer; white-space: nowrap; transition: background .15s; }
button span { font: 500 12px ui-sans-serif, system-ui, sans-serif; margin-left: 5px; }
button:hover { background: #e4e4d5; }
button[aria-pressed="true"] { background: #44634c; color: #fff; }
button:focus-visible { outline: 2px solid #44634c; outline-offset: 2px; }
button:disabled { opacity: .45; cursor: wait; }
.audio { position: absolute; top: 32px; right: 32px; display: flex; align-items: center; padding: 4px 12px 4px 4px; background: #f5f0e5e8; border: 1px solid #fff9; border-radius: 30px; }
.audio input { width: 68px; accent-color: #44634c; margin-left: 8px; }
#status { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); max-width: min(90vw,450px); padding: 16px 22px; border-radius: 12px; background: #fff9eae8; color: #455947; font-size: 14px; text-align: center; }
#status[hidden] { display: none; }
noscript { position: absolute; top: 45%; left: 20px; right: 20px; text-align: center; }
@media (max-width: 600px) {
  header { top: 24px; left: 24px; }
  .subtitle { max-width: 240px; font-size: 11px; }
  footer { bottom: max(18px, env(safe-area-inset-bottom)); gap: 10px; }
  button { padding: 12px 11px; }
  button span { font-size: 11px; }
  .audio { top: 134px; left: 24px; right: auto; }
  nav { gap: 0; padding: 4px; }
  nav button { padding: 11px 8px; }
  nav button span { margin-left: 2px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.about-open { position: absolute; top: 92px; right: 32px; background: #f5f0e5e8; border: 1px solid #fff9; padding: 10px 16px; }
#about { max-width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 48px); padding: 0; border: none; border-radius: 18px; background: #f7f1e6; color: #3f5143; box-shadow: 0 20px 60px #2d2a1e40; }
#about::backdrop { background: #3f514355; backdrop-filter: blur(2px); }
#about article { padding: 28px 28px 24px; display: grid; gap: 12px; position: relative; }
#about h2 { font-family: Georgia, serif; font-weight: 400; font-size: 32px; letter-spacing: -0.03em; margin: 0; padding-right: 40px; text-wrap: balance; }
#about p { margin: 0; font-size: 15px; line-height: 1.6; }
#about .lede { color: #65695b; }
#about figure { margin: 6px 0; justify-self: center; transform: rotate(-1.5deg); }
#about img { display: block; width: min(100%, 300px); height: auto; border: 8px solid #fff; box-shadow: 0 8px 24px #2d2a1e2a; }
#about figcaption { font: italic 14px Georgia, serif; color: #65695b; text-align: center; margin-top: 8px; }
#about a { color: #44634c; font-weight: 600; }
#about .credits { font-size: 12px; color: #65695b; border-top: 1px solid #e2dccd; padding-top: 12px; }
#about .close { position: absolute; top: 16px; right: 16px; padding: 8px 12px; font-size: 16px; }
@media (max-width: 600px) { .about-open { top: 134px; right: 24px; } }
