/* ============================================================
   Q Bar — Cocktail Menu
   Book with real page-flip animation + left sidebar for search,
   filter, and quick navigation.
   ============================================================ */

:root {
  --bg: #130c07;
  --bg-soft: #1d140c;
  --bg-panel: #15100a;
  --bg-panel-hi: #1e160d;
  --bg-deep: #0d0804;
  --ink: #ede3cb;
  --ink-dim: #a59a7e;
  --ink-quiet: #6f6450;
  --accent: #b7b066;
  --accent-warm: #c9b97a;
  --accent-dim: rgba(183, 176, 102, 0.35);
  --line: rgba(183, 176, 102, 0.18);

  --serif: "DM Serif Display", "Playfair Display", Georgia, serif;
  --serif-2: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --sidebar-w: 320px;
  --rail-w: 32px;
  --ease: cubic-bezier(.4, .0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  background: radial-gradient(ellipse at 50% 10%, #22170d 0%, #130c07 55%, #0b0604 100%);
  height: 100vh;
  width: 100vw;
  position: relative;
}

.bg-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  z-index: 0;
  background-image:
    repeating-radial-gradient(circle at 10% 10%, rgba(255, 235, 180, 0.4) 0 1px, transparent 1px 3px),
    repeating-radial-gradient(circle at 80% 40%, rgba(255, 235, 180, 0.3) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 30% 80%, rgba(255, 235, 180, 0.35) 0 1px, transparent 1px 2px);
}

/* ============ Sidebar ============ */
/* Collapsed by default — the sidebar is a drawer that slides in over the
   book. A thin always-visible rail on the left edge reveals there's a
   menu to open. */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1a120a 0%, #130c07 100%);
  border-right: 1px solid var(--line);
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(-100%);
  transition: transform 340ms var(--ease);
}
.sidebar.is-open { transform: translateX(0); }

/* Thin rail on the very left edge — always visible. Click to open. */
.sidebar-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  background: linear-gradient(180deg, #1a120a 0%, #130c07 100%);
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--accent);
  cursor: pointer;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
  font-family: var(--sans);
  transition: background 200ms ease, border-color 200ms ease;
}
.sidebar-rail:hover {
  background: linear-gradient(180deg, #22180e 0%, #18100a 100%);
  border-right-color: var(--accent);
}
.rail-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.rail-chev {
  color: var(--accent);
  opacity: 0.55;
}

/* Scrim over the book when the drawer is open — click to close. */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 2, 0.45);
  backdrop-filter: blur(2px);
  z-index: 15;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
  cursor: pointer;
}
.sidebar-scrim.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 0s linear 0s;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.sidebar-monogram {
  font-family: "Boldonse", var(--serif);
  font-size: 56px;
  line-height: 0.9;
  color: var(--accent);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  user-select: none;
  flex-shrink: 0;
  transform: translateY(-5px);
}
.sidebar-mark {
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin-bottom: 10px;
}
.sidebar-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 0.95;
  color: var(--ink);
  margin: 0;
  text-transform: uppercase;
}

/* Filters */
.filters {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-panel-hi);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  transition: border-color 200ms ease;
}
.search:focus-within { border-color: var(--accent); color: var(--accent); }
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  padding: 4px 0;
  outline: none;
}
.search input::placeholder { color: var(--ink-quiet); }

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.seg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  background: var(--bg-panel-hi);
}
.seg-btn {
  background: transparent;
  border: 0;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 4px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active {
  background: rgba(183, 176, 102, 0.14);
  color: var(--accent);
}

.stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.star {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 2px;
  color: rgba(183, 176, 102, 0.22);
  transition: color 150ms ease, transform 150ms ease;
}
.star svg { width: 18px; height: 18px; display: block; }
.star:hover { color: var(--accent); transform: translateY(-1px); }
.star.is-on { color: var(--accent); }
.star.is-peek { color: rgba(183, 176, 102, 0.55); }

.reset {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 150ms ease, border-color 150ms ease;
}
.reset:hover { color: var(--accent); border-color: var(--accent); }

.filter-summary {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-quiet);
  letter-spacing: 0.08em;
}

/* Recipe list */
.recipe-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 176, 102, 0.25) transparent;
}
.recipe-list::-webkit-scrollbar { width: 8px; }
.recipe-list::-webkit-scrollbar-track { background: transparent; }
.recipe-list::-webkit-scrollbar-thumb {
  background: rgba(183, 176, 102, 0.2);
  border-radius: 4px;
}
.recipe-list::-webkit-scrollbar-thumb:hover { background: rgba(183, 176, 102, 0.4); }

.recipe-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--ink-dim);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  position: relative;
}
.recipe-item:hover {
  background: rgba(183, 176, 102, 0.05);
  color: var(--ink);
  border-left-color: var(--accent-dim);
}
.recipe-item.is-active {
  background: rgba(183, 176, 102, 0.1);
  color: var(--accent);
  border-left-color: var(--accent);
}

.recipe-num {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 19px;
  color: var(--accent);
  opacity: 0.75;
}
.recipe-title-text {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.recipe-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}
.recipe-score {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}
.recipe-score svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
}
.recipe-own {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 2px 5px;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: 1px;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--serif-2);
  font-style: italic;
  color: var(--ink-quiet);
  font-size: 13px;
}

