/* Garden Studio 2.0: viewport-aware composition; all CSS runs inside its own iframe. */
:root{--accent:#256952;--muted:#68766d;--line:#e1e7df;--warm:#fbfcf9;--canvas:#f3f5f0;--shadow:0 16px 50px #203c2820}
html{color-scheme:light;-webkit-text-size-adjust:100%;overscroll-behavior-x:none}
body{overscroll-behavior-x:none}button,input,select,textarea{font:inherit}button{touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}button:active{background:#dfe6df;transform:scale(.98)}button:disabled{opacity:.46}button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #6b9a80;outline-offset:3px}textarea{resize:vertical;max-width:100%}button.primary-btn:active,.export-btn:active{background:#214d3b;color:white}
.gr-app{isolation:isolate;height:100%;min-width:0}.topbar{height:66px;min-height:66px;padding:0 22px}.brandmark{width:35px;height:35px}.brand b{font-size:12px;letter-spacing:1.7px}.brand span:not(.brandmark){font-size:11px}.version-chip{font-style:normal;font-size:9px;padding:1px 5px;background:#e8f0e8;color:#37684c;border-radius:4px;margin-left:4px}.save-state{font-size:11px}.icon-btn{width:40px;height:40px}.export-btn{min-height:42px;font-size:12px}.projectbar{min-height:70px;padding:10px 22px}.preset-tabs button{font-size:12px;min-width:105px;min-height:47px}.preset-tabs button span{font-size:10px}.unit-control button{min-height:32px}
.workbench{grid-template-columns:244px minmax(0,1fr) 264px}.library-panel,.inspector-panel{min-width:0}.panel-heading{padding:22px 18px 17px}.panel-heading h2{font-size:16px}.eyebrow{color:#6f8071;font-size:9px;letter-spacing:1.45px}.library-tabs button{font-size:12px}.library-tabs button span{font-size:10px}.search-box{height:43px}.search-box input{font-size:12px}.category-row select{font-size:12px;min-height:38px}.category-row .icon-btn{width:38px;height:38px}.catalog-hint{font-size:11px}.catalog-add strong{font-size:11px}.catalog-add small{font-size:10px}.catalog-card{border-radius:12px}.catalog-add{min-height:126px}.catalog-add svg{height:63px}.favorite-btn{width:30px;height:30px;top:1px;right:1px;background:#ffffffe0}.library-bottom{font-size:10px;min-height:39px}.studio-head{padding:18px 24px 14px;min-height:74px}.studio-head h1{font-size:23px;max-width:min(39vw,520px);letter-spacing:-.7px}.studio-head>div{min-width:0}.subtle-btn{font-size:12px;min-height:40px}.metric-strip{padding:0 24px 16px;gap:15px}.metric-strip span{font-size:11px;margin-bottom:6px}.metric-strip strong{font-size:23px;letter-spacing:-.5px}.metric-strip small{font-size:11px}.metric-strip>div{min-width:0}
.smartbar{display:flex;align-items:center;gap:5px;padding:0 20px 13px;flex-shrink:0;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}.smartbar::-webkit-scrollbar{display:none}.smartbar button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:1;min-width:max-content;min-height:37px;padding:8px 10px;border:1px solid #dce4d9;background:#fff;border-radius:9px;color:#46604e;font-size:11px;font-weight:600;white-space:nowrap;scroll-snap-align:start}.smartbar button:hover{background:#edf4ed;border-color:#b5cab4}.smartbar button:active{background:#dfe8df}.smartbar svg{width:15px;height:15px}.tool-badge{background:#f3e7ce;color:#8c621d;border-radius:4px;line-height:1;min-width:15px;padding:3px;font-size:9px}.canvas-wrap{min-height:150px}.canvas-toolbar{top:13px;left:15px;padding:4px;border-radius:12px;box-shadow:0 5px 15px #1a392510}.canvas-toolbar .icon-btn{width:34px;height:35px}.canvas-toolbar svg{width:17px;height:17px}.canvas-caption{font-size:10px;max-width:calc(100% - 146px);left:17px}.zoom-bar{height:38px;border-radius:10px}.zoom-bar button{height:36px;width:36px}.zoom-bar span{font-size:11px}.selection-bar{bottom:58px;padding:5px 7px 5px 12px;border-radius:13px}.selection-bar button{width:36px;height:36px}.selection-bar button.inspect-mobile{width:40px;font-size:12px}.selection-bar span{font-size:12px}.canvas-footer{height:47px;min-height:47px;padding:0 15px;gap:9px}.snap-switch{font-size:11px;min-height:38px}.snap-switch span{width:26px;height:15px}.snap-switch span:after{height:11px;width:11px}.snap-switch.active span:after{left:13px}.checks-button{font-size:11px;min-height:35px}.multi-switch{font-size:10px;min-height:32px;white-space:nowrap;padding:6px 8px;border:1px solid var(--line);border-radius:7px}.multi-switch.active{background:#e2efe6;border-color:#93b29d;color:#246a4b}.canvas-footer #layout-summary{font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-footer{font-size:9px;padding:7px 18px;min-height:32px}.app-footer button{font-size:10px}.field{font-size:12px;line-height:1.45}.field input,.field select,.field textarea{min-height:42px;font-size:13px;width:100%;padding:10px 11px;border:1px solid #dbe2d8;border-radius:9px;color:var(--ink);background:#fff}.field input:focus,.field select:focus,.field textarea:focus{border-color:#6b9a80}.field textarea{line-height:1.6}.check-field{font-size:12px;min-height:30px}.check-field input{width:17px;height:17px;accent-color:var(--accent)}.compact-actions button{font-size:12px;min-height:38px}.inspector-details summary{min-height:39px;font-size:12px;cursor:pointer}.inspector-details p,.info-note{font-size:11px;line-height:1.65}.section-label{font-size:10px}.item-type{font-size:10px}.primary-btn,.secondary-btn{font-size:12px;min-height:42px;border-radius:10px;padding:11px 16px;line-height:1.4}.primary-btn{background:var(--accent);color:#fff;font-weight:600}.secondary-btn{background:#fff;border:1px solid #d8e2d5;font-weight:500}.text-btn{font-size:12px;min-height:36px;padding:7px 10px;border-radius:6px;color:#526c58}.text-btn.danger,.danger{color:#a34b3c}.popover{max-height:calc(100% - 20px);overflow:auto;min-width:238px;box-shadow:0 10px 40px #253e2726}.popover button{min-height:43px;font-size:12px}.popover .field{padding:10px}.popover .check-field{min-height:38px;padding-left:10px}.popover small{font-size:10px}.toast{font-size:12px;line-height:1.55;z-index:100;max-width:min(540px,calc(100% - 28px));bottom:20px}
/* Tool dialogs: readable cards instead of squeezed desktop tables. */
.modal-backdrop{padding:24px;background:#1a302650;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.modal{width:min(100%,620px);max-height:calc(100dvh - 48px);padding:28px;border:1px solid #e8ede5;border-radius:20px;box-shadow:0 25px 90px #152e2b35;overscroll-behavior:contain;scrollbar-width:thin}.modal.pro-modal{width:min(100%,950px);max-width:950px}.modal[data-tool="walkway"],.modal[data-tool="report"],.modal[data-tool="confirm"]{max-width:650px}.modal h2{font-size:27px;font-weight:600;letter-spacing:-.8px;line-height:1.2}.modal>header{margin-bottom:22px;gap:12px}.modal>header>div{min-width:0}.modal>header .icon-btn{border:1px solid var(--line);flex-shrink:0}.modal p{font-size:13px;line-height:1.7;color:#68776c}.modal h3{font-size:15px;line-height:1.5;letter-spacing:-.1px}.modal-actions{gap:9px;margin-top:23px}.modal-actions.wrap{flex-wrap:wrap}.tool-lead{font-size:14px!important;line-height:1.75!important;margin:0 0 20px!important;max-width:740px}.tool-intro{display:flex;gap:15px;align-items:center;margin:6px 0 20px}.tool-intro h3{font-size:18px}.tool-intro p{margin:4px 0 0!important}.tool-orb{width:54px;height:54px;background:#e9f1e6;color:#3f7752;border-radius:15px;display:grid;place-items:center;flex-shrink:0}.tool-orb.amber{background:#fbf0d9;color:#a07938}.tool-orb svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.pro-note{background:#eff4ed;border:1px solid #e0e8dc;border-radius:11px;padding:13px 15px;margin:16px 0;font-size:12px;color:#536b56;line-height:1.75}.pro-note.warning{background:#fbf5e8;border-color:#eee0c2;color:#8b6836}.issue-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}.issue-card{border:1px solid #e3e6db;padding:18px;border-radius:14px;background:#fff;min-width:0}.issue-tag{font-size:10px;font-weight:600;padding:5px 8px;display:inline-block;border-radius:5px;color:#95662f;background:#faf0df;margin-bottom:11px;letter-spacing:.15px}.issue-tag.soft{background:#eaf0f4;color:#537084}.issue-card h3{font-size:14px;margin-bottom:8px}.issue-card p{font-size:12px}.issue-actions{display:flex;gap:8px;margin-top:15px;flex-wrap:wrap}.issue-actions button{font-size:11px;padding:10px 12px}.issue-card .pro-note{font-size:11px}.empty-tool{grid-column:1/-1;padding:22px;text-align:center;background:#fafbf8;border:1px dashed #cbd9c8;border-radius:14px}.empty-tool b{font-size:14px}.empty-tool p{font-size:13px;margin-top:7px}.inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:15px 0}.task-progress{display:flex;align-items:center;gap:12px;padding:16px;background:#f2f5ee;border-radius:12px;margin:15px 0}.task-progress div{flex:1}.task-progress b{display:block;font-size:13px}.task-progress span:not(.pro-spinner){display:block;font-size:11px;color:#758271;margin-top:4px}.task-progress .secondary-btn{font-size:11px;min-height:34px;padding:7px 9px}.pro-spinner{width:22px;height:22px;border:2px solid #d6e2d1;border-top-color:#4b7f57;border-radius:50%;animation:grspin .8s linear infinite;flex-shrink:0}@keyframes grspin{to{transform:rotate(360deg)}}
.result-card{padding:20px;border:1px solid #dbe6d7;background:#f4f8f0;border-radius:14px;margin-top:20px}.result-card.warning{background:#fdf7ee;border-color:#eddfc9}.result-title{display:flex;gap:10px;align-items:center}.result-title svg{width:23px;height:23px;fill:none;stroke:#537653;stroke-width:1.7}.result-card p{font-size:12px;margin-top:10px}.result-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:18px 0}.result-metrics span{font-size:11px;color:#73816b}.result-metrics b{display:block;font-size:21px;font-weight:600;color:#335a3e;margin-bottom:5px}.result-card small{font-size:11px;line-height:1.6}.plan-feedback{position:absolute;z-index:7;top:65px;left:15px;right:15px;display:flex;gap:10px;align-items:center;padding:12px 14px;background:#fffffff7;border:1px solid #c3d6c3;border-radius:12px;box-shadow:0 8px 25px #29433318;max-width:650px;margin:auto;backdrop-filter:blur(8px)}.plan-feedback>div{flex:1;min-width:0}.plan-feedback b{display:block;font-size:12px}.plan-feedback span{display:block;font-size:11px;color:#6f7d6c;line-height:1.5;margin-top:4px}.plan-feedback .primary-btn{min-height:36px;padding:8px 12px;font-size:11px}.plan-feedback .secondary-btn{min-height:36px;padding:8px 10px;font-size:11px}.plan-feedback .icon-btn{width:30px;height:30px;font-size:22px;flex-shrink:0}
.current-summary{display:flex;align-items:center;gap:10px;background:#f4f7ef;border:1px solid #e0e8da;border-radius:12px;padding:15px;flex-wrap:wrap;margin-bottom:22px}.current-summary>b{font-size:13px}.current-summary>span:last-child{font-size:12px;color:#738069}.live-pill{font-size:9px;font-weight:700;letter-spacing:1px;color:#4a7151;border:1px solid #c7d9c1;background:#fff;padding:5px 7px;border-radius:6px}.compare-grid,.alternatives-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.comparison-card,.alternative-card{border:1px solid #e0e6d9;border-radius:15px;overflow:hidden;padding:17px;display:flex;flex-direction:column;min-width:0;background:#fff}.slot-label{display:flex;align-items:center;justify-content:space-between;color:#7a886f;font-size:10px;font-weight:700;letter-spacing:1.2px;margin-bottom:12px}.slot-label span{font-weight:400;letter-spacing:0;font-size:10px}.comparison-preview{background:#f7f8f3;border:1px solid #edf0e8;border-radius:10px;height:165px;padding:12px;margin:0 0 16px}.comparison-preview svg{width:100%;height:100%}.comparison-card>.primary-btn{width:100%;margin-top:auto}.comparison-card .field{margin:0 0 12px}.comparison-card .field input{font-size:13px}.plan-stats{margin:0 0 16px}.plan-stats div{display:flex;gap:8px;justify-content:space-between;padding:7px 0;border-bottom:1px solid #eef1e9;font-size:11px}.plan-stats dt{color:#748169}.plan-stats dd{margin:0;text-align:right;font-weight:550;max-width:56%;overflow-wrap:anywhere}.plan-stats dd small{font-size:10px;font-weight:400}.split-actions{display:flex;margin-top:9px;justify-content:space-between;gap:4px}.split-actions button{font-size:11px;padding:8px 6px;border-radius:6px;min-height:35px}.empty-plan{min-height:180px;margin:0 0 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#fafbf7;border:1px dashed #d4dfcc;border-radius:11px;gap:9px}.empty-plan svg{width:32px;height:32px;stroke:#89a180;stroke-width:1.3;fill:none}.empty-plan h3{font-size:14px}.empty-plan p{font-size:12px;padding:0 12px}.alternative-card h3{font-size:17px;margin-bottom:13px}.alternative-card p{font-size:12px;margin-bottom:8px}.alternative-card .small-note{font-size:11px}.alternative-card .primary-btn{margin-top:auto;width:100%;font-size:11px}.no-fit{border:1px dashed #e4d3b4;border-radius:10px;min-height:155px;display:grid;place-items:center;background:#fbf7f0;font-size:13px;color:#967847;padding:20px;text-align:center;margin-bottom:15px}
.budget-context{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;padding:20px;border-radius:12px;background:#f2f6ed;border:1px solid #e3e9dc;margin:20px 0}.budget-context span{display:block;font-size:11px;color:#7b876d;margin-bottom:6px}.budget-context b{font-weight:600;font-size:18px}.budget-context small{font-size:11px;font-weight:400}.budget-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.budget-settings .field{margin:0 0 14px}.budget-line{display:grid;grid-template-columns:1.65fr 1.35fr .8fr .8fr .55fr;gap:10px;align-items:end;border:1px solid #e3e7dc;background:#fff;border-radius:12px;padding:15px;margin-bottom:12px;min-width:0}.budget-line.invalid{border-color:#bd8070;background:#fff9f5}.budget-line-top{display:flex;align-items:center;justify-content:space-between;grid-column:1/-1}.budget-line .field{margin:0;min-width:0;font-size:11px}.budget-line .field input,.budget-line .field select{font-size:12px;padding:9px;min-width:0}.budget-line .check-field{font-size:11px;margin:0}.budget-line .text-btn{font-size:11px;min-height:30px;padding:5px 7px}.budget-quantity{min-height:64px;font-size:11px;color:#75856a;display:flex;flex-direction:column;justify-content:space-between}.budget-quantity b{font-size:15px;font-weight:600;min-height:42px;display:flex;align-items:center;color:#476142}.source-field{margin-top:22px}.budget-total-box{background:#255e46;color:#fff;border-radius:15px;padding:23px;margin:22px 0 12px}.budget-total-box span{font-size:9px;letter-spacing:1.5px;color:#c9dec9;display:block}.budget-total-box strong{display:block;font-size:29px;font-weight:550;letter-spacing:-.6px;margin:11px 0}.budget-total-box p{color:#dae8d6;font-size:12px;line-height:1.7}
@media(min-width:1650px){.workbench{grid-template-columns:282px minmax(0,1fr) 290px}.catalog-add svg{height:76px}.catalog-add{min-height:137px}.catalog-add strong{font-size:12px}.studio-head{padding:24px 32px 17px}.metric-strip{padding:0 32px 20px}.smartbar{padding-left:30px;padding-right:30px;gap:8px}.smartbar button{min-height:41px;font-size:12px}.studio-head h1{font-size:27px;max-width:100%}.metric-strip strong{font-size:27px}}
/* Medium desktop / landscape tablet: library stays, details are an on-demand drawer. */
@media(max-width:1280px){.workbench{grid-template-columns:236px minmax(0,1fr)}.inspector-panel{position:fixed;right:0;top:0;bottom:0;width:320px;z-index:20;box-shadow:var(--shadow);transform:translateX(110%);transition:transform .24s cubic-bezier(.2,.8,.2,1);border-left:1px solid var(--line)}.inspector-panel.open{transform:translateX(0)}.inspector-panel .mobile-only{display:inline-flex}.selection-bar button.inspect-mobile{display:block}.save-state{display:none}.studio-head h1{font-size:23px;max-width:calc(100vw - 410px)}.canvas-footer #layout-summary{display:none}.panel-heading{padding:19px 17px 15px}}
/* Portrait tablet / narrow embed: all panels are summoned, keeping the plan usable. */
@media(max-width:920px){.workbench{display:flex;grid-template-columns:none}.studio-panel{width:100%;flex:1}.library-panel{position:fixed;top:0;bottom:0;left:0;width:min(360px,88vw);z-index:20;box-shadow:var(--shadow);transform:translateX(-110%);transition:transform .24s cubic-bezier(.2,.8,.2,1)}.library-panel.open{transform:translateX(0)}.library-panel .mobile-only{display:inline-flex}.studio-head h1{max-width:calc(100vw - 172px);font-size:24px}.studio-head{padding:19px 24px 14px}.smartbar button{min-height:40px;font-size:12px}.smartbar svg{width:17px;height:17px}.metric-strip strong{font-size:24px}.mobile-dock{display:flex;gap:10px;padding:11px 18px calc(11px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid #e0e7dc;flex-shrink:0}.mobile-dock button{flex:1;font-size:12px;min-height:44px;padding:11px 9px;border:1px solid var(--line);border-radius:10px;background:#fff}.mobile-dock button:first-child{background:var(--accent);color:#fff;border-color:var(--accent)}.mobile-dock b{font-size:15px;font-weight:400;margin-right:3px}.library-panel .catalog-add{min-height:136px;padding:10px}.library-panel .catalog-add strong{font-size:12px}.library-panel .catalog-add small{font-size:11px}.library-panel .catalog-add svg{height:74px}.library-panel .favorite-btn{width:34px;height:34px}.library-panel .search-box{height:46px}.library-panel .search-box input{font-size:14px}.library-panel .category-row select{font-size:13px;min-height:43px}.library-panel .catalog-hint{font-size:12px}.library-panel .category-row .icon-btn{height:43px;width:43px}.app-footer{font-size:9px}.app-footer button{font-size:9px}.modal-backdrop{padding:18px}.modal{max-height:calc(100dvh - 36px)}.comparison-preview{height:145px}.comparison-card,.alternative-card{padding:14px}.canvas-footer .checks-button{font-size:12px}.canvas-footer .snap-switch{font-size:11px}.canvas-toolbar .icon-btn{width:40px;height:40px}.canvas-toolbar{padding:4px}.plan-feedback{top:73px}.budget-line{grid-template-columns:1.4fr 1.2fr 1fr 1fr}.budget-quantity{grid-column:1/-1;flex-direction:row;justify-content:flex-end;gap:12px;align-items:center;min-height:24px}.budget-quantity b{min-height:24px;font-size:13px}}
/* Phone: comfortable touch targets and bottom sheets, without body overflow. */
@media(max-width:600px){.topbar{min-height:60px;height:60px;padding:0 13px;gap:6px}.brand{gap:8px}.brandmark{width:32px;height:32px;border-radius:9px}.brand b{font-size:10px;letter-spacing:1.3px}.brand span:not(.brandmark){font-size:9px;margin-top:3px}.version-chip{display:none}.header-actions{gap:1px}.header-actions .icon-btn{width:36px;height:40px}.header-actions .icon-btn:first-child{display:none}.export-btn{padding:9px 11px;min-height:40px;font-size:11px;gap:5px}.export-btn svg{width:16px;height:16px}.projectbar{padding:8px 11px;min-height:62px;gap:7px}.preset-tabs{flex:1;gap:2px}.preset-tabs button{padding:7px 9px;font-size:11px;min-width:0;min-height:43px;flex:1}.preset-tabs button span{font-size:9px}.custom-btn{display:none}.unit-control{padding:3px}.unit-control button{padding:5px 7px;font-size:10px;min-height:30px}.studio-head{padding:15px 16px 11px;min-height:64px;gap:5px}.studio-head .eyebrow{font-size:8px;margin-bottom:5px}.studio-head h1{font-size:20px;max-width:calc(100vw - 120px);letter-spacing:-.6px}.subtle-btn{font-size:10px;min-height:40px;padding:5px 0}.subtle-btn svg{width:15px;height:15px}.metric-strip{padding:0 16px 13px;gap:9px}.metric-strip span{font-size:9px;line-height:1.25;min-height:12px;margin-bottom:5px}.metric-strip strong{font-size:21px;letter-spacing:-.6px}.metric-strip small{font-size:10px}.smartbar{padding:0 11px 10px;gap:5px;overscroll-behavior-x:contain}.smartbar button{font-size:10px;min-height:37px;gap:4px;padding:8px;min-width:max-content}.smartbar svg{width:14px;height:14px}.tool-badge{font-size:8px;padding:3px;min-width:13px}.canvas-wrap{min-height:130px}.canvas-toolbar{top:10px;left:10px;padding:3px;border-radius:11px}.canvas-toolbar .tool-group{padding:0 2px;gap:0}.canvas-toolbar .icon-btn{width:41px;height:41px}.canvas-toolbar svg{width:17px;height:17px}.canvas-toolbar [data-action="fit"]{display:none}.plan-feedback{top:65px;left:10px;right:10px;padding:10px;gap:7px}.plan-feedback b{font-size:11px}.plan-feedback span{font-size:10px}.canvas-caption{font-size:9px;left:13px;bottom:17px;max-width:calc(100% - 145px)}.zoom-bar{right:12px;bottom:10px;height:40px}.zoom-bar button{width:37px;height:38px}.zoom-bar span{font-size:10px;min-width:37px}.canvas-footer{padding:0 11px;min-height:43px;height:43px;gap:6px}.multi-switch{font-size:10px;padding:6px 8px;min-height:33px}.snap-switch{font-size:10px!important;gap:4px}.snap-switch b{font-size:9px}.checks-button{font-size:10px!important;padding:6px;min-height:34px}.selection-bar{bottom:58px;padding:4px 5px 4px 9px;gap:1px;max-width:calc(100% - 20px)}.selection-bar span{font-size:11px;max-width:95px;margin-right:4px}.selection-bar button{height:41px;width:41px}.selection-bar button.inspect-mobile{height:41px;width:42px}.mobile-dock{padding:9px 11px calc(9px + env(safe-area-inset-bottom,0px));gap:7px}.mobile-dock button{font-size:11px;min-height:44px;padding:10px 6px;border-radius:10px}.app-footer{padding:6px 12px;min-height:30px;font-size:8px;gap:7px}.app-footer span{max-width:74%;line-height:1.4}.app-footer button{font-size:8px;max-width:26%;white-space:normal;text-align:right}.library-panel,.inspector-panel{position:fixed;left:0;right:0;top:auto;bottom:0;width:100%;height:min(84dvh,760px);max-height:calc(100% - 45px);border-radius:20px 20px 0 0;transform:translateY(110%);border:1px solid #dde6d8;box-shadow:0 -12px 60px #1a382430;padding-bottom:env(safe-area-inset-bottom,0px)}.library-panel.open,.inspector-panel.open{transform:translateY(0)}.library-panel .panel-heading,.inspector-panel .panel-heading{padding:18px 19px 13px;flex-shrink:0}.panel-heading .icon-btn{width:41px;height:41px;font-size:24px;border:1px solid var(--line)}.panel-heading h2{font-size:18px}.library-panel .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.library-panel .catalog-add{padding:8px;min-height:127px}.library-panel .catalog-add svg{height:65px}.library-panel .catalog-add strong{font-size:10px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35;min-height:27px}.library-panel .catalog-add small{font-size:9px}.library-panel .favorite-btn{height:32px;width:32px}.library-bottom{font-size:10px;min-height:36px}.search-box input,.category-row select,.field input,.field select,.field textarea,#catalog-search{font-size:16px!important}.field input,.field select,.field textarea{min-height:46px;padding:10px 12px}.field{font-size:12px}.check-field{font-size:13px;min-height:39px}.check-field input{width:19px;height:19px}.compact-actions button{min-height:43px;font-size:12px}.inspector-details summary{min-height:45px;font-size:13px}.inspector-details p,.info-note{font-size:12px}.modal-backdrop{padding:8px}.modal,.modal.pro-modal{padding:20px 17px;max-height:calc(100dvh - 16px);border-radius:17px}.modal h2{font-size:23px;letter-spacing:-.65px}.modal>header{margin-bottom:19px;gap:8px}.modal>header .icon-btn{width:40px;height:40px}.modal p{font-size:13px}.tool-lead{font-size:13px!important}.tool-intro{gap:12px}.tool-orb{width:46px;height:46px;border-radius:13px}.tool-intro h3{font-size:16px}.tool-intro p{font-size:12px}.pro-note{padding:12px;font-size:11px}.issue-list{grid-template-columns:1fr;gap:11px}.issue-card{padding:16px}.issue-card h3{font-size:14px}.issue-actions{flex-wrap:nowrap}.issue-actions button{flex:1;min-height:43px;font-size:12px;padding:10px}.modal-actions{margin-top:21px;gap:8px;flex-wrap:wrap}.modal-actions>.primary-btn,.modal-actions>.secondary-btn{flex:1;min-height:44px;font-size:12px;min-width:110px}.result-metrics{gap:10px}.result-metrics b{font-size:19px}.result-metrics span{font-size:10px}.result-card{padding:16px}.compare-grid,.alternatives-grid{grid-template-columns:1fr;gap:14px}.comparison-card,.alternative-card{padding:18px}.comparison-preview{height:190px}.comparison-card.empty .empty-plan{min-height:125px}.plan-stats div{font-size:12px;padding:8px 0}.comparison-card .split-actions button{font-size:12px;min-height:40px}.current-summary{padding:13px;gap:8px}.current-summary>b{font-size:12px}.current-summary>span:last-child{font-size:11px;width:100%}.alternative-card .primary-btn{font-size:12px;min-height:44px}.budget-context{gap:9px;padding:15px 12px;grid-template-columns:repeat(2,minmax(0,1fr))}.budget-context>div:last-child{grid-column:1/-1;display:flex;gap:8px;align-items:center;padding-top:8px;border-top:1px solid #dfe8d6}.budget-context>div:last-child span{margin:0}.budget-context>div:last-child b{font-size:13px}.budget-context span{font-size:10px}.budget-context b{font-size:19px}.budget-settings{gap:8px}.budget-settings .field{font-size:10px}.budget-settings input,.budget-settings select{padding:8px!important}.budget-line{grid-template-columns:1fr 1fr;gap:11px;padding:15px}.budget-line-top,.budget-label{grid-column:1/-1}.budget-line .field:nth-of-type(2){grid-column:1/-1}.budget-line .field{font-size:12px}.budget-line .check-field{font-size:12px}.budget-line .text-btn{font-size:12px;min-height:36px}.budget-quantity{min-height:22px;font-size:12px}.budget-quantity b{font-size:14px}.budget-total-box{padding:20px}.budget-total-box strong{font-size:26px}.budget-total-box p{font-size:11px}.popover{max-width:calc(100vw - 20px)}.popover .check-field{font-size:12px}.toast{font-size:11px;bottom:15px}.task-progress{gap:9px;padding:12px}.task-progress b{font-size:12px}.task-progress span:not(.pro-spinner){font-size:10px}.primary-btn,.secondary-btn{min-height:44px}}
@media(max-width:360px){.brand span:not(.brandmark){display:none}.header-actions .icon-btn{width:34px}.brand b{font-size:9px}.preset-tabs button{padding:7px 6px;font-size:10px}.preset-tabs button span{font-size:8px}.unit-control button{font-size:9px;padding:5px 6px}.studio-head{padding:13px 13px 10px;min-height:58px}.studio-head h1{font-size:18px;max-width:calc(100vw - 112px)}.metric-strip{padding:0 13px 12px;gap:7px}.metric-strip span{font-size:8px}.metric-strip strong{font-size:19px}.metric-strip small{font-size:9px}.smartbar{gap:4px;padding:0 9px 9px}.smartbar button{font-size:9px;padding:7px;gap:3px}.smartbar svg{width:12px;height:12px}.canvas-toolbar .icon-btn{width:40px;height:40px}.canvas-footer{gap:4px;padding:0 9px}.multi-switch{font-size:9px;padding:6px}.snap-switch b{font-size:8px}.checks-button{font-size:9px!important;padding:5px}.selection-bar span{max-width:63px}.library-panel .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.modal h2{font-size:21px}.field-grid{gap:10px}.modal{padding:18px 14px}.result-metrics b{font-size:16px}}
/* Short viewports / landscape phones: give space back to the actual drawing. */
@media(max-height:700px){.topbar{min-height:52px;height:52px}.projectbar{min-height:54px;padding-top:5px;padding-bottom:5px}.preset-tabs button{min-height:38px;padding-top:5px;padding-bottom:5px}.studio-head{padding-top:11px;padding-bottom:9px;min-height:51px}.studio-head h1{font-size:20px}.studio-head .eyebrow{margin-bottom:4px}.metric-strip{padding-bottom:10px}.metric-strip strong{font-size:20px}.smartbar{padding-bottom:8px}.smartbar button{min-height:32px;padding-top:6px;padding-bottom:6px}.canvas-wrap{min-height:110px}.mobile-dock{padding-top:7px;padding-bottom:7px}.app-footer{min-height:26px}.canvas-caption{display:none}.panel-heading{padding-top:14px;padding-bottom:12px}}
@media(max-height:550px){.projectbar{display:none}.studio-head{min-height:43px;padding-top:8px;padding-bottom:7px}.studio-head .eyebrow{display:none}.studio-head h1{font-size:18px}.metric-strip{padding-bottom:7px;display:flex;gap:17px}.metric-strip>div{display:flex;align-items:baseline;gap:6px;border:0}.metric-strip span{font-size:9px;margin:0}.metric-strip strong{font-size:16px}.metric-strip small{font-size:9px}.smartbar{padding-bottom:6px}.smartbar button{min-height:31px;padding-top:5px;padding-bottom:5px}.mobile-dock{padding-top:6px;padding-bottom:6px}.mobile-dock button{min-height:38px;padding-top:7px;padding-bottom:7px}.app-footer{display:none}.canvas-wrap{min-height:80px}.canvas-footer{min-height:36px;height:36px}.canvas-toolbar{top:7px}.canvas-toolbar .icon-btn{height:34px;width:34px}.topbar{min-height:46px;height:46px}.canvas-caption{display:none}.selection-bar{bottom:48px}.metric-strip>div:last-child{display:none}.plan-feedback{top:52px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.pro-spinner{border-color:#b1c7ac;border-top-color:#4b7f57}}

/* Final fit/readability refinements. */
.zoom-bar button.zoom-fit{width:45px;font-size:10px;font-weight:500;color:#657768;border-left:1px solid #edf1e9;border-right:1px solid #edf1e9;border-radius:0}
.tool-intro h3,.result-title h3,.issue-card h3,.empty-plan h3{margin-top:0}
.modal.pro-modal>header{position:sticky;top:-28px;z-index:5;background:white;padding-top:12px;padding-bottom:12px;margin-top:-12px;border-bottom:1px solid #e6ebe2}
@media(max-width:600px){.smartbar{width:100%;min-width:0;gap:5px;padding-left:11px;padding-right:11px;overflow:visible}.smartbar button{position:relative;min-width:0;flex:1 1 0;flex-direction:column;gap:4px;padding:7px 1px;min-height:47px;font-size:10px}.smartbar svg{width:15px;height:15px}.smartbar .tool-badge{position:absolute;top:4px;right:4px}.modal.pro-modal>header{top:-20px;padding-top:12px;padding-bottom:12px}.modal.pro-modal>header .eyebrow{font-size:8px}.field-grid{min-width:0}.field-grid .field{min-width:0}}
@media(max-width:360px){.smartbar{padding-left:9px;padding-right:9px;gap:4px}.smartbar button{font-size:9px;min-height:44px}}
@media(max-height:650px) and (max-width:600px){.projectbar{display:none}.studio-head{min-height:47px}.studio-head h1{font-size:18px}.metric-strip{padding-bottom:8px}.smartbar button{min-height:41px;padding-top:5px;padding-bottom:5px;gap:3px}.smartbar{padding-bottom:8px}}
@media(max-height:450px) and (max-width:920px){.studio-head,.metric-strip{display:none}.smartbar{padding-top:7px;padding-bottom:7px}.smartbar button{min-height:32px}.mobile-dock{padding-top:5px;padding-bottom:5px}.canvas-footer{height:34px;min-height:34px}}
