/* Pradhan Press — design system (docs/DESIGN.md)
   Brand from the logo: ink #111318, cream #F5EFE3, orange #FF6B1A.
   Style: warm cream canvas, frosted-glass surfaces, soft neumorphic controls.
   Owner colours from the admin panel are loaded from /theme.css (overrides --accent / --ink / --cream). */
:root {
  --ink: #111318;
  --ink-2: #23262e;
  --cream: #f5efe3;
  --cream-2: #ece4d4;
  --accent: #ff6b1a;
  --accent-ink: #111318;      /* text on accent buttons (auto-picked for contrast) */
  --accent-text: #a8400a;     /* accent used as text/links on light backgrounds (AA contrast) */
  --accent-soft: #ffe5d4;

  --text: #2a2a2e;
  --muted: #5e594f;
  --line: rgb(17 19 24 / 10%);
  --line-strong: rgb(17 19 24 / 18%);
  --bg: var(--cream);
  --surface: rgb(255 253 248 / 72%);
  --surface-solid: #fffdf8;
  --glass-border: rgb(255 255 255 / 75%);
  --success: #146c43;
  --success-bg: #e3f4ea;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --info: #1d4f91;
  --info-bg: #e7effa;
  --star: #f59e0b;

  /* Old names kept so older markup keeps working */
  --brand-950: #0b0c10;
  --brand-900: var(--ink);
  --brand-700: var(--accent-text);
  --brand-600: var(--accent-text);
  --brand-100: var(--accent-soft);
  --brand-50: #fff4ec;
  --soft: rgb(255 253 248 / 60%);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --blur: 18px;
  --shadow-sm: 0 1px 2px rgb(17 19 24 / 6%);
  --shadow: 0 10px 30px -12px rgb(17 19 24 / 22%), 0 2px 6px rgb(17 19 24 / 5%);
  --shadow-glass: 0 20px 50px -24px rgb(17 19 24 / 30%), inset 0 1px 0 rgb(255 255 255 / 70%);
  --neu: 6px 6px 16px rgb(120 100 70 / 18%), -6px -6px 16px rgb(255 255 255 / 85%);
  --neu-in: inset 3px 3px 8px rgb(120 100 70 / 16%), inset -3px -3px 8px rgb(255 255 255 / 85%);
  --shadow-book: 0 2px 4px rgb(17 19 24 / 14%), 0 22px 40px -14px rgb(17 19 24 / 45%);
  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --font-display: "Fraunces Variable", Georgia, "Times New Roman", "Noto Serif Devanagari", serif;
  --header-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  background:
    radial-gradient(900px 520px at 100% -8%, rgb(255 107 26 / 13%), transparent 60%),
    radial-gradient(800px 600px at -15% 30%, rgb(17 19 24 / 6%), transparent 60%),
    radial-gradient(700px 500px at 110% 85%, rgb(255 107 26 / 8%), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 4.4vw + 1rem, 3.7rem); }
h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.7vw + 1rem, 2.1rem); font-weight: 600; }
h3, .h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.narrow { max-width: 820px; }
.narrow-sm { max-width: 480px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 8px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: rgb(17 19 24 / 6%); padding: 4px 10px; border-radius: 999px; margin: 0 0 10px; }
.skip-link { position: absolute; left: 8px; top: -100px; background: var(--ink); color: var(--cream); padding: 8px 16px; border-radius: var(--radius-sm); z-index: 200; }
.skip-link:focus { top: 8px; color: var(--cream); }

/* ---------- Glass & neumorphic surfaces ---------- */
.glass, .card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card { background: var(--surface-solid); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font: 650 .95rem/1 var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s;
  box-shadow: 0 10px 22px -12px rgb(17 19 24 / 60%);
}
.btn:hover { background: var(--ink-2); color: #fff; border-color: var(--ink-2); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgb(17 19 24 / 65%); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: progress; box-shadow: none; transform: none; }
.btn-accent, .btn-cta { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 26px -12px rgb(255 107 26 / 75%); }
.btn-accent:hover, .btn-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); filter: brightness(1.05); box-shadow: 0 16px 30px -12px rgb(255 107 26 / 80%); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-outline, .btn-ghost, .btn-light {
  background: var(--surface-solid); color: var(--ink); border-color: transparent;
  box-shadow: var(--neu);
}
.btn-outline:hover, .btn-ghost:hover, .btn-light:hover { background: #fff; color: var(--ink); border-color: transparent; box-shadow: 4px 4px 12px rgb(120 100 70 / 22%), -4px -4px 12px rgb(255 255 255 / 90%); }
.btn-outline:active, .btn-ghost:active { box-shadow: var(--neu-in); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; text-decoration: none; white-space: nowrap; color: var(--ink); }
.link-arrow:hover { color: var(--accent-text); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: rgb(17 19 24 / 6%); color: var(--ink); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgb(17 19 24 / 15%); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.announce { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: var(--cream); font-size: .82rem; font-weight: 500; padding: 9px 16px; text-align: center; }
.announce::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.announce a { color: var(--cream); font-weight: 700; }
.announce a:hover { color: #fff; }
.announce .icon { display: none; }
/* No backdrop-filter on phones: it would trap the pickers' fixed bottom sheet inside the header. */
.site-header { position: sticky; top: 0; z-index: 60; background: rgb(245 239 227 / 94%); border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .site-header { background: rgb(245 239 227 / 72%); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.3rem; letter-spacing: -0.01em; min-height: 44px; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo img { border-radius: 50%; box-shadow: 0 4px 12px -4px rgb(17 19 24 / 45%); }
.logo .logo-dot { color: var(--accent); }
.header-search { flex: 1; max-width: 400px; display: none; }
.search { display: flex; align-items: center; background: var(--surface-solid); border: 1px solid transparent; border-radius: 999px; padding-left: 16px; box-shadow: var(--neu-in); transition: box-shadow .15s, border-color .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 107 26 / 18%); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; min-height: 44px; color: var(--ink); outline: none; }
.search button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.header-nav { display: none; gap: 2px; }
.header-nav a { color: var(--text); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 10px 14px; border-radius: 999px; }
.header-nav a:hover { background: rgb(17 19 24 / 6%); color: var(--ink); }
.header-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-solid); box-shadow: var(--neu); }
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.header-action { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem; }
.header-action:hover { background: rgb(17 19 24 / 6%); color: var(--ink); }
.header-action[aria-current="page"] { color: var(--accent-text); }
.header-action span:not(.cart-count) { display: none; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 800; display: grid; place-items: center; line-height: 1; border: 2px solid var(--cream); }
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }
.header-action.admin-link { font-weight: 750; color: var(--accent-text); font-size: .88rem; }

@media (min-width: 640px) {
  .header-action span:not(.cart-count) { display: inline; }
  .cart-link .cart-label { display: none !important; }
}
@media (min-width: 1024px) {
  .menu-toggle, .mobile-menu { display: none !important; }
  .header-nav { position: relative; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / 45%); box-shadow: var(--neu-in); }
  .header-inner { gap: 18px; }
  .header-search { display: block; }
  .header-nav { display: flex; margin-left: auto; }
  .header-actions { margin-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 32px 0; }
.section-muted { background: rgb(255 253 248 / 45%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding: 88px 0; } .section-tight { padding: 44px 0; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head .lead { margin: 8px 0 0; }
.page-hero { padding: 36px 0 28px; }
.page-hero h1 { font-size: clamp(2rem, 3vw + 1rem, 2.9rem); margin: 8px 0 8px; }
.page-hero .lead { margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 550; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 44px 0 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--ink); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .2em; background: var(--accent); opacity: .35; border-radius: 4px; z-index: -1; }
.hero h1 .dot { color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-solid); color: var(--ink); font-size: .85rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; box-shadow: var(--neu); }
.pill .icon { color: var(--accent-text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 24px; }
.hero-actions.center { justify-content: center; }
.hero-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .92rem; font-weight: 500; }
.hero-checks li { display: inline-flex; align-items: center; gap: 6px; }
.hero-checks .icon { color: var(--success); }
.hero-art { display: flex; justify-content: center; }
.hero-stage { position: relative; width: min(100%, 460px); padding: 28px; border-radius: var(--radius-lg); }
.hero-stage::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; right: -8%; top: -10%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a47, var(--accent)); opacity: .9; filter: blur(2px); z-index: -1; }
.hero-stage::after { content: ""; position: absolute; width: 36%; aspect-ratio: 1; left: -6%; bottom: -8%; border-radius: 50%; background: var(--ink); opacity: .9; z-index: -1; }
.book-stack { position: relative; width: 100%; aspect-ratio: 1 / .92; }
.book-stack > div { position: absolute; width: 50%; }
.book-stack .stack-0 { left: 25%; top: 2%; z-index: 3; }
.book-stack .stack-1 { left: 2%; top: 14%; z-index: 2; transform: rotate(-8deg); }
.book-stack .stack-2 { right: 2%; top: 14%; z-index: 1; transform: rotate(8deg); }
.hero-badge { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: .82rem; font-weight: 600; color: var(--ink); z-index: 4; }
.hero-badge .icon { color: var(--accent-text); }
.hero-badge-1 { left: -6px; bottom: 18px; }
.hero-badge-2 { right: -6px; top: 18px; }
@media (max-width: 479px) { .hero-badge { display: none; } }
@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
}

