/* ── Cookbook — editorial React UI ──────────────────────────── */

:root {
  --cream:   #f4eee0;
  --paper:   #e9dfc8;
  --ink:     #241d12;
  --ink-2:   #463a28;
  --accent:    #1f4a38; /* bottle green — primary accent ("deli counter" palette) */
  --accent-d:  #16382a;
  --stamp:   #a4502f;   /* terracotta, demoted: card numbers, hearts, small marks only */
  --gold:    #c9922a;
  --sage:    #3e6b50;
  --muted:   #6e5f45;
  --border:  #d9ccae;
  --shadow:  0 2px 8px rgba(36,29,18,0.08);
  --shadow-lg: 0 10px 30px rgba(36,29,18,0.18);
  --serif:   'Young Serif', Georgia, serif;  /* chunky 70s-cookbook display */
  --hand:    'Caveat', cursive;              /* handwritten annotations */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button { font-family: inherit; }
img { max-width: 100%; display: block; }


.boot { padding: 3rem; text-align: center; color: var(--muted); font-style: italic; }

/* ── Boot screen ── */
.boot-screen {
  position: fixed; inset: 0; z-index: 90;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.bs-script {
  font-family: var(--hand); font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 3.8rem); color: var(--accent);
  opacity: 0; animation: bsIn 0.9s ease forwards;
  text-align: center; padding: 0 1rem;
}
.bs-sub {
  font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); opacity: 0; animation: bsIn 0.8s ease 0.35s forwards;
}
@keyframes bsIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .bs-script, .bs-sub { animation: none; opacity: 1; }
}

/* ── App footer ── */
.app-footer {
  margin-top: 3.5rem;
  padding: 3.2rem 1.2rem calc(2.6rem + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1.5px dashed var(--border);
}
.app-footer .f-script {
  font-family: var(--hand); font-weight: 600;
  font-size: 1.55rem; color: var(--accent);
}
.app-footer .f-small {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-top: 10px;
}

/* ── "Name your cookbook" onboarding ── */
.onboard {
  max-width: 540px; margin: 9vh auto 4rem; text-align: center;
  background: var(--paper); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 2.8rem 2.2rem 2.4rem;
}
.ob-eyebrow { font-family: var(--hand); font-weight: 600; font-size: 1.35rem; color: var(--stamp); }
.onboard h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.2rem); margin: 0.4rem 0 0.7rem;
}
.ob-sub { color: var(--muted); font-size: 0.92rem; line-height: 1.65; max-width: 40ch; margin: 0 auto 1.7rem; }
.ob-input {
  width: 100%; font-family: var(--hand); font-weight: 600;
  font-size: 1.55rem; text-align: center;
  padding: 0.6rem 1rem; border: none; outline: none;
  border-bottom: 2px dashed var(--border); background: transparent;
  color: var(--ink); margin-bottom: 1.7rem;
  transition: border-color 0.25s;
}
.ob-input:focus { border-bottom-color: var(--accent); }
.ob-input::placeholder { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.ob-err { color: #a32d2d; font-size: 0.85rem; margin: -0.8rem 0 1rem; }
.ob-skip { font-family: var(--hand); font-weight: 500; font-size: 1.05rem; color: var(--muted); margin-top: 1.1rem; }
.ob-skip a { color: var(--accent); text-decoration: none; }
.ob-skip a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ── Waitlist (LAUNCH_MODE=waitlist) ─────────────────────────── */
/* Reuses the onboarding vocabulary (.ob-eyebrow/.ob-input/.ob-skip). */
.waitlist { text-align: center; }
.wl-eyebrow { font-family: var(--hand); font-weight: 600; font-size: 1.35rem; color: var(--stamp); }
.wl-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.2rem); margin: 0.4rem 0 0.7rem; color: var(--ink);
}
.wl-sub { color: var(--muted); font-size: 0.92rem; line-height: 1.65; max-width: 40ch; margin: 0 auto 1.7rem; }
/* Email needs a legible sans input, not the handwritten dashed style. */
.waitlist .ob-input[type="email"],
.waitlist .ob-input[type="text"] {
  font-family: var(--sans, 'Lato', sans-serif); font-weight: 400;
  font-size: 1.05rem; margin-bottom: 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem 1rem; background: #fff;
}
.waitlist .ob-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,74,56,0.15); }
.waitlist .primary-btn { margin-top: 0.4rem; }
/* Standalone card on /sign-up (in-app version sits inside .onboard already). */
.waitlist-card {
  width: 100%;
  background: #fdf8ec; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(36,29,18,0.10);
  padding: 2.4rem 2rem 2rem;
}

/* ── Sign-in page ────────────────────────────────────────────── */
.sign-in-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 2rem 1.25rem;
}
.sign-in-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.sign-in-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--ink);
}
.sign-in-wm-serif {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.sign-in-wm-hand {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--stamp);
}
.sign-in-clerk { width: 100%; }
/* Clerk's free-tier "Secured by Clerk" tab hangs off the card's left edge and
   inherits colorPrimary (bottle green), reading louder than the CTA. Removing it
   is a paid-plan option; instead quiet it to paper tones so it recedes.
   NOTE: Clerk replaces the .sign-in-clerk mount div with its own .cl-rootBox, so
   anchor on .sign-in-card. The badge is the only direct child of .cl-card that
   isn't a cl-header/cl-main/cl-footer element — select it structurally so this
   survives Clerk renaming its hashed cl-internal-* classes. */
.sign-in-card .cl-card > div[class*="cl-internal"]:not([class*="cl-header"]):not([class*="cl-main"]):not([class*="cl-footer"]):not([class*="cl-form"]) {
  background: var(--paper) !important;
  color: var(--muted) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}
.sign-in-card .cl-card > div[class*="cl-internal"]:not([class*="cl-header"]):not([class*="cl-main"]):not([class*="cl-footer"]):not([class*="cl-form"]) * {
  color: var(--muted) !important;
  fill:  var(--muted) !important;
}
.sign-in-foot {
  font-size: 0.82rem;
  color: var(--muted);
}
.sign-in-foot a { color: var(--muted); text-decoration: none; }
.sign-in-foot a:hover { color: var(--accent); }

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--cream);
  color: var(--ink);
  padding: 0.85rem 1.4rem;
  display: flex; align-items: center; gap: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.logo-btn {
  display: flex; align-items: baseline; gap: 0.55rem;
  background: transparent; border: none; color: inherit;
  cursor: pointer; padding: 0.2rem; text-align: left;
  min-width: 0; flex-shrink: 1;
}
.logo-btn:hover { opacity: 0.85; }
.wm-name {
  font-family: var(--serif);
  font-size: 1.12rem; font-weight: 400; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 30vw;
}
.wm-sub {
  font-family: var(--hand); font-weight: 600;
  font-size: 0.95rem; color: var(--stamp); white-space: nowrap;
}

.header-nav { display: flex; align-items: center; gap: 1.3rem; }
.nav-link {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.04em; color: var(--ink-2);
  padding: 4px 0; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  height: 2px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--ink); }

.search-bar {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  border-radius: 99px;
  transition: background 0.15s, border-color 0.15s;
}
.search-bar:focus-within {
  background: var(--cream);
  border-color: var(--muted);
}
.search-bar input {
  flex: 1; background: transparent; border: none; color: var(--ink);
  font-size: 0.9rem; outline: none;
}
.search-bar input::placeholder { color: var(--muted); }
.search-clear {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: 2px; border-radius: 50%;
}
.search-clear:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.new-menu-wrap { position: relative; }
.new-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 264px; background: var(--paper);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 10px;
}
.new-menu-head {
  font-family: var(--hand); font-weight: 600; font-size: 1.05rem;
  color: var(--stamp); margin: 2px 6px 8px;
}
.new-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 10px 8px; border-radius: 7px; color: var(--ink);
}
.new-menu button:hover { background: var(--cream); }
.new-menu button svg { color: var(--accent); flex: none; }
.new-menu button b { display: block; font-size: 0.86rem; font-family: var(--serif); font-weight: 400; }
.new-menu button small { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

/* ── Mobile bottom tab bar ── */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  display: none;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: inherit;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 0;
}
.tabbar .tab.active { color: var(--accent); }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.ghost-btn:hover { background: var(--paper); border-color: var(--muted); color: var(--ink); }
.ghost-btn.is-nav-active {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}
.ghost-btn.is-nav-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 15%; right: 15%;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
.ghost-btn.is-nav-active:hover { background: transparent; border-color: transparent; color: var(--accent-d); }
.ghost-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
  min-width: 18px; text-align: center;
}
.primary-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 0.95rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.primary-btn:hover { background: var(--accent-d); }
.primary-btn.big, .ghost-btn.big {
  padding: 0.9rem 1.4rem;
  font-size: 0.9rem;
  border-radius: 8px;
}
.ghost-btn.big {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.ghost-btn.big:hover { border-color: var(--accent); color: var(--accent); background: var(--cream); }
.primary-btn.big:disabled, .ghost-btn.big:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Home layout ────────────────────────────────────────────── */
.home {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.6rem 4rem;
}

/* ── Family portrait ────────────────────────────────────────── */
.family {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.2rem;
  margin-bottom: 3rem;
  padding: 2rem 0 2.4rem;
  border-bottom: 1px solid var(--border);
}
.family-photo-wrap { display: flex; flex-direction: column; gap: 0.6rem; }
.family-photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border: 10px solid #fffdf6;
  border-bottom-width: 34px;
  box-shadow: var(--shadow-lg);
  border-radius: 2px;
  transform: rotate(-2deg);
}
/* Fill states are absolutely positioned to inset:0 so their height resolves from
   a definite containing block. Safari fails to resolve height:100% when the parent's
   only height source is aspect-ratio, falling back to the image's intrinsic size
   (overflowing / "zoomed in"). Absolute inset:0 sidesteps that entirely. */
