/* ============================================================
   The Kofi Chapters — site styles
   Built from design_handoff_kofi_chapters (hifi spec)
   ============================================================ */

:root {
  --paper: #edf3d5;
  --paper-alt: #e0e9c2;
  --ink: #1f4a2b;
  --green-deep: #2f5233;
  --cream: #f5f7e8;
  --cream-soft: rgba(237, 243, 213, 0.8);
  --ochre: #bf8a3c;
  --ochre-hover: #d29a4a;
  --ochre-cream: #d7b06a;
  --gold-soft: #d9cf97;
  --olive: #4b5a40;
  --olive-soft: #5a6a4c;
  --olive-dark: #38452f;
  --green-disabled: #b3c19a;
  --label-faint: #93a986;
  --border-soft: rgba(31, 74, 43, 0.12);
  --border-mid: rgba(31, 74, 43, 0.15);
  --border-strong: rgba(31, 74, 43, 0.18);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'EB Garamond', Georgia, serif;
  --font-ui: 'Space Grotesk', sans-serif;
  --font-jp: 'Noto Serif JP', serif;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}
::selection { background: var(--ochre); color: var(--cream); }
img { display: block; }

@keyframes kc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes kc-scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(8px); opacity: 1; }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--reveal-ease), transform 0.9s var(--reveal-ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- shared type helpers ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 8px;
}
.chapter-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ochre);
  margin-bottom: 14px;
}
.section-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.section-h2 em { color: var(--ochre); font-style: italic; }
.body-copy { font-size: 18px; line-height: 1.7; color: var(--olive-dark); margin: 0 0 20px; }
.folio {
  position: absolute;
  top: -60px;
  right: 0;
  text-align: right;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(31, 74, 43, 0.4);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-solid { background: var(--ink); color: var(--cream); }
.btn-solid:hover { background: var(--ochre); }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: var(--ochre); color: var(--cream); }
.btn-outline-light { background: transparent; color: var(--cream); border: 1px solid rgba(245, 247, 232, 0.5); }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(245, 247, 232, 0.12); }
.btn-outline-ink { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline-ink:hover { background: var(--ink); color: var(--cream); }
.btn-ochre { background: var(--ochre); color: var(--cream); }
.btn-ochre:hover { background: var(--ochre-hover); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(237, 243, 213, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.nav-wordmark { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: 0.01em; }
.nav-jp { font-family: var(--font-jp); font-size: 14px; color: var(--ochre); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: var(--olive);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ochre); }
.nav-order {
  text-decoration: none;
  color: var(--cream);
  background: var(--ink);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 2px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease;
}
.nav-order:hover { background: var(--ochre); }
.nav-wordmark, .nav-jp { white-space: nowrap; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/img/hero-storefront-wide.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(0.95) brightness(0.82);
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 34, 14, 0.5) 0%, rgba(20, 34, 14, 0.35) 45%, rgba(20, 34, 14, 0.78) 100%);
}
.hero-corner {
  position: absolute;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(245, 247, 232, 0.75);
  z-index: 2;
}
.hero-corner.tl { top: 90px; left: 40px; }
.hero-corner.tr { top: 90px; right: 40px; }
.hero-center { position: relative; z-index: 2; color: var(--cream); max-width: 900px; }
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ochre-cream);
  margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 10vw, 132px);
  line-height: 0.95;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero-jp {
  font-family: var(--font-jp);
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--gold-soft);
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}
.hero-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(17px, 2.2vw, 22px);
  color: rgba(245, 247, 232, 0.9);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 40px; left: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(245, 247, 232, 0.7);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-scroll-line { width: 1px; height: 30px; background: rgba(245, 247, 232, 0.4); display: inline-block; position: relative; }
.hero-scroll-dot {
  position: absolute;
  top: 0; left: -1px;
  width: 3px; height: 6px;
  background: var(--ochre-cream);
  border-radius: 2px;
  animation: kc-scroll-dot 1.8s ease-in-out infinite;
}
.hero-vol {
  position: absolute;
  bottom: 40px; right: 40px;
  z-index: 2;
  text-align: right;
  color: rgba(245, 247, 232, 0.7);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.hero-vol span { color: rgba(245, 247, 232, 0.5); }

/* ---------- marquee ---------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(245, 247, 232, 0.1);
  border-bottom: 1px solid rgba(245, 247, 232, 0.1);
}
.marquee-track { display: inline-flex; animation: kc-marquee 32s linear infinite; will-change: transform; }
.marquee-row { font-family: var(--font-display); font-size: 26px; font-style: italic; }
.marquee-row span { padding: 0 26px; }
.marquee-row .star { padding: 0; color: var(--ochre); font-style: normal; }

/* ---------- sections ---------- */
.chapter { position: relative; padding: 120px 40px; }
.chapter-inner { max-width: 1200px; margin: 0 auto; position: relative; }
.chapter.alt { background: var(--paper-alt); }

/* Prologue */
.prologue-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.prologue-sig { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--ink); }
.figure { position: relative; }
.figure img { width: 100%; height: 560px; object-fit: cover; border-radius: 2px; }