/* ---------- Book cover ---------- */
.book { position: relative; border-radius: 4px 12px 12px 4px; overflow: hidden; box-shadow: var(--shadow-book); background: var(--cream-2); }
.book img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.book::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 9%; background: linear-gradient(90deg, rgb(0 0 0 / 28%), rgb(255 255 255 / 18%) 45%, rgb(0 0 0 / 6%)); z-index: 1; }
.book::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgb(255 255 255 / 20%), transparent 40%); pointer-events: none; }
.book-sm { width: 64px; flex: none; border-radius: 3px 6px 6px 3px; }

/* ---------- Perks ---------- */
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.perks li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.perks strong { display: block; color: var(--ink); font-size: .98rem; }
.perks span:not(.perk-icon) { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.perk-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--surface-solid); color: var(--accent-text); box-shadow: var(--neu); }

/* ---------- Product grid ---------- */
.grid { display: grid; gap: 20px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { display: flex; flex-direction: column; padding: 14px; transition: box-shadow .25s, transform .25s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -24px rgb(17 19 24 / 40%), inset 0 1px 0 rgb(255 255 255 / 70%); }
.product-card-media { display: block; padding: 16px 13% 20px; background: linear-gradient(160deg, rgb(255 255 255 / 70%), rgb(236 228 212 / 80%)); border-radius: 14px; margin-bottom: 14px; box-shadow: var(--neu-in); }
.product-card-body { display: flex; flex-direction: column; flex: 1; }
.product-card-body .tag { align-self: flex-start; margin-bottom: 8px; }
.product-card-title { font-size: 1rem; line-height: 1.3; margin: 0 0 6px; }
.product-card-title a { color: var(--ink); text-decoration: none; }
.product-card-title a:hover { color: var(--accent-text); }
.product-card-langs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; margin: 0 0 8px; }
.product-card-langs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card-rating { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin: 0 0 10px; }
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--ink); font-size: 1.08rem; margin: 0; }
.price .from { font-weight: 500; color: var(--muted); font-size: .8rem; }
@media (max-width: 479px) {
  .product-card { padding: 10px; }
  .product-card-foot .btn { width: 100%; }
}

/* ---------- Language tiles (home + shop) ---------- */
.lang-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lang-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.lang-tile:hover { transform: translateY(-3px); color: var(--ink); }
.lang-tile .flag { margin-bottom: 6px; }
.lang-tile strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; }
.lang-tile .lang-meta { font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.lang-tile::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--accent); opacity: .12; transition: opacity .2s; }
.lang-tile:hover::after { opacity: .25; }

/* ---------- Steps, promo, FAQ ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { padding: 26px; }
.steps p { color: var(--muted); margin: 0; }
.step-no { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--cream); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; box-shadow: 0 8px 18px -8px rgb(17 19 24 / 60%); }
.promo { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; padding: 34px 26px; border-radius: var(--radius-lg); background: var(--ink); color: rgb(245 239 227 / 80%); }
.promo::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--accent); opacity: .9; }
.promo > * { position: relative; z-index: 1; }
.promo h2 { color: var(--cream); }
.promo p { margin: 0; max-width: 56ch; }
.promo .btn-light { background: var(--cream); color: var(--ink); box-shadow: none; }
@media (min-width: 768px) { .promo { flex-direction: row; align-items: center; justify-content: space-between; padding: 46px 52px; } }
.faq { display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 17px 52px 17px 20px; font-weight: 650; color: var(--ink); position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-solid); box-shadow: var(--neu); font-size: 1.1rem; font-weight: 500; color: var(--ink); }
.faq details[open] summary::after { content: "–"; background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* ---------- Shop ---------- */
.filter-bar { display: grid; gap: 14px; padding: 16px; margin-bottom: 22px; }
.filter-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-row-label { flex: none; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 76px; }
.filter-group, .chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; min-width: 0; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; box-shadow: 3px 3px 8px rgb(120 100 70 / 14%), -3px -3px 8px rgb(255 255 255 / 85%); }
.chip:hover { color: var(--ink); background: #fff; }
.chip[aria-current="true"], .chip-soft[aria-current="true"] { background: var(--ink); color: var(--cream); box-shadow: 0 8px 16px -8px rgb(17 19 24 / 60%); }
.chip .count { font-size: .75rem; opacity: .7; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar p { margin: 0; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form label { font-size: .9rem; color: var(--muted); }
select { min-height: 44px; padding: 0 38px 0 14px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e594f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; font: inherit; font-size: 16px; color: var(--ink); max-width: 100%; box-shadow: var(--neu-in); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 56px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.empty-state .icon { color: var(--accent-text); margin-bottom: 8px; }
.empty-state h2 { font-size: 1.35rem; margin: 0; }
.empty-state .hero-actions { margin: 12px 0 0; }

/* ---------- Product page ---------- */
.product-grid { display: grid; gap: 32px; margin-top: 12px; }
.product-gallery { padding: 30px 18%; border-radius: var(--radius-lg); }
.product-title { font-size: clamp(2rem, 2.8vw + 1rem, 2.9rem); margin-bottom: 10px; }
.product-rating-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; text-decoration: none; margin: 0 0 6px; }
.product-rating-link:hover { color: var(--ink); }
.product-price { font-size: 2.1rem; font-weight: 800; color: var(--ink); margin: 18px 0 20px; letter-spacing: -0.02em; }
.product-price .small { font-weight: 500; letter-spacing: 0; }
.buy-box { padding: 20px; margin-top: 8px; }
.edition-form fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.edition-form legend { font-weight: 650; color: var(--ink); margin-bottom: 10px; padding: 0; }
.edition-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.edition-option { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid transparent; border-radius: 14px; cursor: pointer; background: var(--surface-solid); box-shadow: var(--neu); transition: border-color .15s, box-shadow .15s; }
.edition-option:hover { border-color: rgb(255 107 26 / 45%); }
.edition-option:has(input:checked) { border-color: var(--accent); box-shadow: var(--neu-in), 0 0 0 1px var(--accent); }
.edition-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.edition-option input { position: absolute; opacity: 0; pointer-events: none; }
.edition-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.edition-sub { font-size: .82rem; color: var(--muted); }
.buy-actions { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .buy-actions { grid-template-columns: 1fr 1fr; } }
.owned-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--success-bg); color: var(--success); font-weight: 600; margin-top: 10px; }
.owned-note[hidden] { display: none; }
.owned-note .btn { margin-left: auto; }
.product-perks { list-style: none; padding: 18px 0 0; margin: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: .93rem; }
.product-perks li { display: flex; gap: 10px; align-items: flex-start; }
.product-perks .icon { color: var(--accent-text); margin-top: 2px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.specs div { background: var(--surface-solid); padding: 12px 14px; border-radius: 14px; box-shadow: var(--neu-in); }
.specs dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.specs dd { margin: 2px 0 0; font-weight: 650; color: var(--ink); font-size: .93rem; }
.bonus-list { list-style: none; margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); display: grid; gap: 6px; font-size: .92rem; }
.bonus-list strong { color: var(--ink); }
.bonus-list li { display: flex; gap: 8px; align-items: flex-start; }
.bonus-list .icon { color: var(--accent-text); margin-top: 3px; }
.product-details { display: grid; gap: 40px; }
.details-faq h2 { font-size: 1.35rem; }
@media (min-width: 960px) {
  .product-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
  .product-gallery { position: sticky; top: calc(var(--header-h) + 24px); padding: 52px 16%; }
  .product-details { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
}
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--success); margin-top: 3px; }
.buy-bar { display: none; }
@media (max-width: 959px) {
  .has-buy-bar .buy-bar { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px; background: rgb(17 19 24 / 92%); color: var(--cream); box-shadow: 0 18px 40px -16px rgb(17 19 24 / 70%); transform: translateY(150%); transition: transform .25s; }
  .has-buy-bar .buy-bar.is-visible { transform: none; }
  .buy-bar > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .buy-bar strong { font-size: 1.15rem; color: var(--cream); }
  .buy-bar .muted { color: rgb(245 239 227 / 70%); }
  .buy-bar .btn { flex: none; min-width: 130px; }
  .has-buy-bar .site-footer { padding-bottom: 90px; }
}

