:root {
  color-scheme: light;
  /* Brand: deep navy + royal blue + gold */
  --navy: #0a1a3f;
  --navy-2: #0f2a66;
  --royal: #1d4fc4;
  --royal-2: #163fa0;
  --gold: #d4af5a;
  --gold-soft: #f3e7c6;

  --paper: #f3f6fb;
  --card: #ffffff;
  --ink: #0c1730;
  --ink-2: #47536d;
  --ink-3: #8390a8;
  --line: #e0e6f0;
  --accent: var(--royal);
  --accent-ink: #ffffff;
  --accent-soft: #e5ecfb;
  --warn: #b0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 26, 63, .06), 0 10px 30px rgba(10, 26, 63, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
#books { scroll-margin-top: 68px; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.lock { overflow: hidden; }
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 26, 63, .92);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px; min-width: 0;
  font-family: var(--display); font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em;
  color: #fff; text-decoration: none;
}
.brand-logo { height: 38px; width: auto; display: block; }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: .66rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
  background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.cart-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: var(--navy);
  font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center;
}

/* ---------- banner ---------- */
.banner {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(1200px 520px at 85% -10%, rgba(66, 133, 255, .55), transparent 60%),
    radial-gradient(700px 420px at 5% 120%, rgba(29, 79, 196, .45), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #1a3f9a 100%);
}
.banner::before { /* fine light lines */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(65deg, rgba(255,255,255,.03) 0 1px, transparent 1px 46px);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.banner::after { /* soft orb */
  content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; top: -160px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02);
}
.banner.has-photo { background: var(--navy); }
.banner.has-photo::before, .banner.has-photo::after { display: none; }
.banner-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.banner.has-photo .banner-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,26,63,.92) 0%, rgba(10,26,63,.65) 55%, rgba(10,26,63,.25) 100%); }
.banner-inner { padding: 96px 0 104px; display: grid; gap: 20px; }
.banner-inner > * { max-width: 760px; }
.banner-logo { height: 84px; width: auto; justify-self: start; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--ink-3); font-weight: 700; }
.banner .eyebrow { color: var(--gold); display: inline-flex; align-items: center; gap: 12px; }
.banner .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.banner h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; }
.banner h1 .accent { display: block; background: linear-gradient(90deg, #fff, #b9cdfb); -webkit-background-clip: text; background-clip: text; color: transparent; }
.banner-tag { font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255, 255, 255, .78); max-width: 560px; }
.banner-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover:not(:disabled) { background: #e2c071; }
.btn-glass { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.btn-glass:hover { background: rgba(255,255,255,.14); }
.banner-perks { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; color: rgba(255,255,255,.72); font-size: .88rem; }
.banner-perks span { display: inline-flex; align-items: center; gap: 8px; }
.banner-perks svg { color: var(--gold); }

/* ---------- category nav ---------- */
.cat-nav {
  position: sticky; top: 68px; z-index: 15;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.cat-main, .cat-sub { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cat-main::-webkit-scrollbar, .cat-sub::-webkit-scrollbar { display: none; }
.cat-main { padding: 10px 0; }
.cat-main a {
  flex: none; border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; font-weight: 650; font-size: .92rem; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.cat-main a:hover { background: var(--accent-soft); color: var(--royal-2); }
.cat-main a[aria-pressed="true"] { background: var(--navy); color: #fff; }
.cat-sub { padding: 0 0 12px; }
.cat-sub a {
  flex: none; cursor: pointer; white-space: nowrap; font-size: .84rem; font-weight: 550;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.cat-sub a:hover { border-color: var(--royal); color: var(--royal-2); }
.cat-sub a[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--royal); color: var(--royal-2); }
.cat-row { display: flex; align-items: center; gap: 16px; }
.cat-row .cat-main { flex: 1; min-width: 0; }
.search {
  flex: none; display: flex; align-items: center; gap: 8px; width: 240px;
  padding: 0 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-3);
}
.search:focus-within { border-color: var(--royal); color: var(--royal); background: #fff; }
.search input { border: 0; background: none; padding: 9px 0; font-size: .9rem; outline: none; }
.search input:focus { outline: none; border-color: transparent; }
@media (max-width: 720px) {
  .cat-row { flex-direction: column-reverse; align-items: stretch; gap: 0; }
  .search { width: auto; margin-top: 10px; }
}

/* ---------- collections (wide banner rows) ---------- */
.grid { grid-auto-flow: row dense; }
.collection-card {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 44px; align-items: center; padding: 28px 36px 28px 28px;
  background: #fff;
  border: 1px solid var(--line); border-radius: 22px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.collection-card:hover { box-shadow: 0 18px 44px rgba(10, 26, 63, .12); transform: translateY(-3px); }
.collection-media { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }
.cover.cover--wide { aspect-ratio: auto; height: auto; object-fit: contain; box-shadow: none; border-radius: 10px; }
.cover.cover--wide { background: #fff; }
.cover.cover--drawn.cover--wide { aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.collection-body { display: grid; gap: 14px; }
.collection-title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; }
.collection-summary { color: var(--ink-2); font-size: 1.08rem; line-height: 1.65; }
.collection-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.collection-price { display: inline-flex; align-items: baseline; gap: 8px; font-size: 1.15rem; color: var(--ink-2); }
.collection-price .sep { color: var(--ink-3); }
.collection-price strong { color: var(--ink); font-size: 1.35rem; }
.collection-actions .btn { padding: 13px 26px; font-size: .98rem; }
.btn.btn-outline { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn.btn-outline:hover { background: var(--navy); color: #fff; }
.collection-card.is-out img { filter: grayscale(.6) opacity(.7); }
@media (max-width: 820px) {
  .collection-card { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .collection-actions { gap: 12px; }
  .collection-actions .btn-primary { flex: 1; }
}
/* product page for a collection: wider image column */
.pp.pp--wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.pp--wide .pp-cover { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.pp--wide .pp-cover .cover.cover--wide { box-shadow: none; border-radius: 0; }
@media (max-width: 760px) { .pp.pp--wide { grid-template-columns: 1fr; } .pp--wide .pp-cover { width: 100%; padding: 16px; } }

.fmt-tag { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--royal); margin-bottom: 2px; }
.grid-empty { grid-column: 1 / -1; }
.cat-main a, .cat-sub a { text-decoration: none; display: inline-block; }

/* square look for CDs (set per page in admin → Pages) */
.grid--square .card-cover .cover { aspect-ratio: 1 / 1; }
.grid--square .cover--drawn { padding: 12%; }
/* product page: show pictures in their real shape (a CD stays square, a book stays tall) */
.pp-cover img.cover { aspect-ratio: auto; height: auto; object-fit: contain; }

/* a tab shown as sections, one per page */
.page-section { margin-bottom: 56px; }
.page-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.page-section__head h3 { font-size: 1.35rem; }
.page-section__head h3 a { color: var(--ink); text-decoration: none; }
.page-section__head h3 a:hover { color: var(--royal); }
.see-all { color: var(--royal); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.page-intro { color: var(--ink-2); max-width: 720px; margin-top: 8px; line-height: 1.65; }
.page-section .page-intro { margin: -6px 0 18px; }
#listing > .grid { padding-bottom: 96px; }
.page-section .grid { padding-bottom: 0; }

/* ---------- product page ---------- */
.product { padding: 28px 0 96px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-3); margin-bottom: 24px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--royal); text-decoration: underline; }
.pp { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 56px; align-items: start; }
.pp-cover .cover { border-radius: 14px; box-shadow: 0 24px 60px rgba(10, 26, 63, .18); }
.pp-info { display: grid; gap: 10px; }
.pp-info h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em; }
.pp-author { color: var(--ink-2); font-size: 1.05rem; }
.pp-details { color: var(--ink-3); font-size: .9rem; }
.pp-info > .block-label { margin: 14px 0 0; }
.fmt-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.fmt-btn {
  display: grid; gap: 2px; text-align: left; min-width: 130px; cursor: pointer;
  padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  transition: border-color .15s, background .15s;
}
.fmt-btn span { font-weight: 650; }
.fmt-btn small { color: var(--ink-3); font-size: .82rem; }
.fmt-btn:hover { border-color: var(--royal); }
.fmt-btn[aria-checked="true"] { border-color: var(--royal); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--royal); }
.fmt-btn[aria-checked="true"] small { color: var(--royal-2); }
.fmt-btn.out span { color: var(--ink-3); }
.pp-buybox {
  margin-top: 14px; padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  display: grid; gap: 12px; box-shadow: var(--shadow);
}
.pp-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pp-stock { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); }
.pp-stock .ok { color: #1f7a45; font-weight: 650; }
.pp-stock .no { color: var(--warn); font-weight: 650; }
.pp-actions { display: flex; gap: 12px; align-items: end; }
.qty-label { display: grid; gap: 4px; font-size: .78rem; }
.qty-select { width: 84px; padding: 12px 10px; }
.btn-lg { flex: 1; padding: 14px 22px; font-size: 1rem; }
.pp-seller { font-size: .8rem; color: var(--ink-3); }
.pp-desc { max-width: 760px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.pp-desc h2 { font-size: 1.4rem; margin-bottom: 4px; }
.pp-desc p { color: var(--ink-2); line-height: 1.75; white-space: pre-line; }
.pp-desc .desc-h { font-size: 1.12rem; margin-top: 12px; color: var(--ink); }
.pp-related { margin-top: 64px; }
.pp-related h2 { font-size: 1.4rem; margin-bottom: 20px; }
@media (max-width: 760px) {
  .pp { grid-template-columns: 1fr; gap: 28px; }
  .pp-cover { width: 62%; margin: 0 auto; }
}
.cat-count { color: var(--ink-3); font-size: .9rem; white-space: nowrap; }
#books { scroll-margin-top: 130px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 56px 0 28px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-head p { color: var(--ink-2); margin-top: 6px; }
@media (max-width: 520px) {
  .banner-inner { padding: 56px 0 64px; }
  .banner-logo { height: 64px; }
  .brand-text small { display: none; }
  .brand-logo { height: 32px; }
}

/* ---------- grid & cards ---------- */
.grid {
  display: grid; gap: 24px; padding-bottom: 96px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { padding: 10px 10px 12px; border-radius: 14px; }
  .card-buy { flex-direction: column; align-items: stretch; gap: 8px; }
  .card-buy .btn { width: 100%; }
  .card-buy .price { align-self: flex-start; }
}
.card {
  display: flex; flex-direction: column; background: var(--card); border-radius: 18px;
  padding: 14px 14px 16px; border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(10, 26, 63, .12); border-color: transparent; }
.card-cover {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px;
}
.card-cover .cover { border-radius: 10px; box-shadow: none; }
.card-body { padding-inline: 4px; }

.card-buy .btn { white-space: nowrap; }
.card-buy .price { white-space: nowrap; }
.card-buy .btn-ghost { border-color: var(--accent-soft); background: var(--accent-soft); color: var(--royal-2); }
.card-buy .btn-ghost:hover:not(:disabled) { background: var(--royal); border-color: var(--royal); color: #fff; }
.card.is-out .cover { filter: grayscale(.6) opacity(.7); }
.tag {
  position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px;
  background: var(--card); font-size: .72rem; font-weight: 600; color: var(--warn);
}
.card-body { padding-top: 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-title { font-size: 1.02rem; line-height: 1.3; font-weight: 650; }
.author { color: var(--ink-2); font-size: .9rem; }
.card-buy { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- covers ---------- */
.cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.cover--drawn {
  --cover: #2f4a3a;
  position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.18) 0 4%, rgba(255,255,255,.08) 4% 5%, transparent 5%),
    var(--cover);
  color: #fbf7ef; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18% 12%; gap: 10px;
}
.cover__rule { width: 36%; height: 1px; background: rgba(251, 247, 239, .55); }
.cover__title { font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.2; font-weight: 600; }
.cover__author { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.cover--sm { width: 56px; flex: none; border-radius: 4px; padding: 6px; }
.cover--sm .cover__title { font-size: .5rem; }
.cover--sm .cover__author, .cover--sm .cover__rule { display: none; }
.cover--lg .cover__title { font-size: 1.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .92rem; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--royal-2); }
.btn-primary { box-shadow: 0 6px 18px rgba(29, 79, 196, .25); }
.btn-ghost { background: transparent; border-color: var(--line); padding: 7px 14px; font-size: .85rem; }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-block { width: 100%; padding: 14px; font-size: 1rem; }
.link { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.muted { color: var(--ink-3); font-size: .82rem; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 1.3rem; line-height: 1; cursor: pointer;
}

/* ---------- dialog ---------- */
.book-dialog {
  width: min(820px, 100% - 32px); border: 0; padding: 0; border-radius: 18px;
  background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.book-dialog::backdrop { background: rgba(10, 26, 63, .55); backdrop-filter: blur(2px); }
.book-dialog .close { position: absolute; top: 14px; right: 14px; }
.dlg-body { display: grid; grid-template-columns: 260px 1fr; gap: 36px; padding: 36px; }
.dlg-info { display: flex; flex-direction: column; gap: 8px; }
.dlg-info h2 { font-size: 1.9rem; line-height: 1.15; padding-right: 32px; }
.format { color: var(--ink-3); font-size: .85rem; }
.desc { margin-top: 10px; color: var(--ink-2); line-height: 1.7; }
.dlg-buy { margin-top: auto; padding-top: 24px; display: flex; align-items: center; gap: 20px; }
.dlg-buy .price { font-size: 1.3rem; }
@media (max-width: 640px) {
  .dlg-body { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .dlg-cover { width: 55%; margin: 0 auto; }
}

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 26, 63, .45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(420px, 100%); background: var(--card);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
}
.drawer.open { transform: none; visibility: visible; transition-delay: 0s; box-shadow: -20px 0 60px rgba(0,0,0,.12); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.3rem; }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 24px; }
.line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-info { flex: 1; min-width: 0; }
.line-title { font-weight: 600; line-height: 1.3; }
.line-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; margin-top: 10px; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 30px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 1rem; }
.stepper span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.sum-row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.fine { font-size: .78rem; color: var(--ink-3); }
.fine.center { text-align: center; display: flex; justify-content: center; align-items: center; gap: 6px; }
.ship-meter__bar { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ship-meter__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.ship-meter p { font-size: .82rem; color: var(--ink-2); margin-top: 8px; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-2); display: grid; gap: 16px; justify-items: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px;
  font-size: .9rem; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.62); padding: 28px 0; font-size: .85rem; }
.site-footer .secure-line svg { color: var(--gold); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.secure-line { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- success page ---------- */
.notice { max-width: 560px; margin: 96px auto; text-align: center; display: grid; gap: 16px; justify-items: center; padding: 0 16px; }
.notice h1 { font-size: 2.2rem; }
.notice p { color: var(--ink-2); }
.check {
  width: 56px; height: 56px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}

/* =========================================================
   Admin
   ========================================================= */
.admin main { padding: 32px 0 80px; }
.login-card {
  max-width: 380px; margin: 80px auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px; display: grid; gap: 14px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 1.5rem; }
label { font-size: .85rem; font-weight: 600; color: var(--ink-2); display: grid; gap: 6px; }
input, select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.error { color: var(--warn); font-size: .88rem; min-height: 1.2em; }

.admin-top { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-top h1 { font-size: 1.9rem; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs .count { opacity: .7; font-weight: 500; margin-left: 4px; }

.orders { display: grid; gap: 16px; }
.order {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: grid; gap: 16px;
}
.order-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.order-id { font-size: 1.15rem; font-weight: 700; }
.order-date { color: var(--ink-3); font-size: .85rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill--todo { background: #fbecd7; color: #8a5413; }
.pill--done { background: var(--accent-soft); color: var(--accent); }
.pill--warn { background: #f6dfd9; color: var(--warn); }
.order-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.block-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.address { white-space: pre-line; line-height: 1.5; }
.contact { color: var(--ink-2); font-size: .9rem; margin-top: 6px; word-break: break-all; }
.items { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.items li { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.totals { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 2px; font-size: .9rem; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 700; }
.order-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.order-actions label { flex: 1 1 160px; }
.order-actions .small { flex: 0 1 140px; }
.notify { display: flex; align-items: center; gap: 8px; font-weight: 500; flex: 0 0 auto; padding-bottom: 10px; }
.notify input { width: auto; }
.order-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.order-links a { text-decoration: none; }
.shipped-info { color: var(--ink-2); font-size: .92rem; }
.shipped-info a { color: var(--accent); }
.loadmore { margin: 24px auto 0; display: flex; }
@media (max-width: 720px) { .order-grid { grid-template-columns: 1fr; } }

/* ---------- admin nav ---------- */
.admin .header-row { gap: 16px; }
.admin-nav { display: flex; gap: 4px; align-items: center; margin-right: auto; margin-left: 24px; }
.admin-nav button, .admin-nav a {
  border: 0; background: none; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: .92rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.admin-nav button, .admin-nav a { color: rgba(255,255,255,.72); }
.admin-nav button:hover, .admin-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-nav button[aria-current="page"] { color: var(--navy); background: #fff; }
.admin-nav a { font-weight: 500; color: rgba(255,255,255,.55); }
.site-header .btn-ghost { white-space: nowrap; color: #fff; border-color: rgba(255,255,255,.25); }
.site-header .btn-ghost:hover { border-color: #fff; }

/* ---------- books list ---------- */
.book-list { display: grid; gap: 10px; }
.book-row {
  display: grid; grid-template-columns: 48px 1fr auto auto auto; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px;
}
.thumb { width: 48px; aspect-ratio: 2 / 3; border-radius: 4px; object-fit: cover; box-shadow: var(--shadow); }
.thumb.cover--drawn { padding: 4px; }
.thumb .cover__title { font-size: .42rem; }
.book-row__info { min-width: 0; }
.book-row__info .line-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-row__price { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.book-row__actions { display: flex; gap: 6px; align-items: center; }
.pill-btn { border: 0; cursor: pointer; }
.icon-btn.sm { width: 32px; height: 32px; font-size: .95rem; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.hint { font-size: .78rem; color: var(--ink-3); font-weight: 400; }
@media (max-width: 720px) {
  .book-row { grid-template-columns: 48px 1fr auto; }
  .book-row .pill-btn { grid-column: 2; justify-self: start; }
  .book-row__actions { grid-column: 3; }
  .admin-nav { margin-left: 4px; }
  .admin-nav a { display: none; }
  .admin-nav button { padding: 8px 9px; }
  .admin .site-header .btn-ghost { padding: 7px 11px; font-size: .8rem; }
}

/* ---------- editor ---------- */
.editor { width: min(960px, 100% - 24px); max-height: calc(100vh - 32px); }
.editor form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ed-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.ed-head h2 { font-size: 1.4rem; }
.ed-body { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 24px 28px; overflow-y: auto; }
.ed-cover { display: grid; gap: 12px; align-content: start; justify-items: stretch; }
.file-btn { position: relative; justify-content: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-cover .link { justify-self: center; }
.color-row { display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: .82rem; }
.color-row input { width: 44px; height: 32px; padding: 2px; }
.ed-fields { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ed-fields label { grid-template-columns: auto 1fr; align-items: baseline; }
.ed-fields label > :not(.hint) { grid-column: 1 / -1; }
.ed-fields label .hint { margin-left: 8px; }
textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%; resize: vertical; min-height: 96px;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.price-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; background: var(--paper); }
.price-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.keep { display: grid; text-align: right; }
.keep .block-label { margin: 0; }
.keep strong { font-size: 1.35rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.money-input span { padding-left: 12px; color: var(--ink-3); }
.money-input input { border: 0; padding-left: 6px; }
.money-input:focus-within { outline: 2px solid var(--accent); }
.money-input input:focus { outline: 0; }
.money-input.sm { width: 110px; }
.suggest { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); padding-top: 12px; border-top: 1px dashed var(--line); }
.cat-pick { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
.cat-pick legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.cat-pick legend .hint { margin-left: 6px; }
#ed-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 18px; }
.cat-group { display: grid; gap: 4px; align-content: start; }
.cat-group .block-label { margin-bottom: 2px; }
.cat-group .check-row { font-size: .86rem; font-weight: 450; gap: 8px; }
.collection-toggle { align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.collection-toggle input { margin-top: 3px; }
.collection-toggle > span { display: grid; gap: 2px; font-weight: 400; }
.collection-toggle .hint { margin: 0; }
.fmt-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fmt-head .block-label { margin: 0; }
.fmt-rows { display: grid; gap: 8px; }
.fmt-row { display: grid; grid-template-columns: 44px minmax(130px, 1fr) 104px auto auto auto; gap: 10px; align-items: center; }
.fmt-row .fmt-label { padding: 9px 12px; }
.fmt-row .money-input input { padding: 9px 10px 9px 4px; }
.fmt-row .fmt-keep { white-space: nowrap; font-size: .74rem; }
.fmt-row .check-row { font-size: .85rem; white-space: nowrap; }
.add-fmt { justify-self: start; }
@media (max-width: 640px) {
  .fmt-row { grid-template-columns: 44px 1fr 100px auto; }
  .fmt-row .fmt-keep { grid-column: 2; grid-row: 2; }
  .fmt-row .check-row { grid-column: 3 / 5; grid-row: 2; }
}
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.check-row input { width: auto; }
.editor .error { padding: 0 28px; }
.ed-foot { display: flex; gap: 10px; align-items: center; padding: 16px 28px 22px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.danger { color: var(--warn) !important; }
@media (max-width: 640px) {
  .ed-body { grid-template-columns: 1fr; padding: 20px; }
  .ed-cover { grid-template-columns: 110px 1fr; align-items: start; }
  .ed-cover > #ed-preview { grid-row: span 3; }
  .ed-head, .ed-foot { padding-inline: 20px; }
}

/* a format's own picture */
.fmt-pic-wrap { position: relative; width: 44px; height: 44px; }
.fmt-pic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; overflow: hidden;
  border: 1.5px dashed var(--line); background: #fff; color: var(--ink-3); font-size: .62rem; font-weight: 600; position: relative;
}
.fmt-pic:hover, .fmt-pic:focus-within { border-color: var(--royal); color: var(--royal); }
.fmt-pic.has { border-style: solid; }
.fmt-pic img { width: 100%; height: 100%; object-fit: cover; }
.fmt-pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fmt-pic-x {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-size: .7rem; line-height: 1; display: grid; place-items: center;
}

/* ---------- admin: Pages tab ---------- */
.save-bar { display: flex; align-items: center; gap: 14px; }
.pages-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
.tree {
  position: sticky; top: 88px; display: grid; gap: 14px; padding: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  max-height: calc(100vh - 110px); overflow-y: auto; grid-template-columns: minmax(0, 1fr);
}
.tree-tab { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tree-tab__head { display: flex; gap: 4px; align-items: center; }
.tree-tab__name { flex: 1; min-width: 0; padding: 7px 10px; font-weight: 700; font-size: .92rem; }
.icon-btn.xs { width: 26px; height: 26px; font-size: .8rem; flex: none; }
.tree-pages { list-style: none; margin: 0; padding: 0 0 0 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.tree-pages li { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tree-page {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer;
  padding: 7px 10px; border: 0; border-radius: 8px; background: none; font-size: .88rem; color: var(--ink-2);
}
.tree-page:hover { background: var(--paper); color: var(--ink); }
.tree-page[aria-current="true"] { background: var(--accent-soft); color: var(--royal-2); font-weight: 650; }
.tree-page__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-page__count { font-size: .72rem; color: var(--ink-3); background: var(--paper); border-radius: 999px; padding: 1px 7px; }
.home-star { color: var(--gold); font-size: .85rem; }
.add-link { font-size: .84rem; color: var(--royal); font-weight: 600; padding: 4px 8px; justify-self: start; }
.add-tab { justify-self: start; }

.page-editor { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; display: grid; gap: 20px; min-width: 0; }
.pe-head { display: grid; gap: 4px; }
.pe-head .eyebrow { margin: 0; }
.pe-head h2 { font-size: 1.6rem; }
.pe-head .see-all { justify-self: start; margin-top: 4px; }
.pe-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px; background: var(--paper); border-radius: 12px; }
.pe-settings .pe-intro, .pe-settings .check-row { grid-column: 1 / -1; }
.pe-items-head { display: grid; gap: 4px; }
.pe-items-head h3 { font-size: 1.1rem; }
.pe-items { display: grid; gap: 8px; }
.pe-item {
  display: grid; grid-template-columns: 44px 1fr minmax(180px, 260px) auto; gap: 14px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
}
.pe-item .thumb { width: 44px; }
.pe-item--square .thumb { aspect-ratio: 1 / 1; }
.pe-showas { display: grid; gap: 2px; font-weight: 400; }
.pe-showas select { padding: 7px 10px; font-size: .86rem; }
.pe-add { display: flex; gap: 10px; }
.pe-add select { flex: 1; min-width: 0; }
.pe-foot { padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .pages-grid { grid-template-columns: 1fr; }
  .tree { position: static; max-height: none; }
  .pe-settings { grid-template-columns: 1fr; }
  .pe-item { grid-template-columns: 44px 1fr auto; }
  .pe-showas { grid-column: 2 / -1; grid-row: 2; }
}

@media print {
  .site-header, .admin-top, .order-actions, .loadmore, .site-footer { display: none !important; }
  body.printing .order:not(.print-me) { display: none; }
  .order { border: 0; padding: 0; }
}

/* uploaded pictures: white backgrounds blend into the page (works for pictures that
   have white baked in, like most product photos), and real see-through PNGs stay
   see-through. No box shadow, so nothing outlines the picture's rectangle. */
img.cover { box-shadow: none; background: transparent; filter: none; mix-blend-mode: multiply; }
.grid--square .card-cover img.cover { object-fit: contain; }
.pp-cover img.cover { box-shadow: none; filter: none; }
.thumb:is(img), .fmt-pic img { mix-blend-mode: multiply; }
.cover.cover--wide { background: transparent; }
.fmt-pic { background-image: linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%), linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.fmt-pic img { object-fit: contain; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- admin: import ---------- */
.import-dialog { width: min(640px, 100% - 24px); }
.imp-body { padding: 22px 28px; display: grid; gap: 14px; }
.imp-steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; font-size: .92rem; }
.imp-file { justify-self: start; }
.imp-result { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); display: grid; gap: 10px; }
.imp-result .block-label { margin: 0; }
.imp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.imp-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; text-align: center; }
.imp-stat strong { font-size: 1.4rem; color: var(--navy); }
.imp-stat span { font-size: .78rem; color: var(--ink-3); }
.imp-warn summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: #8a5413; }
.imp-warn ul { margin: 8px 0 0; padding-left: 18px; font-size: .84rem; color: var(--ink-2); display: grid; gap: 4px; max-height: 180px; overflow-y: auto; }
.import-dialog .ed-foot .hint { max-width: 260px; }
@media (max-width: 560px) { .imp-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- admin: Books search ---------- */
.book-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: -8px 0 16px; }
.admin-search { flex: 1 1 320px; width: auto; background: #fff; padding: 2px 16px; }
.admin-search input { padding: 11px 0; font-size: .95rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
  padding: 7px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600;
}
.chips button:hover { border-color: var(--royal); color: var(--royal-2); }
.chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.list-count { margin: 0 0 2px 4px; }
.thumb:is(img) { object-fit: contain; box-shadow: none; }

/* ---------- pictures fit any shape ----------
   Every card has the same soft "stage", so rows line up. A picture of any shape (tall
   book, square CD, wide set) sits whole and centred on it, never cropped. White photo
   backgrounds melt into the stage (mix-blend-mode on img.cover). */
.card-cover {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 4 / 5; padding: 7%; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #f8faff 0%, #eef2f9 100%);
}
.grid--square .card-cover { aspect-ratio: 1 / 1; }
.card-cover img.cover {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  aspect-ratio: auto; object-fit: contain; border-radius: 4px;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.card-cover .cover--drawn {
  width: auto; height: 100%; max-width: 100%; aspect-ratio: 2 / 3; border-radius: 6px;
  box-shadow: 0 10px 24px rgba(10, 26, 63, .18); transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.grid--square .card-cover .cover--drawn { aspect-ratio: 1 / 1; }
.card:hover .card-cover img.cover, .card:hover .card-cover .cover--drawn { transform: scale(1.04); }
.card .tag { z-index: 1; }

/* ---------- banner: subtle motion ---------- */
.banner-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.banner-glow span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform;
}
.banner-glow span:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -8%; top: -30%;
  background: radial-gradient(circle, rgba(88, 150, 255, .75), transparent 65%);
  animation: glow-a 18s ease-in-out infinite alternate;
}
.banner-glow span:nth-child(2) {
  width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; left: -10%; bottom: -40%;
  background: radial-gradient(circle, rgba(40, 96, 220, .7), transparent 65%);
  animation: glow-b 24s ease-in-out infinite alternate;
}
.banner-glow span:nth-child(3) {
  width: 22vw; height: 22vw; max-width: 300px; max-height: 300px; left: 45%; top: 10%;
  background: radial-gradient(circle, rgba(212, 175, 90, .35), transparent 65%);
  animation: glow-c 30s ease-in-out infinite alternate;
}
@keyframes glow-a { to { transform: translate(-12vw, 14vh) scale(1.15); } }
@keyframes glow-b { to { transform: translate(14vw, -16vh) scale(1.2); } }
@keyframes glow-c { 0% { transform: translate(0, 0); } 50% { transform: translate(-10vw, 8vh) scale(1.3); } 100% { transform: translate(8vw, -6vh) scale(.9); } }
.banner::before { animation: lines-drift 60s linear infinite; }
@keyframes lines-drift { to { background-position: 460px 0, -460px 0; } }
.banner::after { animation: orb-float 16s ease-in-out infinite alternate; }
@keyframes orb-float { to { transform: translate(-30px, 24px) rotate(8deg); } }
.banner.has-photo .banner-glow { display: none; }

/* text rises in when the page opens */
.banner-inner > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.banner-inner > :nth-child(1) { animation-delay: .05s; }
.banner-inner > :nth-child(2) { animation-delay: .12s; }
.banner-inner > :nth-child(3) { animation-delay: .2s; }
.banner-inner > :nth-child(4) { animation-delay: .3s; }
.banner-inner > :nth-child(5) { animation-delay: .4s; }
.banner-inner > :nth-child(6) { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* phones: headline sized so the name stays on one line */
@media (max-width: 520px) {
  .banner h1 { font-size: clamp(2rem, 9.4vw, 2.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .banner-glow span, .banner::before, .banner::after, .banner-inner > * { animation: none !important; }
}

/* ---------- symbol + ® in the top bar ---------- */
.brand-mark { position: relative; flex: none; display: block; padding-right: 9px; }
.brand-mark .brand-logo { height: 40px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.brand-mark .tm { position: absolute; top: -2px; right: 0; font-size: .55rem; font-weight: 600; line-height: 1; color: var(--gold); }
@media (max-width: 520px) { .brand-mark .brand-logo { height: 34px; } }

/* ---------- compact banner: books show without scrolling ---------- */
.banner-inner { padding: 34px 0 36px; gap: 12px; grid-template-columns: auto 1fr; align-items: center; }
.banner-inner > * { grid-column: 1 / -1; max-width: none; }
.banner h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; }
.banner h1 .accent { display: inline; }
.banner-tag { font-size: 1.02rem; max-width: 760px; text-wrap: pretty; }
.banner-cta { grid-column: 1; margin-top: 4px; }
.banner-perks { grid-column: 2; margin-top: 4px; padding-left: 12px; }
.section-head { padding: 24px 0 18px; }
.section-head .eyebrow { margin-bottom: 4px; }
@media (max-width: 860px) {
  .banner-cta, .banner-perks { grid-column: 1 / -1; padding-left: 0; }
}
@media (max-width: 520px) {
  .banner-inner { padding: 24px 0 26px; gap: 10px; }
  .banner h1 { font-size: clamp(1.7rem, 7.6vw, 2.1rem); }
  .banner-tag { font-size: .93rem; }
  .banner-perks { gap: 6px 16px; font-size: .8rem; margin-top: 0; }
  .banner-perks > span:nth-child(3) { display: none; }
  .banner-cta .btn { padding: 10px 16px; }
  .section-head { padding: 20px 0 14px; }
}
.tm-notice { flex-basis: 100%; order: 3; font-size: .74rem; color: rgba(255, 255, 255, .45); }
#mig-bar { width: 100%; height: 10px; accent-color: var(--navy); }
.book-tools .page-filter { width: auto; flex: 0 0 auto; min-width: 200px; }
.page-filter { font: inherit; font-size: .88rem; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); max-width: 100%; cursor: pointer; }
.page-filter:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }

/* ---------- visit page ---------- */
.footer-visit { color: rgba(255,255,255,.78); text-decoration: none; }
.footer-visit:hover { color: #fff; text-decoration: underline; }
a.cart-btn { text-decoration: none; }
.visit-hero {
  color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(66, 133, 255, .5), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #1a3f9a 100%);
}
.visit-hero .wrap { padding: 56px 0 96px; display: grid; gap: 14px; }
.visit-hero .eyebrow { color: var(--gold); display: inline-flex; align-items: center; gap: 12px; }
.visit-hero .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.visit-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.visit-lead { color: rgba(255,255,255,.8); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 620px; }
.visit-grid {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px;
  margin-top: -56px; position: relative; align-items: stretch;
}
.visit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 28px; display: grid; gap: 28px; align-content: start;
}
.visit-block { display: grid; gap: 12px; }
.visit .block-label { margin: 0; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--ink-3); }
.visit-address { font-style: normal; font-size: 1.2rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.visit-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.visit-actions .btn-ghost { padding: 10px 16px; font-size: .9rem; color: var(--ink); }
.hours-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.open-badge { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #f6e9e7; color: var(--warn); white-space: nowrap; }
.open-badge.is-open { background: #e5f4ea; color: #1f7a3f; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.hours th { color: var(--ink-2); }
.hours td { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours tr.today th, .hours tr.today td { color: var(--royal-2); font-weight: 700; }
.visit-map {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--accent-soft); min-height: 460px;
}
.visit-map iframe { display: block; width: 100%; height: 100%; min-height: 460px; border: 0; }
.visit-shop {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 40px auto 64px; padding: 26px 28px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.visit-shop h2 { font-size: 1.25rem; }
.visit-shop p { color: var(--ink-2); margin-top: 4px; }
@media (max-width: 820px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map, .visit-map iframe { min-height: 340px; }
  .visit-card { padding: 22px; }
}

/* header: Visit us + Cart */
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-width: 520px) {
  .header-actions { gap: 8px; }
  .header-visit span { display: none; }
  .header-visit { padding: 9px 11px; }
}
