/* Cooking with Elio — site styles */

:root {
  --bg: #110f0d;
  --bg-raised: #15120f;
  --surface: #1b1815;
  --surface-2: #231f1b;
  --line: #2d2823;
  --line-2: #3d362f;
  --text: #efe8dd;
  --text-2: #bdb2a3;
  --muted: #8b8176;
  --accent: #e5775e;          /* terracotta, for text & accents */
  --accent-strong: #b93d2a;   /* cardinal red, for filled buttons */
  --accent-soft: rgba(229, 119, 94, 0.14);
  --gold: #d7b46f;

  /* Il Tricolore: official Italian flag colours */
  --it-green: #009246;
  --it-white: #f1f2f1;
  --it-red: #ce2b37;
  --tricolore: linear-gradient(90deg, var(--it-green) 0 33.333%, var(--it-white) 33.333% 66.666%, var(--it-red) 66.666% 100%);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --header-h: 64px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 72px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-strong); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent-strong); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.eyebrow {
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.lede { color: var(--text-2); font-size: 1.075rem; max-width: 56ch; }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold); }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 0.95rem/1 var(--sans);
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #cf4a35; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn:active { transform: translateY(1px); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font: 500 0.8rem var(--sans); cursor: pointer; }
.link-btn:hover { color: var(--accent); }

/* ── Header ──────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 15, 13, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
/* Tricolore stripe along the top of every page */
.site-header::before { content: ''; display: block; height: 4px; background: var(--tricolore); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font: 500 1.25rem/1 var(--serif); white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #000; box-shadow: 0 0 0 1px var(--line-2); }
.brand em, .footer-brand em { font-style: italic; color: var(--gold); font-weight: 400; }
.brand:hover { color: var(--text); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--text-2); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.site-nav .nav-cta { margin-left: 8px; border: 1px solid var(--line-2); color: var(--text); }
.site-nav .nav-cta:hover { border-color: var(--accent); background: transparent; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 7px; cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0,0,0,.45);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ── Hero ────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(600px 380px at 18% 40%, rgba(185, 61, 42, 0.18), transparent 70%),
    radial-gradient(500px 300px at 85% 0%, rgba(215, 180, 111, 0.07), transparent 70%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.portrait { margin: 0; position: relative; }
.portrait img {
  width: 100%; border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 10px rgba(255,255,255,0.02);
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); font-weight: 500; letter-spacing: -0.02em; }
.dates { font: italic 400 clamp(1.05rem, 2vw, 1.3rem)/1.4 var(--serif); color: var(--gold); margin: 12px 0 22px; }

/* Small flag rule, e.g. under Elio's name */
.flag-rule { display: block; width: 84px; height: 5px; margin-top: 18px; border-radius: 3px; background: var(--tricolore); }
.flag-rule--sm { width: 42px; height: 4px; margin: 0 0 14px; }
@media (max-width: 640px) { .hero .flag-rule { margin-inline: auto; } }
.motto { font: italic 400 1.15rem/1.3 var(--serif); color: var(--gold); margin: 0 0 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (max-width: 640px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .portrait { width: 180px; }
  .hero .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* ── Recipe index ────────────────────────── */
.recipes { padding-bottom: 80px; }
.toolbar {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 0;
  margin-bottom: 8px;
  background: linear-gradient(var(--bg) 80%, rgba(17,15,13,0));
}
.search {
  flex: 1 1 280px; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 0 16px; color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 400 0.95rem var(--sans); padding: 12px 0; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; text-decoration: none; white-space: nowrap;
  color: var(--text-2); font-size: 0.85rem; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover, .chip.active { color: var(--text); border-color: var(--line-2); background: var(--surface); }
@media (max-width: 640px) { .search { max-width: none; } .chips { width: 100%; } }

.no-results { color: var(--text-2); padding: 40px 0; text-align: center; }

.category { padding-top: 40px; }
.category-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.category-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.category-head .it { font-size: 0.6em; margin-left: 8px; }
.count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; height: 100%; min-height: 168px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: transform .25s ease, border-color .25s, background .25s, box-shadow .25s;
}
.card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--line-2); background: var(--surface-2); box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); }
.card::after {
  content: ''; position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px;
  background: var(--tricolore); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.card:hover::after { transform: scaleX(1); }
.card-num { font: italic 400 0.9rem/1 var(--serif); color: var(--muted); margin-bottom: 14px; }
.card-title { font: 500 1.3rem/1.2 var(--serif); }
.card-sub { font: italic 400 0.98rem/1.35 var(--serif); color: var(--gold); margin-top: 4px; }
.card-meta { margin-top: auto; padding-top: 18px; font-size: 0.8rem; color: var(--muted); }
.card-img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .32; transition: opacity .3s, transform .5s; }
.card--photo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(27,24,21,.2), rgba(27,24,21,.92) 75%); }
.card--photo:hover .card-img { opacity: .45; transform: scale(1.04); }

