main.shell:has(.studio) { width:min(1480px, calc(100% - 44px)); }
.studio { margin:5px 0 40px; }
.studio-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.studio-kicker { color:var(--brand); font-size:11px; font-weight:800; letter-spacing:.15em; }
.studio-heading h2 { font-size:clamp(24px,2.6vw,34px); letter-spacing:-.8px; margin:4px 0 5px; }
.studio-heading p { margin:0; color:var(--muted); font-size:13px; }
.studio-mode { flex:none; border:1px solid var(--line); border-radius:99px; color:var(--brand); padding:7px 11px; font-size:10px; font-weight:800; letter-spacing:.12em; }
.studio-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:10px; margin-bottom:14px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.studio-toolbar button,.studio-toolbar select { min-height:38px; border:1px solid var(--line); background:var(--soft); color:var(--ink); padding:7px 10px; font-size:12px; font-weight:700; }
.studio-toolbar button:hover { border-color:var(--brand); }
.studio-toolbar button[aria-pressed="true"] { background:var(--brand); color:#fff; border-color:var(--brand); }
.studio-toolbar .studio-action { background:var(--brand); border-color:var(--brand); color:#fff; }
.studio-toolbar button:disabled { opacity:.43; }
.studio-toolbar label { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); font-weight:700; }
.studio-toolbar .studio-magnet { padding-inline:6px 10px; }
.studio-3d-toolbar-note { color:var(--muted); font-size:12px; font-weight:650; }
.studio-magnet input { width:92px; accent-color:var(--brand); }
.studio-magnet output { min-width:42px; font-variant-numeric:tabular-nums; }
.studio-toolbar-space { flex:1 1 15px; }
.studio-grid-layout { display:grid; grid-template-columns:minmax(255px,280px) minmax(390px,1fr) minmax(245px,260px); gap:14px; align-items:start; }
.studio-grid-layout > * { min-width:0; }
.studio-add,.studio-inspector { padding:20px; }
.studio-add h3,.studio-inspector h3,.studio-stage h3 { margin:0 0 18px; font-size:13px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.studio-add fieldset { margin:0 0 18px; padding:0 0 15px; border:0; border-bottom:1px solid var(--line); }
.studio-add fieldset:last-of-type { border-bottom:0; margin-bottom:0; }
.studio-add legend { font-size:13px; font-weight:750; margin-bottom:13px; }
.studio-add .field { margin-bottom:11px; }
.studio-add .field-grid { gap:8px; }
.studio-add .field input,.studio-add .field select,.studio-inspector .field input { min-height:40px; font-size:13px; }
.studio-add .field-hint { margin:0 0 11px; }
.studio-pallet-note { margin:-2px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.studio-color-field { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.studio-color-field input { width:68px!important; height:38px; min-height:0!important; padding:3px!important; margin:0!important; }
.studio-add-button { width:100%; min-height:44px; border:0; background:var(--brand); color:#fff; font-size:13px; font-weight:800; }
.studio-small { margin:12px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.studio-stage { overflow:hidden; }
.studio-stage-head { display:flex; justify-content:space-between; gap:12px; align-items:start; padding:20px 20px 15px; }
.studio-stage-head h3 { margin-bottom:3px; }
.studio-stage-head p { margin:0; color:var(--muted); font-size:11px; }
.studio-stage-head strong { font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.studio-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; border-block:1px solid var(--line); background:var(--line); }
.studio-stats > div { padding:11px 15px; background:var(--surface); }
.studio-stats span { display:block; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.07em; }
.studio-stats strong { display:block; margin-top:3px; font-size:18px; font-variant-numeric:tabular-nums; }
.studio-canvas-wrap { width:100%; height:510px; overflow:auto; background:var(--scene); background-image:radial-gradient(var(--scene-grid) .8px,transparent .8px); background-size:20px 20px; }
.studio-canvas-wrap canvas { display:block; cursor:default; touch-action:none; }
.studio-canvas-wrap canvas:focus-visible { outline:3px solid #3b8e8c; outline-offset:-4px; }
.studio-view-tabs { display:flex; gap:6px; padding:9px 14px; border-bottom:1px solid var(--line); background:var(--surface); }
.studio-view-tabs button { min-height:35px; padding:7px 13px; border:1px solid var(--line); border-radius:7px; background:var(--soft); color:var(--ink); font-size:12px; font-weight:750; }
.studio-view-tabs button[aria-pressed="true"] { color:#fff; background:var(--brand); border-color:var(--brand); }
.studio-layerbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:9px 14px; border-bottom:1px solid var(--line); background:var(--soft); }
.studio-layerbar label { display:flex; align-items:center; gap:7px; font-size:11px; font-weight:750; color:var(--ink); }
.studio-layerbar select,.studio-layerbar button { min-height:34px; padding:5px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; font-size:11px; font-weight:700; }
.studio-layerbar #studio-add-layer { border-color:var(--brand); color:var(--brand); }
.studio-layerbar button:disabled { opacity:.45; cursor:not-allowed; }
.studio-layerbar button[aria-pressed="true"] { border-color:var(--brand); color:var(--brand); }
.studio-layerbar span { margin-left:auto; color:var(--muted); font-size:11px; }
.studio-3d-panel { position:relative; background:#edf2ef; overflow:hidden; }
.studio-3d-panel canvas { display:block; width:100%; height:510px; cursor:grab; touch-action:none; }
.studio-3d-panel canvas:active { cursor:grabbing; }
.studio-3d-controls { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin:0 12px 12px; padding:8px 10px; border:1px solid #d5dfd9; border-radius:8px; background:rgba(255,255,255,.94); box-shadow:0 5px 18px #173c3814; color:#3a5049; font-size:11px; }
.studio-3d-controls > div { display:flex; flex-wrap:wrap; gap:4px; }
.studio-3d-controls button { min-width:29px; min-height:29px; padding:4px 7px; border:1px solid #ccd8d2; border-radius:5px; background:#fff; color:var(--ink); font-size:12px; font-weight:700; }
.studio-3d-controls button:hover { border-color:var(--brand); }
.studio-stage-foot { padding:14px 18px 17px; }
.studio-legend { display:flex; flex-wrap:wrap; gap:7px 13px; color:var(--muted); font-size:10px; }
.studio-legend span { display:inline-flex; align-items:center; gap:5px; }
.studio-legend i { display:inline-block; width:12px; height:10px; border:2px solid currentColor; background:#ca8650; }
.studio-legend .legend-circle { border-radius:50%; background:#4e9b89; }
.studio-legend .legend-lying { border-radius:5px; background:#5b83b3; }
.studio-legend .legend-bag { border-radius:40% 45% 35% 40%; background:#b28b70; }
.studio-legend .legend-crate { background:#6c8fbd; box-shadow:inset 0 0 0 2px #e4eff5; }
#studio-validation { margin:13px 0 0; padding:10px 12px; border-radius:8px; background:var(--soft); color:var(--ink); font-size:12px; line-height:1.5; }
#studio-validation[data-invalid="true"] { background:var(--danger-bg); color:var(--danger); }
.studio-layer-weights { margin:12px 0 0; color:var(--ink); font-size:11px; line-height:1.5; }
.studio-weight-warning { margin:8px 0 0; padding:9px 11px; border-radius:7px; background:#fff3df; color:#77511f; font-size:11px; line-height:1.4; }
.studio-no-selection { margin:38px 0; text-align:center; color:var(--muted); font-size:12px; line-height:1.6; }
.studio-no-selection span { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:50%; background:var(--soft); color:var(--brand); font-size:22px; }
.studio-selected-type { margin:0 0 16px; font-size:14px; font-weight:800; color:var(--brand); }
.studio-inspector #studio-orientation-wrap { margin:0 0 13px; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--soft); }
.studio-inspector #studio-orientation-wrap select { width:100%; min-height:40px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; }
.studio-inspector #studio-selected-layer { width:100%; min-height:40px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); font:inherit; }
.studio-inspector #studio-original-size { margin:7px 0 0; }
.studio-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.studio-selected-details { margin:6px 0 18px; border-block:1px solid var(--line); }
.studio-selected-details div { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.studio-selected-details div:last-child { border:0; }
.studio-selected-details dt { color:var(--muted); font-size:11px; }
.studio-selected-details dd { margin:0; text-align:right; font-size:11px; font-weight:700; font-variant-numeric:tabular-nums; }
#studio-selected-status[data-invalid="true"] { color:var(--danger); }
.studio-edit-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:15px; }
.studio-edit-actions button { min-height:39px; padding:7px 8px; border:1px solid var(--line); background:var(--soft); color:var(--ink); font-size:11px; font-weight:700; }
.studio-edit-actions button:hover { border-color:var(--brand); }
.studio-edit-actions button:disabled { opacity:.45; }
.studio-edit-actions .studio-delete { color:var(--danger); }
.studio-message { padding:11px 14px; margin:12px 0 0; border:1px solid var(--danger); border-radius:8px; background:var(--danger-bg); color:var(--danger); font-size:12px; }
.studio-report-meta { margin:0 0 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.studio-report-meta summary { padding:13px 17px; cursor:pointer; font-size:12px; font-weight:750; }
.studio-report-meta summary small { margin-left:6px; color:var(--muted); font-weight:500; }
.studio-report-meta-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:0 17px 15px; }
.studio-report-meta-fields input { min-height:40px; }
@media(max-width:1180px) { .studio-grid-layout { grid-template-columns:minmax(250px,285px) minmax(0,1fr); } .studio-inspector { grid-column:2; } }
@media(max-width:780px) { main.shell:has(.studio) { width:calc(100% - 30px); } .studio-heading { align-items:start; } .studio-grid-layout { grid-template-columns:1fr; } .studio-inspector { grid-column:auto; } .studio-canvas-wrap,.studio-3d-panel canvas { height:390px; } .studio-report-meta-fields { grid-template-columns:1fr; } }
@media(max-width:480px) { .studio-mode { display:none; } .studio-toolbar { gap:6px; } .studio-toolbar button { padding:7px 8px; } .studio-stage-head { flex-direction:column; } .studio-stats > div { padding:9px; } .studio-stats strong { font-size:15px; } .studio-add,.studio-inspector { padding:17px; } }
@media(max-width:480px) { .studio-3d-controls { margin:0 7px 7px; } .studio-3d-controls > div { justify-content:center; } .studio-3d-controls > span { display:none; } }
@media(max-width:480px) { .studio-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .studio-layerbar span { margin-left:0; width:100%; } }