.family-photo,
.family-photo-uploading,
.family-photo-empty {
  position: absolute; inset: 0;
  width: auto; height: auto;
  overflow: hidden;
}
.photo-tape {
  position: absolute; top: -24px; left: 50%; z-index: 3;
  width: 92px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(212, 196, 150, 0.68);
  border-left: 1px dashed rgba(160,140,90,0.4);
  border-right: 1px dashed rgba(160,140,90,0.4);
}
.fam-last-added {
  font-family: var(--hand); font-weight: 600; font-size: 1.2rem;
  color: var(--stamp); margin: -0.6rem 0 1.2rem;
}
@media (prefers-reduced-motion: reduce) { .family-photo-frame { transform: none; } }
.family-photo { width: 100%; height: 100%; object-fit: cover; }
.family-photo-uploading {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem;
  background: var(--paper);
}
.photo-upload-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-upload-label { font-size: 0.82rem; color: var(--muted); }
.family-photo-err {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(180,60,30,0.88);
  color: #fff; font-size: 0.78rem;
  padding: 0.35rem 0.6rem; text-align: center;
}
.family-photo-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--paper), #ead6b8);
  color: var(--muted);
  cursor: pointer;
  padding: 1.5rem;
}
.family-photo-empty:hover { background: linear-gradient(135deg, #efddbe, #e0ca9f); }
.empty-inner { text-align: center; max-width: 280px; }
.empty-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0.8rem 0 0.4rem;
}
.empty-hint { font-size: 0.78rem; line-height: 1.5; }
.empty-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 1rem;
  background: var(--ink); color: var(--cream);
  border: none; padding: 0.5rem 0.9rem;
  border-radius: 4px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
.family-photo-edit {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(44,26,14,0.8);
  color: #fff;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
  font-size: 0.72rem;
  display: inline-flex; align-items: center; gap: 0.25rem;
  cursor: pointer;
}
.family-photo-edit:hover { background: var(--ink); }
.family-caption {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--muted);
  font-size: 1.08rem;
  text-align: center;
  padding: 0 1rem;
}
.caption-mark {
  font-size: 1.6em;
  vertical-align: -0.4em;
  color: var(--gold);
  margin-right: 0.1em;
}

.family-content { padding: 1rem 0; display: flex; flex-direction: column; gap: 1rem; }
.family-eyebrow {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.eyebrow-line { width: 36px; height: 2px; background: var(--gold); display: inline-block; }
.family-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.family-name-edit { opacity: 0; transition: opacity 0.15s; color: var(--muted); }
.family-name:hover .family-name-edit { opacity: 1; }
.family-name-input {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: none; border-bottom: 2px solid var(--accent);
  outline: none;
  width: 100%;
}
.family-tagline {
  font-family: var(--hand);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}
.family-stats {
  display: flex; gap: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.fam-stat-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.fam-stat-label {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-top: 0.3rem;
}
.tonight-pick {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.tonight-pick:hover { border-color: var(--accent); transform: translateX(2px); }
.tp-thumb {
  width: 56px; height: 56px;
  background-size: cover; background-position: center;
  border-radius: 4px; flex-shrink: 0;
  background-color: var(--border);
}
.tp-body { flex: 1; }
.tp-eyebrow {
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.tp-title { font-family: var(--serif); font-size: 1.1rem; margin: 0.15rem 0; }
.tp-meta {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; color: var(--muted);
}
.tp-arrow { color: var(--muted); flex-shrink: 0; }

/* ── Section heads ──────────────────────────────────────────── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1rem;
}
.section-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 400;
  color: var(--ink);
  margin-top: 0.25rem;
}

/* ── Favorites rail ─────────────────────────────────────────── */
.rail { margin-bottom: 2.8rem; }
.rail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.mini-card {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-image {
  width: 64px; height: 64px;
  border-radius: 4px;
  background-size: cover; background-position: center;
  background-color: var(--paper);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.mini-cat {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.mini-title {
  font-family: var(--serif); font-size: 0.95rem;
  margin: 0.15rem 0;
  line-height: 1.25;
}
.mini-meta {
  font-size: 0.74rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.3rem;
}

/* ── Filters ────────────────────────────────────────────────── */
.filters {
  margin: 1.6rem 0 2rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.2rem; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.filter-divider { width: 1px; height: 20px; background: var(--border); margin: 0 0.3rem; }
.pill {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink-2);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.3rem;
  transition: all 0.12s;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pill-outline { border-color: var(--border); color: var(--muted); }
.pill-outline.is-active { background: var(--sage); border-color: var(--sage); color: #fff; }

/* ── Added by (author) filter dropdown ──────────────────────── */
.author-filter {
  position: relative;
  display: inline-flex;
}
.author-filter > .pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.author-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 220px;
  max-width: 300px;
  max-height: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: authorPopIn 0.15s ease;
}
@keyframes authorPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.author-pop-head {
  padding: 0.6rem 0.9rem;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  flex-shrink: 0;
}
.author-pop-list {
  overflow-y: auto;
  padding: 0.25rem;
}
.author-pop-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.55rem 0.7rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
}
.author-pop-item:hover { background: var(--paper); }
.author-pop-item.on {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.author-pop-item.on:hover { background: var(--accent-d); }

/* ── Results grid ───────────────────────────────────────────── */
.results { }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.grid-editorial { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-image {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: var(--paper);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.card-image-fallback { opacity: 0.5; }
.card-fav {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.95);
  color: var(--accent);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.card-quick {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(255,200,0,0.92);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
}
.card-cat {
  position: absolute; top: 10px; left: 10px;
  background: rgba(44,26,14,0.8);
  color: var(--cream);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 99px;
}
.card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}
.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-author {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--sage);
  font-style: italic;
}
.card-author strong {
  color: var(--ink);
  font-weight: 700;
  font-style: normal;
}
.card-author-sub {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}
.recipe-eyebrow-author {
  color: var(--ink-2);
  font-weight: 700;
}
.card-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
}
.card-meta .dot { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: 0.5; }
.card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }

.empty {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
}

/* ── Stars ──────────────────────────────────────────────────── */
.stars-row {
  display: inline-flex; align-items: center;
  color: var(--gold);
  gap: 1px;
}

/* ── Recipe view ────────────────────────────────────────────── */
.recipe-view { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.6rem 4rem; }
.recipe-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: transparent;
  border: none; color: var(--muted);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; padding: 0.4rem 0.6rem 0.4rem 0;
}
.back-btn:hover { color: var(--accent); }
.recipe-top-actions { display: flex; gap: 0.3rem; }
.icon-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-2);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.danger:hover { border-color: var(--accent); color: var(--accent); }

.recipe-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.recipe-hero-image {
  aspect-ratio: 4 / 5;
  background-color: var(--paper);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  overflow: hidden;
  position: relative;
}
.recipe-hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 6px;
}
.recipe-hero-text { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.recipe-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.recipe-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 400;
}
.recipe-desc {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--ink-2);
  font-size: 1.3rem;
  line-height: 1.55;
  max-width: 580px;
}

/* Author / "Added by" — distinct from the muted meta row */
.recipe-author {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--sage);
  background: rgba(90, 122, 92, 0.09);
  border-left: 3px solid var(--sage);
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
  font-style: italic;
}
.recipe-author strong {
  color: var(--ink);
  font-weight: 700;
  font-style: normal;
}
.recipe-adapted {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--muted, #8a8278);
  font-style: italic;
}
.peek-author {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  margin-bottom: 0.8rem;
}
.recipe-rating {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem;
}
.recipe-rating .muted { font-size: 0.82rem; }

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.meta-stat { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-2); }
.meta-stat-label {
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.meta-stat-value { font-size: 0.95rem; font-weight: 700; margin-top: 2px; }

.serving-ctrl { display: inline-flex; align-items: center; gap: 0.4rem; }
.serving-ctrl button {
  width: 26px; height: 26px;
  border: 1.5px solid var(--border);
  background: var(--cream);
  border-radius: 50%;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.serving-ctrl button:hover { border-color: var(--accent); color: var(--accent); }

.recipe-cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
  font-weight: 600;
}
.tag-meal { background: rgba(90,122,92,0.15); color: var(--sage); }
.tag-meat { background: rgba(184,74,46,0.12); color: var(--accent); }

.recipe-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
}
.ing-panel {
  background: var(--paper);
  border-radius: 6px;
  padding: 1.2rem;
  align-self: start;
  position: sticky;
  top: 80px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
}
.panel-sub {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.ing-list { list-style: none; }
.ing-list li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex; gap: 0.8rem; align-items: baseline;
  font-size: 0.88rem;
}
.ing-list li:last-child { border-bottom: none; }
.ing-amt { color: var(--accent); font-weight: 700; min-width: 70px; flex-shrink: 0; font-size: 0.85rem; }
.ing-name { flex: 1; color: var(--ink-2); }

