/* ============================================================
   books_styles.css — shared by books/index.html and every book page
   Themes follow customize.js: data-theme on <html>, --accent-color
   ============================================================ */
:root {
  --bq-accent: var(--accent-color, #5b3ef5);
  --bq-accent-2: #2f80ff;
  --bq-ink: #12102e;
  --bq-muted: #5d5b7a;
  --bq-surface: #ffffff;
  --bq-bg-1: #fcfbff;
  --bq-bg-2: #ecebff;
  --bq-blob: #aebfff;
  --bq-wave: #c9bcff;
  --bq-font: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bq-ease: cubic-bezier(.3, .7, .2, 1);
}
[data-theme="dark"], [data-theme="dracula"], [data-theme="midnight"] {
  --bq-ink: #f1f0ff; --bq-muted: #a9a7cf; --bq-surface: #1d1b3a;
  --bq-bg-1: #0f0e22; --bq-bg-2: #171540; --bq-blob: #2b3a8f; --bq-wave: #3a2a85;
}
[data-theme="rose"] { --bq-bg-1: #fffafc; --bq-bg-2: #ffe6f0; --bq-blob: #ffc2d9; --bq-wave: #f7b6d2; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--bq-font); color: var(--bq-ink); background: var(--bq-bg-1); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--bq-accent); outline-offset: 3px; }
.bq-sprite { position: absolute; width: 0; height: 0; }
.bq-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Background (swap with --bq-bg-image if you have an artwork) ---------- */
.bq-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: var(--bq-bg-image, none) center / cover no-repeat,
              linear-gradient(135deg, var(--bq-bg-1) 20%, var(--bq-bg-2));
}
.bq-bg::before, .bq-bg::after { content: ""; position: absolute; border-radius: 50%; }
.bq-bg::before { width: 80vw; aspect-ratio: 1; right: -28vw; top: -52vw; opacity: .8;
  background: linear-gradient(200deg, var(--bq-blob), transparent 70%); }
.bq-bg::after { width: 80vw; height: 50vw; left: -26vw; bottom: -30vw; opacity: .75;
  background: linear-gradient(20deg, var(--bq-wave), transparent 75%); }

/* ---------- Layout ---------- */
.bq-hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  padding: clamp(14px, 2.2vw, 32px) clamp(20px, 4vw, 64px) clamp(20px, 3vw, 40px); gap: clamp(12px, 2vw, 24px); }
/* Logo on the left, category tabs on the right, one compact row */
.bq-header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.bq-header .bq-logo { flex: none; }
.bq-brand { flex: none; display: flex; align-items: center; gap: 14px; }
.bq-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: -.02em; }
.bq-logo svg { width: 1.6em; height: 1.6em; }
.bq-main { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px); align-items: center; }

/* ---------- Left copy ---------- */
.bq-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.bq-pill { margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px;
  border-radius: 999px; font-weight: 600; font-size: 1.05rem; color: var(--bq-accent);
  background: color-mix(in srgb, var(--bq-accent) 12%, transparent); }
.bq-title { margin: 0; display: flex; flex-direction: column; font-weight: 800;
  font-size: clamp(2.8rem, 6.2vw, 5.6rem); line-height: .98; letter-spacing: -.04em; }
.bq-title__accent { font-size: 1.2em; padding-bottom: .08em;
  background: linear-gradient(90deg, var(--bq-accent), var(--bq-accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.bq-desc { margin: 0; max-width: 30ch; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--bq-muted); }
.bq-cta { padding: 13px 26px; border-radius: 999px; text-decoration: none; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--bq-accent), var(--bq-accent-2));
  box-shadow: 0 10px 24px -10px var(--bq-accent); transition: transform .2s var(--bq-ease); }
.bq-cta:hover { transform: translateY(-2px); }

