:root{font-family:"Inter","PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#262d28;background:#f5f5f0;font-synthesis:none;--ink:#24302a;--muted:#626d63;--line:#e6e9e1;--green:#214c3d;--pale:#eaf0e8}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}button,input,select{outline-offset:3px}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid #497f6c}button{color:inherit}h1,h2,h3,p{margin:0}svg{width:18px;height:18px;flex:none;vertical-align:middle}button{touch-action:manipulation}
.topbar{display:flex;align-items:center;gap:37px;height:69px;background:#fff;border-bottom:1px solid var(--line);padding:0 clamp(18px,3.25vw,53px)}
.brand{display:flex;align-items:center;gap:10px;min-width:137px;color:var(--green);font-weight:800;font-size:21px;letter-spacing:.06em;line-height:1}
.brand small{display:block;font-size:9px;letter-spacing:.2em;margin-top:5px;color:#66766b}.brand-mark{display:grid;place-items:center;width:37px;height:37px;background:var(--green);color:#f3f3e9;border-radius:9px}.brand-mark svg{width:22px;height:22px}
nav,.top-right,.heading-actions,.canvas-label,.toolbar{display:flex;align-items:center;gap:9px}.top-right{margin-left:auto;gap:18px}.nav,.tool,.account,.square,#zoomText{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;border-radius:8px}.nav{padding:10px 13px;color:#58655c;white-space:nowrap;font-size:14px}.nav:hover,.nav.active,.tool:hover,.selected-tool{background:var(--pale);color:var(--green)}.account{background:#e3ebe0;color:var(--green);width:36px;height:36px;font-weight:750;border-radius:50%;flex:none}
main{max-width:1740px;margin:auto;padding:29px clamp(16px,3.25vw,53px) 0}.heading{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:22px}.crumb{font-size:13px;color:#606c61;margin-bottom:10px}.crumb span{margin:0 5px;color:#8c968c}h1{font-size:clamp(29px,3vw,39px);font-weight:750;letter-spacing:-.035em;line-height:1.15;overflow-wrap:anywhere}.heading p{color:var(--muted);margin-top:9px;font-size:15px}.heading-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end;padding-bottom:2px}.save-status{font-size:13px;color:#59695e;white-space:nowrap;margin-right:7px}.save-status::before{content:"";display:inline-block;border-radius:50%;width:7px;height:7px;background:#78937f;margin-right:7px;vertical-align:2px}.button{border:1px solid #dce3d8;background:white;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 13px;white-space:nowrap;min-height:38px;font-size:14px;font-weight:650}.button:hover:not(:disabled),.square:hover{background:#f0f4ed}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover:not(:disabled){background:#32614f}.danger{color:#9d4336}.subtle{border-color:transparent;background:transparent}
.workbench{display:grid;grid-template-columns:minmax(205px,230px) minmax(0,1fr) minmax(225px,252px);gap:13px;min-height:570px;height:calc(100dvh - 246px);max-height:960px}.library,.inspector,.center{min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff;border:1px solid #e0e5db;border-radius:13px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:18px 17px 15px}.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:800;color:#718577;margin-bottom:5px}h2{font-size:19px;line-height:1.2}.square{width:33px;height:33px;border:1px solid #e0e7de;color:#335d4b;background:#f7f9f5}.panel-icon{color:#637768}
.search{margin:0 15px 12px;display:flex;align-items:center;gap:6px;padding:0 9px;background:#f7f8f4;border:1px solid #e6eae2;border-radius:7px;color:#69786b}.search input{border:0;background:transparent;width:100%;min-width:0;padding:9px 2px;font-size:14px}.search svg{width:15px}.tabs{display:flex;flex-wrap:wrap;gap:4px;padding:0 14px 12px}.tabs button{border:0;background:transparent;color:#606a61;font-size:13px;border-radius:6px;padding:6px 7px;white-space:nowrap}.tabs .active{background:#e9f0e7;color:#315848;font-weight:750}
.items{padding:0 12px 10px;min-height:0;overflow:auto;flex:1}.furniture{width:100%;border:1px solid transparent;border-bottom-color:#edf0e9;display:flex;align-items:center;gap:10px;background:white;border-radius:7px;padding:8px 3px;text-align:left;min-height:57px}.furniture:hover{border-color:#dce8db;background:#f6f9f4}.furniture .thumb{width:46px;height:40px;border-radius:6px;background:#f0f2e9;flex:none}.furniture .caption{flex:1;min-width:0}.furniture strong,.furniture small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.furniture strong{font-size:14px;font-weight:650}.furniture small{font-size:12px;color:#657267;margin-top:4px}.furniture>svg{color:#60786a;width:15px}.library-bottom{padding:12px 14px;border-top:1px solid var(--line);text-align:center}.library-bottom .button{width:100%}.library-bottom small{display:block;margin-top:6px;color:#647369;font-size:12px}
.workspace-bar{display:flex;justify-content:space-between;align-items:center;gap:4px;min-height:54px;padding:0 12px;border-bottom:1px solid var(--line)}.canvas-label{font-size:14px;white-space:nowrap}.canvas-label>span:first-child{color:var(--green)}.canvas-unit{font-size:12px;color:var(--muted)}.separator{height:17px;width:1px;background:#e0e5dc;flex:none}.toolbar{gap:3px}.tool{width:32px;height:32px;color:#566b5e}.tool svg{width:17px;height:17px}.stage{background:#e9ede5;flex:1;position:relative;overflow:hidden;min-height:310px}.stage>canvas{display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none}.stage>canvas:focus-visible{outline-offset:-2px}.canvas-note,.zoom{position:absolute;bottom:12px;display:flex;align-items:center;background:#fff;border:1px solid #dce5da;border-radius:8px;height:34px;color:#526758;box-shadow:0 2px 6px #3147340a}.canvas-note{left:12px;padding:0 9px;gap:6px;font-size:12px;pointer-events:none}.canvas-note svg{width:14px}.zoom{right:12px}.zoom .tool{width:29px}.zoom #zoomText{width:51px;font-size:13px;font-weight:650;height:30px}.workspace-footer{font-size:12px;color:#617267;display:flex;justify-content:space-between;padding:11px 13px;border-top:1px solid var(--line)}.workspace-footer i{display:inline-block;background:#70977d;border-radius:50%;width:6px;height:6px;vertical-align:1px;margin-right:7px}
#properties{min-height:0;overflow:auto}.prop-section{padding:14px 16px;border-top:1px solid var(--line)}.prop-title{font-size:14px;margin-bottom:10px;display:flex;align-items:center;gap:7px}.prop-title svg{width:16px;color:#567360}.props-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.field{display:flex;flex-direction:column;gap:5px;font-size:13px;color:#536256}.field input,.field select,.share-list select{min-width:0;width:100%;padding:8px 8px;border:1px solid #dce5da;border-radius:6px;background:#fbfcf9;color:#23372d}.field input[type=range]{padding:0;accent-color:var(--green)}.field input:disabled{color:#536256}.upload-tile{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;padding:14px 5px;background:#f5f8f2;border:1px dashed #aebfaf;border-radius:8px;color:#345d4b;font-size:13px;font-weight:650}.upload-tile:hover:not(:disabled){background:#eaf2e8}.upload-tile svg{width:20px;height:20px}.fine{font-size:12px;color:#5e7163;line-height:1.5}.prop-section .fine{margin-top:7px}.prop-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}.prop-actions .button{padding:5px 7px;min-height:31px;font-size:12px}.placed-list{list-style:none;padding:0;margin:0}.placed-list button{width:100%;display:flex;align-items:center;gap:7px;text-align:left;padding:6px 5px;background:white;border:0;border-radius:5px;font-size:13px}.placed-list button.active,.placed-list button:hover{background:#eaf1e8}.placed-list i{width:9px;height:9px;border-radius:3px;border:1px solid #0002;flex:none}.placed-list span{margin-left:auto;color:#68796d;font-size:12px;white-space:nowrap}
.page-footer{padding:12px 2px;display:flex;justify-content:space-between;color:#5f7064;font-size:12px}.page-footer b{margin:0 5px}.page-footer strong{color:#3c604e}
.view-modes{display:flex;align-items:center;gap:2px;background:#f0f3ed;border:1px solid #e3e9df;border-radius:8px;padding:2px;margin-right:5px;white-space:nowrap}.view-modes button{display:inline-flex;align-items:center;gap:4px;border:0;border-radius:6px;background:transparent;color:#576a5e;padding:5px 7px;font-size:13px;font-weight:700}.view-modes button svg{width:14px;height:14px}.view-modes button:hover{color:var(--green)}.view-modes button[aria-pressed=true]{background:#fff;color:var(--green);box-shadow:0 1px 3px #214c3d20}.stage>canvas[hidden],.toolbar>.tool[hidden]{display:none}.stage.is-3d{background:radial-gradient(ellipse at 52% 43%,#f7f8f3 0%,#e9eee5 59%,#dde7dc 100%)}.stage.is-3d #scene{cursor:grab}.stage.is-3d #scene.orbiting{cursor:grabbing}
.floor-nav{display:flex;gap:4px;padding:7px 10px;border-bottom:1px solid var(--line);overflow:auto}.floor-nav[hidden]{display:none}.floor-nav button{white-space:nowrap;background:none;border:0;border-radius:6px;padding:5px 8px;font-size:13px;color:var(--muted)}.floor-nav button[aria-pressed=true]{background:var(--pale);color:var(--green);font-weight:750}.furniture .verify-note{white-space:normal;color:#805b25}
.room-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:7px 10px;border-bottom:1px solid var(--line);font-size:13px}.room-bar[hidden],.room-bar button[hidden]{display:none}.room-bar label{display:flex;align-items:center;gap:5px;white-space:nowrap}.room-bar select{max-width:120px;border:1px solid #dce5da;border-radius:6px;background:#fbfcf9;padding:5px;color:var(--ink)}.room-bar .button{min-height:29px;font-size:12px;padding:4px 7px}.room-bar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:auto;font-weight:650;color:var(--green)}.plan-row .room-plan-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.tool.pan-tool{width:auto;padding:0 5px;gap:3px;font-size:12px;white-space:nowrap}.stage.is-panning>canvas{cursor:grab}.stage.is-panning>canvas.orbiting{cursor:grabbing}@media(max-width:650px){.pan-tool span{display:none}}
.toolbar .wide-tool{display:none}
.library-row{display:flex;align-items:center;gap:3px;border-bottom:1px solid #edf0e9}.library-row .furniture{flex:1;min-width:0;border-bottom-color:transparent}.library-row .thumb{object-fit:cover}.library-row:has(.library-photo) .furniture>svg{display:none}.library-photo{flex:none;width:28px;height:29px}.library-photo svg{width:16px;height:16px}
.library-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}.mobile-layout-links,.mobile-canvas-link{display:none}.placed-list .placed-name{min-width:0;flex:1;white-space:normal;overflow-wrap:anywhere;margin:0;color:inherit;font-size:inherit}.placed-list .placed-size{flex:none}
.mobile-furniture-tools{display:none}
.plan-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px 10px;border-bottom:1px solid var(--line)}
.plan-tools[hidden]{display:none}
.plan-tools .button{min-height:34px;padding:4px 8px;gap:5px;font-size:13px}
.plan-tools .button svg{width:15px;height:15px}
.plan-tools .button[aria-pressed=true]{background:var(--pale);color:var(--green)}
.plan-tools button i{width:12px;height:12px;border:1.5px solid currentColor;border-radius:0 12px 0 0}
.plan-tool-status{display:flex;flex-wrap:wrap;gap:3px 8px;font-size:12px;line-height:1.4;color:var(--muted)}
#measureStatus{color:#175786;font-weight:700}
#doorsStatus[data-conflict]{color:#a12d25;font-weight:700}
.stage.is-measuring:not(.is-panning)>canvas{cursor:crosshair}
@media(max-width:640px){.plan-tools .button{min-height:44px}.plan-tool-status{flex:1 1 105px}.stage.is-measuring .canvas-note{display:none}}
.furniture-photo-preview{display:block;max-width:100%;max-height:58dvh;object-fit:contain;margin:0 auto;border-radius:8px}.furniture-photo-empty{display:flex;align-items:center;justify-content:center;gap:8px;min-height:115px;background:#f3f6ef;border:1px dashed #bbc8b9;border-radius:8px;color:var(--muted);font-size:14px}
.signin{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 45% 20%,#f5f7ef,#e8eee4 72%)}.signin[hidden],.signin [hidden]{display:none}.signin-card{width:min(100%,410px);padding:clamp(24px,5vw,38px);background:#fff;border:1px solid #dce5d8;border-radius:16px;box-shadow:0 16px 55px #254c3617}.signin-card h1{font-size:30px;margin:24px 0 18px}.signin-message{color:var(--muted);margin-bottom:12px}.signin-form{display:grid;gap:14px}.signin-form .field{font-size:15px;gap:7px}.signin-form .field input{height:44px;font-size:16px;padding:9px 11px}.signin-form .primary{min-height:43px;margin-top:3px}.signin-form .modal-error{margin-top:-2px}.signin-form .fine{font-size:13px}.signin a.button{text-decoration:none}
@media(max-width:1150px){.view-modes button svg{display:none}.view-modes{margin-right:3px}}
@media(max-width:450px){.workspace-bar{padding:0 7px}.canvas-label>.separator{display:none}.canvas-label>span:first-child{display:none}.toolbar{gap:2px}.toolbar .tool{width:25px}.view-modes button{padding-inline:6px}}
dialog{padding:0;border:1px solid #d8e2d7;border-radius:14px;width:min(530px,calc(100% - 24px));color:var(--ink);max-height:85dvh;box-shadow:0 20px 90px #26372f35}dialog::backdrop{background:#28362d75}#modalBody{padding:22px}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.modal-head h2{font-size:22px}.modal-form{display:grid;gap:12px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:9px;flex-wrap:wrap}.modal-error{font-size:13px;color:#973e30;min-height:1em}.plan-list,.share-list{display:grid;gap:8px;margin:12px 0}.plan-row,.share-row{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:7px;padding:8px 9px}.plan-row strong,.share-row span{flex:1;overflow-wrap:anywhere}.plan-row .fine{display:block}.share-row select{width:92px}.toast{position:fixed;right:24px;bottom:24px;color:white;background:#284c3d;padding:11px 16px;border-radius:9px;max-width:min(450px,90vw);z-index:10;box-shadow:0 6px 22px #26372f30}
@media(max-width:1080px){.workbench{grid-template-columns:183px minmax(0,1fr) 203px;gap:8px}.panel-head{padding-left:12px;padding-right:12px}.prop-section{padding-left:10px;padding-right:10px}.furniture{gap:6px}.furniture .thumb{width:38px}.tabs{padding-left:9px;padding-right:5px}.canvas-unit{display:none}}
@media(max-width:850px){
  .workbench{grid-template-columns:180px minmax(0,1fr);height:auto;max-height:none}
  .library,.center{height:550px}.inspector{grid-column:1/-1}
  #properties{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.topbar{gap:14px}
  .furniture strong,.furniture small{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip}
}
@media(max-width:640px){
  .topbar{height:58px;padding:0 10px;gap:5px}.top-right{gap:3px}.brand{min-width:0;gap:4px;font-size:16px}
  .brand-mark{width:29px;height:29px}.brand small{display:none}nav,.nav{gap:4px}.nav{font-size:12px;padding:7px 4px}
  .nav svg{display:none}.account{width:28px;height:28px;font-size:12px}main{padding:17px 9px 0}
  .heading{align-items:flex-start;flex-direction:column;margin-bottom:11px}.heading-actions{justify-content:flex-start}
  .workbench{grid-template-columns:minmax(0,1fr)}.center{grid-row:1;height:auto;min-height:475px}
  .mobile-furniture-tools{display:grid;gap:6px;padding:7px 9px 8px;border-bottom:1px solid var(--line);background:#f7f9f5}
  .mobile-furniture-tools[hidden],.mobile-furniture-actions[hidden]{display:none}
  .mobile-furniture-picker{display:flex;align-items:center;gap:8px;min-width:0}
  .mobile-furniture-picker label{font-size:14px;color:var(--green);font-weight:650}
  .mobile-furniture-picker select{flex:1;min-width:0;min-height:44px;border:1px solid #cfd9cf;border-radius:8px;background:white;color:var(--ink);padding:6px 8px;font-size:16px;text-overflow:ellipsis}
  .mobile-furniture-picker output{width:41px;text-align:right;color:var(--muted);font-size:13px;white-space:nowrap}
  .mobile-furniture-actions{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:6px}
  .mobile-furniture-actions .button{min-height:44px;gap:5px;padding:5px 6px;font-size:14px}
  .mobile-furniture-actions .button svg{width:16px;height:16px}
  .mobile-rotation{border-top:1px solid var(--line);padding-top:6px;display:grid;gap:5px}.mobile-rotation[hidden]{display:none}
  .angle-inputs,.angle-actions{display:flex;align-items:center;gap:8px}.angle-inputs>input{flex:1;min-width:0;height:38px;accent-color:var(--green)}
  .angle-inputs label{display:flex;align-items:center;gap:3px;font-size:14px}.angle-inputs label input{width:75px;min-height:40px;font-size:16px;padding:5px;border:1px solid #cfd9cf;border-radius:8px}
  .angle-actions{justify-content:flex-end}.angle-actions .button{min-height:44px}
  .mobile-layout-links{display:flex;grid-row:2;gap:8px}
  .mobile-layout-links a,.mobile-canvas-link{display:inline-flex;align-items:center;justify-content:center;color:var(--green);font-weight:650;text-decoration:none}
  .mobile-layout-links a{flex:1;min-height:40px;background:white;border:1px solid #dce5da;border-radius:8px;font-size:14px}
  .mobile-canvas-link{min-height:40px;padding:0 6px;font-size:13px}
  .library{height:auto;scroll-margin-top:8px}
  .library .panel-head{padding:12px}.library-actions .square,.library-photo{width:44px;height:44px}
  .library .search{margin-inline:12px}.library .search input{font-size:16px}.library .tabs button{min-height:36px;font-size:14px}
  .library-bottom{padding:8px 12px 10px;border-top:0;border-bottom:1px solid var(--line)}
  .library-bottom:has(button:disabled){display:none}
  .items{order:1;display:block;flex:none;overflow:visible;padding:0 12px 8px}
  .library-row{gap:8px}.library-row .furniture{min-height:66px;gap:9px}.furniture .thumb{width:48px;height:44px}
  .furniture strong{font-size:15px}.furniture small{font-size:13px;line-height:1.45}
  .inspector{grid-column:auto;scroll-margin-top:8px}#properties{grid-template-columns:minmax(0,1fr);overflow:visible}
  .page-footer{gap:8px}.canvas-note{left:7px}.zoom{right:7px}
  .stage:not(.is-3d) .zoom{height:46px}
  .stage:not(.is-3d) .zoom > button{min-width:44px;height:44px}
}
@media(min-width:901px){
  .topbar{height:60px;padding-inline:clamp(18px,2vw,38px)}
  main{max-width:2160px;padding:15px clamp(14px,1.7vw,34px) 0}
  .heading{align-items:center;min-height:48px;margin-bottom:12px}
  .heading .crumb,.heading p{display:none}
  .heading h1{font-size:clamp(29px,2.6vw,38px)}
  .heading-actions{padding-bottom:0}
  .heading-actions .button{min-height:42px;font-size:15px}
  .workbench{height:calc(100dvh - 151px);min-height:555px;max-height:none;gap:10px}
  .workbench.is-canvas-wide{grid-template-columns:minmax(0,1fr);height:calc(100dvh - 137px)}
  .workbench.is-canvas-wide > :is(.library,.inspector){display:none}
  .toolbar .wide-tool{display:inline-flex;width:auto;padding:0 7px;white-space:nowrap}
  .toolbar .tool,.view-modes button{min-width:36px;min-height:38px}
  .toolbar .tool svg{width:19px;height:19px}
  .canvas-label,.view-modes button{font-size:15px}
  .floor-nav button,.room-bar .button{font-size:14px;min-height:34px}
  .room-bar select{font-size:14px;min-height:34px}
  .plan-tools .button{min-height:38px;font-size:14px}
  .plan-tool-status{font-size:13px}
  .zoom,.canvas-note{height:39px;font-size:13px}
  .zoom .tool{width:36px;height:37px}
  .zoom #zoomText{height:36px}
  .furniture strong,.field{font-size:15px}
  .furniture small,.fine{font-size:13px}
}
@media(min-width:901px) and (max-width:1200px){
  .toolbar .wide-tool span,.canvas-unit,.canvas-label .separator{display:none}
}

.stage:not(.is-3d) .zoom{top:10px;bottom:auto}
@media(max-width:640px){
  .center:has(.stage:not(.is-3d)){margin-inline:-7px;--plan-workspace-extra-width:14px}
  .stage:not(.is-3d){
    --plan-workspace-extra-height:320px;
    min-height:calc(310px + var(--plan-workspace-extra-height));
  }
}
@media(max-width:640px) and (max-height:740px){
  .stage:not(.is-3d){--plan-workspace-extra-height:250px}
}
@media(min-width:641px) and (max-width:850px){
  .center:has(.stage:not(.is-3d)){
    --plan-workspace-extra-height:180px;
    height:calc(550px + var(--plan-workspace-extra-height));
  }
}
@media(min-width:851px) and (max-width:900px){
  .workbench:has(.stage:not(.is-3d)){
    --plan-workspace-extra-height:210px;
    height:calc(100dvh - 246px + var(--plan-workspace-extra-height));
    min-height:calc(570px + var(--plan-workspace-extra-height));
    max-height:calc(960px + var(--plan-workspace-extra-height));
  }
}
@media(min-width:901px){
  .workbench:has(.stage:not(.is-3d)){
    --plan-workspace-extra-height:210px;
    height:calc(100dvh - 151px + var(--plan-workspace-extra-height));
    min-height:calc(555px + var(--plan-workspace-extra-height));
  }
  .workbench.is-canvas-wide:has(.stage:not(.is-3d)){
    height:calc(100dvh - 137px + var(--plan-workspace-extra-height));
  }
}
@media(min-width:1081px){
  .workbench:not(.is-canvas-wide):has(.stage:not(.is-3d)){
    --plan-workspace-extra-width:50px;
    grid-template-columns:210px minmax(0,1fr) 222px;
  }
}