/* Interlude — The People */
.people-intro { max-width: 640px; margin-bottom: 56px; }
.people-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; }
.people-hero, .people-cell, .people-band { position: relative; border-radius: 2px; overflow: hidden; }
.people-hero img { width: 100%; height: 100%; min-height: 440px; object-fit: cover; display: block; }
.people-cell img { width: 100%; height: 100%; min-height: 440px; object-fit: cover; display: block; }
.people-band { margin-top: 20px; }
.people-band img { width: 100%; height: 380px; object-fit: cover; object-position: center 40%; display: block; }
.figure-chip {
  position: absolute;
  bottom: 18px; left: 18px;
  background: rgba(20, 34, 14, 0.72);
  color: var(--paper);
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.figure-chip.top { bottom: auto; top: 18px; background: var(--ochre); color: var(--cream); letter-spacing: 0.16em; backdrop-filter: none; }
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 40px;
  align-items: center;
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid var(--border-mid);
}
.stat-num { font-family: var(--font-display); font-size: 64px; font-weight: 500; line-height: 1; color: var(--ochre); }
.stat-num .plus { font-size: 34px; }
.stat-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  margin-top: 8px;
}
.pull-quote { position: relative; padding-left: 40px; border-left: 2px solid var(--ochre); }
.pull-quote .watermark {
  position: absolute;
  top: -18px; right: 0;
  font-family: var(--font-jp);
  font-size: 56px;
  color: rgba(191, 138, 60, 0.16);
}
.pull-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 12px;
}
.pull-quote cite {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
}

/* Menu */
.menu-intro { max-width: 620px; margin-bottom: 56px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.menu-row { display: flex; gap: 20px; padding: 24px 0; border-top: 1px solid var(--border-strong); }
.menu-grid .menu-row:nth-last-child(-n+2) { border-bottom: 1px solid var(--border-strong); }
.menu-roman {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ochre);
  min-width: 32px;
  padding-top: 4px;
}
.menu-item { flex: 1; }
.menu-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.menu-item-top h3 { font-family: var(--font-display); font-weight: 600; font-size: 25px; margin: 0; }
.menu-price { font-family: var(--font-ui); font-size: 15px; white-space: nowrap; }
.menu-desc { font-size: 16px; line-height: 1.55; color: var(--olive-soft); margin: 8px 0 0; }

.appendix {
  margin-top: 64px;
  background: var(--ink);
  color: var(--paper);
  padding: 48px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.appendix .watermark {
  position: absolute;
  top: 20px; right: 32px;
  font-family: var(--font-jp);
  font-size: 80px;
  color: rgba(237, 243, 213, 0.08);
}
.appendix-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ochre-cream);
  margin-bottom: 10px;
}
.appendix h3 { font-family: var(--font-display); font-weight: 500; font-size: 32px; margin: 0 0 28px; }
.appendix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; max-width: 720px; }
.appendix-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(237, 243, 213, 0.14);
  font-size: 17px;
}
.appendix-row .menu-price { font-size: 14px; color: var(--ochre-cream); }

.menu-cta {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 40px;
  border-top: 1px solid var(--border-mid);
}
.menu-cta-line { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--olive); }

/* Library */
.library-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.library-grid .figure img { height: 540px; }
.library-list { display: grid; gap: 24px; }
.library-item { display: flex; gap: 20px; align-items: baseline; border-top: 1px solid var(--border-mid); padding-top: 20px; }
.library-no { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; color: var(--ochre); }
.library-item h4 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0 0 4px; }
.library-item p { font-size: 16px; color: var(--olive-soft); margin: 0; }

/* On the shelf — spines only, like the real library. Tap one to pull it out. */
.shelf { position: relative; margin-top: 72px; }
.shelf-head { margin-bottom: 24px; }
.shelf-note { font-size: 16px; color: var(--olive-soft); margin: 6px 0 0; }
.shelf-browse-all {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ochre);
  text-decoration: none;
}
.shelf-browse-all:hover { color: var(--ink); }

/* seven cloth-bound colors, cycled by book id so a title always wears the
   same color wherever it shows up (spine here, generated "cover" in the
   open-book view) — see spineColorClass() in app.js */