/* ---------- Tabs ---------- */
.bq-showcase { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.4vw, 18px); }
.bq-tabs { min-width: 0; max-width: 100%; display: flex; gap: 8px; padding: 6px 4px; overflow-x: auto; scrollbar-width: none; }
.bq-tabs::-webkit-scrollbar { display: none; }
.bq-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-size: .95rem; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--bq-surface) 85%, transparent);
  box-shadow: 0 6px 18px -10px rgba(60, 50, 140, .35); transition: background .25s, color .25s, transform .25s var(--bq-ease); }
.bq-tab:hover { transform: translateY(-2px); }
.bq-tab[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, var(--bq-accent), color-mix(in srgb, var(--bq-accent) 70%, var(--bq-accent-2))); }

/* ---------- Stage + books ---------- */
.bq-stage { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16 / 9.4; container-type: inline-size; }
.bq-panel { position: absolute; inset: 0; perspective: 1400px; animation: bq-in .45s var(--bq-ease) both; }
.bq-panel[hidden] { display: none; }
@keyframes bq-in { from { opacity: 0; transform: translateY(14px); } }

.bq-book { position: absolute; left: 50%; top: 50%; width: 27cqw; aspect-ratio: 5 / 7; border-radius: 10px;
  display: block; text-decoration: none; color: #fff; overflow: visible;
  transition: transform .6s var(--bq-ease), box-shadow .6s var(--bq-ease); }
.bq-book[data-pos="0"] { z-index: 3; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--bq-surface) 75%, transparent), 0 36px 60px -22px var(--bq-accent); }
.bq-book[data-pos="1"] { z-index: 1; transform: translate(-50%, -50%) translateX(100%) scale(.8) rotateY(-14deg);
  box-shadow: 0 26px 46px -22px var(--bq-accent-2); }
.bq-book[data-pos="2"] { z-index: 1; transform: translate(-50%, -50%) translateX(-100%) scale(.8) rotateY(14deg);
  box-shadow: 0 26px 46px -22px var(--bq-accent-2); }
.bq-book.is-wrap { transition: none; animation: bq-wrap .5s ease both; }
@keyframes bq-wrap { from { opacity: 0; } }
.bq-book__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Shown only when the .webp is missing: keeps the grid usable and the title crawlable */
.bq-book__fallback { display: none; position: absolute; inset: 0; border-radius: inherit; padding: 8% 9%;
  flex-direction: column; justify-content: flex-end; gap: 6px; text-align: center;
  background: radial-gradient(120% 60% at 50% 105%, hsl(var(--h) 85% 55%) 0, transparent 70%),
              linear-gradient(170deg, hsl(var(--h) 45% 20%), hsl(var(--h) 55% 8%)); }
.bq-book__fallback strong { font-size: 5.4cqw; line-height: 1.1; letter-spacing: -.02em; }
.bq-book__fallback em { font-style: normal; font-size: 2.3cqw; opacity: .8; }
.bq-book.is-fallback .bq-book__img { visibility: hidden; }
.bq-book.is-fallback .bq-book__fallback { display: flex; }

/* ---------- Arrows + dots ---------- */
.bq-arrow { position: absolute; top: 50%; z-index: 5; width: 54px; height: 54px; margin-top: -27px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bq-surface);
  box-shadow: 0 10px 26px -10px rgba(60, 50, 140, .45); transition: transform .2s var(--bq-ease); }
