@import url('/rashinban/consultation.css');
@import url('/entrance-2f/compass-chat-compact.css');
@import url('/entrance-2f/compass-luna-float.css');
.palace-compass-host{position:fixed;inset:0;z-index:12000;background:#090f21;color:#e7eaf2;overflow:hidden;isolation:isolate;font:13px/1.6 system-ui,sans-serif}
.palace-compass-host[hidden],.palace-compass-host [hidden],.palace-compass-feedback[hidden]{display:none!important}
.palace-compass-scene,.palace-compass-frame{position:absolute;inset:0;width:100%;height:100%;border:0;margin:0;display:block;background:#090f21}
.palace-compass-header{position:absolute;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));z-index:6;display:flex;align-items:center;justify-content:space-between;gap:12px;pointer-events:none}
.palace-compass-header span{padding:6px 11px;border-radius:8px;background:#0b1528bf;color:#e3d2a8;text-shadow:0 1px 3px #000}
.palace-compass-host button,.palace-compass-feedback button{font:12px/1.4 system-ui,sans-serif;min-height:42px;padding:9px 13px;border:1px solid #c4ad7880;border-radius:8px;background:#111e34e8;color:#ead8ad;cursor:pointer;pointer-events:auto;touch-action:manipulation}
.palace-compass-loading{position:absolute;inset:0;z-index:4;display:grid;place-items:center;text-align:center;padding:32px;background:#0b1328cc;font-size:14px}
.palace-compass-corridor{position:absolute;inset:0;z-index:4;overflow:hidden;background:#0b1020;pointer-events:none}
.palace-compass-corridor img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1);transform-origin:50% 50%;will-change:transform}
.palace-compass-camera{position:absolute;z-index:6;display:flex;gap:7px;justify-content:center;left:10px;right:10px;bottom:max(12px,env(safe-area-inset-bottom));pointer-events:none}
.palace-compass-host .compass-dock{position:absolute;z-index:5;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));margin:0;bottom:80px;max-height:34svh;overflow:auto;overscroll-behavior:contain}
.palace-compass-host .compass-luna-float{z-index:5}
.palace-compass-feedback{position:fixed;left:12px;right:12px;bottom:max(20px,env(safe-area-inset-bottom));z-index:12001;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #c7ab7177;border-radius:10px;background:#111d32f5;color:#f2e1bf;font:12px/1.6 system-ui,sans-serif}
@media(max-height:560px) and (orientation:landscape){.palace-compass-host .compass-dock{left:auto;right:12px;width:min(42vw,390px);bottom:max(70px,env(safe-area-inset-bottom));max-height:min(68svh,290px)}.palace-compass-header span{font-size:11px}.palace-compass-header button{min-height:36px;padding:7px 11px}}
@media(prefers-reduced-motion:reduce){.palace-compass-corridor img{will-change:auto}}

.fortuna-palace-travelling #umiFoyerScene > [data-reading-door],.fortuna-palace-travelling #umiFoyerScene .fortuna-mobile-bar{pointer-events:none;opacity:.4}

/* The room remains visible above a low conversation dock in both app modes. */
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));max-height:calc(100svh - 126px);margin:0;padding:9px 11px;overflow:hidden;background:linear-gradient(130deg,#101b30f2,#0b1427f2)}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-expanded="false"]{max-height:220px}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock .compass-dock-head{align-items:center}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock .compass-latest{display:-webkit-box;line-height:1.65;font-size:12px;margin:0}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-panel{margin:0;padding:0;border:0}
.palace-compass-host.twofloor-host[data-view="observatory"] #compass-question{min-height:40px;height:40px}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-luna-float{z-index:7;right:14px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--compass-dock-height,162px) + 8px);width:clamp(108px,32vw,148px);max-height:35svh;aspect-ratio:450/563}
.palace-compass-host .palace-compass-camera{top:max(60px,calc(env(safe-area-inset-top) + 52px));bottom:auto;justify-content:flex-end;left:10px;right:10px;gap:5px}
.palace-compass-host .palace-compass-camera button{min-height:34px;font-size:10px;padding:6px 9px}
@media(max-height:560px) and (orientation:landscape){.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock{left:auto;right:10px;width:min(48vw,440px);bottom:max(8px,env(safe-area-inset-bottom));max-height:calc(100svh - 106px)}.palace-compass-host.twofloor-host[data-view="observatory"] .compass-detail-region{max-height:30svh}.palace-compass-host.twofloor-host[data-view="observatory"] .compass-luna-float{right:calc(min(48vw,440px) + 23px);bottom:max(10px,env(safe-area-inset-bottom));width:clamp(94px,16vw,128px);max-height:65svh}.palace-compass-host .palace-compass-camera{top:52px}}
body.fortuna-simple-mode .palace-compass-host .palace-compass-header{left:max(68px,env(safe-area-inset-left))}

/* 2026-11-13 owner correction: the observatory opens on Luna, NOT on the chat.
   The existing #compass-toggle opens/closes the real consultation, no duplicate
   controls or new gate. 2D Luna is an independent layer above the small dock. */
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-expanded="false"]{
 display:flex!important;flex-direction:column!important;gap:0!important;
 left:max(12px,env(safe-area-inset-left))!important;
 right:max(12px,env(safe-area-inset-right))!important;
 width:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;
 height:auto!important;min-height:58px!important;max-height:72px!important;
 padding:7px 12px!important;overflow:visible!important;
 background:linear-gradient(115deg,#0b1428f0,#211b35f0)!important;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-expanded="false"] .compass-dock-head{
 min-height:42px!important;flex:1 0 auto!important;align-items:center!important;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-expanded="false"] .compass-latest{
 -webkit-line-clamp:1!important;white-space:nowrap!important;max-width:calc(100% - 80px)!important;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock #compass-panel[hidden]{
 display:none!important;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-luna-float:not([hidden]){
 position:absolute!important;
 right:clamp(12px,4vw,64px)!important;
 bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--compass-dock-height,68px) + 12px)!important;
 width:clamp(180px,23vw,278px)!important;
 max-height:48svh!important;
 z-index:8!important;
 pointer-events:none!important;
}
@media(max-width:700px){
 .palace-compass-host.twofloor-host[data-view="observatory"] .compass-luna-float:not([hidden]){
  right:8px!important;width:clamp(140px,42vw,185px)!important;
  max-height:38svh!important;
 }
}
@media(max-height:560px) and (orientation:landscape){
 .palace-compass-host.twofloor-host[data-view="observatory"] .compass-luna-float:not([hidden]){
  width:clamp(105px,18vw,150px)!important;max-height:66svh!important;
  right:calc(min(48vw,440px) + 14px)!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
 }
}

/* 2026-11-22 WEB hotfix: corridor may preload conversation but must NEVER
   show reading controls before the actual observatory appears.
   [hidden] must beat the legacy closed-dock display:flex!important rule. */
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[hidden] {
  display:none!important;
}
/* The Android-approved reading button and independent 開く/閉じる row
   require two lines. The old 72px cap clipped the entire chat header. */
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-annual][data-expanded="false"]:not([hidden]) {
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
  padding:6px 10px!important;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-annual] .compass-reading-actions,
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-annual] .compass-chat-frame {
  flex-shrink:0;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-annual][data-expanded="false"] .compass-chat-frame {
  min-height:46px;
}
.palace-compass-host.twofloor-host[data-view="observatory"] .compass-dock[data-annual] #compass-toggle {
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  visibility:visible!important;
}
