:root {
  --bg: #f4f1ea;
  --bg-2: #ebe6db;
  --surface: #ffffff;
  --surface-2: #f7f5f0;
  --line: #ddd6c8;
  --text: #1d1f2b;
  --muted: #6b6a73;
  --accent: #2f6fed;
  --accent-ink: #ffffff;
  --gold: #e7a90f;
  --danger: #d63c3c;
  --leather: #2a2d3e;
  --leather-2: #23263a;
  --pocket: rgba(255, 255, 255, 0.07);
  --pocket-line: rgba(255, 255, 255, 0.14);
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.06), 0 8px 24px rgba(20, 20, 40, 0.08);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1120;
    --bg-2: #151829;
    --surface: #1a1d30;
    --surface-2: #20243a;
    --line: #2d3150;
    --text: #eceaf4;
    --muted: #9a9bb3;
    --accent: #68a4ff;
    --accent-ink: #0b1020;
    --leather: #1c1f33;
    --leather-2: #15182a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1120;
  --bg-2: #151829;
  --surface: #1a1d30;
  --surface-2: #20243a;
  --line: #2d3150;
  --text: #eceaf4;
  --muted: #9a9bb3;
  --accent: #68a4ff;
  --accent-ink: #0b1020;
  --leather: #1c1f33;
  --leather-2: #15182a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: "Space Grotesk", Inter, sans-serif; line-height: 1.2; margin: 0; }