/* ---------- Stars & reviews ---------- */
.stars { display: inline-flex; gap: 1px; color: var(--star); line-height: 1; }
.stars .icon { width: 1em; height: 1em; }
.stars .off { color: rgb(17 19 24 / 18%); }
.reviews-layout { display: grid; gap: 28px; }
@media (min-width: 960px) { .reviews-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; } }
.review-summary { padding: 22px; }
.review-avg { display: flex; align-items: baseline; gap: 10px; }
.review-avg strong { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--ink); }
.review-bars { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.review-bars li { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; }
.review-bar { height: 8px; border-radius: 999px; background: rgb(17 19 24 / 8%); overflow: hidden; }
.review-bar span { display: block; height: 100%; background: var(--star); border-radius: inherit; }
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.review { padding: 18px 20px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.review-head strong { color: var(--ink); }
.review-title { font-weight: 700; color: var(--ink); margin: 4px 0; }
.review p { margin: 0; white-space: pre-line; }
.verified { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--success); background: var(--success-bg); padding: 2px 8px; border-radius: 999px; }
.review-reply { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: rgb(255 255 255 / 55%); border-radius: 0 12px 12px 0; font-size: .92rem; }
.review-form { padding: 20px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: rgb(17 19 24 / 22%); padding: 2px; }
.star-input label .icon { width: 30px; height: 30px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid var(--accent); border-radius: 6px; }

/* ---------- Forms & alerts ---------- */
.field { margin-bottom: 16px; }
.field label, .field > span { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="search"]:not(.search input) { width: 100%; }
.field input, .field textarea, .field select, .input {
  width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid transparent; border-radius: 14px;
  background: var(--surface-solid); color: var(--ink); font: inherit; font-size: 16px;
  box-shadow: var(--neu-in); transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.5; border-radius: 16px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 107 26 / 20%); outline: none; }
.field input[readonly] { color: var(--muted); }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.hint { display: block; font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.alert { padding: 12px 16px; border-radius: 14px; margin: 0 0 16px; font-size: .93rem; font-weight: 500; border: 1px solid transparent; }
.alert[hidden] { display: none; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #b7e2c8; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #f5c2bd; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c2d5f0; }
.alert a { color: inherit; font-weight: 700; }
.form-card { padding: 24px 20px; }
@media (min-width: 640px) { .form-card { padding: 34px; } }
.secure-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .82rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 130; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 14px 12px 18px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: .93rem; font-weight: 500; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }
.toast a { color: var(--accent); font-weight: 700; white-space: nowrap; }
.has-buy-bar .toast { bottom: 96px; }

/* ---------- Cart ---------- */
.cart-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; }
.cart-loading[hidden] { display: none; }
.cart-layout { display: grid; gap: 28px; }
.cart-layout[hidden], .empty-state[hidden] { display: none; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 410px; align-items: start; gap: 40px; } .summary { position: sticky; top: calc(var(--header-h) + 20px); } }
.cart-items { list-style: none; margin: 0 0 16px; padding: 6px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass); }
.cart-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info a { color: var(--ink); font-weight: 650; text-decoration: none; }
.cart-item-info a:hover { color: var(--accent-text); }
.cart-item-info p { margin: 2px 0 0; font-size: .87rem; color: var(--muted); }
.cart-item-owned { color: var(--danger) !important; font-weight: 600; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-item-side .price { font-size: 1rem; }
.remove-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; min-height: 40px; padding: 0 4px; }
.remove-btn:hover { color: var(--danger); }
.back-link { display: inline-flex; margin-top: 4px; }
.summary { padding: 24px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); }
.summary h2 { font-size: 1.3rem; }
.summary-lines { margin: 0 0 20px; }
.summary-lines div { display: flex; justify-content: space-between; padding: 8px 0; }
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; font-weight: 600; color: var(--ink); }
.summary-total { border-top: 1px solid var(--line-strong); margin-top: 6px; padding-top: 14px !important; }
.summary-total dt, .summary-total dd { font-size: 1.15rem; font-weight: 800 !important; color: var(--ink) !important; }
.summary-charge dt, .summary-charge dd { font-weight: 700 !important; color: var(--accent-text) !important; }
.summary-charge[hidden] { display: none !important; }