.bq-arrow:hover { transform: scale(1.08); }
.bq-arrow--prev { left: 0; } .bq-arrow--next { right: 0; }
.bq-dots { display: flex; gap: 14px; }
.bq-dot { width: 22px; height: 22px; padding: 0; border-radius: 50%; position: relative; }
.bq-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: color-mix(in srgb, var(--bq-accent) 25%, transparent); transition: background .25s; }
.bq-dot[aria-current="true"]::after { background: var(--bq-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bq-main { grid-template-columns: 1fr; }
  .bq-header { flex-wrap: wrap; row-gap: 6px; }
  .bq-header .bq-tabs { order: 3; flex: 1 0 100%; }
  .bq-showcase { align-items: stretch; }
  .bq-tabs { padding-inline: 2px; }
  .bq-arrow { width: 44px; height: 44px; margin-top: -22px; }
  .bq-desc { max-width: 42ch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   Sections below the hero (hero rules above are untouched)
   ============================================================ */
:root { --bq-line: color-mix(in srgb, var(--bq-accent) 13%, transparent); --bq-tint: color-mix(in srgb, var(--bq-accent) 6%, var(--bq-bg-1)); }
.bq-sec { padding: clamp(40px, 6vw, 88px) clamp(20px, 4vw, 64px); }
.bq-sec--tint { background: var(--bq-tint); }
.bq-sec--white { background: var(--bq-surface); }
.bq-wrap { max-width: 1200px; margin: 0 auto; }
.bq-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(18px, 2.5vw, 32px); }
.bq-sec__title { margin: 0; padding-left: 14px; border-left: 4px solid var(--bq-accent); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; }
.bq-pillink { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; white-space: nowrap; text-decoration: none;
  font-size: .85rem; font-weight: 600; color: var(--bq-accent); border: 1.5px solid var(--bq-accent); transition: background .2s, color .2s; }
.bq-pillink:hover { background: var(--bq-accent); color: #fff; }

/* Cover: title card first, real image fades in over it once loaded */
.bq-cover { display: block; position: relative; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 10px; container-type: inline-size;
  background: linear-gradient(170deg, hsl(var(--h) 45% 20%), hsl(var(--h) 55% 8%)); }
.bq-cover--sq { aspect-ratio: 1; border-radius: 12px; }
.bq-cover__ph { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; text-align: center; padding: 10%; color: #fff;
  background: radial-gradient(120% 55% at 50% 105%, hsl(var(--h) 85% 55%), transparent 70%); }
.bq-cover__ph strong { font-size: 12cqw; line-height: 1.1; letter-spacing: -.02em; }
.bq-cover--sq .bq-cover__ph strong { display: none; }
.bq-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.bq-js .bq-cover img { opacity: 0; }
.bq-js .bq-cover.is-loaded img { opacity: 1; }

/* More Books row cards */
.bq-rowgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.bq-row-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px; text-decoration: none; border-radius: 18px;
  background: var(--bq-surface); border: 1px solid var(--bq-line); box-shadow: 0 10px 28px -20px rgba(60, 50, 140, .5);
  transition: transform .25s var(--bq-ease), box-shadow .25s; }
.bq-row-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px var(--bq-accent); }
.bq-row-card .bq-cover { flex: none; width: 76px; }
.bq-row-card__txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-right: 28px; }
.bq-row-card__txt strong { font-size: .98rem; line-height: 1.2; }
.bq-row-card__txt span { font-size: .8rem; line-height: 1.4; color: var(--bq-muted); }
.bq-row-card__go { position: absolute; right: 14px; bottom: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: var(--bq-accent); background: color-mix(in srgb, var(--bq-accent) 12%, transparent); }
.bq-row-card__go .bq-icon { width: 14px; height: 14px; }

/* Book cards: rail + grid */
.bq-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.bq-card .bq-cover { margin-bottom: 8px; box-shadow: 0 18px 30px -18px rgba(40, 30, 110, .6); transition: transform .3s var(--bq-ease); }
.bq-card:hover .bq-cover { transform: translateY(-5px); }
.bq-card__t { font-size: .95rem; line-height: 1.25; }
.bq-card__m { font-size: .8rem; color: var(--bq-muted); }
.bq-rail { display: flex; gap: 22px; overflow-x: auto; padding: 4px 4px 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.bq-rail .bq-card { flex: 0 0 clamp(150px, 17vw, 190px); scroll-snap-align: start; }
.bq-grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: clamp(18px, 2.5vw, 32px); }

