/* Circuit-specific controls use the shared workshop palette and typography. */
* { box-sizing: border-box; }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; top: -80px; left: 16px; padding: 12px; background: var(--surface); z-index: 30; }
.skip-link:focus { top: 12px; }
.site-actions { gap: 8px 16px; }
#collection-count { padding: 2px 6px; background: var(--soft); font: 11px var(--mono); }
main { max-width: 1680px; margin: auto; padding: 0 24px; }
.intro { padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1 { font: 700 clamp(28px, 3vw, 38px)/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: 0 0 8px; text-wrap: balance; }
.intro p { margin: 0; color: var(--muted); line-height: 1.5; }
.button { min-height: 44px; padding: 10px 16px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button svg { width: 18px; height: 18px; }
.secondary { background: var(--surface); border: 1px solid var(--line); }
.secondary:hover { border-color: var(--ink); }
.primary { background: var(--action); color: var(--on-fill); }
.primary:hover { background: #ad3b1d; }
.studio { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.builder, .preview-card, .track-details { background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.circuit-selection, .tab-panel, .builder-footer { padding: 20px; }
.section-label, legend, .control-title label, .control-group > label, .library-label { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.section-label { display: block; color: var(--muted); margin-bottom: 12px; }
.circuit-picker { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0; text-align: left; gap: 12px; }
.flag { font-size: 25px; line-height: 1; flex-shrink: 0; }
.circuit-picker strong { display: block; font-weight: 600; margin-bottom: 4px; }
.circuit-picker small { color: var(--muted); font-size: 12px; }
.circuit-picker > svg { margin-left: auto; width: 16px; height: 16px; }
.builder-tabs { display: flex; border-block: 1px solid var(--line); padding: 0 8px; }
.builder-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-height: 52px; padding: 8px 4px; color: var(--muted); font-size: 12px; border-bottom: 2px solid transparent; }
.builder-tabs button span { width: 20px; height: 20px; border: 1px solid var(--line); display: grid; place-items: center; font: 11px var(--mono); }
.builder-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--action); }
.builder-tabs button[aria-selected=true] span { background: var(--ink); border-color: var(--ink); color: var(--on-fill); }
.tab-panel { padding-bottom: 0; }
.panel-heading h2 { font: 600 23px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 6px; }
.panel-heading p { font-size: 12px; color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { width: 100%; margin-bottom: 10px; padding: 0; display: flex; justify-content: space-between; gap: 8px; }
legend span { color: var(--muted); text-transform: none; letter-spacing: 0; }
.style-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.style-option { padding: 8px 3px 10px; border: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12px; background: var(--surface); }
.style-option svg { display: block; margin: auto; width: 64px; height: 48px; }
.style-option.selected, .shape-options button.selected { border-color: var(--ink); background: var(--soft); color: var(--ink); }
.style-option:hover, .shape-options button:hover { border-color: var(--ink); }
.style-description { display: flex; gap: 7px; align-items: flex-start; color: var(--muted); line-height: 1.5; margin: -8px 0 20px; }
.style-description svg { width: 16px; height: 16px; margin-top: 2px; }
.style-description p { font-size: 12px; margin: 0; }
.control-group { margin-bottom: 22px; }
.control-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.control-group > label { display: block; margin-bottom: 10px; }
.control-title output { padding: 5px 7px; background: var(--soft); font: 12px var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 11px; text-align: right; }
.range-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
input[type=range] { appearance: none; display: block; width: 100%; height: 44px; margin: 0; background-position: center; background-size: 100% 4px; background-repeat: no-repeat; touch-action: pan-y; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; background: var(--action); border: 3px solid var(--line); box-shadow: 0 0 0 1px var(--action); border-radius: 50%; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; background: var(--action); border: 3px solid var(--line); border-radius: 50%; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; width: 100%; min-height: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; padding: 8px 32px 8px 10px; font-size: 12px; color: var(--ink); cursor: pointer; }
.select-wrap svg { position: absolute; right: 10px; top: 15px; width: 14px; height: 14px; pointer-events: none; }
.next-step { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 0 20px; font-size: 12px; }
.next-step:hover { text-decoration: underline; }
.next-step svg { width: 16px; height: 16px; }
.back-arrow { transform: rotate(180deg); }
.builder-footer { border-top: 1px solid var(--line); background: var(--paper); }
.model-size { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.model-size > span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.model-size strong { display: block; font: 500 12px/1.6 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.model-size .size-badge { margin-left: auto; font: 11px var(--mono); white-space: nowrap; }
.builder-footer .button { width: 100%; font-size: 13px; }
.button-arrow { margin-left: auto; }
.builder-footer p { text-align: center; font-size: 11px; color: var(--muted); margin: 10px 0 0; }
.manufacturing-check { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; font-size: 12px; }
.manufacturing-check small { font-size: 11px; line-height: 1.6; color: var(--muted); }
.fit-warning { color: var(--warning); }
.manufacturing-check button { align-self: flex-start; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); }
.material-hint, .detail-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-note { padding: 0 20px 12px; margin: 0; }
.preview-column { min-width: 0; }
.preview-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; gap: 16px; }
.track-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.track-heading > div { min-width: 0; }
.track-heading h2 { font: 600 27px/1.15 var(--display); margin: 0 0 6px; overflow-wrap: anywhere; }
.track-heading p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.location-dot { margin: 0 5px; }
.view-switch { display: flex; background: var(--soft); border: 1px solid var(--line); padding: 3px; flex-shrink: 0; }
.view-switch button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.view-switch button.selected { background: var(--ink); color: var(--on-fill); }
.view-switch svg { width: 16px; height: 16px; }
.viewport { position: relative; height: 460px; background: var(--scene); overflow: hidden; }
.preview-status { position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); z-index: 2; }
.preview-status > span:first-child { width: 6px; height: 6px; background: var(--action); }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.icon-button:hover { background: var(--soft); }
.reset-camera { position: absolute; top: 8px; right: 10px; z-index: 2; }
#scene { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.preview-toolbar { position: absolute; bottom: 16px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 2; }
.zoom-controls { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); }
.zoom-controls button { width: 40px; min-height: 40px; font-size: 20px; }
.zoom-controls span { font: 11px var(--mono); padding: 0 4px; }
.print-finish { background: var(--surface); padding: 10px; font-size: 12px; }
#view-instruction { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
#view-instruction svg { width: 14px; height: 14px; }
.compass { position: absolute; bottom: 78px; right: 28px; display: flex; flex-direction: column; align-items: center; color: var(--muted); font: 11px var(--mono); pointer-events: none; }
.compass svg { width: 30px; height: 30px; stroke: none; }
.preview-layers { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 12px; }
.preview-layers > span { display: flex; align-items: center; gap: 7px; margin-right: auto; }
.preview-layers label { display: flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer; }
.preview-layers input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }
.print-preview-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--paper); font-size: 11px; color: var(--muted); }
.print-preview-note > span:first-child { display: flex; align-items: center; gap: 6px; }
.print-preview-note svg { width: 16px; height: 16px; }
.track-details { margin-top: 20px; }
.track-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 20px; gap: 16px; }
.track-stats span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.track-stats svg { width: 14px; height: 14px; }
.track-stats strong { display: block; font: 600 28px var(--display); margin-top: 8px; font-variant-numeric: tabular-nums; }
.track-stats small { font: 12px var(--body); color: var(--muted); margin-left: 3px; }
.elevation-profile { padding: 16px 20px; border-top: 1px solid var(--line); }
.profile-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.profile-heading > span:last-child { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.profile-heading small { font-size: 11px; }
#elevation-chart { width: 100%; height: 70px; display: block; stroke-width: 1.5; }
.profile-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 24px 0; gap: 16px; }
.page-footer > span:nth-child(2) { display: flex; align-items: center; gap: 8px; }
.page-footer button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; }
.page-footer button:hover { text-decoration: underline; }
.search-field { display: flex; align-items: center; border: 1px solid var(--line); min-height: 44px; padding: 0 10px; gap: 8px; }
.search-field input { border: 0; width: 100%; min-width: 0; min-height: 42px; color: var(--ink); background: none; font-size: 12px; }
.library-label { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); margin: 20px 0 8px; }
.circuit-list { max-height: 360px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--muted) var(--soft); }
.circuit-row { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; padding: 12px 8px; }
.circuit-row.selected { background: var(--soft); border-color: var(--line); }
.circuit-row:hover { background: var(--soft); }
.circuit-row .flag { font-size: 21px; }
.circuit-row strong { font-size: 13px; display: block; font-weight: 500; }
.circuit-row small { display: block; font-size: 11px; margin-top: 4px; color: var(--muted); }
.circuit-row svg { margin-left: auto; width: 16px; height: 16px; }
.empty-search { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 24px 0; }
.swatches { display: flex; gap: 5px; }
.swatch { height: 44px; width: 44px; border: 5px solid var(--line); background: var(--swatch); border-radius: 50%; }
.swatch.selected { outline: 1px solid var(--ink); outline-offset: -2px; }
.shape-options { display: flex; gap: 8px; }
.shape-options button { flex: 1; font-size: 12px; color: var(--muted); padding: 12px 4px; border: 1px solid var(--line); }
.shape-options button span { display: block; border: 1.5px solid currentColor; height: 20px; width: 30px; margin: 0 auto 10px; }
.shape-options .shape-square { width: 20px; }
.shape-options .shape-circle { width: 20px; border-radius: 50%; }
.toggle-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; cursor: pointer; position: relative; }
.toggle-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.toggle-row input { position: absolute; opacity: 0; right: 0; }
.toggle { width: 32px; height: 20px; background: var(--line); margin-left: auto; border-radius: 12px; position: relative; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--surface); border-radius: 50%; }
.toggle-row input:checked + .toggle { background: var(--ink); }
.toggle-row input:checked + .toggle::after { transform: translateX(12px); }
.toggle-row input:focus-visible + .toggle { outline: 2px solid var(--laser); outline-offset: 3px; }
.text-input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 0; padding: 10px; margin-top: 12px; color: var(--ink); font: 12px var(--mono); }
.label-settings p { font-size: 11px; color: var(--muted); margin: 8px 0 20px; line-height: 1.5; }
.scene-loading, #scene-error { position: absolute; left: 10%; right: 10%; top: 40%; text-align: center; color: var(--ink); background: var(--paper); padding: 12px; font-size: 13px; line-height: 1.7; pointer-events: none; }
dialog { border: 1px solid var(--line); border-radius: 0; padding: 24px; width: min(580px, calc(100% - 32px)); max-height: calc(100svh - 40px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #172c3866; }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-top h2 { font: 600 28px var(--display); text-transform: uppercase; margin: 0; }
#modal-content { font-size: 14px; line-height: 1.7; }
#modal-content a { text-decoration: underline; }
#modal-content h3 { font: 600 22px var(--display); margin: 24px 0 6px; }
.download-options { display: grid; gap: 10px; margin: 20px 0; }
.download-option { border: 1px solid var(--line); padding: 16px; display: flex; gap: 14px; text-align: left; align-items: center; width: 100%; }
.download-option:hover { border-color: var(--ink); background: var(--soft); }
.download-option strong { display: block; font-size: 14px; margin-bottom: 4px; }
.download-option small { font-size: 12px; color: var(--muted); }
.download-option > svg:last-child { margin-left: auto; }
.download-summary { background: var(--soft); padding: 14px; font-size: 13px; }
.saved-card { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.saved-card > span:nth-child(2) { min-width: 0; }
.saved-card strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.saved-card small { font-size: 11px; color: var(--muted); }
.saved-card button { min-width: 44px; min-height: 44px; font-size: 12px; padding: 6px; }
.saved-card .load-design { margin-left: auto; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 14px 20px; background: var(--ink-dark); color: var(--on-fill); font-size: 13px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1100px) {
  .studio { grid-template-columns: 310px minmax(0, 1fr); gap: 20px; }
  .preview-header { flex-wrap: wrap; }
  .viewport { height: 420px; }
  #view-instruction, .track-type, .location-dot { display: none; }
  .print-finish { max-width: 60%; }
  .track-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-actions { gap: 8px 12px; }
}
@media (max-width: 860px) {
  main { padding: 0 16px; }
  .intro { padding: 20px 0; align-items: flex-start; }
  .intro p { font-size: 12px; }
  .save-design { font-size: 12px; padding: 8px 10px; flex-shrink: 0; }
  .save-design svg { display: none; }
  .site-actions { justify-content: space-between; }
  .studio { display: flex; flex-direction: column; gap: 0; }
  .builder { width: 100%; order: 1; margin-top: 20px; }
  .preview-column, .preview-card { display: contents; }
  .mobile-preview { position: sticky; top: 0; z-index: 20; width: 100%; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
  .preview-header { flex-wrap: nowrap; padding: 8px 10px; gap: 8px; }
  .track-heading h2 { font-size: 22px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .track-heading .flag, .track-heading p { display: none; }
  .view-switch { padding: 0; }
  .view-switch button { min-height: 44px; padding: 6px; font-size: 11px; }
  .view-switch svg { display: none; }
  .viewport { height: min(34svh, 320px); }
  .preview-status, .print-finish, .compass, #view-instruction, #zoom-level { display: none; }
  .reset-camera { top: 8px; right: 8px; background: var(--surface); }
  .preview-toolbar { left: 8px; right: auto; bottom: 8px; }
  .zoom-controls button { width: 44px; min-height: 44px; }
  .preview-layers, .detail-note, .print-preview-note, .track-details { width: 100%; background: var(--surface); }
  .preview-layers { gap: 0 14px; padding: 8px 12px; }
  .preview-layers > span { width: calc(100% - 58px); }
  .preview-layers .icon-button { order: -1; }
  .preview-layers > span { order: -2; }
  .detail-note, .print-preview-note { padding: 10px 12px; }
  .page-footer > span:nth-child(2) { flex-wrap: wrap; }
}
@media (max-width: 960px) and (max-height: 500px) {
  .mobile-preview { position: static; }
}

/* Dark workshop layout: the model preview on the left, settings on the right.
   The resin model keeps its real color; only the stage around it is dark. */
.circuit-page main { max-width: none; padding: 0; }
.circuit-page .studio { grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; }
.circuit-page .builder { order: 2; }
.circuit-page :is(.builder, .preview-card, .track-details) { border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius-panel); background: var(--surface); }
.circuit-page .preview-card { padding: 10px; }
.circuit-page .track-details { margin-top: 14px; }
.circuit-page .circuit-selection, .circuit-page .tab-panel, .circuit-page .builder-footer { padding: 16px 18px; }
.circuit-page .section-label, .circuit-page legend, .circuit-page .control-title label, .circuit-page .control-group > label, .circuit-page .library-label { color: var(--muted); font: 400 12px/1.4 var(--body); letter-spacing: 0; text-transform: none; }
.circuit-page .builder-tabs { margin: 0 14px 4px; padding: 4px; gap: 4px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; background: var(--field); }
.circuit-page .builder-tabs button { min-height: 32px; padding: 0 4px; border: 0; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 500; }
.circuit-page .builder-tabs button[aria-selected=true] { background: var(--selected); color: #f4f4f2; }
.circuit-page .builder-tabs button span { width: 18px; height: 18px; border-color: var(--line-strong); border-radius: 50%; font-size: 10px; }
.circuit-page .builder-tabs button[aria-selected=true] span { border-color: var(--lime); background: var(--lime); color: var(--on-fill); }
.circuit-page .panel-heading h2 { font: 600 15px/1.3 var(--body); letter-spacing: 0; text-transform: none; }
.circuit-page .panel-heading p { margin-bottom: 16px; }
.circuit-page :is(.style-option, .shape-options button) { border-color: rgba(255, 255, 255, .06); border-radius: 12px; background: #1b1b1e; }
.circuit-page :is(.style-option.selected, .shape-options button.selected) { border-color: var(--lime-line); background: var(--lime-wash); color: var(--ink); }
.circuit-page .control-title output { padding: 0; background: none; color: var(--lime); font: 500 12px var(--mono); }
.circuit-page input[type=range] { height: 44px; border-radius: 4px; }
.circuit-page input[type=range]::-webkit-slider-thumb { width: 16px; height: 16px; border: 0; background: var(--lime); box-shadow: 0 0 0 3px rgba(21, 21, 23, .9); }
.circuit-page input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; background: var(--lime); }
.circuit-page :is(.select-wrap select, .search-field, .text-input) { min-height: 38px; border-color: rgba(255, 255, 255, .08); border-radius: var(--radius-control); background: var(--field); color: var(--ink); }
.circuit-page .search-field input { min-height: 36px; }
.circuit-page .select-wrap svg { top: 12px; }
.circuit-page .circuit-row { margin-bottom: 6px; border-color: rgba(255, 255, 255, .06); border-radius: 12px; background: #1b1b1e; }
.circuit-page .circuit-row.selected { border-color: var(--lime-line); background: var(--lime-wash); }
.circuit-page .circuit-row:hover { border-color: var(--line-strong); background: #1b1b1e; }
.circuit-page .swatches { gap: 10px; }
.circuit-page .swatch { width: 32px; height: 32px; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.circuit-page .swatch.selected { outline: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--lime); }
.circuit-page .toggle { width: 34px; height: 20px; background: var(--selected); }
.circuit-page .toggle::after { top: 2px; left: 2px; width: 16px; height: 16px; background: var(--faint); }
.circuit-page .toggle-row input:checked + .toggle { background: var(--lime); }
.circuit-page .toggle-row input:checked + .toggle::after { background: var(--on-fill); transform: translateX(14px); }
.circuit-page .next-step { color: var(--lime); }
.circuit-page .builder-footer { margin: 0 14px 14px; padding: 14px; border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius-inner); background: var(--field); }
.circuit-page .builder-footer .button { height: 44px; min-height: 0; border-radius: 12px; }
.circuit-page .manufacturing-check button { border-radius: 999px; background: var(--ink); color: var(--on-fill); font-weight: 600; }
.circuit-page .model-size strong { font-size: 14px; }
.circuit-page .preview-header { padding: 4px 8px 14px; }
.circuit-page .track-heading h2 { font: 600 20px/1.2 var(--body); letter-spacing: -.01em; }
.circuit-page .view-switch { gap: 3px; padding: 3px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px; background: var(--field); }
.circuit-page .view-switch button { min-height: 30px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.circuit-page .view-switch button.selected { background: var(--selected); color: #f4f4f2; }
.circuit-page .viewport { height: clamp(420px, calc(100dvh - 420px), 620px); border-radius: var(--radius-inner); background-color: var(--scene); background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 18px 18px; }
.circuit-page .preview-status { color: #c9c9cc; }
.circuit-page .preview-status > span:first-child { border-radius: 50%; background: var(--lime); }
.circuit-page .icon-button { border-radius: 999px; color: var(--ink); }
.circuit-page .reset-camera { width: 36px; height: 36px; top: 14px; right: 14px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(32, 32, 35, .9); }
.circuit-page :is(.zoom-controls, .print-finish) { border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px; background: rgba(20, 20, 22, .82); color: var(--ink); backdrop-filter: blur(8px); }
.circuit-page .zoom-controls { padding: 0 3px; }
.circuit-page .zoom-controls button { width: 30px; min-height: 30px; }
.circuit-page .print-finish { padding: 8px 14px; }
.circuit-page #view-instruction, .circuit-page .compass { color: #a6a6ab; }
.circuit-page .scene-loading, .circuit-page #scene-error { border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; background: #18181b; color: var(--ink); }
.circuit-page .preview-layers { padding: 8px 8px 0; border-top: 0; }
.circuit-page .preview-layers label { gap: 8px; min-height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 999px; background: #1c1c1f; color: #a6a6ab; font-weight: 500; }
.circuit-page .preview-layers label:has(input:checked) { border-color: var(--lime-line); background: rgba(226, 243, 160, .12); color: var(--lime); }
.circuit-page .preview-layers input { width: 14px; height: 14px; accent-color: var(--lime); }
.circuit-page .detail-note { padding: 8px 8px 0; }
.circuit-page .print-preview-note { margin-top: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--line); background: none; }
.circuit-page .track-stats strong { font: 500 24px var(--mono); }
.circuit-page .elevation-profile { border-top-color: var(--line); }
.circuit-page #elevation-chart { color: var(--lime); }
.circuit-page #collection-count { border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--ink); }
.circuit-page dialog { border-color: rgba(255, 255, 255, .08); border-radius: 22px; background: #18181b; color: var(--ink); }
.circuit-page dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.circuit-page .modal-top h2 { font: 600 18px var(--body); text-transform: none; }
.circuit-page #modal-content h3 { font: 600 14px var(--body); }
.circuit-page :is(.download-option, .saved-card) { border-color: rgba(255, 255, 255, .06); border-radius: 12px; background: var(--field); }
.circuit-page .download-option { border: 1px solid rgba(255, 255, 255, .06); }
.circuit-page .download-option:hover { border-color: var(--lime-line); background: var(--field); }
.circuit-page .saved-card { margin-bottom: 8px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .06); }
.circuit-page .download-summary { border-radius: 12px; background: var(--raised); font-family: var(--mono); }
.circuit-page #toast { border-radius: 999px; background: var(--ink); color: var(--on-fill); font-weight: 500; }
.circuit-page .page-footer { padding: 20px 4px; }
@media (max-width: 1100px) {
  .circuit-page .studio { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 860px) {
  .circuit-page main { padding: 0; }
  .circuit-page .builder-tabs button { min-height: 44px; }
  .circuit-page .reset-camera { width: 44px; height: 44px; }
  .circuit-page .zoom-controls button { width: 44px; min-height: 44px; }
  .circuit-page .swatch { width: 44px; height: 44px; }
  .circuit-page .toggle-row { min-height: 48px; }
  .circuit-page .studio { gap: 8px; }
  .circuit-page .builder { margin-top: 0; }
  .circuit-page .mobile-preview { padding: 8px; border-color: rgba(255, 255, 255, .06); border-radius: var(--radius-panel); background: var(--surface); }
  .circuit-page .viewport { height: min(34svh, 320px); }
  .circuit-page .preview-layers, .circuit-page .detail-note, .circuit-page .print-preview-note, .circuit-page .track-details { background: var(--surface); }
  .circuit-page .preview-layers { flex-wrap: wrap; gap: 6px; }
}