/* ---------- Order complete ---------- */
.success-hero { text-align: center; margin-bottom: 28px; }
.success-icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--success-bg); color: var(--success); margin-bottom: 16px; box-shadow: var(--neu); }
.success-hero h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 2.5rem); }
.success-hero .lead { margin: 0 auto; }
.order-items { list-style: none; margin: 0 0 24px; padding: 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass); }
.order-items li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.order-items li + li { border-top: 1px solid var(--line); }
.order-item-info { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.order-item-info strong { color: var(--ink); }
.library-cta { display: flex; flex-direction: column; gap: 16px; padding: 24px; margin-bottom: 24px; }
.library-cta h2 { font-size: 1.25rem; margin-bottom: 4px; }
.library-cta p { margin: 0; }
@media (min-width: 640px) { .library-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0; font-size: .9rem; }
.order-meta dt { color: var(--muted); }
.order-meta dd { margin: 0; font-weight: 600; color: var(--ink); word-break: break-all; }

/* ---------- Auth & library ---------- */
.auth-card { padding: 32px 22px; text-align: left; }
@media (min-width: 640px) { .auth-card { padding: 42px; } }
.auth-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; }
.auth-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: var(--cream); margin-bottom: 18px; box-shadow: 0 10px 22px -10px rgb(17 19 24 / 60%); }
.resend { text-align: center; margin-top: 8px; }
.account-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 28px; }
.account-bar p { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.account-bar form { margin: 0; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.library-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.library-item-body { padding-top: 14px; }
.library-item h2 { font-family: var(--font); font-size: 1rem; margin: 0 0 2px; }
.library-item h2 a { color: var(--ink); text-decoration: none; }
.library-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.library-actions .btn:first-child { flex: 1; }
.extra-files { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .85rem; }
.extra-files a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
@media (max-width: 479px) { .hide-sm { display: none; } }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass); }
.orders-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.orders-table th, .orders-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.orders-table th { font-weight: 700; color: var(--ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.orders-table tr:last-child td { border-bottom: 0; }

/* ---------- Reader ---------- */
.reader-body .announce, .reader-body .site-footer, .reader-body .assistant { display: none; }
.reader { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-h)); background: #e4ddd0; }
.reader-bar { position: sticky; top: var(--header-h); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-solid); border-bottom: 1px solid var(--line); }
.reader-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.reader-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.reader-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-controls { display: flex; align-items: center; gap: 2px; }
.reader-zoom { font-size: .8rem; color: var(--muted); min-width: 40px; text-align: center; }
.reader-page { font-size: .85rem; font-weight: 600; color: var(--ink); padding: 0 8px; white-space: nowrap; }
@media (max-width: 559px) { .reader-zoom, [data-zoom] { display: none; } .reader-title span { display: none; } }
.reader-pages { flex: 1; display: flex; flex-direction: column; align-items: safe center; gap: 14px; padding: 16px 8px 40px; overflow-x: auto; outline: none; }
.reader-page-box { position: relative; background: #fff; box-shadow: 0 2px 10px rgb(17 19 24 / 18%); max-width: none; }
.reader-page-box canvas { display: block; width: 100%; height: 100%; }
.reader-status { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 60px 16px; text-align: center; }

/* ---------- Contact / legal / misc ---------- */
.contact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 32px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; text-decoration: none; color: var(--text); transition: transform .2s; }
.contact-card:hover { transform: translateY(-3px); color: var(--text); }
.contact-card .perk-icon { margin-bottom: 4px; }
.contact-card h2 { font-family: var(--font); font-size: 1.05rem; margin: 10px 0 0; }
.contact-card p { margin: 0; color: var(--accent-text); font-weight: 650; word-break: break-word; }
.business-details { padding: 22px; }
.business-details dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.business-details dt { color: var(--muted); font-weight: 600; }
.business-details dd { margin: 0; color: var(--ink); }
.legal-updated { font-size: .88rem; color: var(--muted); }
.error-page { padding: 96px 0; }
.error-code { font-family: var(--font-display); font-size: clamp(4.5rem, 14vw, 8rem); font-weight: 700; line-height: 1; margin: 0 0 12px; color: var(--ink); }
.error-code span { color: var(--accent); }
.error-page .lead { margin: 0 auto; }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; gap: 18px; padding: 28px 24px; align-items: center; }
@media (min-width: 860px) { .newsletter { grid-template-columns: 1fr 1.1fr; padding: 38px 42px; } }
.newsletter h2 { margin-bottom: 6px; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-form { display: grid; gap: 10px; }
.newsletter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-row input { flex: 1 1 220px; min-height: 50px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-solid); font: inherit; font-size: 16px; box-shadow: var(--neu-in); }
.newsletter-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 107 26 / 20%); }
.newsletter-form .check { margin: 0; font-size: .82rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink); color: rgb(245 239 227 / 72%); margin-top: 64px; font-size: .93rem; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; right: -120px; top: -120px; width: 300px; height: 300px; border-radius: 50%; background: var(--accent); opacity: .12; }
.footer-top { position: relative; display: grid; gap: 32px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 56px; padding-bottom: 40px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: rgb(245 239 227 / 72%); max-width: 46ch; margin: 14px 0; }
.logo-light, .logo-light:hover { color: var(--cream); }
@media (min-width: 900px) { .footer-top { grid-template-columns: 2.2fr 1fr 1fr 1.2fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-title { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); margin-bottom: 14px; font-family: var(--font); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: rgb(245 239 227 / 82%); text-decoration: none; word-break: break-word; }
.site-footer li a:hover { color: var(--accent); }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-methods li { font-size: .75rem; font-weight: 600; color: var(--cream); border: 1px solid rgb(245 239 227 / 20%); border-radius: 999px; padding: 3px 10px; }
.social-links { display: flex; gap: 8px; margin-top: 14px; }
.social-links a { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgb(245 239 227 / 8%); color: var(--cream); border: 1px solid rgb(245 239 227 / 14%); }
.social-links a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.site-footer .secure-line { justify-content: flex-start; color: rgb(245 239 227 / 72%); }
.footer-bottom { position: relative; border-top: 1px solid rgb(245 239 227 / 12%); padding: 18px 0; font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.rates-credit a { color: rgb(245 239 227 / 82%); }

.approx-note { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--muted); background: rgb(255 255 255 / 50%); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 16px; }
.approx-note .icon { margin-top: 2px; color: var(--accent-text); }

/* Letter-spacing breaks joined scripts like Devanagari; keep it for Latin only. */
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .eyebrow,
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .tag,
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .footer-title,
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .filter-row-label,
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .specs dt { letter-spacing: 0; text-transform: none; }
[lang]:not([lang="en"]):not([lang="es"]):not([lang="fr"]).chip { letter-spacing: 0; }

/* ---------- Pickers (website language / currency) with flags ---------- */
.flag { display: inline-block; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgb(17 19 24 / 12%); object-fit: cover; }
.flag-globe { display: inline-grid; place-items: center; width: 20px; height: 15px; color: var(--accent-text); box-shadow: none; }
.picker { position: relative; }
.picker > summary { list-style: none; cursor: pointer; }
.picker > summary::-webkit-details-marker { display: none; }
.picker-btn { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-radius: 14px; background: var(--surface-solid); box-shadow: var(--neu); transition: box-shadow .15s; }
.picker-btn:hover, .picker[open] > .picker-btn { box-shadow: 0 0 0 2px var(--accent); }
.picker-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.picker-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.picker-value { font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-value .muted { font-weight: 450; font-size: .85rem; }
.picker-caret { color: var(--muted); transform: rotate(90deg); transition: transform .15s; display: inline-flex; }
.picker[open] .picker-caret { transform: rotate(-90deg); }
.picker-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 80; width: max(100%, 320px); max-width: calc(100vw - 32px); background: var(--surface-solid); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: 0 24px 60px -18px rgb(17 19 24 / 40%); padding: 10px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.picker-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; margin-bottom: 8px; color: var(--muted); background: var(--surface-solid); box-shadow: var(--neu-in); }
.picker-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.picker-search input { flex: 1; min-width: 0; border: 0; outline: none; min-height: 42px; font: inherit; font-size: 16px; color: var(--ink); background: transparent; }
.picker-list { position: relative; list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.picker-list-short { max-height: none; }
.picker-heading { position: sticky; top: 0; z-index: 1; background: rgb(255 253 248 / 98%); padding: 10px 10px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.picker-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "flag main check" "flag sub check"; column-gap: 12px; align-items: center; width: 100%; min-height: 48px; padding: 7px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.picker-option:hover, .picker-option:focus-visible { background: var(--accent-soft); color: var(--ink); outline: none; }
.picker-option[aria-current="true"] { background: var(--accent-soft); }
.picker-option > .flag { grid-area: flag; }
.opt-main { grid-area: main; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-sub { grid-area: sub; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-main:only-of-type { grid-row: 1 / span 2; }
.opt-check { grid-area: check; color: var(--accent-text); display: inline-flex; }
.picker-empty { padding: 16px 10px; margin: 0; color: var(--muted); text-align: center; }
.picker-form { margin: 0; }
.picker-sheet-head { display: none; align-items: center; justify-content: space-between; margin: -4px 0 10px; color: var(--ink); }
.picker-close { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-solid); box-shadow: var(--neu); color: var(--ink); cursor: pointer; }
@media (max-width: 639px) { .picker-sheet-head { display: flex; } }
.picker-pair { display: grid; gap: 10px; }
.picker-pair-row { max-width: 720px; margin-bottom: 24px; }
@media (min-width: 640px) { .picker-pair-row { grid-template-columns: 1fr 1fr; } .picker-pair-row > .picker:last-child .picker-panel { left: auto; right: 0; } }
.picker-pair > .picker[open] { z-index: 5; }

/* Header: website language + currency in one panel */
.picker-head > .picker-btn.header-action { min-height: 42px; padding: 0 12px; border-radius: 999px; gap: 7px; background: var(--surface-solid); box-shadow: 3px 3px 8px rgb(120 100 70 / 14%), -3px -3px 8px rgb(255 255 255 / 80%); font-size: .9rem; font-weight: 650; }
.picker-head > .picker-btn.header-action:hover, .picker-head[open] > .picker-btn.header-action { box-shadow: 0 0 0 2px var(--accent); background: #fff; }
.picker-head .picker-caret { transform: rotate(90deg) scale(.85); }
.picker-head[open] .picker-caret { transform: rotate(-90deg) scale(.85); }
.head-pick-sym { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: .75rem; font-weight: 800; }
.picker-head .header-action .head-pick-code { display: none; }
.picker-title { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 4px 12px; }
.picker-head .picker-panel { left: auto; right: 0; }
.picker-panel-lang { width: 380px; }
.picker-panel-cur { width: 360px; }
.lang-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lang-choice-btn { position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border: 1.5px solid transparent; border-radius: 14px; background: var(--surface-solid); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--neu); transition: transform .15s, border-color .15s; }
.lang-choice-btn:hover { transform: translateY(-2px); border-color: rgb(255 107 26 / 40%); }
.lang-choice-btn[aria-current="true"] { border-color: var(--accent); box-shadow: var(--neu-in); }
.lang-choice-btn span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lang-choice-btn small { color: var(--muted); font-size: .76rem; }
.lang-choice-btn .opt-check { position: absolute; top: 8px; right: 8px; }
.picker-note { margin: 12px 4px 2px; font-size: .8rem; color: var(--muted); }
.picker-title .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
@media (max-width: 639px) { .header-login { display: none; } }
@media (max-width: 479px) {
  .picker-head > .picker-btn.header-action { padding: 0 9px; gap: 5px; }
  .picker-head .head-pick-text[lang] { display: none; }
  .picker-head .header-action .head-pick-code { display: inline; }
  .picker-head .header-action .head-pick-text[lang] { display: none; }
  .picker-head .picker-caret { display: none; }
}

/* Compact currency picker beside a price */
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 18px 0 16px; }
.price-row .product-price { margin: 0; }
.picker-compact > .picker-btn { min-height: 44px; padding: 6px 12px; }
.picker-compact .picker-label { display: none; }
.picker-block { margin-bottom: 16px; }

/* Mobile: panels open as a bottom sheet */
@media (max-width: 639px) {
  .picker-panel, .picker-head .picker-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: none; max-height: 82vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); z-index: 120; background: var(--surface-solid); }
  .picker[open]::before { content: ""; position: fixed; inset: 0; background: rgb(17 19 24 / 45%); z-index: 110; }
  .picker-list { max-height: 55vh; }
}

/* ---------- Free preview ---------- */
.preview-link { margin-top: 10px; }
.preview-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.preview-viewer { border-radius: var(--radius); overflow: hidden; background: #e4ddd0; box-shadow: var(--shadow-glass); border: 1px solid var(--glass-border); }
.preview-viewer .reader-bar { position: static; }
.preview-viewer .reader-pages { height: min(78vh, 900px); overflow-y: auto; overscroll-behavior: contain; }
.preview-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.preview-start { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 100%; padding: 32px 16px; text-align: center; }
.preview-start .book-sm { width: 110px; }
.preview-cta { display: flex; flex-direction: column; gap: 16px; padding: 22px; margin-top: 16px; }
.preview-cta h3 { margin: 0 0 4px; }
.preview-cta p { margin: 0; }
.preview-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) { .preview-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
@media (max-width: 559px) { .preview-viewer .reader-title { display: none; } }

/* Small phones: keep logo, currency and cart on one line */
@media (max-width: 479px) {
  .header-inner { gap: 6px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo img { width: 32px; height: 32px; }
  .header-action { padding: 0 6px; }
}

/* ---------- Firebase login ---------- */
.btn-google { background: var(--surface-solid); color: var(--ink); border-color: transparent; box-shadow: var(--neu); }
.btn-google:hover { background: #fff; color: var(--ink); border-color: transparent; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ---------- AI helper (chat) ---------- */
.assistant { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; }
.has-buy-bar .assistant { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .has-buy-bar .assistant { bottom: 24px; } .assistant { right: 24px; bottom: 24px; } }
.assistant-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font: 650 .95rem var(--font); cursor: pointer; box-shadow: 0 18px 36px -14px rgb(17 19 24 / 70%); }
.assistant-toggle img { width: 40px; height: 40px; border-radius: 50%; }
.assistant-toggle:hover { background: var(--ink-2); }
@media (max-width: 479px) { .assistant-toggle span { display: none; } .assistant-toggle { padding: 0 8px; } }
.assistant-panel { position: absolute; right: 0; bottom: 70px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: rgb(255 253 248 / 88%); border: 1px solid var(--glass-border); box-shadow: 0 30px 70px -20px rgb(17 19 24 / 50%); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
.assistant-panel[hidden] { display: none; }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--ink); color: var(--cream); }
.assistant-head img { width: 34px; height: 34px; border-radius: 50%; }
.assistant-head div { flex: 1; min-width: 0; line-height: 1.25; }
.assistant-head strong { display: block; }
.assistant-head span { font-size: .78rem; opacity: .75; }
.assistant-head .icon-btn { color: var(--cream); }
.assistant-head .icon-btn:hover { background: rgb(245 239 227 / 12%); color: #fff; }
.assistant-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .93rem; line-height: 1.5; white-space: pre-line; word-wrap: break-word; }
.msg-bot { align-self: flex-start; background: var(--surface-solid); color: var(--text); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.msg-user { align-self: flex-end; background: var(--ink); color: var(--cream); border-bottom-right-radius: 6px; }
.msg a { color: var(--accent-text); font-weight: 650; }
.msg-user a { color: var(--accent); }
.msg-typing { display: inline-flex; gap: 4px; }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .2s; }
.msg-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.assistant-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.assistant-chips button { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface-solid); color: var(--ink); font: 600 .82rem var(--font); cursor: pointer; box-shadow: 2px 2px 6px rgb(120 100 70 / 14%), -2px -2px 6px rgb(255 255 255 / 85%); }
.assistant-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.assistant-form input { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-solid); font: inherit; font-size: 16px; box-shadow: var(--neu-in); }
.assistant-form input:focus { outline: none; border-color: var(--accent); }
.assistant-form .btn { min-height: 46px; padding: 0 16px; }
.assistant-note { margin: 0; padding: 0 14px 10px; font-size: .72rem; color: var(--muted); text-align: center; }
.field-legend { font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 6px; padding: 0; }
.review-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 639px) {
  .header-action.admin-link { display: none; }
  .filter-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .filter-row-label { min-width: 0; }
  .filter-bar { padding: 12px; }
}

