:root {
  --bg: #07080a;
  --text: #e9ebee;
  --muted: #8d939c;
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(14, 16, 20, 0.62);
  --accent: #a9d8ff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
  cursor: grab;
}
#scene:active { cursor: grabbing; }

h1, h2 { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; margin: 0; }

.brand {
  position: fixed;
  top: 28px;
  left: 32px;
  max-width: 380px;
  pointer-events: none;
}
.overline {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand h1 { font-size: 34px; letter-spacing: -0.01em; }
.lede { margin: 8px 0 0; color: var(--muted); }

.card {
  position: fixed;
  top: 28px;
  right: 32px;
  width: 352px;
  max-height: calc(100vh - 214px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 20px 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card h2 { font-size: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle {
  display: none;
  font: 500 12px Inter, system-ui, sans-serif;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.tag { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.dims { margin: 0 0 14px; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.card::-webkit-scrollbar { display: none; }

.colorway {
  margin: 0 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.look-style { margin: 0; font-size: 13px; color: var(--accent); }
#look-controls { display: grid; gap: 8px; }
#look-controls[hidden] { display: none; }
.colorway .row { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 8px; }
.colorway .row .label { padding-top: 3px; }
.card.more {                                             /* more below: fade the bottom edge */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}
.label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.swatches, .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--c);
  cursor: pointer;
  transition: transform 0.15s;
}
.swatch.glow { box-shadow: 0 0 8px -1px var(--c); }
.swatch:hover { transform: scale(1.15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.swatch:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { flex: 0 0 auto; white-space: nowrap; }
.chip, .actions button, .look button {
  font: 500 12px Inter, system-ui, sans-serif;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.actions { display: flex; gap: 8px; }
.actions button { padding: 7px 14px; color: var(--text); }
.actions button:hover, .look button:hover { border-color: var(--accent); color: var(--accent); }
.actions .primary {
  flex: 1;
  color: #0b0c0f;
  border-color: transparent;
  background: linear-gradient(90deg, #a9d8ff, #e9ebee);
  font-weight: 600;
}
.actions .primary:hover { color: #0b0c0f; filter: brightness(1.06); }
.look {
  display: grid;
  gap: 3px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(169, 216, 255, 0.06);
  border: 1px solid rgba(169, 216, 255, 0.22);
}
.look[hidden] { display: none; }
.look .what { font-size: 13px; color: var(--text); }
.look button { justify-self: start; color: var(--text); }

.downloads { margin: 0; font-size: 12px; color: var(--muted); }
.downloads a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.downloads a span { color: var(--muted); }
.downloads a:hover { color: var(--accent); border-color: var(--accent); }
.hint a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.hint a:hover { border-color: var(--accent); color: var(--accent); }

.switcher {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.switcher::-webkit-scrollbar { display: none; }
.switcher button {
  flex: 0 0 auto;
  width: 132px;
  padding: 0 0 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 13px Inter, system-ui, sans-serif;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.switcher img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 6px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.switcher button:hover { color: var(--text); }
.switcher button:hover img { opacity: 1; }
.switcher button[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(169, 216, 255, 0.55);
  background: rgba(169, 216, 255, 0.06);
}
.switcher button[aria-pressed="true"] img { opacity: 1; }
.switcher button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hint {
  position: fixed;
  left: 32px;
  right: 32px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.hint a { pointer-events: auto; font-size: 12px; padding: 5px 11px; }

.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: opacity 0.3s;
  pointer-events: none;
}
.loading.hidden { opacity: 0; }

@media (max-width: 820px) {
  .brand { top: 16px; left: 16px; right: 16px; }
  .brand h1 { font-size: 26px; }
  .lede { display: none; }
  .card {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 158px;
    width: auto;
    max-height: 50vh;
    padding: 12px 14px;
  }
  .card h2 { font-size: 19px; }
  .toggle { display: inline-block; }
  .card .tag, .card .dims, .card .downloads, .look .what { display: none; }
  .card:not(.open) #look-controls .row { display: none; }
  .colorway { margin: 8px 0 0; padding-top: 10px; gap: 8px; }
  .colorway .row { grid-template-columns: 50px minmax(0, 1fr); }
  .swatches, .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 3px; }
  .swatches::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .look { grid-template-columns: 1fr auto; align-items: center; padding: 8px 10px; }
  .switcher { bottom: 44px; }
  .switcher button { width: 104px; font-size: 12px; }
  .hint { left: 16px; right: 16px; bottom: 12px; justify-content: center; }
  .hint span { display: none; }
}
