/* ============================================================
   author.thinks — Mockup-faithful studio system
   Soft cream, charcoal CTAs, gold accents, 32px+ radius
   ============================================================ */

:root {
  --bg: #F7F4EF;
  --bg-deep: #EFEAE3;
  --card: #FFFFFF;
  --ink: #2A2724;
  --ink-soft: #6E6862;
  --ink-faint: #9A948C;
  --gold: #C4A574;
  --gold-deep: #B08D5E;
  --accent: #C78662;
  --accent-soft: #E9DED2;
  --charcoal: #2C2A27;
  --shadow: 0 18px 50px rgba(42, 39, 36, 0.06);
  --shadow-soft: 0 12px 40px rgba(42, 39, 36, 0.05);
  --radius: 32px;
  --radius-sm: 24px;
  --space: 20px;
  --shell-max: 1080px;
  --content-max: 720px;
  --topbar-h: 72px;
  --tabbar-h: 78px;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);

  /* Reader aliases */
  --ivory: var(--bg);
  --ivory-deep: var(--bg-deep);
  --paper: var(--card);
  --terracotta: var(--accent);
  --terracotta-deep: #B07552;
  --terracotta-tint: var(--accent-soft);
  --olive: #B9AD7C;
  --olive-deep: #9C9066;
  --olive-tint: #ECE7D2;
  --forest: #3D3A36;
  --forest-deep: var(--ink);
  --line: rgba(42, 39, 36, 0.08);
  --line-strong: rgba(42, 39, 36, 0.12);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --shadow-card: var(--shadow);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* Shared width shells — always full-bleed within max so margin auto centers */
.shell,
.section-head,
.books-list,
.about-points,
.chapter-stack,
.price-stack,
.page-hero,
.about-page-card,
.about-connect,
.book-quote {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: var(--space);
  box-sizing: border-box;
}
.shell {
  width: min(100%, var(--shell-max));
}
.section-head {
  width: min(100%, var(--shell-max));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-top: 0;
  padding-bottom: 0;
}
.page-hero {
  width: min(100%, 560px);
  text-align: center;
}
.about-page-card,
.about-connect,
.about-points,
.books-list,
.chapter-stack,
.price-stack,
.book-quote {
  width: min(100%, var(--content-max));
}

/* Ambient for reader */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}
.ambient span:nth-child(1) {
  width: 50vw; height: 50vw;
  top: -18vw; left: -12vw;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
.ambient span:nth-child(2) {
  width: 42vw; height: 42vw;
  top: 30vh; right: -16vw;
  background: radial-gradient(circle, #F0EBE4, transparent 70%);
}
.ambient span:nth-child(3) {
  width: 36vw; height: 36vw;
  bottom: -14vw; left: 25vw;
  background: radial-gradient(circle, #F5EDE4, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  min-height: var(--topbar-h);
  height: auto;
  padding: 12px var(--space);
  padding-top: max(12px, env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  background: rgba(247, 244, 239, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  transition: transform 0.5s var(--ease), background 0.35s var(--ease);
}
.topbar.hide { transform: translateY(-120%); }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  flex: none;
}
.icon-btn:active { transform: scale(0.96); }

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
  justify-self: center;
  max-width: 100%;
}
.brand-name {
  font-family: var(--display);
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink);
}
.brand-author {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 2vw, 10px);
  font-size: clamp(9px, 2.4vw, 10px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  max-width: 100%;
}
.brand-author i {
  display: block;
  width: 18px; height: 1px;
  background: var(--ink-faint);
  opacity: 0.55;
}

/* ---------- Side menu ---------- */
.menu-backdrop {
  position: fixed; inset: 0;
  z-index: 80;
  background: rgba(42, 39, 36, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-soft);
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 85;
  width: min(300px, 86vw);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: max(20px, env(safe-area-inset-top)) 24px 32px;
  transform: translateX(-105%);
  transition: transform 0.5s var(--ease);
}
.side-menu.open { transform: translateX(0); }
.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-menu-nav a,
.side-menu-nav button {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  padding: 10px 0;
  color: var(--ink);
  transition: color 0.3s;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}
.side-menu-nav a:hover,
.side-menu-nav button:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn-dark {
  background: var(--charcoal);
  color: #fff;
  box-shadow: 0 14px 32px rgba(44, 42, 39, 0.22);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(42, 39, 36, 0.12);
}
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 36px 0 8px;
}
.section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  flex: none;
}
.section-link:hover { color: var(--accent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.text-link:hover { color: var(--accent); }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--topbar-h) + 18px) var(--space) 40px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(0.92) brightness(1.05);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247, 244, 239, 0.55) 0%, rgba(247, 244, 239, 0.78) 42%, rgba(247, 244, 239, 0.96) 78%, var(--bg) 100%),
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(255, 255, 255, 0.35), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
}

