:root { color-scheme: dark; --paper: #f6eddd; --muted: #b9cbd4; --gold: #e9c892; --glass: rgba(12,28,41,.88); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #070e1a; color: var(--paper); font-family: system-ui, sans-serif; touch-action: none; user-select: none; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
header { position: fixed; top: 30px; left: 38px; right: 38px; display: flex; align-items: center; gap: 36px; pointer-events: none; }
.wordmark { font: 700 36px Georgia, serif; letter-spacing: .2em; text-shadow: 0 2px 16px #0008; }
.wordmark span { display: block; font: 9px system-ui, sans-serif; letter-spacing: .3em; margin-top: 7px; }
#place { padding-left: 28px; border-left: 1px solid #ffffff40; font-size: 11px; letter-spacing: .2em; }
.build-tag { margin-left: auto; border: 1px solid #c6dfed44; padding: 9px 12px; font-size: 10px; letter-spacing: .13em; border-radius: 4px; background: #12233088; }
#hud { position: fixed; left: 38px; bottom: 78px; max-width: 420px; padding: 24px 28px; border: 1px solid #bfd6db30; border-left: 3px solid var(--gold); background: linear-gradient(105deg, #10232feb, #10232faf); border-radius: 3px 14px 14px 3px; pointer-events: none; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: .18em; }
h1 { font: 32px Georgia, serif; margin: 12px 0 10px; font-weight: 400; }
p { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 0; }
#readout { display: flex; gap: 18px; padding-top: 18px; margin-top: 16px; border-top: 1px solid #c7d6dd20; font-size: 10px; letter-spacing: .06em; color: #c8e8ed; }
#status { font: 10px monospace; color: #8db2bd; margin-top: 8px; }
#actions { position: fixed; right: 38px; bottom: 78px; display: flex; gap: 9px; }
button, select { font: inherit; color: var(--paper); background: var(--glass); border: 1px solid #b7d1db55; border-radius: 9px; touch-action: none; }
button { padding: 13px 18px; font-size: 12px; cursor: pointer; min-height: 48px; }
button:hover, button:focus-visible { border-color: var(--gold); background: #294658; }
button:active { transform: translateY(2px); }
kbd { display: block; font: 9px system-ui; letter-spacing: .14em; margin-bottom: 6px; color: var(--gold); }
footer { position: fixed; bottom: 30px; left: 38px; right: 38px; text-align: center; color: #d0e3eb; font-size: 11px; letter-spacing: .02em; text-shadow: 0 1px 6px #000; }
footer b { margin: 0 18px; color: var(--gold); }
#crosshair { position: fixed; left: 50%; top: 48%; width: 15px; height: 15px; margin: -7px; border: 1px solid #ffffffaa; border-radius: 50%; pointer-events: none; }
#crosshair span { display: block; margin: 5px; width: 3px; height: 3px; border-radius: 50%; background: white; }
#toast { position: fixed; top: 135px; left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--gold); background: #10232fdd; border-radius: 30px; padding: 10px 22px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#name { position: fixed; top: 22%; left: 50%; transform: translateX(-50%); font: 38px Georgia, serif; text-shadow: 0 3px 12px black; pointer-events: none; }
#inspect-panel { position: fixed; top: 122px; right: 38px; width: 350px; background: var(--glass); border: 1px solid #c6dfed44; padding: 24px; border-radius: 12px; }
#inspect-panel label { display: block; font-size: 12px; margin: 20px 0 8px; }
select { width: 100%; padding: 10px; font-size: 12px; }
#inspect-panel p { margin: 15px 0; }
.inspect-actions { display: flex; gap: 6px; }
.inspect-actions button { padding: 10px; }
#model-detail { display: block; color: #88b1c0; font-size: 10px; margin-top: 18px; overflow-wrap: anywhere; }
#stick { position: fixed; width: 112px; height: 112px; border-radius: 50%; border: 2px solid #fff5; background: #fff1; pointer-events: none; }
#knob { position: absolute; left: 32px; top: 32px; width: 44px; height: 44px; border-radius: 50%; background: #fff7; }
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 30px; align-items: center; justify-content: center; background: #0b1726; }
.hidden { display: none; }
#loading.hidden { display: none; }
body.inspecting #hud, body.inspecting #actions, body.inspecting #crosshair { display: none; }
body.touch #help { font-size: 10px; }
body.touch kbd { display: none; }
@media (max-width: 800px) {
  header { top: 18px; left: 20px; right: 20px; gap: 16px; }
  .wordmark { font-size: 25px; } .wordmark span { font-size: 7px; }
  #place { font-size: 9px; padding-left: 16px; } .build-tag { display: none; }
  #hud { left: 20px; bottom: 132px; padding: 13px 16px; max-width: 280px; }
  h1 { font-size: 23px; margin: 8px 0; } p { font-size: 11px; }
  #readout { gap: 10px; font-size: 8px; padding-top: 10px; margin-top: 9px; }
  #actions { right: 18px; bottom: 40px; gap: 6px; } button { padding: 12px; }
  footer { bottom: 12px; left: 10px; right: 10px; font-size: 9px; }
  footer b { margin: 0 6px; } #inspect-panel { right: 18px; top: 90px; width: 300px; }
}
@media (max-height: 550px) { #hud { bottom: 70px; padding: 12px 18px; } #hud p { display: none; } #actions { bottom: 70px; } header { top: 14px; } }
body.touch #help { font-size: 0; }
body.touch #help::after { content: 'Left drag: walk   ·   Right drag: look and aim   ·   Tap an action'; font-size: 10px; }
body.touch.inspecting #help::after { content: 'Drag to orbit   ·   Use the zoom buttons   ·   Return to Ducky'; }
@media (max-width: 800px) {
  #inspect-panel { left: 12px; right: 12px; width: auto; top: auto; bottom: 38px; padding: 14px; }
  #inspect-panel p { display: none; }
  #inspect-panel label { margin: 10px 0 6px; }
  #model-detail { margin-top: 10px; }
}