h3 { font-size: 1rem; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 6px; }
p { margin: 0.4em 0; }
a { color: inherit; }
img { display: block; }
.muted { color: var(--muted); }
.xs { font-size: 12px; }
.center { text-align: center; }
.error { color: var(--danger); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; gap: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* Buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.lg { padding: 12px 22px; font-size: 16px; }
.btn.sm { padding: 6px 10px; font-size: 14px; }
.btn.xs { padding: 4px 9px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.icon { padding: 8px; }

input, select {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, .pocket:focus-visible, .result:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.toggle input { accent-color: var(--accent); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px max(16px, calc((100vw - 1440px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* The 2Star Studio logo, cropped to a circle the way otbvision.com shows it. */
.brand-mark {
  flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.17); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: "Space Grotesk", sans-serif; font-size: 17px; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 11px; }
.topnav { display: flex; gap: 4px; align-items: center; }
.topnav .btn.on { background: var(--surface-2); }

main { padding: 20px max(16px, calc((100vw - 1440px) / 2)) 48px; }

/* Library */
.hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 28px 0 32px;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); max-width: 16ch; }
.hero p { color: var(--muted); max-width: 52ch; font-size: 17px; }
.binder-shelf {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.binder-tile {
  position: relative; display: flex; aspect-ratio: 3 / 3.7;
  border-radius: 10px 16px 16px 10px; overflow: hidden; text-decoration: none;
  background: var(--cover); color: #fff; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.binder-tile[data-light="true"] { color: #1d1f2b; }
.binder-tile:hover { transform: translateY(-4px) rotate(-0.5deg); }
.binder-spine {
  width: 22px; flex: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0.1) 60%, rgba(255,255,255,0.15));
}
.binder-cover {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,0.18), transparent 60%);
}
.binder-cover h3 { font-size: 19px; }
.binder-cover p { font-size: 12px; opacity: 0.8; margin: 4px 0 0; }
.binder-fan { position: relative; flex: 1; }
.binder-fan img {
  position: absolute; width: 42%; top: 12%; left: calc(14% + var(--i) * 12%);
  border-radius: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transform: rotate(calc((var(--i) - 1.5) * 7deg));
}
.binder-tile.new {
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  background: transparent; color: var(--muted); border: 2px dashed var(--line);
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: none;
}
.binder-tile.new span { font-size: 40px; font-weight: 300; }

/* Binder view */
.binder-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.binder-title { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.binder-title::before { content: ""; width: 12px; height: 26px; border-radius: 3px; background: var(--cover); }
.page-label { font-weight: 600; font-size: 14px; min-width: 120px; text-align: center; }

/* The binder on top, the card picker underneath it. */
.binder-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.pages-wrap { min-width: 0; }

.spread {
  display: grid; gap: 4px; padding: 14px;
  background: linear-gradient(160deg, var(--leather), var(--leather-2));
  border-radius: 18px; box-shadow: var(--shadow);
}
.spread.two { grid-template-columns: 1fr 1fr; gap: 0; }
.spread.two .page:first-child { border-right: 2px solid rgba(0,0,0,0.35); }
.page {
  padding: 8px 12px 14px; border-radius: 12px;
  transition: background 0.2s;
}
.spread.two .page.active { background: rgba(255,255,255,0.03); }
.page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #e8e6f2; }
.page-name {
  flex: 1; background: transparent; border: 1px solid transparent; color: inherit;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; padding: 4px 6px;
}
.page-name:hover, .page-name:focus { border-color: rgba(255,255,255,0.2); background: rgba(0,0,0,0.2); }
.page-head .btn.ghost { color: #c9c7d8; }
.page-head .btn.ghost:hover { background: rgba(255,255,255,0.08); }
.harmony {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,0.3); padding: 3px 8px 3px 4px; border-radius: 99px;
}
.harmony i { width: 14px; height: 14px; border-radius: 50%; }

.pockets {
  display: grid; gap: clamp(5px, 1vw, 10px);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  max-width: calc(var(--cols) * 190px); margin: 0 auto;
}
.pocket {
  position: relative; aspect-ratio: 63 / 88; border-radius: 7px; cursor: pointer;
  background: var(--pocket); border: 1px solid var(--pocket-line);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.pocket::after {
  /* plastic sleeve sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,0.14), transparent 35%, transparent 70%, rgba(255,255,255,0.06));
}
.pocket img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.pocket.empty { display: grid; place-items: center; color: rgba(255,255,255,0.3); font-size: 26px; font-weight: 300; }
.pocket.empty:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.pocket:not(.empty):hover { transform: translateY(-3px) scale(1.02); z-index: 2; box-shadow: 0 10px 24px rgba(0,0,0,0.45); }
.pocket.sel { box-shadow: 0 0 0 3px var(--gold); }
.pocket.drop { box-shadow: 0 0 0 3px var(--accent); background: rgba(104,164,255,0.18); }
.page.active .pockets:has(.pocket.hl) .pocket:not(.hl) { opacity: 0.3; }
.pocket.hl { box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255,255,255,0.5); }
.hue-dot {
  position: absolute; right: 5px; bottom: 5px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 1px 3px rgba(0,0,0,0.5); z-index: 1;
}
.score-badge {
  position: absolute; left: 5px; top: 5px; z-index: 1;
  font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 99px; color: #fff;
  background: color-mix(in srgb, #2ebd6b calc(var(--s) * 1%), #c73d3d);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.slot-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px;
  padding: 8px 4px; font-size: 14px;
}
.page-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.strip-page {
  flex: none; display: grid; grid-template-columns: repeat(var(--cols), 7px); gap: 2px;
  padding: 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.strip-page.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.strip-page i { width: 7px; height: 10px; border-radius: 1.5px; background: var(--bg-2); }
.strip-page i.f { background: var(--muted); }

/* Panel */
.panel {
  display: flex; flex-direction: column; scroll-margin-top: 72px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 140px)); padding: 6px 12px; gap: 4px; border-bottom: 1px solid var(--line); }
.tab {
  font: inherit; font-weight: 600; font-size: 14px; padding: 8px; border-radius: 9px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.tab.on { background: var(--surface-2); color: var(--text); }
.panel-body { padding: 16px 18px 22px; }
.card-block { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.card-block:first-child { border-top: 0; padding-top: 0; }

.search { display: flex; gap: 6px; flex-wrap: wrap; }
.search input { flex: 1 1 160px; }
.chip {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--text);
  background: color-mix(in srgb, var(--c) 18%, transparent); padding: 3px 9px; border-radius: 99px;
}
.chip.static { cursor: default; }
.chip:not(.static):hover { background: color-mix(in srgb, var(--c) 35%, transparent); }

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 8px; }
.result {
  position: relative; padding: 0; border: 0; background: var(--bg-2); border-radius: 5px; cursor: grab;
  aspect-ratio: 63 / 88; transition: transform 0.12s;
}
.result:hover { transform: scale(1.05); z-index: 1; }
.result img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

/* Hue */
.hue-picker { display: grid; gap: 12px; justify-items: center; padding-bottom: 12px; }
.hue-wheel {
  position: relative; width: 150px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 90deg, hsl(0 75% 55%), hsl(60 75% 55%), hsl(120 75% 50%), hsl(180 75% 50%), hsl(240 75% 60%), hsl(300 75% 58%), hsl(360 75% 55%));
}
.hue-wheel::before {
  content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--surface);
}
.hue-core {
  position: absolute; inset: 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-family: "Space Grotesk", sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.hue-mark {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px;
  border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transform: rotate(var(--a)) translate(64px) ;
}
.hue-slider {
  width: 100%; appearance: none; height: 14px; border-radius: 99px; padding: 0; border: 0;
  background: linear-gradient(90deg, hsl(0 75% 55%), hsl(60 75% 55%), hsl(120 75% 50%), hsl(180 75% 50%), hsl(240 75% 60%), hsl(300 75% 58%), hsl(360 75% 55%));
}
.hue-slider::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--text); cursor: pointer; }
.hue-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--text); cursor: pointer; }
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line); position: relative;
}
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; width: 100%; }
.seg button {
  flex: 1; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 2px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.score-pill {
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: #fff;
  background: color-mix(in srgb, #2ebd6b calc(var(--s) * 1%), #c73d3d);
}

/* Card finder */
.finder { display: grid; gap: 10px; }
.filter-strip { display: flex; flex-wrap: wrap; gap: 5px; }
.chip.region { --c: var(--accent); }
.chip.on, .chip.on:not(.static):hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.color-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.color-dot {
  width: 24px; height: 24px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.color-dot:hover { transform: scale(1.12); }
.color-dot.on { box-shadow: 0 0 0 2px var(--text); }
.advanced { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.advanced summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 14px; }
.advanced[open] summary { border-bottom: 1px solid var(--line); }
.advanced > p { padding: 0 12px 10px; margin: 0; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 10px 12px; }
.filter { display: grid; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.filter select, .filter input { width: 100%; font-size: 14px; font-weight: 400; padding: 6px 8px; background: var(--surface); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text);
}
.pill span { opacity: 0.6; margin-left: 2px; }
.pill.ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.find-status { font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.find-status .muted { font-weight: 400; }
.find-actions { margin-top: 12px; }
.spinner {
  display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-left: 4px;
  border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result.noimg { display: none; }


/* Multi-select filter dropdowns */
.ms { position: relative; }
.ms summary {
  list-style: none; cursor: pointer; display: grid; gap: 1px; padding: 5px 28px 5px 9px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); position: relative;
}
.ms summary::-webkit-details-marker { display: none; }
.ms summary::after { content: "▾"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.ms[open] summary { border-color: var(--accent); }
.ms-title { font-size: 11px; font-weight: 600; color: var(--muted); }
.ms-value { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* An open list spans the filter grid and opens in place, so it never gets clipped. */
.ms[open] { grid-column: 1 / -1; }
.ms-menu {
  margin-top: 6px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  animation: menu-in 0.18s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.ms-search { width: 100%; margin-bottom: 4px; font-size: 14px; padding: 6px 8px; }
.ms-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 8px 6px 2px; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; font-size: 14px; cursor: pointer; }
.ms-opt:hover { background: var(--surface-2); }
.ms-opt input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.ms-opt span { flex: 1; }
.ms-opt i { font-style: normal; font-size: 12px; color: var(--muted); }
.ms-opt.none { display: none; }

/* "How much colour" and "Gradient strength" sliders */
.amount { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.amount input { grid-column: 1 / -1; width: 100%; padding: 0; accent-color: var(--accent); background: none; border: 0; }
.amount output { grid-row: 1; grid-column: 2; justify-self: end; color: var(--text); }
.amount.idle { opacity: 0.55; }
.suggest-head + .amount, #suggest-box > .amount { margin: 4px 0 10px; }

/* Smart search and prices */
.understood { font-size: 13px; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.understood .tag { background: color-mix(in srgb, var(--gold) 22%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 99px; padding: 1px 8px; font-weight: 600; }
.result { content-visibility: auto; contain-intrinsic-size: auto 110px; }
.price-box { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.price-head { display: flex; align-items: baseline; gap: 8px; }
.price-head strong { font-family: "Space Grotesk", sans-serif; font-size: 24px; color: #1f9d55; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.price-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; }
.price-table td, .price-table th { padding: 3px 6px 3px 0; }
.price-table tbody tr + tr td { border-top: 1px solid var(--line); }
.tcg-link { font-weight: 600; color: var(--accent); }

/* Card picker under the binder */
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.picker-head h2 { font-size: 20px; }
.picker-head p { margin: 2px 0 0; font-size: 14px; }
.picker.flash { animation: picker-flash 1.1s ease-out; }
@keyframes picker-flash { 0% { box-shadow: 0 0 0 3px var(--gold), var(--shadow); } 100% { box-shadow: var(--shadow); } }
.panel .results { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.panel .results.captioned { row-gap: 28px; }
/* Search tab: filters beside the results on wide screens */
.picker-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .picker-split { grid-template-columns: 320px minmax(0, 1fr); }
  .picker-split > .finder { position: sticky; top: 76px; }
}
.panel-body > .card-block, .panel-body > .hue-picker { max-width: 1100px; }

/* Suggestions */
.suggest-head { display: flex; align-items: flex-start; gap: 10px; }
.suggest-head .hint { flex: 1; margin-top: 0; }
.target-hue { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.results.captioned { row-gap: 26px; }
.caption {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 3px;
  font-size: 10.5px; line-height: 1.2; color: var(--muted); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet .dialog-body { max-height: min(86vh, 900px); overflow-y: auto; }
.sheet h2 { font-size: 19px; }
.sheet h4 { margin: 4px 0 0; }
.pocket-name {
  position: absolute; inset: 0; display: none; place-items: center; padding: 8px; text-align: center;
  font-size: 12px; font-weight: 600; color: #e8e6f2;
}
.pocket.noimg img { visibility: hidden; }
.pocket.noimg .pocket-name { display: grid; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action { font: inherit; font-weight: 700; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Collection progress */
.collected { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.progress { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.progress i { display: block; height: 100%; background: #2ebd6b; }
.binder-cover .progress { display: block; width: 100%; margin-top: 8px; }
.pocket.missing img { filter: grayscale(1) brightness(0.75); opacity: 0.55; }
.missing-tag {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 1;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.7); color: #fff; padding: 2px 8px; border-radius: 99px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Patterns */
.patterns { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pattern {
  padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.pattern:hover { border-color: var(--accent); }
.pattern p { font-size: 14px; color: var(--muted); }
.strength { width: 48px; height: 6px; border-radius: 99px; background: var(--bg-2); position: relative; overflow: hidden; flex: none; }
.strength::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--gold); }
.claude .summary { font-size: 14px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.suggestions li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; font-size: 14px; }
.suggestions p { color: var(--muted); margin: 2px 0 0; }

/* Dialogs */
.dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.dialog.wide { width: min(760px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(10, 12, 25, 0.55); backdrop-filter: blur(3px); }
.dialog-body { padding: 22px; display: grid; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 500; }
.settings-section { display: grid; gap: 10px; }
.settings-section p { font-size: 14px; margin: 0; }
.cover-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cover-swatch { width: 32px; height: 32px; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.cover-swatch.on { box-shadow: 0 0 0 3px var(--accent); }

.card-detail { grid-template-columns: minmax(0, 300px) 1fr; align-items: start; gap: 22px; }
.card-detail img { width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.card-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 14px 0; }
.card-detail dt { color: var(--muted); }
.card-detail dd { margin: 0; }
.similar { margin-bottom: 14px; }
.similar h4 { margin-top: 0; }
.palette { display: flex; gap: 6px; margin-bottom: 12px; }
.palette span { width: 36px; height: 36px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); }

/* Toasts */
.toasts { position: fixed; bottom: 18px; width: max-content; max-width: calc(100vw - 32px); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; }
.toast {
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow); transition: opacity 0.4s, transform 0.4s;
}
.toast.warn { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Responsive */
@media (max-width: 1100px) {
  .binder-layout { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .dialog.sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; inset: auto 0 0 0; border-radius: 18px 18px 0 0; }
  .sheet .dialog-body { max-height: 92vh; padding: 18px 16px 24px; }
  /* Keep the selected card's actions on screen while the page scrolls. */
  .slot-bar { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); margin: 0 -16px; padding: 8px 16px; }
  .tab { font-size: 13px; padding: 8px 2px; }
  .spread { padding: 8px; border-radius: 12px; }
  .spread.two { grid-template-columns: 1fr; }
  .spread.two .page:first-child { border-right: 0; border-bottom: 2px solid rgba(0,0,0,0.35); }
  .page { padding: 6px 4px 10px; }
  .binder-shelf { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .brand-text small { display: none; }
  .card-detail { grid-template-columns: 1fr; }
  .card-detail img { max-width: 260px; margin: 0 auto; }
  .hero { padding: 12px 0 20px; }
  .panel .results { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .tabs { grid-template-columns: repeat(4, 1fr); padding: 6px; }
  .picker-head { padding: 14px 14px 4px; }
  .panel-body { padding: 12px 14px 18px; }
  .topnav .btn { padding: 8px 8px; font-size: 14px; }
}
@media (max-width: 440px) {
  .brand-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===========================================================================
   Polish: icons, card motion, loading, page turns
   =========================================================================== */

.ico { flex: none; width: 16px; height: 16px; vertical-align: -3px; }
.swatch-ico { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.gen {
  flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px;
  font: 700 10px/1 "Space Grotesk", sans-serif; background: var(--bg-2); color: var(--muted);
}
.ms-opt .ico, .ms-opt .swatch-ico, .ms-opt .gen { margin-right: 2px; }

/* Images fade in once loaded; the tile shows a soft shimmer until then. */
.result, .pocket:not(.empty) { --shine: rgba(255, 255, 255, 0.0); }
.result img, .pocket img { opacity: 0; transition: opacity 0.35s ease; }
.result img.ready, .pocket img.ready { opacity: 1; }
.result::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%) var(--bg-2);
  background-size: 250% 100%; animation: shimmer 1.4s linear infinite;
}
.result:has(img.ready)::before { display: none; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Tilt and glare under the pointer (Settings → Card effects). */
.result, .pocket:not(.empty), .card-detail > img, .lp-price-card { transform-style: preserve-3d; }
.tilting { transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) scale(1.04) !important; z-index: 3; transition: transform 0.08s linear !important; }
.result.tilting::after, .pocket.tilting::after, .lp-price-card.tilting::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2; mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.75), transparent 45%),
    linear-gradient(115deg, transparent 20%, rgba(255, 120, 200, 0.25) 40%, rgba(120, 220, 255, 0.25) 55%, transparent 75%);
}
.card-detail > img { transition: transform 0.3s ease; }

/* Page turns */
.spread.turn-next .page { animation: turn-next 0.38s cubic-bezier(.2, .8, .2, 1); }
.spread.turn-prev .page { animation: turn-prev 0.38s cubic-bezier(.2, .8, .2, 1); }
@keyframes turn-next { from { opacity: 0; transform: translateX(28px) rotateY(-6deg); } }
@keyframes turn-prev { from { opacity: 0; transform: translateX(-28px) rotateY(6deg); } }

.price-tag {
  position: absolute; right: 4px; bottom: 4px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: 0.01em;
  background: rgba(12, 14, 26, 0.84); color: #fff; padding: 1px 6px; border-radius: 99px; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.pocket .price-tag { right: auto; left: 5px; bottom: 5px; }
.value { color: var(--text); font-weight: 600; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top .ico { width: 18px; height: 18px; }

/* Focus and hover feel */
.btn { transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s; }
.btn.primary:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn .ico { width: 15px; height: 15px; }
.topnav .btn.on { color: var(--text); background: var(--surface-2); }

body.no-motion *, body.no-motion *::before, body.no-motion *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }

/* ===========================================================================
   Settings
   =========================================================================== */

.dialog.settings { width: min(540px, calc(100vw - 24px)); padding: 0; }
.settings-body { display: grid; gap: 18px; padding: 8px 20px 20px; max-height: min(86vh, 860px); overflow-y: auto; }
.settings-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 12px 0 6px; }
.settings-head h2 { font-size: 20px; }
.set-group { display: grid; }
.set-group > h3, .set-group > summary h3 {
  font: 600 12px/1 Inter, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px;
}
.set-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
label.set-row { cursor: pointer; }
.set-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.set-row p { margin: 0; font-weight: 500; }
.set-row small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.set-row select, .set-row input[type="password"] { max-width: 220px; font-size: 14px; padding: 6px 9px; background: var(--surface); }
.set-advanced summary { list-style: none; display: flex; align-items: baseline; gap: 8px; cursor: pointer; }
.set-advanced summary::-webkit-details-marker { display: none; }
.set-advanced summary::after { content: "›"; margin-left: auto; color: var(--muted); transition: transform 0.2s; }
.set-advanced[open] summary::after { transform: rotate(90deg); }
.set-advanced summary h3 { margin-bottom: 8px; }
.set-note { font-size: 13px; color: var(--muted); margin: 0 4px 10px; }
.settings-foot { text-align: center; padding-top: 4px; }

/* iOS-style switch */
.switch {
  appearance: none; flex: none; position: relative; width: 44px; height: 26px; border-radius: 99px; padding: 0; margin: 0;
  background: color-mix(in srgb, var(--muted) 35%, transparent); border: 0; cursor: pointer; transition: background 0.2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s cubic-bezier(.3, .7, .3, 1);
}
.switch:checked { background: #2ebd6b; }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg.compact { width: auto; }
.seg.compact button { padding: 6px 12px; font-size: 13px; }

/* ===========================================================================
   Home page
   =========================================================================== */

main.landing { padding: 0; }
body[data-view="home"] .topbar {
  background: rgba(10, 11, 22, 0.9); border-bottom-color: rgba(255, 255, 255, 0.08); color: #f1eff8;
}
body[data-view="home"] .topbar .btn.ghost { color: #e6e3f2; }
body[data-view="home"] .topbar .btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }
body[data-view="home"] .brand-text small { color: #a7a5b8; }

.lp-hero {
  --ink: #f4f2fb;
  position: relative; overflow: hidden; isolation: isolate; color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px;
  padding: 72px max(24px, calc((100vw - 1280px) / 2)) 96px; min-height: min(88vh, 860px);
  background: #0b0c18;
}
.lp-aurora {
  position: absolute; inset: -20%; z-index: -1; filter: blur(60px); opacity: 0.9;
  background:
    radial-gradient(40% 35% at 70% 35%, rgba(232, 52, 59, 0.45), transparent 70%),
    radial-gradient(35% 30% at 85% 75%, rgba(242, 181, 58, 0.35), transparent 70%),
    radial-gradient(45% 40% at 25% 80%, rgba(61, 92, 255, 0.35), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate(-4%, 3%) rotate(8deg) scale(1.08); } }
.lp-hero::after {
  /* faint grain so the gradients don't band */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.08; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 0.6px, transparent 0.6px); background-size: 3px 3px;
}
.lp-eyebrow { font: 600 13px/1 Inter, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #f2b53a; margin-bottom: 18px; }
.lp-hero h1 { font-size: clamp(38px, 5.4vw, 70px); line-height: 1.02; letter-spacing: -0.03em; }
.lp-grad { background: linear-gradient(90deg, #ff6b5e, #f2b53a 45%, #7fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lede { font-size: clamp(16px, 1.4vw, 19px); color: #c9c6da; max-width: 46ch; margin: 20px 0 28px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn.ghost-light { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.btn.ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); }
.lp-stats { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 38px 0 0; }
.lp-stats div { display: grid; gap: 2px; }
.lp-stats dt { font: 700 26px/1 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.lp-stats dd { margin: 0; color: #a7a5b8; font-size: 13px; }

/* The hero binder: an open two-page spread leaning back, with loose cards floating over it. */
.lp-stage { position: relative; height: min(64vh, 600px); perspective: 1600px; --px: 0; --py: 0; }
.lp-binder {
  position: absolute; left: 50%; top: 50%; width: min(640px, 100%);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px;
  background: linear-gradient(150deg, #262a44, #171a2c); border-radius: 18px;
  box-shadow: 0 50px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%) rotateX(calc(24deg - var(--py) * 8deg)) rotateY(calc(-16deg + var(--px) * 10deg)) rotateZ(4deg);
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
}
.lp-binder::before {
  content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 10px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.45)); border-radius: 4px;
}
.lp-page { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lp-pocket {
  aspect-ratio: 63 / 88; border-radius: 6px; background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); overflow: hidden; position: relative;
}
.lp-pocket::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 35%, transparent 70%, rgba(255, 255, 255, 0.06));
}
.lp-pocket img, .lp-float img, .lp-thumb img, .lp-gcard img, .lp-mini img, .lp-sugg img, .lp-price-card img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit;
  opacity: 0; transition: opacity 0.5s;
}
.lp-stage img.ready, .lp-demo img.ready { opacity: 1; }
.lp-stage img.broken, .lp-demo img.broken { visibility: hidden; }
.dealt .lp-pocket img.ready { animation: deal 0.75s cubic-bezier(.2, .9, .25, 1.15) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
.dealt .lp-page[data-page="1"] .lp-pocket img.ready { animation-delay: calc(var(--i) * 70ms + 700ms); }
@keyframes deal { from { opacity: 0; transform: translateY(-40px) rotate(-8deg) scale(1.15); } }

.lp-float {
  position: absolute; width: clamp(90px, 11vw, 150px); aspect-ratio: 63 / 88; border-radius: 9px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: translate(calc(var(--px) * var(--depth) * 1px), calc(var(--py) * var(--depth) * 1px)) rotate(var(--rot));
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.lp-float::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 46%, rgba(255, 160, 220, 0.25) 52%, transparent 66%);
  background-size: 250% 100%; animation: sheen 5.5s ease-in-out infinite; mix-blend-mode: soft-light;
}
@keyframes sheen { 0%, 40% { background-position: 130% 0; } 75%, 100% { background-position: -40% 0; } }
.lp-float.f1 { --rot: -10deg; --depth: 40; left: 2%; top: 4%; animation: bob 7s ease-in-out infinite; }
.lp-float.f2 { --rot: 8deg; --depth: 60; right: 0; top: 30%; animation: bob 8s ease-in-out -2s infinite; }
.lp-float.f3 { --rot: -4deg; --depth: 30; left: 30%; bottom: -2%; width: clamp(80px, 9vw, 125px); animation: bob 9s ease-in-out -4s infinite; }
@keyframes bob { 50% { translate: 0 -14px; } }
.lp-float img { opacity: 0; }
.dealt .lp-float img.ready { opacity: 1; animation: float-in 1s cubic-bezier(.2, .9, .3, 1.1) 1.2s backwards; }
@keyframes float-in { from { opacity: 0; transform: translateY(40px) scale(0.9); } }

/* Feature sections */
.lp-section { padding: 72px max(24px, calc((100vw - 1180px) / 2)); }
.lp-feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.lp-feature.flip .lp-copy { order: 2; }
.lp-kicker { font: 600 13px/1 Inter, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lp-copy h2 { font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 16px; }
.lp-copy p { color: var(--muted); font-size: 17px; max-width: 44ch; }
.lp-demo {
  position: relative; border-radius: 24px; padding: 26px; min-height: 320px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Search demo */
.lp-searchbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 99px; font-size: 18px;
  background: var(--surface-2); border: 1px solid var(--line); min-height: 54px;
}
.lp-searchbar .ico { width: 18px; height: 18px; color: var(--muted); }
.lp-caret { width: 2px; height: 22px; background: var(--accent); animation: blink 1s steps(1) infinite; margin-left: -8px; }
@keyframes blink { 50% { opacity: 0; } }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin: 14px 0; }
.lp-chip {
  font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--gold) 20%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  animation: pop 0.35s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--i) * 90ms);
}
@keyframes pop { from { opacity: 0; transform: scale(0.7); } }
.lp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lp-thumb { aspect-ratio: 63 / 88; border-radius: 7px; overflow: hidden; background: var(--bg-2); opacity: 0; transform: translateY(18px); transition: opacity 0.45s, transform 0.45s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms + 150ms); }
.lp-thumbs.show .lp-thumb { opacity: 1; transform: none; }

/* Gradient demo */
.lp-gradient-demo { display: grid; align-content: center; gap: 20px; background: #14162a; border-color: #23263f; }
.lp-gradient-bar { max-width: 420px; width: 100%; justify-self: center; }
.lp-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; width: 100%; justify-self: center; }
.lp-gcard { aspect-ratio: 63 / 88; border-radius: 7px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); }
.lp-gradient-bar { display: flex; align-items: center; gap: 12px; color: #d9d6ea; font-weight: 600; font-size: 14px; }
.lp-gradient-bar i { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
.lp-gradient-bar i::after {
  content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); transition: transform 0.9s cubic-bezier(.2, .8, .2, 1);
  background: linear-gradient(90deg, hsl(0 75% 55%), hsl(60 75% 55%), hsl(120 60% 48%), hsl(190 70% 50%), hsl(240 70% 60%), hsl(300 70% 58%));
}
.lp-gradient-demo.sorted .lp-gradient-bar i::after { transform: none; }

/* Suggestion demo */
.lp-suggest-demo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: center; }
.lp-mini-page { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; border-radius: 14px; background: linear-gradient(160deg, #262a44, #171a2c); }
.lp-mini { aspect-ratio: 63 / 88; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.lp-mini.empty { display: grid; place-items: center; color: rgba(255, 255, 255, 0.55); font-size: 22px; box-shadow: inset 0 0 0 2px #f2b53a; transition: box-shadow 0.6s; }
.lp-suggest-demo.pulse .lp-mini.empty { box-shadow: inset 0 0 0 2px #f2b53a, 0 0 22px rgba(242, 181, 58, 0.6); }
.lp-suggestions { display: grid; gap: 10px; }
.lp-sugg {
  display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; padding: 8px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.reveal.in .lp-sugg { animation: slide-in 0.6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 150ms + 300ms); }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } }
.lp-sugg img { aspect-ratio: 63 / 88; border-radius: 5px; height: auto; }
.lp-sugg span { font-size: 13px; font-weight: 600; justify-self: start; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }

/* Price demo */
.lp-price-demo { display: grid; grid-template-columns: 0.8fr 1fr; gap: 26px; align-items: center; }
.lp-price-card { aspect-ratio: 63 / 88; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); }
.lp-price-panel { display: grid; gap: 4px; }
.lp-price-panel p { margin: 0; }
.lp-price-name { font: 700 20px/1.2 "Space Grotesk", sans-serif; display: flex; align-items: center; gap: 8px; }
.lp-price-value { font: 700 44px/1.1 "Space Grotesk", sans-serif; color: #1f9d55; margin-top: 14px !important; font-variant-numeric: tabular-nums; }
.lp-track { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.lp-track b { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.lp-track i { display: block; height: 100%; background: #2ebd6b; border-radius: inherit; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.lp-price-demo.swap .lp-price-card, .lp-price-demo.swap .lp-price-panel { animation: swap-in 0.6s cubic-bezier(.2, .8, .2, 1); }
@keyframes swap-in { from { opacity: 0; transform: translateY(14px); } }
.lp-price-demo.no-price { display: none; }

/* Steps, final call to action, footer */
.lp-steps h2 { font-size: clamp(26px, 3vw, 38px); text-align: center; margin-bottom: 34px; letter-spacing: -0.02em; }
.lp-steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-steps li { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lp-steps b {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
  font: 700 16px/1 "Space Grotesk", sans-serif; color: #fff; background: linear-gradient(135deg, #e8343b, #f2b53a);
}
.lp-steps h3 { font-size: 18px; margin-bottom: 6px; }
.lp-steps p { color: var(--muted); margin: 0; }
.lp-final {
  margin: 0 max(24px, calc((100vw - 1180px) / 2)) 64px; padding: 64px 24px; border-radius: 28px; text-align: center;
  color: #fff; background: radial-gradient(60% 120% at 20% 0%, rgba(232, 52, 59, 0.55), transparent 60%), radial-gradient(60% 120% at 90% 100%, rgba(61, 92, 255, 0.5), transparent 60%), #0e1020;
}
.lp-final h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 24px; letter-spacing: -0.02em; }
.lp-final .lp-cta { justify-content: center; }
.lp-final .btn:not(.primary) { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.lp-footer { padding: 0 max(24px, calc((100vw - 1180px) / 2)) 48px; font-size: 13px; text-align: center; display: grid; gap: 6px; }
.lp-footer p { margin: 0; }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; min-height: 0; }
  .lp-stage { height: 380px; margin-top: 8px; }
  .lp-binder { width: 92%; }
  .lp-feature, .lp-feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .lp-feature.flip .lp-copy { order: 0; }
  .lp-section { padding-top: 64px; padding-bottom: 64px; }
  .lp-steps ol { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lp-stage { height: 300px; }
  .lp-demo { padding: 18px; min-height: 0; }
  .lp-suggest-demo, .lp-price-demo { grid-template-columns: 1fr; }
  .lp-price-card { width: 60%; margin: 0 auto; }
  .lp-stats dt { font-size: 22px; }
  .lp-searchbar { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-aurora, .lp-float, .lp-float::after, .lp-caret { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .dialog.settings.sheet { width: 100%; max-width: 100%; }
  .settings-body { max-height: 88vh; padding: 4px 16px 24px; }
  .set-row select { max-width: 160px; }
}
