/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --page: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --hover: #f1f1f2;
  --line: #e7e7e9;
  --line-dash: #dcdce0;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #8a8a93;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #ffffff;
  --fav: #e11d48;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.04);
  --shadow-lg: 0 24px 64px -16px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.06);
  --radius: 14px;
  --sidebar-w: 232px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c; --page: #0b0b0c; --surface: #141416; --surface-2: #1b1b1e; --hover: #1f1f23;
    --line: #26262b; --line-dash: #2c2c32; --text: #f4f4f5; --text-2: #b4b4bb; --text-3: #7c7c85;
    --accent: #3b82f6; --accent-hover: #60a5fa;
    --shadow: 0 0 0 1px rgba(255,255,255,.06); --shadow-lg: 0 24px 64px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --page: #0b0b0c; --surface: #141416; --surface-2: #1b1b1e; --hover: #1f1f23;
  --line: #26262b; --line-dash: #2c2c32; --text: #f4f4f5; --text-2: #b4b4bb; --text-3: #7c7c85;
  --accent: #3b82f6; --accent-hover: #60a5fa;
  --shadow: 0 0 0 1px rgba(255,255,255,.06); --shadow-lg: 0 24px 64px -16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Frame ──────────────────────────────────────────── */
.frame {
  max-width: 1340px; margin: 0 auto; min-height: 100vh;
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  background: var(--bg);
  border-inline: 1px dashed var(--line-dash);
}

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px dashed var(--line-dash);
  padding: 0 16px 16px; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; height: 56px; margin: 0 -16px; padding: 0 20px; border-bottom: 1px dashed var(--line-dash); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #93c5fd, #2563eb 55%, #1e3a8a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.brand-name { font-size: 17px; letter-spacing: -.02em; color: var(--text-2); }
.sidebar-intro { color: var(--text-2); font-size: 13px; line-height: 1.55; margin: 18px 4px 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sidebar-section { margin-top: 20px; }
.sidebar-label { font-size: 12px; font-weight: 500; color: var(--text-3); margin: 0 4px 6px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 8px; border-radius: 8px; color: var(--text-2); text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="true"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.nav-item .count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.nav-item svg { color: var(--text-3); }
.nav-item[aria-current="true"] svg { color: var(--accent); }
.sidebar-label-row { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 6px; }
.sidebar-label-row .sidebar-label { margin: 0; }
.sidebar-label-row .count { font: 11px var(--mono); color: var(--text-3); }
.cat-filter { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; margin-bottom: 6px; border-radius: 8px; background: var(--surface-2); color: var(--text-3); }
.cat-filter svg { width: 14px; height: 14px; }
.cat-filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; }
.cat-filter input::-webkit-search-cancel-button { display: none; }
.nav-item.cat { padding: 5px 8px; font-size: 13px; }
.nav-item.cat.zero { color: var(--text-3); }
.nav-item.cat.zero .count { opacity: .6; }
.nav-item[aria-current="true"].cat { color: var(--accent); }
.more-btn { margin: 6px 8px 0; font-size: 12.5px; }
.more-btn[hidden] { display: none; }
.nav-empty { margin: 4px 8px; color: var(--text-3); font-size: 12.5px; }
.sidebar-foot { margin-top: auto; padding-top: 24px; font-size: 11px; color: var(--text-3); line-height: 1.6; }

/* ── Topbar ─────────────────────────────────────────── */
.main { min-width: 0; padding: 0 16px 48px; }
.topbar {
  position: sticky; top: 0; z-index: 10; height: 56px; margin: 0 -16px; padding: 0 16px;
  display: grid; grid-template-columns: 1fr minmax(0, 360px) 1fr; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px dashed var(--line-dash);
}
.topnav { display: flex; gap: 4px; align-items: center; }
.toplink { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.toplink:hover { background: var(--hover); color: var(--text); }
.toplink[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pill-count { font: 11px var(--mono); color: var(--text-3); }
.search {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px;
  background: var(--surface-2); border-radius: 10px; color: var(--text-3);
  transition: box-shadow .15s, background .15s;
}
.search:focus-within { background: var(--surface); box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }
kbd { font: 11px var(--mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.menu-btn { display: none; }
.btn-primary {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 9px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 2px rgba(0,0,0,.2);
}
.btn-primary:hover { opacity: .88; }
.btn-ghost { padding: 7px 14px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); font-weight: 500; }
.btn-ghost:hover { background: var(--hover); }
.link-btn { color: var(--accent); font-weight: 500; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ── Hero ───────────────────────────────────────────── */
.hero { text-align: center; padding: 64px 8px 52px; max-width: 620px; margin: 0 auto; }
.hero h1 { font-size: clamp(21px, 2.3vw, 26px); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; margin: 0 0 12px; text-wrap: balance; }
.hero p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.65; text-wrap: pretty; }

/* ── Page-type chips (Landing, Pricing, About…) ─────── */
.page-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.page-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-weight: 500; font-size: 14px; transition: background .15s, color .15s, opacity .15s; }
.page-chip:hover { background: var(--hover); }
.page-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.page-chip[aria-pressed="true"] .chip-n { color: var(--bg); opacity: .6; }
.page-chip[data-empty="true"]:not([aria-pressed="true"]) { opacity: .45; }
.others-toggle { display: flex; align-items: center; gap: 6px; width: calc(100% - 8px); margin: 0 4px 6px; padding: 0; text-align: left; cursor: pointer; }
.others-toggle .count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.others-toggle svg { width: 13px; height: 13px; transition: transform .15s; }
.others-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.others-toggle:hover { color: var(--text); }
.badge.page { left: auto; right: 46px; background: rgba(0,0,0,.72); }
.sheet-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.sheet-tabs::-webkit-scrollbar { display: none; }
.sheet-tabs button { flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--text-2); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sheet-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* ── Toolbar ────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px;
  color: var(--text-2); font-weight: 500; font-size: 13px; transition: background .15s, color .15s;
}
.chip svg { width: 14px; height: 14px; color: #a855f7; }
.chip-n { font: 11px var(--mono); color: var(--text-3); margin-left: 2px; }
.chip:hover { background: var(--hover); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.segmented button { height: 26px; padding: 0 11px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 13px; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 12px; border-radius: 9px;
  border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: 500 13px var(--font); cursor: pointer;
}
.select svg { position: absolute; right: 9px; pointer-events: none; color: var(--text-3); }
.results-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 22px; margin-bottom: 14px; font-size: 12.5px; color: var(--text-3); }

.active-filters { display: contents; }
.filter-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 9px; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-size: 12px; font-weight: 500; }
.filter-chip svg { width: 13px; height: 13px; color: var(--text-3); }
.filter-chip:hover svg { color: var(--text); }

/* ── Grid & cards ───────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .35s ease both;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 12px 28px -12px rgba(0,0,0,.18); }
.grid.still .card { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card-open { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card-tile {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    color-mix(in srgb, var(--c) 7%, var(--surface-2));
}
.card-tile.has-cover { background: var(--surface-2); overflow: hidden; }
.card-tile .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.card-tile .cover.mobile { object-fit: contain; padding: 10px 0 0; }
.card:hover .card-tile .cover { transform: scale(1.03); }
.card-tile .badge { z-index: 1; }
.card-tile .app-icon { width: 68px; height: 68px; border-radius: 17px; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--c) 60%, transparent), 0 0 0 1px rgba(0,0,0,.06); }
.badge {
  position: absolute; top: 10px; left: 10px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center;
  border-radius: 7px; font-size: 11px; font-weight: 600; background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(6px);
}
.badge.new { background: var(--accent); }
.fav-btn {
  position: absolute; z-index: 2; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text-3);
  opacity: 0; transition: opacity .15s, color .15s;
}
.card:hover .fav-btn, .fav-btn:focus-visible, .fav-btn[aria-pressed="true"] { opacity: 1; }
.fav-btn:hover { color: var(--fav); }
.fav-btn[aria-pressed="true"] { color: var(--fav); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.card-body { display: flex; align-items: center; gap: 10px; padding: 12px; }
.card-body .app-icon { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.card-text { min-width: 0; flex: 1; }
.ai-badge { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .03em; vertical-align: 2px; color: #fff; background: linear-gradient(135deg, #a855f7, #6366f1); }
.card-name { font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tag { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit {
  position: relative; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); flex-shrink: 0; transition: background .15s, transform .15s;
}
.visit:hover { background: var(--accent-hover); transform: rotate(45deg); }
.visit svg { width: 13px; height: 13px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 12px; margin-top: -2px; }
.tag { font-size: 11px; color: var(--text-3); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; }
.tag.price-free { color: #15803d; background: color-mix(in srgb, #22c55e 13%, transparent); }
.tag.price-freemium { color: #0369a1; background: color-mix(in srgb, #0ea5e9 13%, transparent); }
.tag.price-trial { color: #6d28d9; background: color-mix(in srgb, #8b5cf6 13%, transparent); }
.tag.price-enterprise { color: var(--text-2); background: var(--surface-2); }
.tag.oss { color: #0f766e; background: color-mix(in srgb, #14b8a6 14%, transparent); }
.tag.price-paid { color: #b45309; background: color-mix(in srgb, #f59e0b 15%, transparent); }
:root[data-theme="dark"] .tag.price-free { color: #4ade80; }
:root[data-theme="dark"] .tag.price-freemium { color: #38bdf8; }
:root[data-theme="dark"] .tag.price-paid { color: #fbbf24; }
:root[data-theme="dark"] .tag.price-trial { color: #c4b5fd; }
:root[data-theme="dark"] .tag.oss { color: #5eead4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag.price-free { color: #4ade80; }
  :root:not([data-theme="light"]) .tag.price-freemium { color: #38bdf8; }
  :root:not([data-theme="light"]) .tag.price-paid { color: #fbbf24; }
  :root:not([data-theme="light"]) .tag.price-trial { color: #c4b5fd; }
  :root:not([data-theme="light"]) .tag.oss { color: #5eead4; }
}

.app-icon { display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; overflow: hidden; object-fit: cover; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.card-tile .app-icon { font-size: 28px; }

.empty { text-align: center; padding: 64px 16px; color: var(--text-2); }
.empty p { margin: 0 0 14px; }

.about { max-width: 620px; margin: 72px auto 0; padding-top: 28px; border-top: 1px dashed var(--line-dash); color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
.about h2 { font-size: 13px; color: var(--text); margin: 0 0 8px; }
.about a { color: var(--accent); }

/* ── Detail sheet ───────────────────────────────────── */
.sheet {
  width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden;
}
.sheet::backdrop { background: rgba(10,10,12,.45); backdrop-filter: blur(4px); }
.sheet[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.sheet-inner { overflow-y: auto; max-height: calc(100vh - 48px); }
.sheet-hero { position: relative; display: grid; place-items: center; height: 180px;
  background:
    radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    color-mix(in srgb, var(--c) 9%, var(--surface-2)); }
.sheet-hero .app-icon { width: 88px; height: 88px; border-radius: 22px; font-size: 36px; box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--c) 70%, transparent), 0 0 0 1px rgba(0,0,0,.06); }
.sheet-hero.has-shot { height: auto; display: block; padding: 18px 18px 0; }
.sheet-shot { display: block; border-radius: 10px 10px 0 0; overflow: hidden; box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); aspect-ratio: 16 / 10; background: var(--surface); }
.sheet-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sheet-title .app-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.sheet-close { position: absolute; top: 12px; right: 12px; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.sheet-content { padding: 20px 24px 24px; }
.sheet-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-title h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.sheet-cat { color: var(--text-3); font-size: 12.5px; }
.sheet-tagline { margin: 2px 0 0; color: var(--text-2); font-weight: 500; }
.sheet-desc { margin: 0 0 18px; color: var(--text-2); line-height: 1.65; }
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: 0 -24px 18px; padding: 2px 24px 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery .shot { flex: 0 0 auto; height: 200px; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); scroll-snap-align: start; }
.gallery .shot img { height: 100%; width: auto; display: block; }
.gallery .shot:not(.mobile) { width: 320px; } .gallery .shot:not(.mobile) img { width: 100%; object-fit: cover; object-position: top; }
.tag-link { cursor: pointer; } .tag-link:hover { color: var(--accent); }
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; margin: 0 0 22px; font-size: 13px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-accent {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); font-weight: 600;
}
.btn-accent:hover { background: var(--accent-hover); }
.sheet-actions .btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 38px; }
.sheet-actions .btn-ghost[aria-pressed="true"] { color: var(--fav); }
.sheet-actions .btn-ghost[aria-pressed="true"] svg { fill: currentColor; }

