/* SPDX-FileCopyrightText: 2026 Marko Sun
   SPDX-License-Identifier: LicenseRef-Hanama-Proprietary */
.stage3d-tool-icon{display:grid;place-items:center;width:20px;height:20px;font:900 24px/1 var(--serif,Georgia,serif);transform:rotate(45deg)}
.stage3d-dialog{width:min(980px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #dac9c5;border-radius:18px;background:#fbf8f6;color:#31212a;box-shadow:0 28px 90px #1b121752;overflow:auto}
.stage3d-dialog::backdrop{background:#1d1419a8;backdrop-filter:blur(5px)}
.stage3d-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px 14px;border-bottom:1px solid #e5ddda}
.stage3d-head .eyebrow{margin:0 0 4px;color:#827178;font:600 10px/1.2 var(--sans);letter-spacing:.2em}
.stage3d-head h2{margin:0;font:900 clamp(19px,2vw,25px)/1.2 var(--serif,serif)}
.stage3d-head .icon-button{flex:none;width:44px;height:44px}
.stage3d-body{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:22px;padding:18px 22px 22px}
.stage3d-visual{min-width:0;align-self:start}
#stage3d-canvas{display:block;width:100%;max-width:660px;aspect-ratio:1;height:auto;border:1px solid #e3dbd7;border-radius:12px;cursor:grab;touch-action:none;background:#f1f0e9}
#stage3d-canvas:active{cursor:grabbing}
.stage3d-views{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;margin-top:10px}
.stage3d-views button,.stage3d-depth+input+button{min-height:40px;padding:7px 12px;border:1px solid #dbcac6;border-radius:8px;background:#fff;color:#4c3441;font:500 12px/1.25 var(--sans);cursor:pointer}
.stage3d-views button[aria-pressed=true]{border-color:#ce2455;background:#e0255a;color:#fff}
.stage3d-inspector{display:flex;flex-direction:column;gap:12px;min-width:0}
.stage3d-intro,.stage3d-note{margin:0;color:#573e4b;font:400 13px/1.6 var(--sans)}
.stage3d-check{min-height:44px;padding:10px 12px;border-radius:8px;background:#f5eeea;color:#4b3240;font:500 12px/1.5 var(--sans)}
.stage3d-check[data-warning=true]{background:#f4eadf;color:#77563e}
.stage3d-map-wrap{display:flex;align-items:center;flex-direction:column;gap:5px}
#stage3d-map{width:176px;height:176px;border:1px solid #e3dbd7;border-radius:50%;cursor:pointer;touch-action:manipulation}
.stage3d-map-wrap small{color:#7d6c73;font:11px/1.35 var(--sans);text-align:center}
.stage3d-depth{display:flex;justify-content:space-between;gap:8px;color:#47323d;font:500 12px/1.4 var(--sans)}
#stage3d-depth{width:100%;height:32px;accent-color:#c62351}
#stage3d-depth:disabled{opacity:.4}
#stage3d-depth-reset{align-self:flex-start}
#stage3d-depth-reset:disabled{opacity:.45;cursor:default}
.stage3d-note{margin-top:auto;padding-top:10px;border-top:1px solid #e5ddda;font-size:11px;color:#77686e}
@media(max-width:700px){
 .stage3d-dialog{width:100vw;max-height:100dvh;height:100dvh;border:0;border-radius:0}
 .stage3d-head{padding:12px 16px 10px}
 .stage3d-body{display:block;padding:12px 16px 24px}
 #stage3d-canvas{width:min(100%,calc(100dvh - 355px));min-width:min(100%,260px);margin:auto}
 .stage3d-views{margin:8px 0 14px}
 .stage3d-views button{flex:1 1 20%;min-width:58px;min-height:44px;padding:7px 5px}
 .stage3d-inspector{display:grid;grid-template-columns:1fr 120px;gap:8px 12px}
 .stage3d-intro,.stage3d-check,.stage3d-depth,.stage3d-inspector>input,.stage3d-inspector>button,.stage3d-note{grid-column:1}
 .stage3d-map-wrap{grid-column:2;grid-row:1/6;align-self:center}
 #stage3d-map{width:120px;height:120px}
 .stage3d-map-wrap small{font-size:10px}
 .stage3d-note{grid-column:1/-1}
}
@media(max-width:390px){.stage3d-inspector{grid-template-columns:1fr 100px}#stage3d-map{width:100px;height:100px}}
@media(prefers-reduced-motion:reduce){.stage3d-dialog::backdrop{backdrop-filter:none}}
