:root {
  color-scheme: dark;
  --ink: #f0f3f9;
  --muted: #a2adbe;
  --line: #adc9ff26;
  --paper: #060b14;
  --accent: #b9dcff;
  --slot-surface: #171d27;
  /* Match the main page's warm light spilling from behind opaque panels. */
  --panel-backlight:
    0 1px 3px rgba(255, 239, 194, 0.34),
    0 3px 14px 2px rgba(255, 219, 144, 0.22),
    0 6px 32px 6px rgba(239, 189, 97, 0.12),
    0 12px 56px 10px rgba(239, 180, 84, 0.075),
    0 40px 80px -24px rgba(0, 0, 0, 0.75);
  --panel-edge: rgba(245, 217, 159, 0.32);
  --selected-chip-backlight:
    0 0 4px rgba(255, 239, 194, 0.68),
    0 0 12px 2px rgba(255, 219, 144, 0.44),
    0 0 24px 4px rgba(239, 189, 97, 0.24),
    0 0 36px 6px rgba(239, 180, 84, 0.15);
  background: #03060d;
}
body {
  min-width: 280px;
  background: linear-gradient(180deg, #03060d38, #03060d9e), url('assets/station-deep-space-v1.webp') center top / cover fixed;
}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline-color: var(--accent); }
.site-header { border: 0; max-width: 1440px; padding: 30px 40px; }
.wordmark img { filter: invert(1); mix-blend-mode: screen; width: 168px; max-height: none; }
.site-header .wordmark {
  display: flex;
  align-items: center;
  width: 176px;
  height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 217, 159, 0.42);
  border-radius: 12px;
  background: #10151d;
  box-shadow:
    0 1px 3px rgba(255, 239, 194, 0.45),
    0 3px 10px 2px rgba(255, 219, 144, 0.28),
    0 5px 24px 5px rgba(239, 189, 97, 0.15),
    0 7px 40px 8px rgba(239, 180, 84, 0.08);
}
.site-header .wordmark img { display: block; width: 100%; height: auto; }
.site-header .wordmark:hover {
  border-color: rgba(245, 217, 159, 0.58);
  box-shadow:
    0 1px 3px rgba(255, 239, 194, 0.55),
    0 3px 12px 2px rgba(255, 219, 144, 0.34),
    0 5px 28px 5px rgba(239, 189, 97, 0.19),
    0 7px 44px 8px rgba(239, 180, 84, 0.1);
}
.help-link, .text-button { font-size: .8125rem; }
.text-button:hover { color: #fff; }
.atelier {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 1fr);
  gap: 0 56px;
  max-width: 1400px;
  margin: 30px auto 90px;
  padding: 0 40px;
}
.configuration { grid-column: 2; grid-row: 1; padding: 0; min-width: 0; }
.purchase-area { grid-column: 2; grid-row: 2; min-width: 0; }
.visual-column { grid-column: 1; grid-row: 1 / span 2; top: 32px; min-width: 0; }
.product-heading { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-bottom: 26px; }
.product-heading .eyebrow { grid-column: 1; margin: 0; font-size: .75rem; letter-spacing: .16em; }
.product-heading h1 { grid-column: 1; font-size: clamp(1.75rem, 2.4vw, 2.625rem); letter-spacing: -.04em; }
.product-heading .intro { grid-column: 2; grid-row: 1 / span 2; margin: 0 0 2px; font-size: .8125rem; line-height: 1.8; }
.chooser-heading { justify-content: flex-end; margin-bottom: 12px; }
.chooser-heading h2 { font-size: .875rem; }
.slot-rail {
  --slot-width: 64px;
  --slot-reserve: 64px;
  overflow-x: auto;
  border: 1px solid #aac9ff35;
  border-radius: 16px;
  background: #080d16ed;
  padding: 10px;
  box-shadow: 0 0 28px #88b8ff13, 0 12px 36px #0008, inset 0 1px 0 #d5e7ff12;
  scrollbar-width: thin;
  scrollbar-color: #526580 #080d16;
  scroll-padding: 12px;
}
.slots {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: var(--slot-width);
  justify-content: start;
  width: max-content;
  min-width: 100%;
  gap: 6px;
  padding: 0 var(--slot-reserve) 0 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.slot {
  background: var(--slot-surface);
  border: 1px solid #ffffff08;
  border-radius: 8px;
  padding: 11px 2px 9px;
  gap: 9px;
  color: #b7c2d2;
  transition: border-color .18s, box-shadow .18s;
}
.slot[data-active=true] {
  background: var(--slot-surface);
  border-color: #f5d99fb3;
  color: #e0f0ff;
  box-shadow: inset 0 0 14px #ffdb9012, 0 0 12px #efbd6120;
}
.slot-label { font-size: .75rem; line-height: 1.3; text-align: center; }
.slot-color { font-size: .6875rem; line-height: 1.4; color: #d4deeb; }
.slot-control { min-height: 46px; }
.slot-controls { gap: 12px; }
.chip-window { width: 40px; height: 40px; position: relative; perspective: 160px; isolation: isolate; }
.slot-control[aria-pressed=true] .chip-window { outline: none; }
.chip { position: relative; background-image: none !important; box-shadow: none; }
.chip-face { position: absolute; inset: 0; background: var(--color); background-image: var(--chip-image); background-size: cover; background-position: center; border-radius: inherit; backface-visibility: hidden; }
.reel-strip { position: absolute; inset: 0; transform-origin: center; pointer-events: none; }
.reel-strip .chip-face { position: relative; display: block; height: 100%; width: 100%; }
.slot.is-rolling { box-shadow: 0 0 18px #ffdb9038, inset 0 0 16px #efbd6112; }
#slot-metal .chip-window { box-shadow: none; border-radius: 50%; }
#slot-metal .chip { background: transparent; }
#slot-metal .chip-face {
  background-color: transparent;
  background-size: 631.25%;
  background-position: 78.529412% 78.627451%;
  box-shadow: none;
}
.fine-options { border-top: 0; margin-top: 8px; }
.fine-toggle { font-size: .875rem; padding: 17px 22px 17px 0; }
.fine-toggle span { font-size: .75rem; margin-left: 7px; color: var(--muted); }
.fine-content { font-size: .875rem; }
.switch-row { gap: 16px; min-height: 32px; }
.switch-row input { width: 20px; height: 20px; accent-color: #aacdf6; }
.field-note, .field-error { font-size: .75rem; }
.field-error { color: #ffaaa5; }
select, textarea { background: #111b2b; border-color: #b9d1ff38; color: var(--ink); }
.palette-panel { padding: 20px 0 24px; min-height: 0; }
.palette-heading { justify-content: space-between; align-items: baseline; flex-wrap: nowrap; gap: 10px; margin-bottom: 10px; }
.palette-heading-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.palette-heading h3 { font-size: .875rem; }
#paletteSelection, .palette-guide { font-size: .75rem; }
#paletteSelection { color: #e9d6b4; }
.palette-heading .palette-guide { flex: none; margin: 0 0 0 auto; text-align: right; white-space: nowrap; line-height: 1.5; }
.palette, .palette.is-split {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 52px;
  justify-content: start;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 6px 10px;
  scrollbar-width: thin;
  scrollbar-color: #526580 transparent;
}
.swatch { font-size: .75rem; min-height: 58px; gap: 9px; padding: 3px; }
.swatch .color-dot { width: 32px; height: 32px; box-shadow: inset 0 0 0 1px var(--paper); transition: box-shadow .18s ease; }
.swatch[aria-checked=true] .color-dot::after, .swatch.half-swatch[aria-pressed=true] .color-dot::after { content: none; display: none; }
.swatch[aria-checked=true] .color-dot, .swatch.half-swatch[aria-pressed=true] .color-dot { box-shadow: inset 0 0 0 1px var(--paper), var(--selected-chip-backlight); }
.swatch[aria-checked=true], .swatch.half-swatch[aria-pressed=true] { color: #fff; }
.swatch-pair { width: 52px; }
.swatch-name { font-size: .75rem; }
.material-note { font-size: .75rem; margin-top: 10px; line-height: 1.8; }
.visual-heading { font-size: .75rem; letter-spacing: .12em; margin: 0 5px 18px; }
#previewRoot { position: relative; isolation: isolate; }
#previewRoot::before {
  content: '';
  position: absolute;
  inset: 9% -4% -2%;
  z-index: -1;
  border-radius: 18%;
  background: none;
  filter: blur(32px);
  pointer-events: none;
}
.preview {
  border-radius: 28px;
  background: #101724;
  outline: 1px solid var(--panel-edge);
  box-shadow: var(--panel-backlight);
  overflow: hidden;
}
.visual-caption { font-size: .875rem; margin-top: 22px; }
.preview-note { font-size: .75rem; line-height: 1.8; margin-top: 10px; }
.order-total { margin: 20px 0 24px; align-items: center; }
.order-total > div > span, .order-total p { font-size: .75rem; }
.order-total strong { font-size: 2rem; }
.order-total strong span { font-size: 1rem; }
.order-button { background: linear-gradient(135deg, #e4f0ff, #abc9ed); border: 1px solid #e5f3ff; color: #08121f; border-radius: 12px; font-size: 1rem; padding: 20px; box-shadow: 0 0 22px #88b9ff29; }
.order-button:hover { background: #e9f4ff; box-shadow: 0 0 32px #88b9ff45; }
.order-note, .craft-note, .consent-row { font-size: .75rem; line-height: 1.9; }
.product-info { margin-top: 28px; }
.product-info summary { font-size: .875rem; padding-top: 22px; padding-bottom: 22px; }
.product-info details > div { font-size: .875rem; }
.site-footer { border-color: var(--line); font-size: .75rem; padding: 32px 40px; background: #03060d6b; }
.site-footer p, .site-footer > span { font-size: .75rem; }
.review-dialog { background: #0c1422; border: 1px solid var(--panel-edge); border-radius: 20px; box-shadow: var(--panel-backlight); }
.review-dialog > img { border-radius: 14px; }
.review-dialog dl, .memo-label, textarea { font-size: .875rem; }
.no-script, .skip-link { background: #0c1422; }
@media(max-width:1100px) {
  .atelier { grid-template-columns: minmax(0, 1fr) minmax(350px, 1fr); gap: 0 30px; padding: 0 28px; }
  .product-heading { grid-template-columns: 1fr; gap: 9px; }
  .product-heading .intro { grid-column: 1; grid-row: 3; }
  .product-heading .intro br { display: none; }
  .slot-rail { --slot-width: 58px; --slot-reserve: 48px; }
}
@media(max-width:820px) {
  body { background-attachment: scroll; }
  .site-header { padding: 24px 20px; }
  .site-header .wordmark img { width: 148px; }
  .help-link { font-size: .75rem; }
  .atelier { display: flex; flex-direction: column; gap: 0; max-width: 800px; padding: 0 20px; margin: 12px auto 52px; }
  .configuration, .purchase-area, .visual-column { width: 100%; }
  .product-heading { grid-template-columns: 1fr auto; margin-bottom: 20px; }
  .product-heading h1 { font-size: clamp(1.875rem, 5vw, 2.5rem); }
  .product-heading .intro { grid-column: 2; grid-row: 1 / span 2; font-size: .75rem; }
  .product-heading .intro br { display: initial; }
  .slot-rail { --slot-width: clamp(52px, 13vw, 74px); --slot-reserve: 52px; }
  .slot-label { font-size: .75rem; }
  .palette, .palette.is-split { grid-auto-columns: minmax(48px, 1fr); gap: 8px; }
  .visual-column { position: static; margin-top: 6px; }
  .visual-heading { margin-bottom: 16px; }
  .preview { border-radius: 24px; }
  .preview-note { margin-bottom: 28px; }
  .order-total { margin: 12px 0 24px; }
  .site-footer { padding: 28px 20px; }
}
@media(max-width:440px) {
  .atelier { padding: 0 16px; }
  .slot-rail { --slot-width: 52px; --slot-reserve: 32px; padding: 8px; }
  .product-heading { gap: 8px; }
  .product-heading .intro { font-size: .75rem; max-width: 126px; }
  .product-heading .eyebrow { font-size: .6875rem; }
  .fine-toggle span { display: inline-block; font-size: .6875rem; }
  .order-total { gap: 8px; }
  .order-total p { font-size: .6875rem; }
}
@media(max-width:360px) {
  .slot-rail { --slot-width: 48px; --slot-reserve: 16px; padding: 6px; }
  .slots { gap: 4px; }
  .slot-label { font-size: .6875rem; }
  .product-heading { grid-template-columns: 1fr; }
  .product-heading .intro { grid-column: 1; grid-row: 3; max-width: none; }
  .product-heading .intro br { display: none; }
  .order-total { align-items: flex-start; flex-direction: column; gap: 12px; }
  .order-total p { text-align: left; }
}
@media(prefers-reduced-motion:reduce) {
  .swatch .color-dot { transition: none; }
  .reel-strip { display: none; }
  .chip > .chip-face { visibility: visible !important; }
}

/* Shared option cells and a mobile picture-in-picture preview. */
:root {
  --cell-surface: linear-gradient(145deg, rgba(28, 37, 52, 0.94), rgba(11, 16, 25, 0.97));
  --cell-glow: var(--panel-backlight);
}
.slot-rail, .fine-options, .palette-panel {
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  background: var(--cell-surface);
  box-shadow: var(--cell-glow);
}
.slots { display: flex; align-items: stretch; }
.slot { flex: 0 0 var(--slot-width); width: var(--slot-width); gap: 6px; padding: 10px 2px 8px; }
.slot-accessories {
  display: grid;
  grid-template-columns: repeat(3, var(--slot-width));
  flex: none;
  background: var(--slot-surface);
  border: 1px solid #ffffff08;
  border-radius: 8px;
  overflow: hidden;
}
.slot-accessories[data-active=true] { border-color: #f5d99fb3; box-shadow: inset 0 0 20px #ffdb9024, 0 0 18px #efbd6140; }
.slot-accessories .slot, .slot-accessories .slot[data-active=true], .slot-accessories .slot.is-rolling {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.slot-accessories .slot[data-active=true] .slot-label { color: #fff; text-shadow: 0 0 10px #ffdb9099; }
.option-stack { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: visible; }
.option-stack > * { flex: none; }
.option-stack[data-expanded=true] { z-index: 41; }
.fine-options { display: flex; flex-direction: column; margin: 0; padding: 0 14px; }
.fine-toggle { position: relative; order: 2; width: 100%; border: 0; background: none; text-align: left; padding: calc(16px / 3) 20px calc(16px / 3) 0; }
.fine-toggle::after { content: '+'; position: absolute; right: 0; color: var(--muted); }
.fine-toggle[aria-expanded=true]::after { content: '−'; }
.fine-reveal { order: 1; height: 0; overflow: hidden; }
.fine-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #79694b transparent; }
.fine-content { display: flow-root; padding: 0 0 calc(10px / 3); }
.fine-content > .switch-row:first-child { margin-top: calc(14px / 3); }
.palette-panel { padding: 16px 14px; margin: 12px 0 20px; }
.palette, .palette.is-split {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  width: 100%;
  gap: 8px 3px;
  padding: 6px 2px;
  overflow: visible;
  scrollbar-width: none;
}
.palette::-webkit-scrollbar { display: none; }
.palette > * { min-width: 0; max-width: 100%; }
.palette.is-partitioned, .palette.is-partitioned.is-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; gap: 8px; padding: 0; }
.palette-material { min-width: 0; padding: 10px 4px; border: 1px solid var(--panel-edge); border-radius: 12px; background: #0b111c80; }
.palette-material-title { margin: 0 0 6px; padding: 0 3px; color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 3px; padding: 6px 0; }
.palette-material[data-material=goat] .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.palette-grid > * { min-width: 0; }
.palette-grid .swatch { padding-inline: 0; }
.palette-panel[data-part=body] { padding-block: calc(14px / 3); }
.palette-panel[data-part=body] .palette-heading { margin-bottom: calc(8px / 3); }
.palette-panel[data-part=body] .palette-material { padding-block: calc(8px / 3); }
.palette-panel[data-part=body] .palette-material-title { margin-bottom: calc(4px / 3); }
.palette-panel[data-part=body] .palette-grid { padding-block: calc(4px / 3); }
.palette-panel[data-part=body] .material-note { margin-top: calc(8px / 3); }
.swatch { min-height: 0; gap: 0; font-size: .6875rem; }
.swatch .color-dot { width: 46.8px; max-width: 100%; height: auto; aspect-ratio: 1; flex: none; }
.swatch-pair { width: auto; grid-template-rows: 30px 30px; row-gap: 4px; justify-self: stretch; }
.swatch.half-swatch { min-height: 30px; max-width: none; }
.swatch.half-swatch .color-dot { width: 50.4px; height: auto; aspect-ratio: 2; }
.swatch.half-swatch[data-half=primary] .color-dot { border-radius: 50.4px 50.4px 0 0; }
.swatch.half-swatch[data-half=secondary] .color-dot { border-radius: 0 0 50.4px 50.4px; }
.swatch-name { font-size: .6875rem; }
#previewRoot::before { display: none; }
.preview-dock { position: relative; }
.floating-tools { display: none; }
@media(min-width:600px) and (max-width:820px) {
  .palette, .palette.is-split { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media(max-width:820px) {
  :root {
    --mobile-order-inset: 20px;
    --floating-preview-top: max(10px, env(safe-area-inset-top, 0px));
    --expanded-preview-width: calc(min(100vw, 800px) - var(--mobile-order-inset) * 2);
    --floating-image-size: calc((var(--expanded-preview-width) - 14px) / 2);
  }
  .site-header {
    display: block;
    min-height: calc(var(--floating-preview-top) + var(--floating-image-size) + 14px + 8px);
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    padding-bottom: 8px;
    padding-right: calc(var(--floating-image-size) + 34px);
  }
  .site-header .product-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 14px 0 0; }
  .site-header .product-heading h1 { font-size: clamp(1.5rem, 6vw, 1.875rem); line-height: 1.15; }
  .site-header .product-heading .eyebrow { line-height: 1.6; }
  .site-header .wordmark { display: flex; width: 148px; max-width: 100%; }
  .site-header .wordmark img { width: 100%; max-width: 100%; }
  .atelier { margin-top: 0; padding-inline: var(--mobile-order-inset); }
  .chooser-heading { display: none; }
  .visual-heading { display: none; }
  .visual-column { margin: 0; }
  .visual-caption { margin-top: 2px; }
  .preview-dock {
    --preview-scale: 1;
    position: fixed;
    top: var(--floating-preview-top);
    right: max(10px, env(safe-area-inset-right, 0px));
    z-index: 40;
    width: calc(var(--floating-image-size) * var(--preview-scale) + 14px);
    padding: 6px;
    border: 1px solid var(--panel-edge);
    border-radius: 18px;
    background: #080d16f5;
    box-shadow: var(--panel-backlight);
    transition: width .22s ease, right .22s ease;
  }
  .preview-dock.is-enlarged {
    --preview-scale: 2;
    right: calc((100vw - var(--expanded-preview-width)) / 2);
  }
  .preview-dock .preview { border-radius: 12px; outline: 0; box-shadow: none; }
  .preview-dock #previewRoot::before { inset: 0; }
  .floating-tools { display: flex; position: absolute; top: 12px; right: 12px; z-index: 2; align-items: center; justify-content: flex-end; gap: 6px; padding: 0; }
  .floating-tools button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #b9d8ff38;
    border-radius: 9px;
    background: #0b1526a6;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #eef6ff;
    font-size: .875rem;
  }
  #randomizeFloating { font-size: 1.375rem; }
  .floating-tools button:hover { background: #253b5b; }
  .floating-tools button:focus-visible { outline-offset: 0; }
  .floating-tools button[aria-pressed=true] { background: #b9d8ff; color: #080d16; }
}
@media(max-width:440px) {
  :root { --mobile-order-inset: 16px; }
}