.steps-panel { }
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; }
.steps-list li {
  display: flex; gap: 1.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.steps-list li:last-child { border-bottom: none; }
.step-num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  min-width: 40px;
  line-height: 1;
}
.steps-list li p { font-size: 1rem; line-height: 1.65; color: var(--ink-2); }

.notes-panel { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 2px solid var(--border); }
.note {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 2px;
}
.note-head {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.note-head strong { color: var(--ink); font-size: 0.88rem; }
.note p { font-size: 0.92rem; color: var(--ink-2); }
.note-head { align-items: center; gap: 0.4rem; position: relative; }
.note-head .muted { font-size: 0.72rem; }
.note-delete {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.note-delete:hover { opacity: 1; color: var(--accent); background: rgba(184,74,46,0.08); }

.btn-note {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.6rem;
  background: transparent;
  border: 1.5px dashed var(--border);
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
}
.btn-note:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }

.note-form {
  margin-top: 0.6rem;
  padding: 0.9rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.note-form input,
.note-form textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}
.note-form input:focus,
.note-form textarea:focus { border-color: var(--accent); }
.note-form input[readonly] { background: var(--parchment); color: var(--muted); cursor: default; }
.note-form-actions {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  margin-top: 0.2rem;
}
.note-form-actions .ghost-btn,
.note-form-actions .primary-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
  border-radius: 4px;
}
.note-form-actions .ghost-btn {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}
.note-form-actions .ghost-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--cream); }

/* Star picker inside rating form */
.star-picker-row {
  display: flex; gap: 0.3rem;
  padding: 0.4rem 0;
}
.star-pick {
  background: transparent;
  border: none;
  padding: 0.15rem;
  cursor: pointer;
  color: rgba(201, 146, 42, 0.3);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.star-pick:hover { transform: scale(1.08); }
.star-pick.on { color: var(--gold); }
.rating-note .stars-row { color: var(--gold); }
.ratings-section { border-top-color: rgba(201, 146, 42, 0.3); }

/* Scan a cookbook page */
.scan-picker {
  width: 100%;
  min-height: 180px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.4rem;
  background: var(--paper);
  border: 1.5px dashed var(--border);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  padding: 1.5rem;
  text-align: center;
  font-family: inherit;
}
.scan-picker:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.scan-picker-label { font-size: 0.9rem; font-weight: 700; margin-top: 0.4rem; color: var(--ink); }
.scan-picker-hint  { font-size: 0.72rem; }
.scan-preview {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}
.scan-preview img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}
.scan-replace {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(44,26,14,0.85);
  color: #fff;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
  font-size: 0.72rem;
  display: inline-flex; align-items: center; gap: 0.25rem;
  cursor: pointer;
}
.scan-replace:hover { background: var(--ink); }

/* Multi-page scan grid */
.scan-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.scan-page-thumb {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.scan-page-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.scan-page-num {
  position: absolute;
  bottom: 4px; left: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  pointer-events: none;
}
.scan-page-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(44,26,14,0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.scan-page-remove:hover { background: var(--accent); }
.scan-page-add {
  aspect-ratio: 3/4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem;
  border: 1.5px dashed var(--border);
  border-radius: 5px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.scan-page-add:hover { border-color: var(--accent); color: var(--accent); }

/* Dish photo prompt modal */
.dish-photo-modal .form-head h2 { font-size: 1.1rem; }
.dish-photo-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.dish-photo-btn {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.dish-photo-btn:hover { background: #a03010; }
.dish-photo-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dish-photo-skip { width: 100%; justify-content: center; }

/* ── Add / Edit recipe form modal ───────────────────────────── */
.form-backdrop {
  position: fixed; inset: 0;
  background: rgba(44,26,14,0.4);
  z-index: 300;
}
.form-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  background: var(--cream);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 301;
  display: flex; flex-direction: column;
  animation: formIn 0.2s ease;
  overflow: hidden;
}
@keyframes formIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
.form-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.form-head h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
}
.form-body {
  padding: 1.3rem;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.1rem;
  flex: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
}
.form-photo {
  aspect-ratio: 4 / 5;
  min-height: 220px;
}
.form-photo-empty {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem;
  background: var(--paper);
  border: 1.5px dashed var(--border);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  padding: 1rem;
  text-align: center;
  font-family: inherit;
}
.form-photo-empty:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.form-photo-empty-label { font-size: 0.85rem; font-weight: 700; margin-top: 0.3rem; }
.form-photo-empty-hint { font-size: 0.72rem; }
.form-photo-preview {
  width: 100%; height: 100%;
  position: relative;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.form-photo-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-remove {
  position: absolute; top: 8px; right: 8px;
  background: rgba(44,26,14,0.85);
  color: #fff;
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.photo-remove:hover { background: var(--ink); }

.form-fields { display: flex; flex-direction: column; gap: 0.8rem; }
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.form-label .form-hint {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  outline: none;
  resize: vertical;
}
.form-field input[type="text"]:focus,
.form-field textarea:focus { border-color: var(--accent); }
.form-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.form-field-inline { flex-direction: row; align-items: center; gap: 0.5rem; }
.form-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); flex-shrink: 0; }
.form-label-inline { margin: 0; }
.form-footer {
  display: flex; justify-content: flex-end; gap: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 0.2rem;
}

@media (max-width: 680px) {
  .form-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; top: 0; left: 0; transform: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-photo { aspect-ratio: 16 / 10; min-height: 0; height: 180px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  @keyframes formIn { from { opacity: 0; } to { opacity: 1; } }
}

/* ── Import URL modal ───────────────────────────────────────── */
.import-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 2rem));
  background: var(--cream);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 301;
  animation: formIn 0.2s ease;
  overflow: hidden;
}
.import-body {
  padding: 1.3rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.import-hint {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
.import-body input {
  padding: 0.65rem 0.85rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  outline: none;
}
.import-body input:focus { border-color: var(--accent); }
.import-body input:disabled { opacity: 0.6; }
.import-error {
  background: rgba(184,74,46,0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.import-status {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Import banner inside the review form */
.import-banner {
  margin: 0 1.3rem;
  padding: 0.75rem 1rem;
  background: rgba(201,146,42,0.1);
  border: 1px solid rgba(201,146,42,0.35);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--ink-2);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.import-banner strong {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 0.4rem;
}
.import-banner a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}
.import-banner a:hover { text-decoration: underline; }
.import-banner .import-warning {
  font-size: 0.82rem;
  color: var(--accent);
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(201,146,42,0.35);
}
@media (max-width: 680px) {
  .import-modal { width: 100vw; height: auto; max-height: calc(100vh - 2rem); border-radius: 10px; }
}

/* ── Cross-recipe reference link ────────────────────────────── */
.recipe-ref {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 2px;
  padding: 0 2px;
  transition: background 0.1s;
}
.recipe-ref:hover {
  color: var(--accent-d);
  background: rgba(184,74,46,0.08);
}

/* ── Recipe peek (side panel referenced from ingredient link) ── */
.peek-backdrop {
  position: fixed; inset: 0;
  background: rgba(44,26,14,0.35);
  z-index: 200;
}
.recipe-peek {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(540px, 100%);
  background: var(--cream);
  box-shadow: -12px 0 40px rgba(44,26,14,0.25);
  z-index: 201;
  animation: slideInRight 0.22s ease;
  display: flex;
  flex-direction: column;
}
.recipe-peek-close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.recipe-peek-close:hover { border-color: var(--accent); color: var(--accent); }
.peek-scroll {
  overflow-y: auto;
  padding: 1.6rem 1.5rem 2rem;
  flex: 1;
}
.peek-eyebrow {
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  margin-bottom: 0.9rem;
}
.peek-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover; background-position: center;
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.peek-category {
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.peek-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.15;
  margin: 0.4rem 0 0.6rem;
}
.peek-rating {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.peek-desc {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}
.peek-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
  font-size: 0.82rem; color: var(--muted);
}
.peek-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.peek-section { margin-bottom: 1.6rem; }
.peek-section h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1.5px solid var(--border);
}
.peek-ing-list { list-style: none; }
.peek-ing-list li {
  display: flex; gap: 0.7rem; align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}
.peek-ing-list li:last-child { border-bottom: none; }
.peek-ing-list .ing-amt { color: var(--accent); font-weight: 700; min-width: 64px; flex-shrink: 0; font-size: 0.82rem; }
.peek-ing-list .ing-name { flex: 1; color: var(--ink-2); }
.peek-steps { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.peek-steps li {
  display: flex; gap: 0.8rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.peek-steps li:last-child { border-bottom: none; }
.peek-step-num {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 400;
  min-width: 28px;
  line-height: 1.3;
}
.peek-steps li p { font-size: 0.92rem; line-height: 1.55; color: var(--ink-2); }

/* ── Cook mode ──────────────────────────────────────────────── */
.cook-mode {
  position: fixed; inset: 0;
  background: #1a0f08;
  color: var(--cream);
  z-index: 1000;
  display: flex; flex-direction: column;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.cook-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 1rem;
  flex-shrink: 0;
}
.cook-top-left { display: flex; align-items: center; gap: 1.2rem; min-width: 0; }
.cook-close {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream);
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
}
.cook-close:hover { background: rgba(255,255,255,0.06); }
.cook-recipe { min-width: 0; }
.cook-recipe-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cook-recipe-sub {
  font-size: 0.72rem;
  color: rgba(253,246,236,0.55);
  margin-top: 2px;
}
.cook-top-right { display: flex; gap: 0.4rem; flex-shrink: 0; }
.cook-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--cream);
  padding: 0.45rem 0.85rem;
  border-radius: 99px;
  font-size: 0.78rem;
  cursor: pointer;
}
.cook-chip:hover { background: rgba(255,255,255,0.06); }
.cook-chip.on { border-color: var(--gold); color: var(--gold); }
.cook-chip .dot-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.cook-chip.on .dot-indicator { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.cook-rail {
  padding: 1rem 1.3rem;
  flex-shrink: 0;
}
.cook-rail-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.cook-rail-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.cook-rail-dots {
  display: flex; justify-content: space-between; gap: 4px;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}
.rail-dot {
  flex: 1;
  max-width: 44px;
  min-width: 30px;
  height: 30px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.45);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.rail-dot.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.rail-dot.done {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25);
  color: var(--sage);
}

.cook-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding: 2rem 2rem 1rem;
  overflow-y: auto;
  min-height: 0;
}
.cook-stage { display: flex; flex-direction: column; gap: 1.4rem; max-width: 700px; }
.cook-counter-row { display: flex; align-items: baseline; gap: 1rem; }
.cook-counter {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--cream);
}
.cook-counter .cnt-sep { color: rgba(255,255,255,0.3); margin: 0 0.25rem; }
.cook-counter .cnt-tot { color: rgba(255,255,255,0.55); }
.cook-counter-label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.cook-step {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.45;
  color: var(--cream);
}
.cook-next {
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
}
.cook-next-label {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  margin-bottom: 0.3rem;
}
.cook-next-text { font-size: 0.92rem; color: rgba(253,246,236,0.75); line-height: 1.5; }

.step-ings { }
.step-ings-label {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  margin-bottom: 0.6rem;
}
.step-ings-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.step-ing {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--cream);
  padding: 0.45rem 0.8rem;
  border-radius: 99px;
  font-size: 0.82rem;
  cursor: pointer;
}
.step-ing:hover { background: rgba(255,255,255,0.08); }
.step-ing.on {
  background: rgba(90,122,92,0.2);
  border-color: var(--sage);
  color: rgba(253,246,236,0.6);
  text-decoration: line-through;
}
.step-ing-check {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: inline-flex; align-items: center; justify-content: center;
}
.step-ing.on .step-ing-check {
  background: var(--sage); border-color: var(--sage); color: #fff;
}
.step-ing-amt { color: var(--gold); font-weight: 700; }

