html, body { margin: 0; height: 100%; overflow: hidden; background: #000; font: 14px/1.4 system-ui, sans-serif; color: #1d252c; }
#app { position: fixed; inset: 0; }
button { font: inherit; color: inherit; }

/* menu button (the panel is closed by default) */
.fab { position: fixed; top: 10px; left: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); font-size: 20px; cursor: pointer; }
body.menu-open .fab { display: none; }
#loading { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px; border-radius: 12px; pointer-events: none; }
#loading[hidden] { display: none; }

#panel { position: fixed; top: 10px; left: 10px; width: 270px; max-height: calc(100% - 20px); overflow: auto;
  box-sizing: border-box; background: rgba(255, 255, 255, 0.94); border-radius: 8px; padding: 10px 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); overscroll-behavior: contain; }
#panel[hidden] { display: none; }
#panel .head { display: flex; justify-content: space-between; align-items: flex-start; }
#panel h1 { font-size: 16px; margin: 0; }
#panel .sub { color: #55606a; font-size: 12px; }
#panel .x { border: 0; background: none; font-size: 26px; line-height: 1; padding: 0 4px; cursor: pointer; color: #3b4650; }
#panel h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #55606a; margin: 10px 0 4px; }
#panel label { display: block; margin: 4px 0; }
#panel input[type=range] { width: 150px; vertical-align: middle; }
#panel .row { margin-top: 8px; }
#panel .row button, .chips button { padding: 4px 10px; margin: 0 4px 4px 0; border: 1px solid #9aa5ae;
  background: #f4f6f7; border-radius: 14px; cursor: pointer; }
#panel button.on { background: #2f5d7c; color: #fff; border-color: #2f5d7c; }
.chips { display: flex; flex-wrap: wrap; }
.chips label { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 10px 4px 0 !important; }
#panel details { margin-top: 8px; border-top: 1px solid #dde2e6; padding-top: 6px; }
#panel summary { cursor: pointer; color: #2f5d7c; font-weight: 600; font-size: 13px; }
#layers label { display: flex; gap: 6px; align-items: center; margin: 2px 0; }
#panel p { margin: 8px 0 0; }
.small { font-size: 12px; color: #3b4650; }

#crosshair { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 20px;
  text-shadow: 0 0 3px #000; display: none; pointer-events: none; }
body.walking #crosshair { display: block; }
/* touch screens: hold to walk */
#walkpad { position: fixed; right: 16px; bottom: 24px; display: none; flex-direction: column; gap: 10px; }
body.touch.walking #walkpad { display: flex; }
#walkpad button { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); font-size: 22px; touch-action: none; user-select: none; -webkit-user-select: none; }
#walkpad button.held { background: #2f5d7c; color: #fff; }
#hud { position: fixed; right: 10px; bottom: 10px; background: rgba(255, 255, 255, 0.85); padding: 4px 8px; border-radius: 4px; }
#hud[hidden] { display: none; }
#g-attr { position: fixed; left: 10px; bottom: 10px; background: rgba(255, 255, 255, 0.85); padding: 3px 8px; border-radius: 4px; display: none; max-width: 50%; }
#g-attr b { font-family: Arial, sans-serif; letter-spacing: 0.01em; }

/* phones: the menu is a sheet at the bottom; the view stays visible above it */
@media (max-width: 600px) {
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 55%; border-radius: 12px 12px 0 0; }
  body.touch.walking.menu-open #walkpad { display: none; }
}