.hero-eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 11vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-lead {
  margin: 18px auto 0;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
  margin-top: 28px;
}
.hero-actions .btn { width: 100%; }

.hero-books {
  position: relative;
  width: 220px;
  height: 170px;
  margin-top: 36px;
  perspective: 600px;
}
.stand-book {
  position: absolute;
  bottom: 0;
  width: 108px;
  border-radius: 6px 10px 4px 4px;
  overflow: hidden;
  box-shadow: 0 24px 40px rgba(42, 39, 36, 0.18);
  background: var(--card);
}
.stand-book img {
  width: 100%;
  aspect-ratio: 3 / 4.4;
  object-fit: cover;
}
.stand-book--1 {
  left: 18px;
  transform: rotate(-8deg);
  z-index: 2;
}
.stand-book--2 {
  right: 10px;
  transform: rotate(7deg);
  z-index: 1;
  width: 100px;
}

/* ---------- Carousels ---------- */
.carousel-wrap {
  position: relative;
  width: 100%;
}
.carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space);
  padding: 6px var(--space) 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  align-items: stretch;
  touch-action: pan-x;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding-bottom: 8px;
}
.carousel-dots button {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(42, 39, 36, 0.18);
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.carousel-dots button.is-active {
  background: var(--ink);
  transform: scale(1.15);
}

/* ---------- Product cards ---------- */
.product-card {
  flex: 0 0 min(318px, calc(100vw - (var(--space) * 2)));
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  height: 196px;
  max-width: 100%;
}

.product-cover {
  display: block;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(42, 39, 36, 0.14);
}
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.product-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: 2px 0 0;
}

.product-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.product-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.product-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.product-meta span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1;
}
.product-meta strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.bag-btn {
  position: relative;
  z-index: 2;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(44, 42, 39, 0.25);
  transition: transform 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bag-btn:active { transform: scale(0.94); }

/* ---------- About card ---------- */
.about-card {
  position: relative;
  width: min(100%, var(--content-max));
  margin: 8px auto;
  padding: 24px var(--space);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(72px, 96px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.about-leaf {
  position: absolute;
  right: -10px;
  bottom: -20px;
  width: 140px;
  height: auto;
  color: var(--gold);
  opacity: 0.18;
  pointer-events: none;
}

.about-portrait {
  position: relative;
  width: 96px; height: 96px;
}
.about-portrait img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(42, 39, 36, 0.12);
}
.gold-leaf {
  position: absolute;
  right: -2px;
  bottom: 4px;
  width: 28px;
  height: 28px;
  color: var(--gold);
  filter: drop-shadow(0 4px 8px rgba(176, 141, 94, 0.35));
}

.about-copy { position: relative; z-index: 1; min-width: 0; }
.about-copy .section-label { margin-bottom: 6px; color: var(--ink-faint); }
.about-copy h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
}
.about-copy > p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Thought cards ---------- */
.thought-card {
  flex: 0 0 min(240px, calc(100vw - (var(--space) * 2) - 40px));
  scroll-snap-align: start;
  margin: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 28px 22px 24px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.q-mark {
  font-family: var(--display);
  font-size: 42px;
  line-height: 0.7;
  color: var(--gold);
  margin-bottom: 16px;
}
.thought-card p {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
  flex: 1;
}
.thought-rule {
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 22px;
  background: var(--gold);
  border-radius: 2px;
  opacity: 0.7;
}

/* ---------- Review cards ---------- */
.review-card {
  flex: 0 0 min(260px, calc(100vw - (var(--space) * 2) - 40px));
  scroll-snap-align: start;
  margin: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 26px 22px 22px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}
.stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 14px;
}
.review-card blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  flex: 1;
}
.review-card figcaption {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), var(--gold));
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px var(--space) 28px;
  text-align: center;
  width: min(100%, var(--shell-max));
  margin-inline: auto;
  box-sizing: border-box;
}
.site-footer .brand-name {
  display: inline-block;
  font-size: 26px;
  margin-bottom: 22px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-bottom: 28px;
}
.footer-nav a,
.footer-nav button {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--body);
}
.footer-nav a:hover,
.footer-nav button:hover { color: var(--accent); }
.footer-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  height: 64px;
  width: min(520px, calc(100% - 28px));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(42, 39, 36, 0.1);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  padding: 6px 4px;
  box-sizing: border-box;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 2px;
  transition: color 0.3s;
  background: none;
  border: none;
  font-family: var(--body);
  cursor: pointer;
}
.tab svg { display: block; }
.tab.is-active { color: var(--ink); }
.tab-pill {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: -2px;
}
.tab[data-tab="thoughts"] .tab-pill {
  color: inherit;
}
.tab.is-active .tab-pill {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 8px 18px rgba(176, 141, 94, 0.35);
}