.cook-timer { align-self: start; }
.timer-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1.3rem;
  text-align: center;
}
.timer-label {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
  margin-bottom: 0.8rem;
}
.timer-ring {
  position: relative; width: 160px; height: 160px; margin: 0 auto;
}
.timer-time {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--cream);
}
.timer-controls { margin-top: 1rem; }
.timer-quick { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.timer-quick button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream);
  padding: 0.4rem 0.8rem;
  border-radius: 99px;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 700;
}
.timer-quick button:hover { border-color: var(--accent); color: var(--accent); }
.timer-quick button.suggested { border-color: var(--gold); color: var(--gold); }
.timer-running-ctrls { display: flex; gap: 0.5rem; justify-content: center; }
.timer-toggle, .timer-reset {
  flex: 1; max-width: 120px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}
.timer-toggle { background: var(--accent); border-color: var(--accent); }
.timer-toggle:hover { background: var(--accent-d); }
.timer-reset:hover { border-color: rgba(255,255,255,0.3); }
.timer-hint {
  font-size: 0.7rem; color: rgba(253,246,236,0.5);
  margin-top: 0.6rem;
}

.cook-nav {
  display: flex; gap: 0.8rem;
  padding: 1rem 1.3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cook-btn {
  flex: 1;
  min-height: 60px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cook-btn:active:not(:disabled) { background: var(--accent-d); }
.cook-btn:disabled {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.25);
  cursor: not-allowed;
}
.cook-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream);
}
.cook-btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.cook-btn.mark {
  background: transparent;
  border: 1px solid var(--sage);
  color: var(--sage);
  flex: 0.8;
}
.cook-btn.mark:hover { background: rgba(90,122,92,0.15); }
.cook-btn.primary { flex: 1.3; }

.cook-drawer-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2;
}
.cook-ing-drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(420px, 100%);
  background: #241611;
  color: var(--cream);
  z-index: 3;
  display: flex; flex-direction: column;
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: none; } }
.cook-ing-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cook-ing-head h3 { font-family: var(--serif); font-size: 1.15rem; }
.cook-ing-head button {
  background: transparent;
  border: none; color: var(--cream);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
}
.cook-ing-head button:hover { background: rgba(255,255,255,0.06); }
.cook-drawer-list {
  list-style: none;
  overflow-y: auto;
  padding: 0.6rem 0;
  flex: 1;
}
.cook-drawer-list li {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cook-drawer-list li:hover { background: rgba(255,255,255,0.03); }
.cook-drawer-list li.on {
  opacity: 0.5;
}
.cook-drawer-list li.on .drawer-amt,
.cook-drawer-list li.on .drawer-name { text-decoration: line-through; }
.drawer-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cook-drawer-list li.on .drawer-check {
  background: var(--sage); border-color: var(--sage); color: #fff;
}
.drawer-amt { color: var(--gold); font-weight: 700; min-width: 80px; font-size: 0.88rem; }
.drawer-name { flex: 1; font-size: 0.92rem; }

/* ── Shopping panel ─────────────────────────────────────────── */
.shop-backdrop {
  position: fixed; inset: 0;
  background: rgba(44,26,14,0.35);
  z-index: 100;
}
.shop-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(420px, 100%);
  background: #fff;
  box-shadow: -12px 0 40px rgba(44,26,14,0.25);
  z-index: 101;
  display: flex; flex-direction: column;
  animation: slideInRight 0.22s ease;
}
.shop-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.2rem 1.3rem 1rem;
  border-bottom: 1px solid var(--border);
}
.shop-head h2 { font-family: var(--serif); font-size: 1.35rem; }
.shop-sub { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }

.shop-actions { display: flex; gap: 0.5rem; padding: 0.9rem 1.3rem; border-bottom: 1px solid var(--border); }
.shop-actions button {
  flex: 1;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink-2);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.shop-actions button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.shop-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

