*{box-sizing:border-box} :root{font-family:Arial,"Microsoft YaHei",sans-serif;color:#263b34;background:#f5f4ed}body{margin:0}button,a,input{touch-action:manipulation}button{font:inherit;font-size:13px;background:#fffdf5;border:1px solid #ccd0c2;color:#2d4639;border-radius:6px;padding:10px 14px;cursor:pointer;min-height:44px}button:hover{background:#e6eddf}button.active{background:#334c3c;color:white;border-color:#334c3c}button:disabled{opacity:.45;cursor:default}header{height:88px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:20px;border-bottom:1px solid #d7dbce;background:#fcfbf6}.brand{text-decoration:none;font-size:23px;font-weight:bold;letter-spacing:2px;color:#304536}.brand span{font-size:13px;font-weight:normal;letter-spacing:1px;display:block;margin-top:5px}.dimensions{font-size:16px;letter-spacing:1px;color:#66715f}.dimensions small{font-size:11px}nav{display:flex;gap:6px}main{height:calc(100dvh - 88px);display:grid;grid-template-columns:minmax(0,1fr) 340px}#viewport{position:relative;min-width:0;overflow:hidden;background:#e5e8dd}canvas{display:block;width:100%;height:100%;touch-action:none}.eyebrow{position:absolute;top:26px;left:30px;font-size:10px;letter-spacing:2px;color:#6d7968;pointer-events:none}.view-tools{position:absolute;right:18px;top:16px;display:flex;gap:5px;z-index:5}.view-tools button{background:#fffdf4e8}.view-caption{position:absolute;bottom:60px;left:30px;pointer-events:none;display:grid;gap:9px}.view-caption b{font-size:24px;font-weight:400}.view-caption span{font-size:12px;color:#61705e}#status{position:absolute;bottom:12px;left:30px;right:20px;font-size:12px;color:#65715f;pointer-events:none}aside{padding:28px 24px;overflow:auto;border-left:1px solid #d4d9c9;background:#fcfbf6}.section-label{font-size:10px;color:#88917e;letter-spacing:2px}h1{font-size:30px;font-weight:500;margin:14px 0 8px}.intro{color:#74806c;margin:0 0 22px;font-size:13px}h2{font-size:16px;font-weight:500;margin:0 0 14px}section:not(#viewport){border-top:1px solid #dbdfd2;padding:20px 0}p{font-size:12px;line-height:1.8;color:#68745f}label{display:flex;justify-content:space-between;font-size:13px;align-items:center}.check{justify-content:start;gap:8px}input[type=range]{width:100%;height:40px;accent-color:#657c58;margin:6px 0}input[type=checkbox]{width:22px;height:22px;accent-color:#657c58}.swatches{font-size:11px;color:#7d8773;display:flex;align-items:center;gap:9px}.swatches span{width:26px;height:26px;background:#ded7c4;border:4px solid #aeb6a1;border-radius:50%}.step-heading{display:flex;justify-content:space-between;gap:10px}.step-heading span{font-size:13px;color:#809070;white-space:nowrap}.hardware{color:#92692b;background:#f1ead9;padding:6px 10px;border-radius:4px}#stepButtons{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}#stepButtons button{padding:7px 0}.step-actions{display:flex;gap:6px;margin-top:12px}.step-actions button{flex:1;padding:8px 3px;font-size:12px}.hint{font-size:11px}details{border-top:1px solid #dbdfd2;padding:15px 0}summary{font-size:13px;cursor:pointer;min-height:28px}.drawings{display:flex;flex-direction:column;gap:12px;margin:15px 0}a{color:#496646}.bill-row{display:flex;justify-content:space-between;width:100%;text-align:left;margin-top:5px;font-size:12px}.bill-row span{pointer-events:none}.office-link{display:block;text-decoration:none;font-size:12px;border:1px solid #bfcbb5;padding:13px;border-radius:6px;margin-top:18px}#partLabels{position:absolute;inset:0;pointer-events:none}.part-label{position:absolute;transform:translate(-50%,-50%);min-height:27px;padding:4px 7px;font-size:11px;pointer-events:auto;border-radius:4px;background:#fffdf2e8;box-shadow:0 2px 7px #32412f16}.part-label.active{background:#bd8031;border-color:#bd8031;color:white}[hidden]{display:none!important}
.palette{display:flex;gap:15px;margin:12px 0}.palette-dot{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:none!important;padding:5px;color:#435741!important;min-width:45px}.palette-dot span{display:block;width:32px;height:32px;border-radius:50%;background:#e5ddcb;border:3px solid #aeb6a1}.palette-dot.active span{outline:2px solid #496441;outline-offset:4px}.palette-dot em{font-style:normal;font-size:11px}.palette-dot[data-palette=green] span{background:#c8ddbc;border-color:#a2b8a0}.palette-dot[data-palette=pink] span{background:#eac7cf;border-color:#c7a8ad}.palette-dot[data-palette=white] span{background:#fafaf5;border-color:#d1d6d6}
#partLabels{z-index:3;isolation:isolate}#comparison{position:absolute;inset:0;pointer-events:none;clip-path:inset(0 50% 0 0);z-index:2;background:#fff}#drawingSheet{position:absolute;overflow:hidden;background:white}#drawingImage{position:absolute;max-width:none}#divider{position:absolute;top:0;bottom:0;left:50%;width:2px;background:#456744;z-index:4;pointer-events:none}#divider button{position:absolute;top:50%;left:-26px;width:54px;height:54px;border-radius:50%;padding:0;font-size:24px;pointer-events:auto;touch-action:none}#compareHelp{position:absolute;top:75px;left:50%;transform:translateX(-50%);padding:7px 10px;background:#fffffff0;white-space:nowrap;font-size:12px;z-index:4;pointer-events:none}.compare-legend{display:flex;justify-content:space-between;font-size:12px}.view-caption,#status{z-index:4}
@media(max-width:1150px){header{height:auto;min-height:126px;padding:10px 18px;flex-wrap:wrap;gap:8px}header nav{width:100%;justify-content:flex-end}main{height:calc(100dvh - 126px)}}
@media(max-width:850px){header{min-height:110px;padding:10px 12px}.brand{font-size:18px}.brand span{font-size:11px}.dimensions{font-size:12px}nav{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}nav button{font-size:13px;padding:8px 4px}main{height:auto;display:flex;flex-direction:column}#viewport{height:52dvh;min-height:285px;position:sticky;top:0;z-index:2}aside{border-left:0;padding:20px;overflow:visible}h1{font-size:25px}.eyebrow{top:70px;left:14px;font-size:9px}.view-tools{right:10px;top:10px}.view-caption{left:15px;bottom:48px}.view-caption b{font-size:18px}.view-caption span{font-size:11px}#status{left:15px;font-size:10px;bottom:5px}.part-label{padding:4px;min-width:28px;min-height:28px;font-size:11px}body{padding-bottom:env(safe-area-inset-bottom)}.step-actions button{min-height:48px}#compareHelp{font-size:10px;top:64px}}
@media(max-height:500px) and (pointer:coarse){main{display:grid;grid-template-columns:minmax(0,1fr) 300px;height:calc(100dvh - 126px)}#viewport{height:100%;min-height:0}aside{overflow:auto;padding:12px}.view-caption{display:none}}
/* Compact phone layout; desktop typography and spacing remain unchanged. */
@media(max-width:850px){
 header{min-height:0;padding:6px 10px;gap:5px}
 header .brand,aside>.section-label,aside>h1,aside>.intro,.eyebrow,.view-caption b{display:none}
 .dimensions{width:100%;text-align:right;font-size:12px;line-height:18px}
 nav{gap:4px}
 nav button{min-height:32px;padding:4px 6px;font-size:13px;line-height:20px}
 #viewport{height:clamp(180px,calc(100dvh - 355px),480px);min-height:0}
 .view-tools{top:7px;right:8px;gap:4px}
 .view-tools button{min-height:32px;min-width:34px;padding:4px 9px;font-size:13px;line-height:20px}
 .view-caption{bottom:7px;left:10px;gap:0}
 .view-caption span{font-size:11px}
 #status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
 aside{padding:6px 12px 12px;display:flex;flex-direction:column;gap:0}
 aside>section{order:1}
 aside>section:not(#viewport){padding:7px 0}
 aside>details,aside>.office-link{order:3}
 aside>.part-info{order:2}
 aside>section#paletteControls{order:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0;border-top:0}
 #paletteControls>label{display:block;flex-shrink:0;font-size:13px;line-height:18px}
 #paletteName{display:none}
 #paletteControls>.muted{display:none}
 .palette{margin:2px 0;gap:10px}
 .palette-dot{min-width:36px;min-height:38px;padding:2px 4px;gap:3px}
 .palette-dot span{width:22px;height:22px;border-width:2px}
 .palette-dot.active span{outline-offset:2px}
 .palette-dot em{font-size:11px;line-height:13px}
 aside h2{font-size:16px;margin:0 0 5px}
 aside p{margin:5px 0;line-height:1.5}
 aside label{font-size:13px;line-height:20px}
 aside input[type=range]{height:28px;margin:0 0 3px;display:block}
 #productControls>h2,#productControls>p,#explodeControls>h2,#explodeControls>p,#transparentControls>h2{display:none}
 .check{gap:5px;font-size:12px}
 .check input{width:20px;height:20px;margin:2px}
 #assemblyControls{display:flex;flex-direction:column}
 #assemblyControls>.step-heading{order:0;align-items:center}
 #assemblyControls>label{order:1}
 #assemblyProgress{order:2}
 #stepButtons{order:3;gap:5px}
 .step-actions{order:4;margin-top:5px;gap:5px}
 #stepText{order:5;margin-top:8px}
 #hardware{order:6;padding:4px 7px}
 #assemblyControls>.hint{order:7}
 #stepButtons button,.step-actions button{min-height:32px;padding:4px 5px;line-height:20px}
 aside details{padding:9px 0}
 .office-link{padding:8px;margin-top:8px}
 #compareHelp{top:48px;font-size:10px;padding:4px 6px}
 #status[role=alert]{width:auto;height:auto;clip-path:none;overflow:visible;padding:8px;background:#fff4ec;color:#8b3424}
}
@media(max-height:500px) and (pointer:coarse){
 header{min-height:0;padding:5px 10px}
 header .brand{display:none}
 header .dimensions{width:auto;margin-left:auto}
 header nav{display:flex;width:auto;flex:1}
 header nav button{flex:1;white-space:nowrap}
 main{height:calc(100dvh - 48px);grid-template-columns:minmax(0,1fr) 300px}
 #viewport{height:100%;min-height:0}
 aside{padding:6px 10px;overflow:auto}
}
