@import '../escape-mini-map.css?v=20261114-cardinal-v1';
/* Keep the map outside the transforming header and reserve its lower corner. */
.scene-shell>.house-plan-toggle{position:fixed;z-index:25;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:minmax(0,1fr) auto;width:148px;height:60px;min-width:0;min-height:60px;gap:6px;padding:5px 10px;border:1px solid #b9985c;border-radius:5px;background:#211e18;color:#e9d7ae;box-shadow:inset 0 0 18px #0004;pointer-events:auto;touch-action:manipulation;transform:none;transition:background .15s}
.scene-shell>.house-plan-toggle:hover{background:#342c20}
.scene-shell>.house-plan-toggle:active{transform:none}
.scene-shell .bottom-tools{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.scene-shell .message-recall{right:calc(176px + env(safe-area-inset-right,0px));bottom:calc(22px + env(safe-area-inset-bottom,0px))}
.scene-shell .inventory-tray{bottom:calc(89px + env(safe-area-inset-bottom,0px))}
/* Leave a free lane at each cardinal edge. Observation targets remain in the
   painting; their reading cards fit beside the central top/bottom controls. */
.scene-shell .scene-observation{left:76px;width:min(420px,calc(50% - 110px))}
.scene-shell .scene-observation.observation-right{left:auto;right:76px}
.scene-shell .scene-focus-label{left:76px;top:140px;max-width:calc(100% - 152px)}
.inside-painting .status-toast:not(.workshop-notice){bottom:calc(152px + env(safe-area-inset-bottom,0px));max-width:min(430px,calc(100vw - 140px));pointer-events:none}
.inside-painting.inventory-open .status-toast:not(.workshop-notice){top:calc(136px + env(safe-area-inset-top,0px));bottom:auto}
.scene-shell.is-contemplating>.house-plan-toggle{visibility:hidden;pointer-events:none}
.hud-asleep .scene-shell>.house-plan-toggle{opacity:1;translate:none;pointer-events:auto}
.reduce-motion .scene-shell>.house-plan-toggle{transition:none}
@media(prefers-reduced-motion:reduce){.scene-shell>.house-plan-toggle{transition:none}}
@media(max-width:760px){
 .scene-shell>.house-plan-toggle{right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(14px + env(safe-area-inset-bottom,0px));width:100px;height:58px;min-height:58px;grid-template-columns:1fr;padding:3px 7px;gap:0}
 .house-plan-toggle .escape-mini-map-drawing{width:100%;height:40px}
 .scene-shell>.house-plan-toggle>.control-label{font-size:10px;line-height:1}
 .scene-shell .bottom-tools{left:calc(12px + env(safe-area-inset-left,0px));right:auto;bottom:calc(14px + env(safe-area-inset-bottom,0px));transform:none;max-width:calc(100% - 132px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));gap:2px;padding:5px 6px}
 .scene-shell .bottom-tools .icon-button{min-width:44px;padding:7px 6px}
 .scene-shell .message-recall{right:calc(12px + env(safe-area-inset-right,0px));bottom:calc(80px + env(safe-area-inset-bottom,0px))}
 .scene-shell .inventory-tray{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:760px) and (orientation:portrait){
 .scene-shell .scene-observation,.scene-shell .scene-observation.observation-right{left:64px;right:64px;width:auto;bottom:calc(150px + env(safe-area-inset-bottom,0px));max-height:min(55svh,calc(100svh - 284px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)))}
 .scene-shell .scene-observation.observation-above{top:calc(136px + env(safe-area-inset-top,0px));bottom:auto}
 .scene-shell .scene-focus-label{left:64px;max-width:calc(100% - 128px)}
}
@media(orientation:landscape) and (max-height:600px){
 .inside-painting .status-toast:not(.workshop-notice){bottom:calc(128px + env(safe-area-inset-bottom,0px))}
 .inside-painting.inventory-open .status-toast:not(.workshop-notice){top:calc(122px + env(safe-area-inset-top,0px));bottom:auto}
 .scene-shell>.house-plan-toggle{right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(9px + env(safe-area-inset-bottom,0px));width:118px;height:48px;min-height:48px;grid-template-columns:minmax(0,1fr) auto;padding-block:3px}
 .house-plan-toggle .escape-mini-map-drawing{width:100%;max-width:74px;height:38px}
 .scene-shell>.house-plan-toggle>.control-label{font-size:12px;line-height:1.2}
 .scene-shell .bottom-tools{left:auto;right:calc(202px + env(safe-area-inset-right,0px));bottom:calc(9px + env(safe-area-inset-bottom,0px))}
 .scene-shell .message-recall{right:calc(146px + env(safe-area-inset-right,0px));bottom:calc(14px + env(safe-area-inset-bottom,0px))}
 .scene-shell .inventory-tray{bottom:calc(64px + env(safe-area-inset-bottom,0px))}
}
.house-plan-toggle>.control-label{display:block;font:600 12px/1.2 Georgia,serif;letter-spacing:.01em;pointer-events:none}
.house-plan-toggle .icon{width:21px;height:21px}
dialog.navigation-dialog{width:fit-content;max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);border-color:#a98a55}
.navigation-dialog .dialog-head{padding:16px 20px;background:#251c13;color:#efdfbd}
.navigation-dialog .dialog-body{padding:12px 18px 16px;background:#d9c296;color:#392a1b}
.house-plan{min-width:0;width:min(1000px,calc(100vw - 64px),calc((100svh - 190px)*var(--house-plan-ratio)))}
.house-plan-instruction{margin:0 0 9px!important;font:14px/1.5 Georgia,serif!important;color:#493421!important}
.house-plan-board{position:relative;width:100%;isolation:isolate;border:1px solid #a38453;border-radius:3px;overflow:hidden;background-color:#e4d1aa;background-size:100% 100%;background-position:center;box-shadow:inset 0 0 28px #79542624,0 2px 5px #654a2924;container-type:inline-size}
.house-plan-ground{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.house-plan-ground *{pointer-events:none}
.plan-courtyard{fill:#b0b49420;stroke:#847b545c;stroke-width:2;stroke-linejoin:round}
.plan-courtyard path,.plan-courtyard circle{fill:none}
.plan-compass{fill:none;stroke:#705638;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.plan-compass text{stroke:none;fill:#705638;font:16px Georgia,serif}
.house-plan-inscription{position:absolute;font:italic 21px/1.2 Georgia,serif;color:#725438;pointer-events:none}
.house-plan-courtyard-label{position:absolute;text-align:center;font:italic 15px/1.2 Georgia,serif;color:#797148;pointer-events:none}
/* The whole room is its hit area. In particular, global button :active rules
   must never replace a centering transform and move a room during release. */
.house-plan-board>button.house-plan-room,
.house-plan-board>button.house-plan-room:hover,
.house-plan-board>button.house-plan-room:active:not(:disabled){position:absolute;display:block;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;color:#3d2b1c;text-align:center;transform:none;translate:none;scale:none;transition:none;touch-action:manipulation;cursor:pointer;overflow:visible}
.house-plan-board>button.house-plan-room:focus-visible{outline:2px solid #2d654b;outline-offset:-6px}
.house-plan-room>*{pointer-events:none}
.house-plan-room-drawing{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.house-plan-room-drawing *{pointer-events:none}
.plan-floor{fill:#e8d6af5e;stroke:none}
.plan-floor-pattern{stroke:none;opacity:.42}
.plan-floor-grain{fill:none;stroke:#8f7242;stroke-width:1;opacity:.33}
.plan-furniture{fill:#bb9a6124;stroke:#94713f;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.63}
.plan-wall-base{fill:none;stroke:#7c603c;stroke-width:8;stroke-linecap:butt;stroke-linejoin:round;opacity:.73}
.plan-wall-ink{fill:none;stroke:#493822;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.plan-door-leaf{fill:none;stroke:#715234;stroke-width:3;stroke-linecap:round}
.plan-door-swing{fill:none;stroke:#927347;stroke-width:1.5;stroke-dasharray:3 3;opacity:.8}
.house-plan-room:hover .plan-floor{fill:#f8e8bdb0}
.house-plan-room.current .plan-floor{fill:#7c9d6545}
.house-plan-room.unvisited .plan-floor{fill:#68563a75}
.house-plan-room:active:not(:disabled) .plan-floor{fill:#c5ad7775}
.house-plan-room-label{position:absolute;inset:32% 3% 25%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;pointer-events:none}
.house-plan-room-label strong{max-width:100%;padding:3px 5px;font:600 clamp(12px,2.1cqw,21px)/1.15 Georgia,serif;white-space:nowrap;color:#4b3421;text-shadow:0 1px #fff5dc;background:#f0dfbcad;box-shadow:0 0 9px #f0dfbc;pointer-events:none}
.house-plan-room-label small{font:600 clamp(9px,1.3cqw,12px)/1.15 system-ui;color:#315c3e;pointer-events:none}
.house-plan-room.current strong{color:#254d35}
.house-plan-room.current strong:before{content:"";display:inline-block;width:6px;height:6px;margin-right:5px;border:1px solid #234c33;background:#547d50;border-radius:50%;vertical-align:middle}
.house-plan-legend{display:flex;align-items:center;gap:7px;margin:9px 0 0!important;color:#553f27!important;font:11px/1.5 system-ui!important}
.house-plan-position{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#38674f;border:1px solid #214934}
.scene-observation[data-device-readiness="ready"]{background:#203a30f7;border-color:#8fb99d;color:#edf5e9}
.scene-observation[data-device-readiness="missing"]{background:#3b2b17f7;border-color:#d0aa62;color:#fff0d3}
.scene-observation[data-device-readiness="solved"]{background:#243139f7;border-color:#96adb7;color:#e8eff0}
.scene-observation .device-readiness{font:700 11px/1.4 system-ui;margin:0 0 10px;letter-spacing:.035em}
.scene-observation[data-device-readiness="ready"] p{color:#e1eee1}
.scene-observation[data-device-readiness="missing"] p{color:#f6e3bd}
.scene-observation[data-device-readiness="solved"] p{color:#dce8ec}
.scene-observation[data-device-readiness] .observation-action{color:#24190c}
@media(max-width:600px){
 dialog.navigation-dialog{max-width:calc(100vw - 12px);max-height:calc(100svh - 12px)}
 .house-plan{width:calc(100vw - 28px)}
 .navigation-dialog .dialog-head{padding:12px 14px}
 .navigation-dialog .dialog-head h2{font-size:21px}
 .navigation-dialog .dialog-body{padding:9px 6px 12px}
 .house-plan-instruction{font-size:13px!important}
 .house-plan-inscription{font-size:14px}
 .house-plan-courtyard-label{font-size:11px}
 .house-plan-room-label{gap:3px;inset:29% 1% 23%}
 .house-plan-room-label strong{font-size:11.5px;padding:2px 1px}
 .house-plan-room-label small{font-size:8px}
 .house-plan-room[data-plan-room="alcove"] strong{font-size:10.5px}
 .house-plan-room.current strong:before{width:4px;height:4px;margin-right:3px}
 .house-plan-legend{font-size:10px!important}
}
@media(max-height:520px) and (min-width:601px){
 dialog.navigation-dialog{max-width:calc(100vw - 12px);max-height:calc(100svh - 12px)}
 .house-plan{width:min(738px,calc(100vw - 34px),calc((100svh - 136px)*var(--house-plan-ratio)))}
 .navigation-dialog .dialog-head{padding:8px 12px}
 .navigation-dialog .dialog-head h2{font-size:20px}
 .navigation-dialog .dialog-body{padding:6px 10px 8px}
 .house-plan-instruction{display:none}
 .house-plan-legend{font-size:10px!important;margin-top:5px!important}
 .house-plan-inscription{font-size:14px}
 .house-plan-courtyard-label{font-size:11px}
 .house-plan-room-label{gap:3px}
 .house-plan-room-label strong{font-size:clamp(9px,3.4cqw,11.5px);padding:2px 1px}
 .house-plan-room-label small{font-size:8px}
 .house-plan-room[data-plan-room="alcove"] strong{font-size:10.5px}
}