.shop-empty {
  padding: 3rem 1.5rem; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.shop-empty p { font-size: 0.9rem; }
.shop-list { list-style: none; flex: 1; overflow-y: auto; padding: 0.4rem 0; }
.shop-item label {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.shop-item label:hover { background: var(--paper); }
.shop-item input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.shop-amt { color: var(--accent); font-weight: 700; min-width: 70px; flex-shrink: 0; font-size: 0.85rem; }
.shop-name { flex: 1; word-break: break-word; }
.shop-item.checked { opacity: 0.55; }
.shop-item.checked .shop-amt, .shop-item.checked .shop-name { text-decoration: line-through; }
.shop-divider {
  padding: 0.7rem 1.3rem 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: 0.4rem;
}

/* ── Roulette ───────────────────────────────────────────────── */

/* Header nav button */
.rlt-header-btn { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Welcome-screen button (family portrait) */
.rlt-welcome-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  background: var(--ink); color: var(--cream);
  border-radius: 999px; border: none;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.rlt-welcome-btn:hover { background: #3d2818; }
.rlt-welcome-sub {
  font-size: 0.78rem; opacity: 0.75;
  font-style: italic; display: block; margin-top: 2px;
}

/* ── Roulette page — scoped tokens ──────────────────────────── */
.roulette-view {
  --rlt-bg:          #fbf6ee;
  --rlt-paper:       #f6efe3;
  --rlt-paper-2:     #efe7d8;
  --rlt-ink:         #23180f;
  --rlt-ink-soft:    #4b4038;
  --rlt-muted:       #7b6f66;
  --rlt-line:        #ded6cb;
  --rlt-accent:      #1f4a38;
  --rlt-accent-soft: #e0ece2;
  --rlt-accent-ink:  #143527;
  --rlt-serif:       var(--serif);
  --rlt-shadow-lg:   0 24px 60px rgba(35,24,15,0.14);

  padding: 2.5rem clamp(1rem, 3vw, 2.5rem) 5rem;
  max-width: 1440px;
  margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 1.8rem;
}

/* Head */
.roul-head {
  position: relative;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0;
  max-width: 760px;
  margin: 0 auto; width: 100%;
}
.roul-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rlt-accent-ink); font-weight: 600;
}
.eyebrow-line {
  width: 36px; height: 1px;
  background: var(--rlt-accent); display: inline-block;
}
.roul-title {
  font-family: var(--rlt-serif);
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  line-height: 1.02; font-weight: 400;
  margin: 0.2rem 0 0; white-space: nowrap;
  color: var(--rlt-ink);
}
@media (max-width: 560px) { .roul-title { white-space: normal; } }
.roul-title em { font-style: normal; color: var(--rlt-accent); }
.roul-sub {
  font-family: var(--hand); font-weight: 500;
  font-size: 1.3rem; color: var(--rlt-ink-soft);
  max-width: 54ch; margin: 0.5rem 0 0; line-height: 1.45;
}
.roul-exit {
  position: absolute; right: 0; top: 0.8rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--rlt-muted); font-size: 0.8rem; font-weight: 500;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--rlt-line); border-radius: 999px;
  background: none; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.roul-exit:hover { color: var(--rlt-ink); border-color: var(--rlt-ink-soft); }

/* Filters */
.roul-filters {
  display: flex; flex-direction: column; gap: 0.55rem; align-items: center;
}
.roul-toggle-row {
  display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rlt-line);
  width: 100%; max-width: 600px;
}
.roul-filter-group { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.roul-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.83rem; font-weight: 500; border-radius: 999px;
  color: var(--rlt-ink-soft); background: var(--rlt-paper);
  border: 1px solid var(--rlt-line);
  cursor: pointer; transition: all 0.15s;
}
.roul-pill:hover { color: var(--rlt-ink); background: var(--rlt-paper-2); }
.roul-pill.is-active { background: var(--rlt-ink); color: var(--rlt-bg); border-color: var(--rlt-ink); }
/* Toggle pills (Q&E, Favorites) active: full accent fill — saturated badge vs dark-ink categorical badge */
.roul-pill.is-toggle-active { background: var(--rlt-accent); color: #fbf6ee; border-color: var(--rlt-accent-ink); }
.roul-pill.is-toggle-active:hover { background: var(--rlt-accent-ink); border-color: var(--rlt-accent-ink); }
.roul-pill.is-active:hover { background: var(--rlt-ink); opacity: 0.88; }
.roul-pill.is-zero { opacity: 0.45; }
.roul-pill-suffix {
  font-size: 0.68rem; padding: 1px 6px;
  background: rgba(0,0,0,0.08); border-radius: 999px;
}
.roul-pill.is-active .roul-pill-suffix,
.roul-pill.is-toggle-active .roul-pill-suffix { background: rgba(255,255,255,0.22); }

/* Count row */
.roul-count {
  display: flex; align-items: center; gap: 0.55rem;
  justify-content: center; font-size: 0.82rem; color: var(--rlt-muted);
}
.roul-count-num {
  font-family: var(--rlt-serif);
  font-size: 1.3rem;
  color: var(--rlt-accent); line-height: 1;
}
.roul-count-label { font-style: italic; }
.roul-clear {
  margin-left: 0.6rem; font-size: 0.76rem; color: var(--rlt-muted);
  text-decoration: underline; text-underline-offset: 3px;
  background: none; border: none; padding: 0; cursor: pointer;
}
.roul-clear:hover { color: var(--rlt-accent); }

/* Wheel stage */
.roul-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.6rem; padding: 1rem 0 0;
}
.wheel-wrap {
  position: relative;
  width: 520px; height: 520px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 30px 48px rgba(35,24,15,0.12));
}
.wheel-svg { width: 100%; height: 100%; display: block; }
.wheel-pointer {
  position: absolute; top: -14px; left: 50%;
  margin-left: -19px; z-index: 3;
  transform-origin: 19px 15px;
  filter: drop-shadow(0 3px 6px rgba(35,24,15,0.25));
}
.wheel-pointer.flick { animation: pflick 0.32s cubic-bezier(0.2, 2.2, 0.4, 1); }
@keyframes pflick {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .wheel-pointer.flick { animation: none; } }
/* Dashed registration ring behind wheel */
.wheel-wrap::after {
  content: ""; position: absolute; inset: 10px;
  border-radius: 50%; border: 1px dashed var(--rlt-line);
  pointer-events: none; z-index: -1;
}

/* Winning segment */
.rlt-seg-win { filter: brightness(1.12); animation: segWin 0.18s ease 0s 5 alternate; }
@keyframes segWin { from { opacity: 0.45; } to { opacity: 1; } }

/* Spin button */
.spin-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1.05rem 2.2rem;
  background: var(--rlt-ink); color: var(--rlt-bg);
  border-radius: 999px; border: none;
  font-family: var(--rlt-serif); font-size: 1.1rem; font-weight: 500;
  box-shadow: 0 10px 28px rgba(35,24,15,0.18);
  transition: transform 0.15s, background 0.15s, box-shadow 0.2s;
  min-width: 260px; cursor: pointer;
}
.spin-btn:hover:not(:disabled) {
  background: var(--rlt-accent); transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(190,86,61,0.3);
}
.spin-btn:disabled { cursor: default; opacity: 0.85; }
.spin-btn.is-spinning { background: var(--rlt-accent); }
.spin-btn-inner { display: inline-flex; align-items: center; gap: 0.55rem; }
.spin-dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  animation: rlt-blink 0.8s ease-in-out infinite;
}
@keyframes rlt-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* Empty state */
.roul-empty {
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  padding: 4rem 1rem; color: var(--rlt-muted); text-align: center;
  max-width: 40ch; margin: 0 auto;
}
.roul-empty p {
  font-family: var(--hand); font-weight: 500;
  font-size: 1.3rem; margin: 0; line-height: 1.5;
}

/* Result */
.roul-result-wrap {
  position: relative;
  margin-top: 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  animation: rlt-result-in 0.5s ease;
}
@keyframes rlt-result-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.roul-result-divider {
  display: flex; align-items: center; gap: 1rem;
  width: 100%; max-width: 720px;
  color: var(--rlt-muted); font-size: 0.72rem;
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
}
.roul-result-divider::before,
.roul-result-divider::after { content: ""; flex: 1; height: 1px; background: var(--rlt-line); }
.roul-result {
  display: grid; grid-template-columns: 260px 1fr;
  width: 100%; max-width: 720px;
  background: var(--rlt-paper); border: 1px solid var(--rlt-line);
  border-radius: 20px; overflow: hidden;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.15s;
}
.roul-result:hover { transform: translateY(-3px); box-shadow: var(--rlt-shadow-lg); border-color: var(--rlt-ink-soft); }
@media (max-width: 640px) { .roul-result { grid-template-columns: 1fr; } }
.roul-result-img {
  position: relative; background-size: cover; background-position: center;
  background-color: var(--rlt-paper-2); min-height: 260px;
}
.card-fav {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--rlt-accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(35,24,15,0.12);
}
.roul-result-body {
  padding: 1.4rem 1.6rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.roul-result-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rlt-accent-ink); font-weight: 600;
}
.roul-result-eyebrow em {
  text-transform: none; letter-spacing: 0.02em;
  font-style: normal; color: var(--rlt-muted); font-weight: 500;
}
.roul-result-title {
  font-family: var(--rlt-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 400;
  line-height: 1.05; color: var(--rlt-ink); margin: 2px 0;
}
.roul-result-desc {
  font-family: var(--hand); font-weight: 500;
  font-size: 1.15rem; color: var(--rlt-ink-soft); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.roul-result-meta {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.82rem; color: var(--rlt-muted);
  margin-top: 0.3rem; flex-wrap: wrap;
}
.roul-result-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.roul-result-meta .dot {
  width: 3px; height: 3px; background: currentColor;
  border-radius: 50%; opacity: 0.5; display: inline-block;
}
.roul-result-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.3rem; }
.roul-result-cta { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }

/* Confetti */
.rlt-confetti {
  position: absolute; top: -4px; left: 0; right: 0;
  height: 0; overflow: visible; pointer-events: none; z-index: 10;
}
.rlt-cfp {
  position: absolute; top: 0; border-radius: 2px;
  opacity: 0; animation: rltCfpFall linear forwards;
}
@keyframes rltCfpFall {
  0%   { transform: translateY(0)     rotate(0deg);   opacity: 1; }
  20%  { opacity: 1; }
  100% { transform: translateY(340px) rotate(800deg); opacity: 0; }
}

/* Mobile */
@media (max-width: 640px) {
  .roulette-view { gap: 1.2rem; }
  .roul-head { padding-top: 2.5rem; }
  .roul-exit { position: absolute; top: 0; right: 0; }
  .wheel-wrap { width: 320px; height: 320px; }
  .spin-btn { padding: 0.9rem 2rem; font-size: 1rem; min-width: 200px; }
  .roul-result-body { padding: 1rem 1.2rem 1.5rem; }
  .roul-result-title { font-size: 1.5rem; }
  .roul-result-img { min-height: 180px; }
  .roul-result-cta { flex-direction: column; }
  .roul-result-cta .primary-btn,
  .roul-result-cta .ghost-btn { width: 100%; justify-content: center; }
}

/* ── AI Photo Enhancement ───────────────────────────────────── */
.recipe-hero-image-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.enhance-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--accent);
  color: var(--cream);
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  letter-spacing: 0.02em;
  transition: background 0.15s, opacity 0.15s;
}
.enhance-btn:hover:not(:disabled) { background: var(--accent-d); }
.enhance-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.enhance-btn.loading { opacity: 0.75; }