.spine-c1 { background: #5b2f28; }
.spine-c2 { background: #23453a; }
.spine-c3 { background: #6d3838; }
.spine-c4 { background: #2c3b52; }
.spine-c5 { background: #4a3320; }
.spine-c6 { background: #3c2f4a; }
.spine-c7 { background: #1f4a2b; }

.shelf-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 3px;
  padding-bottom: 14px;
  min-height: 314px; /* holds the row's height while /api/library loads */
  /* fill the section's own content width (matches .chapter-inner, and the
     wood shelf-bar in .shelf::after) so it reads as a full shelf on a
     laptop/desktop, not a narrow stranded strip with dead space beside it.
     SHELF_COUNT in app.js renders enough spines to fill this and then some,
     so there's still something to scroll to. */
  max-width: 100%;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
/* the wood shelf board the whole row rests on — sits on .shelf (not the
   scrolling .shelf-row) so it always spans the full section width, even
   when the row itself scrolls sideways on mobile */
.shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--ochre-cream) 0%, var(--ochre) 55%, rgba(31, 74, 43, 0.4) 100%);
  box-shadow: 0 6px 10px rgba(31, 74, 43, 0.25);
}
.shelf-row figure {
  margin: 0;
  flex: 0 0 48px;
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 4px;
  border-radius: 2px 3px 3px 2px;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow:
    inset -4px 0 8px rgba(0, 0, 0, 0.22),
    inset 3px 0 5px rgba(255, 255, 255, 0.1),
    0 3px 6px rgba(31, 74, 43, 0.2);
  transform-origin: bottom center;
  transition: transform 0.22s var(--reveal-ease), box-shadow 0.22s ease;
}
/* the faint foil-stamped bands near the top and bottom of a real hardcover spine */
.shelf-row figure::before,
.shelf-row figure::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  height: 3px;
  background: rgba(245, 247, 232, 0.35);
  border-radius: 1px;
}
.shelf-row figure::before { top: 22px; }
.shelf-row figure::after { bottom: 22px; }
/* a little thickness variation so they don't read as a uniform grid — real
   spine widths, not book-cover widths */
.shelf-row figure:nth-child(7n+1) { flex-basis: 46px; }
.shelf-row figure:nth-child(7n+2) { flex-basis: 54px; }
.shelf-row figure:nth-child(7n+3) { flex-basis: 42px; }
.shelf-row figure:nth-child(7n+4) { flex-basis: 60px; }
.shelf-row figure:nth-child(7n+5) { flex-basis: 48px; }
.shelf-row figure:nth-child(7n+6) { flex-basis: 44px; }
.shelf-row figure:nth-child(7n) { flex-basis: 56px; }
/* books lean on the shelf at slightly different angles, like a real one */
.shelf-row figure:nth-child(6n+1) { transform: rotate(-1.2deg); }
.shelf-row figure:nth-child(6n+2) { transform: rotate(0.8deg); }
.shelf-row figure:nth-child(6n+3) { transform: rotate(-0.6deg); }
.shelf-row figure:nth-child(6n+4) { transform: rotate(1deg); }
.shelf-row figure:nth-child(6n+5) { transform: rotate(-0.9deg); }
.shelf-row figure:nth-child(6n) { transform: rotate(0.5deg); }
.shelf-row figure:hover,
.shelf-row figure:focus-visible {
  transform: translateY(-20px) rotate(0deg);
  box-shadow:
    inset -4px 0 8px rgba(0, 0, 0, 0.22),
    inset 3px 0 5px rgba(255, 255, 255, 0.1),
    0 16px 26px rgba(31, 74, 43, 0.32);
}
/* the selected spine holds its pulled-out state: taller and brighter,
   independent of hover, so it still reads as "chosen" once the pointer moves on */
.shelf-row figure.is-selected {
  transform: translateY(-20px) rotate(0deg);
  height: 322px;
  filter: brightness(1.16);
  box-shadow:
    inset -4px 0 8px rgba(0, 0, 0, 0.22),
    inset 3px 0 5px rgba(255, 255, 255, 0.1),
    0 18px 30px -10px rgba(31, 74, 43, 0.4);
}
.spine-title,
.spine-author {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  overflow: hidden;
  max-height: 100%;
  text-overflow: ellipsis;
  color: var(--cream);
}
.spine-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.spine-author {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

/* Shelf detail — tap a spine to pull it out; the story slides in right here,
   inline below the shelf, instead of a full-screen modal. */
.shelf-detail {
  margin-top: 26px;
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.32s var(--reveal-ease), opacity 0.28s ease;
}
.shelf-detail.is-open { max-height: 340px; opacity: 1; }
.shelf-detail-inner { display: flex; }
.shelf-detail-stripe { flex: 0 0 6px; background: var(--ink); }
.shelf-detail-content {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 28px 32px;
}
.shelf-detail-cover {
  flex: 0 0 84px;
  width: 84px;
  height: 116px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.shelf-detail-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shelf-detail-cover.has-photo span { display: none; }
.shelf-detail-cover span {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  color: var(--cream);
  padding: 0 8px;
}
.shelf-detail-text { flex: 1; min-width: 0; }
.shelf-detail-text h4 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
  margin: 6px 0 10px;
  line-height: 1.15;
}
.shelf-detail-blurb {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  max-height: 4.7em;
  overflow: hidden;
}
.shelf-detail-blurb:empty { display: none; }
.shelf-detail-meta {
  flex: 0 0 auto;
  text-align: right;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive-soft);
  line-height: 1.9;
  white-space: nowrap;
}
.shelf-detail-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 9px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .shelf-row figure { transform: none !important; }
  .shelf-detail { transition: none; }
}
@media (max-width: 700px) {
  .shelf-detail.is-open { max-height: 480px; }
  .shelf-detail-content { flex-direction: column; gap: 16px; padding: 22px 24px; }
  .shelf-detail-meta { text-align: left; }
}

.blind-date {
  margin-top: 96px;
  background: var(--green-deep);
  color: var(--cream);
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}
.blind-date-copy { padding: 64px 56px; }
.blind-date-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 14px;
}
.blind-date h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 20px;
}
.blind-date h3 em { color: var(--gold-soft); }
.blind-date p { font-size: 18px; line-height: 1.7; color: rgba(245, 247, 232, 0.85); margin: 0 0 32px; max-width: 480px; }
.blind-date-photos { display: grid; grid-template-columns: 1fr 1fr; }
.blind-date-photos img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Featured authors (Chapter III1/2) ----------
   Two columns on desktop, one on phones. The portrait falls back to a
   book-cloth swatch with the author's initials when no photo has been
   supplied yet, so a bio-only entry still looks deliberate. */
.authors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 28px; }
.author-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  background: var(--cream); border: 1px solid var(--border-soft); border-radius: 2px;
  padding: 24px; align-items: start;
}
.author-portrait {
  position: relative; border-radius: 2px; overflow: hidden;
  aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
}
/* bias the crop upward — a centred cover crop on a 3:4 box takes the top of
   the head off most standing portraits */
