:root{font-family:Arial,Helvetica,sans-serif;color:#f4f7fa;background:#788590;color-scheme:dark}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit}button,select,input{accent-color:#a5d9ff}button{cursor:pointer;color:inherit;border:1px solid #ffffff25;background:#ffffff0a;border-radius:0;padding:10px 13px;font-size:14px}button:hover:not(:disabled){background:#ffffff1c}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #b9e4ff;outline-offset:3px}#art,#webgl{position:fixed;inset:0}#art{overflow:hidden}#poster{width:100%;height:100%;object-fit:cover;transition:opacity .45s}#webgl{opacity:0;transition:opacity .45s}#webgl canvas{display:block;width:100%;height:100%;touch-action:none;outline:none}.ready #webgl{opacity:1}.ready #poster{opacity:0}.glass{background:#172b40d9;border:1px solid #e5f3ff38;box-shadow:0 12px 50px #14263730;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}.back{position:fixed;top:22px;left:24px;z-index:3;border-radius:0;padding:12px 18px}.dock-wrap{position:fixed;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:3;width:max-content;max-width:calc(100% - 28px)}.dock{border-radius:0;padding:7px;display:flex;align-items:center;gap:5px;justify-content:space-between}#status{font-size:12px;padding:0 12px;color:#d4e3ef;white-space:nowrap}.dock button{border:0;border-radius:0;white-space:nowrap}.dock #controls{background:#d4eaff;color:#17314a}.dock #controls span{margin-left:20px}.panel{border-radius:0;margin-bottom:10px;padding:22px;width:440px;max-width:100%;max-height:calc(100svh - 145px);overflow:auto}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.panel h1{font-size:17px;font-weight:500;margin:0}.icon-button{font-size:25px;line-height:1;border:0;padding:0 5px;background:none}.instructions{font-size:12px;line-height:1.6;color:#bbcddc;margin-bottom:20px}.pick-row{display:flex;align-items:center;gap:10px;margin-bottom:20px;font-size:13px}.pick-row select{flex:1;min-width:0}.pick-row label{font-size:12px}select{border:1px solid #d1e6ff30;background:#152a40;color:#eff8ff;padding:9px;border-radius:0;font-size:14px;width:100%}fieldset{border:0;padding:0;margin:0}fieldset:disabled{opacity:.35}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}.form-grid label{font-size:13px;color:#dce9f3;display:block}.wide{grid-column:1/-1}.form-grid select{margin-top:8px}.form-grid output{float:right;font-size:12px;color:#a8c4d9}input[type=range]{display:block;width:100%;margin:12px 0 0;height:20px}.colors{display:flex;gap:20px}.colors label{flex:1}input[type=color]{display:block;margin-top:8px;width:100%;height:29px;padding:0;border:0;background:transparent;cursor:pointer}.form-grid .checkbox{display:flex;align-items:center;gap:7px;font-size:12px}.checkbox input{width:17px;height:17px}#reset{font-size:12px;padding:9px}.panel-bottom{margin-top:20px;border-top:1px solid #ffffff18;padding-top:15px;display:flex;gap:10px}.panel-bottom button{flex:1;font-size:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}[hidden]{display:none!important}@media(max-width:600px){.dock-wrap{bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px)}.dock{border-radius:0}.dock button{font-size:12px;padding:11px}#status{font-size:11px;padding:0 6px;white-space:normal;max-width:115px}.dock #controls span{margin-left:6px}.panel{width:100%;padding:18px;max-height:calc(74svh - 65px)}.back{top:15px;left:15px;font-size:12px}.form-grid{gap:13px 17px}.instructions{margin-bottom:14px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media(min-width:701px){.panel-open .dock-wrap{left:auto;right:24px;transform:none;width:420px}.panel-open .panel{width:420px}}@media(max-width:700px){.panel{max-height:52svh}}
.panel{max-height:calc(100svh - 120px)}.preset-row{display:flex;align-items:center;gap:10px;font-size:12px;margin-bottom:14px}.preset-row select{flex:1}.tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:16px;border-bottom:1px solid #ffffff22;padding-bottom:13px}.tabs button{font-size:12px;padding:8px 11px}.tabs button[aria-selected=true]{background:#d4eaff;color:#17314a}.parameter-group{display:grid;grid-template-columns:1fr 1fr;gap:15px 14px}.parameter{font-size:12px;min-width:0;color:#deebf5}.parameter>span{display:block;margin-bottom:7px;line-height:1.35;min-height:16px}.parameter select{font-size:12px}.parameter input[type=number]{width:100%;background:#10263b80;border:1px solid #cce5ff30;border-radius:0;padding:8px;color:white;font-size:13px}.parameter input[type=range]{margin-top:3px}.parameter.bool{display:flex;align-items:center;gap:8px;grid-column:1/-1}.parameter.bool span{margin:0}.parameter.bool input{width:17px;height:17px}.parameter input[type=color]{height:31px}.units,.metrics,.build-state{font-size:11px;line-height:1.5;color:#b9cddd}.build-state{color:#d5ecfb;min-height:17px}.build-state.error{color:#ffc7b5}.edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}.edit-actions button{font-size:12px}.tools-link{display:block;margin-top:13px;color:#beddf5;font-size:12px;text-align:center;text-underline-offset:3px}.parameter:has(input:disabled),.parameter:has(select:disabled){opacity:.4}.panel-head{position:sticky;top:-22px;background:#1a3045;padding:6px 0;z-index:2}.pick-row{margin-bottom:13px}.instructions{margin-bottom:14px}@media(max-width:700px){.panel{max-height:52svh}.parameter-group{gap:12px}.panel-head{top:-18px}.tabs button{padding:7px 9px}}

/* Translucent black controls let the artwork remain visible beneath them. */
.glass{background:rgba(0,0,0,.64);border-color:#ffffff24;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.panel-head{background:rgba(0,0,0,.3)}select,.parameter input[type=number]{background:rgba(0,0,0,.32)}
.library{border-bottom:1px solid #ffffff28;padding-bottom:16px;margin-bottom:16px}.library label,.save-design label{font-size:14px}.library select{margin:8px 0}.library-actions{display:flex;gap:8px}.library-actions button{font-size:13px;flex:1}.save-design{border-top:1px solid #ffffff28;margin-top:18px;padding-top:16px}.save-design input[type=text]{display:block;width:100%;margin:8px 0 12px;padding:10px;border-radius:0;background:#0005;border:1px solid #ffffff35;color:white}.share-choice{display:flex;align-items:center;gap:8px;line-height:1.4;margin-bottom:12px}.save-design .hint,.library-status{font-size:12px;line-height:1.5;color:#d2d8de}.save-actions{display:flex;gap:8px}.save-actions button{flex:1}.save-message{font-size:13px;line-height:1.5;min-height:20px}.save-message.error{color:#ffc7b5}.signin{color:#d4eaff}.saved-name{font-size:13px;color:#ddd}

.panel-head{background:rgba(0,0,0,.86);backdrop-filter:blur(8px);border-radius:0;padding:8px 5px}

/* Keep the dock in one place while the panel expands above it. */
@media(min-width:701px){.dock-wrap,.panel-open .dock-wrap{left:auto;right:24px;transform:none;width:420px}.panel,.panel-open .panel{width:420px}}
@media(max-width:700px){.dock-wrap{left:auto;right:12px;transform:none;width:calc(100% - 24px)}.panel{width:100%}}
#art{background:linear-gradient(180deg,#89949d 0%,#74828d 45%,#505e6a 100%)}
#art::before{content:"";position:absolute;inset:0;background-image:radial-gradient(circle,rgba(22,32,42,.38) .85px,transparent 1.15px);background-size:20px 20px;opacity:0;pointer-events:none}
.inspection #art::before{opacity:1}
#status{min-width:0;overflow:hidden;text-overflow:ellipsis}
#loading-bar{position:fixed;top:0;left:0;right:0;height:2px;overflow:hidden;opacity:.45}
#loading-bar::after{content:"";display:block;width:35%;height:100%;background:linear-gradient(90deg,transparent,#e8eff3,transparent);animation:loading-line 1.3s ease-in-out infinite}
@keyframes loading-line{from{transform:translateX(-100%)}to{transform:translateX(390%)}}
.ready #loading-bar,.load-error #loading-bar{display:none!important}
#inspection-shadow{position:fixed;pointer-events:none;transform:translate(-50%,-50%);background:radial-gradient(ellipse,rgba(4,12,20,.38) 0%,rgba(4,12,20,.19) 40%,transparent 72%);filter:blur(7px);z-index:0}
#webgl{z-index:1}
.library-actions{justify-content:flex-end}.library-actions .action-icon{flex:0 0 40px;min-height:40px;padding:9px;display:grid;place-items:center}.action-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){#loading-bar::after{animation:none;width:100%;opacity:.3}}

/* Full-width bottom navigation; the editor stays anchored above the right edge. */
.dock-wrap,.panel-open .dock-wrap{left:0;right:0;bottom:0;transform:none;width:100%;max-width:none;pointer-events:none}
.dock{width:100%;justify-content:flex-end;padding:8px 16px calc(8px + env(safe-area-inset-bottom));pointer-events:auto;background:rgba(0,0,0,.48);border-width:1px 0 0;box-shadow:none}
.site-name{margin-right:auto;white-space:nowrap;font-size:13px;letter-spacing:.14em;padding:0 8px}
.panel,.panel-open .panel{width:420px;max-width:100%;margin:0 0 0 auto;pointer-events:auto}
@media(max-width:700px){.dock{padding-left:8px;padding-right:8px;gap:2px}.site-name{font-size:11px;letter-spacing:.08em;padding:0 4px}#status{display:none}.panel,.panel-open .panel{width:100%;max-height:65svh}.dock button{padding:11px 9px}}

/* Compact icon controls and a full-height, independently scrolling editor. */
.dock .dock-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:10px}
.dock-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:butt;stroke-linejoin:miter}
.panel-open .dock-wrap{height:100dvh;display:flex;flex-direction:column}
.panel-open .panel{flex:1;min-height:0;max-height:none;margin-top:0;overflow-y:auto;overscroll-behavior:contain}
.dock{flex-shrink:0}
#status{padding:0}

/* Edge-to-edge close bar and clear public-design action. */
.panel,.panel-open .panel{padding:0 22px 22px}
.panel-head{top:0;margin:0 -22px 20px;padding:12px 14px;min-height:48px;justify-content:flex-end;background:#000;backdrop-filter:none}
.back{width:42px;height:42px;padding:10px;display:grid;place-items:center}
.back svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.public-help{font-size:12px;line-height:1.5;color:#d2d8de;margin:8px 0 4px}
.library-actions #load-design{display:flex;flex:1;gap:8px;justify-content:center;align-items:center;white-space:nowrap}
@media(max-width:700px){.panel,.panel-open .panel{padding:0 18px 18px}.panel-head{margin-left:-18px;margin-right:-18px}}

.collar-section-note{grid-column:1/-1;margin:8px 0 0;padding-top:12px;border-top:1px solid #ffffff26;font-size:12px;line-height:1.5;color:#d2d8de}
.parameter.bool[data-key=knurl_enabled]{grid-column:auto;align-self:start;align-items:center;min-height:36px}
.parameter.inactive-mode{opacity:.55}
@media(max-width:700px){
 .panel-open .dock-wrap{height:58dvh}
 .panel-open .panel{max-height:none}
 .panel-open.inspection .back{top:10px;left:10px}
 .panel-head{min-height:38px;padding:7px 12px;margin-bottom:14px}
 .tabs{position:sticky;top:38px;z-index:2;background:rgba(0,0,0,.88);padding:8px 0}
}

/* Keep the bottom bar steady when inspection-only controls are hidden. */
.dock{min-height:calc(57px + env(safe-area-inset-bottom))}

/* A lightweight outline appears immediately, before the 3D code loads. */
#loading-bar{inset:0;width:100%;height:100%;display:grid;place-items:center;opacity:1;pointer-events:none;z-index:2}
#loading-bar::after{display:none}
#loading-bar svg{width:70px;height:98px;fill:none;stroke-linecap:round;stroke-linejoin:round;transform:rotate(12deg)}
.loader-track{stroke:#ffffff25;stroke-width:5}
.loader-progress{stroke:#edf5fc;stroke-width:5;stroke-dasharray:24 76;animation:carabiner-loading 1.8s linear infinite}
.loader-gate{stroke:#edf5fc70;stroke-width:9}
@keyframes carabiner-loading{to{stroke-dashoffset:-100}}
@media(prefers-reduced-motion:reduce){.loader-progress{animation:none;stroke-dasharray:none;opacity:.7}}
.panel-head{justify-content:space-between}
.parameter-group{gap:11px 14px}
.parameter>span{margin-bottom:3px}
.slider-row{display:flex;align-items:center;gap:8px;min-height:28px}
.slider-row input[type=range]{flex:1;min-width:0;width:0;height:24px;margin:0;cursor:pointer}
.slider-row output{flex:0 0 40px;text-align:right;font-size:11px;font-variant-numeric:tabular-nums;color:#c9d8e4}
.edit-actions{grid-template-columns:1fr}
@media(min-width:701px){.panel,.panel-open .panel{width:480px}.tabs{flex-wrap:nowrap;gap:5px}.tabs button{flex:1;padding:8px 9px;white-space:nowrap}}

.site-logo{margin-right:auto;width:340px;max-width:100%;height:40px;display:flex;align-items:center;overflow:hidden}.site-logo img{display:block;width:100%;height:auto;flex-shrink:0}
@media(max-width:700px){.site-logo{width:300px}}

.site-logo{width:250px}@media(max-width:700px){.site-logo{width:220px}}
.text-link{display:block;margin:18px auto 0;padding:8px 0;border:0;background:none;text-decoration:underline;text-underline-offset:4px;font-size:12px;color:#d2d8de}.library{margin-top:14px;border-bottom:0}.library-cycle{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}.library-cycle span{font-size:12px}.bow-reset{grid-column:1/-1;font-size:12px;padding:7px;justify-self:start}

.edit-actions{display:flex;justify-content:flex-end;margin-top:8px}#reset{width:30px;height:30px;padding:7px;border:0;background:none;opacity:.55}#reset:hover,#reset:focus-visible{opacity:1}#reset svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}

.dock{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;pointer-events:none}.site-logo{pointer-events:auto}

/* Keep the logo independent so it does not reserve a strip below the editor. */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:4}
.panel-head{background:transparent;backdrop-filter:none}
@media(max-width:700px){.panel-open .panel{padding-bottom:68px}}

.name-row{display:flex;align-items:center;gap:8px;margin:8px 0 12px}.save-design .name-row input{flex:1;min-width:0;margin:0}#random-name{display:flex;align-items:center;gap:6px;height:38px;padding:8px;flex-shrink:0;font-size:12px;white-space:nowrap}#random-name svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5}
