/* One compact room section and one shared selection for both planning views. */
.build-panel > .room-settings { margin:10px 0 12px; background:#fff; border-color:#c9d1d9; border-radius:7px; }
.room-settings > .room-settings-header { min-height:44px; padding:7px 10px; gap:8px; border-radius:6px; }
.room-settings-icon { width:28px; height:28px; flex:0 0 28px; padding:4px; border-radius:5px; background:var(--yellow); fill:none; stroke:#343437; stroke-width:1.7; stroke-linejoin:round; stroke-linecap:round; }
.room-settings-header #roomSettingsTitle { flex-shrink:0; font-size:15px; font-weight:800; color:var(--ink); }
.room-settings > .room-settings-header:hover { background:#fff6d5; }
.room-settings > .room-settings-header:focus-visible { outline:3px solid #765b00; outline-offset:2px; }
.room-settings[open] > .room-settings-header { border-radius:6px 6px 0 0; }
body[data-planner-view="3d"] .build-panel > .room-settings { border-color:#d8ab00; box-shadow:0 1px 4px #7960001a; }
body[data-planner-view="3d"] .room-settings > .room-settings-header { background:#fff3bc; }
body[data-planner-view="3d"] .room-settings > .room-settings-header:hover { background:#ffeb91; }
.room-settings-header > .room-settings-summary { margin-left:auto; color:#616b75; font-size:12px; font-weight:400; line-height:1.3; text-align:right; }
.room-settings > .room-settings-header::after { margin-left:4px; }
.selected-module-panel { display:flex; align-items:center; gap:10px; min-height:48px; margin:0 0 8px; padding:8px 10px; border:1px solid #d5d9de; border-left:3px solid #bac2ca; border-radius:6px; background:#fff; }
.selected-module-panel[hidden] { display:none; }
.selected-module-panel.has-selection { border-left-color:var(--yellow-dark); background:#fffdf4; }
.selected-module-panel > img { flex:0 0 36px; width:36px; height:38px; object-fit:contain; background:#fff; border-radius:3px; }
.selected-module-panel > img[hidden] { display:none; }
.selected-module-description { flex:1 1 200px; min-width:0; display:grid; gap:3px; }
.selected-module-description > strong { color:var(--ink); font-size:14px; line-height:1.3; overflow-wrap:anywhere; }
.selected-module-description > span { color:#59636c; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.selected-module-description > .selected-module-warning { color:#a42925; font-weight:700; }
.selected-module-warning[hidden] { display:none; }
.planner-interaction-hint { flex:0 1 275px; margin:0; color:#626970; font-size:12px; line-height:1.4; }
.selected-row.is-selected { background:#fff9dd; box-shadow:inset 3px 0 var(--yellow-dark); }
button.control-button:not(.control-preview):not(.control-icon-only):not(.planner-icon-button) { font-size:14px; }
.build-panel > .setup { margin:0 0 16px; padding:0 0 14px; grid-template-columns:minmax(0,3fr) minmax(170px,1fr); gap:10px 16px; align-items:end; }
.build-panel > .setup > div:first-child { grid-column:1 / -1; }
.build-panel > .setup .setup-heading-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; }
.build-panel > .setup h1 { font-size:18px; line-height:1.25; letter-spacing:normal; }
.build-panel > .setup .dimensions { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; min-width:0; }
.build-panel > .setup .length-control { gap:6px; min-width:0; font-size:14px; }
.build-panel > .setup .input-wrap { width:100%; min-width:0; height:38px; border-width:1px; border-radius:6px; }
.build-panel > .setup .input-wrap input { width:calc(100% - 30px); min-width:0; padding:0 10px; font-size:18px; }
.build-panel > .setup .input-wrap b { flex:0 0 28px; }
.build-panel > .setup .shape-picker { grid-column:auto; flex-direction:column; align-items:stretch; gap:6px; margin:0; min-width:0; }
.build-panel > .setup .kitchen-shape-label { margin:0; }
.build-panel > .setup .shape-select { width:100%; min-width:0; min-height:38px; padding:6px 30px 6px 10px; border-width:1px; border-radius:6px; }
.planner-view-head { flex-wrap:wrap; margin-bottom:12px; }
.build-panel > .setup .room-settings-toggle.control-button { position:relative; grid-column:1 / -1; width:100%; min-height:40px; flex-wrap:wrap; justify-content:flex-start; gap:8px; padding:7px 32px 7px 10px; border:1px solid #d8ab00; border-radius:6px; background:#fff3bc; color:var(--ink); font-size:14px; text-align:left; }
.room-settings-toggle::after { content:""; position:absolute; right:12px; top:50%; width:7px; height:7px; margin-top:-5px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); }
.room-settings-toggle[aria-expanded="true"]::after { margin-top:-1px; transform:rotate(225deg); }
.room-settings-toggle .room-settings-types { min-width:0; max-width:100%; margin-left:auto; color:#695716; font-size:14px; font-weight:400; line-height:1.4; text-align:right; overflow-wrap:anywhere; }
.room-settings-toggle:hover { background:#ffeb91; }
.room-settings-toggle:focus-visible { outline:3px solid #765b00; outline-offset:2px; }
.room-settings-toggle .room-settings-icon { width:24px; height:24px; flex-basis:24px; padding:3px; }
.build-panel > .planner-stage-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:10px 0 14px; }
.planner-stage-actions #itemCount { margin-left:auto; }
#meterHint[hidden] { display:none!important; }
body[data-planner-view="3d"] .selected-module-panel { display:none!important; }
.planner-iso-panel .iso-head > div[hidden], .iso-wall-controls[hidden], #isoTapeToggle[hidden], #isoShowDimensions[hidden] { display:none!important; }
.planner-iso-panel > .iso-head { justify-content:flex-end; }
.build-panel > .room-settings { margin:0 0 12px; }
.build-panel > .room-settings:not([open]) { display:none; }
.build-panel > .room-settings > .room-settings-header { display:none; }
@media (max-width:800px) {
  .build-panel > .setup { grid-template-columns:1fr; }
  .build-panel > .setup .shape-picker { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; }
}
@media (max-width:520px) {
  .build-panel > .setup .dimensions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
}
@media (max-width:650px) {
  .room-settings > .room-settings-header { flex-wrap:nowrap; }
  .room-settings-header #roomSettingsTitle { flex:1; min-width:0; overflow-wrap:anywhere; }
  .room-settings-header > .room-settings-summary { display:none; }
  .selected-module-panel { flex-wrap:wrap; gap:7px; }
  .selected-module-description { flex-basis:calc(100% - 48px); }
  .planner-interaction-hint { flex-basis:100%; }
  .selected-module-panel.has-selection .planner-interaction-hint { display:none; }
}
@media print {
  .selected-module-panel { display:none!important; }
  .room-settings-toggle { display:none!important; }
}
/* Clear entry points for room setup, wall mounting and project recognition. */
#roomSettingsToggle.room-settings-toggle.control-button { position:relative; display:flex; width:100%; min-height:66px; align-items:center; gap:12px; margin:0 0 14px; padding:14px 38px 14px 16px; border:2px solid #d5a400; border-radius:10px; background:#fff0a8; color:#342b12; box-shadow:0 3px 10px #b08b0026; font-size:18px; font-weight:700; text-align:left; scroll-margin-top:20px; }
#roomSettingsToggle .room-settings-types { font-size:13px; max-width:210px; text-align:left; color:#65501a; }
#roomSettingsQuick.room-settings-quick { background:#ffd54a; color:#29220b; border:2px solid #d0a121; border-radius:8px; min-height:42px; font-weight:700; padding:8px 14px; }
.mounting-guide { margin:12px 0; padding:14px; border:1px solid #a9c1d6; background:#edf6fd; border-radius:9px; color:#24435c; }
.mounting-guide p,.recognize-project-hint { font-size:13px; line-height:1.55; margin:7px 0 10px; }
#alignWallCabinets { min-height:38px; border:1px solid #47779c; border-radius:6px; padding:8px 12px; background:#fff; color:#24435c; }
#alignWallCabinets:disabled { opacity:.5; }
#recognizeProjectBtn.control-button { background:#214f77; color:#fff; border-color:#214f77; min-height:42px; font-weight:700; }
.recognize-project-hint { padding:10px 12px; background:#f1f6fa; border-radius:6px; }
@media(max-width:600px){#roomSettingsToggle.room-settings-toggle.control-button{flex-wrap:wrap;font-size:17px}#roomSettingsToggle .room-settings-types{flex-basis:100%;max-width:none;margin-left:36px}#roomSettingsQuick.room-settings-quick{font-size:12px;padding:7px 9px}.top-actions{flex-wrap:wrap}}
@media print{#roomSettingsQuick,#roomSettingsToggle,.mounting-guide,.recognize-project-hint{display:none!important}}

/* Clear page order: title, kitchen dimensions, kitchen settings, planner. */
body .topbar{height:auto;min-height:100px;padding-top:16px;padding-bottom:16px;gap:24px;align-items:center}
body .topbar .top-title{display:flex;flex-direction:column;border-left:0;padding-left:0;flex:1 1 auto;min-width:0}
body .topbar .top-title strong{font-size:clamp(28px,3.5vw,46px);font-weight:800;line-height:1.12;letter-spacing:-.035em;white-space:normal}
body .topbar .top-title>span{font-size:13px;margin-top:6px}
body .topbar .top-actions{margin-left:auto;flex-shrink:0}
.build-panel>.setup{margin-top:0;padding-top:0;margin-bottom:16px}
.build-panel #setup-title{font-size:27px;line-height:1.2;margin:0;font-weight:800;letter-spacing:-.02em}
#roomSettingsToggle.room-settings-toggle.control-button{margin:0 0 8px;flex-wrap:nowrap;min-height:58px;font-size:19px}
#roomSettingsToggle .room-settings-types{white-space:nowrap;max-width:none;flex:0 0 auto;margin-left:auto}
.build-panel>.room-settings{margin-top:0;margin-bottom:20px}
.build-panel>.planner-view-head{margin-top:10px;margin-bottom:14px}
@media(max-width:650px){body .topbar{flex-wrap:wrap;gap:10px;min-height:0;padding:14px 16px}body .topbar .top-title{flex:1 0 100%}body .topbar .top-actions{width:100%;justify-content:flex-end;flex-wrap:nowrap;gap:8px}body .topbar .top-title strong{font-size:30px}#roomSettingsToggle.room-settings-toggle.control-button{flex-wrap:nowrap;gap:8px;font-size:17px}#roomSettingsToggle .room-settings-types{display:none}}

/* Planner toolbar follows the reference: wall tabs left, project actions right. */
.planner-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#wallTabs.wall-tabs{display:flex;align-items:center;flex-wrap:nowrap;gap:7px;width:100%;max-width:100%;min-width:0;margin:0 0 10px;padding:16px 0 10px;border-top:1px solid #dedede;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#a4b5c4 #eef3f7}
#wallTabs>.wall-tab{flex:0 0 auto;min-height:42px;padding:8px 10px;font-size:13px;white-space:nowrap}
#wallTabs .planner-view-switch{display:inline-flex;flex:0 0 auto;width:auto;min-width:0;margin-left:auto;padding:3px;gap:2px;white-space:nowrap}
#wallTabs .planner-view-switch button{min-width:66px;min-height:34px;padding:6px 9px;font-size:13px}
#wallTabs .planner-view-utilities{display:flex;flex:0 0 auto;flex-wrap:nowrap;width:auto;align-items:center;gap:7px}
#wallTabs .planner-view-utilities>button{flex:0 0 auto;min-height:42px;padding:8px 10px;font-size:13px;border-radius:7px;white-space:nowrap}
#wallTabs #saveProjectBtn{border:2px solid #d7ac00;background:#f8c400;color:#24220f}
#wallTabs #recognizeProjectBtn{border:2px solid #1673d3;background:#fff;color:#0f5fac;font-weight:800}
#wallTabs #printPlannerBtn{border:2px solid #1673d3;background:#fff;color:#0f5fac}
#wallTabs #undoBtn,#wallTabs #clearCartBtn{width:36px;min-width:36px;height:42px;min-height:42px;max-width:36px;padding:6px;flex-basis:36px}
#wallTabs #clearCartBtn{border-color:#c74646;color:#b52c2c;background:#fff}
#wallTabs .control-button-icon{width:17px;height:17px;flex-basis:17px}
.planner-support{margin:16px 0 0;border:1px solid #d9e1e8;border-radius:8px;background:#fff}
.planner-support>summary{padding:11px 13px;font-size:13px;font-weight:700;color:#35536c;cursor:pointer}
.planner-support[open]{padding-bottom:12px}
.planner-support-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:0 12px}
.planner-support .recognize-project-hint,.planner-support .mounting-guide{margin:10px 12px}
@media(max-width:700px){#wallTabs .planner-view-switch{margin-left:12px}#wallTabs>.wall-tab,#wallTabs .planner-view-utilities>button{font-size:12px;padding:7px 9px}}
@media print{#wallTabs,.planner-support{display:none!important}}