/* ── Responsive ─────────────────────────────────────── */
.scrim { display: none; }
@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); border: 0; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: 272px; background: var(--bg);
    transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
  }
  .sidebar.open { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.35); }
  .scrim[hidden] { display: none; }
  .menu-btn { display: grid; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topnav { display: none; }
  .hero { padding: 40px 4px 32px; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .chips, .page-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 16px; scrollbar-width: none; }
  .page-chips::-webkit-scrollbar { display: none; }
  .page-chip { flex-shrink: 0; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .toolbar-right { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-right .select:last-child { grid-column: span 2; }
  .select, .select select { width: 100%; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fav-btn { opacity: 1; }
  .btn-primary { padding: 0 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.nav[hidden], .sidebar-section[hidden] { display: none; }
.sheet-hero.has-shot .sheet-tabs { padding-right: 40px; }

/* ── v4: Lapa Ninja-style toolbar and cards ─────────── */
.toolbar { align-items: center; gap: 12px; }
.toolbar .page-chips { margin: 0; flex: 1; min-width: 0; }
.page-chip { height: 34px; padding: 0 15px; }
.select-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: 500 13px var(--font); cursor: pointer;
}
.select-btn svg { color: var(--text-3); }
.select-btn[aria-expanded="true"] { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
.select select { height: 34px; border-radius: 10px; }
.color-filter { position: relative; }
.color-menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 220px; max-height: 70vh; overflow-y: auto;
  padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.color-menu[hidden] { display: none; }
.color-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.color-opt:hover { background: var(--hover); }
.color-opt .count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.color-opt svg { width: 14px; height: 14px; color: var(--accent); margin-left: 4px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; background: var(--sw, #888); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.08); }
.swatch.sm { width: 11px; height: 11px; display: inline-block; vertical-align: -1px; margin-right: 5px; }
.swatch.rainbow { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #22d3ee, #3b82f6, #a855f7, #ec4899, #ef4444); }

.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 20px; }
.card { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.card:hover { transform: none; box-shadow: none; }
.card-open { border-radius: 14px; }
.card-shot {
  position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .25s ease;
}
.card:hover .card-shot { box-shadow: 0 0 0 1px var(--line-dash), 0 18px 40px -18px rgba(0,0,0,.45); transform: translateY(-3px); }
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; background: #fff; }
.card-shot img.mobile { object-fit: contain; background: var(--surface-2); }
.card-shot.empty { display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--surface-2); }
.card-shot.empty .app-icon { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
.card-shot .fav-btn { z-index: 2; }
.card:hover .fav-btn { opacity: 1; }
.card-info { padding: 12px 2px 0; }
.card-name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.card-cats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; color: var(--text-3); font-size: 14px; }
.card-name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sponsor-label { flex-shrink: 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.card-tagline { margin-top: 3px; color: var(--text-3); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.sponsor .card-shot img { background: var(--surface-2); }
.sheet-shot { aspect-ratio: 4 / 5; max-height: 60vh; }
@media (max-width: 900px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .page-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 16px; scrollbar-width: none; }
  .toolbar .page-chips::-webkit-scrollbar { display: none; }
  .toolbar .page-chip { flex-shrink: 0; }
}
@media (max-width: 600px) {
  .toolbar-right { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-right .select:last-child { grid-column: auto; }
  .select-btn { width: 100%; }
  .color-menu { left: 0; right: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card-name { font-size: 14px; }
  .card-cats, .card-tagline { font-size: 12.5px; }
  .fav-btn { opacity: 1; }
}
.toolbar .page-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 24px; }
.toolbar .page-chips::-webkit-scrollbar { display: none; }
.toolbar .page-chip { flex-shrink: 0; height: 32px; padding: 0 13px; font-size: 13.5px; }
.toolbar-right { flex-shrink: 0; }

/* ══ v5: top navigation, tabs, masonry, stack ══════════════ */
body.app { background: var(--bg); }
.page { max-width: 1480px; margin: 0 auto; padding: 0 24px 48px; }

/* Top bar */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav-inner { max-width: 1480px; margin: 0 auto; height: 64px; padding: 0 20px; display: grid; grid-template-columns: auto 1fr minmax(200px, 300px) 1fr auto; align-items: center; gap: 16px; }
.nav-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; transition: transform .2s ease; }
.nav-logo:hover { transform: rotate(-8deg) scale(1.05); }
.nav-logo .brand-mark { width: 28px; height: 28px; }
.tabs { position: relative; display: flex; align-items: center; gap: 2px; grid-column: 2; justify-self: start; }
.tab { position: relative; z-index: 1; padding: 8px 12px; border-radius: 10px; color: var(--text-3); font-weight: 500; font-size: 14px; transition: color .2s ease; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); }
.tab-pill { position: absolute; z-index: 0; left: 0; top: 50%; height: 34px; margin-top: -17px; border-radius: 10px; background: var(--surface-2); opacity: 0;
  transition: transform .32s cubic-bezier(.3, .8, .25, 1), width .32s cubic-bezier(.3, .8, .25, 1), opacity .2s, background .2s; pointer-events: none; }
.tabs.hovering .tab-pill { background: var(--hover); }
.nav .search { grid-column: 3; height: 38px; border-radius: 12px; padding: 0 12px; }
.nav .search input { font-size: 14px; }
.nav-actions { grid-column: 5; display: flex; align-items: center; gap: 8px; justify-self: end; }
.search-toggle { display: none; }
.sponsor-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 12px; border-radius: 99px; border: 1px solid var(--line-dash); color: var(--text-2); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s, border-color .15s; }
.sponsor-btn svg { color: #ec4899; width: 15px; height: 15px; }
.sponsor-btn:hover, .sponsor-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); border-color: var(--line); }
.avatar-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #0f9d8a, #0d7a6b); color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); transition: transform .15s; }
.avatar-btn:hover { transform: scale(1.05); }
.avatar-btn svg { width: 19px; height: 19px; }
.split-btn { display: inline-flex; height: 38px; border-radius: 12px; background: var(--text); color: var(--bg); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.split-main { padding: 0 14px 0 16px; font-weight: 600; font-size: 14px; color: inherit; transition: background .15s; }
.split-more { width: 34px; display: grid; place-items: center; color: inherit; border-left: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); transition: background .15s; }
.split-main:hover, .split-more:hover, .split-more[aria-expanded="true"] { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.split-more svg { width: 15px; height: 15px; transition: transform .2s; }
.split-more[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Popovers & menus */
.pop-wrap { position: relative; }
.popover { position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); animation: popIn .16s ease; }
.popover[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14px; }
.menu > button:hover, .menu > button:focus-visible { background: var(--hover); }
.menu button .count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.menu button b { display: block; font-weight: 600; font-size: 14px; }
.menu button small { display: block; color: var(--text-3); font-size: 12.5px; }
.menu-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 15px; flex-shrink: 0; }
.menu-head { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.menu-note { padding: 6px 10px 6px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 4px; }
.sponsor-pop { width: 300px; padding: 16px; }
.sponsor-pop .pop-title { font-weight: 600; margin-bottom: 6px; }
.sponsor-pop p { margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.sponsor-pop .muted-note { margin: 0; color: var(--text-3); }

/* Tooltip & hover card */
.tooltip { position: fixed; z-index: 100; top: 0; left: 0; max-width: 260px; padding: 6px 9px; border-radius: 8px; background: #111; color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.35; pointer-events: none; opacity: 0; transition: opacity .12s ease; box-shadow: 0 6px 20px -6px rgba(0,0,0,.4); }
:root[data-theme="light"] .tooltip { background: #18181b; }
.tooltip.show { opacity: 1; }
.tooltip[hidden] { display: none; }
.hovercard { position: fixed; z-index: 90; top: 0; left: 0; width: 260px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .14s ease; }
.hovercard.show { opacity: 1; }
.hovercard[hidden] { display: none; }
.hc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.hc-head b { display: block; font-size: 14.5px; }
.hc-head span { color: var(--text-3); font-size: 13px; }
.hc-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; flex-shrink: 0; }
.hc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hc-actions { display: flex; gap: 6px; }
.hc-primary, .hc-secondary { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font-weight: 500; font-size: 13px; }
.hc-primary { flex: 1; justify-content: center; background: var(--text); color: var(--bg); }
.hc-primary:hover { opacity: .88; }
.hc-secondary { background: var(--surface-2); }
.hc-secondary:hover { background: var(--hover); }
.hc-primary svg, .hc-secondary svg { width: 14px; height: 14px; }
.x-mark { width: 13px !important; height: 13px !important; }

/* Hero & toolbar */
.app .hero { padding: 56px 8px 36px; max-width: 680px; }
.app .hero h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.app .toolbar { position: sticky; top: 64px; z-index: 20; margin: 0 -24px 6px; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.toolbar-right { display: flex; gap: 8px; align-items: center; }
.toolbar-right[hidden] { display: none; }
.page-chip { transition: background .2s ease, color .2s ease, transform .15s ease, opacity .2s; }
.page-chip:active { transform: scale(.96); }
.dd { position: relative; }
.dd-menu { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; width: 230px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); animation: popIn .14s ease; }
.dd-menu[hidden] { display: none; }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.dd-opt:hover { background: var(--hover); }
.dd-opt .count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.dd-opt svg { width: 14px; height: 14px; color: var(--accent); }
.select-btn span { white-space: nowrap; }
.loading { padding: 80px 0; text-align: center; color: var(--text-3); }

/* Masonry (interactions & designs) */
.masonry { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 18px; align-items: start; }
.m-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.m-card { position: relative; border-radius: 28px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); animation: rise .4s ease both; transition: box-shadow .25s ease, transform .3s cubic-bezier(.3,.8,.25,1); }
.m-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-dash), 0 22px 44px -22px rgba(0,0,0,.5); }
.m-frame { position: relative; padding-top: var(--ratio); }
.m-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); }
.m-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); font-size: 13px; }
.m-shade { position: absolute; inset: auto 0 0 0; padding: 40px 18px 18px 64px; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.m-card:hover .m-shade { opacity: 1; }
.m-title { display: block; color: #fff; font-size: 13.5px; font-weight: 500; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-card .card-open { border-radius: 28px; }
.m-card .fav-btn { top: 12px; right: 12px; border-radius: 50%; }
.m-avatar { position: absolute; z-index: 3; left: 14px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%; padding: 0; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 4px 12px rgba(0,0,0,.3); transition: transform .2s cubic-bezier(.3,.8,.25,1); }
.m-avatar:hover, .m-avatar:focus-visible { transform: scale(1.12); }
.m-avatar-img { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; font-size: 15px; }
.m-avatar-img img { width: 100%; height: 100%; object-fit: cover; }

/* Viewer */
.viewer { width: min(920px, calc(100vw - 32px)); }
.viewer-media { position: relative; max-height: 70vh; width: 100%; background: #000; display: grid; place-items: center; overflow: hidden; }
.viewer-media video, .viewer-media img { width: 100%; height: 100%; max-height: 70vh; object-fit: contain; display: block; }
.viewer-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.viewer-author b { display: block; }
.viewer-author a { color: var(--text-3); font-size: 13px; }
.viewer-title { margin: 0 0 6px; font-size: 19px; letter-spacing: -.015em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.credit { margin: 14px 0 0; font-size: 12px; color: var(--text-3); }
.btn-accent .x-mark { margin-right: -2px; }

/* Stack */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.tool { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform .25s cubic-bezier(.3,.8,.25,1), box-shadow .25s; animation: rise .35s ease both; }
.tool:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-dash), 0 18px 36px -20px rgba(0,0,0,.45); }
.tool .card-open { border-radius: 20px; }
.tool-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tool-icon { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.tool-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.tool-cat { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tool .fav-btn { position: relative; top: auto; right: auto; margin-left: auto; z-index: 2; }
.tool-name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.tool-badge { margin-left: 6px; color: #f5b301; font-size: 13px; position: relative; z-index: 2; }
.tool-desc { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; flex: 1; }
.tool-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--text-3); font-size: 12.5px; }
.tool-link svg { width: 12px; height: 12px; transition: transform .2s; }
.tool:hover .tool-link svg { transform: translate(2px, -2px); }

/* Submit modal */
.modal { width: min(460px, calc(100vw - 32px)); }
.modal-form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.seg-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg-tabs button { height: 34px; border-radius: 9px; font-weight: 500; font-size: 13.5px; color: var(--text-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg-tabs button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal-form .field { display: flex; flex-direction: column; gap: 6px; }
.modal-form .field span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.modal-form .field i { font-style: normal; color: var(--text-3); font-weight: 400; }
.modal-form input, .modal-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-dash); background: var(--surface); color: var(--text); font: inherit; outline: 0; transition: border-color .15s, box-shadow .15s; resize: vertical; }
.modal-form input:focus, .modal-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.modal-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0; color: #ef4444; font-size: 13px; }
.submit-go { justify-content: center; height: 42px; }
.submit-go:disabled { opacity: .6; }
.modal-done { text-align: center; padding: 18px 8px 6px; }
.modal-done > svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
.modal-done h2 { margin: 12px 0 6px; }
.modal-done p { color: var(--text-2); margin: 0 0 18px; }

.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }

/* Responsive */
@media (max-width: 1100px) { .hide-md { display: none; } .sponsor-btn { padding: 0; width: 38px; justify-content: center; } }
@media (max-width: 900px) {
  .nav-inner { grid-template-columns: auto 1fr auto; height: auto; padding: 10px 16px 0; row-gap: 6px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px 8px; justify-self: stretch; }
  .tabs::-webkit-scrollbar { display: none; }
  .nav .search { display: none; grid-column: 1 / -1; grid-row: 3; margin-bottom: 10px; }
  body.search-open .nav .search { display: flex; }
  .search-toggle { display: grid; }
  .nav-actions { grid-column: 3; grid-row: 1; }
  .app .toolbar { top: 104px; }
  .page { padding: 0 16px 40px; }
  .app .toolbar { margin: 0 -16px 6px; padding: 10px 16px; }
}
@media (max-width: 600px) {
  .split-main { padding: 0 12px; }
  .app .hero { padding: 28px 4px 22px; }
  .masonry, .m-col { gap: 12px; }
  .m-card, .m-card .card-open { border-radius: 20px; }
  .toolbar-right { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .dd-menu { left: 0; right: auto; }
  .toolbar-right .dd:last-child .dd-menu { left: auto; right: 0; }
  .select-btn { width: 100%; justify-content: space-between; }
  .popover { position: fixed; top: 60px; right: 12px; left: 12px; min-width: 0; }
  .sponsor-pop { width: auto; }
}
.hc-primary, .hc-secondary { white-space: nowrap; }

/* Tools (curated resources) */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 20px; }
.rtool { position: relative; animation: rise .35s ease both; }
.rtool .card-open { border-radius: 16px; }
.rtool-shot { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); transition: transform .3s cubic-bezier(.3,.8,.25,1), box-shadow .25s; }
.rtool:hover .rtool-shot { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-dash), 0 20px 40px -20px rgba(0,0,0,.5); }
.rtool-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.rtool-shot.empty { display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 25%, transparent), transparent 70%), var(--surface-2); }
.rtool-shot .fav-btn { z-index: 2; }
.rtool:hover .fav-btn { opacity: 1; }
.rtool-visit { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 500; backdrop-filter: blur(6px); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.rtool-visit svg { width: 12px; height: 12px; }
.rtool:hover .rtool-visit { opacity: 1; transform: none; }
.rtool-info { display: flex; gap: 12px; padding: 14px 2px 0; }
.rtool-icon { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 600; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.rtool-icon img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.rtool-text { min-width: 0; }
.rtool-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }
.rtool-name .tool-badge { margin: 0; }
.free-badge { position: relative; z-index: 2; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; display: inline-grid; place-items: center; color: #15803d; background: color-mix(in srgb, #22c55e 15%, transparent); }
:root[data-theme="dark"] .free-badge { color: #4ade80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .free-badge { color: #4ade80; } }
.rtool-tag { margin-top: 2px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rtool-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.rtool-maker a { position: relative; z-index: 2; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-dash); text-underline-offset: 2px; }
.rtool-maker a:hover { color: var(--text); }
.seg-tabs { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) { .tools-grid { gap: 22px; } .seg-tabs { grid-template-columns: repeat(2, 1fr); } }

/* ══ v7: left sidebar, Skills, Collections ═════════════════ */
:root { --side-w: 236px; }
body.side-collapsed { --side-w: 68px; }
body.with-side { padding-left: var(--side-w); transition: padding-left .25s cubic-bezier(.3,.8,.25,1); }
.sidenav { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; padding: 12px 10px 14px; background: var(--bg); border-right: 1px solid color-mix(in srgb, var(--line) 80%, transparent); transition: width .25s cubic-bezier(.3,.8,.25,1), transform .25s ease; overflow: hidden; }
.sidenav-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 40px; margin-bottom: 14px; padding: 0 2px 0 6px; }
.side-logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-logo .brand-mark { width: 26px; height: 26px; flex-shrink: 0; transition: transform .2s ease; }
.side-logo:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }
.side-logo .side-text { font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.side-collapse { width: 30px; height: 30px; color: var(--text-3); flex-shrink: 0; }
.side-collapse:hover { color: var(--text); }
.side-links { position: relative; display: flex; flex-direction: column; gap: 2px; }
.side-group { padding: 14px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.side-group:first-of-type { padding-top: 2px; }
.side-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .2s ease; }
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3); transition: color .2s ease, transform .2s ease; }
.side-link:hover { color: var(--text); }
.side-link:hover svg { color: var(--text-2); transform: scale(1.06); }
.side-link[aria-current="page"] { color: var(--text); }
.side-link[aria-current="page"] svg { color: var(--accent); }
.side-count { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
#saved-count.has { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: color-mix(in srgb, #ec4899 18%, transparent); color: #ec4899; font-weight: 600; }
.side-pill { position: absolute; z-index: 0; left: 0; top: 0; border-radius: 10px; background: var(--surface-2); opacity: 0; pointer-events: none;
  transition: transform .3s cubic-bezier(.3,.8,.25,1), height .3s cubic-bezier(.3,.8,.25,1), width .25s ease, opacity .2s, background .2s; }
.side-links.hovering .side-pill { background: var(--hover); }
.side-foot { margin-top: auto; padding: 0 10px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.side-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.45); }
.side-scrim[hidden] { display: none; }
/* Collapsed: icons only */
body.side-collapsed .side-text, body.side-collapsed .side-count, body.side-collapsed .side-foot { opacity: 0; pointer-events: none; }
body.side-collapsed .side-group { height: 1px; padding: 0; margin: 12px 10px; background: var(--line); color: transparent; overflow: hidden; }
body.side-collapsed .sidenav-top { flex-direction: column; height: auto; gap: 10px; padding: 0; }
body.side-collapsed .side-link { justify-content: center; padding: 0; }
body.side-collapsed #saved-count.has { opacity: 1; position: absolute; top: 2px; right: 4px; min-width: 16px; height: 14px; font-size: 9.5px; padding: 0 4px; }
.side-text, .side-count { transition: opacity .15s ease; }