/* ── Recipe page ─────────────────────────── */
.recipe { padding-top: 28px; padding-bottom: 80px; }
.crumbs { display: flex; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.recipe-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.recipe-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); letter-spacing: -0.02em; max-width: 20ch; }
.recipe-sub { font: italic 400 clamp(1.15rem, 2.4vw, 1.45rem)/1.3 var(--serif); color: var(--gold); margin: 10px 0 0; }
.recipe-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; color: var(--text-2); font-size: 0.9rem; }
.recipe-meta span + span::before { content: '·'; margin-right: 16px; color: var(--muted); }
.recipe-meta .btn { margin-left: auto; }

.recipe-photo { margin: 0 0 40px; }
.recipe-photo img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.recipe-photo figcaption { margin-top: 10px; font: italic 0.9rem var(--serif); color: var(--muted); }

.recipe-body { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .recipe-body { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.ingredients { position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 860px) { .ingredients { position: static; } }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.recipe-body h2 { font-size: 1.5rem; }
.recipe-body h3 { font: italic 500 1.1rem var(--serif); color: var(--gold); margin: 22px 0 6px; }
.method > h2 { margin-bottom: 8px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; cursor: pointer; font-size: 0.95rem; line-height: 1.45; }
.checklist input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 18px; height: 18px; margin: 2px 0 0;
  border: 1.5px solid var(--line-2); border-radius: 5px;
  display: grid; place-content: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.checklist input::after {
  content: ''; width: 10px; height: 6px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.checklist input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.checklist input:checked::after { transform: rotate(-45deg) scale(1); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.checklist label:hover input:not(:checked) { border-color: var(--text-2); }

.steps { list-style: none; padding: 0; margin: 12px 0 0; }
.steps li {
  position: relative; counter-increment: step;
  padding: 16px 0 16px 56px; border-bottom: 1px solid var(--line);
  font-size: 1.04rem; line-height: 1.7; color: var(--text);
  cursor: pointer; transition: opacity .2s;
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font: 500 1rem/1 var(--serif); color: var(--accent);
  border: 1px solid var(--line-2); background: var(--bg);
  transition: background .2s, color .2s, border-color .2s;
}
.steps li.done { opacity: .45; }
.steps li.done::before { content: '✓'; background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.steps strong { color: var(--accent); font-weight: 600; }

.note {
  margin: 28px 0 0; padding: 18px 22px;
  border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 12px 12px 0;
  font: italic 400 1.05rem/1.6 var(--serif); color: var(--text-2);
}
.tip { margin-top: 28px; font-size: 0.85rem; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 64px; }
.pager-link {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font: 500 1.08rem/1.3 var(--serif);
  transition: border-color .2s, background .2s;
}
.pager-link small { display: block; font: 500 0.72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pager-link svg { flex: none; color: var(--accent); }
.pager-link:hover { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.pager-next { justify-content: flex-end; text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }

.more { margin-top: 48px; }
.more h2 { font-size: 1.15rem; color: var(--text-2); margin-bottom: 14px; }
.more ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.more a { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 0.9rem; }
.more a:hover { color: var(--text); border-color: var(--line-2); }
.more a[aria-current="page"] { color: var(--accent); border-color: var(--accent); pointer-events: none; }

/* ── Simple pages / form ─────────────────── */
.page { padding-top: clamp(40px, 7vw, 80px); padding-bottom: 96px; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.page.center .lede { margin-inline: auto; }

.form { margin-top: 32px; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 0.85rem; font-weight: 500; color: var(--text-2); padding: 0; }
.field legend { margin-bottom: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.radios { display: flex; gap: 24px; }
.radios label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radios input { accent-color: var(--accent-strong); width: 18px; height: 18px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 4px; }
.hint { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* ── Footer ──────────────────────────────── */
.site-footer { background: var(--bg-raised); color: var(--muted); font-size: 0.88rem; }
.site-footer::before { content: ''; display: block; height: 4px; background: var(--tricolore); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-block: 40px; }
.footer-inner p { margin: 0 0 6px; }
.footer-brand { font: 500 1.15rem var(--serif); color: var(--text); }
.footer-credit { max-width: 440px; }
.footer-credit a { color: var(--text-2); }
.footer-credit a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ── Print: clean, light recipe card ─────── */
@media print {
  :root { --text: #111; --text-2: #333; --muted: #666; --gold: #555; --accent: #111; --line: #ccc; --line-2: #bbb; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .site-header, .site-footer, .crumbs, .pager, .more, .tip, .recipe-meta .btn, .link-btn, .skip { display: none !important; }
  .recipe { padding: 0; }
  .recipe-head { margin-bottom: 16pt; padding-bottom: 12pt; }
  .recipe-head h1 { font-size: 24pt; max-width: none; }
  .recipe-photo { display: none; }
  .recipe-body { grid-template-columns: 2fr 3fr; gap: 24pt; }
  .panel { background: none; border: 0; padding: 0; }
  .ingredients { position: static; }
  .checklist input { display: none; }
  .checklist label { padding: 3pt 0; }
  .checklist li { border: 0; }
  .checklist li span::before { content: '•  '; color: #999; }
  .checklist input:checked + span { text-decoration: none; color: #111; }
  .steps li { padding: 6pt 0 6pt 28pt; opacity: 1 !important; font-size: 11pt; break-inside: avoid; }
  .steps li::before { content: counter(step) !important; width: 18pt; height: 18pt; top: 6pt; font-size: 10pt; background: #fff !important; color: #111 !important; border-color: #999 !important; }
  .note { background: none; }
  a { color: inherit; text-decoration: none; }
}

/* ── Family notes ────────────────────────── */
[hidden] { display: none !important; }

.notes { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.notes-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px; margin-bottom: 24px; }
.notes-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.notes-head .eyebrow { margin-bottom: 10px; }
.notes-intro { color: var(--text-2); margin: 0; max-width: 46ch; }

.notes-list { display: grid; gap: 12px; margin-bottom: 28px; }
.notes-empty { color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.05rem; margin: 0; padding: 8px 0; list-style: none; }
.note-item { padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; font-size: 0.85rem; }
.note-by { font-weight: 600; color: var(--text); }
.note-date { color: var(--muted); }
.note-text { margin: 0; white-space: pre-line; line-height: 1.65; overflow-wrap: anywhere; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 0.7rem/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; }
.badge--tip { color: var(--accent); }
.badge--substitution { color: #7fbf8e; }
.badge--memory { color: var(--gold); }
.badge--note { color: var(--text-2); }

.notes-form { display: grid; gap: 16px; }
.notes-form h3 { font: 500 1.25rem var(--serif); color: var(--text); margin: 0; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind span {
  display: inline-block; cursor: pointer; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-2); font-size: 0.85rem; font-weight: 500;
  transition: color .2s, border-color .2s, background .2s;
}
.kind span:hover { color: var(--text); }
.kind input:checked + span { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.notes-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.notes-form-row .field { flex: 1 1 220px; }
.notes-form-row .btn { padding-block: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notes-status { margin: 0; font-size: 0.92rem; min-height: 1.4em; color: var(--text-2); }
.notes-status.ok { color: #7fbf8e; }
.notes-status.err { color: var(--accent); }
.notes-form .hint { margin-top: -8px; }
.btn:disabled { opacity: .6; cursor: progress; }

/* Admin */
.admin-login { max-width: 420px; }
.admin-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 20px; }
.admin-tabs .chip { background: none; cursor: pointer; font-family: var(--sans); }
.admin-tabs .link-btn { margin-left: auto; }
.admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.admin-recipe { display: inline-block; font: 500 1.1rem var(--serif); color: var(--text); text-decoration: none; margin-bottom: 8px; }
.admin-recipe:hover { color: var(--accent); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-danger:hover { border-color: var(--accent); color: var(--accent); }
.admin-photo { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; margin-top: 14px; }
.admin-photo img { display: block; width: 168px; height: 126px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); }
.admin-photo a:hover img { box-shadow: 0 0 0 2px var(--accent); }
.admin-photo-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge--cover { color: var(--accent); background: var(--accent-soft); }
.badge--promoted { color: var(--gold); }

/* ── Photos: recipe background, gallery, note photos ── */
.recipe-head.has-cover {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(360px, 54vw, 540px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 4vw, 44px); border: 0; border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0,0,0,.8);
}
.recipe-cover { position: absolute; inset: 0; z-index: -1; background: var(--surface); }
.recipe-cover img { width: 100%; height: 100%; object-fit: cover; animation: cover-in .8s ease both; }
.recipe-cover::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(17,15,13,.97) 0%, rgba(17,15,13,.82) 30%, rgba(17,15,13,.25) 68%, rgba(17,15,13,.45) 100%);
}
@keyframes cover-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.recipe-head.has-cover h1 { text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.cover-zoom {
  position: absolute; top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(17,15,13,.6); color: var(--text); border: 1px solid rgba(255,255,255,.18);
  font: 500 0.82rem var(--sans); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.cover-zoom:hover { background: rgba(17,15,13,.85); border-color: rgba(255,255,255,.4); }

.recipe-gallery { margin: -12px 0 40px; }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gallery-head h2 { font: italic 500 1.2rem var(--serif); color: var(--gold); }
.gallery-strip { list-style: none; padding: 0 0 6px; margin: 0; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; }
.gallery-strip li { flex: none; scroll-snap-align: start; }
.gallery-thumb, .note-photo {
  display: block; padding: 0; border: 0; cursor: zoom-in; border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow .2s, transform .2s;
}
.gallery-thumb:hover, .note-photo:hover { box-shadow: 0 0 0 2px var(--accent); transform: translateY(-2px); }
.gallery-thumb.is-cover { box-shadow: 0 0 0 2px var(--gold); }
.gallery-thumb img { display: block; width: 132px; height: 100px; object-fit: cover; }
.note-photo { margin-top: 12px; }
.note-photo img { display: block; width: 220px; max-width: 100%; height: 165px; object-fit: cover; }

.photo-field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.photo-pick {
  position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px dashed var(--line-2); color: var(--text-2);
  font-size: 0.88rem; font-weight: 500; transition: color .2s, border-color .2s;
}
.photo-pick:hover, .photo-pick:focus-within { color: var(--text); border-color: var(--accent); }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-preview { display: flex; align-items: center; gap: 14px; }
.photo-preview img { width: 112px; height: 84px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); }

/* Lightbox */
html.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(10,9,8,.96); color: var(--text); overflow: hidden;
}
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lb-stage { position: absolute; inset: 0 0 72px; overflow: auto; display: flex; overscroll-behavior: contain; scrollbar-width: none; }
.lb-stage::-webkit-scrollbar { display: none; }
.lb-img {
  flex: none; margin: auto; display: block; max-width: calc(100% - 32px); max-height: calc(100% - 32px);
  border-radius: 8px; cursor: zoom-in; user-select: none; -webkit-user-select: none;
}
.lightbox.zoomed .lb-img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; }
.lightbox.zoomed .lb-stage { cursor: grab; }
.lightbox.zoomed .lb-stage:active { cursor: grabbing; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 72px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lb-cap { margin: 0; font: italic 400 0.98rem/1.35 var(--serif); color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lb-count { flex: none; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(17,15,13,.7); color: var(--text); border: 1px solid rgba(255,255,255,.16); cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: rgba(40,35,30,.9); border-color: rgba(255,255,255,.4); }
.lb-close { top: 16px; right: 16px; }
.lb-zoom { top: 16px; right: 72px; }
.lb-prev, .lb-next { top: calc(50% - 36px); transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: 84px; transform: none; }
  .lb-bar { padding: 0 16px; }
  .cover-zoom span { display: none; }
  .cover-zoom { padding: 10px; }
}

@media print {
  .recipe-cover, .cover-zoom, .recipe-gallery, .note-photo, .lightbox { display: none !important; }
  .recipe-head.has-cover { min-height: 0; padding: 0 0 12pt; border-radius: 0; box-shadow: none; display: block; }
  .notes-form, .notes-empty, .notes:not(:has(.note-item)) { display: none !important; }
  .notes { margin-top: 24pt; padding-top: 12pt; }
  .note-item { background: none; border: 0; border-left: 2px solid #ccc; border-radius: 0; padding: 4pt 0 4pt 10pt; break-inside: avoid; }
}
