:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-alt: #fafbfd;
  --border: #e5e7eb;
  --ink: #0d0e12;
  --muted: #5b616e;
  --subtle: #8e95a2;
  --accent: #6e2cf2;
  --blue: #2563eb;
  --danger: #dc2626;
  --success: #059669;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { max-width: 1152px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.container-narrow { max-width: 780px; }
.page-main { padding-top: 24px; padding-bottom: 64px; min-height: calc(100vh - 150px); }

@media (min-width: 640px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .page-main { padding-top: 32px; padding-bottom: 80px; }
}

/* Header & Footer */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.top-nav { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 500; color: var(--muted); }
.nav-link { text-decoration: none; white-space: nowrap; transition: color 150ms ease; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); font-weight: 600; }
.nav-link.is-active { text-decoration: underline; text-underline-offset: 4px; }

.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; color: var(--ink); }
.brand-sub { font-size: 11px; font-weight: 500; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface-alt); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 28px; padding-bottom: 28px; font-size: 12px; color: var(--muted);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { color: var(--ink); font-family: 'Plus Jakarta Sans', sans-serif; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-link { text-decoration: none; font-weight: 500; }
.footer-link:hover, .footer-link.is-active { color: var(--ink); text-decoration: underline; }

/* Buttons & Inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 18px; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background-color 150ms ease, transform 120ms ease, border-color 150ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 6px 13px; border-radius: 10px; font-size: 12px; }
.btn-primary { background: var(--ink); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: #23262f; }
.btn-secondary { background: #ffffff; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface); }
.btn-danger-ghost { background: #ffffff; color: var(--danger); border-color: var(--border); }
.btn-danger-ghost:hover:not(:disabled) { background: #fef2f2; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.text-link { font-size: 12px; font-weight: 600; color: var(--ink); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.text-input, .select-input {
  width: 100%; min-height: 42px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: #ffffff; color: var(--ink);
  font-family: inherit; font-size: 14px;
}
.text-input:focus, .select-input:focus { outline: none; border-color: var(--ink); }

.mono-stat { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Breadcrumbs & Hero */
.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.crumb-link { text-decoration: none; }
.crumb-link:hover { color: var(--ink); }
.crumb-current { font-weight: 600; color: var(--ink); }
.crumb-sep { color: #9ca3af; }

.hero { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: var(--ink); }
.hero p { margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.hero-kicker { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 8px; margin-top: 0 !important; }
.hero-actions { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Spinner Stage & Surface Themes */
.spinner-stage {
  border-radius: 20px; border: 1px solid var(--border); background: var(--surface);
  padding: 18px; margin-bottom: 28px; transition: background-color 200ms ease, border-color 200ms ease;
}
.spinner-stage.is-fullscreen {
  position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center; padding: 24px;
}
.spinner-stage.surface-pastel { background: #f8fafc; border-color: #e2e8f0; }
.spinner-stage.surface-monochrome { background: #f4f4f5; border-color: #d4d4d8; }
.spinner-stage.surface-noir { background: #11131a; border-color: #272a36; color: #f3f4f6; }
.spinner-stage.surface-arcade { background: #faf6ee; border-color: #e7dfd1; }

.stage-meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 12px; }
.stage-meta-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stage-meta-right { display: flex; align-items: center; gap: 8px; }
.stage-label { font-weight: 600; }
.stage-theme-name { font-weight: 600; color: var(--accent); }
.spinner-stage.surface-noir .stage-theme-name { color: #f59e0b; }
.spinner-stage.surface-noir .mono-stat { color: #a1a8b8; }

.stage-icon-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 10px;
  border-radius: 10px; border: 1px solid var(--border); background: #ffffff; color: var(--ink);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.spinner-stage.surface-noir .stage-icon-btn { background: #1a1d27; border-color: #2e3342; color: #f3f4f6; }

.drum-shell {
  border-radius: 9999px; border: 1px solid var(--border); padding: 6px;
  box-shadow: 0 12px 32px rgba(13, 14, 18, 0.06); background: transparent;
}
.spinner-stage.surface-noir .drum-shell { border-color: #2e3342; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }

.viewport-wrap {
  position: relative; height: 158px; border-radius: 9999px; overflow: hidden; cursor: grab; outline: none;
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.viewport-wrap:active { cursor: grabbing; }
.drum-stage { height: 100%; width: 100%; padding: 10px 0; perspective: 860px; perspective-origin: 50% 50%; }
.drum-sheen {
  position: absolute; inset: 0; border-radius: 9999px; pointer-events: none; z-index: 20;
  background: linear-gradient(to bottom, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.04) 26%, rgba(0,0,0,0) 55%, rgba(13,14,18,0.08) 100%);
}
.needle-top, .needle-bottom {
  position: absolute; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 30;
  border-left: 11px solid transparent; border-right: 11px solid transparent; pointer-events: none;
}
.needle-top { top: 0; border-top: 15px solid var(--ink); }
.needle-bottom { bottom: 0; border-bottom: 15px solid var(--ink); }
.needle-line {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: rgba(13, 14, 18, 0.9); z-index: 22; pointer-events: none;
}
.spinner-stage.surface-noir .needle-top { border-top-color: #f59e0b; }
.spinner-stage.surface-noir .needle-bottom { border-bottom-color: #f59e0b; }
.spinner-stage.surface-noir .needle-line { background: #f59e0b; }

.bar-track { display: flex; align-items: stretch; height: 100%; will-change: transform; transform-style: preserve-3d; }
.bar-seg {
  flex: 0 0 auto; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -2px 6px rgba(13,14,18,0.16);
  backface-visibility: hidden; user-select: none;
}
.bar-seg.is-winner-ring { box-shadow: 0 0 0 3px #0d0e12, 0 10px 24px rgba(13,14,18,0.22); }
.bar-seg-label {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

.stage-controls { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.controls-left, .controls-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.theme-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip {
  min-height: 32px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #ffffff; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer;
}
.theme-chip.is-active { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.spinner-stage.surface-noir .theme-chip { background: #1a1d27; border-color: #2e3342; color: #a1a8b8; }
.spinner-stage.surface-noir .theme-chip.is-active { background: #f59e0b; border-color: #f59e0b; color: #0d0e12; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }

.winner-banner {
  margin-top: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: #ffffff; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.winner-banner[hidden] { display: none; }
.winner-banner-left { display: flex; align-items: center; gap: 12px; }
.winner-swatch { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.winner-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.winner-banner-title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 18px; }
.winner-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Workspace & Cards */
.workspace-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
@media (min-width: 1024px) {
  .workspace-grid { grid-template-columns: 7fr 5fr; align-items: start; }
}
.stack-gap { display: flex; flex-direction: column; gap: 20px; }

.card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-header h2 { font-size: 17px; font-weight: 700; }
.card-header p { margin-top: 2px; font-size: 13px; color: var(--muted); }

.segmented-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.seg-tab {
  min-height: 32px; padding: 5px 12px; border-radius: 8px; border: 0; background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.seg-tab.is-active { background: #ffffff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.bulk-textarea {
  width: 100%; min-height: 230px; padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-alt); color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.6; resize: vertical;
}
.bulk-textarea:focus { outline: none; border-color: var(--ink); background: #ffffff; }
.bulk-meta-row { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.add-entry-form { display: flex; gap: 8px; margin-bottom: 14px; }
.advanced-list { max-height: 380px; overflow-y: auto; border-top: 1px solid #f0f1f4; }
.adv-row { padding: 10px 4px; border-bottom: 1px solid #f0f1f4; }
.adv-row.is-dragging { background: #f5f3ff; border-radius: 10px; outline: 2px solid rgba(110, 44, 242, 0.35); }
.adv-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 34px;
  border: 0; background: transparent; color: var(--subtle); cursor: grab; font-size: 16px; touch-action: none;
}
.color-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.16); cursor: pointer; flex-shrink: 0; }
.adv-label-input { flex: 1 1 140px; min-width: 0; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 500; }
.adv-label-input:hover, .adv-label-input:focus { border-color: var(--border); background: #ffffff; outline: none; }
.weight-box { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.weight-btn { width: 28px; height: 30px; border: 0; background: transparent; font-weight: 700; cursor: pointer; }
.weight-val { width: 30px; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; }
.row-del-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.row-del-btn:hover { background: #fef2f2; color: var(--danger); }

.color-drawer { margin-top: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.15); cursor: pointer; }
.swatch-btn.is-selected { outline: 2px solid var(--ink); outline-offset: 2px; }

.editor-footer {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f1f4;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.editor-footer-left, .editor-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Presets, Odds & History */
.preset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f1f4; }
.preset-row:last-of-type { border-bottom: 0; }
.preset-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; }
.preset-meta { font-size: 12px; color: var(--muted); }
.preset-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f1f4; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }

.odds-list, .history-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.odds-row, .history-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #f0f1f4; font-size: 13px; }
.row-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dot-sq { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.truncate-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.history-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f1f4; display: flex; justify-content: flex-end; gap: 8px; }

.empty-box { padding: 32px 16px; border-radius: 12px; border: 1px dashed #d1d5db; background: var(--surface-alt); text-align: center; font-size: 13px; color: var(--muted); }
.empty-box strong { display: block; color: var(--ink); margin-bottom: 4px; }

.subcard-title { font-size: 15px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid #f0f1f4; margin-bottom: 14px; }
.howto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }
.howto-list li { display: flex; align-items: flex-start; gap: 10px; }
.step-num { width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--ink); font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tips-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f1f4; }
.tips-box h3 { font-size: 13px; margin-bottom: 4px; }
.tips-box p { font-size: 12px; color: var(--muted); }

.fairness-box { border-radius: 16px; border: 1px solid #a7f3d0; background: #ecfdf5; padding: 18px; color: #064e3b; }
.fairness-box h3 { font-size: 14px; margin-bottom: 6px; }
.fairness-box p { font-size: 12px; line-height: 1.6; }

/* Sections & Grids */
.section-block { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 40px; }
.section-head { max-width: 680px; margin-bottom: 20px; }
.section-head h2, .section-head-split h2 { font-size: 22px; font-weight: 800; }
.section-head p, .section-head-split p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.section-head-split { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

.cards-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .cards-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } .cards-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.feature-card { border-radius: 16px; border: 1px solid var(--border); background: var(--surface-alt); padding: 20px; }
.feature-card h3 { margin-top: 12px; font-size: 15px; font-weight: 700; }
.feature-card p { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.num-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #ffffff; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; }

.faq-card { border-radius: 16px; border: 1px solid var(--border); background: #ffffff; padding: 20px; }
.faq-card h3 { font-size: 15px; font-weight: 700; }
.faq-card p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Wheel Cards & Server-Rendered Wheel Preview Images */
.wheel-card, .wheel-card-link {
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--border); background: #ffffff; text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.wheel-card:hover, .wheel-card-link:hover { border-color: var(--ink); box-shadow: 0 10px 28px rgba(13,14,18,0.07); }
.wheel-thumb-link { display: block; text-decoration: none; }
.wheel-card-body { padding: 16px 18px 8px; }
.wheel-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.cat-label { color: var(--accent); font-weight: 600; font-size: 11px; }
.wheel-card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; text-decoration: none; }
.wheel-card-body h3 { margin-top: 4px; font-size: 14px; font-weight: 700; }
.wheel-card-body p { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.wheel-card-footer { margin: 12px 18px 16px; padding-top: 12px; border-top: 1px solid #f0f1f4; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.muted-small { font-size: 12px; color: var(--subtle); }

.wheel-preview { padding: 18px 14px; border-bottom: 1px solid var(--border); background: var(--surface); user-select: none; }
.wheel-preview.is-compact { padding: 12px 10px; }
.wheel-preview.surface-noir { background: #11131a; color: #f3f4f6; border-bottom-color: #272a36; }
.wheel-preview.surface-arcade { background: #faf6ee; }
.wheel-preview.surface-pastel { background: #f8fafc; }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 0 4px; }
.preview-theme-name { font-size: 10px; font-weight: 600; color: var(--muted); }
.wheel-preview.surface-noir .preview-theme-name { color: #a1a8b8; }
.preview-dots { display: inline-flex; gap: 4px; }
.preview-dot { width: 8px; height: 8px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.15); }
.preview-pointer { display: flex; justify-content: center; margin-bottom: -3px; position: relative; z-index: 2; }
.preview-drum-rim { border-radius: 9999px; border: 1px solid var(--border); padding: 3px; }
.wheel-preview.surface-noir .preview-drum-rim { border-color: #2e3342; }
.preview-mask {
  position: relative; overflow: hidden; border-radius: 9999px;
  mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.preview-needle { position: absolute; top: 0; bottom: 0; left: 50%; width: 1.5px; background: var(--ink); z-index: 3; }
.wheel-preview.surface-noir .preview-needle { background: #f59e0b; }
.preview-sheen { position: absolute; inset: 0; border-radius: 9999px; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(255,255,255,0.28), transparent 55%, rgba(13,14,18,0.08)); }
.preview-track { display: flex; align-items: center; justify-content: center; gap: 5px; height: 46px; }
.wheel-preview.is-compact .preview-track { height: 38px; gap: 4px; }
.preview-seg {
  flex: 0 0 auto; height: 36px; width: 84px; padding: 0 8px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 11px; border: 1px solid rgba(255,255,255,0.3);
}
.wheel-preview.is-compact .preview-seg { height: 30px; width: 70px; font-size: 10px; }
.preview-seg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-chips-row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border); background: #ffffff; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--muted); }
.cat-chip:hover { border-color: var(--ink); color: var(--ink); }

.all-wheels-box { margin-top: 22px; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-alt); }
.all-wheels-box h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.all-wheels-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (min-width: 640px) { .all-wheels-grid { grid-template-columns: repeat(4, 1fr); } }
.all-wheels-grid a { font-size: 12px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.all-wheels-grid a:hover { color: var(--ink); text-decoration: underline; }

/* Explore & Legal */
.explore-search-form { margin: 20px auto 0; max-width: 520px; display: flex; gap: 8px; }
.explore-filter-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.filter-pill { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted); }
.filter-pill.is-active { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.explore-sections { display: flex; flex-direction: column; gap: 40px; }
.explore-cat-header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 18px; }
.explore-cat-header h2 { font-size: 18px; font-weight: 800; }
.explore-cat-header p { margin-top: 2px; font-size: 12px; color: var(--muted); }

.legal-article { display: flex; flex-direction: column; gap: 22px; }
.legal-article h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.12; }
.lead { font-size: 16px; color: var(--muted); line-height: 1.65; }
.legal-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.legal-section p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.contact-form label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.form-error { padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: var(--danger); font-size: 13px; font-weight: 500; }
.cta-actions { margin-top: 14px; display: flex; gap: 10px; }
.center-empty { text-align: center; padding-top: 80px; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(13, 14, 18, 0.52);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.winner-modal {
  position: relative; width: 100%; max-width: 560px; border-radius: 20px; background: #ffffff;
  border: 1px solid var(--border); overflow: hidden; box-shadow: 0 24px 60px rgba(13,14,18,0.28);
}
.winner-modal-stripe { height: 6px; width: 100%; }
.modal-close-btn { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: #ffffff; font-size: 20px; cursor: pointer; }
.winner-modal-body { padding: 32px 24px; text-align: center; }
.winner-modal-swatch { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 14px; }
.winner-modal-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: 6px 0; }
.winner-modal-odds { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.winner-modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.dialog-card { width: 100%; max-width: 480px; max-height: 85vh; display: flex; flex-direction: column; border-radius: 18px; background: #ffffff; border: 1px solid var(--border); overflow: hidden; }
.dialog-lg { max-width: 720px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 17px; }
.dialog-header p { margin-top: 2px; font-size: 12px; color: var(--muted); }
.modal-close-inline { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #ffffff; font-size: 18px; cursor: pointer; }
.dialog-search-row { padding: 12px 20px; border-bottom: 1px solid #f0f1f4; }
.theme-pack-list { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.pack-group h3 { font-size: 13px; margin-bottom: 8px; }
.pack-styles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pack-style-btn { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: #ffffff; text-align: left; cursor: pointer; font-size: 12px; font-weight: 600; }
.pack-style-btn.is-active { border-color: var(--ink); outline: 2px solid var(--ink); }
.pack-dots { display: flex; gap: 4px; margin-bottom: 5px; }
.pack-dot { width: 12px; height: 12px; border-radius: 4px; }

.settings-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.setting-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.setting-check { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; cursor: pointer; }
.setting-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 10px; border-top: 1px solid #f0f1f4; }

@media (max-width: 639px) {
  .hide-sm, .hide-xs { display: none; }
}