/* ============ Book stage ============ */
.book-stage {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  padding: 24px;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6))
          drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
  overflow: hidden;
}
/* Cap width only — height / aspect-ratio on .book fights StPageFlip's
   internal geometry and brings back the "pages pushed to stage edges" bug.
   Cap takes the smallest of: parent cell, hard ceiling, or a viewport-
   height-derived value so the book also shrinks when the window is short.
   The 4/3 multiplier matches the spread aspect (two 540×810 pages). */
.book {
  width: min(100%, 1242px, calc((100vh - 120px) * 4 / 3));
  margin: auto;
}

/* ============ Pages ============ */
.page {
  background: #1a110a;
  color: var(--ink);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(183, 176, 102, 0.08);
}
.page-recipe { background: #0d0804; position: relative; }
.page-recipe img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* Score stars at the top of each recipe page — offset right of center
   so they don't crowd the left edge. */
.page-score {
  position: absolute;
  top: 18px;
  left: calc(50% + 60px);
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  padding: 6px 12px;
  background: rgba(19, 12, 7, 0.62);
  border: 1px solid rgba(183, 176, 102, 0.3);
  backdrop-filter: blur(4px);
  z-index: 5;
  pointer-events: none;
  font-size: 16px;
  line-height: 1;
}
.pstar {
  display: inline-block;
  color: rgba(255, 255, 255, 0.18);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.pstar-full { color: var(--accent-warm); }
.pstar-half {
  background: linear-gradient(90deg, var(--accent-warm) 50%, rgba(255, 255, 255, 0.18) 50%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* "Own Recipe" rubber stamp — circular, olive ink, tilted. Double ring
   (outer border + inner pseudo) for the authentic stamp feel. */
.page-own-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(183, 176, 102, 0.85);
  background: rgba(19, 12, 7, 0.32);
  color: rgba(183, 176, 102, 0.95);
  transform: rotate(-10deg);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}
.page-own-stamp::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(183, 176, 102, 0.55);
  border-radius: 50%;
  pointer-events: none;
}
.page-own-stamp span { position: relative; z-index: 1; }

/* "Show text" button on each recipe page */
.page-details {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(19, 12, 7, 0.72);
  border: 1px solid rgba(183, 176, 102, 0.4);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 6;
  backdrop-filter: blur(4px);
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.page-details svg { width: 18px; height: 18px; }
.page-details:hover {
  background: rgba(43, 30, 18, 0.95);
  border-color: var(--accent);
  transform: scale(1.08);
}
.page-details::after {
  content: "Recipe";
  position: absolute;
  bottom: 50%;
  right: calc(100% + 10px);
  transform: translateY(50%);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(19, 12, 7, 0.85);
  padding: 4px 8px;
  border: 1px solid rgba(183, 176, 102, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  white-space: nowrap;
}
.page-details:hover::after { opacity: 1; }

/* Cover */
.page-cover {
  background: radial-gradient(ellipse at 50% 30%, #2a1c10 0%, #1a110a 55%, #0d0804 100%);
  color: var(--accent);
  position: relative;
}
.page-cover::before {
  content: ""; position: absolute; inset: 22px;
  border: 1px solid rgba(183, 176, 102, 0.35);
  pointer-events: none;
}
.page-cover::after {
  content: ""; position: absolute; inset: 28px;
  border: 1px solid rgba(183, 176, 102, 0.12);
  pointer-events: none;
}
.cover-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  gap: 26px;
}
.cover-mark {
  position: absolute;
  top: 56px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.6em;
  color: var(--accent);
}
.cover-monogram {
  font-family: "Boldonse", var(--serif);
  font-size: clamp(77px, 11.5vw, 141px);
  line-height: 0.9;
  color: var(--accent);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  user-select: none;
  margin-top: -155px;
  margin-bottom: 90px;
}
.cover-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.95;
  color: var(--ink);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.cover-title em {
  font-family: var(--serif-2);
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.cover-sub {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.cover-byline {
  position: absolute;
  bottom: 56px;
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.85;
}
.page-cover-back .cover-inner { padding: 40px; }
.cover-mark-back {
  font-family: "Boldonse", var(--serif);
  font-size: 120px;
  line-height: 0.9;
  color: var(--accent);
  opacity: 0.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  user-select: none;
}

/* Intro / foreword */
.page-intro {
  background: radial-gradient(ellipse at 50% 20%, #1f1509 0%, #130c07 70%);
  position: relative;
}
.page-intro::before {
  content: ""; position: absolute; inset: 26px;
  border: 1px solid rgba(183, 176, 102, 0.1);
  pointer-events: none;
}
.intro-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 60px 48px;
  text-align: center;
}
.intro-kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.intro-body {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--ink);
  max-width: 32ch;
  margin: 0;
}
.intro-sign {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-dim);
  margin: 0;
  letter-spacing: 0.08em;
}

/* ============ Book chrome ============ */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(29, 20, 12, 0.75);
  border: 1px solid rgba(183, 176, 102, 0.25);
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 10;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.nav-btn:hover {
  background: rgba(43, 30, 18, 0.95);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}
.nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.nav-prev { left: calc(var(--rail-w) + 16px); }
.nav-next { right: 16px; }

.page-counter {
  position: fixed;
  bottom: 20px;
  left: calc((100vw + var(--rail-w)) / 2);
  transform: translateX(-50%);
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  z-index: 5;
  white-space: nowrap;
  pointer-events: none;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  :root { --sidebar-w: 280px; }
}

/* ============ Recipe text overlay ============ */
.recipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}
.recipe-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 260ms ease, visibility 0s linear 0s;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 2, 0.78);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.overlay-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(92vw, 560px);
  max-height: 88vh;
  overflow-y: auto;
  background:
    linear-gradient(180deg, #1a120a 0%, #130c07 100%);
  border: 1px solid rgba(183, 176, 102, 0.3);
  color: var(--ink);
  padding: 56px 52px 48px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(183, 176, 102, 0.08);
  transition: transform 320ms var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 176, 102, 0.25) transparent;
}
.overlay-card::-webkit-scrollbar { width: 8px; }
.overlay-card::-webkit-scrollbar-thumb {
  background: rgba(183, 176, 102, 0.2);
  border-radius: 4px;
}
.recipe-overlay.is-open .overlay-card {
  transform: translate(-50%, -50%) scale(1);
}

/* Faint inner frame, like the book pages */
.overlay-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(183, 176, 102, 0.1);
  pointer-events: none;
}