.author-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.author-initials {
  font-family: var(--font-display); font-size: 54px; color: var(--cream-soft);
  letter-spacing: 0.04em;
}
.author-body { min-width: 0; }
.author-name {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.15; margin: 6px 0 8px; color: var(--ink);
}
.author-meta {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--label-faint); margin: 0 0 14px;
}
.author-bio { font-size: 16px; line-height: 1.65; color: var(--olive-dark); margin: 0 0 16px; }
.author-bio.is-clamped {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden;
}
/* "Read more" — only shown by app.js when the clamp actually hides text */
.author-bio + .author-more { margin: -8px 0 16px; }
.author-more {
  display: inline-block; background: none; border: 0; padding: 0 0 2px; cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--olive); border-bottom: 1px solid var(--border-mid);
}
.author-more:hover { color: var(--ochre); border-bottom-color: var(--ochre); }
.author-more[hidden] { display: none; }
.author-books {
  font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0 0 12px;
  padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.author-books-label {
  display: block; font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ochre); margin-bottom: 6px;
}
.author-books em { font-style: italic; }
.author-dot { color: var(--label-faint); margin: 0 8px; }
.author-avail {
  display: inline-block; margin-left: 10px; font-family: var(--font-ui); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--olive);
  border: 1px solid var(--border-mid); border-radius: 999px; padding: 2px 9px; vertical-align: 2px;
}
.author-chapter {
  font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--olive);
  margin: 0 0 14px;
}
.author-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.author-links a {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ochre); padding-bottom: 2px;
}
.author-links a:hover { color: var(--ochre); }