/* Top bar (with sidebar) */
body.with-side .nav-inner { max-width: none; grid-template-columns: auto auto minmax(200px, 520px) 1fr; padding: 0 24px; }
body.with-side .nav .search { grid-column: 3; justify-self: stretch; }
body.with-side .nav-actions { grid-column: 4; }
.side-open, body.with-side .nav-logo { display: none; }
body.with-side .page { max-width: 1520px; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.skill { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform .25s cubic-bezier(.3,.8,.25,1), box-shadow .25s; animation: rise .35s ease both; }
.skill:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-dash), 0 18px 36px -20px rgba(0,0,0,.45); }
.skill .card-open { border-radius: 18px; }
.skill-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.skill-author { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); min-width: 0; }
.skill-av { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.skill-av img { width: 100%; height: 100%; object-fit: cover; }
.official-badge { position: relative; z-index: 2; height: 19px; padding: 0 7px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600; color: #d97757; background: color-mix(in srgb, #d97757 15%, transparent); }
.skill .fav-btn { position: relative; top: auto; right: auto; margin-left: auto; z-index: 2; }
.skill:hover .fav-btn, .tool:hover .fav-btn { opacity: 1; }
.skill-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.skill-desc { margin: 0; flex: 1; color: var(--text-2); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skill-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.skill-cat { height: 22px; padding: 0 8px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--surface-2); font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.skill-repo { font: 11px var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer[data-mode="skill"] { width: min(640px, calc(100vw - 32px)); }
.skill-hero { position: relative; padding: 26px 24px 8px; background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, #d97757 16%, transparent), transparent 60%); }
.skill-hero-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.skill-hero .sheet-desc { margin-bottom: 0; }
.skill-hero .sheet-close { top: 14px; right: 14px; }
.howto { margin: 4px 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.howto-title { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.howto ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.howto code { font: 12px var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--surface); }

/* Collections */
.col-section { margin-bottom: 44px; }
.col-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.col-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.col-head .count { font: 12px var(--mono); color: var(--text-3); }
.col-head .link-btn { margin-left: auto; }

/* Mobile: sidebar becomes a drawer */
@media (max-width: 900px) {
  body.with-side, body.side-collapsed { --side-w: 0px; padding-left: 0; }
  .sidenav { width: 264px; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.side-open .sidenav { transform: none; }
  body.side-collapsed .side-text, body.side-collapsed .side-count, body.side-collapsed .side-foot { opacity: 1; }
  .side-collapse { display: none; }
  .side-open, body.with-side .nav-logo { display: grid; }
  body.with-side .nav-inner { grid-template-columns: auto auto 1fr auto; height: 60px; padding: 0 12px; row-gap: 0; }
  body.with-side .nav .search { display: none; grid-column: 1 / -1; grid-row: 2; margin-bottom: 10px; }
  body.with-side.search-open .nav .search { display: flex; }
  body.with-side.search-open .nav-inner { height: auto; padding-top: 10px; }
  body.with-side .nav-actions { grid-column: 4; grid-row: 1; }
  body.with-side .app .toolbar, body.with-side .toolbar { top: 60px; }
}
body.side-collapsed .side-link .side-text, body.side-collapsed .side-logo .side-text, body.side-collapsed .side-link .side-count:not(.has) { display: none; }
body.side-collapsed .side-link { gap: 0; }
@media (max-width: 900px) { body.side-collapsed .side-link .side-text, body.side-collapsed .side-logo .side-text, body.side-collapsed .side-link .side-count { display: inline; } body.side-collapsed .side-link { justify-content: flex-start; padding: 0 10px; gap: 11px; } }

/* ══ v8: compact search, icon filters, chip overflow, settings ═══ */
/* Search: a small pill that expands when clicked */
body.with-side .nav-inner { grid-template-columns: auto auto 1fr auto; }
body.with-side .nav .search { grid-column: 3; justify-self: center; width: 220px; max-width: 100%; height: 36px; border-radius: 99px; padding: 0 12px; cursor: text;
  transition: width .38s cubic-bezier(.3,.8,.25,1), background .2s, box-shadow .2s; }
body.with-side .nav .search:hover { background: var(--hover); }
body.with-side .nav .search:focus-within, body.with-side .nav .search.has-value { width: min(480px, 100%); }
.nav .search kbd { transition: opacity .2s; }
.nav .search:focus-within kbd { opacity: 0; }

/* Chips: All · a few · +N more */
.page-chip[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18); }
.page-chip[aria-pressed="true"] .chip-n { color: #fff; opacity: .7; }
.page-chip.more { gap: 6px; color: var(--text-2); }
.page-chip.more svg { width: 14px; height: 14px; transition: transform .2s; }
.page-chip.more[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.page-chip.more[aria-expanded="true"] svg { transform: rotate(180deg); }
.chip-more { flex-shrink: 0; }
.chip-more .dd-menu { left: 0; right: auto; width: 220px; }
.toolbar .page-chips { -webkit-mask-image: none; mask-image: none; overflow: visible; flex-wrap: wrap; padding-right: 0; }
.dd-opt[data-empty="true"] { opacity: .45; }

/* Icon buttons (filter, sort) */
.toolbar-right { gap: 6px; }
.tb-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--text-2); background: var(--surface-2); transition: background .15s, color .15s, transform .15s; }
.tb-icon:hover, .tb-icon[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.tb-icon:active { transform: scale(.94); }
.tb-icon svg { width: 18px; height: 18px; }
.tb-icon.is-active { color: var(--accent); }
.tb-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface-2); }
.dd-menu.wide { width: 260px; }
.dd-head { padding: 8px 9px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.swatch-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px 6px 8px; }
.swatch-btn { display: grid; place-items: center; height: 30px; border-radius: 8px; transition: background .15s, transform .15s; }
.swatch-btn:hover { background: var(--hover); transform: scale(1.08); }
.swatch-btn .swatch { width: 18px; height: 18px; }
.swatch-btn[aria-pressed="true"] { background: var(--hover); box-shadow: inset 0 0 0 2px var(--accent); }
.swatch-btn[data-empty="true"] { opacity: .35; }
.dd-clear { width: 100%; margin-top: 4px; padding: 8px; border-top: 1px solid var(--line); color: var(--accent); font-weight: 500; font-size: 13px; text-align: left; }

/* Settings popover */
.settings-btn { width: 36px; height: 36px; border-radius: 11px; }
.settings-btn svg { width: 18px; height: 18px; transition: transform .5s cubic-bezier(.3,.8,.25,1); }
.settings-btn[aria-expanded="true"] { background: var(--hover); }
.settings-pop { width: 290px; padding: 14px; }
.settings-pop .pop-title { font-weight: 600; margin-bottom: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row.col { flex-direction: column; align-items: stretch; }
.set-label { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
.set-label svg { width: 18px; height: 18px; color: var(--text-2); }
.set-label small { display: block; font-weight: 400; font-size: 12px; color: var(--text-3); }
.switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--line-dash); transition: background .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .22s cubic-bezier(.3,.8,.25,1); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.seg-tabs.two { grid-template-columns: 1fr 1fr; }
.seg-tabs.two button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-tabs.two svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  body.with-side .nav .search { display: none; width: auto; justify-self: stretch; }
  body.with-side.search-open .nav .search { display: flex; }
  .settings-btn { display: grid; }
}
@media (max-width: 600px) {
  .toolbar-right { display: flex; justify-content: flex-end; }
  .toolbar .page-chips { flex-wrap: nowrap; overflow-x: auto; }
  .chip-more .dd-menu { position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
  .toolbar-right .dd-menu { left: auto; right: 0; }
}
header.nav { display: block; gap: 0; }
header.nav .nav-inner { width: 100%; }

/* Save-to-Collections: white bookmark */
.fav-btn { color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(255,255,255,.12); transition: opacity .15s, background .15s, transform .15s; }
.fav-btn:hover { color: #fff; background: rgba(0,0,0,.65); transform: scale(1.06); }
.fav-btn[aria-pressed="true"] { color: #fff; }
.fav-btn[aria-pressed="true"] svg { fill: #fff; }
.fav-btn svg { width: 16px; height: 16px; }
/* On plain card surfaces (tools in the Stack grid, skills) keep it visible in light mode too */
:root[data-theme="light"] .skill .fav-btn, :root[data-theme="light"] .tool .fav-btn { background: #18181b; }
.sheet-actions .btn-ghost[aria-pressed="true"] { color: var(--text); }
.sheet-actions .btn-ghost[aria-pressed="true"] svg { fill: currentColor; }

/* ══ Wake slider ══════════════════════════════════════════
   js/wake-slider.js (after Bencho's WakeSlider, MIT). Thin bars, the reading
   beside them. The bars are data marks, so they take the ink strengths: ink
   when lit, faint after the value. Heights are written by the component.
   Bencho's tokens are mapped to this site's own: --fill-on (ink) is --text and
   --fill-slab (the ground the bars sit on) is --page, so it follows the theme. */
.wks {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  color: var(--text);}

.wks-track {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 6px;}

.wks-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.wks-bar {
  flex: none;
  width: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text) 32%, var(--page));
  transform-origin: 50% 50%;
  transition: background-color 160ms ease;}

.wks-bar[data-on] { background: var(--text); }

.wks-value {
  min-width: 3ch;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--text) 72%, var(--page));}

/* ── Feed cards (Best of the Week, Explore, Trending, Latest) ── */
.card-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--text-3); min-width: 0; }
.card-sub span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind-tag { flex: none; color: var(--text-2); font-weight: 500; }
.card-shot img.fit-center { object-position: center; }
.card-shot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-shot .play-badge { position: absolute; left: 10px; bottom: 10px; width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); }
.card-shot .play-badge svg { width: 12px; height: 12px; }
.card-shot.empty .tool-icon, .card-shot.empty .app-icon { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; }
.skill-tile { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 20px; background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%), var(--surface-2); }
.skill-tile b { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; color: var(--text); }
.skill-tile span { font-size: 13px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rank { position: absolute; left: 10px; top: 10px; z-index: 2; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; font: 600 12.5px var(--font); font-variant-numeric: tabular-nums; background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.rank.top { background: var(--accent); color: #fff; }
.feed-note { margin: -4px 0 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.col-desc { margin: -8px 0 16px; font-size: 13.5px; color: var(--text-3); max-width: 70ch; }
.more-row { display: flex; justify-content: center; margin: 8px 0 40px; }

/* ── Best of the Week ── */
.week-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.week-kicker { font: 500 12px var(--mono); letter-spacing: .02em; color: var(--text-3); margin-bottom: 6px; }
.week-head h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.25; }
.week-head p { margin: 8px 0 0; max-width: 64ch; color: var(--text-2); font-size: 14.5px; line-height: 1.6; text-wrap: pretty; }
.week-arrows { display: flex; gap: 8px; flex: none; }
.week-arrows .tb-icon svg { width: 16px; height: 16px; }
.week-arrows .tb-icon[disabled] { opacity: .35; pointer-events: none; }
.carousel {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 24vw, 320px); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 8px 2px 10px; margin: -8px -2px 0;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { scroll-snap-type: none; }
.pick { scroll-snap-align: start; min-width: 0; }
.pick .card { animation: rise .35s ease both; }
.pick-n { font: 500 12px var(--mono); color: var(--text-3); margin-right: 2px; }
.pick-note { margin: 8px 2px 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.carousel-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 40px; }
.carousel-foot .wks { padding: 4px 0; margin-left: -2px; }
.carousel-hint { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
@media (max-width: 700px) {
  .carousel { grid-auto-columns: 78%; gap: 14px; }
  .week-arrows, .carousel-hint { display: none; }
  .week-head h2 { font-size: 19px; }
}
.carousel-foot[hidden] { display: none; }

/* Best App Sites: one Submit button, and the platforms under each card name */
.split-btn.solo { padding: 0 16px; color: var(--bg); align-items: center; }
.split-btn.solo:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.card-plat { margin-top: 2px; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Sponsors: sidebar card (one at a time, with dots) ── */
.side-sponsor { margin: auto 0 12px; padding: 0 2px; }
.side-sponsor + .side-foot { margin-top: 0; }
body.side-collapsed .side-sponsor { display: none; }
.ss-track { display: grid; }
.ss-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.ss-slide.on { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.ss-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 12px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none;
  transition: box-shadow .15s, background .15s;
}
.ss-card:hover { box-shadow: inset 0 0 0 1px var(--line-dash); background: var(--surface-2); }
.ss-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ss-logo {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, #6b7280) 22%, var(--surface-2)); box-shadow: 0 0 0 1px var(--line);
  font-weight: 700; font-size: 15px; color: var(--text);
}
.ss-logo img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.ss-logo.plus { background: none; box-shadow: inset 0 0 0 1px var(--line-dash); color: var(--text-3); font-weight: 400; font-size: 20px; }
.ss-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ss-meta b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-meta span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-top: 2px; }
.ss-text { color: var(--text-2); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ss-btn {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-text, #fff); font-size: 13px; font-weight: 600;
}
.ss-btn svg { width: 13px; height: 13px; }
.ss-card.open .ss-btn { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.ss-card.open:hover .ss-btn { background: var(--hover); }
.ss-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.ss-dot { width: 18px; height: 14px; display: grid; place-items: center; }
.ss-dot::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--text-3); opacity: .5; transition: width .25s, opacity .2s; }
.ss-dot[aria-current="true"]::before { width: 14px; opacity: 1; background: var(--text-2); }
@media (max-height: 640px) { .side-sponsor { display: none; } }

/* ── Sponsor page ── */
body[data-tab="sponsor"] #hero, body[data-tab="sponsor"] .toolbar, body[data-tab="sponsor"] .results-meta, body[data-tab="sponsor"] #empty { display: none; }
.sp-page { max-width: 1040px; margin: 0 auto; padding: 40px 0 24px; display: flex; flex-direction: column; gap: 88px; }
.sp-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.sp-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 48px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
.sp-hero > p { margin: 0; max-width: 34em; color: var(--text-2); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.sp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 620px); margin: 14px 0 6px; }
.sp-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-stat b { font-size: 36px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.sp-stat span { color: var(--text-3); font-size: 13px; }
.sp-cta { height: 42px; padding: 0 20px; border-radius: 99px; }
.sp-cta.is-off { background: var(--surface-2); color: var(--text-3); cursor: default; box-shadow: inset 0 0 0 1px var(--line); }
.sp-current { text-align: center; }
.sp-current h2, .sp-faq h2 { margin: 0 0 20px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sp-faq h2 { font-size: 26px; letter-spacing: -.02em; text-align: center; margin-bottom: 24px; }
.sp-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.sp-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; text-decoration: none; }
.sp-logo .ss-logo { width: 30px; height: 30px; border-radius: 8px; }
.sp-lead { max-width: 36em; margin: 0 auto 36px; text-align: center; color: var(--text-3); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.sp-lead b { color: var(--text); font-weight: 600; }
.sp-previews { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.sp-prev { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-prev figcaption { color: var(--text-3); font-size: 14px; line-height: 1.5; text-align: center; padding: 0 12px; }
.sp-frame { position: relative; height: 340px; overflow: hidden; border-radius: 18px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(0,0,0,.6); }
.sp-frame::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--page)); pointer-events: none; }
/* Gallery preview: the real cards at half size */
.sp-mock-feed { zoom: .5; padding: 36px; pointer-events: none; }
.sp-mock-feed .grid { grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.sp-mock-feed .card { animation: none; }
.sp-sample .card-shot { box-shadow: 0 0 0 3px var(--accent), 0 24px 50px -20px color-mix(in srgb, var(--accent) 60%, transparent); }
.sp-sample-shot {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: 56px 28px 0;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%), var(--surface-2);
}
.sp-sample-shot .sp-s-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); box-shadow: 0 10px 30px -8px var(--accent); }
.sp-sample-shot b { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.sp-sample-shot i { display: block; width: 78%; height: 10px; border-radius: 99px; background: var(--line-dash); }
.sp-sample-shot i.short { width: 52%; }
.sp-sample-shot .sp-s-btn { width: 120px; height: 34px; border-radius: 99px; background: var(--text); margin-top: 6px; }
.sp-sample-shot .sp-s-device { width: 72%; flex: 1; margin-top: 18px; border-radius: 22px 22px 0 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
/* Sidebar preview: the real sidebar card in a small sidebar */
.sp-mock-side { display: flex; height: 100%; pointer-events: none; }
.sp-ms-bar { width: 216px; flex-shrink: 0; display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--bg); }
.sp-ms-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin: 0 6px 14px; }
.sp-ms-brand .brand-mark { width: 18px; height: 18px; }
.sp-ms-group { margin: 8px 8px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sp-ms-link { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.sp-ms-link span + span { color: var(--text-3); font-size: 11.5px; }
.sp-ms-link.on { background: var(--hover); color: var(--text); }
.sp-ms-card .ss-card { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 3px var(--accent); }
.sp-ms-card .ss-logo { background: var(--accent); }
.sp-ms-page { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 56px 16px 0; align-content: start; }
.sp-ms-page i { aspect-ratio: 4 / 5; border-radius: 10px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
/* Points, questions, price */
.sp-points { max-width: 30em; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.sp-points p { margin: 0; color: var(--text-3); font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }
.sp-points b { color: var(--text); font-weight: 600; }
.sp-faq { width: min(100%, 640px); margin: 0 auto; }
.sp-faq details { border-bottom: 1px solid var(--line); }
.sp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15.5px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; transition: transform .2s; }
.sp-faq details[open] summary svg { transform: rotate(180deg); }
.sp-faq details p { margin: -4px 0 18px; color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 36em; }
.sp-else { margin: 22px 0 0; text-align: center; color: var(--text-3); font-size: 14.5px; }
.sp-else a, .sp-mail a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.sp-price { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 24px; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-spots { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13.5px; }
.sp-dots { display: flex; gap: 4px; }
.sp-dots i { width: 14px; height: 14px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line-dash); }
.sp-dots i.on { background: var(--accent); box-shadow: none; }
.sp-amount { display: flex; align-items: baseline; gap: 6px; }
.sp-amount b { font-size: 48px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-amount b.sm { font-size: 28px; letter-spacing: -.02em; }
.sp-amount span { color: var(--text-3); font-size: 18px; }
.sp-mail { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; }
.sp-copy { width: 28px; height: 28px; }
.sp-copy svg { width: 14px; height: 14px; }
@media (max-width: 860px) {
  .sp-page { gap: 64px; padding-top: 16px; }
  .sp-previews { grid-template-columns: 1fr; }
  .sp-stat b { font-size: 28px; }
}
@media (max-width: 520px) {
  .sp-stats { grid-template-columns: 1fr; }
  .sp-mock-feed { zoom: .42; padding: 24px; }
}
.sp-frame.side::after { display: none; }
.sp-ms-card { margin-top: auto; }

/* ── Sponsor banner carousel: full width in the gallery, 4:1 slides, dash indicators ── */
.spb { grid-column: 1 / -1; margin: 12px 0 8px; }
.spb-viewport { overflow: hidden; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); touch-action: pan-y; }
.spb-track { display: flex; transition: transform .6s cubic-bezier(.22, .8, .2, 1); will-change: transform; }
.spb-track.dragging { transition: none; }
.spb-slide { position: relative; flex: 0 0 100%; aspect-ratio: 4 / 1; display: block; background: var(--surface-2); user-select: none; -webkit-user-drag: none; }
.spb-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.spb-label {
  position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.spb-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.spb-dot { width: 34px; height: 14px; display: grid; place-items: center; }
.spb-dot::before { content: ""; width: 100%; height: 5px; border-radius: 99px; background: var(--line-dash); transition: background .25s; }
.spb-dot:hover::before { background: var(--text-3); }
.spb-dot[aria-current="true"]::before { background: var(--text); }
@media (prefers-reduced-motion: reduce) { .spb-track { transition: none; } }
@media (max-width: 640px) { .spb-viewport { border-radius: 12px; } .spb-label { top: 8px; right: 8px; padding: 3px 7px; font-size: 9.5px; } .spb-dot { width: 24px; } }

/* Sponsor page: banner preview and the sample banner */
.sp-prev.wide { grid-column: 1 / -1; }
.sp-frame.banner { height: 330px; }
.sp-mock-banner { zoom: .5; padding: 0 36px 36px; margin-top: -96px; pointer-events: none; }
.sp-mock-banner .grid { grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }
.sp-mock-banner .card { animation: none; }
.sp-mock-banner .card-shot { aspect-ratio: 16 / 7; }
.sp-mock-banner .spb { margin: 4px 0; }
.sp-mock-banner .spb-viewport { box-shadow: 0 0 0 3px var(--accent), 0 30px 60px -24px color-mix(in srgb, var(--accent) 55%, transparent); }
.spb-sample {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; padding: 34px 40px;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%), color-mix(in srgb, var(--accent) 22%, var(--surface));
}
.spb-s-copy { display: flex; flex-direction: column; justify-content: space-between; }
.spb-s-copy b { font-size: 44px; line-height: 1.02; font-weight: 700; letter-spacing: -.035em; color: #fff; }
.spb-s-copy span { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: #fff; opacity: .9; }
.spb-s-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.spb-s-tiles i { border-radius: 14px; background: color-mix(in srgb, #fff 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 22%, transparent); }
.spb-s-tiles i:nth-child(2), .spb-s-tiles i:nth-child(6) { background: color-mix(in srgb, #fff 30%, transparent); }
@media (max-width: 860px) { .sp-frame.banner { height: 230px; } .sp-mock-banner { zoom: .36; padding: 0 24px 24px; } }
.sp-frame.banner::after { display: none; }

/* ── Featured listings ── */
.featured-label { color: var(--accent); }

/* ── Sponsor page: checks, sponsor cards, how it works, price, apply form, listing ── */
.sp-hero h1 { max-width: 15em; }
.sp-cta { display: inline-flex; align-items: center; gap: 8px; }
.sp-cta svg { width: 16px; height: 16px; }
.sp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; color: var(--text-2); font-size: 14px; }
.sp-checks li { display: inline-flex; align-items: center; gap: 6px; }
.sp-checks svg, .sp-includes svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.sp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 820px); }
.sp-h2 { margin: 0 0 14px; text-align: center; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.sp-places .sp-lead, .sp-apply .sp-lead { margin-bottom: 32px; }
.sp-sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; text-align: left; }
.sp-sponsor { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; transition: background .2s; }
.sp-sponsor:hover { background: var(--hover); }
.sp-sponsor .ss-logo { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.sp-sponsor-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sp-sponsor-meta b { font-weight: 600; font-size: 15px; }
.sp-sponsor-meta span { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sponsor-go { color: var(--text-3); font-size: 16px; }
.sp-steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.sp-steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-steps b { font-size: 16px; font-weight: 600; }
.sp-steps span { color: var(--text-3); font-size: 14px; line-height: 1.5; }
.sp-price { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 36px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-price-main { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.sp-price-note { margin: 0; color: var(--text-3); font-size: 14px; }
.sp-includes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.sp-includes li { display: flex; align-items: center; gap: 10px; }
.sp-apply { max-width: 640px; width: 100%; margin: 0 auto; }
.sp-form { padding: 26px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.sp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
.sp-apply .sp-mail { justify-content: center; margin-top: 16px; }
.sp-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 24px; text-align: center; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-done svg { width: 28px; height: 28px; color: var(--accent); }
.sp-done h3 { margin: 4px 0 0; font-size: 20px; font-weight: 600; }
.sp-done p { margin: 0; color: var(--text-3); max-width: 28em; line-height: 1.5; }
.sp-listing { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px; border-radius: 20px; background: var(--surface-2); }
.sp-listing b { font-size: 17px; font-weight: 600; }
.sp-listing > span { color: var(--text-3); font-size: 14px; max-width: 32em; }
.sp-listing-btn { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-dash); font-weight: 500; font-size: 14px; color: var(--text); transition: background .15s; }
.sp-listing-btn:hover { background: var(--hover); }
.sp-listing-btn svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-steps, .sp-price, .sp-form-row { grid-template-columns: 1fr; }
  .sp-price { padding: 24px; }
}

/* ── Submit modal: placement choice ── */
.placement { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.placement legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.place-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-opt { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; text-align: left; box-shadow: inset 0 0 0 1px var(--line-dash); transition: box-shadow .15s, background .15s; }
.place-opt:hover { background: var(--hover); }
.place-opt[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.place-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.place-top b { font-weight: 600; }
.place-top span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.place-top i { font-style: normal; color: var(--text-3); font-weight: 400; font-size: 12px; }
.place-text { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.place-note { margin: 0; color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.modal-form select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-dash); background: var(--surface); color: var(--text); font: inherit; }
@media (max-width: 480px) { .place-opts { grid-template-columns: 1fr; } }

/* ── Sponsor page: placement wireframes (light frames, grey blocks, "You" in blue) ── */
.sp-previews.wf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wf { --wf-bg: #fff; --wf-block: #ececee; position: relative; height: 230px; overflow: hidden; border-radius: 22px; background: var(--wf-bg); box-shadow: 0 0 0 1px var(--line); }
.wf i { display: block; border-radius: 10px; background: var(--wf-block); }
.wf-you { display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: -.01em; box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
/* Banner: a strip of cards, the banner across the gallery, more cards */
.wf-banner { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; justify-content: center; }
.wf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wf-row i { height: 72px; }
.wf-row i.short { height: 52px; }
.wf-banner .wf-you.bar { height: 62px; }
.wf-banner > .wf-row:first-child { margin-top: -24px; }
/* Gallery: masonry columns with one tile in blue */
.wf-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 22px 20px 0; }
.wf-col { display: flex; flex-direction: column; gap: 8px; }
.wf-col:nth-child(even) { margin-top: -18px; }
.wf-cards .h2 { height: 64px; flex-shrink: 0; }
.wf-cards .h3 { height: 88px; flex-shrink: 0; }
.wf-cards .h4 { height: 112px; flex-shrink: 0; }
/* Sidebar: links, then the sponsor card at its foot, beside the gallery */
.wf-side { display: flex; }
.wf-bar { width: 38%; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 14px; border-right: 1px solid var(--wf-block); }
.wf-brand { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.wf-brand b { width: 14px; height: 14px; border-radius: 99px; background: var(--wf-block); }
.wf-brand i { width: 54%; height: 8px; }
.wf-bar i.line { height: 10px; width: 80%; border-radius: 99px; }
.wf-bar i.line:nth-child(3) { width: 62%; } .wf-bar i.line:nth-child(5) { width: 70%; }
.wf-side .wf-you.card { margin-top: auto; height: 64px; }
.wf-page { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 16px; align-content: start; }
.wf-page i { height: 92px; }
@media (max-width: 960px) { .sp-previews.wf-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

/* ── Fixes from the UI sweep ── */
/* The detail sheet's screenshot hero is block layout: don't let place-items centre (and overflow) the page tabs. */
.sheet-hero.has-shot { place-items: normal; }
/* [hidden] must win over .field's display:flex (the Submit form's "How long?" select). */
.modal-form [hidden], .modal-form .field[hidden] { display: none; }
/* Tablet: keep the filter and sort buttons on the right, as on phones and desktop. */
@media (max-width: 900px) { .toolbar-right { display: flex; justify-content: flex-end; } .toolbar-right .dd-menu { left: auto; right: 0; } }

/* ── Header: search centred across the bar; the account slot (profile or settings) leads the actions ── */
.account-slot[hidden] { display: none; }
.menu-settings { margin-top: 6px; padding: 12px 8px 6px; border-top: 1px solid var(--line); }
.menu-settings .pop-title { font-size: 13px; }
#profile-menu { width: 290px; }
@media (min-width: 901px) {
  body.with-side .nav-inner { grid-template-columns: 1fr minmax(0, 480px) 1fr; }
  body.with-side .nav .search { grid-column: 2; justify-self: center; }
  body.with-side .nav-actions { grid-column: 3; justify-self: end; }
}

/* ── Accounts: sign-in buttons, avatar, profile menu ── */
.avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-initials { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.signin { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.signin-title { font-weight: 600; font-size: 14px; }
.signin-text { margin: -4px 0 2px; color: var(--text-3); font-size: 12.5px; }
.signin-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 38px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-dash); color: var(--text); font-weight: 500; font-size: 14px; text-decoration: none; transition: background .15s; }
.signin-btn:hover { background: var(--hover); }
.signin-btn svg { width: 17px; height: 17px; }
.menu-user { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 6px; min-width: 0; }
.menu-user b { font-size: 14px; font-weight: 600; }
.menu-user span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu > button.menu-signout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.menu > button.menu-danger { color: #ef4444; font-size: 13px; padding-top: 6px; }
.notice { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); font-size: 14px; }

/* ── Website sheet: screenshot on the left (scrolls on its own), info on the right ── */
.sheet.site-sheet { width: min(1240px, calc(100vw - 32px)); height: calc(100vh - 48px); max-height: 980px; }
.site-sheet .sheet-inner { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100%; max-height: none; overflow: hidden; }
.ss-media {
  position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 20px; scrollbar-width: thin;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%), var(--surface-2);
}
.ss-tabs { position: sticky; top: -20px; z-index: 2; margin: -20px -20px 16px; padding: 14px 20px 12px; background: color-mix(in srgb, var(--surface-2) 82%, transparent); backdrop-filter: blur(12px); }
.ss-shots { display: flex; flex-direction: column; gap: 16px; }
.ss-shot { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -20px rgba(0,0,0,.45); }
.ss-shot.mobile { width: min(100%, 390px); margin: 0 auto; }
.ss-empty { height: 100%; min-height: 320px; display: grid; place-items: center; }
.ss-empty .app-icon { width: 96px; height: 96px; border-radius: 24px; font-size: 40px; box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--c) 70%, transparent); }
.ss-info { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 32px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.ss-info .sheet-close { top: 18px; right: 18px; }
.ss-info .sheet-title { margin: 0; padding-right: 44px; align-items: flex-start; }
.ss-info .sheet-title .app-icon { width: 52px; height: 52px; border-radius: 13px; font-size: 22px; }
.ss-info .sheet-title h2 { font-size: 22px; line-height: 1.2; }
.ss-info .sheet-tagline { margin-top: 4px; line-height: 1.45; }
.ss-actions { display: flex; gap: 8px; }
.ss-visit { flex: 1; justify-content: center; height: 48px; border-radius: 12px; font-size: 15px; box-shadow: 0 10px 24px -12px var(--accent); }
.ss-visit svg { width: 17px; height: 17px; }
.ss-icon-btn { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-dash); transition: background .15s, color .15s; }
.ss-icon-btn:hover { background: var(--hover); color: var(--text); }
.ss-icon-btn svg { width: 19px; height: 19px; }
.ss-icon-btn[aria-pressed="true"] { color: var(--fav); }
.ss-icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.ss-icon-btn.copied { color: var(--accent); }
.ss-section h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ss-section .sheet-desc { margin: 0; font-size: 14.5px; }
.ss-dl { grid-template-columns: 92px 1fr; gap: 12px 12px; margin: 0; align-items: baseline; }
.ss-dl dd { gap: 6px; }
.ss-none { color: var(--text-3); font-size: 13px; }
@media (max-width: 860px) {
  .sheet.site-sheet { height: calc(100vh - 24px); width: calc(100vw - 16px); }
  .site-sheet .sheet-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 52%) minmax(0, 1fr); }
  .ss-media { padding: 14px; }
  .ss-tabs { top: -14px; margin: -14px -14px 12px; padding: 10px 14px; }
  .ss-info { border-left: 0; border-top: 1px solid var(--line); padding: 20px 18px 24px; gap: 20px; }
}

/* Card bookmark: the screenshot lifts on hover (a transform), which used to trap the bookmark
   under the card's open layer, so a click opened the site instead of saving it. Lift the
   screenshot above the open layer and let clicks fall through everything but the bookmark. */
.card-shot { z-index: 2; pointer-events: none; }
.card-shot .fav-btn, .card-shot a, .card-shot button { pointer-events: auto; }

/* ══ Redesign (Figma: "bestappsites — Redesign"): Public Sans, flatter dark palette,
      search in the sidebar, quieter top bar, 3-up grid ══════════════════════════ */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/public-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --font: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --accent: #1a8cff; --accent-hover: #0a7cf0; --fav: #e8488a;
  --side-w: 244px; --chip: #f1f1f3;
}
/* Design tokens: bg/app #0a0a0b, bg/sidebar #111113, bg/surface #1c1c1f, border #222226,
   text #f5f5f7 / #9a9aa2 / #6b6b73, accent blue #1a8cff, accent pink #e8488a. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b; --page: #0a0a0b; --surface: #141416; --surface-2: #1c1c1f; --hover: #1c1c1f; --chip: #1c1c1f; --side-bg: #111113;
    --line: #222226; --line-dash: #2c2c31; --text: #f5f5f7; --text-2: #9a9aa2; --text-3: #6b6b73;
    --accent: #1a8cff; --accent-hover: #3a9cff;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0b; --page: #0a0a0b; --surface: #141416; --surface-2: #1c1c1f; --hover: #1c1c1f; --chip: #1c1c1f; --side-bg: #111113;
  --line: #222226; --line-dash: #2c2c31; --text: #f5f5f7; --text-2: #9a9aa2; --text-3: #6b6b73;
  --accent: #1a8cff; --accent-hover: #3a9cff;
}
body { font-family: var(--font); }

/* Icons from the design, as masks so they take the current text colour. */
.ui-ico { display: inline-block; flex-shrink: 0; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ui-profile { --m: url("/img/ui/profile.svg"); } .ui-panel-left { --m: url("/img/ui/panel-left.svg"); }
.ui-search { --m: url("/img/ui/search.svg"); width: 15px; height: 15px; }
.ui-grid { --m: url("/img/ui/grid.svg"); } .ui-laptop { --m: url("/img/ui/laptop.svg"); }
.ui-smartphone { --m: url("/img/ui/smartphone.svg"); } .ui-android { --m: url("/img/ui/android.svg"); }
.ui-bookmark { --m: url("/img/ui/bookmark.svg"); } .ui-more { --m: url("/img/ui/more.svg"); }
.ui-plus { --m: url("/img/ui/plus.svg"); width: 16px; height: 16px; }
.ui-sponsor { --m: url("/img/ui/sponsor.svg"); width: 16px; height: 16px; }
.ui-sliders { --m: url("/img/ui/sliders.svg"); width: 16px; height: 16px; }
.ui-sort { --m: url("/img/ui/sort.svg"); width: 16px; height: 16px; }
.ui-chevron-down { --m: url("/img/ui/chevron-down.svg"); width: 14px; height: 14px; }

/* Sidebar */
.sidenav { width: var(--side-w); padding: 16px; gap: 0; background: var(--bg); border-right: 1px solid var(--line); }
.sidenav-top { height: auto; margin: 0; padding: 2px 0 20px 6px; align-items: flex-start; }
.side-logo-img { display: block; width: 32px; height: 32px; transition: transform .2s ease; }
.side-logo:hover .side-logo-img { transform: rotate(-10deg) scale(1.06); }
.side-top-actions { display: flex; align-items: center; }
.side-icon-btn { width: 34px; height: 32px; border-radius: 999px; color: var(--text-2); background: none; box-shadow: none; }
.side-icon-btn:hover, .side-icon-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.profile-btn img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }
.profile-btn .avatar-initials { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: var(--accent); color: #fff; }
/* The sidebar clips its overflow, so the profile menu is placed against the window. */
#profile-menu { position: fixed; top: 58px; left: 16px; right: auto; max-height: calc(100vh - 74px); overflow-y: auto; }
body.side-collapsed #profile-menu { left: calc(var(--side-w) + 8px); top: 16px; }
.menu-signin .signin { margin-top: 6px; padding: 12px 6px 4px; }
.side-search { display: flex; align-items: center; gap: 12px; height: 34px; margin: 0 0 4px; padding: 0 12px; border-radius: 8px; background: none; box-shadow: inset 0 0 0 1px var(--line); cursor: text; transition: box-shadow .15s, background .15s; }
.side-search:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.side-search:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.side-search .ui-search { color: var(--text-2); }
.side-search input { font-size: 13px; color: var(--text); }
.side-search input::placeholder { color: var(--text-3); }
.side-search kbd { padding: 2px 6px; border-radius: 5px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: none; font: 500 11px var(--font); color: var(--text-3); line-height: 1.2; }
.side-search:focus-within kbd { opacity: 0; }
.side-links { gap: 4px; }
.side-group, .side-group:first-of-type { padding: 12px 0 6px 12px; font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--text-3); }
.side-link { height: 36px; padding: 0 12px; gap: 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.side-link .ui-ico, .side-link svg { width: 18px; height: 18px; color: var(--text-2); transition: color .2s ease, transform .2s ease; }
.side-link:hover .ui-ico { color: var(--text); transform: scale(1.06); }
.side-link[aria-current="page"] { color: var(--text); }
.side-link[aria-current="page"] .ui-ico, .side-link[aria-current="page"] svg { color: var(--accent); }
.side-pill { border-radius: 8px; background: var(--surface-2); }
.side-links.hovering .side-pill { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.side-count { font: 400 12px var(--font); color: var(--text-3); }
#saved-count.has { min-width: 21px; height: 17px; padding: 0 7px; border-radius: 999px; background: var(--fav); color: #f5f5f7; font: 600 11px var(--font); }
.side-foot { padding: 0 0 0 6px; font-size: 11px; color: var(--text-3); }
.side-sponsor { margin: auto 0 14px; padding: 0; }
.ss-card { gap: 14px; padding: 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.ss-card:hover { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-dash); }
.ss-logo.plus { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.ss-meta { gap: 1px; }
.ss-meta b { font-size: 14px; font-weight: 600; }
.ss-meta span { font-size: 10px; font-weight: 500; letter-spacing: .08em; margin-top: 0; }
.ss-text { font-size: 13px; line-height: 1.4; }
.ss-card.open .ss-btn, .ss-btn { height: 34px; border-radius: 8px; background: var(--side-bg, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 13px; font-weight: 600; }
.ss-card.open:hover .ss-btn { background: var(--hover); }
/* Collapsed sidebar: icons only; the search becomes its icon and expands the sidebar. */
body.side-collapsed { --side-w: 72px; }
body.side-collapsed .sidenav { padding: 16px 10px; }
body.side-collapsed .sidenav-top { flex-direction: column; align-items: center; gap: 8px; padding: 2px 0 16px; }
body.side-collapsed .side-top-actions { flex-direction: column; }
body.side-collapsed .side-search { justify-content: center; padding: 0; cursor: pointer; }
body.side-collapsed .side-search input, body.side-collapsed .side-search kbd { display: none; }

/* Top bar */
.nav { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line); box-shadow: none; }
body.with-side .nav-inner { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px 0 24px; max-width: none; }
.page-title { margin: 0; font-size: 16px; font-weight: 400; letter-spacing: -.03em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title[hidden] { display: none; }
body.with-side .nav-actions { margin-left: auto; gap: 8px; }
.sponsor-btn { height: 34px; padding: 0 14px; gap: 6px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: none; color: var(--text); font-size: 13px; font-weight: 500; }
.sponsor-btn .ui-sponsor { color: var(--text); }
.sponsor-btn:hover, .sponsor-btn[aria-expanded="true"] { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-dash); }
.split-btn.solo { height: 32px; padding: 0 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; box-shadow: none; }
.settings-btn { width: 34px; height: 32px; border-radius: 999px; color: var(--text); background: none; box-shadow: none; }
.settings-btn:hover, .settings-btn[aria-expanded="true"] { background: var(--hover); }

/* Hero (All apps) */
.hero { max-width: none; padding: 64px 8px 52px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero[hidden] { display: none; }
.hero h1, .app .hero h1 { margin: 0; font-size: 44px; font-weight: 400; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.hero p { max-width: 560px; font-size: 16px; line-height: 1.5; color: var(--text-2); }
body.with-side .page { padding-top: 0; }
.hero[hidden] + .toolbar { margin-top: 24px; }

/* Filters */
.toolbar { margin-bottom: 0; gap: 8px; }
.toolbar .page-chips { gap: 8px; }
.toolbar .page-chip, .page-chip { height: 32px; padding: 0 14px; gap: 6px; border-radius: 999px; background: var(--chip); color: var(--text); font-size: 13px; font-weight: 500; box-shadow: none; }
.page-chip:hover { background: color-mix(in srgb, var(--chip) 80%, var(--text) 8%); }
.page-chip[aria-pressed="true"] { background: var(--accent); color: #f5f5f7; box-shadow: none; }
.page-chip.more { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 14px; }
.page-chip.more[aria-expanded="true"] .ui-chevron-down { transform: rotate(180deg); }
.page-chip.more .ui-chevron-down { transition: transform .2s; }
.tb-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--chip); color: var(--text); }
.tb-icon:hover, .tb-icon[aria-expanded="true"] { background: color-mix(in srgb, var(--chip) 80%, var(--text) 8%); }
.results-meta { min-height: 0; margin: 0; padding: 20px 0 16px; font-size: 13px; color: var(--text-3); }

/* App grid: three up at 1440, cards with a near-square screenshot */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 32px 16px; }
.card-shot { aspect-ratio: 372 / 351; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.card-shot img { border-radius: 12px; }
.card-open { border-radius: 12px; }
.card-info { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 2px; }
.card-name { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.card-plat { font-size: 13px; color: var(--text-2); }

/* Phones and tablets: the sidebar is a drawer, so the top bar keeps the logo, search and menu. */
@media (max-width: 900px) {
  body.with-side .nav-inner { padding: 0 12px; height: 56px; }
  .search-toggle { display: grid; }
  .page-title { font-size: 15px; }
  body.side-collapsed .side-search input, body.side-collapsed .side-search kbd { display: revert; }
  body.side-collapsed .sidenav-top { flex-direction: row; padding: 2px 0 20px 6px; }
  body.side-collapsed .side-top-actions { flex-direction: row; }
  .hero { padding: 40px 4px 32px; }
}
@media (min-width: 901px) and (max-width: 1180px) { .hero h1, .app .hero h1 { font-size: 38px; } }
@media (max-width: 900px) { .hero h1, .app .hero h1 { font-size: 32px; } }
@media (max-width: 900px) { .nav-inner:has(.page-title:not([hidden])) .nav-logo { display: none; } }

/* Lucide icons (lucide.dev, ISC), drawn at a 1.5 stroke. */
.ui-menu { --m: url("/img/ui/menu.svg"); } .ui-app-window { --m: url("/img/ui/app-window.svg"); }

/* Sponsor: a round plus button; the label is its tooltip. */
.sponsor-btn.sponsor-round { width: 34px; height: 34px; padding: 0; gap: 0; justify-content: center; }
.sponsor-btn.sponsor-round .ui-sponsor { width: 18px; height: 18px; }

/* The top bar hides while scrolling down and comes back on scroll up; the tabs and filters stay pinned. */
header.nav { transition: transform .25s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
body.nav-hidden header.nav { transform: translateY(-100%); }
body.app section.toolbar, body.app.with-side section.toolbar { position: sticky; top: var(--nav-h, 56px); z-index: 20; transition: top .25s cubic-bezier(.2, .7, .2, 1); }
body.app.nav-hidden section.toolbar, body.app.with-side.nav-hidden section.toolbar { top: 0; }
@media (prefers-reduced-motion: reduce) { header.nav, body.app section.toolbar { transition: none; } }

/* No counts beside the Browse links (Collections keeps its count). */
.side-link[data-tab="websites"] .side-count { display: none; }

/* Sponsor page: blurred behind "Coming soon" until sponsorships open. */
.cs-wrap { position: relative; }
.cs-wrap .sp-page { filter: blur(8px); opacity: .55; user-select: none; pointer-events: none; }
.cs-overlay { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: 120px; }
.cs-card { position: sticky; top: calc(var(--nav-h, 56px) + 80px); display: grid; justify-items: center; gap: 8px; padding: 28px 36px; border-radius: 16px; text-align: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px rgba(0,0,0,.25); backdrop-filter: blur(6px); }
.cs-card .ui-ico { width: 28px; height: 28px; color: var(--text-2); }
.cs-card h1 { margin: 4px 0 0; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.cs-card p { margin: 0; color: var(--text-2); font-size: 14px; }
button.signin-btn { width: 100%; border: 0; background: none; font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; }
button.signin-btn:hover { background: var(--hover); }
button.signin-btn:disabled { opacity: .6; cursor: progress; }
