:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #1b1c20;
  --ink: #f1f0ed;
  --muted: #98999f;
  --line: #36373c;
  --orange: #f08322;
  font-family: "Arial", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
}
header {
  height: 86px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  border-bottom: 1px solid #ffffff12;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand-number {
  color: var(--orange);
  margin-left: 4px;
}
.brand-mark {
  width: 32px;
  height: 22px;
  background: var(--orange);
  clip-path: polygon(0 6%, 44% 40%, 100% 4%, 69% 72%, 27% 100%);
  margin-right: 10px;
}
.header-label {
  font-size: 13px;
  color: var(--muted);
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.quiet {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 13px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  min-height: calc(100svh - 86px);
}
.showroom {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 52% 40%,
    #292b2e 0%,
    #151619 53%,
    #0e0f11 100%
  );
}
#stage {
  position: absolute;
  inset: 0;
}
#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.scene-top {
  position: absolute;
  top: 30px;
  left: 40px;
  display: flex;
  gap: 9px;
  flex-direction: column;
  pointer-events: none;
}
.scene-name {
  font-size: 16px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.scene-caption {
  position: absolute;
  left: 40px;
  bottom: 130px;
  pointer-events: none;
}
.scene-caption h1 {
  font-size: clamp(25px, 2.5vw, 40px);
  line-height: 1.05;
  letter-spacing: -1.8px;
  font-weight: 500;
  margin: 0 0 12px;
}
.scene-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.viewbar {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.camera-views {
  display: flex;
  background: #ffffff05;
  border: 1px solid #ffffff1c;
  border-radius: 30px;
  padding: 4px;
  backdrop-filter: blur(12px);
}
.camera-views button {
  font-size: 11px;
  background: none;
  border: 0;
  padding: 12px 15px;
  border-radius: 24px;
  white-space: nowrap;
  color: var(--muted);
}
.camera-views .active {
  color: var(--ink);
  background: #ffffff17;
}
.rotate {
  border: 1px solid #ffffff2b;
  border-radius: 50%;
  background: #ffffff05;
  width: 42px;
  height: 42px;
  font-size: 22px;
}
.rotate[aria-pressed="true"] {
  background: var(--orange);
  color: #141414;
  border-color: var(--orange);
}
.gesture {
  position: absolute;
  bottom: 16px;
  left: 40px;
  font-size: 10px;
  color: #77797f;
}
.settings {
  padding: 31px 27px 22px;
  background: var(--panel);
  border-left: 1px solid #ffffff0c;
  display: flex;
  flex-direction: column;
}
.small-brand {
  font-size: 11px;
  color: var(--orange);
}
.settings h2 {
  font-weight: 500;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 12px 0 4px;
}
.control-section {
  border-bottom: 1px solid var(--line);
  padding: 23px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 8px;
}
.section-heading h3 {
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}
.section-heading > span {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #ffffff18;
  background: var(--swatch);
  position: relative;
}
.swatch::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: 50%;
}
.swatch.active::after {
  border-color: var(--orange);
}
.swatch.active:before {
  content: "✓";
  font-size: 11px;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  text-shadow: 0 1px 4px #000;
}
.large .swatch {
  width: 33px;
  height: 33px;
}
.chosen-finish {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 14px;
}
.chosen-finish strong {
  font-size: 13px;
  font-weight: 500;
}
.chosen-finish span {
  font-size: 10px;
  color: var(--muted);
}
.segmented {
  display: flex;
  background: #121316;
  border-radius: 5px;
  padding: 4px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  background: none;
  border: 0;
  border-radius: 3px;
  padding: 9px 7px;
  font-size: 11px;
  color: var(--muted);
}
.segmented button.active {
  background: #34353a;
  color: var(--ink);
}
.model-options button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.model-options small {
  font-size: 9px;
  color: var(--muted);
}
.rim-designs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.rim-designs button {
  border: 1px solid transparent;
  border-radius: 5px;
  background: #121316;
  padding: 11px 4px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  color: var(--muted);
}
.rim-designs button.active {
  border-color: var(--orange);
  color: var(--ink);
}
.wheel-icon {
  display: block;
  width: 38px;
  height: 38px;
  border: 3px solid #83858d;
  border-radius: 50%;
  background: repeating-conic-gradient(#8a8d95 0 5deg, transparent 5deg 36deg);
  position: relative;
  box-shadow: inset 0 0 0 2px #24262b;
}
.wheel-icon:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid #b5b7bd;
  background: #34363c;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.spokes-split {
  background: repeating-conic-gradient(
    #8a8d95 0 4deg,
    transparent 4deg 10deg,
    #8a8d95 10deg 14deg,
    transparent 14deg 72deg
  );
}
.spokes-five {
  background: repeating-conic-gradient(
    #8a8d95 0 12deg,
    transparent 12deg 72deg
  );
}
.settings-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 15px 16px;
  background: var(--orange);
  color: #18130e;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.primary span {
  font-size: 16px;
}
.settings-bottom p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 14px 0 0;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #16171af0;
  z-index: 10;
}
.loading p {
  font-size: 13px;
  color: #bbb;
}
.loading progress {
  width: 150px;
  accent-color: var(--orange);
  height: 3px;
  border: 0;
}
.loading-mark {
  width: 40px;
  height: 28px;
  background: var(--orange);
  clip-path: polygon(0 6%, 44% 40%, 100% 4%, 69% 72%, 27% 100%);
}
[hidden] {
  display: none !important;
}
.error {
  position: absolute;
  inset: 30%;
  padding: 20px;
  background: #292929;
  z-index: 12;
}
dialog {
  border: 1px solid #3b3c41;
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 30px;
  max-width: 510px;
  font-size: 14px;
  line-height: 1.7;
}
dialog::backdrop {
  background: #000a;
}
dialog a {
  color: var(--orange);
}
.close {
  float: right;
  border: 0;
  background: none;
  font-size: 25px;
}
@media (min-width: 1500px) {
  main {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
  .settings {
    padding: 38px 36px;
  }
  .control-section {
    padding: 28px 0;
  }
  .settings h2 {
    font-size: 32px;
  }
}
@media (max-width: 850px) {
  header {
    height: 68px;
    padding: 0 20px;
    gap: 15px;
  }
  .brand {
    font-size: 19px;
  }
  .header-label {
    padding-left: 15px;
    font-size: 11px;
  }
  .quiet {
    display: none;
  }
  main {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .showroom {
    height: 63svh;
    min-height: 470px;
  }
  .settings {
    padding: 23px 22px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .settings-heading {
    display: none;
  }
  .scene-top {
    top: 22px;
    left: 22px;
  }
  .scene-caption {
    bottom: 112px;
    left: 22px;
  }
  .scene-caption h1 {
    font-size: 27px;
  }
  .scene-caption p {
    display: none;
  }
  .viewbar {
    left: 18px;
    right: 18px;
    bottom: 40px;
    gap: 8px;
  }
  .camera-views button {
    font-size: 10px;
    padding: 11px 10px;
  }
  .gesture {
    left: 22px;
    bottom: 8px;
    font-size: 9px;
  }
  .rotate {
    width: 37px;
    height: 37px;
    flex: 0 0 auto;
  }
  .control-section {
    padding: 19px 0;
  }
  .settings-bottom {
    padding-top: 22px;
  }
  .model-options button {
    align-items: center;
  }
  .settings h2 {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media (max-width: 370px) {
  .camera-views button {
    padding: 10px 8px;
    font-size: 9px;
  }
  .brand {
    font-size: 18px;
  }
  .header-label {
    font-size: 10px;
  }
}

.scene-caption {
  display: none;
}

.model-summary p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.model-summary .section-heading {
  margin-bottom: 8px;
}
@media (max-width: 850px) {
  .model-summary {
    display: none;
  }
  .gesture {
    max-width: calc(100% - 44px);
    line-height: 1.5;
  }
  .showroom {
    min-height: 450px;
  }
}

button:disabled {
  cursor: progress;
  opacity: 0.55;
}
.error {
  inset: 35% 15%;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.error button {
  display: block;
  margin-top: 14px;
  padding: 10px 18px;
  background: var(--orange);
  border: 0;
  border-radius: 4px;
  color: #111;
}
.camera-views button {
  min-height: 38px;
}
@media (max-width: 850px) {
  .swatch {
    width: 36px;
    height: 36px;
  }
  .large .swatch {
    width: 38px;
    height: 38px;
  }
  .segmented button {
    min-height: 42px;
  }
  .rim-designs button {
    min-height: 80px;
  }
  .quiet {
    display: block;
    font-size: 11px;
  }
  .header-label {
    display: none;
  }
}
@media (max-width: 850px) {
  main {
    height: calc(100svh - 68px);
    min-height: 0;
    overflow: hidden;
  }
  .showroom {
    flex: 0 0 44svh;
    height: 44svh;
    min-height: 300px;
  }
  .settings {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
  }
  .scene-top {
    top: 16px;
  }
  .viewbar {
    bottom: 35px;
  }
  .gesture {
    bottom: 3px;
    font-size: 8px;
  }
  dialog {
    max-width: calc(100vw - 28px);
    max-height: 85svh;
    overflow-y: auto;
  }
}
@media (max-width: 850px) and (min-width: 650px) and (max-height: 600px) {
  main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .showroom {
    height: 100%;
    min-height: 0;
  }
  .settings {
    height: 100%;
    padding: 14px 18px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .viewbar {
    left: 12px;
    right: 12px;
  }
  .camera-views button {
    padding: 9px 7px;
    font-size: 9px;
  }
  .scene-top {
    left: 18px;
  }
  .scene-name {
    font-size: 13px;
  }
  .scene-top .muted {
    font-size: 10px;
  }
}
/* Catalog controls extend the accepted studio, keeping the car in view. */
[hidden]{display:none!important}
@media(min-width:851px){main{height:calc(100svh - 86px);min-height:0;overflow:hidden}.showroom{min-height:0}.settings{height:100%;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#555 transparent}}
.custom-body{margin-top:18px}.custom-body summary{font-size:12px;color:var(--ink);cursor:pointer;padding:10px 0}.color-range{display:block;font-size:11px;color:var(--muted);margin:12px 0}.color-range output{float:right}.color-range input{display:block;width:100%;margin:9px 0;accent-color:var(--orange);cursor:pointer}.color-range .rainbow{appearance:none;height:12px;border-radius:8px;background:linear-gradient(90deg,#f44,#ff0,#0f0,#0ff,#00f,#f0f,#f44)}.rainbow::-webkit-slider-thumb{appearance:none;width:20px;height:20px;background:#fff;border:3px solid #333;border-radius:50%}.custom-color-row{display:flex;align-items:end;gap:12px}.custom-color-row>input{width:52px;height:38px;padding:2px;border:1px solid var(--line);background:#111}.custom-color-row label{font-size:10px;color:var(--muted);flex:1}.custom-color-row input[type=text]{width:100%;display:block;margin-top:5px}.settings input[type=text],.settings input[type=search],.settings select{background:#111316;border:1px solid #45474d;color:var(--ink);font:12px Arial,sans-serif;padding:10px;border-radius:5px;min-width:0}.settings input:focus-visible,.settings select:focus-visible,summary:focus-visible{outline:2px solid var(--orange);outline-offset:3px}.settings input[aria-invalid=true]{border-color:#f88}.palette-tabs{margin-bottom:16px}.field-label{display:block;font-size:11px;color:var(--muted);margin:12px 0 6px}#ralSearch,#ralFamily{width:100%;margin-bottom:10px}.ral-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:260px;overflow:auto;padding:3px;scrollbar-width:thin}.ral-list button{min-width:0;border:1px solid #373a41;border-radius:5px;background:#14161a;text-align:left;padding:5px;display:flex;flex-direction:column;gap:5px;font-size:11px}.ral-list button.active{border-color:var(--orange);box-shadow:0 0 0 1px var(--orange)}.ral-chip{height:30px;display:block;width:100%;border-radius:3px}.ral-list small{font-size:9px;color:#aaa;line-height:1.25;min-height:23px;overflow-wrap:anywhere}.catalog-caption{font-size:10px;line-height:1.5;color:var(--muted);margin:10px 0 0}.catalog-filters{display:flex;flex-wrap:wrap;gap:5px;margin:12px 0}.catalog-filters button{padding:7px 9px;border:1px solid #42444b;background:#121316;border-radius:15px;font-size:10px;color:var(--muted)}.catalog-filters button.active{color:#fff;border-color:var(--orange)}.design-name{font-size:12px;margin:0;color:#ddd}.rim-designs{max-height:350px;overflow:auto;scrollbar-width:thin;padding:3px}.rim-designs svg{width:52px;height:52px;display:block}.rim-designs button{min-height:94px;justify-content:start}.rim-designs button span{line-height:1.3}.camera-views{flex-wrap:wrap}.viewbar{max-width:calc(100% - 60px)}
@media(max-width:850px){.viewbar{max-width:calc(100% - 28px)}.camera-views button{padding:8px 6px;font-size:9px}.rim-designs{max-height:300px}.custom-body summary{padding:12px 0}}

.model-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Photo preview is an additional mode of the existing studio. */
.studio-mode-tabs{margin:0 0 13px;gap:5px}.studio-mode-tabs button{font-size:12px;min-height:43px}.photo-new{font-size:9px;color:#ffac58;margin-left:6px}.photo-settings{display:none}body[data-studio-mode="photo"] .photo-settings{display:block}body[data-studio-mode="photo"] #modelSection,body[data-studio-mode="photo"] #bodySection,body[data-studio-mode="photo"] .design-section,body[data-studio-mode="photo"] .scene-top,body[data-studio-mode="photo"] .viewbar,body[data-studio-mode="photo"] .gesture,body[data-studio-mode="photo"] #loading,body[data-studio-mode="photo"] #error{display:none!important}
.photo-workspace{position:absolute;inset:0;background:#111214}.photo-heading{position:absolute;left:32px;right:28px;top:27px;display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:2;pointer-events:none}.photo-heading strong{font-size:15px;font-weight:500}.photo-heading span{font-size:10px;color:#a1a3a8}.photo-viewport{position:absolute;inset:70px 20px 110px;overflow:hidden}.photo-viewport canvas,.photo-viewport svg{position:absolute;display:block;touch-action:none}.photo-overlay{overflow:visible;cursor:grab}.photo-overlay.is-brush{cursor:crosshair}.photo-overlay circle{cursor:ew-resize}.photo-empty{position:absolute;z-index:3;inset:90px 30px 60px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(ellipse at center,#20212588,transparent 70%)}.photo-line-icon{font-size:42px;color:#f08322;border:1px solid #514136;border-radius:50%;width:76px;height:76px;display:grid;place-items:center;margin-bottom:24px}.photo-empty h2{font-size:clamp(30px,3.2vw,49px);font-weight:500;letter-spacing:-1.6px;line-height:1.08;margin:0 0 22px}.photo-empty p{font-size:13px;line-height:1.8;color:#a7a8ac;margin:0 0 25px}.photo-empty .primary{width:300px;max-width:100%;justify-content:space-between}.photo-text-button{font-size:11px;border:0;background:transparent;color:#b5b6bb;padding:15px 0;text-decoration:underline;text-underline-offset:4px}.photo-bottom-tools{position:absolute;bottom:43px;left:30px;right:30px;display:flex;align-items:center;justify-content:center;gap:12px;z-index:2}.photo-bottom-tools .segmented{background:#222428}.photo-bottom-tools button{font-size:11px;white-space:nowrap}.photo-outline-button{border:1px solid #47494f;border-radius:5px;background:#1b1c20;color:#d3d4d8;padding:10px 12px}.photo-attribution{position:absolute;left:25px;right:25px;bottom:8px;text-align:center;font-size:9px;color:#777c84}.photo-attribution a{color:#a0a4aa}.photo-upload{width:100%;font-size:12px;padding:13px 14px}.photo-notice{font-size:12px;line-height:1.6;color:#aaaeb6;margin:15px 0}.photo-targets{margin-bottom:14px}.photo-targets:empty{display:none}.photo-targets button{font-size:11px}.photo-editor{border-top:1px solid #393b40;border-bottom:1px solid #393b40;padding:12px 0}.photo-editor summary{font-size:12px;cursor:pointer;min-height:22px}.photo-editor p{font-size:11px;line-height:1.6;color:#a5a8ad}.photo-small-actions{display:flex;gap:9px;margin:12px 0}.photo-small-actions button{flex:1;font-size:10px;border:1px solid #44464c;border-radius:4px;background:#15171a;padding:10px 6px}.photo-small-actions .active{border-color:var(--orange);color:#ffb15f}.photo-editor .color-range{font-size:10px}button:disabled{cursor:default;opacity:.45}
@media(max-width:850px){.studio-mode-tabs{margin:0 0 4px}.photo-heading{top:17px;left:16px;right:16px}.photo-heading strong{font-size:12px}.photo-heading span{font-size:8px}.photo-viewport{inset:46px 8px 82px}.photo-empty{inset:35px 18px 24px}.photo-line-icon{display:none}.photo-empty h2{font-size:29px;letter-spacing:-1px;margin-bottom:12px}.photo-empty p{font-size:10px;line-height:1.6;margin-bottom:16px}.photo-empty .primary{min-height:40px;font-size:11px;width:250px;padding:12px}.photo-empty .photo-text-button{padding:10px}.photo-bottom-tools{left:10px;right:10px;bottom:28px;gap:6px;flex-wrap:wrap}.photo-bottom-tools button{font-size:9px;padding:8px}.photo-attribution{font-size:7px;bottom:4px;margin:0}.photo-heading span{max-width:160px;text-align:right}.photo-editor p{max-width:38em}.photo-upload{font-size:12px}body[data-studio-mode="photo"] .settings-heading{display:none}}
@media(max-width:370px){.photo-bottom-tools{gap:4px}.photo-bottom-tools button{font-size:8px;padding:7px}.photo-empty h2{font-size:25px}.photo-heading span{font-size:7px}}

.photo-adjustments{display:none}body[data-studio-mode="photo"] .photo-adjustments{display:block}body[data-studio-mode="photo"] .settings-heading{display:none}body[data-studio-mode="photo"] #photoSettings{padding-top:16px;padding-bottom:16px}body[data-photo-loaded="true"] #photoSettings .section-heading{display:none}body[data-photo-loaded="true"] .photo-upload{background:#23252a;color:#ededee;border:1px solid #45474c;padding:10px 12px;font-size:11px}body[data-photo-loaded="true"] .photo-notice{font-size:11px;margin:12px 0}.photo-adjustments .photo-editor{border:0;padding:0}.photo-adjustments .photo-text-button{padding:10px 0}.photo-adjustments .catalog-caption{margin:8px 0 0}

@media(max-width:649px){body[data-studio-mode="photo"] .showroom{flex:0 0 clamp(270px,36svh,320px);height:clamp(270px,36svh,320px);min-height:270px}}
