:root{--ink:#292d2b;--muted:#8a8d86;--line:#e9e9e2;--green:#53634c;--cream:#f8f7f4}*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;background:var(--cream);font-size:13px}button,select,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #697e57;outline-offset:3px}button{transition:background .18s,border-color .18s,transform .18s}button:disabled{opacity:.4;cursor:not-allowed}.header{height:80px;display:flex;align-items:center;gap:25px;padding:0 36px;background:#fff;border-bottom:1px solid var(--line)}.brand{font-size:24px;letter-spacing:4px;font-weight:800;text-decoration:none;color:var(--ink);display:flex;align-items:center}.brand-dot{height:6px;width:6px;border-radius:50%;background:#a8b794;margin:14px 0 0 4px}.divider{height:24px;width:1px;background:var(--line)}.product-name{font-size:17px;font-weight:600;letter-spacing:1px}.product-name span{font-size:10px;color:var(--muted);letter-spacing:2px;margin-left:10px}.prototype{font-size:10px;color:#7f866f;border:1px solid #e1e6d9;padding:5px 8px;border-radius:4px}.header-actions{margin-left:auto;display:flex;gap:20px;align-items:center}.button{border:0;border-radius:5px;padding:13px 18px;display:flex;gap:28px;align-items:center;font-size:12px;letter-spacing:.3px}.dark{color:white;background:#303c30}.dark:hover{background:#53634c}.light{background:white;color:var(--ink);border:1px solid #e7e7e1;box-shadow:0 3px 10px #00000003}.text-btn{background:none;border:0;padding:8px 0;color:#666e61;font-size:12px}.workspace{display:grid;grid-template-columns:330px minmax(0,1fr);height:calc(100dvh - 80px);min-height:650px}.sidebar{background:white;overflow:auto;border-right:1px solid var(--line);padding:30px 25px 0;scrollbar-width:thin}.intro{padding:3px 0 26px}.eyebrow{font-size:9px;letter-spacing:1.7px;color:#909980;font-weight:600}h1{font-size:23px;font-weight:500;letter-spacing:1px;margin:14px 0 9px}.intro p{color:var(--muted);font-size:11px;margin:0;line-height:1.8}section section{padding:23px 0;border-top:1px solid var(--line)}.sidebar>section{padding:24px 0;border-top:1px solid var(--line)}.section-title{display:flex;align-items:center;gap:10px;margin-bottom:18px}.section-title h2{font-size:13px;font-weight:600;margin:0;letter-spacing:1px}.step{font-size:10px;color:#99a38e;border:1px solid #e6eadf;border-radius:50%;width:21px;height:21px;display:grid;place-items:center}.section-meta{margin-left:auto;font-size:10px;color:var(--muted)}.shape-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.shape-card{border:1px solid var(--line);border-radius:5px;background:white;display:flex;flex-direction:column;align-items:center;gap:9px;padding:12px 2px;font-size:10px;color:#858b80;position:relative}.shape-card svg{width:38px;height:29px;fill:none;stroke:currentColor;stroke-width:1.3}.shape-card.active{border-color:#89967c;background:#f4f6ef;color:#44523d}.shape-card.active:after{content:'✓';position:absolute;right:5px;top:3px;font-size:9px}.parameter{margin-top:20px}.parameter label{display:flex;justify-content:space-between;font-size:11px;color:#7b8175}.parameter strong{font-size:10px;font-weight:500;color:#4f5946}input[type=range]{width:100%;accent-color:var(--green);height:3px;margin:15px 0 9px;cursor:pointer}.range-label{display:flex;justify-content:space-between;font-size:9px;color:#a0a499}.info-line{font-size:10px;color:#92968d;background:#f7f8f4;border-radius:4px;padding:10px;margin-top:15px;display:flex;gap:10px}.info-line b{font-weight:500;color:#687360}.info-line span{margin-left:auto;color:#687360}.finish-row{display:flex;justify-content:space-between}.finish-button{background:none;border:0;color:#8b8e86;font-size:10px;display:grid;justify-items:center;gap:8px;padding:0 5px}.swatch{width:33px;height:33px;border-radius:50%;display:block;position:relative;border:1px solid #0000000c}.finish-button.active .swatch:after{content:'';position:absolute;inset:-5px;border:1px solid #8b987e;border-radius:50%}.finish-button.active{color:#3c4936}.module-card{width:100%;display:flex;align-items:center;border:1px solid #9ca98f;border-radius:5px;background:#f7f8f3;padding:14px 12px;text-align:left;gap:16px;color:var(--ink)}.module-symbol{width:28px;height:41px;background:linear-gradient(90deg,#88662f,#d1af75 40%,#aa8246);border-radius:5px 5px 9px 9px;transform:rotate(-15deg);position:relative;margin:0 8px}.module-symbol:after{content:'';position:absolute;bottom:2px;left:6px;right:6px;height:5px;border-radius:50%;background:#ffedc8}.module-card b{font-size:17px;font-weight:500}.module-card small{display:block;color:#9a9f90;font-size:9px;margin-top:5px}.module-card .check{margin-left:auto;color:#6f805f}.quantity-line,.total-line{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-top:18px}.stepper{display:flex;align-items:center;border:1px solid var(--line);border-radius:4px;overflow:hidden}.stepper button{border:0;background:#f8f9f6;color:#67725c;width:29px;height:28px}.stepper output{min-width:32px;text-align:center;font-size:11px}.total-line{color:#93988b;font-size:10px;margin-top:12px}.total-line b{font-weight:500;color:#617050}.field-row{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin-top:17px;color:#7d8475}.field-row select{background:#f8f9f6;border:1px solid var(--line);padding:5px 9px;border-radius:4px;color:#616c56;font-size:11px}.field-row input{accent-color:var(--green);width:17px;height:17px}.temperature{display:flex;gap:6px;margin-top:14px}.temperature button{border:1px solid var(--line);background:#fff;color:#969b8e;font-size:10px;flex:1;padding:8px;border-radius:4px}.temperature button.active{background:#f3f5ed;border-color:#9ca98f;color:#4b5b40}.sidebar-footer{border-top:1px solid var(--line);padding:23px 0;color:#9ca491;font-size:8px;letter-spacing:1.4px;line-height:2}.sidebar-footer span{font-size:10px;letter-spacing:1px;color:#b0b5a9}.viewer-panel{position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#f9f8f4,#eeede8);min-height:580px}#viewport{position:absolute;inset:0}#viewport canvas{width:100%;height:100%;display:block;touch-action:none}.scene-top{position:absolute;top:25px;left:28px;right:28px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.scene-top>*{pointer-events:auto}.live-label{display:flex;gap:8px;align-items:center;color:#92998a;font-size:10px;letter-spacing:.6px}.live-label i{width:5px;height:5px;border-radius:50%;background:#98a588}.scene-tabs{background:#e6e6df88;padding:4px;border-radius:5px;display:flex}.scene-tabs button{border:0;background:none;padding:8px 14px;color:#8a9182;font-size:10px;border-radius:3px}.scene-tabs .active{background:white;color:#4c5943;box-shadow:0 1px 5px #00000005}.view-tools{position:absolute;right:26px;top:100px;display:flex;flex-direction:column;background:#ffffffdd;box-shadow:0 4px 18px #00000005;border:1px solid #e9e9e0;border-radius:6px;padding:4px}.view-tools button{width:35px;height:37px;border:0;background:none;font-size:20px;color:#858e7b;border-radius:3px}.view-tools button:hover,.view-tools button.active{background:#edf0e6;color:#53634c}.view-tools div{height:1px;background:var(--line);margin:3px 5px}.scene-caption{position:absolute;left:34px;bottom:137px;pointer-events:none}.scene-caption>span{font-size:9px;letter-spacing:2.3px;color:#a0a38d}.scene-caption h3{font-size:24px;font-weight:400;letter-spacing:1.5px;margin:11px 0}.scene-caption p{font-size:11px;color:#929884;letter-spacing:.5px;margin:0}.gesture{position:absolute;bottom:95px;left:50%;transform:translateX(-50%);font-size:10px;color:#a8ac9e;white-space:nowrap;pointer-events:none}.scene-bottom{position:absolute;bottom:24px;left:30px;right:30px;display:flex;align-items:center;justify-content:space-between}.preview-note{color:#a3a895;font-size:9px}.bom-toggle{position:absolute;bottom:27px;left:50%;transform:translateX(-50%);border:1px solid #dadfd1;background:#ffffffeb;border-radius:6px;padding:11px 15px;display:flex;align-items:center;gap:15px;color:#626f55;font-size:11px;box-shadow:0 3px 15px #00000003}.bom-toggle span:first-child{font-size:9px;background:#eff2e9;padding:2px 6px;border-radius:3px}.bom-panel{position:absolute;bottom:82px;right:28px;width:420px;max-width:calc(100% - 48px);background:#fffffff5;backdrop-filter:blur(16px);box-shadow:0 10px 50px #1d28131a;border:1px solid #e5e8dc;border-radius:9px;padding:22px;max-height:75%;overflow:auto}.bom-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.bom-heading h3{font-size:17px;font-weight:500;margin:8px 0}.bom-row{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid #eceee5;font-size:11px}.bom-row small{display:block;color:#a0a895;font-size:9px;margin-top:4px}.bom-row b{font-weight:500;font-size:12px;color:#596c46}.bom-panel p{font-size:10px;line-height:1.7;background:#f3f6ed;padding:10px;color:#78886a}.bom-panel>small{font-size:9px;color:#a0a796;line-height:1.6}.loading,.fatal{position:absolute;inset:0;z-index:4;background:#f4f3ef;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:15px;font-size:12px;color:#6c785f}.loading span{font-size:10px;color:#9ca58e}.loader{width:24px;height:24px;border:2px solid #dfe3d4;border-top-color:#889978;border-radius:50%;animation:spin 1s linear infinite}.fatal p{max-width:75%;text-align:center;line-height:1.7}.fatal button{padding:10px 20px;background:white;border:1px solid var(--line)}[hidden]{display:none!important}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);opacity:0;background:#303c30;color:white;border-radius:5px;padding:13px 20px;font-size:12px;pointer-events:none;z-index:20;transition:all .2s}#toast.show{opacity:1;transform:translate(-50%,0)}@media(min-width:1600px){.workspace{grid-template-columns:370px minmax(0,1fr)}.sidebar{padding:36px 33px 0}}@media(max-width:1000px){.header{padding:0 20px;gap:15px}.prototype,.product-name span{display:none}.workspace{grid-template-columns:285px minmax(0,1fr)}.sidebar{padding:25px 18px 0}.scene-top{left:20px;right:20px}.scene-tabs button{padding:8px}.scene-caption{left:22px}.preview-note{display:none}.scene-bottom{justify-content:flex-end}.bom-toggle{left:22px;transform:none}.gesture{bottom:92px}.scene-caption h3{font-size:20px}}@media(max-width:700px){.header{height:64px;padding:0 16px;gap:12px}.brand{font-size:19px;letter-spacing:2px}.divider{height:20px}.product-name{font-size:14px}.header-actions{gap:12px}.header-actions .text-btn{font-size:10px}.header .button{padding:10px 12px;font-size:10px;gap:10px}.workspace{display:flex;flex-direction:column;height:auto;min-height:0}.viewer-panel{order:0;height:60dvh;min-height:440px}.sidebar{order:1;overflow:visible;border-right:0;display:grid;grid-template-columns:1fr 1fr;gap:0 24px;padding:22px 20px}.intro{grid-column:1/-1;padding-bottom:20px}.sidebar>section{padding:20px 0}.sidebar-footer{grid-column:1/-1}.intro h1{font-size:23px}.shape-grid{grid-template-columns:repeat(3,1fr);gap:5px}.shape-card{padding:10px 1px;font-size:9px}.shape-card svg{width:29px;height:25px}.scene-top{top:17px;left:17px;right:17px}.live-label{font-size:9px}.view-tools{top:70px;right:15px}.view-tools button{height:31px;width:30px}.scene-caption{bottom:100px;left:18px}.scene-caption h3{font-size:18px;margin:8px 0}.scene-caption p{font-size:9px}.gesture{bottom:70px;font-size:8px}.scene-bottom{right:17px;bottom:17px}.scene-bottom .button{font-size:10px;padding:10px 12px}.bom-toggle{left:17px;bottom:17px;font-size:10px;padding:10px 12px}.bom-panel{right:16px;bottom:66px;max-width:calc(100% - 32px);padding:17px}.finish-button{padding:0;font-size:9px}.swatch{width:27px;height:27px}.module-card{padding:10px 7px;gap:8px}.module-symbol{margin:0 4px;width:23px;height:35px}.module-card small{font-size:8px}.section-title{gap:7px}.section-title h2{font-size:12px}.step{width:18px;height:18px;font-size:8px}.field-row{font-size:10px}.field-row select{font-size:10px;padding:5px}.temperature button{font-size:9px;padding:6px 2px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.loader{animation:none}}
.module-list{display:grid;gap:8px}.module-card:not(.active){border-color:var(--line);background:#fff}.module-card:not(.active) .check{visibility:hidden}.module-card[data-module=l5] .module-symbol{background:linear-gradient(90deg,#d3cabb88,#fff8d2,#d3cabb88);border:1px solid #d0c7b4;width:30px}.module-card[data-module=l5] .module-symbol:after{background:#c9ab78}
.viewer-panel[data-scene=column] .scene-caption h3{color:#f0eee6}.viewer-panel[data-scene=column] .scene-caption p,.viewer-panel[data-scene=column] .scene-caption>span,.viewer-panel[data-scene=column] .preview-note,.viewer-panel[data-scene=column] .gesture,.viewer-panel[data-scene=column] .live-label{color:#cfcec1}
.rail-length-field{margin-top:18px;padding:11px 0 0}.rail-length-field select{min-width:90px;background:#f4f6ef;border-color:#dce2d3;color:#53634c}.capacity-hint{font-size:9px;color:#a2a891;line-height:1.6;margin:9px 0 0}
.finish-button b{display:block;font-size:9px;font-weight:500;letter-spacing:.3px}.finish-button small{display:block;font-size:9px;margin-top:3px}
.stepper input{width:44px;text-align:center;font-size:11px;border:0;background:white;color:var(--ink);height:30px;-moz-appearance:textfield}.stepper input::-webkit-inner-spin-button{appearance:none}.module-section select{max-width:172px}.model-label{display:flex;justify-content:space-between;align-items:center;margin:20px 0 10px;min-height:25px;font-size:11px;color:#687360}.model-label .text-btn{font-size:10px;padding:3px}.module-card{border-color:var(--line);background:#fff}.module-card.active{background:#f3f5ed;border-color:#9ca98f}.module-card:not(.active) .check{visibility:hidden}.rail-module-list{display:grid;gap:5px;margin-top:14px;max-height:220px;overflow:auto;scrollbar-width:thin}.instance-button{border:1px solid var(--line);border-radius:4px;background:#fff;padding:10px 9px;display:flex;justify-content:space-between;align-items:center;text-align:left;color:#687360;font-size:11px;min-height:38px}.instance-button span{font-size:10px;color:#8b9382}.instance-button.active{background:#eff3e8;border-color:#91a77d;color:#374e29}.empty-modules{font-size:10px;color:#92998a;padding:12px 0}.module-editor{margin-top:14px;border:1px solid #dce4d3;background:#f8faf5;padding:12px;border-radius:5px}.editor-title{display:flex;justify-content:space-between;align-items:center;font-size:12px}.danger{color:#a66353}.module-editor .field-row{margin-top:12px;font-size:10px}.module-editor input[type=number]{width:68px;padding:6px;border:1px solid #dce4d3;border-radius:4px;text-align:right;color:#4f6344;background:white}.module-editor input[type=range]{width:100%;accent-color:var(--green);margin:14px 0 0}.editor-selection{position:absolute;top:72px;left:28px;font-size:11px;background:#ffffffdd;border:1px solid #dce4d3;border-radius:4px;padding:7px 10px;color:#53634c;pointer-events:none}.module-section [hidden]{display:none!important}@media(max-width:760px){.editor-selection{top:67px;left:16px;font-size:10px}.instance-button{min-height:44px}.stepper button{width:35px;height:36px}.module-editor input[type=range]{min-height:30px}}
@media(max-width:700px){.module-section{grid-column:1/-1}.module-section .module-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.module-section select{max-width:210px}.module-section .field-row,.module-section .quantity-line{font-size:12px}.module-section .module-editor{padding:15px}.rail-module-list{max-height:260px}}
.module-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.module-list .module-card{position:relative;min-height:82px;padding:7px 5px;gap:4px;display:flex;flex-direction:column;text-align:center;justify-content:center}.module-thumbnail{width:100%;height:56px;object-fit:contain;display:block}.module-list .module-card b{font-size:13px}.module-list .module-card small{font-size:9px;line-height:1.35;margin-top:3px}.module-list .module-card .check{position:absolute;top:6px;right:6px;font-size:11px}.module-list .module-symbol{height:34px;margin:4px}.module-list .module-card>span:not(.module-symbol):not(.check){min-width:0}@media(max-width:700px){.module-section .module-list{grid-template-columns:repeat(3,minmax(0,1fr))}.module-thumbnail{height:58px}.module-list .module-card{min-height:94px}.module-list .module-card small{font-size:9px}}

.background-picker{margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}.background-title{font-size:11px;color:#687360;margin-bottom:10px}.background-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.background-choice{border:1px solid var(--line);border-radius:5px;background:#fff;padding:7px 2px;color:#626e58;min-height:57px}.background-choice>span{display:block;width:23px;height:23px;border-radius:50%;margin:0 auto 6px;border:1px solid #0002}.background-choice small{font-size:9px}.background-choice[aria-pressed=true]{border-color:#71885d;box-shadow:inset 0 0 0 1px #71885d}.background-choice:focus-visible{outline:2px solid #53634c;outline-offset:2px}.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .scene-caption h3{color:#fff}.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .scene-caption p,.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .scene-caption>span,.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .live-label,.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .gesture,.viewer-panel[data-scene=studio]:not([data-background="#F1F0EB"]) .preview-note{color:#f3f3ee;text-shadow:0 1px 3px #0006}

@media(max-width:700px){.background-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}

.export-controls{display:flex;align-items:center;gap:8px}.export-controls select{min-height:42px;border:1px solid #dadfd1;border-radius:5px;padding:8px;color:#53634c;background:#fff;font-size:11px;max-width:155px}@media(max-width:700px){.export-controls{flex-direction:column;align-items:flex-end;gap:6px}.export-controls select{min-height:36px;width:132px;font-size:10px}.viewer-panel .gesture{bottom:109px}.viewer-panel .scene-caption{bottom:137px}}
@media(min-width:701px) and (max-width:1250px){.export-controls{flex-direction:column;align-items:flex-end;gap:6px}}

/* Language is independent of product configuration and never mirrors the canvas. */
.language-picker{display:flex;align-items:center;gap:7px;color:#66715e;font-size:11px;flex-shrink:0}.language-picker select{min-height:38px;width:112px;border:1px solid #dce1d5;border-radius:5px;background:#fff;color:#45573d;padding:6px 8px}.header-actions{gap:16px}.section-title h2,.field-row,.parameter label{line-height:1.5}.field-row{gap:10px}.field-row select{flex-shrink:0;max-width:55%}.shape-card span{line-height:1.35;overflow-wrap:anywhere}.module-card small{overflow-wrap:anywhere}.bom-row span{min-width:0;overflow-wrap:anywhere}.bom-row b{flex-shrink:0}.header-actions .button{gap:10px}.brand,.product-name{flex-shrink:0}.workspace{min-width:0}.sidebar{min-width:0}
html[dir=rtl] body{font-family:Tahoma,"Segoe UI",Arial,sans-serif}html[dir=rtl] .header-actions{margin-left:0;margin-right:auto}html[dir=rtl] .sidebar,html[dir=rtl] .instance-button{text-align:right}html[dir=rtl] .module-editor input[type=number],input[type=range],#positionMm,#quantity,#railLength,#ringDiameter,#height,#suspension,#exportResolution{direction:ltr}html[dir=rtl] .scene-caption,html[dir=rtl] .live-label,html[dir=rtl] .editor-selection,html[dir=rtl] .bom-panel{text-align:right}html[dir=rtl] .brand,html[dir=rtl] .product-name{direction:ltr}html[dir=rtl] .field-row select{margin-left:0;margin-right:auto}html[dir=rtl] .module-list .module-card{text-align:center}
@media(max-width:1100px){.header{gap:16px;padding:0 20px}.header-actions{gap:12px}.language-picker>span{display:none}.product-name span{display:none}}
@media(max-width:700px){.header{height:auto;min-height:104px;flex-wrap:wrap;gap:10px;padding:12px 16px}.header-actions{width:100%;justify-content:flex-end;gap:14px}.language-picker{margin-inline-end:auto}.language-picker select{min-height:40px}.header-actions .button{padding:10px 13px}.workspace{height:auto}.prototype{font-size:9px}.field-row select{max-width:58%}html[dir=rtl] .header-actions{margin:0}.scene-tabs button{white-space:normal}}
/* Keep export and BOM controls in distinct physical corners in RTL previews. */
html[dir=rtl] .scene-bottom{direction:ltr}html[dir=rtl] .scene-bottom>*{direction:rtl}
html[dir=rtl] .range-label{direction:ltr}
/* Current-model thumbnails: larger detail view with a neutral glass backdrop. */
.module-list .module-thumbnail{height:82px;object-fit:contain;border-radius:5px;background:#fff}.module-list .module-card{min-height:112px;padding:7px}.module-list .module-card small{line-height:1.45}@media(max-width:700px){.module-section .module-thumbnail{height:72px}.module-list .module-card{min-height:108px}}


/* Append to okoson-9606-designer/app/style.css on STAGING only.
   Presentation only: no configuration, geometry or material changes. */
@media (max-width: 700px) {
  html[data-mode="website"] .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  html[data-mode="website"] .viewer-panel {
    order: 0;
    flex: none;
    height: clamp(320px, 50vh, 420px);
    height: clamp(320px, 50dvh, 420px);
    min-height: 0;
  }

  html[data-mode="website"] .sidebar {
    order: 1;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 22px 20px;
    border-right: 0;
  }

  html[data-mode="website"] .sidebar > section {
    min-width: 0;
  }

  html[data-mode="website"] .intro p,
  html[data-mode="website"] .field-row,
  html[data-mode="website"] .parameter label,
  html[data-mode="website"] .module-section .quantity-line {
    font-size: 13px;
    line-height: 1.6;
  }

  html[data-mode="website"] .shape-grid {
    gap: 8px;
  }

  html[data-mode="website"] .shape-card {
    min-height: 72px;
    padding: 12px 4px;
    font-size: 12px;
  }

  html[data-mode="website"] .field-row select,
  html[data-mode="website"] .stepper button,
  html[data-mode="website"] .stepper input {
    min-height: 44px;
    font-size: 12px;
  }

  html[data-mode="website"] .stepper button {
    min-width: 44px;
  }

  html[data-mode="website"] .finish-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  html[data-mode="website"] .finish-button {
    min-width: 0;
    width: 100%;
    min-height: 76px;
    padding: 6px 2px;
  }

  html[data-mode="website"] .finish-button b,
  html[data-mode="website"] .finish-button small {
    font-size: 11px;
    line-height: 1.4;
  }

  html[data-mode="website"] .module-section .module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-mode="website"] .module-list .module-card small {
    font-size: 11px;
    line-height: 1.45;
  }

  html[data-mode="website"] .rail-module-list {
    max-height: none;
    overflow: visible;
  }

  /* Keep six usable view buttons above the bottom export controls even
     at the 320px preview minimum; the original tall toolbar would overlap. */
  html[data-mode="website"] .view-tools {
    top: 70px;
    right: 12px;
    display: grid;
    grid-template-columns: repeat(2, 44px);
    gap: 2px;
    padding: 3px;
  }

  html[data-mode="website"] .view-tools button {
    width: 44px;
    height: 44px;
  }

  html[data-mode="website"] .view-tools > div {
    display: none;
  }

  html[data-mode="website"] .scene-caption {
    right: 116px;
  }

  html[data-mode="website"] .scene-caption p {
    line-height: 1.45;
  }

  html[data-mode="website"] .gesture {
    left: 17px;
    right: 17px;
    transform: none;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
}

/* Narrow-phone touch instruction spacing. */
@media (max-width:380px) {
  html[data-mode="website"] .gesture { right:116px; text-align:left; }
}

/* 9606 iframe UI only: append after app/style.css and responsive repairs.
   Preserve swatch/background-choice sample fills, module artwork, canvas,
   viewer-panel backgrounds and all material/rendering data. No layout changes. */
:root {
  --ink:#111; --muted:#555; --line:#d0d0d0;
  --green:#111; --cream:#fff;
}

/* Named UI surfaces; never target the 3D viewer surface. */
:is(.header,.sidebar,.info-line,.module-editor,.scene-tabs,.view-tools,
    .bom-toggle,.bom-panel,.bom-panel p,.editor-selection,.loading,.fatal) {
  background-color:#fff !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
:is(.brand-dot,.live-label i) { background-color:var(--ink); }
:is(.prototype,.eyebrow,.step,.text-btn,.parameter label,.parameter strong,
    .range-label,.info-line b,.info-line span,.finish-button,.module-card small,
    .module-card .check,.total-line,.total-line b,.field-row,.sidebar-footer,
    .sidebar-footer span,.instance-button span,.empty-modules,.capacity-hint,
    .model-label,.danger,.background-title,.language-picker,.bom-row small,
    .bom-row b,.bom-panel>small,.loading span) {
  color:var(--muted) !important;
}
:is(.prototype,.step,.bom-row) { border-color:var(--line) !important; }
.bom-toggle span:first-child { background-color:#fff !important; }

/* Control shells only: their thumbnail/swatch descendants keep their fills. */
:is(.button,.shape-card,.module-card,.instance-button,.stepper button,
    .temperature button,.scene-tabs button,.view-tools button,.background-choice,
    .field-row select,.language-picker select,.export-controls select,
    .module-editor input[type="number"],.stepper input,.fatal button) {
  background-color:#fff !important;
  color:var(--ink) !important;
  border-color:var(--line) !important;
}
:is(.shape-card.active,.module-card.active,.instance-button.active,
    .temperature button.active,.scene-tabs button.active,.view-tools button.active,
    .background-choice[aria-pressed="true"]) {
  background-color:#fff !important;
  border-color:var(--ink) !important;
  box-shadow:inset 0 0 0 1px var(--ink) !important;
}
.view-tools button:hover { background-color:#f2f2f2 !important; }
.finish-button.active .swatch::after { border-color:var(--ink) !important; }
body .button.dark,#toast { background-color:#111 !important; color:#fff !important; }
body .button.dark:hover { background-color:#333 !important; color:#fff !important; }
:is(.button,.text-btn,.shape-card,.module-card,.instance-button,.stepper button,
    .temperature button,.scene-tabs button,.view-tools button,.background-choice,
    .finish-button,.field-row input,.field-row select,.language-picker select,
    .export-controls select,.module-editor input,.stepper input,.fatal button,
    .brand):focus-visible {
  outline:2px solid var(--ink) !important;
  outline-offset:3px;
}
.loader { border-color:var(--line) !important; border-top-color:var(--ink) !important; }

/* Neutral scene annotations; retain white text for the existing dark scenes. */
:is(.scene-caption>span,.scene-caption p,.gesture,.preview-note,.live-label) {
  color:var(--muted);
}
.scene-caption h3 { color:var(--ink); }
.viewer-panel[data-scene="column"]
:is(.scene-caption>span,.scene-caption h3,.scene-caption p,.preview-note,.gesture,.live-label),
.viewer-panel[data-scene="studio"]:not([data-background="#F1F0EB"])
:is(.scene-caption>span,.scene-caption h3,.scene-caption p,.preview-note,.gesture,.live-label) {
  color:#fff !important;
}
.viewer-panel[data-scene="column"] .live-label i,
.viewer-panel[data-scene="studio"]:not([data-background="#F1F0EB"]) .live-label i {
  background-color:#fff;
}

#autoSaveStatus:not([hidden]){display:block;padding:6px 16px;background:#fff4da;color:#634b25;font-size:13px}