.enhance-wrap { position: relative; align-self: flex-start; }
.enhance-style-pop {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 30;
  min-width: 230px;
  background: var(--paper, var(--cream));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(36, 29, 18, 0.18);
  padding: 0.35rem;
}
.enhance-style-head {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #8a8278);
  padding: 0.45rem 0.65rem 0.25rem;
}
.enhance-style-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.enhance-style-opt:hover { background: rgba(31, 74, 56, 0.08); }
.enhance-style-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}
.enhance-style-opt:hover .enhance-style-name { color: var(--accent); }
.enhance-style-desc {
  font-size: 0.74rem;
  color: var(--muted, #8a8278);
}

@keyframes enhanceSpin { to { transform: rotate(360deg); } }
.enhance-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: enhanceSpin 0.7s linear infinite;
  flex-shrink: 0;
}

.enhance-error {
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.3rem 0;
}

/* ── Comparison view ────────────────────────────────────────── */
.enhance-compare {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2.2rem;
  animation: toastIn 0.2s ease;
}

.enhance-compare-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.enhance-compare-title {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.enhance-stub-badge {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gold);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
}
.enhance-compare-dismiss {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.enhance-compare-dismiss:hover { background: var(--border); color: var(--ink); }

.enhance-compare-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.enhance-col {
  display: flex; flex-direction: column; gap: 0.6rem;
  align-items: center;
}
.enhance-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  background-color: var(--border);
  border-radius: 6px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.enhance-col-new .enhance-thumb {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(90,122,92,0.18), var(--shadow);
}
img.enhance-thumb-img {
  display: block;
  object-fit: cover;
  object-position: center;
}
.enhance-col-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.enhance-col-new .enhance-col-label { color: var(--sage); }

.enhance-use {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
}
.enhance-col .ghost-btn.enhance-use {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.enhance-col .ghost-btn.enhance-use:hover { border-color: var(--ink); }
.enhance-col-new .primary-btn.enhance-use {
  background: var(--sage);
}
.enhance-col-new .primary-btn.enhance-use:hover { background: #4a6b4c; }

@media (max-width: 520px) {
  .enhance-compare-cols { grid-template-columns: 1fr; }
}

/* ── Family Settings ────────────────────────────────────────── */
.family-settings {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 4rem;
}
.fam-settings-top {
  margin-bottom: 1.4rem;
}
.fam-set-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
}
.fam-set-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.fam-set-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.fam-set-title-editable {
  cursor: pointer;
}
.fam-set-title-editable:hover { color: var(--accent); }
.family-name-edit {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
}
.fam-set-hint {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.fam-set-create-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.1rem;
}
.fam-set-name-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.15s;
}
.fam-set-name-input:focus { border-color: var(--accent); }
.fam-set-rename-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}
.fam-set-error {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--accent);
}
.fam-set-invite .fam-set-hint { margin-top: 0.2rem; }
.fam-role-self {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.fam-member-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.fam-member-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.fam-member-row:last-child { border-bottom: none; }
.fam-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fam-member-info { flex: 1; min-width: 0; }
.fam-member-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fam-member-email {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fam-member-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.fam-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}
.fam-role-owner { background: #fdf0e8; color: var(--accent); }
.fam-role-member { background: #eef3f0; color: var(--sage); }
.fam-member-joined {
  font-size: 0.75rem;
  color: var(--muted);
}
.fam-remove-btn {
  flex-shrink: 0;
  margin-left: 0.25rem;
}
.no-family-prompt {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.no-family-prompt h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.no-family-prompt p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.2rem;
}

@media (max-width: 520px) {
  .fam-set-create-row { flex-direction: column; }
  .fam-member-meta { display: none; }
}

/* ── Invite page ────────────────────────────────────────────── */
.invite-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--cream);
}
.invite-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.invite-logo {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.8rem;
}
.invite-icon {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}
.invite-heading {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.invite-family-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.invite-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.6rem;
}
.invite-cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.invite-expires {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.invite-error {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.invite-clerk-widget {
  margin-top: 1.5rem;
  text-align: left;
}

/* ── Family invite list ─────────────────────────────────────── */
.fam-invite-success {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 600;
}
.fam-pending-invites {
  margin-top: 1.2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.fam-pending-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.fam-invite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fam-invite-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.fam-invite-row:last-child { border-bottom: none; }
.fam-invite-email {
  flex: 1;
  font-size: 0.9rem;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fam-invite-meta {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}
.fam-invite-action {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  flex-shrink: 0;
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1.2rem;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .app-header { flex-wrap: wrap; padding: 0.7rem 1rem; gap: 0.6rem; }
  .logo-btn { order: 1; flex: 1; }
  .wm-name { max-width: 52vw; }
  .wm-sub { display: none; }
  .header-nav { display: none; }
  .header-actions { order: 2; }
  .search-bar { order: 3; flex: 0 0 100%; max-width: none; }
  .list-label, .new-label { display: none; }
  .ghost-btn, .primary-btn { padding: 0.55rem; }
  .new-menu { right: -54px; }
  .tabbar { display: flex; }
  body { padding-bottom: 64px; }

  .family { grid-template-columns: 1fr; gap: 1.6rem; }
  .family-stats { gap: 1.5rem; }

  .recipe-hero { grid-template-columns: 1fr; gap: 1.4rem; }
  .recipe-hero-image { aspect-ratio: unset; height: 280px; }

  .recipe-body { grid-template-columns: 1fr; gap: 1.8rem; }
  .ing-panel { position: static; }

  .cook-body { grid-template-columns: 1fr; gap: 1rem; padding: 1.4rem; }
  .cook-timer { order: -1; }
  .timer-ring { width: 130px; height: 130px; }
  .timer-ring svg { width: 130px; height: 130px; }
  .timer-time { font-size: 1.6rem; }

  .cook-recipe-title { font-size: 0.95rem; }
  .cook-chip span { display: none; }

  .cook-nav { padding: 0.8rem 1rem; }
  .cook-btn { font-size: 0.78rem; padding: 0.7rem; min-height: 56px; }
  .cook-btn.ghost { flex: 0.8; }
  .cook-btn.mark { flex: 0.8; }
}

@media (max-width: 520px) {
  .home { padding: 1.2rem 1rem 3rem; }
  .recipe-view { padding: 1rem 1rem 3rem; }
  .grid { grid-template-columns: 1fr; }
  .recipe-stats { grid-template-columns: 1fr; gap: 0.5rem; }
  .cook-btn span { display: none; }
}

/* ── Meal Planner ────────────────────────────────────────────── */
.pl-view {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.4rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* Head row */
.pl-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pl-head-left { display: flex; flex-direction: column; gap: 0.3rem; }
.pl-back-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: none; color: var(--muted);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  padding: 0; margin-bottom: 0.2rem;
  letter-spacing: 0.02em;
}
.pl-back-btn:hover { color: var(--ink); }
.pl-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.pl-eyebrow-line { width: 28px; height: 1px; background: var(--accent); display: inline-block; }
.pl-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
}
.pl-title em { font-style: normal; color: var(--accent); }

/* Week nav */
.pl-weeknav {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 99px; padding: 0.3rem;
}
.pl-weeknav-btn {
  width: 32px; height: 32px;
  border-radius: 50%; border: none; background: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.pl-weeknav-btn:hover:not(:disabled) { background: var(--cream); color: var(--ink); }
.pl-weeknav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pl-weeknav-center { text-align: center; padding: 0 0.7rem; min-width: 190px; }
.pl-weeknav-range {
  font-family: var(--serif);
  font-size: 1rem; font-weight: 500; line-height: 1.1; color: var(--ink);
}
.pl-weeknav-today {
  font-size: 0.7rem; color: var(--muted); background: none; border: none;
  cursor: pointer; padding: 0; margin-top: 2px;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--border);
}
.pl-weeknav-today:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Summary bar */
.pl-summary {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 10px;
}
.pl-summary-stat { display: flex; align-items: baseline; gap: 0; flex-shrink: 0; flex-direction: column; }
.pl-summary-num {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 500; line-height: 1; color: var(--ink);
  display: inline;
}
.pl-summary-denom { font-size: 1.1rem; color: var(--muted); font-weight: 400; display: inline; }
.pl-summary-label {
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 4px;
}
.pl-summary-mid { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.pl-summary-track {
  height: 4px; background: var(--border); border-radius: 2px;
  position: relative; overflow: hidden;
}
.pl-summary-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width 0.4s ease;
}
.pl-summary-desc {
  font-family: var(--hand); font-weight: 500;
  font-size: 1.1rem; color: var(--muted);
}

/* Loading */
.pl-loading {
  text-align: center; padding: 3rem; color: var(--muted);
  font-family: var(--hand); font-weight: 500; font-size: 1.2rem;
}

/* Body layout */
.pl-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.2rem;
  align-items: start;
}
@media (max-width: 1100px) { .pl-body { grid-template-columns: 1fr; } }

/* Library sidebar */
.pl-library {
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.9rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  position: sticky; top: 80px;
  max-height: calc(100vh - 110px);
}
@media (max-width: 1100px) { .pl-library { position: static; max-height: none; } }
.pl-library-head {
  display: flex; justify-content: space-between; align-items: center;
}
.pl-library-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--ink);
}
.pl-library-count {
  font-size: 0.7rem; color: var(--muted);
  background: var(--cream); border-radius: 99px;
  padding: 2px 8px; font-family: ui-monospace, monospace;
}
.pl-library-search {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 99px; padding: 0.38rem 0.75rem; color: var(--muted);
}
.pl-library-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 0.85rem; color: var(--ink); font-family: inherit;
}
.pl-library-search input::placeholder { color: var(--muted); }
.pl-lib-clear {
  display: flex; color: var(--muted); padding: 2px;
  border-radius: 50%; background: none; border: none; cursor: pointer;
}
.pl-lib-clear:hover { color: var(--ink); }
.pl-library-hint {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; color: var(--muted); font-style: italic;
  padding: 0 0.1rem;
}
.pl-lib-dash-box {
  width: 20px; height: 13px;
  border: 1px dashed var(--border); border-radius: 3px;
  background: var(--cream); flex-shrink: 0;
}
.pl-library-list {
  display: flex; flex-direction: column; gap: 0.35rem;
  overflow-y: auto; padding-right: 2px; flex: 1;
}
.pl-library-empty {
  padding: 1.5rem 0.5rem; text-align: center;
  font-family: var(--hand); font-weight: 500; color: var(--muted); font-size: 1.1rem;
}

