* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
:root {
  --vl-bg: #0e0b18;
  --vl-bg-elevated: #17122a;
  --vl-bg-soft: #1f1836;
  --vl-border: rgba(180, 160, 255, 0.14);
  --vl-text: #f4f0ff;
  --vl-text-muted: #a89bc4;
  --vl-accent: #a78bfa;
  --vl-accent-soft: rgba(167, 139, 250, 0.22);
  --vl-accent-glow: rgba(167, 139, 250, 0.55);
  --vl-gold: #f0d078;
  --vl-font: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  --vl-brand-from: #c4b5fd;
  --vl-brand-mid: #8b5cf6;
  --vl-brand-to: #5b21b6;
  --vl-glow-secondary: rgba(240, 208, 120, 0.28);
  --vl-spark: #f472b6;
  --vl-glow-spark: rgba(244, 114, 182, 0.35);
}
body {
  background: var(--vl-bg);
  color: var(--vl-text);
  font: 13px/1.4 var(--vl-font);
}
#app {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: transparent;
}
header {
  flex: none;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--vl-border);
  background: var(--vl-bg-elevated);
  overflow-x: auto;
  overflow-y: hidden;
}
button.brand {
  border: 0;
  background: transparent;
  padding: 0;
  height: 26px;
  font-size: 13px;
  color: inherit;
}
.tabs { display: flex; gap: 4px; flex: none; }
button {
  height: 26px;
  padding: 2px 8px;
  font: 12px/1 var(--vl-font);
  color: var(--vl-text);
  background: transparent;
  border: 1px solid var(--vl-border);
  border-radius: 4px;
  white-space: nowrap;
  flex: none;
}
button.on { border-color: var(--vl-text); }
button.accent {
  background: var(--vl-accent);
  border-color: var(--vl-accent);
  color: var(--vl-bg);
}
button.ghost { background: transparent; }
header button { flex: none; }
#account {
  margin-left: auto;
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--vl-bg-elevated);
  box-shadow: -8px 0 0 var(--vl-bg-elevated);
}
#account-menu, #skin-menu {
  position: absolute;
  top: 36px;
  right: 8px;
  z-index: 5;
  width: min(320px, calc(100vw - 16px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px;
  background: var(--vl-bg-elevated);
  border: 1px solid var(--vl-border);
  border-radius: 4px;
}
#skin-menu {
  max-height: calc(100dvh - 48px);
  overflow: auto;
}
#account-menu[hidden], #skin-menu[hidden] { display: none; }
#account-menu p, .menu-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--vl-text-muted);
}
#account-menu button, #skin-list button { width: 100%; }
#skin-list { display: flex; flex-direction: column; gap: 4px; }
#skin-list button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.swatches { display: inline-flex; gap: 2px; flex: none; }
.swatches i {
  width: 10px;
  height: 10px;
  display: block;
  border: 1px solid var(--vl-border);
}
#motion-list { display: flex; flex-wrap: wrap; gap: 4px; }
#freq-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--vl-text-muted);
}
#freq-row[hidden] { display: none; }
#freq-row input { flex: 1; height: 26px; min-width: 0; }
#motion-note { margin: 0; font-size: 12px; color: var(--vl-text-muted); }
#motion-note[hidden] { display: none; }
#store {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 22px 24px 40px;
}
.lane { margin: 0 0 28px; }
.lane h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
}
.empty { margin: 0; color: var(--vl-text-muted); font-size: 13px; }
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 18px 16px;
  justify-content: start;
}
button.card, button.poster {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  white-space: normal;
}
button.card {
  width: 100%;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
button.poster { display: block; width: 320px; }
button.card:focus-visible, button.poster:focus-visible {
  outline: 1px solid var(--vl-accent);
  outline-offset: 3px;
}
.cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  display: block;
  object-fit: cover;
  background: var(--vl-bg-soft);
  border-radius: 2px;
}
.cover.fallback {
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: var(--vl-text);
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.2;
}
.card .title {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
}
.card .sub, .card .price {
  margin-top: 2px;
  font-size: 12px;
  color: var(--vl-text-muted);
  line-height: 1.3;
}
.card .sub {
  max-height: 2.6em;
  overflow: hidden;
}
.product {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 980px;
}
.hero {
  width: 220px;
  height: 330px;
  object-fit: cover;
  display: block;
  background: var(--vl-bg-soft);
  border-radius: 2px;
}
.hero.fallback {
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}
.meta h1 {
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
}
.sentence { margin: 0 0 8px; font-size: 15px; }
.basis, .facts { margin: 0 0 8px; color: var(--vl-text-muted); font-size: 13px; max-width: 62ch; }
.actions { display: flex; gap: 6px; margin-top: 12px; }
.reader { margin-top: 28px; max-width: 68ch; }
.reader p { margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.reader img {
  max-width: min(100%, 720px);
  max-height: 70vh;
  height: auto;
  display: block;
  background: var(--vl-bg-soft);
}
.reader audio { width: min(100%, 480px); }
.landing h1, .window h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
}
.lede { margin: 0 0 12px; font-size: 15px; max-width: 62ch; }
.window {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
  margin: 0 0 8px;
}
.window-copy { min-width: 0; }
.window .lane-picks { margin: 14px 0 16px; }
.window .hero, .window .hero.fallback {
  width: 320px;
  height: 480px;
  aspect-ratio: auto;
}
.lane-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.landing { min-width: 0; max-width: 100%; }
.landing h2 { margin: 0; font-size: 13px; font-weight: 600; }
.how, .landing .note {
  margin: 0 0 10px;
  max-width: 68ch;
  color: var(--vl-text-muted);
  font-size: 13px;
}
.feature { margin-top: 8px; min-width: 0; }
.feature-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.feature-bar h2 { flex: 1; min-width: 0; }
.carousel {
  display: flex;
  gap: 16px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.carousel button.card {
  flex: 0 0 180px;
  width: 180px;
  max-width: 180px;
  scroll-snap-align: start;
}
.landing .empty { margin-top: 0; }
.law { max-width: 68ch; }
.law h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.35; font-weight: 600; }
.law p { margin: 0 0 8px; color: var(--vl-text-muted); }
.law ol { margin: 8px 0 0; padding-left: 18px; }
.law li { margin: 0 0 10px; }
#demo-states[hidden] { display: none; }
.stall { max-width: 640px; }
.stall h1 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; font-weight: 600; }
.stall form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.stall label, .choice-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 12px;
  color: var(--vl-text-muted);
}
.stall input, .stall textarea {
  width: 100%;
  min-width: 0;
  font: 13px/1.4 var(--vl-font);
  color: var(--vl-text);
  background: var(--vl-bg-soft);
  border: 1px solid var(--vl-border);
  border-radius: 4px;
  padding: 4px 8px;
}
.stall input { height: 26px; }
.stall input[type="file"] {
  height: auto;
  padding: 2px 0;
  background: transparent;
  border: 0;
  color: var(--vl-text-muted);
}
.stall textarea { min-height: 72px; resize: vertical; }
.stall .choices { display: flex; flex-wrap: wrap; gap: 6px; }
.stall-list { margin-top: 22px; }
.stall-list h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
@media (max-width: 700px) {
  header { gap: 4px; padding: 0 8px; }
  header button { padding: 2px 6px; }
  #store { padding: 16px 16px 32px; }
  .product { grid-template-columns: 1fr; gap: 16px; }
  .product .hero, .product .hero.fallback { width: 168px; height: 252px; }
  .window { grid-template-columns: 1fr; max-width: none; }
  button.poster { width: min(280px, 100%); }
  .window .hero, .window .hero.fallback {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  button.card { max-width: none; }
}
