@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#263b37;background:#f7f7f2;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #df7846;outline-offset:4px}header{max-width:1440px;margin:auto;padding:24px 48px;border-bottom:1px solid #e3e7de;display:flex;align-items:center;justify-content:space-between}.brand{text-decoration:none;color:#263b37;font-size:18px;font-weight:700;display:flex;align-items:center;gap:10px}.brand-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#263b37;color:white;font-size:25px}.badge,.eyebrow,.chip{font-size:10px;font-weight:700;letter-spacing:1.7px}.badge{border:1px solid #d7ddd4;padding:8px 12px;border-radius:20px;color:#738079}main{max-width:1440px;padding:42px 48px 20px;margin:auto}.intro{position:relative;margin-bottom:32px}.eyebrow{color:#819086;margin:0 0 12px}h1,h2,h3,p{margin-top:0}h1{font-family:Manrope,sans-serif;font-size:clamp(34px,4vw,52px);line-height:1.12;letter-spacing:-2px;margin-bottom:18px;font-weight:800}h1 span{color:#819884}.intro>p:last-child{position:absolute;right:0;bottom:0;max-width:330px;font-size:14px;line-height:1.8;color:#7b8980}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px}.preview{position:relative;border:1px solid #dfe5d8;background:radial-gradient(ellipse at 45% 30%,#fafbf7,#e7ece0);border-radius:24px;min-height:640px;overflow:hidden}.preview-top,.preview-bottom{position:absolute;left:24px;right:24px;display:flex;justify-content:space-between;align-items:center;z-index:1;pointer-events:none}.preview-top{top:24px}.preview-top button{pointer-events:auto;background:#ffffff99;border:1px solid #dfe5d8;border-radius:20px;padding:8px 12px;font-size:11px}.chip{background:#fff9;padding:8px 12px;border-radius:20px;color:#738079}.preview-bottom{bottom:24px;font-size:11px;color:#7b8980;gap:12px}.preview-bottom span:last-child{white-space:nowrap;font-weight:700;color:#526b5c}#viewer{position:absolute;inset:0;touch-action:none}#viewer canvas{display:block;width:100%;height:100%}.loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;padding:15px 20px;background:#fffffff2;border:1px solid #e3e7de;border-radius:16px;font-size:12px;display:flex;gap:10px;align-items:center;max-width:85%;white-space:nowrap}.loading[hidden]{display:none}.spinner{width:16px;height:16px;border:2px solid #dce5d8;border-top-color:#df7846;border-radius:50%;animation:spin 1s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.panel{background:white;border:1px solid #e3e7de;border-radius:24px;padding:26px}.panel-heading{display:flex;align-items:center;justify-content:space-between}.panel-heading .eyebrow{font-size:9px}h2{font-family:Manrope,sans-serif;font-size:20px;letter-spacing:-.6px;margin-bottom:18px}.panel-heading>button{border:1px solid #e3e7de;border-radius:50%;background:white;font-size:22px;width:32px;height:32px;color:#7b8980}.presets{display:flex;background:#f5f6f1;border-radius:9px;padding:4px;margin-bottom:22px;gap:3px}.presets button{flex:1;border:0;background:transparent;font-size:12px;padding:9px 4px;color:#7b8980;border-radius:7px}.presets button.active{background:white;color:#263b37;box-shadow:0 1px 5px #263b3712}.field{margin:0 0 17px}.field label{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:600;margin-bottom:10px;gap:8px}.number{display:flex;align-items:center;gap:4px;background:#f5f6f1;border:1px solid #e9ece4;padding:4px 6px;border-radius:6px;font-size:11px;color:#7b8980}.number input{width:48px;max-width:70px;border:0;background:transparent;color:#263b37;text-align:right;font-size:12px;font-weight:700}.field input[type=range]{width:100%;height:4px;accent-color:#df7846;display:block;margin:8px 0 12px}.range-ends{display:flex;justify-content:space-between;font-size:9px;color:#9aa59b}.color-row{border-top:1px solid #eef0e9;padding-top:18px;display:flex;justify-content:space-between;align-items:center;gap:10px}h3{font-size:12px;margin-bottom:5px}.color-row small{font-size:10px;color:#9aa59b}.swatches{display:flex;gap:6px}.swatches button{border:2px solid white;background:var(--swatch);width:24px;height:24px;border-radius:50%;box-shadow:0 0 0 1px #e3e7de}.swatches button.selected{box-shadow:0 0 0 2px #263b37}.stack-toggle{display:flex;align-items:center;gap:8px;font-size:12px;margin:22px 0;cursor:pointer}.stack-toggle input{accent-color:#263b37}details{border-top:1px solid #eef0e9;padding:15px 0}summary{cursor:pointer;font-size:12px;color:#7b8980;display:flex;justify-content:space-between}#advanced-fields{padding-top:20px}.hint{font-size:10px;line-height:1.7;color:#8a978e}.primary,.secondary{width:100%;border-radius:10px;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600}.primary{background:#263b37;color:white;border:0;margin-top:8px}.primary:disabled{opacity:.45;cursor:wait}.secondary{background:white;color:#526b5c;border:1px solid #dfe5d8;margin-top:8px}.download-note{font-size:10px;color:#9aa59b;text-align:center;line-height:1.7;margin:14px 0 0}#error{background:#fff0e8;color:#a44425;font-size:12px;line-height:1.6;padding:12px;border-radius:8px}footer{display:flex;justify-content:space-between;align-items:center;margin-top:24px;color:#9aa59b;font-size:10px;line-height:1.8}footer p{margin-bottom:0}footer a{color:#718175}footer>span{font-size:9px;letter-spacing:1.5px}@media(min-width:1500px){.preview{min-height:690px}}@media(max-width:1000px){header{padding:20px 24px}main{padding:30px 24px}.workspace{grid-template-columns:minmax(0,1fr) 320px;gap:16px}.panel{padding:20px}.intro>p:last-child{position:static;max-width:500px}.preview{min-height:600px}}@media(max-width:720px){header{padding:16px}.brand{font-size:14px}.badge{font-size:8px;padding:6px 8px;letter-spacing:.5px}main{padding:28px 16px}.intro{margin-bottom:20px}h1{letter-spacing:-1.3px}.intro>p:last-child{font-size:12px}.workspace{grid-template-columns:1fr}.preview{min-height:380px}.preview-top,.preview-bottom{left:16px;right:16px}.preview-bottom{font-size:9px;bottom:16px}.panel{padding:24px}footer{gap:12px;align-items:flex-start}footer>span{max-width:80px;text-align:right}.loading{font-size:10px;padding:12px}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}