/* Appreciation wall */
.wall-band { margin-top: 64px; }
.wall-band h3 {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.1; margin: 0 0 12px; color: var(--ink);
}
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wall-card {
  border: 1px solid var(--border); border-radius: 2px; padding: 18px 20px; background: #fff;
}
.wall-card .wc-handle { font-family: var(--font-display); font-size: 19px; color: var(--ink); display: block; }
.wall-card .wc-platform {
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ochre); display: block; margin: 4px 0 10px;
}
.wall-card .wc-note { font-size: 14px; color: var(--olive); line-height: 1.5; margin: 0; }
a.wall-card { display: block; text-decoration: none; color: inherit; }
a.wall-card:hover { border-color: var(--ochre); }
.wall-card.has-photo { padding: 0 0 18px; overflow: hidden; }
.wall-card.has-photo > :not(.wc-photo) { margin-left: 20px; margin-right: 20px; }
.wall-card .wc-photo { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: 14px; background: var(--border); }
.wall-grid:not(.is-expanded) .wall-card.is-extra { display: none; }
.wall-more {
  display: block; margin: 22px auto 0; padding: 11px 22px; background: transparent; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 2px; color: var(--ink);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.wall-more:hover { background: var(--ink); color: #fff; }
.wall-more[hidden] { display: none; }
.wall-card.has-photo .wc-note { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* ---------- Odds & ends (#margins) — the coloring-page poll ---------- */
.chapter.margins { border-top: 1px solid var(--border-soft); }
.odd-head { max-width: 640px; margin-bottom: 28px; }
.odd-no {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ochre); display: block; margin-bottom: 8px;
}
.odd-head h3 {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.1; margin: 0 0 12px; color: var(--ink);
}
.odd-head .body-copy { margin: 0 0 12px; }
.poll-status { font-family: var(--font-ui); font-size: 13px; color: var(--olive-dark); margin: 0; line-height: 1.5; }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.poll-card {
  margin: 0; background: #fff; border: 1px solid var(--border-mid); border-radius: 2px;
  display: flex; flex-direction: column; overflow: hidden;
}
.poll-card .pc-img {
  display: block; padding: 0; border: 0; background: var(--paper-alt); cursor: zoom-in;
  aspect-ratio: 3 / 4; overflow: hidden;
}
.poll-card .pc-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--reveal-ease); }
.poll-card .pc-img:hover img, .poll-card .pc-img:focus-visible img { transform: scale(1.03); }
.poll-card figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; min-height: 52px;
}
.poll-card .pc-no { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.poll-card .pc-count { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--olive); }
.poll-card .pc-vote {
  padding: 8px 16px; min-height: 36px; background: transparent; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 2px; color: var(--ink);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.poll-card .pc-vote:hover, .poll-card .pc-vote:focus-visible { background: var(--ink); color: #fff; }
.poll-card.is-mine { border-color: var(--ochre); }
.poll-card.is-mine .pc-count { color: var(--ochre); }
.poll-card.is-winner { border: 2px solid var(--ochre); position: relative; }
.poll-card.is-winner::before {
  content: 'Winner'; position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--ochre); color: var(--cream); padding: 5px 10px; border-radius: 2px;
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
}
.poll.is-closed .poll-card:not(.is-winner) { opacity: 0.85; }
.poll-fine { font-size: 14px; color: var(--olive); margin: 18px 0 0; max-width: 640px; line-height: 1.5; }
.poll-fine:empty { display: none; }

.poll-dialog {
  border: 0; border-radius: 3px; padding: 0; background: var(--cream); color: var(--ink);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
}
.poll-dialog::backdrop { background: rgba(20, 35, 22, 0.72); }
.pd-close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; margin: 0; z-index: 1; }
.pd-x {
  width: 44px; height: 44px; border: 0; background: var(--cream); color: var(--ink);
  font-size: 18px; cursor: pointer; border-radius: 0 0 0 3px;
}
#pollZoomImg { display: block; width: 100%; height: auto; margin-top: -44px; }
.pd-zoom-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.pd-zoom-foot span { font-family: var(--font-display); font-size: 22px; }
.pd-zoom-foot .btn[hidden] { display: none; }
.pd-vote-body { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 0 22px 24px; margin-top: -20px; }
#pollVoteImg { width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--border-mid); }
.pd-vote h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 0 0 8px; }
.pd-help { font-size: 14px; color: var(--olive); line-height: 1.5; margin: 0 0 16px; }
.pd-field { display: block; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--olive-dark); margin-bottom: 14px; }
.pd-field input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; letter-spacing: 0.04em; text-transform: none;
}
.pd-kc { display: flex; align-items: stretch; margin-top: 6px; }
.pd-kc span {
  display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-right: 0;
  background: var(--paper-alt); font-size: 16px; letter-spacing: 0.04em; color: var(--ink);
}
.pd-kc input { margin-top: 0; }
.pd-msg { font-size: 14px; line-height: 1.45; margin: 0 0 14px; min-height: 1em; color: var(--olive); }
.pd-msg:empty { display: none; }
.pd-msg.is-err { color: #9c3b26; }
.pd-msg.is-ok { color: var(--green-deep); font-weight: 600; }
@media (max-width: 600px) {
  .poll-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .poll-card figcaption { padding: 8px 10px; }
  .poll-card .pc-no { font-size: 17px; }
  .poll-card .pc-vote { padding: 7px 12px; }
  .pd-vote-body { grid-template-columns: 1fr; }
  #pollVoteImg { width: 96px; }
}

/* featured: two columns wide with a landscape photo (one column on phones, where the grid is one column anyway) */
@media (min-width: 600px) {
  .wall-card.is-featured { grid-column: span 2; }
  .wall-card.is-featured .wc-photo { aspect-ratio: 2 / 1; }
}
.wall-card.is-featured .wc-note { font-size: 16px; -webkit-line-clamp: 5; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.gallery-grid .span-2x2 { grid-column: span 2; grid-row: span 2; }
.gallery-grid .span-1x2 { grid-row: span 2; }
.gallery-grid .span-2 { grid-column: span 2; }
.gallery-grid .span-4 { grid-column: span 4; }

/* Visit */
.visit-intro { max-width: 700px; margin-bottom: 64px; }
.visit-city {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
}
.visit-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: stretch; }
.card-dark {
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.card-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre-cream);
  margin-bottom: 10px;
}
.card-dark h3, .card-hours h3 { font-family: var(--font-display); font-weight: 500; font-size: 30px; margin: 0 0 36px; }
.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.address-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre-cream);
  margin-bottom: 10px;
}
.address-grid p { font-size: 17px; line-height: 1.6; margin: 0; color: rgba(237, 243, 213, 0.9); }
.social-row { display: flex; gap: 20px; margin-bottom: 40px; }
.social-row a {
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid rgba(237, 243, 213, 0.3);
  padding-bottom: 2px;
  transition: color 0.25s ease;
}
.social-row a:hover { color: var(--ochre-cream); }
.card-hours {
  background: var(--paper-alt);
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.card-hours .watermark {
  position: absolute;
  top: 16px; right: 24px;
  font-family: var(--font-jp);
  font-size: 64px;
  color: rgba(191, 138, 60, 0.14);
}
.card-hours .card-label { color: var(--ochre); }
.card-hours h3 { margin-bottom: 32px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border-mid);
  font-size: 16px;
}
.hours-row:last-of-type { border-bottom: 1px solid var(--border-mid); }
.hours-row span:last-child { font-family: var(--font-ui); font-size: 14px; color: var(--olive-soft); }
.hours-note { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--olive); margin: 24px 0 0; }