/* Library card */
.pl-lib-card {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 0.55rem; align-items: center;
  padding: 0.35rem; background: var(--cream);
  border: 1px solid var(--border); border-radius: 7px;
  cursor: grab; transition: all 0.15s;
}
.pl-lib-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.pl-lib-card:active { cursor: grabbing; opacity: 0.6; }
.pl-lib-thumb {
  width: 44px; height: 44px;
  background: var(--paper); border-radius: 5px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: var(--border); position: relative; flex-shrink: 0;
}
.pl-lib-fav {
  position: absolute; top: -3px; right: -3px;
  width: 14px; height: 14px;
  background: var(--cream); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); box-shadow: 0 1px 2px rgba(44,26,14,0.15);
}
.pl-lib-body { min-width: 0; }
.pl-lib-cat {
  font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 1px;
}
.pl-lib-name {
  font-family: var(--serif); font-size: 0.88rem; font-weight: 500;
  color: var(--ink); line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pl-lib-meta {
  font-size: 0.66rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.2rem; margin-top: 2px;
  font-family: ui-monospace, monospace;
}
.pl-lib-grip {
  display: grid; grid-template-columns: repeat(2, 3px); gap: 2px;
  padding: 4px; color: var(--border); align-self: center;
}
.pl-lib-grip span {
  width: 3px; height: 3px; background: currentColor; border-radius: 50%;
}
.pl-lib-card:hover .pl-lib-grip { color: var(--muted); }

/* Week grid */
.pl-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (max-width: 1400px) and (min-width: 1101px) {
  .pl-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
}
@media (max-width: 1100px) {
  .pl-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pl-week { grid-template-columns: 1fr; }
}

/* Day column */
.pl-day {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; min-height: 100%;
}
.pl-day.is-weekend { background: var(--cream); }
.pl-day.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 74, 56, 0.12);
}
.pl-day-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.65rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border); gap: 0.3rem;
}
.pl-day-name {
  font-family: var(--serif); font-size: 0.95rem; font-weight: 500;
  color: var(--ink); line-height: 1.1;
}
.pl-day-date {
  font-size: 0.65rem; color: var(--muted); margin-top: 2px;
  font-family: ui-monospace, monospace; letter-spacing: 0.02em;
}
.pl-today-badge {
  font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
  padding: 2px 6px; background: rgba(184, 74, 46, 0.1);
  border-radius: 99px; line-height: 1; white-space: nowrap; flex-shrink: 0;
}

.pl-day-slots { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem; flex: 1; }

.pl-slot { border-radius: 7px; }