/* Genres */
.bq-genres { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bq-genre { min-height: 112px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 18px; text-decoration: none; color: #fff;
  font-weight: 700; font-size: 1.05rem; background: linear-gradient(135deg, hsl(var(--h) 70% 54%), hsl(calc(var(--h) + 30) 75% 40%));
  transition: transform .25s var(--bq-ease); }
.bq-genre:hover { transform: translateY(-4px); }
.bq-genre .bq-icon { align-self: flex-end; width: 22px; height: 22px; }

/* Publish CTA */
.bq-publish { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 32px; overflow: hidden; color: #fff; border-radius: 28px;
  padding: clamp(32px, 5vw, 64px); background: linear-gradient(120deg, var(--bq-accent), var(--bq-accent-2)); }
.bq-publish h2 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.bq-publish p { margin: 0 0 26px; max-width: 36ch; font-size: 1.1rem; line-height: 1.55; opacity: .92; }
.bq-btn-light { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; text-decoration: none; font-weight: 700;
  color: var(--bq-accent); background: #fff; transition: transform .2s var(--bq-ease); }
.bq-btn-light:hover { transform: translateY(-2px); }
.bq-fan { display: flex; justify-content: center; align-items: center; }
.bq-fan__b { width: clamp(90px, 12vw, 140px); margin: 0 -14px; box-shadow: 0 24px 40px -16px rgba(0, 0, 40, .6); border-radius: 10px; }
.bq-fan__b:nth-child(1) { transform: rotate(-9deg) translateY(10px); }
.bq-fan__b:nth-child(2) { transform: scale(1.12); z-index: 2; }
.bq-fan__b:nth-child(3) { transform: rotate(9deg) translateY(10px); }

/* Footer */
.bq-footer { padding: clamp(40px, 5vw, 72px) clamp(20px, 4vw, 64px) 28px; color: #d8d6f5; background: #14113a; }
.bq-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.bq-footer__brand { margin: 0 0 8px; font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.bq-footer__about { margin: 0 0 16px; max-width: 32ch; line-height: 1.55; }
.bq-footer__social { margin: 0; display: flex; gap: 16px; }
.bq-footer h3 { margin: 0 0 12px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.bq-footer nav { display: flex; flex-direction: column; gap: 10px; }
.bq-footer a { color: inherit; text-decoration: none; opacity: .85; }
.bq-footer a:hover { opacity: 1; text-decoration: underline; }
.bq-footer__copy { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; opacity: .7; }

@media (max-width: 760px) {
  .bq-publish { grid-template-columns: 1fr; }
  .bq-fan { display: none; }
  .bq-footer__grid { grid-template-columns: 1fr 1fr; }
  .bq-footer__grid > div { grid-column: 1 / -1; }
  .bq-pillink { padding: 8px 14px; }
}

/* ============================================================
   books_all.html: full catalogue, filters, quick-view dialog
   ============================================================ */
.bq-all { padding: clamp(20px, 4vw, 64px); max-width: 1320px; margin: 0 auto; }
.bq-allhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(24px, 4vw, 48px); }
.bq-pillink--back { gap: 6px; }
.bq-alltitle { margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.bq-allsub { margin: 10px 0 24px; color: var(--bq-muted); }
.bq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; scroll-margin-top: 16px; }
.bq-input { padding: 12px 18px; border-radius: 999px; font: inherit; font-size: .92rem; color: var(--bq-ink);
  background: var(--bq-surface); border: 1px solid var(--bq-line); }
input.bq-input { flex: 1 1 260px; max-width: 380px; }
.bq-check { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; cursor: pointer; }
.bq-check input { width: 18px; height: 18px; accent-color: var(--bq-accent); }
.bq-chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 16px; scrollbar-width: none; }
.bq-chip { padding: 10px 20px; border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: .9rem; background: var(--bq-surface);
  border: 1px solid var(--bq-line); transition: background .2s, color .2s; }
.bq-chip:hover { border-color: var(--bq-accent); }
.bq-chip[aria-pressed="true"] { color: #fff; background: var(--bq-accent); border-color: var(--bq-accent); }
.bq-allgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: clamp(22px, 3vw, 40px) clamp(16px, 2.5vw, 32px); }
.bq-card { position: relative; }
.bq-card[hidden] { display: none; }
.bq-badge { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  color: var(--bq-ink); background: rgba(255, 255, 255, .94); box-shadow: 0 4px 12px -4px rgba(0, 0, 40, .4); }
.bq-badge--free { color: #fff; background: #17a864; }
.bq-empty { padding: 60px 0; text-align: center; color: var(--bq-muted); }

.bq-modal { width: min(760px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 24px; color: var(--bq-ink); background: var(--bq-surface);
  box-shadow: 0 40px 90px -30px rgba(20, 10, 80, .7); }
.bq-modal[open] { animation: bq-pop .3s var(--bq-ease); }
.bq-modal::backdrop { background: rgba(18, 14, 50, .55); backdrop-filter: blur(4px); }
@keyframes bq-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
body:has(.bq-modal[open]) { overflow: hidden; }
.bq-modal__body { position: relative; display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: clamp(20px, 3vw, 32px); }
.bq-modal__x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bq-bg-2); }
.bq-modal__cover .bq-cover { box-shadow: 0 24px 40px -20px var(--bq-accent); }
.bq-modal__txt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-right: 30px; }
.bq-modal__txt > * { margin: 0; }
.bq-modal__kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bq-accent); }
.bq-modal h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -.03em; }
.bq-modal__by { font-size: .88rem; color: var(--bq-muted); }
.bq-modal__price { font-size: 1.4rem; font-weight: 800; }
.bq-modal__price.is-free { color: #17a864; }
.bq-modal__desc { line-height: 1.6; color: var(--bq-muted); }
.bq-modal__excerpt { padding-left: 14px; border-left: 3px solid var(--bq-accent); font-style: italic; line-height: 1.55; color: var(--bq-muted); }
.bq-modal .bq-cta { margin-top: 8px; }
@media (max-width: 640px) {
  .bq-modal__body { grid-template-columns: 1fr; }
  .bq-modal__cover { width: 150px; }
  .bq-modal__txt { padding-right: 0; }
}

/* ---------- Theme button + Customize popup (customize.js) ---------- */
.bq-themebtn { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bq-surface); box-shadow: 0 6px 18px -10px rgba(60, 50, 140, .35);
  border: 1px solid color-mix(in srgb, var(--bq-ink) 12%, transparent); transition: transform .2s var(--bq-ease), border-color .2s; }
