:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1a1a17;background:#f4f4f1;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid #deded8;background:#f4f4f1}.brand{display:flex;gap:16px;align-items:center;color:inherit;text-decoration:none;font-size:19px;font-weight:650;letter-spacing:-.5px}.brand span{color:#b6b6ac;font-weight:400}.brand strong{font-size:14px;letter-spacing:0;font-weight:500}button{font:inherit;cursor:pointer;border:0}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #087cff;outline-offset:5px}#welcome{max-width:560px;margin:0 auto;padding:65px 28px 40px;text-align:center}.cube{width:64px;height:64px;margin:0 auto 28px;color:#4b5348}.cube svg{width:100%;height:100%}h1{font-size:clamp(38px,6vw,54px);line-height:1.08;letter-spacing:-2px;font-weight:600;margin:0 0 22px}.subtitle{font-size:17px;line-height:1.65;color:#6a6a64;margin:0 0 32px}#drop-zone{padding:27px 20px 18px;border:1px dashed #c9cbc1;border-radius:18px;transition:background .15s}#drop-zone.drag{background:#e4e8dd;border-color:#697663}#open-file{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:0 25px;background:#242b22;color:#fff;border-radius:10px;font-weight:550;font-size:16px}#open-file:hover:enabled{background:#3b4637}#open-file svg{width:22px;height:22px}#drop-zone p{font-size:13px;color:#75756d;line-height:1.6;margin:15px 0 0}#status{overflow-wrap:anywhere}#status.error{color:#a33129}#retry,#close-model{padding:10px 15px;border-radius:8px;background:#e8e8e1;color:#343730;font-size:13px}#retry{margin-top:12px}.privacy{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#6a6a64;margin:24px 0 32px;line-height:1.6}.privacy svg{width:17px;height:17px;flex-shrink:0}details{text-align:left;border-top:1px solid #deded8;padding-top:21px;font-size:13px;line-height:1.7;color:#6a6a64}summary{cursor:pointer;color:#343730;font-weight:500}details p{margin-bottom:0}#model-host{position:fixed;inset:64px 0 0;background:white}#model-host iframe{border:0;width:100%;height:100%;display:block}[hidden]{display:none!important}@media(max-width:600px){header{height:54px;padding:0 16px}.brand{font-size:17px;gap:11px}.brand strong{font-size:13px}#welcome{padding:42px 22px 30px}.cube{width:50px;height:50px;margin-bottom:24px}h1{font-size:40px}.subtitle{font-size:15px}#drop-zone{padding:23px 12px 17px}.privacy{font-size:11px;gap:6px}#model-host{top:54px}#close-model{font-size:12px;padding:9px}}

/* Give the model the entire dynamic viewport; retain only an island close button. */
body.model-open{overflow:hidden;height:100dvh}body.model-open header{position:fixed;inset:0 0 auto;height:0;padding:0;border:0;z-index:20;background:transparent}body.model-open .brand{display:none}body.model-open #model-host{inset:0;height:100dvh}body.model-open #close-model{position:fixed;right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));width:36px;height:36px;padding:0;font-size:0;border:1px solid #dedee5;background:#fafafacc;backdrop-filter:blur(16px);border-radius:11px;box-shadow:0 2px 8px #00000008}body.model-open #close-model::before{content:'×';font-size:25px;line-height:1;font-weight:300}

#load-state{position:fixed;z-index:30;left:50%;top:110px;transform:translateX(-50%);max-width:90vw;padding:12px 18px;background:#fffffff2;border:1px solid #ddd;border-radius:12px;font-size:14px;box-shadow:0 4px 20px #0001;pointer-events:none}

#error-details{text-align:left;margin-top:18px;padding-top:14px}#error-report{display:block;width:100%;height:220px;resize:vertical;margin:12px 0;padding:12px;font:12px/1.5 ui-monospace,monospace;border:1px solid #d5d5ce;border-radius:9px;background:#fff;color:#292925;white-space:pre;overflow:auto}#copy-error{padding:11px 15px;border-radius:9px;background:#242b22;color:white;font-size:13px}#copy-status{font-size:12px}

.texture-quality{display:grid;grid-template-columns:auto 1fr;gap:8px 12px;align-items:center;max-width:390px;margin:20px auto;text-align:left}.texture-quality select{min-width:0;width:100%;padding:10px 12px;border:1px solid #cccfc5;border-radius:10px;background:#fff;color:#30372c;font:inherit;font-size:16px}.texture-quality small{grid-column:1/-1;font-size:13px;color:#74786e}
@media(min-width:700px) and (max-width:1150px){body.model-open #close-model{top:72px}}