.overlay-close,
.overlay-print {
  position: absolute;
  top: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(183, 176, 102, 0.25);
  color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.overlay-close { right: 14px; }
.overlay-print { right: 58px; }
.overlay-close:hover {
  background: rgba(183, 176, 102, 0.1);
  border-color: var(--accent);
  transform: rotate(90deg);
}
.overlay-print:hover {
  background: rgba(183, 176, 102, 0.1);
  border-color: var(--accent);
}

/* Overlay body typography */
.overlay-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 0.95;
  color: var(--ink);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.overlay-tags {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.overlay-tags .dot { margin: 0 6px; opacity: 0.7; }

.overlay-desc {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(183, 176, 102, 0.12);
}

.overlay-section { margin-top: 24px; }
.overlay-section:first-of-type { margin-top: 0; }

.overlay-section-title {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 12px;
  position: relative;
  padding-bottom: 6px;
}
.overlay-section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

/* Ingredient list with dotted leaders */
.overlay-ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}
.overlay-ingredients li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
}
.overlay-ingredients .ico {
  width: 12px; height: 12px;
  color: var(--accent);
  align-self: center;
}
.overlay-ing-name {
  font-size: 14px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
}
.overlay-ing-name::after {
  content: " ......................................................................................";
  color: rgba(183, 176, 102, 0.45);
  letter-spacing: 2px;
  margin-left: 6px;
}
.overlay-ing-amt {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  background: #130c07;
  padding-left: 6px;
}

/* Steps */
.overlay-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.overlay-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 8px 0;
  counter-increment: step;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.overlay-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  text-align: right;
}

/* Two-column serve/garnish row */
.overlay-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(183, 176, 102, 0.12);
}
.overlay-meta > div { min-width: 0; }
.overlay-meta-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 500;
}
.overlay-meta-value {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}

/* Comment at the bottom */
.overlay-comment {
  font-family: var(--serif-2);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(183, 176, 102, 0.12);
}
.overlay-comment::before {
  content: "“";
  font-family: var(--serif);
  font-size: 40px;
  line-height: 0;
  color: var(--accent);
  opacity: 0.6;
  margin-right: 6px;
  vertical-align: -10px;
}

@media (max-width: 600px) {
  .overlay-card {
    padding: 48px 28px 40px;
    width: 94vw;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============ Print ============
   When the user clicks the print button on the recipe overlay, only the
   recipe content prints, in plain black & white. Everything else on the
   page is hidden; colours are flattened to pure black on white. */
@media print {
  body * { visibility: hidden !important; }
  .recipe-overlay,
  .overlay-card,
  .overlay-card * { visibility: visible !important; }

  .recipe-overlay {
    position: static !important;
    background: white !important;
    backdrop-filter: none !important;
  }
  .overlay-scrim { display: none !important; }
  .overlay-close,
  .overlay-print { display: none !important; }

  .overlay-card {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 24px !important;
    margin: 0 !important;
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    color: #000 !important;
  }
  .overlay-card::before { display: none !important; }

  /* Flatten all text and accents to black */
  .overlay-card,
  .overlay-card *,
  .overlay-card *::before,
  .overlay-card *::after {
    color: #000 !important;
    background: white !important;
    text-shadow: none !important;
  }
  .overlay-section-title::after,
  .overlay-desc,
  .overlay-meta,
  .overlay-comment {
    border-color: #000 !important;
  }
  .overlay-ingredients .ico { color: #000 !important; }
  .overlay-ing-name::after { color: #555 !important; }
  .overlay-comment::before { color: #000 !important; opacity: 0.6; }
}