/* ---------- Coupon (cart) ---------- */
.coupon-box { margin: 0 0 18px; }
.coupon-details summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font-weight: 650; color: var(--accent-text); list-style: none; }
.coupon-details summary::-webkit-details-marker { display: none; }
.coupon-form { display: flex; gap: 8px; margin-top: 6px; }
.coupon-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-solid); font: inherit; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; box-shadow: var(--neu-in); color: var(--ink); }
.coupon-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 107 26 / 20%); }
.coupon-form input::placeholder { text-transform: none; letter-spacing: 0; }
.coupon-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--success-bg); color: var(--success); font-weight: 600; font-size: .9rem; }
.coupon-applied[hidden], .coupon-msg[hidden] { display: none; }
.coupon-applied .link-btn { min-height: 32px; font-size: .85rem; }
.coupon-msg { margin: 8px 0 0; font-size: .88rem; color: var(--danger); font-weight: 600; }
.summary-discount dt, .summary-discount dd { color: var(--success) !important; font-weight: 700 !important; }
.summary-lines div[hidden] { display: none; }
/* Radios/checkboxes inside a .field keep their normal size (not the text-input style). */
.field .check input[type="radio"], .field .check input[type="checkbox"], .field input[type="radio"], .field input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; flex: none; margin: 1px 0 0; }