.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.teaser-card { border: 1px solid var(--border-mid); border-radius: 2px; padding: 40px; }
.teaser-card.col { display: flex; flex-direction: column; justify-content: space-between; }
.teaser-no { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; color: var(--ochre); margin-bottom: 12px; }
.teaser-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0 0 10px; }
.teaser-card p { font-size: 16px; line-height: 1.6; color: var(--olive-soft); margin: 0 0 20px; }
.newsletter-row { display: flex; gap: 10px; max-width: 380px; }
.newsletter-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(31, 74, 43, 0.25);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 2px;
  outline: none;
  color: var(--ink);
}
.newsletter-row button {
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease;
}
.newsletter-row button:hover { background: var(--ochre); }
.teaser-cta {
  align-self: flex-start;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.teaser-cta:hover { background: var(--ink); color: var(--cream); }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 80px 40px 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(237, 243, 213, 0.14);
}
.footer-brand { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.footer-wordmark { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.footer-jp { font-family: var(--font-jp); font-size: 15px; color: var(--ochre-cream); }
.footer-blurb { font-size: 16px; line-height: 1.7; color: rgba(237, 243, 213, 0.7); max-width: 340px; margin: 0; }
.footer-head {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre-cream);
  margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(237, 243, 213, 0.8); text-decoration: none; font-size: 16px; transition: color 0.25s ease; }
.footer-links a:hover { color: var(--ochre-cream); }
/* not a link yet: TikTok "coming soon" */
.social-row .soon, .footer-links .soon { color: rgba(237, 243, 213, 0.5); font-size: 16px; font-style: italic; }
.footer-est { text-align: right; }
.footer-est-num { font-family: var(--font-display); font-size: 48px; font-weight: 500; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .small { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; color: rgba(237, 243, 213, 0.5); }
.footer-bottom .jp { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--ochre-cream); }

/* ============================================================
   Order Ahead overlay
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  display: none;
  flex-direction: column;
  font-family: var(--font-body);
}
.overlay.is-open { display: flex; }
.overlay-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
  border-bottom: 1px solid var(--border-mid);
  background: rgba(237, 243, 213, 0.92);
  backdrop-filter: blur(8px);
}
.overlay-brand { display: flex; align-items: baseline; gap: 12px; }
.overlay-wordmark { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.overlay-eyebrow {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ochre);
}
.overlay-close {
  border: 1px solid rgba(31, 74, 43, 0.3);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.overlay-close:hover { background: var(--ink); color: var(--cream); }

.order-browse { flex: 1 1 auto; display: flex; min-height: 0; }
.order-left { flex: 1 1 auto; overflow-y: auto; }
.order-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 16px 28px;
  background: var(--paper);
  border-bottom: 1px solid rgba(31, 74, 43, 0.1);
  overflow-x: auto;
}
.order-tab {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 15px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  color: var(--olive);
  border: 1px solid rgba(31, 74, 43, 0.25);
  transition: background 0.2s ease, color 0.2s ease;
}
.order-tab.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.order-items { padding: 28px 28px 48px; max-width: 760px; }
.order-cat-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 6px;
}
.order-cat-title { font-family: var(--font-display); font-weight: 500; font-size: 34px; margin: 0 0 22px; color: var(--ink); }
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--border-soft);
}
.order-item.has-photo { align-items: center; }
.order-item-photo {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid var(--border-soft);
}
.order-item.is-soldout .order-item-photo { filter: grayscale(1); opacity: 0.55; }
.order-item-name { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); }
.order-item-sub { font-family: var(--font-body); font-style: italic; font-size: 15px; color: var(--ochre); }
.order-item-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.order-add {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 9px 13px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.order-add:hover:not(:disabled) { background: var(--ink); color: var(--cream); }

/* 86'd — still listed (so regulars can see it exists) but plainly unavailable */
.order-item.is-soldout .order-item-name,
.order-item.is-soldout .order-item-sub { color: var(--label-faint); }
.order-item.is-soldout .order-item-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.order-add:disabled {
  border-color: var(--border-soft);
  color: var(--label-faint);
  cursor: not-allowed;
  text-decoration: line-through;
}
.soldout-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-soft);
  text-decoration: none;
  vertical-align: middle;
}

.order-cart {
  flex: 0 0 340px;
  border-left: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  background: var(--paper-alt);
  min-height: 0;
}
.order-cart-head {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: default;
}
.order-cart-lines { flex: 1 1 auto; overflow-y: auto; padding: 4px 24px; }
.cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(31, 74, 43, 0.1);
}
.cart-line-title { font-family: var(--font-display); font-size: 18px; color: var(--ink); line-height: 1.2; }
.cart-line-price { font-family: var(--font-ui); font-size: 12px; color: var(--olive-soft); }
.cart-stepper { display: flex; align-items: center; gap: 8px; }
.cart-stepper button {
  width: 26px; height: 26px;
  border: 1px solid rgba(31, 74, 43, 0.3);
  background: transparent;
  color: var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.cart-stepper .qty { font-family: var(--font-ui); font-size: 14px; color: var(--ink); min-width: 16px; text-align: center; }
.cart-empty {
  padding: 48px 8px;
  text-align: center;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--olive-soft);
  font-size: 16px;
  line-height: 1.6;
}
.order-cart-foot { flex: 0 0 auto; padding: 20px 24px; border-top: 1px solid var(--border-mid); }
.order-totals { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.order-count {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive-soft);
}
.order-total { font-family: var(--font-display); font-size: 28px; color: var(--ink); }
.order-place {
  width: 100%;
  border: none;
  background: var(--green-disabled);
  color: #eef3d8;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px;
  border-radius: 2px;
  cursor: not-allowed;
  transition: background 0.25s ease;
}
.order-place.is-ready { background: var(--ink); color: var(--cream); cursor: pointer; }
.order-place.is-ready:hover { background: var(--ochre); }
.order-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 12px;
  color: var(--olive-soft);
  text-align: center;
  margin-top: 10px;
}

/* confirmation */
/* top-aligned + auto margins, not align-items:center: centring clips the top of
   a card taller than the screen (QR cut off in Messenger's in-app browser) */
.order-confirm {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}
.order-confirm-card { max-width: 460px; width: 100%; text-align: center; margin: auto 0; }
.confirm-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 10px;
}
.order-confirm-card h2 { font-family: var(--font-display); font-weight: 500; font-size: 40px; margin: 0 0 8px; color: var(--ink); }
.confirm-copy { font-size: 16px; line-height: 1.6; color: var(--olive-soft); margin: 0 0 26px; }
.qr-card {
  background: #ffffff;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 18px;
  display: inline-block;
  margin-bottom: 12px;
}
.confirm-orderno { font-family: var(--font-ui); font-size: 14px; letter-spacing: 0.18em; color: var(--ink); margin-bottom: 26px; }
.confirm-summary { text-align: left; border-top: 1px solid var(--border-mid); padding-top: 14px; margin-bottom: 24px; }
.confirm-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; color: var(--olive-dark); }
.confirm-line span:last-child { font-family: var(--font-ui); font-size: 13px; white-space: nowrap; }
.confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 0;
  margin-top: 6px;
  border-top: 1px solid var(--border-mid);
}
.confirm-total span:first-child {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive-soft);
}
.confirm-total span:last-child { font-family: var(--font-display); font-size: 26px; color: var(--ink); }
.confirm-btns { display: flex; gap: 12px; justify-content: center; }
.confirm-btns .btn { padding: 13px 22px; font-size: 12px; letter-spacing: 0.1em; }
.confirm-note {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label-faint);
  margin-top: 22px;
}

