:root{color-scheme:light;--ink:#202d39;--muted:#61707b;--paper:#fff;--page:#edf1f4;--line:#dce3e7;--yellow:#f4c744;--blue:#275bb2;font-family:ui-rounded,"Avenir Next",Avenir,"Segoe UI",sans-serif;font-size:16px}
*{box-sizing:border-box}
body{margin:0;background:var(--page);color:var(--ink)}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;color:inherit}
button:disabled{cursor:default;opacity:.3}
button:focus-visible,a:focus-visible,[role=button]:focus-visible{outline:3px solid var(--blue);outline-offset:5px}
button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.app-header{max-width:1512px;margin:auto;padding:24px 40px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:25px;letter-spacing:-1px;white-space:nowrap;font-weight:550}
.brand strong{font-weight:850}.brand-dot{color:#ba4633}
.brand-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--yellow);border-radius:50%;border:2px solid var(--ink);box-shadow:2px 2px 0 var(--ink)}
.brand-mark svg{width:32px;height:32px;fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.header-actions{display:flex;gap:12px;align-items:center}
.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:11px 20px;border:1.5px solid transparent;border-radius:12px;font-size:.9375rem;font-weight:700;transition:background .15s,transform .15s}
.button:active:not(:disabled),.icon-button:active:not(:disabled){transform:translateY(1px)}
.button-dark{background:var(--ink);color:#fff;box-shadow:0 3px 0 #101e2a}.button-dark:hover:not(:disabled){background:#34485b}
.button-quiet{background:transparent;color:#54636e}.button-quiet:hover{background:#dfe7ec}
.button-outline{background:white;border-color:var(--line);white-space:nowrap}.button-outline:hover{border-color:#8599a7;background:#f5f8fa}
.workshop{max-width:1512px;padding:8px 40px 0;margin:0 auto 24px;display:grid;grid-template-columns:80px minmax(0,1fr);gap:24px}
.step-rail{padding-top:4px;display:flex;align-items:center;flex-direction:column;gap:16px}
.step-button{width:76px;min-height:88px;border:1.5px solid #cbd7df;border-radius:18px;background:white;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;font-size:.875rem;font-weight:800}
.step-button[aria-pressed=true]{border-color:var(--ink);background:var(--yellow);box-shadow:0 3px 0 var(--ink)}
.step-button:hover{border-color:var(--ink)}
.step-button svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.rail-stripes{width:22px;height:46px;background:repeating-linear-gradient(135deg,transparent 0 7px,#c8d3db 7px 10px);border-radius:2px}
.workbench{min-width:0;background:var(--paper);border:1px solid #d4dfe5;border-radius:22px;overflow:hidden;box-shadow:0 12px 34px #273d4d08}
.stage{background:radial-gradient(ellipse at 50% 59%,#fff 10%,#f7fafb 78%,#f1f6f8);padding:24px 32px 18px}
.stage-heading{display:flex;min-height:44px;align-items:center;justify-content:space-between;gap:16px}
.stage-hint{font-size:.9375rem;color:var(--muted);margin:0;line-height:1.5}
.history-controls{display:flex;gap:8px}
.icon-button{display:grid;place-items:center;background:#fff;border:1px solid #d8e1e6;border-radius:11px;width:46px;height:46px}
.icon-button:hover:not(:disabled){background:#e8eff4}
.car-display{--car-height:clamp(250px,calc(100svh - 490px),430px);position:relative;width:min(100%,calc(var(--car-height)*2));aspect-ratio:2/1;max-width:1100px;margin:14px auto 8px;isolation:isolate;overflow:hidden;border-radius:12px;background:white}
.scene-background{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;object-fit:cover}
.car-display:before{content:"";position:absolute;z-index:1;top:88%;left:13.33%;width:73.34%;height:8%;background:radial-gradient(ellipse,#18273433,transparent 70%);pointer-events:none}
.car-display #mini-svg{position:absolute;z-index:2;display:block;height:auto;overflow:visible;touch-action:manipulation}
.car-display #paint [data-panel]{cursor:pointer;outline:none}
.car-display svg[data-step=paint] #paint [data-panel]:hover{filter:brightness(1.08)}
.car-display #paint-base,.car-display #undercarriage,.car-display #windows,.car-display #driver,.car-display #linework-trim,.car-display #wheels,.car-display #decals,.car-display #door-initials{pointer-events:none}
.car-display #wheel-front,.car-display #wheel-rear,.car-display #window-front{pointer-events:visiblePainted;cursor:pointer}
.paint-controls,.driver-controls,.initials-controls,.wheels-controls,.scene-controls{border-top:1px solid var(--line);padding:22px 32px}
.controls-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px}
h2{font-size:1.15rem;letter-spacing:-.3px;margin:0;font-weight:800}
.text-button{display:inline-flex;align-items:center;gap:7px;padding:7px 0;border:0;background:transparent;color:#365d8b;font-size:.875rem;font-weight:700}
.text-button:hover{color:#123e75}.text-button svg{width:18px;height:18px}
.panel-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px}
.panel-button{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 13px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:.875rem;font-weight:650}
.panel-button:hover{background:#f3f6f8}
.panel-button[aria-pressed=true]{background:#eaf1fc;border-color:#275bb2;color:#214e91;box-shadow:inset 0 0 0 .5px #275bb2}
.panel-chip{height:12px;width:12px;flex-shrink:0;border-radius:3px;border:1px solid #0002;background:var(--chip)}
.colour-section{display:flex;align-items:center;justify-content:space-between;gap:26px}
.palette-area{min-width:0;flex:1}.palette-label{display:flex;align-items:baseline;gap:12px;font-size:.875rem;margin-bottom:14px;font-weight:650}.palette-label #colour-name{font-weight:450;color:var(--muted)}
.palette{display:flex;gap:12px;flex-wrap:wrap;padding:3px}
.swatch{width:48px;height:48px;min-width:48px;min-height:48px;border:1px solid #0002;border-radius:50%;background:var(--swatch);padding:0;position:relative;transition:transform .15s;display:grid;place-items:center}
.swatch:hover{transform:translateY(-3px)}
.swatch[aria-pressed=true]{outline:2px solid var(--ink);outline-offset:4px}
.swatch svg{width:20px;height:20px;stroke:var(--tick);stroke-width:2.5;opacity:0}
.swatch[aria-pressed=true] svg{opacity:1}
#paint-all{align-self:flex-end;margin-bottom:0}#paint-all-colour{height:16px;width:16px;border-radius:50%;border:1px solid #0002;background:var(--colour)}
.picture-list{display:grid;grid-template-columns:repeat(var(--choice-columns,3),minmax(0,150px));gap:18px}
#driver-list{--choice-columns:4}#wheel-list{--choice-columns:6}
.picture-card{position:relative;min-height:176px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:2px solid #dce3e7;background:#f3f6f8;border-radius:16px;padding:12px;font-size:1rem;font-weight:750}
.driver-card[data-driver=cat]{background:#fff6df}.driver-card[data-driver=dog]{background:#fceee8}
.driver-card[data-driver=racer]{background:#edf2f8}.driver-card[data-driver=man]{background:#eaf3fa}.driver-card[data-driver=woman]{background:#f3edf8}.driver-card[data-driver=baby]{background:#fff6dd}
.picture-card:hover{border-color:#91a7b7}.picture-card[aria-pressed=true]{border-color:var(--blue);box-shadow:0 0 0 2px #275bb21a}
.picture-card>svg{width:100%;height:124px;fill:none;stroke:none;stroke-width:0}
.choice-tick{position:absolute;right:8px;top:8px;display:grid;place-items:center;background:var(--blue);width:24px;height:24px;border-radius:50%;opacity:0}
.choice-tick svg{width:18px;height:18px;stroke:white;stroke-width:2.5}
.picture-card[aria-pressed=true] .choice-tick{opacity:1}
.scene-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.scene-card{min-height:0;padding:8px 8px 10px;gap:8px;font-size:.875rem}
.scene-card>img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;border-radius:8px}
.initials-entry{display:flex;align-items:center;gap:16px;max-width:440px}
.initials-entry input{width:100%;min-width:0;min-height:64px;border:2px solid #cbd7df;border-radius:13px;padding:10px 18px;background:#fff;color:var(--ink);font:800 1.8rem ui-rounded,"Avenir Next",Avenir,"Segoe UI",sans-serif;letter-spacing:.12em;text-transform:uppercase}
.initials-entry input::placeholder{color:#9baab4;opacity:.65}
.initials-entry input:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.initials-entry .button{min-height:54px;flex-shrink:0}
.error{font-size:.875rem;color:#8c2c24;margin:0;padding:0 32px 20px}
.noscript{margin:24px;text-align:center;color:#8c2c24}
@media(max-width:1100px){#driver-list,#wheel-list{--choice-columns:3}.app-header{padding:22px 24px}.workshop{padding:4px 24px 0;grid-template-columns:66px minmax(0,1fr);gap:16px}.step-button{width:64px;min-height:80px}.stage{padding:24px 25px 17px}.paint-controls,.driver-controls,.initials-controls,.wheels-controls,.scene-controls{padding:22px 25px}.palette{gap:11px}.colour-section{gap:20px}.button-outline{padding:11px 14px}.scene-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.app-header{padding:18px 18px 22px}.brand{font-size:22px;gap:10px}.brand-mark{width:35px;height:35px}.brand-mark svg{width:27px;height:27px}.header-actions{gap:6px}.button{font-size:.875rem;padding:10px 13px;min-height:42px}.button-quiet{padding:8px}.workshop{display:block;padding:0 16px}.step-rail{flex-direction:row;gap:6px;padding:0 0 18px}.step-button{flex:1;min-width:0;flex-direction:column;min-height:76px;border-radius:13px;gap:5px;padding:6px 3px;font-size:.75rem}.step-button svg{width:26px;height:26px}.rail-stripes{display:none}.stage{padding:22px 21px 16px}.stage-hint{font-size:.875rem}.car-display{width:calc(100% + 14px);margin:28px -7px 18px;max-width:none}.paint-controls,.driver-controls,.initials-controls,.wheels-controls,.scene-controls{padding:20px 21px}.panel-list{gap:7px;margin-bottom:23px}.panel-button{padding:7px 10px;min-height:48px}.colour-section{flex-wrap:wrap;gap:20px}.palette-area{flex-basis:100%}.palette{gap:15px}.history-controls{gap:6px}.icon-button{width:44px;height:44px}.workbench{border-radius:17px}.picture-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.picture-card{padding:10px 5px;min-height:150px;gap:4px}.picture-card>svg{height:104px}.choice-tick{width:21px;height:21px;right:5px;top:5px}.scene-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scene-card{padding:7px 7px 9px;min-height:0;font-size:.875rem}}
@media(max-width:400px){.app-header{padding-left:13px;padding-right:13px}.brand{font-size:19px;gap:8px}.header-actions .button-quiet{font-size:.75rem}.button-dark{gap:6px;padding:9px}.button-dark svg{width:17px}.stage,.paint-controls,.driver-controls,.initials-controls,.wheels-controls,.scene-controls{padding-left:17px;padding-right:17px}.workshop{padding:0 10px}.palette{gap:13px}.stage-hint{max-width:230px}.panel-button{font-size:.8125rem}.controls-heading{gap:8px}.text-button{font-size:.8125rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