/* ---------- Motion: reveal, soft 3D, floating, shine (public/js/motion.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 18px; transition: opacity .6s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms), translate .6s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms); }
  .reveal.is-in { opacity: 1; translate: 0 0; }
  .tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; transform-style: preserve-3d; will-change: transform; }
  .tilt:hover { --lift: -4px; transition: transform .12s ease-out, box-shadow .3s; }
  .product-card.tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
  .product-card.tilt::after, .stat.tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgb(255 255 255 / 35%), transparent 45%); opacity: 0; transition: opacity .3s; }
  .product-card.tilt:hover::after, .stat.tilt:hover::after { opacity: 1; }
  .product-card, .hero-stage, .product-gallery, .lang-tile, .stat { position: relative; }
  .product-card .book, .product-gallery .book { transition: transform .4s cubic-bezier(.2, .7, .2, 1); transform: translateZ(0); }
  .product-card:hover .book { transform: translateZ(30px) rotateY(-8deg) scale(1.03); }
  .book-stack > div { animation: float 6s ease-in-out infinite; }
  .book-stack .stack-1 { animation-delay: -2s; }
  .book-stack .stack-2 { animation-delay: -4s; }
  @keyframes float { 50% { translate: 0 -10px; } }
  .hero-stage::before { animation: glow 8s ease-in-out infinite; }
  @keyframes glow { 50% { transform: scale(1.06) translate(-6px, 6px); } }
  .btn { position: relative; overflow: hidden; }
  .btn-accent::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / 45%), transparent); transform: skewX(-20deg); transition: left .6s; }
  .btn-accent:hover::before { left: 120%; }
  .btn:active { transform: translateY(1px) scale(.98); }
  .chip, .edition-option, .faq details, .picker-option, .lang-choice-btn { transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s; }
  .chip:hover { transform: translateY(-1px); }
  .picker-panel, .assistant-panel { animation: pop .22s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top right; }
  .assistant-panel { transform-origin: bottom right; }
  @keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
  .faq details[open] p { animation: fade-down .3s ease-out both; }
  @keyframes fade-down { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
  .cart-count:not([hidden]) { animation: pop .3s both; }
  .assistant-toggle { animation: nudge 3s ease-in-out 2s 2; }
  @keyframes nudge { 0%, 100% { transform: none; } 10% { transform: translateY(-4px); } 20% { transform: none; } }
}
/* ---------- Touch feedback (public/js/motion.js) and page transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  .has-ripple { overflow: hidden; isolation: isolate; }
  .ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgb(255 255 255 / 55%) 0%, rgb(255 255 255 / 25%) 40%, transparent 70%); transform: scale(0); opacity: 1; animation: ripple .65s cubic-bezier(.2, .7, .2, 1) forwards; z-index: 0; }
  .btn-ghost .ripple, .btn-outline .ripple, .chip .ripple, .picker-option .ripple, .edition-option .ripple, .admin-nav a .ripple, .link-btn .ripple, .icon-btn .ripple { background: radial-gradient(circle, rgb(255 107 26 / 22%) 0%, rgb(255 107 26 / 10%) 45%, transparent 70%); }
  @keyframes ripple { to { transform: scale(1); opacity: 0; } }
  .btn, .icon-btn, .chip, .tool-btn, .picker-option, .edition-option, .admin-nav a, .theme-switch button, .link-btn { transition-property: transform, box-shadow, background-color, border-color, color, opacity; transition-duration: .18s; transition-timing-function: cubic-bezier(.2, .7, .2, 1); }
  .is-pressed:is(.btn, .icon-btn, .chip, .tool-btn, .picker-option, .edition-option, .theme-switch button, .link-btn) { transform: translateY(1px) scale(.965); box-shadow: inset 0 2px 6px rgb(17 19 24 / 18%); transition-duration: .08s; }
  .admin-nav a.is-pressed { transform: scale(.98); }
  .is-pressed:is(.product-card, .lang-tile, .cart-item, .library-item, .bill-tile) { --lift: 0px; scale: .985; transition: scale .1s ease-out; }
  :is(.product-card, .lang-tile, .cart-item, .library-item, .bill-tile) { transition: scale .3s cubic-bezier(.2, .7, .2, 1), transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }

  /* Cross-page view transitions were removed: some browsers delayed or skipped navigation with them. */
}
@media (max-width: 639px) {
  .picker-panel { animation-name: sheet-up !important; transform-origin: bottom center !important; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
}
.buy-review-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.buy-review-link .icon { color: var(--star); }
.buy-review-link strong { color: var(--accent-text); }
.auth-agree { margin: 4px 0 16px; }

/* ---------- Cookie consent ---------- */
.cookie-banner { position: fixed; z-index: 140; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; padding: 16px 18px; background: rgb(255 253 248 / 92%); }
.cookie-banner[hidden] { display: none; }
.cookie-form { display: grid; gap: 10px; }
.cookie-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 750; color: var(--ink); }
.cookie-title .icon { color: var(--accent-text); }
.cookie-text p { margin: 0; font-size: .9rem; }
.cookie-more summary { cursor: pointer; font-weight: 650; color: var(--accent-text); font-size: .9rem; }
.cookie-more[open] summary { margin-bottom: 10px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-options { display: grid; gap: 8px; margin-bottom: 12px; }
.cookie-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surface-solid); box-shadow: var(--neu-in); cursor: pointer; }
.cookie-opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.cookie-opt span { display: flex; flex-direction: column; }
.cookie-opt small { color: var(--muted); font-size: .8rem; }
.cookie-opt.is-locked { cursor: default; opacity: .85; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (min-width: 720px) { .cookie-form { grid-template-columns: 1fr auto; align-items: center; } .cookie-more { grid-column: 1 / -1; order: 3; } }
@media (prefers-reduced-motion: no-preference) { .cookie-banner { animation: sheet-up .45s cubic-bezier(.2, .8, .2, 1) .6s both; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
/* Header menus keep their short labels on phones */
@media (max-width: 639px) {
  .picker-head .header-action span.head-pick-sym, .picker-head .header-action span.head-pick-text:not([lang]), .picker-head .header-action span.head-pick-code { display: inline-grid; }
}
@media (max-width: 420px) {
  .logo span { display: none; }
}
.filter-row-lang .picker-book { flex: 0 1 360px; min-width: 0; }
.picker-book > .picker-btn { min-height: 48px; }
@media (max-width: 639px) { .filter-row-lang .picker-book { flex: 1 1 auto; } }
.filter-bar { position: relative; z-index: 30; }
.filter-bar:has(.picker[open]) { z-index: 70; }
.filter-row-lang .filter-row-label { display: none; }
.picker-panel-lang .picker-list { max-height: 360px; }
.lang-note { background: var(--accent-soft); color: var(--ink); font-size: .88rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lang-note .container { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lang-note span[lang] { font-weight: 700; }
.lang-note form { margin: 0; }
.lang-note .link-btn { min-height: 32px; }

/* ---------- Menu bar: sliding glider, burger, scroll state, mobile drawer ---------- */
.header-nav a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; transition: color .25s; }
.header-nav a .icon { opacity: .55; transition: opacity .25s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.header-nav a:hover .icon, .header-nav a[aria-current="page"] .icon { opacity: 1; color: var(--accent-text); }
.header-nav a:hover .icon { transform: translateY(-1px) rotate(-8deg) scale(1.12); }
.header-nav.has-glider a:hover, .header-nav.has-glider a[aria-current="page"] { background: none; box-shadow: none; }
.nav-glider { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--surface-solid); box-shadow: var(--neu), inset 0 -2px 0 rgb(255 107 26 / 55%); opacity: 0; transform: translateX(var(--gx, 0)); transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), width .45s cubic-bezier(.34, 1.4, .64, 1), opacity .25s; pointer-events: none; }
.header-nav.has-glider .nav-glider { width: var(--gw, 0); opacity: var(--go, 0); }
.site-header { transition: box-shadow .3s, background-color .3s; }
.site-header .header-inner { transition: min-height .3s cubic-bezier(.2, .7, .2, 1); }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgb(17 19 24 / 45%); }
.site-header.is-scrolled .header-inner { min-height: 58px; }
.header-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), #ffb347, var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); opacity: .9; pointer-events: none; }

.burger { position: relative; display: block; width: 22px; height: 16px; }
.burger i { position: absolute; left: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s cubic-bezier(.34, 1.4, .64, 1), opacity .2s, width .3s, top .3s; }
.burger i:nth-child(1) { top: 0; width: 22px; }
.burger i:nth-child(2) { top: 7px; width: 15px; }
.burger i:nth-child(3) { top: 14px; width: 19px; }
.menu-toggle:hover .burger i { width: 22px; }
[aria-expanded="true"] > .burger i:nth-child(1) { top: 7px; width: 22px; transform: rotate(45deg); }
[aria-expanded="true"] > .burger i:nth-child(2) { opacity: 0; transform: translateX(-8px); }
[aria-expanded="true"] > .burger i:nth-child(3) { top: 7px; width: 22px; transform: rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 120; }
.mobile-menu[hidden] { display: none; }
.menu-backdrop { position: absolute; inset: 0; background: rgb(17 19 24 / 45%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.menu-sheet { position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); display: flex; flex-direction: column; gap: 14px; padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(500px 300px at 0% 0%, rgb(255 107 26 / 14%), transparent 60%), linear-gradient(180deg, #fffaf2, var(--cream)); border-radius: 0 28px 28px 0; box-shadow: 30px 0 60px -30px rgb(17 19 24 / 55%); transform: translateX(calc(-100% - 24px)); transition: transform .42s cubic-bezier(.2, .9, .25, 1); touch-action: pan-y; }
.mobile-menu.is-open .menu-backdrop { opacity: 1; }
.mobile-menu.is-open .menu-sheet { transform: translateX(var(--drag, 0px)); }
.mobile-menu.is-dragging .menu-sheet { transition: none; }
.menu-head { display: flex; align-items: center; justify-content: space-between; }
.menu-close { background: var(--surface-solid); box-shadow: var(--neu); border-radius: 50%; }
.menu-links { display: grid; gap: 8px; }
.menu-links a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 14px 6px 8px; border-radius: 18px; color: var(--ink); text-decoration: none; font-weight: 600; background: rgb(255 255 255 / 55%); box-shadow: 0 1px 0 rgb(255 255 255 / 80%) inset, 0 6px 16px -12px rgb(17 19 24 / 40%); transition: transform .2s, background-color .2s, box-shadow .2s; }
.menu-links a > .icon { margin-left: auto; color: var(--muted); transition: transform .25s; }
.menu-links a:hover > .icon, .menu-links a:focus-visible > .icon { transform: translateX(3px); }
.menu-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--surface-solid); color: var(--accent-text); box-shadow: var(--neu); flex: none; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.menu-links a:hover .menu-ic { transform: rotate(-8deg) scale(1.06); }
.menu-links a[aria-current="page"] { background: var(--ink); color: var(--cream); box-shadow: 0 14px 28px -16px rgb(17 19 24 / 70%); }
.menu-links a[aria-current="page"] .menu-ic { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -8px rgb(255 107 26 / 80%); }
.menu-links a[aria-current="page"] > .icon { color: var(--cream); }
.menu-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.menu-foot form { margin: 0; }
.menu-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-solid); box-shadow: var(--neu); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.menu-chip .icon { color: var(--accent-text); }
html.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu.is-open .menu-links a, .mobile-menu.is-open .menu-foot, .mobile-menu.is-open .search { animation: menu-item-in .5s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(80ms + var(--i, 0) * 40ms); }
  .mobile-menu.is-open .search { --i: -1; }
  .mobile-menu.is-open .menu-foot { --i: 8; }
  @keyframes menu-item-in { from { opacity: 0; transform: translateX(-22px); } }
}
@media (prefers-reduced-motion: reduce) { .nav-glider, .menu-sheet, .menu-backdrop, .burger i { transition: none !important; } }
.no-js .mobile-menu[hidden] { display: block; position: static; }
.no-js .menu-backdrop, .no-js .menu-close { display: none; }
.no-js .menu-sheet { position: static; transform: none; width: auto; border-radius: 0; }
.no-js .menu-toggle { display: none; }
.menu-head .logo span { display: inline; font-size: 1.15rem; }
.menu-sheet:focus { outline: none; }

