:root { --windowHeight:100dvh; }
#canvas { position:fixed; inset:0; z-index:0; }
.ui-wrap { z-index:22; pointer-events:none; background:transparent; }
.ui-wrap .my-ui, .ui-wrap .cover { pointer-events:auto; }
.ui-wrap .mp-model { pointer-events:none; }
.ui-wrap .bottom { visibility:hidden; }
.cnm-playing .ui-wrap .bottom { visibility:visible !important; }
.cnm-playing .ui-wrap .bottom [data-trigger="inside"] { display:none; }
.cnm-playing.cnm-model-mode .ui-wrap .bottom [data-trigger="inside"] { display:inline-block; }
.cnm-playing.cnm-plan-mode .ui-wrap .bottom [data-trigger="inside"] { display:inline-block; }
.cnm-plan-mode .ui-wrap .bottom [data-trigger="floorplan"] { display:none; }
.cnm-plan-mode .info-popup { visibility:hidden; }
.cnm-playing.cnm-model-mode .ui-wrap .bottom [data-trigger="dollhouse"] { display:none; }
.ui-wrap .nav-box:not(.on) .nav-cnt { display:none; }
.ui-wrap .nav-box.on .nav-cnt { display:block; }
.ui-wrap .nav-box.on .open-nav .off, .ui-wrap .nav-box:not(.on) .open-nav .on { display:none; }
.cnm-playing .mp-model { visibility:hidden; }
#cnm-hotspots { position:fixed; inset:0; z-index:21; pointer-events:none; }
body:not(.cnm-playing) #cnm-hotspots, .overlay-modal #cnm-hotspots, .cnm-plan-mode #cnm-hotspots { visibility:hidden; }
#cnm-hotspots svg { position:absolute; width:100%; height:100%; inset:0; }
#cnm-hotspots line { stroke:rgba(255,255,255,.85); stroke-width:1.5; }
.cnm-tag { position:absolute; transform:translate(-50%,-50%); width:var(--tag-size,24px);
  height:var(--tag-size,24px); padding:0; border:0; background:transparent; border-radius:50%;
  pointer-events:auto; cursor:pointer; color:#000; }
.cnm-tag[hidden] { display:none; }
.cnm-tag img { display:block; width:100%; height:100%; object-fit:contain; }
.cnm-tag span { display:none; position:absolute; left:50%; bottom:100%; transform:translateX(-50%);
  min-width:max-content; background:rgba(255,255,255,.92); border-radius:4px; padding:5px 8px;
  font-size:13px; }
.cnm-tag:hover span, .cnm-tag:focus-visible span { display:block; }
#cnm-panel { border:0; border-radius:8px; padding:0; color:#161616; background:#fff;
  position:fixed; inset:0; margin:auto;
  width:min(92vw,640px); height:fit-content; max-height:92dvh; }
#cnm-panel::backdrop { background:rgba(0,0,0,.88); }
.cnm-panel-inner { position:relative; display:flex; flex-direction:column; max-height:inherit; }
.cnm-panel-inner h2 { margin:0; padding:12px 45px 12px 18px; font-size:17px; }
.cnm-panel-inner p { padding:6px 18px 18px; margin:0; white-space:pre-line; }
.cnm-close { position:absolute; z-index:2; right:5px; top:5px; background:#fff; color:#111;
  font-size:24px; line-height:31px; width:34px; height:34px; border:0; border-radius:50%; cursor:pointer; }
#cnm-panel.cnm-frame { width:min(94vw,1200px); }
#cnm-panel.cnm-frame iframe { width:100%; height:min(85dvh,800px); display:block; border:0; background:#111; }
.cnm-frame-source { margin:0 18px 10px; color:#333; width:fit-content; text-decoration:underline; }
#cnm-plan { position:fixed; inset:0; z-index:20; background:#202124; display:grid; place-items:center; }
.cnm-plan-figure { position:relative; width:50vw; transform:translateY(-2vh); }
.cnm-plan-figure > img { display:block; width:100%; transform:rotate(180deg); }
.cnm-plan-figure button { position:absolute; transform:translate(-50%,-50%); border-radius:50%; cursor:pointer; padding:0; }
.cnm-plan-dot { z-index:1; width:16px; height:16px; background:#fff8; border:2px solid #fff; }
.cnm-plan-dot.current { border-color:#fa335c; background:#fa335caa; }
.cnm-plan-tag { width:20px; height:20px; border:0; background:#fff; }
.cnm-plan-tag img { width:100%; height:100%; object-fit:contain; display:block; }
#cnm-panel.cnm-share { color:#fff; background:#292929; width:min(94vw,680px); }
#cnm-panel.cnm-share #share-cnt { background:transparent; width:100%; padding:4px clamp(12px,4vw,40px) 20px; }
#cnm-panel.cnm-share .share-box { width:100%; }
.cnm-measuring #canvas { cursor:crosshair; }
.cnm-measuring #markers { visibility:hidden; }
#cnm-distance { position:fixed; z-index:30; bottom:62px; left:15px; color:#fff; background:#222c; border-radius:5px; padding:9px 12px; }
#cnm-measure-line { position:fixed; inset:0; width:100%; height:100%; z-index:19; pointer-events:none; }
#cnm-measure-line line { stroke:#fff; stroke-width:2; }
#cnm-measure-line circle { fill:#e9004c; stroke:#fff; stroke-width:1; }
@media(max-width:768px) {
  #cnm-panel.cnm-frame { width:96vw; }
  .cnm-plan-figure { width:90vw; }
  .cnm-plan-dot { width:14px; height:14px; }
  .cnm-plan-tag { width:17px; height:17px; }
  .cnm-tag span { max-width:200px; min-width:0; width:max-content; }
}
