/* Chao Adventure v0.8m isolated runtime panel, external HUD layer, and presentation authority. */
body #chao-adventure-panel.panel {
  position: fixed !important;
  left: 12px !important;
  top: 12px !important;
  width: calc(100vw - 24px) !important;
  height: calc(100vh - 24px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  transform: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  display: block;
  box-sizing: border-box;
}
body #chao-adventure-panel.panel.hidden { display: none !important; }
body #chao-adventure-panel.panel > .panel-header {
  position: absolute !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  width: auto !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
  cursor: move;
}
body #chao-adventure-panel.panel > .panel-header .panel-header-controls,
body #chao-adventure-panel.panel > .panel-header .panel-pin-btn,
body #chao-adventure-panel.panel > .panel-header .panel-close-x {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
body #chao-adventure-panel.panel > .panel-body {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 42px !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  z-index: 100 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body #chao-adventure-panel .ca-world-shell { position: absolute !important; inset: 0 !important; overflow: hidden !important; isolation: isolate !important; }
body #chao-adventure-panel #chao-adventure-viewport { position: absolute !important; inset: 0 !important; z-index: 1 !important; }
body #chao-adventure-panel #chao-adventure-canvas { z-index: 1 !important; }
body #chao-adventure-panel .ca-world-overlay { position: absolute !important; inset: 0 !important; display: block !important; visibility: visible !important; opacity: 1 !important; z-index: 1000 !important; pointer-events: none !important; }
body #chao-adventure-panel .ca-world-overlay .ca-world-actions,
body #chao-adventure-panel .ca-world-overlay .ca-event-panel { pointer-events: auto !important; }
body #chao-adventure-panel .ca-party-strip {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1100 !important;
  pointer-events: none !important;
}
body #chao-adventure-panel .ca-world-hud,
body #chao-adventure-panel .ca-world-actions,
body #chao-adventure-panel .ca-world-controls,
body #chao-adventure-panel .ca-event-panel { z-index: 810 !important; }
body.chao-adventure-active #chao-adventure-panel:not(.hidden) > .panel-header,
body.chao-adventure-active #chao-adventure-panel:not(.hidden) .ca-party-strip { display: flex !important; }
body.chao-adventure-active #focus-panel { display: none !important; }

/* Adventure owns its own isolated canvas. The global Garden3D singleton may
   follow the active host and move its previous Neutral Garden view into this
   panel. That secondary view is stale, visually wrong, and unnecessary work. */
body.chao-adventure-active #chao-adventure-panel.panel > #garden3d-garden-view,
body.chao-adventure-active #chao-adventure-panel.panel > .garden3d-garden-view {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  contain: strict !important;
}
body #chao-adventure-panel.panel > .panel-body { z-index: 100 !important; }

@media (max-width: 900px) {
  body #chao-adventure-panel.panel { left: 6px !important; top: 6px !important; width: calc(100vw - 12px) !important; height: calc(100vh - 12px) !important; max-width: calc(100vw - 12px) !important; max-height: calc(100vh - 12px) !important; }
}