/* ---------- Account forms (login, sign up, reset) ---------- */
.auth-form { display: grid; gap: 4px; margin-top: 8px; }
.auth-form .field { margin-bottom: 12px; }
.auth-card .pw-wrap { position: relative; display: block; }
.auth-card .pw-wrap input { width: 100%; padding-right: 50px; }
.auth-card .pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 12px; cursor: pointer; }
.auth-card .pw-toggle[aria-pressed="true"] { color: var(--accent-text); }
.auth-card .pw-meter { height: 6px; margin: -6px 0 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.auth-card .pw-meter span { display: block; width: 0; height: 100%; border-radius: inherit; transition: width .3s ease, background-color .3s; }
.field-hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); min-height: 1em; }
.field-hint.is-ok { color: var(--success); font-weight: 600; }
.field-hint.is-bad { color: var(--danger); }
.auth-forgot { margin: -4px 0 12px; text-align: right; font-size: .9rem; }
.auth-switch { margin: 20px 0 0; text-align: center; font-size: .95rem; color: var(--muted); }
.auth-google { margin: 4px 0 0; }
.btn-google { gap: 12px; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-google:hover { background: var(--surface-solid); border-color: var(--ink); }
.btn-google[disabled] { opacity: .7; cursor: progress; }
.auth-google .alert { margin: 12px 0 0; }
.auth-google-note { margin: 10px 0 0; text-align: center; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .88rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-switch a { font-weight: 700; }
.auth-switch form { margin: 0; }

/* Niche categories */
.tag-link { text-decoration: none; background: var(--accent-soft); color: var(--accent-text); }
.tag-link:hover { background: var(--accent); color: var(--accent-ink); }
.category-tile .category-initial { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; background: var(--ink); color: var(--cream); font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; }

/* Shop: search box + empty categories */
.shop-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.shop-search-box { flex: 1 1 150px; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface-solid); box-shadow: var(--neu-in); color: var(--muted); border: 1px solid transparent; }
.shop-search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 107 26 / 20%); }
.shop-search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); min-height: 44px; }
.shop-search .link-btn { min-height: 44px; }
.chip.chip-empty:not([aria-current="true"]) { color: var(--muted); box-shadow: none; background: transparent; border: 1px dashed var(--line-strong); }