[hidden]{display:none!important}.embedded>header,.embedded .intro,.embedded footer{display:none}.embedded main{padding:0;max-width:none}.embedded{background:transparent}.embedded .preview{min-height:640px}.embedded .workspace{gap:24px}@media(max-width:720px){.embedded .preview{min-height:380px}}

.scad-embedded body>header,.scad-embedded .intro,.scad-embedded footer{display:none}.scad-embedded main{padding:0;max-width:none}.scad-embedded body{background:transparent}

.string-field label{display:block;margin-bottom:8px}.string-field input,.string-field select{width:100%;min-height:44px;border:1px solid #dfe5d8;border-radius:10px;padding:10px;background:#f7f7f2;color:#263b37;font:inherit}.string-field small{display:block;margin-top:7px;color:#718175;font-size:11px;line-height:1.5}

/* A small object assembles while the exact printable model is calculated. */
.loading{width:340px;max-width:calc(100% - 32px);padding:24px 26px 22px;display:flex;flex-direction:column;gap:10px;white-space:normal;text-align:center;border-radius:24px;background:linear-gradient(145deg,#fffffff5,#f9faf4f0);box-shadow:0 24px 70px #263b3717;backdrop-filter:blur(16px)}
.loading-sculpture{width:160px;height:126px;position:relative;display:grid;place-items:center;margin:-4px 0 8px;perspective:600px}
.loading-box{width:60px;height:60px;position:relative;transform-style:preserve-3d;transform:rotateX(-22deg) rotateY(-35deg);animation:box-float 3s ease-in-out infinite}
.loading-box span{position:absolute;inset:0;border:1px solid #dc7c48;background:linear-gradient(140deg,#ffd29e,#f0a467);box-shadow:inset 0 0 0 5px #ffffff25;border-radius:4px}
.loading-box span:nth-child(1){transform:translateZ(30px)}.loading-box span:nth-child(2){transform:rotateY(90deg) translateZ(30px);background:linear-gradient(120deg,#e89254,#c96933)}.loading-box span:nth-child(3){transform:rotateX(90deg) translateZ(30px);background:linear-gradient(120deg,#ffe0b5,#f6bd82)}
.loading-orbit{position:absolute;width:140px;height:100px;border:1px dashed #a7b4a580;border-radius:50%;transform:rotate(-24deg);animation:orbit-pulse 3s ease-in-out infinite}.loading-orbit:before,.loading-orbit:after{content:'';position:absolute;width:6px;height:6px;background:#cc6d37;border-radius:50%;top:21px;left:9px}.loading-orbit:after{top:auto;left:auto;bottom:21px;right:9px;background:#718b73}
.loading-floor{position:absolute;width:70px;height:14px;bottom:6px;border-radius:50%;background:#c4b59a44;filter:blur(4px)}
.loading-kicker{font-size:9px;letter-spacing:2px;color:#84917f;font-weight:700}.loading strong{font-family:Manrope,sans-serif;color:#263b37;font-size:19px;letter-spacing:-.5px;line-height:1.3}.loading #loading-detail{color:#7b8980;line-height:1.6;font-size:12px;min-height:38px}
.loading-track{height:3px;width:100%;border-radius:9px;background:#e5e9dc;overflow:hidden;margin-top:8px}.loading-track span{height:100%;width:38%;display:block;background:linear-gradient(90deg,#dc9f6d,#c96933);border-radius:9px;animation:loading-scan 1.8s ease-in-out infinite}
.loading-steps{display:flex;justify-content:space-between;width:100%;font-size:9px;color:#94a08d;margin-top:2px}.loading[data-phase=prepare] .loading-steps span:first-child,.loading[data-phase=engine] .loading-steps span:first-child,.loading[data-phase=calculate] .loading-steps span:nth-child(2){color:#b86232;font-weight:700}
@keyframes box-float{0%,100%{transform:translateY(3px) rotateX(-22deg) rotateY(-35deg)}50%{transform:translateY(-7px) rotateX(-16deg) rotateY(-15deg)}}
@keyframes orbit-pulse{50%{opacity:.45;transform:rotate(-12deg) scale(1.06)}}@keyframes loading-scan{0%{transform:translateX(-110%)}100%{transform:translateX(370%)}}
@media(max-width:720px){.loading{width:280px;padding:18px;gap:8px}.loading-sculpture{height:94px;transform:scale(.8);margin:-12px 0 0}.loading strong{font-size:16px}.loading #loading-detail{font-size:11px;min-height:34px}.loading-kicker{font-size:8px}.loading-steps{font-size:8px}}
@media(prefers-reduced-motion:reduce){.loading-box,.loading-orbit,.loading-track span{animation:none}.loading-track span{width:100%;opacity:.5}}

/* Keep the model visible and interactive during subsequent calculations. */
.loading.updating{top:auto;bottom:54px;transform:translateX(-50%);width:300px;padding:12px 16px;gap:4px;pointer-events:none;border-radius:14px}
.loading.updating .loading-sculpture,.loading.updating .loading-kicker,.loading.updating .loading-steps{display:none}
.loading.updating strong{font-size:12px;letter-spacing:0}.loading.updating #loading-detail{font-size:10px;min-height:0}.loading.updating .loading-track{margin-top:4px}