/* ---------- Sheet / toast ---------- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(42, 39, 36, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-soft);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(440px, 100%);
  z-index: 95;
  background: var(--card);
  border-radius: 32px 32px 0 0;
  box-shadow: var(--shadow);
  padding: 14px max(20px, var(--space)) calc(28px + env(safe-area-inset-bottom));
  transition: transform 0.5s var(--ease-soft);
  box-sizing: border-box;
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-handle {
  width: 40px; height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
  margin: 0 auto 18px;
}
.sheet h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
}
.sheet > p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.sheet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.sheet-row .label { font-size: 13.5px; color: var(--ink-soft); }
.sheet-row .value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}
.sheet-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sheet-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px);
  transform: translate(-50%, 16px);
  z-index: 200;
  padding: 14px 20px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- Book product page ---------- */
.book-page { padding-bottom: 40px; }
.book-main {
  padding-top: calc(var(--topbar-h) + 12px);
}
.book-hero {
  padding: 24px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  width: min(100%, 880px);
  margin-inline: auto;
  padding-inline: var(--space);
  box-sizing: border-box;
}
.book-hero-cover {
  width: min(220px, 58vw);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(42, 39, 36, 0.16);
}
.book-hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4.3;
  object-fit: cover;
}
.book-hero-copy h1 {
  margin: 8px 0 12px;
  font-family: var(--display);
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  text-wrap: balance;
}
.book-hero-lead {
  margin: 0 auto 24px;
  max-width: 400px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.book-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(280px, 100%);
  margin: 0 auto;
}
.book-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.book-chips span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  padding: 10px 14px;
  border-radius: 999px;
}
.book-quote {
  flex: none;
  min-height: 0;
  scroll-snap-align: none;
  margin-top: 0;
  margin-bottom: 0;
}
.chapter-stack,
.price-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 0;
  padding-bottom: 0;
}
.chapter-row,
.price-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 24px 22px;
}
.chapter-num {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.chapter-row h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}
.chapter-row p,
.price-card > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.price-card .amount {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 500;
  margin: 8px 0 10px;
}
.price-card .btn { margin-top: 18px; }

@media (min-width: 800px) {
  .book-hero {
    width: min(100%, 880px);
    margin-inline: auto;
    padding-inline: var(--space);
    flex-direction: row;
    text-align: left;
    gap: 56px;
    align-items: center;
    box-sizing: border-box;
  }
  .book-hero-lead { margin-left: 0; }
  .book-hero-actions {
    flex-direction: row;
    width: auto;
    margin: 0;
  }
  .book-chips { justify-content: flex-start; }
  .price-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}



/* ---------- Inner pages (books / about) ---------- */
.page-main {
  padding-top: calc(var(--topbar-h) + 8px);
  position: relative;
  z-index: 1;
}

.page-hero {
  padding-top: 28px;
  padding-bottom: 12px;
}
.page-hero h1 {
  margin: 8px 0 14px;
  font-family: var(--display);
  font-size: clamp(36px, 9vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.page-lead {
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 400px;
}

.books-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 8px;
}

.listing-card {
  display: grid;
  grid-template-columns: minmax(96px, 118px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-height: 200px;
  width: 100%;
}

.listing-cover {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(42, 39, 36, 0.14);
  height: 100%;
  min-height: 174px;
}
.listing-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.listing-cover.is-soon { opacity: 0.92; }

.listing-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 2px;
}
.listing-body h2 {
  margin: 4px 0 10px;
  font-family: var(--display);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 500;
  line-height: 1.18;
}
.listing-body > p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.listing-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.listing-meta span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.listing-meta strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
}