/* ---------- Search & filters page (/search) ---------- */
.search-hero { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; margin-bottom: 14px; }
.search-hero .shop-search-box { flex: 1 1 200px; min-height: 52px; }
.search-hero .btn { min-height: 52px; }
.popular-searches { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; min-width: 0; }
.popular-searches .filter-row-label { flex: none; }
.search-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .search-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 28px; } .filter-panel { position: sticky; top: calc(var(--header-h) + 16px); } }
.filter-panel { padding: 6px 16px 16px; }
.filter-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 700; color: var(--ink); }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.filter-toggle-hint { display: inline-flex; transform: rotate(90deg); transition: transform .2s; color: var(--muted); }
.filter-panel[open] .filter-toggle-hint { transform: rotate(-90deg); }
@media (min-width: 960px) { .filter-panel > summary { pointer-events: none; } .filter-toggle-hint { display: none; } }
.filter-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; }
.filter-clear { margin: 0 0 6px; font-size: .88rem; font-weight: 600; }
.filter-section { padding: 12px 0; border-top: 1px solid var(--line); }
.filter-heading { font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.filter-list, .filter-sublist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.filter-sublist { margin: 2px 0 4px 26px; }
.filter-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 550; }
.filter-link:hover { background: rgb(17 19 24 / 5%); color: var(--ink); }
.filter-link[aria-current="true"] { background: var(--ink); color: var(--cream); }
.filter-link[aria-current="true"] .filter-link-count { color: rgb(245 239 227 / 75%); }
.filter-link.is-empty:not([aria-current="true"]) { color: var(--muted); }
.filter-link-name { flex: 1; min-width: 0; }
.filter-link-count { font-size: .8rem; color: var(--muted); }
.filter-link .icon { flex: none; }
@media (min-width: 1080px) { .grid-search { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html:not([lang="en"]):not([lang="es"]):not([lang="fr"]) .filter-heading { letter-spacing: 0; text-transform: none; }

/* ---------- Live shelf (home): moving headline of the languages and categories on sale ---------- */
.live-shelf { padding: 20px 0 4px; }
.live-shelf-bar { display: flex; align-items: center; gap: 0; border-radius: 999px; padding: 6px; overflow: hidden; }
.live-label { flex: none; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0 16px; min-height: 44px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.live-word { text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.live-text { color: var(--cream); font-weight: 600; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: live-ping 1.6s ease-out infinite; }
@keyframes live-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }
.ticker { position: relative; flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-time, 30s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-list { display: flex; gap: 10px; margin: 0; padding: 0 5px; list-style: none; }
.shelf-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 999px; background: var(--surface-solid); color: var(--ink); text-decoration: none; white-space: nowrap; box-shadow: 3px 3px 8px rgb(120 100 70 / 12%), -3px -3px 8px rgb(255 255 255 / 85%); transition: transform .2s, box-shadow .2s; }
.shelf-chip:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.shelf-chip strong { font-weight: 650; font-size: .92rem; }
.shelf-count { font-size: .78rem; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line-strong); }
.shelf-initial { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.shelf-chip .flag { border-radius: 50%; width: 24px; height: 24px; }
.shelf-chip .flag-globe { display: inline-grid; place-items: center; width: 24px; height: 24px; box-shadow: none; color: var(--accent-text); }
@media (max-width: 639px) {
  .live-shelf-bar { border-radius: 22px; flex-direction: column; align-items: stretch; gap: 6px; }
  .live-label { justify-content: center; min-height: 36px; }
}
/* No motion wanted: a row you can swipe instead of a moving one. */
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ticker-copy { display: none; }
}

/* ---------- Trending "Shop now" card (home, after 5 seconds) ---------- */
.trend-pop { position: fixed; z-index: 135; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(360px, calc(100vw - 32px)); padding: 18px; border-radius: var(--radius-lg); background: rgb(255 253 248 / 94%); box-shadow: 0 30px 60px -20px rgb(17 19 24 / 40%), inset 0 1px 0 rgb(255 255 255 / 70%); opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.2); }
.trend-pop[hidden] { display: none; }
.trend-pop.is-open { opacity: 1; transform: none; }
.trend-pop h2 { margin: 0 40px 12px 0; font-size: 1.3rem; }
.trend-pop .eyebrow::before { display: none; }
.trend-close { position: absolute; top: 8px; right: 8px; }
.trend-list { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.trend-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 14px; color: var(--ink); text-decoration: none; background: var(--surface-solid); transition: transform .2s, box-shadow .2s; }
.trend-item:hover { color: var(--ink); transform: translateX(3px); box-shadow: var(--shadow); }
.trend-item .book-sm { width: 40px; }
.trend-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.trend-info strong { font-size: .92rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.trend-price { font-size: .85rem; color: var(--accent-text); font-weight: 700; }
.trend-price .from { color: var(--muted); font-weight: 500; }
.trend-item > .icon { flex: none; color: var(--muted); }
@media (max-width: 639px) {
  .trend-pop { left: 12px; right: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .trend-list li:nth-child(n+3) { display: none; }
}
