
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
:root{--app-background:radial-gradient(ellipse at 50% 44%,#202126 0%,#0b0c0f 52%,#08090b 100%);--bg:#08090b;--panel:#121316;--panel2:#191a1e;--line:#282a30;--muted:#858891;--text:#f4f4f5;--accent:#d9dadd}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
button{font:inherit;color:inherit;cursor:pointer;border:0}.app{height:100vh;display:flex;flex-direction:column;background:var(--app-background)}
.top{height:66px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#090a0cdd;backdrop-filter:blur(18px);z-index:3}
.logo{font-weight:700;letter-spacing:.16em;font-size:17px}
.topright{display:flex;gap:9px;align-items:center}.pill{border:1px solid var(--line);background:#15161a;border-radius:999px;padding:9px 14px;font-size:11px}.pill.primary{background:#eee;color:#111;border-color:#eee;font-weight:600}
/* Workspace layout is defined by the active studio shell below. */
.rail,.inspector{background:#111216d9;border:1px solid #25272c;border-radius:18px;backdrop-filter:blur(20px)}
.rail{display:flex;flex-direction:column;align-items:center;padding:12px 7px;gap:8px}
.tool{width:62px;height:67px;border-radius:12px;background:transparent;color:#9699a1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:10px;transition:.2s}
.tool svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.5}.tool.active,.tool:hover{background:#27292f;color:#fff}
.viewport{position:relative;min-width:0;min-height:0;border:1px solid #26282e;border-radius:20px;overflow:hidden;background:radial-gradient(ellipse at 50% 48%,#34363c 0%,#17191e 36%,#0c0d10 74%)}
.viewport:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#08090b55,transparent 24%,transparent 75%,#08090b88)}
.vtop{position:absolute;top:20px;left:24px;right:24px;display:flex;justify-content:space-between;z-index:2;align-items:center}
.eyebrow{font-size:10px;color:#9da0a8;letter-spacing:.14em}.carname{font-size:16px;margin-top:5px}
.stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
canvas{width:100%;height:100%;display:block;touch-action:none}
.hint{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);z-index:2;color:#a2a4aa;font-size:11px;letter-spacing:.04em;white-space:nowrap}
.controls{position:absolute;bottom:18px;right:20px;display:flex;gap:8px;z-index:2}
.round{width:38px;height:38px;border:1px solid #ffffff25;background:#141519bb;backdrop-filter:blur(12px);border-radius:50%;display:grid;place-items:center;color:#ddd}
.round svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5}
.inspector{display:flex;flex-direction:column;overflow:auto;}

.sub{font-size:11px;color:var(--muted);margin-top:6px}
.section{padding:17px 16px;border-bottom:1px solid var(--line)}
.sectiontop{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;font-size:12px;font-weight:600}.smallmuted{font-size:10px;color:var(--muted);font-weight:400}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.option{border:1px solid #303239;background:#17181c;border-radius:11px;padding:8px 5px;min-height:78px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;transition:.2s}
.option.selected{border-color:#e5e5e7;background:#25262b;box-shadow:0 0 0 1px #ffffff18 inset}
.wheel{width:38px;height:38px;border-radius:50%;border:4px double #aeb1b8;background:repeating-conic-gradient(#777 0 8deg,#25262b 8deg 18deg);box-shadow:inset 0 0 0 5px #17181c,0 0 0 1px #555}
.option span{font-size:9px;color:#b8bac0}
.detailrow{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin:9px 0;color:#bfc1c7}.detailrow strong{color:#f4f4f5;font-weight:500}
.slider{width:100%;accent-color:#eee;margin-top:12px}
.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;background:#f0f0f1;color:#111;border-radius:999px;padding:11px 18px;font-size:12px;z-index:10;transition:.25s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:600px){body{overflow:auto}.app{height:100dvh}.top{height:58px;padding:0 15px}.workspace{height:calc(100dvh - 58px);padding:8px;gap:8px;grid-template-columns:54px minmax(0,1fr)}.rail{border-radius:14px;padding:8px 3px}.tool{width:48px;height:58px;font-size:9px}.viewport{border-radius:14px}.inspector{top:auto;left:70px;right:8px;bottom:8px;width:auto;height:44%;border-radius:16px}.vtop{top:13px;left:14px}.carname{font-size:13px}.hint{bottom:12px;font-size:9px}.controls{bottom:9px;right:9px}.pill{padding:8px 10px}}
.loading{position:absolute;inset:0;display:grid;place-content:center;text-align:center;gap:12px;background:#101115e8;z-index:3;padding:24px;font-size:13px;color:#ddd;pointer-events:none}.loading[hidden]{display:none}.credit{font-size:10px;color:#92959d;line-height:1.6;margin-top:12px}.credit a{color:#bfc2ca}.option:disabled{opacity:.4;cursor:default}.pill:disabled{opacity:.35;cursor:default}
.viewport:after{background:linear-gradient(180deg,#08090b55,transparent 22%,transparent 80%,#08090b55);}
.section{padding:20px 18px}.option{min-height:92px}.option:hover:not(:disabled){border-color:#777b83;transform:translateY(-1px)}.vtop{top:25px;left:28px;right:28px}.carname{font-size:19px;letter-spacing:-.025em}.hint{letter-spacing:.09em}.pill:disabled{opacity:.35;cursor:default}.round:hover{background:#35373d}.inspector{background:linear-gradient(155deg,#17181c,#101114 65%);}
.viewport{background:radial-gradient(ellipse at 50% 42%,#fff 0%,#f5f5f5 48%,#e2e3e5 100%);border-color:#dedfe2}.viewport:after{background:none}.viewport .eyebrow,.viewport .hint{color:#62666e}.viewport .carname{color:#22252a}.viewport .round{background:#ffffffc9;color:#333;border-color:#c9cbd0}.viewport .round:hover{background:#e3e4e7}

[hidden]{display:none!important}body{overflow:hidden}.app{height:100dvh}.top{flex:none;gap:24px}.topright{flex-shrink:0}#searchWrap{width:min(520px,65vw)}#search{width:100%;background:#202126;border:1px solid #35363b;color:white;border-radius:14px;padding:12px 16px;font:inherit;font-size:14px}.browse{flex:1;overflow:auto;padding:40px max(24px,calc((100vw - 1120px)/2)) 120px}.browse h1{font-size:34px;letter-spacing:-.04em;margin:0 0 10px}.browse p{color:#a1a3ab}.vehicleCard{display:block;text-align:left;width:min(100%,520px);background:#1b1c20;border:1px solid #33353a;border-radius:22px;padding:28px;margin-top:28px}.vehicleCard svg{width:100%;height:140px;color:#b5b7bf}.vehicleCard h2{margin:8px 0}.globalNav{position:fixed;z-index:8;bottom:24px;left:50%;transform:translateX(-50%);width:min(480px,92vw);display:flex;padding:7px;gap:4px;background:#26272cdd;backdrop-filter:blur(24px);border:1px solid #ffffff26;border-radius:999px;box-shadow:0 12px 40px #0007;}.globalNav button{flex:1;min-width:0;background:transparent;border-radius:999px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px;color:#999ca5}.globalNav button.active{background:#ffffff16;color:#fff}.globalNav svg{width:23px;height:23px}.globalNav span{font-size:11px;max-height:18px;opacity:1;transition:opacity .2s,max-height .3s}.globalNav.compact span{opacity:0;max-height:0;overflow:hidden}.workspace{display:flex;flex:1;flex-direction:column;position:relative;height:auto;min-height:0;padding:12px 20px 74px;gap:10px}.viewport{flex:1;min-height:150px}.rail{flex:none;flex-direction:row;justify-content:center;overflow-x:auto;align-items:center;padding:5px;gap:8px;min-height:65px}.tool{flex:0 0 70px;height:55px}.inspector{z-index:5;}.toast{bottom:85px}.empty{padding:30px;border:1px solid #303238;border-radius:18px;margin-top:24px;color:#aaa}.categoryGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-top:24px}.categoryGrid div{padding:22px;background:#1c1d21;border-radius:16px}@media(max-width:600px){.top{gap:10px;padding:0 12px}.logo{font-size:13px}.workspace{padding:8px 8px 70px}.rail{justify-content:flex-start}.inspector{left:8px;right:8px;bottom:140px}.hint{display:none}.browse{padding:24px 16px 110px}.topright{gap:4px}.pill{padding:7px 9px}}
/* UI refinement: fixed horizontal span, animated vertical compression */
.globalNav{width:min(480px,92vw);transition:bottom .42s cubic-bezier(.22,1,.36,1),padding .42s cubic-bezier(.22,1,.36,1);padding:7px}
.globalNav.compact{width:min(480px,92vw);bottom:10px;padding:4px 7px}
.globalNav button{transition:padding .42s cubic-bezier(.22,1,.36,1),gap .42s cubic-bezier(.22,1,.36,1),background .25s,color .25s;gap:5px;padding:9px}
.globalNav span{line-height:16px;max-height:16px;overflow:hidden;transition:opacity .18s,max-height .42s cubic-bezier(.22,1,.36,1),transform .42s cubic-bezier(.22,1,.36,1)}
.globalNav.compact span{transform:translateY(5px)}.globalNav.compact button{padding:6px 9px;gap:0}
.globalNav button:active,.tool:active{transform:scale(.96)}
.rail{min-height:108px;padding:10px 12px;gap:8px;justify-content:flex-start}
.rail .tool{flex:1 0 86px;height:86px;width:auto;font-size:13px;gap:10px;border-radius:16px;transition:background .22s,color .22s,transform .22s}
.rail .tool svg{width:29px;height:29px;stroke-width:1.5}

@media(max-width:600px){.rail{min-height:94px;padding:7px;gap:5px}.rail .tool{flex:0 0 76px;height:78px;font-size:12px}.rail .tool svg{width:26px;height:26px}}
@media(max-height:600px){.rail{min-height:80px;padding:5px}.rail .tool{height:68px}}
@media(prefers-reduced-motion:reduce){.globalNav,.globalNav button,.globalNav span,.rail .tool{transition:none!important}.inspector:not([hidden]){animation:none}}
/* Non-overlapping studio and inspector; viewport resizes with the grid. */
.studioLayout{flex:1;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,0px);column-gap:0;transition:grid-template-columns .46s cubic-bezier(.22,1,.36,1),column-gap .46s cubic-bezier(.22,1,.36,1)}
.panel-open .studioLayout{grid-template-columns:minmax(0,1fr) minmax(0,clamp(270px,29vw,390px));column-gap:12px}
.studioLayout .viewport{min-height:0;width:100%;height:100%}
.studioLayout .inspector{position:relative;inset:auto;width:100%;height:100%;min-width:0;min-height:0;max-height:none;overflow:hidden;opacity:0;transform:translateX(12px);pointer-events:none;visibility:hidden;animation:none;box-shadow:none;transition:opacity .25s,transform .46s cubic-bezier(.22,1,.36,1),visibility 0s linear .46s}
.panel-open .studioLayout .inspector{opacity:1;transform:none;pointer-events:auto;visibility:visible;overflow:auto;transition-delay:0s}
.studioLayout .inspector .grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studioLayout .inspector .section{padding:16px}.studioLayout .inspector .option{min-height:84px}.studioLayout .inspector .option span{font-size:12px}
@media(max-width:700px){.studioLayout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,0px);row-gap:0;transition:grid-template-rows .46s cubic-bezier(.22,1,.36,1),row-gap .46s cubic-bezier(.22,1,.36,1)}.panel-open .studioLayout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,40%);column-gap:0;row-gap:8px}.studioLayout .inspector{transform:translateY(10px)}.panel-open .studioLayout .inspector{transform:none}}
@media(prefers-reduced-motion:reduce){.studioLayout,.studioLayout .inspector{transition:none!important}}

/* Keep the panel at its final size; only the studio allocation animates. */
.studioLayout{position:relative}.studioLayout .inspector{position:absolute;right:0;top:0;width:clamp(270px,29vw,390px);height:100%;transform:none;transition:opacity .46s,visibility 0s linear .46s;transform-origin:center}.panel-open .studioLayout .inspector{transition-delay:0s}.studioLayout .viewport{background:#bfc2c7}.vehicleCard{transform-origin:0 0}
@media(max-width:700px){.studioLayout .inspector{top:auto;bottom:0;left:0;width:100%;height:40%;transform:none}}
/* Workbench toolbar and shared part search */
.top:has(#buildActions:not([hidden])){gap:20px;z-index:9;min-height:76px}.top:has(#buildActions:not([hidden])) .logo{display:none}#buildActions{width:100%;display:grid;grid-template-columns:1fr auto 1fr;gap:16px}.historyActions,.rightActions{display:flex;align-items:center;gap:10px}.rightActions{justify-content:flex-end}.historyButton,.backButton{min-height:44px;padding:10px 16px;font-size:15px}.historyButton{font-size:21px;min-width:52px}.historyButton span{font-size:13px}.buildHeading{font-size:15px;font-weight:600;white-space:nowrap}.partSearch{position:relative;min-width:100px;width:min(260px,25vw)}#partSearch{width:100%;height:44px;background:#202126;border:1px solid #45464c;border-radius:14px;padding:0 12px;color:white;font:inherit;font-size:13px}#partResults{position:absolute;top:52px;right:0;width:min(340px,85vw);max-height:55vh;overflow:auto;padding:8px;background:#202126f5;backdrop-filter:blur(20px);border:1px solid #45464c;border-radius:16px;box-shadow:0 12px 35px #0008;font-size:13px}.partResult{display:flex;align-items:center;width:100%;min-height:42px;padding:11px 12px;background:transparent;border-radius:10px;text-align:left;color:#e8e9ec;font-size:13px;line-height:1.5}.partResult:hover,.partResult:focus-visible{background:#ffffff14;outline:none}.partSearchEmpty{padding:14px 12px;color:#999ca5;font-size:12px;line-height:1.6}.searchPartDetail p{color:#aaa;font-size:12px;line-height:1.6}.searchPartDetail{padding:12px;background:#ffffff0b;border-radius:12px;margin-bottom:16px}.wheelCard.search-target-highlight{position:relative;z-index:1;animation:searchTargetFlash 1.15s ease-out 1}@keyframes searchTargetFlash{0%,100%{border-color:var(--line);box-shadow:0 0 0 0 #dce0e900}18%,52%{border-color:#f0f1f4;box-shadow:0 0 0 3px #dce0e955,0 0 24px #e8eaf077}35%,70%{border-color:#aeb2bb;box-shadow:0 0 0 1px #dce0e933,0 0 10px #e8eaf044}}@media(prefers-reduced-motion:reduce){.wheelCard.search-target-highlight{animation:none;border-color:#f0f1f4;box-shadow:0 0 0 2px #dce0e955}}.backButton{white-space:nowrap}@media(max-width:850px){.buildHeading,.historyButton span{display:none}#buildActions{grid-template-columns:auto 1fr;gap:8px}.historyActions,.rightActions{gap:5px}.historyButton,.backButton{padding:8px;min-width:40px}.backButton{font-size:12px}.partSearch{width:min(220px,30vw)}}

/* Floating history controls: one canonical desktop implementation. */
.floatingHistory{position:absolute;left:18px;top:50%;transform:translateY(-50%);z-index:4;display:flex;flex-direction:column;gap:8px;padding:6px;border-radius:999px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(16px) saturate(120%);-webkit-backdrop-filter:blur(16px) saturate(120%);box-shadow:none;transition:background .2s ease;pointer-events:auto}
.floatingHistory .historyButton{display:grid;place-items:center;width:38px;height:38px;min-width:38px;min-height:38px;flex:0 0 38px;box-sizing:border-box;border:1px solid #c9cbd0;border-radius:50%;background:#ffffffc9;color:#333;padding:0;backdrop-filter:blur(12px);transition:background .2s ease,transform .25s cubic-bezier(.2,.8,.2,1.2),opacity .2s ease}
.floatingHistory .historyButton+.historyButton{border:1px solid #c9cbd0}
.floatingHistory .historyButton svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.floatingHistory .historyButton:hover:not(:disabled){background:#e3e4e7}
.floatingHistory .historyButton:active:not(:disabled){transform:scale(.94)}
.floatingHistory .historyButton:disabled{opacity:.48}
.floatingHistory .historyButton:focus-visible{outline:2px solid white;outline-offset:-2px}

/* Wheel cards use a single horizontal-row layout across the configurator. */
.wheelCatalog{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.wheelItem{min-width:0}
.wheelCard{display:flex;width:100%;min-height:76px;flex-direction:row;align-items:center;gap:12px;padding:7px 12px 7px 7px;background:#1b1c20;border:1px solid #33353b;border-radius:13px;text-align:left;min-width:0;color:var(--text)}
.wheelCard.selected{border-color:#e4e5e8;background:#292a2e}
.wheelCard:disabled{opacity:.55}
.wheelCardVisual{height:66px;width:66px;flex:0 0 66px;display:grid;place-items:center;background:#242529;border-radius:8px;overflow:hidden;font-size:11px;color:var(--muted)}
.wheelCardVisual img{width:100%;height:100%;object-fit:contain}
.wheelCardInfo{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.wheelCard strong{font-size:14px}
.wheelCard small,.wheelFinishSection small{font-size:11px;color:var(--muted)}
.wheelFinishSection{margin-top:20px;border-top:1px solid var(--line);padding-top:14px}
.wheelFinishCurrent{display:flex;align-items:center;gap:9px;margin:12px 0;font-size:12px}
.wheelFinishDot{width:26px;height:26px;border-radius:50%;border:2px solid #eee;box-shadow:0 0 0 2px #555}
.wheelChevron{width:8px;height:8px;border-right:1.5px solid #aaa;border-bottom:1.5px solid #aaa;transform:rotate(45deg);margin:0 3px 4px;transition:transform .2s}
.wheelChevron.open{transform:rotate(225deg);margin-bottom:0}
.wheelInlineFinish{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:5px 8px 2px;padding:7px 12px;background:#202126;border:1px solid #33353b;border-radius:10px;font-size:11px;color:var(--muted);animation:wheelReveal .2s ease-out}
.wheelInlineFinish .wheelFinishCurrent{margin:0;gap:7px;font-size:11px;color:var(--text)}
.wheelInlineFinish .wheelFinishDot{width:19px;height:19px;box-shadow:none;border-width:1px}
@keyframes wheelReveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.wheelInlineFinish{animation:none}.wheelChevron{transition:none}}


/* Shared paint / wheel configuration language */
.configSegments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:4px;background:#101114;border:1px solid #303238;border-radius:12px;margin-bottom:12px}.configSegments button{min-width:0;min-height:36px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-size:11px;white-space:nowrap;transition:background .24s cubic-bezier(.22,1,.36,1),color .24s,border-color .24s,transform .2s}.configSegments button.selected{background:#303136;border-color:#41434a;color:#fff}.configSegments button:active{transform:scale(.96)}.configAll{display:block;width:100%;text-align:left;background:none;border:0;color:var(--muted);font-size:11px;padding:0 0 12px}.configListTitle{margin-top:18px}.paintCard{min-height:76px}.paintChip{display:block;width:66px;height:54px;flex:0 0 66px;border-radius:9px;border:1px solid #ffffff26;box-shadow:inset 0 1px 2px #ffffff25}.wheelCard{transition:background .24s,border-color .24s,transform .2s}.wheelCard:active:not(:disabled){transform:scale(.985)}@media(prefers-reduced-motion:reduce){.configSegments button,.wheelCard{transition:none}}

/* Minimal inspector header and shared sliding segmented control */
.studioLayout .inspector #options{padding-top:8px}.configSegments{position:relative;isolation:isolate;gap:0;padding:4px;border:0;background:#101114;border-radius:12px}.configSegments .configSegmentIndicator{position:absolute;z-index:0;left:4px;top:4px;bottom:4px;width:calc((100% - 8px)/3);background:#303136;border-radius:8px;pointer-events:none}.configSegments button{position:relative;z-index:1;min-height:32px;border:0;background:transparent;color:#d5d5d8}.configSegments button.selected{background:transparent;border:0;color:#fff}.configSegments button:focus-visible{outline:1px solid #aaa;outline-offset:-2px}

/* Shared configuration layout: identical horizontal rails and card dimensions. */
.studioLayout .inspector #options{--config-inset:16px;box-sizing:border-box;width:100%;min-width:0;align-self:stretch;flex-shrink:0;padding:8px var(--config-inset) 16px;margin:0;}
.studioLayout .inspector #options > .configSegments,.studioLayout .inspector #options > .wheelCatalog,.studioLayout .inspector #options > .sectiontop,.studioLayout .inspector #options > .configAll{box-sizing:border-box;width:100%;min-width:0;margin-inline:0;}
.studioLayout .inspector #options .wheelCatalog{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:0;}
.studioLayout .inspector #options .wheelItem{width:100%;min-width:0;margin:0;padding:0;}
.studioLayout .inspector #options .wheelCard{box-sizing:border-box;width:100%;min-width:0;height:82px;min-height:82px;margin:0;padding:7px 12px 7px 7px;gap:12px;}
.studioLayout .inspector #options .paintChip,.studioLayout .inspector #options .wheelCardVisual{box-sizing:border-box;width:66px;height:66px;flex:0 0 66px;border-radius:8px;}
.studioLayout .inspector #options .configListTitle{margin-top:0;}
.studioLayout .inspector #options .configAll,.studioLayout .inspector #options .configListTitle{height:28px;min-height:28px;margin-bottom:0;padding:0 0 8px;display:flex;align-items:center;font-size:11px;font-weight:400;color:var(--muted);}

.wheelSizeChoice{border:1px solid #383a40;background:#191a1e;color:inherit;border-radius:7px;padding:5px 12px;cursor:pointer;transition:background .22s ease,border-color .22s ease}.wheelSizeChoice.selected{background:#383a40;border-color:#999}
.stanceCard{box-sizing:border-box;width:100%;padding:16px;margin-top:8px;border:1px solid #33353b;border-radius:12px;background:#1b1c20;display:grid;gap:14px}.stanceRow{display:flex;justify-content:space-between;align-items:center;font-size:13px}.stanceRow span{color:#bfc1c4;font-variant-numeric:tabular-nums}.stanceCard input{width:100%;margin:0;accent-color:#bfc1c4;cursor:pointer}.stanceCard input:disabled{opacity:.4;cursor:default}

.savePresetPill{height:38px;min-width:148px;padding:0 24px;border:0;border-radius:999px;background:#007aff;color:white;font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:filter .2s,transform .2s}.savePresetPill:hover{filter:brightness(1.08)}.savePresetPill:active{transform:scale(.97)}.presetDialog{width:min(340px,90vw);border:1px solid #ffffff24;border-radius:24px;padding:24px;background:#242529;color:white;box-shadow:0 18px 60px #0006}.presetDialog::backdrop{background:#0006;backdrop-filter:blur(5px)}.presetDialog h2{font-size:19px;text-align:center;margin:0 0 10px}.presetDialog p{font-size:13px;color:#aaa;text-align:center}.presetDialog input{width:100%;box-sizing:border-box;border:1px solid #ffffff24;border-radius:12px;background:#151619;color:white;padding:12px;font:inherit;margin:12px 0 18px}.presetDialog form>div{display:flex;gap:10px}.presetDialog button{flex:1;border-radius:999px;padding:10px;background:#3a3b40;color:white}.presetDialog .presetConfirm{background:#007aff}.presetAdd{width:100%;border:1px dashed #ffffff35;border-radius:12px;background:transparent;padding:16px;margin:10px 0;color:#fff}.presetRow{position:relative;margin:8px 0}.presetRow .wheelCard{padding-right:48px}.presetDelete{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;color:#aaa;font-size:11px;padding:6px}.floatingHistory .stanceShortcut.active{background:#007aff;color:white}

.liveryRange{display:flex;flex-direction:column;gap:8px;margin:14px 0;color:#c6c8ce;font-size:12px}.liveryRange input{width:100%;accent-color:#a8b9d6}.liveryUpload{width:100%;font-size:12px;color:#c6c8ce;margin:10px 0}.liveryPreview{display:block;max-width:100%;max-height:130px;object-fit:contain;margin:12px auto;background:#34363a;border-radius:8px}

/* V0.8.6: fixed livery palette outside the scrolling options. */
.studioLayout .inspector > .liveryColorFooter{flex:0 0 auto;box-sizing:border-box;padding:12px 16px 14px;border-top:1px solid var(--line);background:#17181c;z-index:2;}
.liveryColorFooter .sectiontop{margin:0 0 10px;}
.liveryPalette{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;align-items:center;}
.liveryColorChoice{display:grid;place-items:center;aspect-ratio:1;width:100%;max-width:36px;padding:3px;border:2px solid transparent;border-radius:50%;background:transparent;cursor:pointer;justify-self:center;}
.liveryColorChoice span{display:block;width:100%;height:100%;border-radius:50%;border:1px solid #ffffff40;box-sizing:border-box;}
.liveryColorChoice.selected{border-color:#fff;}
.liveryColorChoice:focus-visible{outline:2px solid #8bbaff;outline-offset:1px;}

/* V0.8.7 */
.modelAbout{margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:16px;background:#17181c;}
.modelAbout h2{font-size:17px;margin:0 0 10px}.modelAbout .credit{font-size:13px;}

.profilePresetEntry{display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:16px;background:#17181c;color:var(--text);text-align:left;font:inherit;cursor:pointer}.profilePresetEntry:hover{background:#222328}.profilePresetEntry strong,.profilePresetEntry small{display:block}.profilePresetEntry small{margin-top:8px;color:#999}.profilePresetEntry>span:last-child{font-size:28px;color:#999}.profileBack{border:0;background:transparent;color:var(--text);font:inherit;cursor:pointer;padding:8px 0}.profilePresetList{display:grid;gap:12px}.profilePresetList .presetRow{display:flex;gap:12px;align-items:center}.profilePresetList .wheelCard{flex:1}.profilePresetList .wheelCardVisual{width:120px;flex-basis:120px}.profilePresetList .wheelCardVisual img{width:100%;height:100%;object-fit:contain}

/* V0.8.24: shared square preset covers */
.presetRow .wheelCardVisual{width:66px;height:66px;flex:0 0 66px;aspect-ratio:1;overflow:hidden}.profilePresetList .presetRow .wheelCardVisual{width:88px;height:88px;flex-basis:88px}.presetRow .wheelCardVisual img,.profilePresetList .presetRow .wheelCardVisual img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}

/* V0.8.28 */
.wheelBrandTabs button{font-size:10px;padding-inline:2px}.catalogBrands{position:relative;max-width:100%;margin:16px 0}.catalogWheelGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.catalogWheelCard{min-width:0;display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#17181c}.catalogWheelVisual{aspect-ratio:1;display:grid;place-items:center;background:#222328;border-radius:12px;overflow:hidden;color:#999;font-size:12px}.catalogWheelVisual img{width:100%;height:100%;object-fit:contain}.catalogWheelCard small{color:var(--muted)}.catalogWheelCard strong{overflow-wrap:anywhere}

.wheelSpecs{font-size:12px;line-height:1.6;color:#a8abb2;overflow-wrap:anywhere}.wheelSpecs summary{cursor:pointer;color:#e0e2e6;padding:8px 0}.wheelSpecs a{color:#b5c8e8}.wheelSpecs div{margin:4px 0}
.studioLayout .inspector > .wheelColorFooter{flex:0 0 auto;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:12px 10px 14px;border-top:1px solid var(--line);background:#17181c;z-index:2}.wheelColorChoice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:5px 0;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted);font-size:10px;white-space:nowrap;cursor:pointer}.wheelColorChoice span{width:25px;height:25px;border-radius:50%;border:1px solid #777;box-shadow:inset 0 1px 2px #ffffff30}.wheelColorChoice[aria-pressed=true]{border-color:#aaa;color:#fff;background:#292b30}

/* Vehicle cards: original vertical content, two per row. */
 .vehicleGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:40px;margin-top:28px}
.vehicleGrid .vehicleCard{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:28px;text-align:left;overflow:hidden}
.vehicleCardMedia{display:block;width:100%;aspect-ratio:8/3;flex:none;overflow:hidden;border-radius:12px;margin-bottom:12px}
.vehicleGrid .vehicleCardMedia svg,.vehicleGrid .vehicleCardMedia img{display:block;width:100%;height:100%;max-width:100%;box-sizing:border-box}
.vehicleGrid .vehicleCardMedia img{object-fit:cover}
.vehicleCardInfo{display:block;min-width:0;overflow-wrap:break-word}
.vehicleCard:focus-visible{outline:2px solid #eee;outline-offset:3px}
.catalogWheelGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.catalogWheelCard{display:flex;align-items:flex-start;gap:12px}.catalogWheelVisual{width:38%;flex:0 0 38%}.catalogWheelInfo{display:flex;flex:1;min-width:0;flex-direction:column;gap:8px;overflow-wrap:anywhere}.catalogWheelInfo .wheelSpecs{min-width:0}
@media(max-width:850px){.catalogWheelGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.vehicleGrid{gap:32px}}
@media(max-width:520px){.vehicleGrid,.catalogWheelGrid{grid-template-columns:minmax(0,1fr)}}

.catalogWheelCard{color:var(--text);font:inherit;text-align:left;cursor:pointer;width:100%;align-items:center;transition:background .2s,border-color .2s}.catalogWheelCard:hover{background:#222328;border-color:#ffffff40}.catalogWheelCard:focus-visible{outline:2px solid #aaa;outline-offset:3px}.wheelDetailLayout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;align-items:start;margin-top:24px}.wheelDetailVisual{width:100%;max-width:560px}.wheelDetailInfo{min-width:0}.wheelDetailSpec{padding:16px;margin:12px 0;border:1px solid var(--line);border-radius:16px;background:#17181c}.wheelDetailSpec dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.wheelDetailSpec dd{margin:0}.wheelDetailSpec dt{color:var(--muted)}.wheelDetailSpec a{color:#b5c8e8}@media(max-width:700px){.wheelDetailLayout{grid-template-columns:1fr}}

/* V0.10.1 wheel detail */
.wheelDetailVisual{border-radius:24px;position:relative}.wheelCenterMask{position:absolute;left:50%;top:50%;width:7%;height:5%;transform:translate(-50%,-50%);background:#000;pointer-events:none}.top.wheelDetailTop .logo{display:none}.top.wheelDetailTop #searchWrap{width:min(520px,65vw)}#wheelCatalogBack[hidden]{display:none!important}

.catalogWheelVisual{position:relative}.top.wheelDetailTop{height:66px;min-height:66px}.wheelDetailVisual{border-radius:24px}@media(max-width:700px){.top.wheelDetailTop{height:58px;min-height:58px}}

/* V0.10.2 shared wheel image flight */
.wheelFlight{position:fixed!important;z-index:7;pointer-events:none;max-width:none;flex:none;transform-origin:0 0;overflow:hidden;margin:0;display:block;background:#08090a}.wheelFlightRotor{position:relative;width:100%;height:100%;transform-origin:50% 50%;display:grid;place-items:center}.wheelFlightRotor img{width:100%;height:100%;object-fit:contain}.wheelFlightRotor .wheelCenterMask{position:absolute}

/* V0.10.4: fixed background, centered detail image and crossfade */
.catalogWheelVisual:has(.wheelImageRotor){background:#08090a;isolation:isolate}
.wheelImageRotor{position:absolute;inset:0;display:grid;place-items:center;transform-origin:center;}
.wheelImageRotor img{display:block;width:100%;height:100%;object-fit:contain;}
.wheelFlight{background:#08090a;overflow:hidden;}
.wheelDetailVisual{justify-self:center;align-self:center;}
.wheelOutgoing{position:fixed!important;z-index:6;pointer-events:none;margin:0!important;max-width:none!important;box-sizing:border-box;overflow:hidden;}

/* V0.10.5: stable browse scroll and viewport-centered detail image. */
.browse{overflow-anchor:none;scrollbar-gutter:stable both-edges}
.wheelSnapshot h1{font-size:34px;letter-spacing:-.04em;margin:0 0 10px}
.wheelSnapshot p{color:#a1a3ab}
.wheelDetailVisual{align-self:start;width:min(100%,560px,var(--wheel-visible-height,560px));margin-top:max(0px,calc((var(--wheel-visible-height,560px) - min(100cqw,560px,var(--wheel-visible-height,560px)))/2))}
.wheelDetailLayout{container-type:inline-size}
@media(min-width:701px){.wheelDetailVisual{margin-top:max(0px,calc((var(--wheel-visible-height,560px) - min(calc((100cqw - 32px)/2),560px,var(--wheel-visible-height,560px)))/2))}}
@media(max-width:700px){.wheelDetailVisual{width:min(100%,560px);margin-top:0}}

/* V0.10.6: center both detail columns within the same visible region. */
@media(min-width:701px){.wheelDetailInfo{align-self:start;box-sizing:border-box;min-height:var(--wheel-visible-height,560px);display:flex;flex-direction:column;justify-content:safe center;text-align:left}.wheelDetailInfo > *{flex-shrink:0}.wheelDetailInfo > :first-child{margin-top:0}.wheelDetailInfo > :last-child{margin-bottom:0}}
.configSegments button{transition:color .3s ease}
@media(prefers-reduced-motion:reduce){.configSegments button{transition:none}}

/* V0.10.11: shared sliding bottom navigation highlight. */
.globalNav{isolation:isolate}
.globalNav > .globalNavIndicator{position:absolute;left:7px;top:7px;bottom:7px;width:calc((100% - 26px)/4);max-height:none;opacity:1;border-radius:999px;background:#ffffff16;pointer-events:none;z-index:0;transition:transform .3s cubic-bezier(.22,1,.36,1),top .42s cubic-bezier(.22,1,.36,1),bottom .42s cubic-bezier(.22,1,.36,1)}
.globalNav.compact > .globalNavIndicator{top:4px;bottom:4px;opacity:1;max-height:none}
.globalNav > button{position:relative;z-index:1;background:transparent}
.globalNav > button.active{background:transparent}
@media(prefers-reduced-motion:reduce){.globalNav > .globalNavIndicator{transition:none!important}}

/* V0.10.14: shared header height and fixed search left anchor. */
.top,.top.wheelDetailTop,.top:has(#buildActions:not([hidden])){position:relative;height:66px;min-height:66px;flex:0 0 66px;padding:0 28px;z-index:9;--search-full:min(520px,38vw);--search-short:min(260px,19vw)}
.headerSearchSurface{position:absolute;left:calc(100% - 28px - var(--search-full));width:var(--search-full);height:44px;top:50%;transform:translateY(-50%);border-radius:14px;background:#202126;border:1px solid #35363b;transition:width 300ms cubic-bezier(.22,1,.36,1);z-index:2}
.headerSearchSurface.buildSearch{width:var(--search-short)}
.headerSearchSurface #searchWrap,.headerSearchSurface .partSearch{width:100%;min-width:0;height:100%}
.headerSearchSurface #search,.headerSearchSurface #partSearch{height:100%;width:100%;padding:0 15px;border:0;background:transparent;font-size:14px;border-radius:14px}
.headerSearchSurface input::placeholder{color:transparent}
.headerSearchHint{position:absolute;left:15px;right:15px;top:50%;transform:translateY(-50%);pointer-events:none;color:#777980;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.headerSearchSurface:focus-within{border-color:#73757c}
#buildActions .rightActions{justify-content:flex-end}
@media(max-width:850px){.top,.top.wheelDetailTop,.top:has(#buildActions:not([hidden])){--search-full:min(48vw,320px);--search-short:max(80px,calc(var(--search-full) - 70px));padding:0 15px}.headerSearchSurface{left:calc(100% - 15px - var(--search-full))}.headerSearchHint,.headerSearchSurface #search,.headerSearchSurface #partSearch{font-size:12px}}
@media(max-width:600px){.top,.top.wheelDetailTop,.top:has(#buildActions:not([hidden])){height:58px;min-height:58px;flex-basis:58px}}
@media(prefers-reduced-motion:reduce){.headerSearchSurface{transition:none}}
/* V0.10.15: keep the studio search immediately beside Share. */
.top{--share-slot:74px}
#shareTop{width:64px;min-width:64px;padding-inline:0}
.headerSearchSurface{left:auto;right:28px;transition:width 300ms cubic-bezier(.22,1,.36,1),right 300ms cubic-bezier(.22,1,.36,1)}
.headerSearchSurface.buildSearch{right:calc(28px + var(--share-slot))}
@media(max-width:850px){.headerSearchSurface{left:auto;right:15px}.headerSearchSurface.buildSearch{right:calc(15px + var(--share-slot))}}
@media(prefers-reduced-motion:reduce){.headerSearchSurface{transition:none}}

#profileDetailBack[hidden]{display:none!important}

/* In-place segmented controls: move only the indicator, never the content. */
.configSegments .configSegmentIndicator{transition:transform 300ms cubic-bezier(.22,1,.36,1),opacity 180ms ease;}
@media(prefers-reduced-motion:reduce){.configSegments .configSegmentIndicator{transition:none;}}

/* V0.11.23: one app background, independently scrolling catalog list. */
.catalogWheelVisual,.catalogWheelVisual:has(.wheelImageRotor),.wheelFlight,.transparentWheelVisual{background:transparent!important}
.browse.catalogListBrowse{min-height:0;padding-top:0;padding-bottom:0;overflow:hidden}
.catalogListBrowse #pageContent{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
.catalogPinnedHeader{flex:none;position:relative;padding-top:40px;padding-bottom:12px;background:none;isolation:isolate}
.catalogPinnedHeader .catalogBrands{position:relative;top:auto;margin-bottom:0;background:#101114;box-shadow:none}
.catalogListBrowse .catalogWheelGrid{flex:1;min-height:0;overflow:auto;align-content:start;padding-bottom:120px;overflow-anchor:none}

@media(max-width:600px){.catalogPinnedHeader{padding-top:24px}}

/* V1.0.1: vehicle loading wordmark, independent of network and WebGL. */
.loading{display:grid;place-content:center;justify-items:center;gap:24px;background:#101115;opacity:1;visibility:visible;transition:opacity .42s ease,visibility 0s;pointer-events:auto;}
.loading[hidden]{display:grid;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .42s ease,visibility 0s .42s;}
.loadingLogo{width:clamp(150px,24vw,300px);max-width:70%;overflow:visible;fill:none;stroke:#e8e9ed;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;animation:loadingShimmer 3s 1.8s ease-in-out infinite;}
.loadingLogo path{stroke-dasharray:1;stroke-dashoffset:0;animation:loadingWrite .62s cubic-bezier(.35,0,.25,1) both;animation-delay:calc(var(--i)*.18s);}
.loading[hidden] .loadingLogo,.loading[hidden] .loadingLogo path{animation:none;}
#loadingMessage{font-size:11px;letter-spacing:.08em;color:#92959d;max-width: min(75vw,420px);overflow-wrap:anywhere;}
.loading.loadFailed .loadingLogo,.loading.loadFailed .loadingLogo path{animation:none;}
.loading.loadFailed #loadingMessage{color:#e4b4b4;}
@keyframes loadingWrite{from{stroke-dashoffset:1;opacity:0}15%{opacity:1}to{stroke-dashoffset:0;opacity:1}}
@keyframes loadingShimmer{0%,100%{opacity:.78}50%{opacity:1;filter:drop-shadow(0 0 5px #ffffff24)}}
@media(prefers-reduced-motion:reduce){.loading,.loading[hidden]{transition:none}.loadingLogo,.loadingLogo path{animation:none}}

/* V0.12.6: full workspace mask; global header and navigation remain above/outside. */
#build > .loading{position:absolute;inset:0;z-index:7;background:#85888e;max-width:none;border-radius:0;}
#build > .loading #loadingMessage{color:#f0f1f3;}
#build > .loading.loadFailed #loadingMessage{color:#fff0f0;}
#build > .loading[hidden]{display:grid!important;}

/* V0.12.7: one complete wordmark playback, then hold its final frame. */
.loading .loadingLogo{animation:none;}
.loading .loadingLogo path{animation:none;stroke-dashoffset:1;opacity:0;}
.loading.logo-playing .loadingLogo path{animation:loadingWrite .62s cubic-bezier(.35,0,.25,1) both;animation-delay:calc(var(--i)*.18s);}
.loading.logo-complete .loadingLogo path,.loading.loadFailed .loadingLogo path{animation:none;stroke-dashoffset:0;opacity:1;}
@media(prefers-reduced-motion:reduce){.loading.logo-playing .loadingLogo path{animation:none;stroke-dashoffset:0;opacity:1;}}

/* V0.12.8: viewport-aligned opaque app background and one continuous handwritten wordmark. */
#build > .loading{background:var(--app-background);background-size:100vw 100vh;background-size:100vw 100dvh;background-attachment:fixed;background-repeat:no-repeat;}
.loading .loadingLogo{stroke-width:3.8;width:clamp(180px,27vw,340px);}
.loading.logo-playing .loadingLogo path{animation:loadingWrite 1.85s linear both;animation-delay:0s;}
#build > .loading:not(.loadFailed) #loadingMessage{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@media(prefers-reduced-motion:reduce){.loading.logo-playing .loadingLogo path{animation:none;stroke-dashoffset:0;opacity:1;}}

/* V0.12.9: approved demo wordmark, exact geometry and timing. */
.loading .loadingLogo{stroke:#fff;stroke-width:9;width:clamp(180px,35vw,440px);}
.loading.logo-playing .loadingLogo path{animation:loadingWrite 1.85s ease-in-out both;}
@media(prefers-reduced-motion:reduce){.loading.logo-playing .loadingLogo path{animation:none;stroke-dashoffset:0;opacity:1;}}

/* V0.12.11: center the approved wordmark between the fixed bars. */
#build > .loading{padding:0 0 var(--loading-nav-inset,55px);box-sizing:border-box;place-content:center;justify-items:center;}
#build > .loading .loadingLogo{width:min(64vw,720px);max-width:none;height:auto;display:block;}
#build > .loading.loadFailed #loadingMessage{position:absolute;top:calc(50% + 110px);left:50%;transform:translateX(-50%);}

/* V0.12.12: synchronize navigation compression with workspace reveal. */
.globalNav,.globalNav.compact{transition:bottom .42s cubic-bezier(.22,1,.36,1),padding .42s cubic-bezier(.22,1,.36,1),width .42s cubic-bezier(.22,1,.36,1),height .42s cubic-bezier(.22,1,.36,1),min-height .42s cubic-bezier(.22,1,.36,1)}
@media(prefers-reduced-motion:reduce){.globalNav,.globalNav.compact{transition:none!important}}

/* V1.1.2: dedicated mobile studio layout. Desktop rules above remain unchanged. */
@media (max-width: 700px) and (orientation: portrait) {
  :root { --mobile-safe-bottom: env(safe-area-inset-bottom, 0px); }
  html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
  .app { width: 100%; height: 100dvh; min-height: 100svh; overflow: hidden; }

  .top,
  .top:has(#buildActions:not([hidden])) {
    height: 58px;
    min-height: 58px;
    flex: 0 0 58px;
    gap: 8px;
    padding: 0 12px;
  }
  #buildActions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  #buildActions .historyActions { min-width: 0; }
  #buildActions .historyActions .backButton {
    min-width: 0;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 12px;
  }
  #buildActions .buildHeading { display: none; }
  #buildActions .rightActions {
    min-width: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 7px;
  }
  #buildActions .partSearch { width: auto; min-width: 0; max-width: none; flex: 1 1 auto; }
  #partSearch { height: 40px; min-width: 0; padding: 0 11px; font-size: 12px; }
  #shareTop { width: 54px; min-width: 54px; min-height: 40px; padding: 7px 0; font-size: 12px; }

  #build.workspace {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 8px 10px calc(78px + var(--mobile-safe-bottom));
  }
  .studioLayout {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 8px;
    overflow: hidden;
    transition: none;
  }
  .studioLayout .viewport {
    position: relative;
    flex: 0 0 clamp(220px, 34dvh, 370px);
    width: 100%;
    min-width: 0;
    min-height: 190px;
    height: auto;
    border-radius: 20px;
  }
  .studioLayout .vtop { top: 13px; left: 15px; right: 14px; gap: 8px; }
  .studioLayout .eyebrow { font-size: 9px; letter-spacing: .12em; }
  .studioLayout .carname { margin-top: 4px; font-size: 14px; line-height: 1.25; }
  .studioLayout .status { font-size: 8px; }
  .studioLayout .hint { display: none; }
  .studioLayout .controls { right: 10px; bottom: 10px; gap: 6px; }
  .studioLayout .round { width: 34px; height: 34px; }
  .studioLayout .round svg { width: 15px; height: 15px; }
  .studioLayout .floatingHistory { left: 9px; top: 50%; transform: translateY(-50%); gap: 5px; padding: 4px; }
  .studioLayout .floatingHistory .historyButton { width: 38px; height: 38px; min-width: 38px; min-height: 38px; flex-basis: 38px; }

  /* The inspector participates in document flow on phones instead of covering the car. */
  .studioLayout .inspector {
    position: relative !important;
    inset: auto !important;
    display: flex;
    flex: 0 0 0;
    width: 100% !important;
    height: 0 !important;
    min-width: 0;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    opacity: 0;
    visibility: hidden;
    transform: none;
    pointer-events: none;
    box-shadow: none;
    transition: flex-basis .28s cubic-bezier(.22,1,.36,1), opacity .2s ease, visibility 0s linear .28s;
  }
  .panel-open .studioLayout .inspector {
    flex: 1 1 0;
    height: auto !important;
    min-height: 125px !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  
  
  .studioLayout .inspector #options { min-width: 0; padding: 8px 12px 14px; }
  .studioLayout .inspector #options > * { max-width: 100%; }
  .studioLayout .inspector .section { padding: 12px; }
  .studioLayout .inspector .sectiontop { gap: 8px; margin-bottom: 10px; font-size: 12px; }
  .studioLayout .inspector .configSegments { width: 100%; }
  .studioLayout .inspector .configSegments button { min-width: 0; min-height: 38px; padding-inline: 4px; font-size: 11px; }
  .studioLayout .inspector .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .studioLayout .inspector .option { min-width: 0; min-height: 68px; padding: 8px; }
  .studioLayout .inspector .option span { font-size: 11px; text-align: center; }
  .studioLayout .inspector .wheelCatalog { grid-template-columns: minmax(0, 1fr); }
  .studioLayout .inspector .wheelCard { min-height: 70px; height: auto; }

  .rail {
    display: flex;
    flex: 0 0 76px;
    width: 100%;
    min-width: 0;
    min-height: 76px;
    max-height: 76px;
    justify-content: flex-start;
    align-items: stretch;
    gap: 7px;
    padding: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #ffffff1c;
    border-radius: 18px;
    background: #141519d9;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .rail .tool {
    flex: 0 0 66px;
    width: 66px;
    min-width: 66px;
    height: 64px;
    min-height: 64px;
    padding: 5px 3px;
    gap: 5px;
    border-radius: 13px;
    font-size: 10px;
    scroll-snap-align: start;
  }
  .rail .tool svg { width: 23px; height: 23px; }

  #globalNav,
  #globalNav.compact {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: calc(7px + var(--mobile-safe-bottom));
    width: calc(100% - 28px);
    max-width: 440px;
    min-height: 62px;
    padding: 5px;
    gap: 3px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: #26272cE8;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  #globalNav > button { min-width: 0; padding: 6px 3px; gap: 3px; }
  #globalNav > button svg { width: 22px; height: 22px; }
  #globalNav > button span { font-size: 10px; line-height: 13px; max-height: 13px; }
  #globalNav.compact > button span { max-height: 0; opacity: 0; }
  .toast { bottom: calc(82px + var(--mobile-safe-bottom)); max-width: calc(100vw - 32px); white-space: normal; text-align: center; }
}

/* V1.1.7: refine portrait-phone workspace composition and compact controls. */
@media (max-width: 700px) and (orientation: portrait) {
  /* The car is optically centered in the usable area to the right of the history pill. */
  .studioLayout .stage { overflow: hidden; }

  /* Remove the empty close-button strip; selecting the active rail item closes the panel. */
  
  .studioLayout .inspector > .fixedConfigHeader { padding-top: 10px; }

  /* Narrower adjustment tracks leave more breathing room at both sides. */
  .studioLayout .inspector .stanceTrack { width: 86%; margin-inline: auto; }
  .studioLayout .inspector #options input[type="range"]:not(.stanceTrack input) {
    display: block;
    width: 86%;
    margin-inline: auto;
  }
  .studioLayout .inspector .slider { width: 86%; margin: 12px auto 0; }

  /* Slightly tighter category tiles reveal half of the next item as a swipe cue. */
  .rail {
    gap: 4px;
    padding: 4px;
    scroll-padding-inline: 4px;
  }
  .rail .tool {
    flex: 0 0 62px;
    width: 62px;
    min-width: 62px;
    padding-inline: 2px;
    gap: 4px;
  }

  /* Compact navigation truly collapses in height, not just its labels. */
  #globalNav.compact {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 3px 5px;
    gap: 2px;
  }
  #globalNav.compact > button {
    min-height: 42px;
    padding: 3px;
    gap: 0;
  }
  #globalNav.compact > button svg { width: 20px; height: 20px; flex: 0 0 20px; }
  #globalNav.compact > button span {
    display: block;
    line-height: 0;
    max-height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
  }
}

/* Short landscape phones: keep the car and inspector side by side. */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  #build.workspace { padding: 8px 10px 58px; gap: 8px; }
  .studioLayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); grid-template-rows: minmax(0, 1fr); gap: 8px; }
  .panel-open .studioLayout { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .85fr); }
  .studioLayout .viewport { min-height: 0; height: 100%; }
  .studioLayout .inspector { position: relative !important; inset: auto !important; width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: none !important; }
  .panel-open .studioLayout .inspector { overflow: auto; }
  .rail { min-height: 62px; max-height: 62px; flex: 0 0 62px; }
  .rail .tool { height: 52px; min-height: 52px; flex-basis: 58px; min-width: 58px; }
  #globalNav, #globalNav.compact { bottom: 6px; min-height: 48px; width: min(300px, 48vw); }
  #globalNav > button { padding: 3px; }
  #globalNav > button svg { width: 18px; height: 18px; }
  #globalNav > button span { display: none; }
}

/* V1.1.5: catalog wheel transition remains below persistent bars. */
.globalNav{z-index:8}
.top{z-index:9}
.wheelOutgoing{pointer-events:none}


/* V1.1.10: compact mobile navigation footprint and remove touch highlight. */
@media (max-width: 700px) and (orientation: portrait) {
  #globalNav.compact {
    width: min(260px, calc(100% - 112px));
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 2px 4px;
    gap: 2px;
  }
  #globalNav.compact > button {
    min-height: 36px;
    padding: 2px;
    gap: 0;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
  }
  #globalNav.compact > button svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
  }
}
#globalNav > button,
#globalNav > button:active,
#globalNav > button:focus {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
#globalNav > button:focus:not(:focus-visible) {
  outline: none;
}


/* V1.1.11 baseline: mobile nav compresses vertically only; studio header joins page flow. */
@media (max-width: 700px) and (orientation: portrait) {
  /* Compact state keeps exactly the same horizontal footprint and center anchor. */
  #globalNav.compact {
    width: calc(100% - 28px);
    max-width: 440px;
    left: 50%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 2px 5px;
    gap: 2px;
  }
  #globalNav.compact > button {
    min-height: 36px;
    padding: 2px 3px;
    gap: 0;
  }
  #globalNav.compact > button svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  /* Let the top workbench toolbar scroll away with the page on phones.
     Desktop and landscape layouts retain their existing fixed-height app shell. */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
  .app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .top,
  .top:has(#buildActions:not([hidden])) {
    position: relative;
    flex: 0 0 58px;
  }
  #build.workspace {
    flex: 0 0 auto;
    min-height: calc(100dvh - 58px);
    overflow: visible;
  }
  .studioLayout {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }
  .studioLayout .viewport {
    flex: 0 0 clamp(220px, 34dvh, 370px);
  }
  .panel-open .studioLayout .inspector {
    flex: 0 0 auto;
    height: auto !important;
    min-height: 125px !important;
    max-height: none !important;
    overflow: visible;
  }
}