.listing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.about-page-card {
  margin-top: 20px;
  margin-bottom: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding-top: 32px;
  padding-bottom: 32px;
  text-align: center;
}
.about-page-portrait {
  position: relative;
  width: min(180px, 46vw);
  aspect-ratio: 1;
  margin: 0 auto 24px;
}
.about-page-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(42, 39, 36, 0.12);
}
.about-page-copy p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.about-page-copy p:last-child { margin-bottom: 0; }

.about-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 0;
  padding-bottom: 0;
}
.about-points .thought-card {
  flex: none;
  width: 100%;
  scroll-snap-align: none;
  min-height: 0;
}

.about-connect {
  margin-top: 0;
  margin-bottom: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding-top: 36px;
  padding-bottom: 36px;
  text-align: center;
}
.about-connect h2 {
  margin: 8px 0 28px;
  font-family: var(--display);
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 500;
}
.social-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}
.social-row a,
.social-row button {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  padding: 0;
}
.social-row a:hover,
.social-row button:hover { color: var(--accent); }

/* ---------- Contact popup form ---------- */
.contact-sheet {
  max-height: min(92vh, 720px);
  overflow-y: auto;
}
.contact-lead {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.field > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  border-radius: 18px;
  background: var(--bg);
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.3s var(--ease), background 0.3s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(199, 134, 98, 0.45);
}
.field textarea { min-height: 110px; line-height: 1.55; }

.kind-field {
  margin: 0;
  padding: 0;
  border: none;
  text-align: left;
}
.kind-field legend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
  padding: 0;
}
.kind-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kind-chip {
  cursor: pointer;
}
.kind-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.kind-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.kind-chip input:checked + span {
  background: var(--charcoal);
  color: #fff;
  box-shadow: 0 10px 22px rgba(44, 42, 39, 0.18);
}
.field-error {
  margin: 0;
  font-size: 13px;
  color: #A65D4A;
  text-align: center;
}

/* Glass helpers for reader */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-card);
}
.glass-strong {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--glass-edge);
}

/* ---------- Desktop polish ---------- */
@media (min-width: 768px) {
  :root { --space: 32px; }
  .hero-content { max-width: 560px; width: 100%; }
  .hero-actions {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }
  .hero-actions .btn { width: auto; }
  .about-card {
    width: min(100%, var(--content-max));
    margin-inline: auto;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 32px;
    padding: 40px;
  }
  .about-portrait { width: 140px; height: 140px; }
  .product-card {
    flex: 0 0 360px;
    height: 210px;
    grid-template-columns: 122px minmax(0, 1fr);
    padding: 20px;
    gap: 18px;
  }
  .carousel {
    justify-content: center;
    scroll-padding-inline: max(var(--space), calc((100% - min(100%, var(--shell-max))) / 2 + var(--space)));
  }
  .listing-card {
    grid-template-columns: 140px minmax(0, 1fr);
    min-height: 230px;
    padding: 22px;
    gap: 22px;
  }
  .about-page-card { padding-top: 48px; padding-bottom: 48px; }
  .about-page-portrait { width: 200px; }
  .books-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .books-list {
    grid-template-columns: 1fr 1fr;
    width: min(100%, var(--shell-max));
    align-items: stretch;
  }
  .listing-card {
    height: 100%;
    min-height: 250px;
  }
}

@media (max-width: 420px) {
  .listing-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .listing-cover {
    width: min(160px, 48vw);
    min-height: 0;
    aspect-ratio: 3 / 4.2;
    margin: 0 auto;
  }
  .listing-body { text-align: center; }
  .listing-meta,
  .listing-actions { justify-content: center; }
  .product-card {
    height: auto;
    min-height: 180px;
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .about-portrait { margin: 0 auto; }
  .brand-author i { width: 12px; }
  .section-head {
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
  .topbar {
    left: 50%;
    right: auto;
    width: min(calc(100% - 64px), var(--shell-max));
    transform: translateX(-50%);
    border-radius: 0 0 24px 24px;
  }
  .topbar.hide { transform: translate(-50%, -120%); }
  .site-footer { padding-bottom: 60px; }
}