/* ---------- fulfilment picker ---------- */
.fulfil-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-soft);
  margin-bottom: 8px;
}
.fulfil-row { display: flex; gap: 6px; margin-bottom: 16px; }
.fulfil-opt {
  flex: 1 1 0;
  min-width: 0;                       /* stops the longest label widening the cart */
  min-height: 44px;                   /* comfortable tap target on every device */
  padding: 10px 4px;
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-soft);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fulfil-opt:hover { border-color: var(--ink); color: var(--ink); }
.fulfil-opt.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.discount-request {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--olive-soft);
  cursor: pointer;
}
.discount-request input { margin-top: 3px; flex: 0 0 auto; }

/* ---------- GCash ---------- */
.gcash-wait {
  text-align: left;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--ochre);
  border-radius: 2px;
  background: var(--cream);
}
.gcash-wait .gcash-head { margin-bottom: 10px; }
.gcash-wait .btn { margin-top: 14px; }
.gcash {
  text-align: left;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
}
.gcash-head {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 14px;
}
.gcash-body { display: flex; gap: 16px; align-items: flex-start; }
.gcash-qr {
  flex: 0 0 180px;
  width: 180px;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  background: #fff;
}
.gcash-qr canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.gcash-qr:empty { display: none; }
.pay-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pay-opt {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.pay-opt.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pay-save {
  font-family: var(--font-ui);
  font-size: 12px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
}
.gcash-meta { min-width: 0; }
.gcash-amount { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--ink); }
.gcash-acct {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-top: 6px;
}
.gcash-copy { font-family: var(--font-body); font-size: 13px; line-height: 1.5; color: var(--olive-soft); margin: 8px 0 0; }
.gcash-ref { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.gcash-ref label {
  display: block;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-soft);
  margin-bottom: 8px;
}
.gcash-ref-row { display: flex; gap: 8px; }
.gcash-ref-row input {
  flex: 1 1 auto;
  min-width: 0;                       /* same shrink trap as the newsletter field */
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
}
.gcash-ref-row input:focus { outline: none; border-color: var(--ochre); }
.gcash-ref-row button {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: var(--ink);
  border: none;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  cursor: pointer;
}
.gcash-ref-row button:hover:not(:disabled) { background: var(--ochre); }
.gcash-ref-row button:disabled { background: var(--green-disabled); cursor: default; }
.gcash-msg { font-family: var(--font-body); font-size: 13px; line-height: 1.5; margin-top: 10px; }
.gcash-msg.is-good { color: var(--ink); }
.gcash-msg.is-bad { color: #a3452f; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .nav { padding: 14px 20px; gap: 12px; }
  .nav-order { order: 2; }

  /* hamburger + slide-down drawer (the design comp is desktop-only here) */
  .nav-toggle {
    order: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    flex: 0 0 44px;              /* must not be squeezed by the wordmark on small phones */
    width: 44px; height: 44px;   /* minimum comfortable tap target */
    padding: 0 11px;
    background: none;
    border: 1px solid var(--border-mid);
    border-radius: 2px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1px; background: var(--ink); transition: transform 0.25s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 12px 24px rgba(20, 34, 14, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a {
    width: 100%;
    padding: 15px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-links a:last-child { border-bottom: none; }
  .chapter { padding: 88px 20px; }
  .prologue-grid, .library-grid, .visit-grid, .teaser-grid, .people-grid { grid-template-columns: 1fr; gap: 40px; }
  .authors-grid { grid-template-columns: 1fr; }
  .menu-grid, .appendix-grid { grid-template-columns: 1fr; }
  .menu-grid .menu-row:nth-last-child(-n+2) { border-bottom: none; }
  .menu-grid .menu-row:last-child { border-bottom: 1px solid var(--border-strong); }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .pull-quote { grid-column: span 2; }
  .blind-date { grid-template-columns: 1fr; }
  .blind-date-photos { grid-auto-rows: 220px; }
  .shelf-row figure { height: 260px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-grid .span-2x2 { grid-column: span 2; }
  .gallery-grid .span-4 { grid-column: span 2; }
  .figure img, .library-grid .figure img { height: 420px; }
  .hero-corner.tl, .hero-corner.tr { top: 76px; }
  .hero-corner.tl { left: 20px; }
  .hero-corner.tr { right: 20px; }
  .hero-scroll { left: 20px; }
  .hero-vol { right: 20px; }
  .footer { padding: 64px 20px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .order-browse { flex-direction: column; }
  .order-cart { flex: 0 0 auto; border-left: none; border-top: 1px solid var(--border-mid); max-height: 45vh; }
  .appendix { padding: 32px 24px; }
  .card-dark, .card-hours { padding: 32px 24px; }
  .blind-date-copy { padding: 40px 28px; }
  .people-band img { height: 260px; }
}

@media (max-width: 600px) {
  /* author card stacks: portrait on top, capped so it doesn't eat the screen */
  .author-card { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .author-portrait { max-width: 190px; }
  .author-links { gap: 10px 14px; }

  /* full-width and a firmer snap for a swipe gesture, vs. the gentler
     desktop scroll */
  .shelf-row {
    max-width: none;
    scroll-snap-type: x mandatory;
    margin: 0 -16px;          /* bleed to the section's own 16px gutter */
    padding: 0 16px 4px;
  }
  .shelf-row figure { height: 260px; }
  .nav { padding: 12px 16px; }
  .nav-wordmark { font-size: 17px; }
  .nav-jp { display: none; }
  .nav-order { font-size: 10px; padding: 9px 13px; }
  .chapter { padding: 64px 16px; }
  .footer { padding: 48px 16px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-corner.tl { left: 16px; }
  .hero-corner.tr { right: 16px; }
  .hero-scroll { left: 16px; }
  .hero-vol { right: 16px; }
  .stats-row { grid-template-columns: 1fr; }
  .stats-row .pull-quote { grid-column: auto; }
  .gallery-grid { grid-auto-rows: 140px; }
  .figure img, .library-grid .figure img { height: 320px; }
  .people-hero img, .people-cell img { min-height: 300px; }
  .people-band img { height: 145px; }  /* keeps all eight in frame at phone width */
  .appendix, .card-dark, .card-hours { padding: 26px 20px; }
  .blind-date-copy { padding: 32px 20px; }

  /* the email input would not shrink, forcing the page wider than the screen */
  .teaser-card { padding: 26px 20px; min-width: 0; }
  .newsletter-row { flex-wrap: wrap; }
  .newsletter-row input { min-width: 0; flex: 1 1 100%; }
  .newsletter-row button { flex: 1 1 auto; }

  /* Order Ahead: eyebrow collided with Close, and the cart ate the screen */
  .overlay-head { padding: 12px 16px; }
  .overlay-eyebrow { display: none; }
  .order-items { padding: 20px 16px 32px; }
  .order-tabs { padding: 12px 16px; }
  /* the cart collapses to a bar so the menu keeps the screen; tap the head to expand */
  .order-cart { max-height: none; }
  .order-cart-head { cursor: pointer; position: relative; padding: 15px 16px; }
  .order-cart-head::after {
    content: '⌃';
    position: absolute; right: 16px; top: 50%;
    transform: translateY(-40%) rotate(180deg);
    transition: transform 0.25s ease;
  }
  .order-cart-head[aria-expanded="true"]::after { transform: translateY(-10%) rotate(0deg); }
  .order-cart-lines {
    flex: 0 0 auto;
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .order-cart.is-expanded .order-cart-lines { max-height: 34vh; overflow-y: auto; }
  .order-cart-foot { padding: 12px 16px; }
  .order-hint { display: none; }                      /* only worth the space once expanded */
  .order-cart.is-expanded .order-hint { display: block; }

  /* stays visible even when the cart is collapsed — a home order that silently
     defaults to "dine in" is a wasted drink, so this is worth the vertical space */
  .fulfil-label { display: none; }                    /* the buttons speak for themselves */
  .fulfil-row { margin-bottom: 10px; }

  .gcash { padding: 16px; }
  .gcash-body { flex-direction: column; align-items: center; text-align: center; }
  .gcash-meta { text-align: center; }
  .gcash-ref-row { flex-wrap: wrap; }
  .gcash-ref-row input { flex: 1 1 100%; }
  .gcash-ref-row button { flex: 1 1 auto; padding: 14px 18px; }
  .order-cat-title { font-size: 30px; margin-bottom: 8px; }
}

/* Short phones (iPhone SE and friends): the persistent cart plus the fulfilment
   row leaves almost no menu on screen. The chapter title is the cheapest thing
   to lose — the tab bar and the eyebrow above already say which chapter you're in. */
@media (max-width: 600px) and (max-height: 640px) {
  .order-cat-title { display: none; }
  .order-cart-foot { padding: 10px 16px; }
  .fulfil-row { margin-bottom: 8px; }
  .order-totals { margin-bottom: 10px; }
}

/* ---------- The full catalogue (/catalogue) — all 476 titles, searchable ---------- */
.catalogue-back {
  text-decoration: none;
  color: var(--olive);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}
.catalogue-back:hover { color: var(--ink); }
.catalogue { max-width: 760px; margin: 0 auto; padding: 140px 24px 100px; }
.catalogue-head { margin-bottom: 32px; }
.catalogue-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 44px;
  margin: 6px 0 8px;
  color: var(--ink);
}
.catalogue-count { color: var(--olive-soft); margin: 0 0 20px; }
.catalogue-search {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--border-mid);
  border-radius: 2px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
}
.catalogue-search:focus { outline: none; border-color: var(--ochre); }
.catalogue-list { display: flex; flex-direction: column; }
.catalogue-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.catalogue-thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 54px;
  border-radius: 2px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalogue-thumb span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--cream);
}
.catalogue-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.catalogue-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.catalogue-author {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--olive);
}
.catalogue-empty { color: var(--olive-soft); font-style: italic; padding: 24px 0; }
@media (max-width: 600px) {
  .catalogue { padding: 110px 20px 64px; }
  .catalogue-head h1 { font-size: 34px; }
}