/* Empty slot */
.pl-slot-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 74px;
  border: 1px dashed var(--border); border-radius: 7px;
  color: var(--muted); background: transparent; transition: all 0.15s;
  cursor: default;
}
.pl-slot-plus { font-size: 1.2rem; line-height: 1; color: var(--border); font-weight: 300; }
.pl-slot-label {
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

/* Filled slot card */
.pl-slot-card {
  animation: mealIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
  position: relative;
  min-height: 84px;
  border-radius: 7px;
  background-size: cover; background-position: center;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: grab;
}
.pl-slot-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.pl-slot-card:active { cursor: grabbing; }
.pl-slot-card-plain { background: var(--paper); }
.pl-slot-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.45rem 0.6rem 0.5rem;
  background: linear-gradient(transparent, rgba(44,26,14,0.72));
  color: #fff;
}
.pl-slot-card.pl-slot-card-plain .pl-slot-card-body {
  background: none; color: var(--ink); position: relative;
}
.pl-slot-card-meal {
  font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; opacity: 0.85;
}
.pl-slot-card-title {
  font-family: var(--serif); font-size: 0.88rem; font-weight: 500;
  line-height: 1.15; margin-top: 2px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pl-slot-card-meta {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.62rem; margin-top: 3px; opacity: 0.8;
  font-family: ui-monospace, monospace;
}

/* Home-page widget button */
.pl-widget-btn {
  display: flex; align-items: center; gap: 0.8rem;
  width: 100%; padding: 0.8rem 1rem;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 8px; color: var(--ink); cursor: pointer;
  text-align: left; transition: all 0.15s; margin-top: 0.5rem;
}
.pl-widget-btn:hover { border-color: var(--accent); background: var(--cream); }
.pl-widget-icon {
  width: 36px; height: 36px;
  background: rgba(184, 74, 46, 0.1); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.pl-widget-text { display: flex; flex-direction: column; gap: 1px; }
.pl-widget-label { font-weight: 700; font-size: 0.88rem; }
.pl-widget-sub { font-size: 0.75rem; color: var(--muted); }
.pl-widget-arrow { margin-left: auto; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .pl-head { flex-direction: column; align-items: flex-start; }
  .pl-summary { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}
@media (max-width: 640px) {
  .pl-view { padding: 1.2rem 1rem 3rem; }
  .pl-week { grid-template-columns: 1fr; }
  .pl-weeknav-center { min-width: 150px; }
}

/* ── iOS Safari zoom prevention ──────────────────────────────── */
/* iOS auto-zooms the viewport when focusing inputs < 16px. Desktop  */
/* sizes (0.9rem etc.) are preserved; only mobile gets the 16px floor. */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px; }
}


/* ── v2 collection: flip cards, index view, paging (Phase 3a) ── */
.grid { perspective: 1400px; gap: 26px 24px !important; }
.vcard {
  position: relative; cursor: pointer; will-change: transform;
  animation: dealIn 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes dealIn {
  from { opacity: 0; transform: translateY(36px) rotate(2deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}
.vcard .cin {
  position: relative; transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.18, 1);
}
.vcard.flipped .cin { transform: rotateY(180deg); }
.vcard .face {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 10px;
  padding: 10px 10px 16px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.vcard:hover .face {
  box-shadow: 0 14px 30px rgba(36,29,18,0.1);
  border-color: var(--border);
}
.vcard .face.back {
  position: absolute; inset: 0; transform: rotateY(180deg);
  overflow: hidden; display: flex; flex-direction: column;
  background: repeating-linear-gradient(to bottom, var(--paper) 0 23px, #ece1c6 23px 24px);
}
.vcard .v-img {
  aspect-ratio: 16/10; border-radius: 7px; position: relative;
  background-size: cover; background-position: center;
}
.vcard .v-lined-face {
  background: repeating-linear-gradient(to bottom, var(--paper) 0 22px, var(--border) 22px 23px);
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
}
.vcard .v-hand-note {
  font-family: var(--hand); font-weight: 600; font-size: 1.2rem; line-height: 1.4;
  color: var(--ink-2); padding: 10px 16px; text-align: center; margin: 0;
}
.vcard .v-no {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em;
  color: var(--stamp); text-transform: uppercase; margin: 10px 0 2px;
}
.vcard .v-title { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; line-height: 1.25; margin: 0; }
.vcard .v-by { font-size: 0.78rem; color: var(--muted); margin: 3px 0 0; }
.vcard .v-note {
  font-family: var(--hand); font-weight: 500; font-size: 1.05rem;
  color: var(--ink-2); margin: 7px 0 0; line-height: 1.35;
}
.vcard .card-quick { position: absolute; bottom: 8px; left: 8px; }
.corner-btn {
  position: absolute; z-index: 2; top: 18px;
  width: 33px; height: 33px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(253,248,236,0.94); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s; box-shadow: 0 2px 6px rgba(36,29,18,0.12);
}
.corner-btn:hover { transform: scale(1.12); }
.heart-btn { right: 16px; color: var(--stamp); }
.heart-btn.loved { color: var(--stamp); }
.flip-btn { right: 56px; }
.vcard .face.back .flip-btn { top: 10px; right: 10px; background: var(--cream); }
.vcard.lined .flip-btn { right: 56px; }
.vb-head { font-family: var(--serif); font-size: 0.98rem; margin: 4px 6px 0; }
.vb-sub {
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--stamp); font-weight: 700; margin: 2px 6px 6px;
}
.vb-notes { flex: 1; overflow-y: auto; padding: 0 6px; }
.vb-n {
  font-family: var(--hand); font-weight: 500; font-size: 1.04rem; line-height: 23px;
  color: var(--ink-2); margin: 0 0 4px;
}
.vb-n .who { color: var(--stamp); font-weight: 600; }
.vb-open {
  margin: 8px 6px 4px; align-self: flex-start;
  font-family: inherit; font-size: 0.74rem; font-weight: 700;
  background: none; border: none; color: var(--accent); cursor: pointer;
  border-bottom: 1.5px solid var(--accent); padding: 0 0 2px;
}

/* index view */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; align-self: center; }
.view-toggle button {
  border: none; background: var(--paper); color: var(--muted); cursor: pointer;
  padding: 7px 14px; font-size: 0.74rem; font-weight: 700; font-family: inherit;
}
.view-toggle button.on { background: var(--accent); color: var(--paper); }
.results .section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.index-list { display: block; }
.irow {
  display: grid; grid-template-columns: 72px 1fr auto auto 26px; gap: 14px;
  align-items: baseline; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 11px 12px; border-radius: 5px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  transition: background 0.18s; color: var(--ink);
}
.irow:hover { background: var(--paper); }
.irow .i-no { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; color: var(--stamp); }
.irow .i-t { font-family: var(--serif); font-size: 0.98rem; }
.irow .i-by, .irow .i-time { font-size: 0.78rem; color: var(--muted); }
.irow .i-loved { font-size: 0.8rem; color: var(--stamp); text-align: center; }
.show-more { display: block; margin: 28px auto 0; }

@media (max-width: 640px) {
  .irow { grid-template-columns: 58px 1fr 26px; }
  .irow .i-by, .irow .i-time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vcard { animation: none; }
  .vcard .cin { transition: none; }
}


/* ── Phase 4: apron rail + avatar picker ── */
.av-mark {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--paper);
  font-family: var(--serif); flex: none;
}
.rail-scene { max-width: 760px; margin: 26px auto 0; }
.apron-bar {
  height: 14px; border-radius: 7px; position: relative; z-index: 1;
  background: linear-gradient(#56422c, #3a2c1b);
  box-shadow: 0 5px 14px rgba(36,29,18,0.3);
}
.apron-bar .screw {
  position: absolute; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: inset 0 -1.5px 0 #8a6418;
}
.apron-bar .screw.l { left: 10px; } .apron-bar .screw.r { right: 10px; }
.hooks { display: grid; grid-template-columns: repeat(4, 1fr); }
.hookslot { display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; }
.hookslot .hook { margin-top: -4px; z-index: 2; line-height: 0; }
.apron-wrap {
  background: none; border: none; padding: 0; cursor: default;
  margin-top: -13px; width: clamp(80px, 16vw, 132px); line-height: 0;
}
.hookslot.is-me .apron-wrap, .hookslot.free .apron-wrap { cursor: pointer; }
.apron-wrap svg { width: 100%; filter: drop-shadow(0 9px 12px rgba(36,29,18,0.18)); transition: transform 0.3s; transform-origin: 50% 0; }
.hookslot.is-me .apron-wrap:hover svg, .hookslot.free .apron-wrap:hover svg { transform: rotate(-3deg); }
.hs-name { font-family: var(--serif); font-size: 0.92rem; margin: 8px 0 2px; }
.hs-meta { font-size: 0.7rem; color: var(--muted); margin: 0; }
.hs-pick { font-family: var(--hand); font-weight: 600; font-size: 0.98rem; color: var(--stamp); margin: 4px 0 0; }
.hookslot .fam-remove-btn { position: absolute; top: 8px; right: 6px; }

.av-modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(36,29,18,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.av-panel {
  background: var(--paper); border-radius: 12px; padding: 26px;
  width: min(480px, 100%); position: relative;
  box-shadow: var(--shadow-lg);
}
.av-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--paper); cursor: pointer; color: var(--ink-2);
}
.av-panel h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: 0 0 2px; }
.av-sub { font-family: var(--hand); font-weight: 500; font-size: 1.15rem; color: var(--muted); margin: 0 0 18px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 11px; }
.av-opt {
  aspect-ratio: 1; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform 0.18s, border-color 0.18s;
}
.av-opt:hover { transform: scale(1.1); }
.av-opt.picked { border-color: var(--ink); }
.av-opt:disabled { opacity: 0.6; }
.av-opt svg { width: 52%; height: 52%; }
.av-err { color: #a32d2d; font-size: 0.85rem; margin-top: 12px; }

@media (max-width: 640px) {
  .hooks { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .apron-bar { display: none; }
  .hookslot .hook { margin-top: 0; }
}


/* ── Phase 5: the family verdict ── */
.verdict-section { background: var(--cream); border-radius: 8px; padding: 1.2rem 1.3rem; margin-top: 1.6rem; }
.verdict-section .panel-head h2 { font-family: var(--serif); font-weight: 400; }
.verdict-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0.6rem 0; }
.verdict-marks { display: flex; }
.verdict-marks .av-mark { border: 2px solid var(--paper); margin-left: -7px; }
.verdict-marks .av-mark:first-child { margin-left: 0; }
.verdict-hint { font-size: 0.82rem; color: var(--muted); }
.verdict-note {
  font-family: var(--hand); font-weight: 500; font-size: 1.12rem;
  color: var(--ink-2); margin: 0.35rem 0; line-height: 1.4;
}
.verdict-note .who { color: var(--stamp); font-weight: 600; }
.verdict-vote { display: inline-flex; align-items: center; gap: 8px; margin-top: 0.6rem; }
.verdict-mine { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 0.7rem; }
.verdict-you { font-family: var(--hand); font-weight: 600; font-size: 1.15rem; color: var(--stamp); }

@keyframes mealIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .pl-slot-card { animation: none; } }

.v-by-mark { vertical-align: -4px; margin-right: 6px; }
.note-mark { margin-right: 7px; }
.note-head { display: flex; align-items: center; }

/* ── 3b hearts + hero declutter ── */
.heart-ct {
  position: absolute; bottom: -4px; right: -4px;
  background: var(--stamp); color: var(--paper);
  font-size: 0.62rem; font-weight: 700; line-height: 1;
  padding: 3px 5px; border-radius: 9px;
}
.hero-acts { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.hero-act {
  flex: 1; min-width: 180px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 26px; cursor: pointer;
  font-family: inherit; font-size: 0.88rem; font-weight: 700; color: var(--ink-2);
  padding: 13px 18px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
}
.hero-act:hover {
  border-color: var(--accent); color: var(--accent-d);
  transform: translateY(-2px); box-shadow: 0 10px 22px rgba(36,29,18,0.08);
}
.hero-act svg { color: var(--accent); }

/* ── Planner interactions ── */
.pl-lib-card { cursor: grab; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s; }
.pl-lib-card:active { cursor: grabbing; }
.pl-lib-card.is-picked {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,74,56,0.18);
  transform: translateX(3px);
}
.pl-library-hint.is-active { color: var(--accent); font-weight: 700; }
.pl-slot-empty { width: 100%; font-family: inherit; cursor: default; }
.pl-slot-empty.can-place, .pl-slot-card { cursor: pointer; }
.pl-slot-empty.is-over, .pl-slot-empty.can-place:hover {
  border-color: var(--accent); border-style: solid;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
}
.pl-slot-card.is-over { outline: 2px solid var(--accent); outline-offset: 1px; }
.pl-slot-x {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(253,248,236,0.92); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.pl-slot-card:hover .pl-slot-x { opacity: 1; }
@media (hover: none) { .pl-slot-x { opacity: 1; } }
.pl-tools { display: flex; align-items: center; gap: 14px; margin: 0 0 1.1rem; flex-wrap: wrap; }
.pl-shop-btn { display: inline-flex; align-items: center; gap: 8px; }
.pl-save-err { font-family: var(--hand); font-weight: 600; font-size: 1.05rem; color: #a32d2d; }
