:root {
  color-scheme: light;
  --accent: #f35b00;
  --accent-dark: #d94f00;
  --ink: #211f1c;
  --muted: #68625c;
  --paper: #ffffff;
  --surface: #ffffff;
  --line: #dedad2;
  --gray-board: #ac855a;
  --site-logo-size: 26px;
  --site-nav-size: 14px;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { scrollbar-gutter: stable; }
html, body { min-height: 100%; margin: 0; }
body { overflow: auto; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 16px; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

/* Desktop foundation; studio-responsive.css adapts smaller screens. */
.studio-app { min-width: 1000px; min-height: 100svh; background: var(--surface); }
.studio-header {
  position: relative; z-index: 20; height: 97px;
  border-top: 2px solid #4d433b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--accent);
}
.studio-header-inner {
  width: min(1240px, 100% - 32px); min-height: 94px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  flex: 0 0 auto; padding-left: 8px; color: #ffffff;
  font-family: "Arial Black", Arial, sans-serif; font-size: var(--site-logo-size);
  font-weight: 400; line-height: 1; text-decoration: none; white-space: nowrap;
}
.brand-main, .brand-domain { font-weight: inherit; }
.brand-light { font-family: var(--font-body); font-weight: 500; }
.studio-nav { display: flex; align-items: center; height: 94px; }
.studio-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 94px; min-width: 128px; padding: 0 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.25); color: #ffffff;
  font-size: var(--site-nav-size); font-weight: 400; line-height: 1.45;
  text-decoration: none; transition: background 0.2s ease;
}
.studio-nav a:hover, .studio-nav a:focus-visible { background: rgba(255, 255, 255, 0.14); outline: none; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "viewer" "config"; }
.viewer {
  grid-area: viewer; position: relative; width: min(1240px, 100% - 32px);
  height: clamp(420px, calc(100svh - 340px), 900px); margin-inline: auto;
  overflow: hidden; background: var(--surface); isolation: isolate;
}
#sceneCanvas {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  cursor: grab; outline: none; touch-action: none;
}
#sceneCanvas:active { cursor: grabbing; }
#sceneCanvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.viewer.is-flat #sceneCanvas { clip-path: inset(80px 24px 24px 186px); }
.view-toggle {
  position: absolute; z-index: 6; left: 8px; bottom: 20px;
  display: grid; grid-template-rows: 80px 22px; gap: 2px;
  width: 162px; height: 120px; padding: 7px;
  border: 1px solid var(--line); border-radius: 4px;
  background: #ffffff; color: var(--ink); font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.view-toggle img { display: block; width: 100%; height: 80px; object-fit: contain; }
.view-toggle span { line-height: 22px; }
.view-toggle:hover { border-color: var(--accent); }
.loading-state {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 32px;
  background: var(--surface); color: var(--muted); font-size: 14px; text-align: center;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.loading-state.is-hidden { visibility: hidden; opacity: 0; }
.loading-state.is-error { color: #9e2c20; }
.loading-mark {
  width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: loading-spin 720ms linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
.segment-button:focus-visible, .version-button:focus-visible, .view-toggle:focus-visible, input:focus-visible {
  outline: 3px solid rgba(243, 91, 0, 0.3); outline-offset: 2px;
}
.lid-control {
  position: absolute; z-index: 6; top: 17.6%; right: var(--lid-control-right, 63.5px); height: 64.8%; width: 42px;
  display: flex; flex-direction: column; align-items: center;
}
.lid-control.is-hinting::after {
  content: ""; position: absolute; left: calc(50% - 8px); bottom: 0;
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  outline: 1.5px solid transparent;
  pointer-events: none; animation: lid-handle-pulse 3.2s cubic-bezier(0.4, 0.14, 0.3, 1) infinite;
}
@keyframes lid-handle-pulse {
  0% {
    transform: scale(1); outline-offset: 1px; outline-color: rgba(243, 91, 0, 0);
    box-shadow: 0 0 0 0 rgba(243, 91, 0, 0), 0 1px 3px rgba(33, 31, 28, 0.06);
  }
  24% {
    transform: scale(1.22); outline-offset: 4px; outline-color: rgba(243, 91, 0, 0.50);
    box-shadow: 0 0 0 4px rgba(243, 91, 0, 0.20), 0 3px 8px rgba(33, 31, 28, 0.16);
  }
  65%, 100% {
    transform: scale(1); outline-offset: 14px; outline-color: rgba(243, 91, 0, 0);
    box-shadow: 0 0 0 14px rgba(243, 91, 0, 0), 0 1px 3px rgba(33, 31, 28, 0.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lid-control.is-hinting::after { display: none; animation: none; }
}
#desktopLidSlider {
  flex: 1; min-height: 0; width: 32px; height: 100%; margin: 0; border: 0;
  writing-mode: vertical-lr; direction: rtl; appearance: none; -webkit-appearance: none;
  background: transparent; cursor: pointer; touch-action: none;
}
#desktopLidSlider::-webkit-slider-runnable-track {
  width: 4px; height: 100%; border-radius: 2px;
  background: linear-gradient(to top, var(--accent) 0 var(--range-progress, 0%), #d8d4ce var(--range-progress, 0%) 100%);
}
#desktopLidSlider::-webkit-slider-thumb {
  width: 16px; height: 16px; margin-left: -6px; border: 0; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(243, 91, 0, 0.12); -webkit-appearance: none;
}
#desktopLidSlider::-moz-range-track, #desktopLidSlider::-moz-range-progress {
  width: 4px; height: 100%; border-radius: 2px; background: #d8d4ce;
}
#desktopLidSlider::-moz-range-progress { background: var(--accent); }
#desktopLidSlider::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--accent); }
.viewer-heading {
  position: absolute; z-index: 5; top: 24px; left: 8px;
  width: min(360px, calc(100% - 110px)); pointer-events: none;
}
.section-eyebrow {
  margin: 0 0 6px; color: var(--accent-dark);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
}
h1 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.config-panel {
  grid-area: config; display: grid; grid-template-columns: 162px minmax(0, 1fr);
  gap: 32px; width: min(1240px, 100% - 32px); margin-inline: auto;
  padding: 24px 8px 28px; border-top: 1px solid var(--line); background: var(--paper);
}
.field-label { margin: 0 0 16px; color: #4c4741; font-size: 15px; font-weight: 600; }
.material-control { display: grid; gap: 8px; }
.segment-button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--paper); font-weight: 600; cursor: pointer;
}
.segment-button.is-active { border-color: var(--accent); background: var(--accent); color: #ffffff; }
.material-swatch {
  flex: 0 0 auto; width: 18px; height: 18px; border: 1px solid #b8b2a9; border-radius: 2px;
}
.white-swatch { background: #f7f5f0; }
.gray-swatch { background: var(--gray-board); }
.versions-section { min-width: 0; }
.version-control { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.version-button {
  display: grid; grid-template-rows: 80px 36px; align-items: center; gap: 5px;
  width: 100%; min-width: 0; height: 135px; padding: 5px; border: 2px solid transparent; border-radius: 4px;
  background: transparent; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.version-thumbnail {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
}
.version-button span { line-height: 1.2; overflow-wrap: anywhere; }
.version-button:hover { border-color: var(--line); }
.version-button.is-active { border-color: var(--accent); color: var(--accent-dark); }
noscript {
  position: fixed; inset: 0; z-index: 100; display: grid; padding: 30px;
  place-items: center; background: #ffffff; color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important; transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
  }
}
