/* Shared UI chrome. Map tiles, SVG artwork, palettes, model materials and export
   paper are deliberately outside these selectors. No filter on working content. */
:root{--ui-surface:#fff;--ui-panel:#f7f7f7;--ui-field:#fff;--ui-ink:#303030;--ui-muted:#777;--ui-line:#ddd;--ui-hover:#f1f1f1;--ui-active:#e8e8e8;--ui-focus:#666}
html[data-theme=dark]{--ui-surface:#191919;--ui-panel:#222222;--ui-field:#292929;--ui-ink:#e8e8e8;--ui-muted:#aaaaaa;--ui-line:#454545;--ui-hover:#353535;--ui-active:#404040;--ui-focus:#b8b8b8;color-scheme:dark}
body .wo-theme-switch{display:inline-flex;align-items:center;flex:none;gap:2px;padding:2px;margin:0 8px 0 0;border:1px solid var(--ui-line);border-radius:4px;background:var(--ui-surface);height:28px;white-space:nowrap}
body .wo-theme-switch button,body>header .header-work-actions .wo-theme-switch button{font:400 11px/18px Pretendard,sans-serif!important;letter-spacing:0;min-height:22px;height:22px;width:auto;padding:2px 7px!important;border:0!important;border-radius:2px;background:transparent!important;color:var(--ui-muted)!important;box-shadow:none}
body .wo-theme-switch button[aria-pressed=true],body>header .header-work-actions .wo-theme-switch button[aria-pressed=true]{background:var(--ui-active)!important;color:var(--ui-ink)!important}
body .wo-theme-switch button:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px}
body.program-themed>header .header-work-actions{min-width:max-content}
@media(min-width:901px){body.program-themed:has(.header-work-actions)>header{grid-template-columns:var(--workspace-sidebar,260px) minmax(0,1fr) max-content}}
@media(max-width:600px){body.program-themed>header .brand-family{display:none}body.program-themed>header .brand.context-brand,body.program-themed .platform-header .wordmark.service-brand{width:auto;min-width:0;grid-template-columns:max-content 1.5px minmax(0,1fr);padding-inline:8px}body.program-themed .platform-header{flex-wrap:wrap;height:auto;min-height:58px;gap:6px;padding-block:6px}body.program-themed .platform-header>.actions{margin-left:auto;gap:4px}body .wo-theme-switch{margin-right:3px}}
html[data-theme=dark] body.program-themed{--line:var(--ui-line);--ink:var(--ui-ink);--form-ink:var(--ui-ink);--form-line:var(--ui-line);--mw-bg:var(--ui-surface);--mw-ink:var(--ui-ink);--mw-muted:var(--ui-muted);--mw-border:var(--ui-line);--mw-panel:var(--ui-panel);--mw-selection:var(--ui-active);background:var(--ui-surface);color:var(--ui-ink)}
html[data-theme=dark] .program-themed :is(header,footer,main,main>aside,.sidebar-content,.workspace-inspector,.compact-site-controls,.drawing,.workspace-canvas,.view-stage,.work-grid,.tool-panel,.platform-header,.platform-footer,.mw-header,.mw-sidebar,.mw-main,.mw-inventory,.mw-main-foot,.canvas-tabs,.model-workflow,.work-status,.table-wrap,.table-total,.service-navigation,.workspace-tabs,.header-center){background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-theme=dark] .program-themed :is(.selected,.area-properties,.plot-panel,.subject-color-section,.subject-row,.analysis-layer-stack,.site-inspector-tabs,.site-result-actions,.analysis-shortcuts,.inspector-section,.scene-tools,.scene-toolbar,.scene-background,.viewport-controls,.register-toolbar,.register-page-tabs,.chart-export-list,.chart-export-item,.viewport-tools,.map-toolbar,.model-controls,.metrics,.selection-summary,.setting-section,.notice,.face-row,.workspace-menu-panel,.community-panel,.feedback-composer,.feedback-entry,.feedback-delete-confirm,.usage-cards article,.mw-card,.mw-card-foot,.mw-dialog,.mw-import-row,.mw-delete-name){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-theme=dark] .program-themed :is(h1,h2,h3,h4,label,summary,legend,.brand-family,.brand-name,.brand-service,.wordmark,.mw-brand,.mw-room-name strong,.card-heading,.card-heading h3,.card-footer,.gallery-meta,.table-total,.field,.check,.section-title){color:var(--ui-ink)!important}
html[data-theme=dark] .program-themed :is(.hint,.note,.upload-note,.edition,.eyebrow,.empty-note,.empty-note strong,.work-status,.card-method,.card-en,.card-state,.card-footer small,.map-status,.drawing-caption,.metrics small,.compact-limit,.export-access-note,.mw-intro,.mw-kicker,.mw-status,.mw-section-caption,.mw-sidebar-foot,.mw-card-meta,.mw-card-name small){color:var(--ui-muted)}
html[data-theme=dark] .program-themed :is(button:not([data-background]):not([data-color]):not(.building-color-preset):not(.color-swatch):not(.diagram-preview),select,textarea,input:not([type=color]):not([type=range]):not([type=checkbox]):not([type=radio]),.workspace-menu>summary){background-color:var(--ui-field)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important}
html[data-theme=dark] .program-themed :is(button,summary):hover:not(:disabled){border-color:var(--ui-focus)!important}
html[data-theme=dark] .program-themed :is(button[aria-pressed=true]:not([data-background]):not([data-color]):not(.building-color-preset):not(.color-swatch),button[aria-selected=true],button.active,.face-row.selected,.subject-row.subject-selected,.active-subject,.chart-export-item.selected,.model-workflow li[data-state=active]){background-color:var(--ui-active)!important;color:var(--ui-ink)!important;border-color:var(--ui-focus)!important}
html[data-theme=dark] .program-themed :is(.primary,.primary.full,#applyArea,#generate,#exportSelectedCharts){background:#d8d8d8!important;color:#191919!important;border-color:#d8d8d8!important}
html[data-theme=dark] .program-themed :is(input,textarea)::placeholder{color:#a0a0a0;opacity:1}
html[data-theme=dark] .program-themed :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:#b8b8b8}
html[data-theme=dark] .program-themed :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
html[data-theme=dark] .program-themed :is(.material-table th,.material-table td,.metrics>div,.setting-section,.summary>div,.card-footer,.card-heading,.export-settings,.mw-toolbar,.mw-import-list){border-color:var(--ui-line)}
html[data-theme=dark] .program-themed .material-table th{background:var(--ui-panel);color:var(--ui-muted)}
html[data-theme=dark] .program-themed :is(.brand-mark img,.mw-brand img){filter:brightness(0) invert(1)}
html[data-theme=dark] .program-themed :is(.brand-family,.brand-name){color:#fff!important}
html[data-theme=dark] .program-themed .brand-divider{background:var(--ui-line)!important}
html[data-theme=dark] .program-themed :is(.diagram-card,.card-heading,.card-footer){background:var(--ui-panel);border-color:var(--ui-line)}
html[data-theme=dark] .program-themed :is(.board-sheet,.register-paper,.chart-export-preview,.diagram-preview){color-scheme:light;background:#fff;color:#303439}
html[data-theme=dark] .program-themed :is(.board-sheet h3,.register-paper h2,.register-paper h3){color:#303439!important}
html[data-theme=dark] .program-themed :is(.work-status.error,[role=alert]){color:#ffb8aa}
/* Dynamic dialogs and account controls share the theme, including the home. */
html[data-theme=dark] :is(.program-themed,.home) dialog{color:var(--ui-ink);background:var(--ui-panel);border-color:var(--ui-line);color-scheme:dark}
html[data-theme=dark] :is(.program-themed,.home) dialog::backdrop{background:#080808b3}
html[data-theme=dark] :is(.program-themed,.home) .form-account-button{background:var(--ui-field)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important}
html[data-theme=dark] :is(.program-themed,.home) :is(.form-auth-dialog,.form-auth-form,.form-account-menu){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-theme=dark] :is(.program-themed,.home) .form-auth-dialog :is(h2,h3,p,label,a,small){color:var(--ui-ink)}
html[data-theme=dark] :is(.program-themed,.home) .form-auth-dialog :is(input,button:not(.form-auth-kakao)){background:var(--ui-field)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important}
html[data-theme=dark] :is(.program-themed,.home) .form-auth-dialog .form-auth-kakao{background:#fee500!important;color:#191919!important;border-color:#fee500!important}
@media print{html[data-theme] body.program-themed{background:white;color:#24262a}.wo-theme-switch{display:none!important}}

/* A single landing language for the five available programs in six slots. */
.home.unified-home .mw-program-section>.mw-program{width:100%;max-width:none;min-height:48px;margin-top:5px;padding:8px;gap:10px;border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-ink)}
.home.unified-home .mw-program-section>.mw-program :is(b,small){color:inherit}.home.unified-home .mw-program-section>.mw-program b{font-size:12px;font-weight:500}.home.unified-home .mw-program-section>.mw-program small{font-size:9px;color:var(--ui-muted)}
.home.unified-home .mw-program-section>.mw-program .mw-program-icon{flex:none;width:31px;height:31px;display:grid;place-items:center;color:var(--ui-muted)}
.home.unified-home .mw-program-section>.mw-program .mw-program-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.15}
.home.unified-home .mw-program-section>.mw-program .mw-program-arrow{margin-left:auto}
.home.unified-home .mw-program-section>.mw-program:is(:hover,:focus-visible,[data-preview-open=true]){background:var(--ui-hover);border-color:var(--ui-focus)}
.home.unified-home .mw-program-section>.mw-program.is-upcoming{opacity:.4;min-height:36px;pointer-events:none}.home.unified-home .mw-program.is-upcoming .mw-program-icon{font-size:9px}
html[data-theme=dark] body.home{--surface:var(--ui-surface);--panel:var(--ui-panel);--ink:var(--ui-ink);--line:var(--ui-line);--muted:var(--ui-muted)}
html[data-theme=dark] .home.unified-home .hub-program-viewport .preview-content-only.hp-story .hp-heading h2{color:var(--ui-ink)}
html[data-theme=dark] .home.unified-home .hub-program-viewport .preview-content-only{background:var(--ui-surface);border-color:var(--ui-line);color:var(--ui-ink)}
html[data-theme=dark] .home.unified-home .hub-program-viewport .preview-content-only :is(#hover-play,#hover-close){background:#252a2ee6;color:var(--ui-ink)}
html[data-theme=dark] body.is-model{--model-ink:var(--ui-ink);--model-muted:var(--ui-muted);--model-line:var(--ui-line);--model-surface:var(--ui-panel);color:var(--ui-ink);background:var(--ui-surface)}
html[data-theme=dark] body.is-model :is(#modelPreparation,.preparation-canvas,.preparation-material-selection,.preparation-baskets,.preparation-footer,.model-action-dock,.model-file-card,.preparation-material-list,.model-production,.model-file-card .upload-zone,.guided-selection,.guided-journey,.production-settings-card,.production-settings-overlay,.preparation-help,.model-canvas-footer,#preparationUploadStatus,#guidedActionStatus){background-color:var(--ui-surface)!important;color:var(--ui-ink);border-color:var(--ui-line)!important}
html[data-theme=dark] body.is-model :is(.basket-summary-item,.basket-summary-button,.model-material-list label,.model-material-list button,.preparation-group .group-disclosure,.viewport-status,.preparation-file-card,#preparationBasketSummary p){background-color:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-theme=dark] body.is-model :is(.preparation-help,.preparation-status,.preparation-file-note,.viewport-status-text,.model-file-card p,.model-material-list small){color:var(--ui-muted)}
@media(max-width:730px){.home.unified-home .mw-program-section:has([data-admin-catalog-entry]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:4px;padding-top:4px}.home.unified-home .mw-program-section:has([data-admin-catalog-entry])>.mw-section-caption{grid-column:1/-1}.home.unified-home .mw-program-section>.mw-program{min-height:32px;margin:0;padding:5px;justify-content:center;gap:4px}.home.unified-home .mw-program-section>.mw-program small,.home.unified-home .mw-program-section>.mw-program .mw-program-arrow{display:none}.home.unified-home .mw-program-section>.mw-program .mw-program-icon{width:18px;height:18px}.home.unified-home .mw-program-section>.mw-program .mw-program-icon svg{width:18px;height:18px}.home.unified-home .mw-program-section>.mw-program b{font-size:10px}.home.unified-home .mw-program-section>.mw-program.is-upcoming{min-height:32px}}
html[data-theme=dark] .home.unified-home .preview-content-only .hp-workspace{background:transparent}
html[data-theme=dark] .home.unified-home :is(.hp-search-cue,.hp-dimension-cue,.hp-explode-cue,.hp-file){background:var(--ui-panel);border-color:var(--ui-line);color:var(--ui-ink)}
html[data-theme=dark] .home.unified-home :is(.hp-search-cue>b,.hp-file b,.hp-file span,.hp-explode-cue span){color:var(--ui-ink)}
/* Tool-specific surfaces found in white/dark browser checks. */
html[data-theme=dark] .program-themed .platform-header :is(.model-brand-mark,.wordmark img){filter:brightness(0) invert(1);opacity:1}
html[data-theme=dark] .program-themed :is(.upload-zone,.viewport-controls label,.viewport-controls span,.platform-header nav a[aria-current=page]){background:var(--ui-panel)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important}
html[data-theme=dark] .program-themed :is(.view-stage,#threeView,#threeView>svg,.metrics,.metrics div){background:var(--ui-surface)!important;border-color:var(--ui-line)!important}
html[data-theme=dark] .program-themed :is(.metrics b,.empty-note strong,.empty-note span){color:var(--ui-muted)!important}
html[data-theme=dark] .program-themed :is(#siteMap,.leaflet-container){background:var(--ui-panel)}
html[data-theme=dark] .program-themed :is(.leaflet-control-zoom a,.leaflet-control-attribution){background:var(--ui-field);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-theme=dark] .program-themed .leaflet-control-attribution a{color:var(--ui-muted)}
html[data-theme=dark] .site-layout .subject-choice svg :is(path,line,rect,circle,polyline,polygon){stroke:currentColor}

/* Shared icons keep their shape and contrast in both themes. */
.workspace-icon{display:block;width:20px;height:20px;flex:none}
.mw-filter-icon,.wo-folder-icon,.wo-directory-item>span:first-child{display:grid;place-items:center}
.mw-filter-icon .workspace-icon,.wo-folder-icon .workspace-icon,.wo-directory-item .workspace-icon{width:17px;height:17px}
#wo-tour-icon .workspace-icon{width:32px;height:32px}
.wo-browse-mark .workspace-icon{width:25px;height:25px}
.wo-room-actions .wo-text-button{display:grid;place-items:center;min-width:32px;min-height:32px;color:var(--ui-muted)}
.wo-room-actions .wo-text-button::before{content:none!important}
.wo-room-actions .wo-text-button:hover{background:var(--ui-hover)}
.wo-folder-more{min-width:32px;min-height:32px}
@media(pointer:coarse){.wo-room-actions .wo-text-button,.wo-folder-more,.home .wo-arrange button{min-width:44px;min-height:44px}.home .mw-program-section>.mw-program{min-height:44px}}

.home [data-workspace-icon="play"] .workspace-icon,.home [data-workspace-icon="play"] .workspace-icon path{fill:currentColor;stroke:none}
