/* Manual workspace: the four-step shell shares the existing geometry editor. */
body { font-family: Manrope, Inter, system-ui, sans-serif; background: #f8f9f7 !important; overflow: hidden !important; height: 100dvh; }
[hidden], .manual-workspace [hidden] { display: none !important; }
:root { --planner-green: #164f40; --planner-text: #20332c; --planner-muted: #62736b; }
button, input, select, summary { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #43836d; outline-offset: 3px; }
.manual-header { height: 64px; display: flex; align-items: center; gap: 26px; padding: 0 28px; border-bottom: 1px solid #e0e5e0; background: white; }
.manual-brand { color: #124f40; font-size: 25px; font-weight: 800; text-decoration: none; letter-spacing: -.8px; }
.manual-project-name { padding-left: 26px; border-left: 1px solid #d9e1dc; font-size: 16px; font-weight: 650; }
.manual-file-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
#manualSaveStatus { font-size: 12px; color: #637269; max-width: 270px; }
.manual-file-menu { position: relative; }
.manual-file-menu summary { cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dbe4df; border-radius: 8px; list-style: none; }
.manual-file-menu > div { position: absolute; top: 50px; right: 0; width: 250px; padding: 8px; z-index: 70; background: white; border: 1px solid #dbe4df; border-radius: 10px; box-shadow: 0 12px 28px #16372a20; }
.manual-file-menu button { width: 100%; text-align: left; min-height: 44px; border: 0; border-radius: 5px; background: white; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.manual-file-menu button:hover { background: #edf4ef; }
.manual-steps { height: 66px; display: flex; justify-content: center; gap: 40px; border-bottom: 1px solid #dce4de; background: #fff; }
.manual-steps button { min-width: 175px; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: none; color: #657369; font-size: 15px; cursor: pointer; }
.manual-steps button > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #edf0ec; font-size: 14px; }
.manual-steps [aria-current="step"] { border-bottom-color: #164f40; color: #164f40; font-weight: 750; }
.manual-steps [aria-current="step"] > span { color: white; background: #164f40; }
.wrapper.manual-workspace { display: grid !important; min-height: 0 !important; height: calc(100dvh - 130px) !important; grid-template-columns: 300px minmax(0, 1fr) 310px; grid-template-rows: minmax(0, 1fr); padding-bottom: 88px; position: relative; }
.manual-workspace .canvas-wrap { height: 100% !important; min-height: 0 !important; }
.manual-workspace .sidebar, .manual-workspace .planner-inspector-panel { min-height: 0; }
.manual-workspace .planner-catalog-panel.sidebar { width: auto; min-width: 0; height: 100%; display: block; }
.manual-workspace .sidebar-content { height: 100%; display: flex; flex-direction: column; overflow-y: auto; padding: 0; }
.manual-workspace .planner-inspector-panel { height: 100%; overflow-y: auto; }
.manual-panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 22px 16px; }
.manual-panel-heading h2 { margin: 5px 0 0; font-size: 21px; line-height: 1.2; letter-spacing: -.5px; }
.manual-eyebrow { color: #65766d; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
#plannerMenuClose { display: none; }
.manual-workspace .catalog-workspace { flex: 1; padding: 0 20px 24px; overflow: visible; }
.manual-workspace .module-catalog { display: block; }
.manual-workspace .catalog-toolbar { position: static; margin: 0; padding: 0 0 16px !important; }
.manual-workspace .catalog-search input { min-height: 44px !important; font-size: 14px; border-radius: 8px; }
.manual-workspace .catalog-wall-picker { display: grid !important; margin-top: 8px; }
.manual-workspace .catalog-wall-picker span { font-size: 12px; text-transform: none; font-weight: 500; }
.manual-workspace .catalog-tabs { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; margin-bottom: 12px; }
.manual-workspace .catalog-tab { min-height: 66px !important; font-size: 13px !important; font-weight: 650; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fbfcfa; }
.manual-workspace .catalog-tab.is-active { color: #164f40; background: #edf4ef; border-color: #33775f; }
.manual-workspace .catalog-tab .material-symbols-outlined { font-size: 24px; }
.manual-family { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid #e2e6df; }
.manual-family img { width: 62px; height: 78px; object-fit: contain; background: #f4f4ef; border-radius: 8px; }
.manual-family h3 { font-size: 14px; line-height: 1.45; margin: 0 0 7px; font-weight: 700; }
.manual-family-controls { display: flex; gap: 6px; }
.manual-family select { min-height: 40px; font-size: 12px; padding: 5px; flex: 1; width: 0; }
.manual-family button { width: 40px; height: 40px; border: 0; background: #164f40; color: white; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.manual-family button:disabled { opacity: .35; cursor: not-allowed; }
.manual-family p { font-size: 11px; color: #657269; margin: 6px 0 0; line-height: 1.5; }
.manual-workspace .planner-toolbar { padding: 12px 18px; height: auto; flex-shrink: 0; min-height: 72px; gap: 8px; flex-wrap: wrap; justify-content: flex-start; box-shadow: none; overflow: visible; }
.manual-workspace .planner-properties-toggle { display: none; }
@media (min-width: 1101px) {
    .manual-workspace .module-floating-toolbar { display: none !important; }
}
.manual-panel-heading { position: sticky; top: 0; z-index: 4; background: white; }
.manual-workspace .planner-room-control { margin-right: auto; }
.manual-workspace .planner-toolbar-control { min-height: 40px; }
.manual-workspace .canvas-view-switch { border-radius: 8px; min-height: 40px; }
.manual-workspace .canvas-view-btn { min-height: 32px; padding: 7px 12px; border-radius: 5px; font-size: 12px; }
.manual-workspace .planner-toolbar-toggles { margin-left: auto; }
.manual-workspace .planner-toggle { min-height: 38px; font-size: 11px; }
.manual-workspace #planner { background: #fafbf8; }
.manual-canvas-hint { position: absolute; bottom: 16px; left: 16px; right: 16px; pointer-events: none; text-align: center; font-size: 12px; color: #6b7970; }
.manual-empty-state { position: absolute; z-index: 3; top: 45%; left: 50%; transform: translate(-50%, -50%); width: min(360px, 90%); padding: 24px; text-align: center; border: 1px solid #d9e1d8; border-radius: 12px; background: #fffffff2; }
.manual-empty-state strong { font-size: 22px; letter-spacing: -.5px; }
.manual-empty-state p { font-size: 14px; line-height: 1.7; color: #637168; }
.manual-empty-state button { margin: 12px auto 0; width: auto; min-height: 44px; padding: 8px 16px; font-size: 14px !important; }
.manual-workspace .planner-statusbar { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; z-index: 8; display: flex; padding: 16px 28px; gap: 30px; box-shadow: none; border-top: 1px solid #dce4de; background: #fff; }
.manual-workspace .planner-status-metrics { min-width: 230px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.manual-workspace .planner-status-metrics > span:first-child { display: none; }
.manual-workspace .planner-status-metrics > span:nth-child(n+3) { display: none; }
.manual-price { display: flex; flex-direction: column; gap: 3px; }
.manual-price small { font-size: 11px; color: #66766e; }
.manual-price strong { font-size: 23px; color: #20382e; letter-spacing: -.5px; }
.manual-space { flex: 1; max-width: 550px; padding: 0 24px; border-left: 1px solid #dce4de; font-size: 12px; line-height: 1.5; }
.manual-space progress { display: block; width: 100%; height: 8px; margin-top: 9px; accent-color: #164f40; border: 0; border-radius: 8px; }
.manual-space progress::-webkit-progress-bar { background: #e3e8e2; border-radius: 8px; }
.manual-space progress::-webkit-progress-value { background: #164f40; border-radius: 8px; }
.manual-workspace .planner-status-actions { margin-left: auto; }
#manualNext { min-width: 235px; min-height: 50px; font-size: 15px; border-radius: 8px; }
.manual-workspace .planner-inspector-head { padding: 22px; }
.manual-workspace .planner-inspector-head h2 { font-size: 18px; line-height: 1.4; }
.manual-workspace .module-inspector-panel, .manual-workspace .project-summary-panel { padding: 18px 20px; }
.manual-workspace .module-inspector-card-head { display: none; }
.manual-workspace .module-inspector-section { padding: 0 0 18px; margin-bottom: 12px; border-bottom: 1px solid #e0e7e0; }
.manual-workspace .module-inspector-section-title { font-size: 14px; margin-bottom: 13px; }
.manual-workspace .module-inspector input, .manual-workspace .module-inspector select { min-height: 42px; font-size: 14px; }
.manual-workspace .module-inspector label { font-size: 12px; color: #62736a; }
.manual-workspace .module-inspector .grid-3 { gap: 8px; }
.manual-workspace .module-inspector-actions button { min-height: 44px; font-size: 12px; }
.manual-workspace .slot-toolbar { grid-template-columns: 1fr; }
.manual-workspace .slot-toolbar button { min-height: 40px; }
.manual-workspace .rules-panel { margin: 0 20px 20px; padding: 14px; border: 1px solid #dde5dc; }
.manual-workspace .rule-card-head, .manual-workspace .rule-card-body, .manual-workspace .rules-empty { font-size: 12px; }
.manual-workspace .rules-summary { white-space: normal; }
.manual-side-section { padding: 0 20px 20px; }
.manual-side-section h3 { margin: 8px 0 12px; font-size: 16px; }
.manual-side-section p, .manual-review-panel p { color: #63746a; font-size: 13px; line-height: 1.6; }
.manual-side-section .planner-facade-choice { margin: 16px 0; padding: 14px; }
.manual-side-section .planner-facade-choice select { min-height: 44px; }
.manual-field, .manual-variant-field { display: grid; gap: 8px; margin: 12px 0; font-size: 13px; }
.manual-field input, .manual-variant-field select { min-height: 44px; font-size: 13px; width: 100%; }
.manual-field input[type=color] { padding: 4px; }
.manual-check { display: flex; align-items: center; min-height: 44px; gap: 8px; margin: 12px 0 24px; font-size: 13px; }
.manual-check input { width: 18px; height: 18px; }
.manual-variant-field { padding: 16px 0; border-top: 1px solid #dce5de; }
.manual-variant-field small { color: #69776e; }
.manual-module-row { width: 100%; display: flex; gap: 10px; text-align: left; align-items: center; border: 1px solid #dfe6df; border-radius: 8px; background: white; padding: 12px; margin-bottom: 8px; color: #20382e; cursor: pointer; }
.manual-module-row > span { color: #687c71; font-size: 12px; }
.manual-module-row strong { display: block; font-size: 13px; line-height: 1.5; }
.manual-module-row small { display: block; color: #6c7a70; font-size: 11px; margin-top: 4px; }
.manual-module-row.is-active { border-color: #33745a; background: #f0f6f1; }
.manual-review-panel { padding: 8px 20px 20px; }
.manual-review-panel h3 { font-size: 16px; }
.manual-note { color: #67756b; font-size: 12px; line-height: 1.6; }
.manual-error { color: #8d3530; background: #fff4ef; padding: 14px; border-radius: 8px; font-size: 14px; }
.manual-spec-intro { padding: 18px 0; }
.manual-spec-intro h3 { margin: 0 0 10px; font-size: 18px; }
.manual-spec-intro > strong { font-size: 28px; }
.manual-spec-intro p { font-size: 13px; color: #637269; }
.manual-spec-list article { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; gap: 24px; border-top: 1px solid #dce5de; }
.manual-spec-list article strong { font-size: 14px; }
.manual-spec-list article > strong { white-space: nowrap; }
.manual-spec-list p { margin: 5px 0 0; font-size: 12px; color: #6d796f; }
.manual-workspace .planner-icon-button, .manual-header .planner-action { min-height: 40px; }
.manual-header .planner-action { width: auto !important; white-space: nowrap; }
.room-setup-panel { border-radius: 16px; padding: 36px; }
.room-setup-copy h2 { font-size: 30px; }
.room-setup-fields label { font-size: 13px; }
.room-setup-fields input { min-height: 48px; }
.calculation-cart-btn:disabled { opacity: .45; cursor: not-allowed; }
#roomSetupModal, #calculationModal, .guide-modal { z-index: 100; }
@media (max-width: 1350px) and (min-width: 1101px) {
    .wrapper.manual-workspace { grid-template-columns: 275px minmax(0, 1fr) 285px; }
    .manual-workspace .planner-toolbar-toggles { width: 100%; margin: 0; }
    .manual-workspace .planner-room-control { display: none; }
}
@media (max-width: 1100px) {
    .wrapper.manual-workspace { grid-template-columns: minmax(0, 1fr); }
    .manual-workspace .planner-catalog-panel.sidebar, .manual-workspace .planner-inspector-panel { position: fixed; top: 130px; bottom: 88px; height: auto; width: min(390px, 90vw); z-index: 55; display: none; box-shadow: 0 12px 35px #142b2229; }
    .manual-workspace .planner-catalog-panel.sidebar { left: 0; }
    .manual-workspace .planner-inspector-panel { right: 0; }
    .manual-workspace .planner-catalog-panel.sidebar.is-open, .manual-workspace .planner-inspector-panel.is-open { display: block; transform: none; }
    .manual-workspace #plannerMenuClose, .manual-workspace .planner-inspector-head .planner-icon-button, .manual-workspace .planner-properties-toggle, .manual-workspace .planner-toolbar-mobile { display: flex; }
    .manual-workspace .planner-mobile-overlay.is-open { display: block; position: fixed; inset: 130px 0 88px; background: #20352c45; }
    .manual-steps { gap: 5px; }
    .manual-steps button { min-width: 150px; }
    .manual-space { display: none; }
}
@media (max-width: 640px) {
    .manual-header { height: 58px; padding: 0 14px; gap: 12px; }
    .manual-brand { font-size: 21px; }
    .manual-project-name { display: none; }
    #manualSaveStatus { display: block; position: absolute; top: 58px; left: 0; right: 0; max-width: none; text-align: center; font-size: 11px; padding: 3px; background: #fff; z-index: 60; }
    .manual-file-actions { gap: 6px; }
    .manual-file-actions .planner-action { font-size: 12px; padding: 6px 10px; }
    .manual-steps { height: 84px; padding-top: 20px; gap: 0; }
    .manual-steps button { min-width: 0; width: 25%; flex-direction: column; gap: 4px; padding: 5px 2px; font-size: 11px; }
    .manual-steps button > span { width: 24px; height: 24px; font-size: 12px; }
    .wrapper.manual-workspace { height: calc(100dvh - 142px) !important; padding-bottom: 82px; }
    .manual-workspace .planner-toolbar { padding: 8px; min-height: 102px; gap: 6px; }
    .manual-workspace .planner-room-control { display: none; }
    .manual-workspace .planner-toolbar-toggles { width: auto; margin: 0; }
    .manual-workspace .planner-toggle .material-symbols-outlined { display: none; }
    .manual-workspace .planner-toggle { min-height: 32px; padding: 5px; font-size: 10px; }
    .manual-workspace .planner-zoom-control { min-width: 74px; }
    .manual-workspace .canvas-view-btn { padding: 6px 8px; font-size: 11px; }
    .manual-workspace .planner-statusbar { height: 82px; padding: 10px 14px; gap: 10px; flex-direction: row; align-items: center; }
    .manual-workspace .planner-status-metrics { min-width: 0; flex: 1; }
    .manual-price small { font-size: 9px; max-width: 130px; }
    .manual-price strong { font-size: 17px; }
    #manualNext { min-width: 0; width: 165px; min-height: 46px; padding: 8px; font-size: 12px; }
    .manual-workspace .planner-catalog-panel.sidebar, .manual-workspace .planner-inspector-panel { top: 142px; bottom: 82px; }
    .manual-workspace .planner-mobile-overlay.is-open { inset: 142px 0 82px; }
    .manual-workspace .module-inspector .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .manual-workspace .catalog-tabs { display: grid; }
    .manual-canvas-hint { font-size: 10px; bottom: 8px; }
    .manual-empty-state { top: 43%; padding: 18px; }
    .manual-empty-state strong { font-size: 19px; }
    .manual-empty-state p { font-size: 12px; }
    .room-setup-panel { padding: 20px; }
    .room-setup-copy h2 { font-size: 24px; }
    .room-shape-grid { gap: 6px; }
    .room-shape-card { padding: 8px; }
    .room-shape-description { font-size: 10px; }
    .room-shape-title { font-size: 12px; }
    .manual-spec-list article { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media print { .manual-header, .manual-steps { display: none !important; } }
.manual-size-options { margin-top: 8px; }
.manual-size-options summary, .manual-variant-field summary { cursor: pointer; color: #205444; font-size: 13px; padding: 8px 0; }
.manual-size-grid { display: grid; gap: 8px; margin-top: 8px; }
.manual-size-grid label { display: grid; grid-template-columns: 65px 1fr; align-items: center; gap: 6px; font-size: 12px; }
.manual-size-grid select { min-width: 0; width: 100%; min-height: 36px; border: 1px solid #d5ded8; border-radius: 6px; background: #fff; }
.manual-size-grid .manual-execution { grid-template-columns: 1fr; }
.manual-family .manual-execution { display: grid; gap: 4px; margin: 8px 0; min-width: 0; font-size: 12px; }
.manual-family .manual-execution select { width: 100%; min-width: 0; min-height: 40px; padding: 6px; border: 1px solid #d5ded8; border-radius: 6px; background: #fff; color: inherit; font: inherit; }
.catalog-search-scope { margin: 0; font-size: 11px; line-height: 16px; color: #657269; flex-shrink: 0; }
.manual-global-finish { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid #dce5de; font-size: 12px; background: #f5f8f5; }
.manual-global-finish span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.manual-variant-field { display: grid; gap: 7px; }
.manual-variant-field select { width: 100%; min-width: 0; }
.manual-field select { min-height: 42px; width: 100%; border: 1px solid #d5ded8; border-radius: 6px; background: #fff; padding: 8px; }

/* Focus and decor controls shared by desktop and compact layouts. */
.planner-view-focus { min-width: 0; max-width: 190px; min-height: 40px; border: 1px solid #c6d4cd; border-radius: 8px; background: #fff; color: #174b3e; padding: 6px; }
.decor-picker-trigger { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid #c6d4cd; border-radius: 8px; background: #fff; padding: 8px; cursor: pointer; color: #173f34; font: inherit; }
.decor-picker-trigger > span:last-child { overflow-wrap: anywhere; }
.planner-facade-choice .decor-picker-trigger { grid-column: 1 / -1; }
.decor-picker-swatch { display: block; width: 42px; height: 42px; flex-shrink: 0; border: 1px solid #ccd5cf; border-radius: 6px; background: repeating-linear-gradient(45deg,#f1f3f0,#f1f3f0 4px,#e3e8e3 4px,#e3e8e3 5px); overflow: hidden; }
.decor-picker-swatch img { width: 100%; height: 100%; object-fit: cover; }
.decor-picker-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(var(--planner-viewport-h, 100dvh) - 24px); border: 1px solid #c6d4cd; border-radius: 16px; padding: 20px; color: #173f34; }
.decor-picker-dialog[open] { display: flex; flex-direction: column; gap: 12px; }
.decor-picker-dialog::backdrop { background: #12271e80; }
.decor-picker-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.decor-picker-dialog h2 { margin: 0; font-size: 22px; }
.decor-picker-dialog input { width: 100%; min-height: 44px; font-size: 16px; padding: 10px; border: 1px solid #c6d4cd; border-radius: 8px; }
.decor-picker-results { overflow: auto; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.decor-picker-option { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px; border: 1px solid #c6d4cd; border-radius: 8px; text-align: left; background: #fff; color: #173f34; cursor: pointer; font: inherit; font-size: 13px; overflow-wrap: anywhere; }
.decor-picker-option[aria-pressed="true"] { border: 2px solid #17614d; background: #edf5f0; }
.decor-picker-option:focus-visible, .decor-picker-trigger:focus-visible { outline: 3px solid #226e59; outline-offset: 2px; }
#roomSetupRestore { min-height: 48px; padding: 12px 16px; border: 0; border-radius: 8px; margin: 0 0 18px; }
.manual-note { color: #53675d; }
.module-inspector-section > details > summary { cursor: pointer; padding: 10px 0; font-size: 13px; }