.bq-themebtn:hover { transform: translateY(-2px); border-color: var(--bq-accent); }
.bq-themebtn .bq-icon { width: 20px; height: 20px; }
.bq-headact { display: flex; align-items: center; gap: 10px; }
.custom-popup { position: fixed; z-index: 1000; right: 16px; left: auto !important; top: 72px !important; width: 250px; padding: 16px; border-radius: 18px;
  color: var(--bq-ink); background: var(--bq-surface); border: 1px solid color-mix(in srgb, var(--bq-ink) 12%, transparent);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 30, .55); }
.cp-customize-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cp-customize-title { font-weight: 800; }
.cp-close-btn { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--bq-ink) 8%, transparent); }
.cp-section { margin-top: 12px; }
.cp-section-label { display: block; margin-bottom: 8px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bq-muted); }
.cp-theme-row, .cp-accent-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-theme-btn { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--bq-ink) 8%, transparent); border: 2px solid transparent; }
.cp-theme-btn.active { border-color: var(--bq-accent); }
.cp-accent-dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--bq-surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bq-ink) 20%, transparent); }
.cp-accent-dot.active { box-shadow: 0 0 0 2px var(--bq-accent); }

/* Home page: theme button sits beside the logo on the left, so its popup opens on the left too */
html.bq-home .custom-popup { left: clamp(16px, 4vw, 64px) !important; right: auto !important; top: 72px !important; }
