/* Direzione 03: presentation only. Geometry and view visibility belong to the runtime. */
:root { color-scheme: dark; background:#080f14; --ink:#edf4f7; --muted:#a8bac7; --line:#364c59; --paper:#13212b; --accent:#ff7829; --accent-dark:#ffc193; --danger:#ffb3a6; --shadow:0 12px 35px #0005; }
body[data-theme="d03"] { background:radial-gradient(ellipse at 70% 0,#273c4c66,transparent 60%),#080f14; color:var(--ink); }
[data-theme="d03"] .topbar { margin:12px 12px 0; min-height:64px; padding:8px 20px; background:linear-gradient(120deg,#111b23,#1a2933,#10191f); border:1px solid var(--line); border-radius:11px; gap:16px; }
[data-theme="d03"] .brand { display:flex; align-items:center; font-size:23px; letter-spacing:0; gap:0; }
[data-theme="d03"] .brand svg { width:25px; height:30px; margin-right:12px; fill:none; stroke:var(--accent); stroke-width:2.4; }
[data-theme="d03"] .phase-label { color:#c7d7e0; font-size:14px; }
[data-theme="d03"] .phase-label>span:first-child { background:linear-gradient(130deg,#fd872d,#a84916); border:1px solid #fbad70; width:32px; height:32px; }
[data-theme="d03"] .preference-switch { background:#0d171e; border-color:var(--line); border-radius:8px; }
[data-theme="d03"] .preference-switch button { color:#bfced7; font-size:13px; }
[data-theme="d03"] .preference-switch button.is-active { background:#3a3028; color:#fff; box-shadow:inset 0 0 0 1px #c27842; }
[data-theme="d03"] .status-pill { background:#172b37; color:#cee0ed; border:1px solid #385369; }
[data-theme="d03"] .editor-shell { width:100%; max-width:none; padding:10px 12px 16px; }
[data-theme="d03"] .guidance { margin:0 0 10px; padding:10px 16px; min-height:66px; align-items:center; border:1px solid var(--line); border-radius:9px; background:linear-gradient(110deg,#1b2b35aa,#101b22); gap:14px; }
[data-theme="d03"] .guidance h1 { font-size:22px; font-weight:600; letter-spacing:-.025em; line-height:1.2; }
[data-theme="d03"] .guidance p:not(.eyebrow) { font-size:13px; line-height:1.4; margin-top:4px; }
[data-theme="d03"] .guidance-actions { display:flex; gap:12px; align-items:center; flex-shrink:0; }
[data-theme="d03"]:has([data-opening-stage="active"]) #guidance-eyebrow,
[data-theme="d03"]:has([data-opening-stage="active"]) .wall-counter,
[data-theme="d03"]:has([data-view="3d"]:not(button)) #guidance-eyebrow,
[data-theme="d03"]:has(#workspace[data-view="3d"]) #instruction-text { display:none; }
[data-theme="d03"] .preference-menu { position:relative; }
[data-theme="d03"] .preference-menu summary { display:flex; list-style:none; align-items:center; justify-content:space-between; gap:12px; min-height:42px; padding:8px 12px; border:1px solid #465c6a; border-radius:7px; background:linear-gradient(135deg,#21303a,#101a21); color:#ecf3f7; font-size:13px; cursor:pointer; white-space:nowrap; }
[data-theme="d03"] summary::-webkit-details-marker { display:none; }
[data-theme="d03"] .preference-menu summary:focus-visible { outline:2px solid #ffc395; outline-offset:3px; }
[data-theme="d03"] .preference-popover { position:absolute; z-index:30; top:calc(100% + 8px); right:0; min-width:160px; padding:8px; display:grid; gap:8px; border:1px solid #5a707e; border-radius:9px; background:#13232e; box-shadow:0 14px 35px #0009; }
[data-theme="d03"] .preference-popover.preference-switch { display:flex; }
[data-theme="d03"] .preference-popover button { min-height:44px; flex:1; }
[data-theme="d03"] .eyebrow { color:#ffb887; font-size:12px; letter-spacing:.12em; }
[data-theme="d03"] .wall-counter { background:#172733; color:#c9dbe7; border:1px solid var(--line); font-size:13px; }
[data-theme="d03"] .workspace-grid { grid-template-columns:minmax(0,1fr) 350px; gap:12px; align-items:start; }
[data-theme="d03"] .canvas-card,[data-theme="d03"] .elevation-card,[data-theme="d03"] .viewer-card { height:calc(100dvh - 178px); min-height:520px; border:1px solid #3a515f; border-radius:10px; background:#0b151d; box-shadow:inset 0 1px #ffffff0c; }
[data-theme="d03"] #room-canvas,[data-theme="d03"] .elevation-card { background-color:#0a1319; background-image:radial-gradient(ellipse at center,#29404e22,transparent 70%),linear-gradient(#9abbd007 1px,transparent 1px),linear-gradient(90deg,#9abbd007 1px,transparent 1px); background-size:auto,16px 16px,16px 16px; }
[data-theme="d03"] .canvas-wrap { bottom:62px; }
[data-theme="d03"] .canvas-toolbar { top:auto; bottom:0; left:0; right:0; height:62px; padding:8px 14px; border-width:1px 0 0; border-radius:0; background:linear-gradient(#15222b,#0d171e); }
[data-theme="d03"] .canvas-toolbar,[data-theme="d03"] .viewer-toolbar,[data-theme="d03"] .view-switch,[data-theme="d03"] .wall-mode-switch { background:#111e27ed; border-color:var(--line); border-radius:8px; }
[data-theme="d03"] .view-switch { margin:0; width:auto; flex-shrink:0; }
[data-theme="d03"] .view-switch button,[data-theme="d03"] .wall-mode-switch button { color:#bacdd9; background:transparent; font-size:14px; }
[data-theme="d03"] .view-switch button.is-active,[data-theme="d03"] .wall-mode-switch button.is-active { background:#553520; color:#fff0e4; box-shadow:inset 0 0 0 1px #ef9656; }
[data-theme="d03"] .icon-button:hover,[data-theme="d03"] .fit-button:hover { background:#29404e; }
[data-theme="d03"] .fit-button { font-size:14px; }
[data-theme="d03"] .side-panel { max-height:calc(100dvh - 178px); min-height:0; overflow:auto; scrollbar-color:#566f7e #101b23; scrollbar-width:thin; padding:0; }
[data-theme="d03"] .opening-library-card { min-height:calc(100dvh - 178px); display:flex; flex-direction:column; }
[data-theme="d03"] .help-card,[data-theme="d03"] .edit-card,[data-theme="d03"] .thickness-card,[data-theme="d03"] .height-card,[data-theme="d03"] .shape-actions,[data-theme="d03"] .opening-library-card,[data-theme="d03"] .opening-form-card { background:linear-gradient(135deg,#1a2b36,#101c24); border:1px solid var(--line); border-radius:10px; box-shadow:none; padding:16px; }
[data-theme="d03"] label,[data-theme="d03"] .opening-form-card label { color:#d5e2ea; font-size:14px; font-weight:550; }
[data-theme="d03"] .help-card p,[data-theme="d03"] .height-card p,[data-theme="d03"] .thickness-card p,[data-theme="d03"] .opening-library-card>p,[data-theme="d03"] .opening-form-card>p { color:var(--muted); font-size:14px; line-height:1.5; }
[data-theme="d03"] .measure-field,[data-theme="d03"] .imperial-grid input,[data-theme="d03"] .imperial-grid select,[data-theme="d03"] .opening-form-card select { background:#223441; border:1px solid #617886; color:#f5f8fb; border-radius:7px; }
[data-theme="d03"] input,[data-theme="d03"] select { font-size:16px; }
[data-theme="d03"] .measure-field input { font-size:20px; font-weight:500; }
[data-theme="d03"] .measure-field span { color:#b8cbd8; }
[data-theme="d03"] .measure-field:focus-within { border-color:#ffb782; box-shadow:0 0 0 2px #e8752f44; }
[data-theme="d03"] .primary-button { color:#fffaf5; background:linear-gradient(110deg,#f47d29,#df4f10); border:1px solid #ffae72; border-radius:8px; font-size:14px; box-shadow:0 3px 14px #ed6b1620; }
[data-theme="d03"] .secondary-button { color:#e0ecf3; background:#213541; border:1px solid #526d7e; border-radius:8px; font-size:14px; }
[data-theme="d03"] .text-button { color:#bbcfdd; font-size:14px; }
[data-theme="d03"] .danger-button { color:#ffbdb3; background:#432626; border-color:#895047; border-radius:8px; padding:10px; }
[data-theme="d03"] button:disabled { opacity:.5; }
[data-theme="d03"] button:focus-visible,[data-theme="d03"] input:focus-visible,[data-theme="d03"] select:focus-visible,[data-theme="d03"] [tabindex]:focus-visible { outline:2px solid #ffcfab; outline-offset:3px; }
[data-theme="d03"] .field-error { color:#ffc2b4; font-size:14px; line-height:1.5; }
[data-theme="d03"] .measure-dialog { background:linear-gradient(130deg,#21333f,#111d25); color:#eef5fa; border:1px solid #647f90; border-radius:12px; }
[data-theme="d03"] .measure-dialog p { color:#c0d1dd; font-size:14px; }
[data-theme="d03"] .measure-dialog::backdrop { background:#02080ddd; backdrop-filter:blur(3px); }
[data-theme="d03"] .measurement-setup { background:transparent; }
[data-theme="d03"] .measurement-setup-card { background:linear-gradient(135deg,#1c2e3c,#101b22); color:var(--ink); border-color:#40596b; }
[data-theme="d03"] .measurement-system-options button,[data-theme="d03"] .setup-metric-options button { background:#142632; color:var(--ink); border-color:#506a7c; }
[data-theme="d03"] .measurement-system-options button.is-active,[data-theme="d03"] .setup-metric-options button.is-active { background:#513220; border-color:#ff9d56; color:#fff3e8; }
[data-theme="d03"] .room-floor { fill:url(#plan-floor-light); stroke:none; pointer-events:none; }
[data-theme="d03"] .room-floor-grid { fill:url(#plan-floor-grid); pointer-events:none; }
[data-theme="d03"] .wall-body,[data-theme="d03"] .corner-join { fill:url(#plan-wall-metal); stroke:#8c9aa3; stroke-width:1; vector-effect:non-scaling-stroke; }
[data-theme="d03"] .wall-body.has-override { stroke:#ccdce5; }
[data-theme="d03"] .room-wall { stroke:#d1dce2; stroke-width:2; stroke-linecap:butt; }
[data-theme="d03"] .room-wall.is-selected { stroke:#b0d5ec; stroke-width:3; }
[data-theme="d03"] .outer-boundary { stroke:#9fa6a8; stroke-width:1; pointer-events:none; }
[data-theme="d03"] .wall-body.is-opening-target { fill:url(#plan-wall-metal); stroke:#a8cfdf; }
[data-theme="d03"] #room-canvas[data-placement-active="true"] .wall-body.is-opening-target { stroke:#ffb27a; filter:brightness(1.2); }
[data-theme="d03"] .wall-hit-target:hover,[data-theme="d03"] .wall-hit-target:focus-visible { stroke:#9dcced55; outline:none; }
[data-theme="d03"] .wall-body:hover:not(.is-opening-target) { stroke:#d1e8f8; filter:brightness(1.15); }
[data-theme="d03"] .wall-length-label { fill:#ffe0c4; stroke:#0c1720; font-size:19px; font-weight:600; stroke-width:5px; cursor:pointer; pointer-events:all; }
[data-theme="d03"] .wall-length-label:hover,[data-theme="d03"] .wall-length-label:focus-visible { fill:white; stroke:#594331; outline:none; }
[data-theme="d03"] .plan-dimension-line { stroke:#bc926d; stroke-width:1; pointer-events:none; }
[data-theme="d03"] .plan-dimension-extension { stroke:#637f91; stroke-width:.8; pointer-events:none; }
[data-theme="d03"] .room-point { fill:#223948; stroke:#cadce7; stroke-width:2; }
[data-theme="d03"] .start-dot { background:#ff9144; border-color:#f8d4b9; box-shadow:0 0 0 2px #e87d30,0 0 0 10px #ef86302a; }
[data-theme="d03"] .opening-gap { stroke:#162832; stroke-width:9; }
[data-theme="d03"] .opening-symbol { stroke:#bdd8e7; stroke-width:4; }
[data-theme="d03"] .opening-symbol.is-door { stroke:#d8bb96; stroke-dasharray:7 3; }
[data-theme="d03"] .opening-symbol.is-selected { stroke:#ff9c54; filter:drop-shadow(0 0 4px #ff8c4160); }
[data-theme="d03"] .opening-plan-slot { fill:#101c24; stroke:none; pointer-events:none; }
[data-theme="d03"] .opening-plan-frame { stroke:#afcbd9; stroke-width:1.6; pointer-events:none; }
[data-theme="d03"] .opening-plan-frame.is-door { stroke:#d1c7b8; }
[data-theme="d03"] .opening-plan-frame.is-selected { stroke:#ffb57b; filter:drop-shadow(0 0 3px #ff862faa); stroke-width:2; }
[data-theme="d03"] .opening-id-label { fill:#fff0e3; stroke:none; font-size:12px; font-weight:700; pointer-events:none; }
[data-theme="d03"] .opening-marker { fill:#172a35; stroke:#93aebd; stroke-width:1.2; pointer-events:none; }
[data-theme="d03"] .opening-marker.is-selected { fill:#50301e; stroke:#ffad69; stroke-width:1.8; }
[data-theme="d03"] .opening-marker-link { stroke:#93aebd; stroke-width:1; pointer-events:none; }
[data-theme="d03"] .elevation-card { display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; }
[data-theme="d03"] .elevation-header { position:static; padding:10px 14px; background:#14232c; border-bottom:1px solid var(--line); justify-content:flex-start; }
[data-theme="d03"] .elevation-header>div { display:none; }
[data-theme="d03"] #wall-elevation { display:block; width:100%; height:100%; min-height:0; padding:12px; background:transparent; }
[data-theme="d03"] .elevation-legend { position:static; padding:12px 16px; font-size:12px; background:#13232e; gap:8px; }
[data-theme="d03"] .elevation-wall { fill:url(#elevation-wall-light); stroke:#a1b4c0; stroke-width:1.4; }
[data-theme="d03"] .elevation-grid { fill:url(#elevation-grid); pointer-events:none; }
[data-theme="d03"] .elevation-floor { stroke:#c1d3df; stroke-width:1.3; }
[data-theme="d03"] .elevation-opening { fill:url(#elevation-glass); stroke:#b2cbd9; stroke-width:3; }
[data-theme="d03"] .elevation-opening.is-door { fill:url(#elevation-door); }
[data-theme="d03"] .elevation-opening.is-selected { stroke:#ffba83; stroke-width:3; filter:drop-shadow(0 0 5px #ff8c413b); }
[data-theme="d03"] .elevation-opening.is-draft { fill:#64412266; stroke:#ffb67a; stroke-dasharray:7 4; }
[data-theme="d03"] .elevation-dimension { fill:#ffdabd; font-size:18px; font-weight:600; paint-order:stroke; stroke:#263944; stroke-width:4; stroke-linejoin:round; }
[data-theme="d03"] .elevation-dimension-line { stroke:#c88e60; stroke-width:1; }
[data-theme="d03"] .elevation-frame { fill:none; stroke:#b0c5d0; stroke-width:1; pointer-events:none; }
[data-theme="d03"] .elevation-id { fill:#eaf3f8; font-size:13px; font-weight:700; pointer-events:none; }
[data-theme="d03"] .opening-subtypes { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; margin-top:18px; }
[data-theme="d03"] .opening-subtypes button { width:100%; min-width:0; display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; overflow:hidden; text-align:left; border:1px solid #4c6779; border-radius:8px; color:#eaf3fa; background:linear-gradient(135deg,#20313d,#0d1921); font-size:15px; }
[data-theme="d03"] .opening-subtypes img { display:block; width:100%; height:174px; object-fit:cover; }
[data-theme="d03"] .asset-copy { padding:12px; }
[data-theme="d03"] .asset-copy strong { display:flex; justify-content:space-between; align-items:center; font-size:14px; }
[data-theme="d03"] .asset-add { padding:0 6px; border:1px solid #996c49; border-radius:4px; background:#77402166; color:#ffd2ac; }
[data-theme="d03"] .asset-copy small { display:block; margin-top:7px; font-size:11px; color:#acbecb; }
[data-theme="d03"] .opening-subtypes button:hover { border-color:#aec8d6; background:#263b49; }
[data-theme="d03"] .opening-subtypes button.is-active { border-color:#ffae6f; background:#493222; box-shadow:inset 3px 0 #ff8d42; }
[data-theme="d03"] .opening-categories button { background:#16232d; color:#cfdee8; border-radius:7px; font-size:14px; }
[data-theme="d03"] .opening-categories button.is-active { background:#563420; border-color:#f59c5a; color:#fff2e7; }
[data-theme="d03"] .opening-placement-hint { background:#2f2c23; color:#f6cda9 !important; font-size:13px !important; }
[data-theme="d03"] .room-openings-heading { display:flex; justify-content:space-between; align-items:center; margin-top:20px; }
[data-theme="d03"] .room-openings-heading h3 { font-size:16px; font-weight:550; }
[data-theme="d03"] .room-openings-heading output { border:1px solid #526e81; padding:3px 9px; border-radius:6px; }
[data-theme="d03"] .opening-list { display:grid; gap:8px; margin:8px 0 14px; }
[data-theme="d03"] .opening-list button { display:grid; grid-template-columns:36px 1fr; gap:10px; align-items:center; width:100%; text-align:left; border:1px solid #405d6f; background:#142631; padding:10px; border-radius:8px; color:#e8f2f9; min-height:52px; font-size:14px; }
[data-theme="d03"] .opening-list button[aria-pressed="true"] { border-color:#ee9c65; box-shadow:inset 3px 0 #ff8b3d; }
[data-theme="d03"] .opening-list small { display:block; margin-top:4px; font-size:12px; color:#b5cbd9; line-height:1.45; }
[data-theme="d03"] .opening-list .opening-badge { display:grid; place-items:center; min-height:32px; border:1px solid #88725b; border-radius:5px; background:#523826; font-size:12px; }
[data-theme="d03"] .selected-opening-heading { display:flex; gap:12px; align-items:center; margin-bottom:14px; }
[data-theme="d03"] .selected-opening-heading img { width:62px; height:70px; object-fit:cover; border:1px solid #587181; border-radius:6px; }
[data-theme="d03"] .draft-status,[data-theme="d03"] .empty-selection,[data-theme="d03"] .room-summary { color:#b6cbd9; font-size:13px; line-height:1.5; }
[data-theme="d03"] .draft-status[data-dirty="true"] { color:#ffd0a9; }
[data-theme="d03"] #opening-subtype:disabled { font-size:13px; min-height:24px; padding:0; border:0; border-radius:0; background:transparent; appearance:none; color:#b6cbd9; opacity:1; }
[data-theme="d03"] #opening-form>label[for="opening-subtype"] { display:none; }
[data-theme="d03"] #opening-form>#opening-subtype { grid-column:1 / -1; }
[data-theme="d03"] .opening-library-card .room-summary { margin-top:auto; padding-top:20px; border-top:1px solid #354b59; }
[data-theme="d03"] #wall-opening-list:has(>button:only-child) { display:none; }
[data-theme="d03"] #opening-form { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; align-items:center; }
[data-theme="d03"] #opening-form>* { grid-column:1 / -1; min-width:0; }
[data-theme="d03"] #opening-form>label,[data-theme="d03"] #opening-form>select { grid-column:auto; }
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden])) [data-opening-measure="width"],
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden])) [data-opening-measure="height"] { grid-column:auto; }
[data-theme="d03"] #opening-form .measure-field { margin-top:0; }
[data-theme="d03"] #opening-form .draft-status { margin:0; }
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden]))>label[for="opening-reference-side"] { grid-column:1 / -1; }
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden]))>#opening-reference-side { grid-column:1; align-self:end; min-height:49px; }
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden]))>[data-opening-measure="offset"] { grid-column:2; }
[data-theme="d03"] #opening-form:has(.metric-measure:not([hidden])) [data-opening-measure="offset"]>label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
[data-theme="d03"] #opening-error:empty { display:none; }
[data-theme="d03"] #opening-form #cancel-opening-edit,[data-theme="d03"] #opening-form #delete-opening { grid-column:auto; font-size:13px; padding:8px; }
[data-theme="d03"] .panel-toggle { display:none; }
[data-theme="d03"] .workspace-grid[data-view="3d"] { grid-template-columns:minmax(0,1fr); }
[data-theme="d03"] .workspace-grid[data-view="3d"] .side-panel { display:none; }
[data-theme="d03"] .viewer-card { height:calc(100dvh - 178px); }
[data-theme="d03"] .workspace-grid[data-opening-stage="active"][data-edit-wall="true"] .edit-card:not([hidden]) { display:block; }
[data-theme="d03"] #room-viewer { height:100%; min-height:0; }
[data-theme="d03"] .viewer-hint,[data-theme="d03"] .asset-status,[data-theme="d03"] .viewer-back-2d { background:#12232de8; color:#d8e7f0; border-color:#536e7f; }
[data-theme="d03"] .notice { background:#1b3444; border:1px solid #7895a5; }
[data-theme="d03"] .notice[data-tone="error"] { background:#642f29; }
@media(min-width:1700px) { [data-theme="d03"] .workspace-grid { grid-template-columns:minmax(0,1fr) 380px; } }
@media(max-width:1100px) { [data-theme="d03"] .topbar { grid-template-columns:1fr auto; } [data-theme="d03"] .phase-label { display:none; } [data-theme="d03"] .status-pill { display:none; } }
@media(max-width:920px) {
  [data-theme="d03"] .workspace-grid { grid-template-columns:minmax(0,1fr); }
  [data-theme="d03"] .side-panel { display:flex; max-height:none; overflow:visible; padding:0; }
  [data-theme="d03"] .canvas-card,[data-theme="d03"] .elevation-card,[data-theme="d03"] .viewer-card { height:620px; min-height:0; }
  [data-theme="d03"] .opening-library-card { min-height:0; }
  [data-theme="d03"] .opening-library-card .room-summary { margin-top:18px; }
  [data-theme="d03"] .panel-toggle { display:block; }
  [data-theme="d03"] .workspace-grid[data-panel-collapsed="true"] .opening-library-card,[data-theme="d03"] .workspace-grid[data-panel-collapsed="true"] .opening-form-card { display:none; }
}
@media(max-width:640px) {
  [data-theme="d03"] .topbar { margin:8px 8px 0; min-height:56px; padding:6px 9px; gap:6px; grid-template-columns:minmax(0,1fr) auto; }
  [data-theme="d03"] .brand { font-size:16px; }
  [data-theme="d03"] .brand svg { width:18px; height:24px; margin-right:6px; }
  [data-theme="d03"] .topbar-actions { width:auto; display:flex; justify-self:end; flex-wrap:nowrap; gap:6px; }
  [data-theme="d03"] .preference-menu summary { min-height:40px; padding:7px 8px; gap:6px; font-size:12px; }
  [data-theme="d03"] .preference-switch button { min-width:32px; padding:0 7px; font-size:12px; }
  [data-theme="d03"] .editor-unit-controls { flex-wrap:wrap; }
  [data-theme="d03"] .editor-shell { padding:8px 8px 20px; }
  [data-theme="d03"] .guidance { display:flex; flex-wrap:wrap; padding:10px; gap:8px; min-height:0; }
  [data-theme="d03"] .guidance h1 { font-size:19px; }
  [data-theme="d03"] .guidance p:not(.eyebrow) { font-size:12px; }
  [data-theme="d03"] .guidance>div:first-child { flex:1; min-width:180px; }
  [data-theme="d03"] .guidance-actions { margin-left:auto; }
  [data-theme="d03"] .view-switch button { min-height:40px; padding:6px 10px; font-size:12px; }
  [data-theme="d03"] .guidance:has(.view-switch:not([hidden])) { display:grid; grid-template-columns:1fr auto; }
  [data-theme="d03"] .guidance:has(.view-switch:not([hidden]))>div:first-child { min-width:0; }
  [data-theme="d03"] .view-switch [data-view="2d"] { display:none; }
  [data-theme="d03"]:has(#workspace[data-view="3d"]) .view-switch [data-view="2d"] { display:block; }
  [data-theme="d03"]:has(#workspace[data-view="3d"]) #view-3d-switch { display:none; }
  [data-theme="d03"] .wall-counter { display:none; }
  [data-theme="d03"] .canvas-card { height:420px; }
  [data-theme="d03"] .elevation-card { height:440px; }
  [data-theme="d03"] .viewer-card { height:500px; }
  [data-theme="d03"] .wall-length-label { font-size:16px; }
  [data-theme="d03"] .elevation-dimension { font-size:14px; }
  [data-theme="d03"] .elevation-header { padding:10px; display:flex; gap:8px; }
  [data-theme="d03"] .elevation-header h2 { font-size:18px; }
  [data-theme="d03"] .elevation-header .compact-button { width:auto; font-size:13px; }
  [data-theme="d03"] .elevation-legend { padding:9px; font-size:11px; }
  [data-theme="d03"] .measure-dialog { width:calc(100% - 20px); max-height:calc(100dvh - 24px); padding:20px; overflow:auto; }
}
@media(prefers-reduced-motion:reduce) { [data-theme="d03"] *,[data-theme="d03"] *::before,[data-theme="d03"] *::after { animation:none; transition:none; scroll-behavior:auto; } }

/* Clear separation of the wall plane and the drawing background. */
[data-theme="d03"] .elevation-card{background:#14384b}
[data-theme="d03"] .elevation-wall{fill:#edf4f7;stroke:#69c4ee;stroke-width:3;vector-effect:non-scaling-stroke}
[data-theme="d03"] .elevation-floor{stroke:#9fdfff;stroke-width:3}

/* Door handing is one complete field, readable alongside metric/imperial sizes. */
[data-theme="d03"] #opening-form > .opening-handing { grid-column:1 / -1; }
[data-theme="d03"] .opening-handing select { display:block; width:100%; margin:6px 0; }
[data-theme="d03"] .opening-handing small { display:block; color:#b6cbd9; line-height:1.4; }

/* Keep the complete drawing surface visible while entering the room outline. */
[data-theme="d03"] .canvas-card[data-drawing-viewport] {
  height: var(--drawing-viewport-height, calc(100dvh - 178px));
  min-height: 0;
}

/* Keep drawing reachable when a phone or tablet is used in landscape. */
@media(max-height:700px){
  body[data-theme=d03][data-room-setup=outline] .topbar{min-height:52px;padding:4px 16px}
  body[data-theme=d03][data-room-setup=outline] .brand img{height:34px!important;width:auto!important}
  body[data-theme=d03][data-room-setup=outline] .editor-shell{padding:6px 16px 12px}
  body[data-theme=d03][data-room-setup=outline] .guidance{padding:0 0 6px;gap:8px;min-height:0}
  body[data-theme=d03][data-room-setup=outline] #guidance-eyebrow{display:none}
  body[data-theme=d03][data-room-setup=outline] .guidance h1{font-size:18px;line-height:1.2}
  body[data-theme=d03][data-room-setup=outline] .guidance p:not(.eyebrow){font-size:12px;line-height:1.3;margin-top:4px}
  body[data-theme=d03][data-room-setup=outline] .room-step-progress{margin:0 0 6px;gap:6px}
  body[data-theme=d03][data-room-setup=outline] .room-project-steps{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
  body[data-theme=d03][data-room-setup=outline] .room-project-steps button{min-height:44px;padding:4px;font-size:11px}
}
@media(max-height:700px) and (max-width:560px){
  body[data-theme=d03][data-room-setup=outline] .room-project-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-height:700px){
  body[data-theme=d03][data-room-setup=outline] .canvas-toolbar{height:48px;padding:2px 10px}
  body[data-theme=d03][data-room-setup=outline] .canvas-wrap{bottom:48px}
}
@media(max-height:700px) and (max-width:560px){
  body[data-theme=d03][data-room-setup=outline] .topbar{padding:4px 8px;gap:6px}
  body[data-theme=d03][data-room-setup=outline] .brand img{max-width:96px!important;height:auto!important}
  body[data-theme=d03][data-room-setup=outline] .topbar-actions{gap:4px}
  body[data-theme=d03][data-room-setup=outline] .room-clear-button{max-width:80px;padding:4px;font-size:11px}
  body[data-theme=d03][data-room-setup=outline] .preference-menu summary{min-width:44px;padding:4px}
}
@media(max-height:700px){
  body[data-theme=d03][data-room-setup=outline] .topbar .brand{flex-basis:150px;width:150px;height:44px}
}
@media(max-height:700px) and (max-width:560px){
  body[data-theme=d03][data-room-setup=outline] .topbar .brand{flex-basis:96px;width:96px;height:44px}
}
