:root {
  --bg: #f6faf8;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef5f2;
  --text: #26332f;
  --muted: #7d8c87;
  --border: #e0ebe7;
  --brand: #5ec6a8;
  --brand-strong: #2b8a6b;
  --brand-dark: #256b55;
  --brand-soft: #e3f6ef;
  --on-brand: #ffffff;
  --accent: #6aa9e0;
  --accent-dark: #2f6693;
  --accent-soft: #e6f1fb;
  --warn-dark: #8a6a1f;
  --shadow: 0 2px 4px rgba(40, 60, 55, .05), 0 10px 26px rgba(40, 60, 55, .07);
  --shadow-sm: 0 1px 2px rgba(40, 60, 55, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --maxw: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* pastel pill tints */
  --pastel-mint-bg: #dff3ea;   --pastel-mint-text: #2f7d61;
  --pastel-sky-bg: #e2eefb;    --pastel-sky-text: #3b6ea5;
  --pastel-amber-bg: #fbf0d9;  --pastel-amber-text: #8a6a1f;
  --pastel-coral-bg: #fbe6e3;  --pastel-coral-text: #a8544c;
  --pastel-teal-bg: #d9f0ec;   --pastel-teal-text: #2b7d74;
  --pastel-lav-bg: #ece7f8;    --pastel-lav-text: #6b5aa5;
  --pastel-slate-bg: #e9efed;  --pastel-slate-text: #4a5a55;
}

:root[data-theme="dark"] {
  --bg: #1b2321;
  --bg-alt: #222b28;
  --surface: #26302d;
  --surface-2: #2e3a36;
  --text: #eef4f1;
  --muted: #9dada8;
  --border: #38443f;
  --brand: #72d6b4;
  --brand-strong: #6ccba9;
  --brand-dark: #9beccf;
  --brand-soft: #223b32;
  --on-brand: #10231c;
  --accent: #8cc4ef;
  --accent-dark: #a9d3f5;
  --accent-soft: #22344a;
  --warn-dark: #f0d79a;
  --shadow: 0 2px 4px rgba(0, 0, 0, .28), 0 12px 30px rgba(0, 0, 0, .38);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);

  /* pastel pill tints */
  --pastel-mint-bg: #23443a;   --pastel-mint-text: #9fe0c6;
  --pastel-sky-bg: #223a4d;    --pastel-sky-text: #a9d1f2;
  --pastel-amber-bg: #443721;  --pastel-amber-text: #e8cb8a;
  --pastel-coral-bg: #46302d;  --pastel-coral-text: #f0a89f;
  --pastel-teal-bg: #1f3d3a;   --pastel-teal-text: #93d8cf;
  --pastel-lav-bg: #332e46;    --pastel-lav-text: #c3b6ec;
  --pastel-slate-bg: #2c3833;  --pastel-slate-text: #b8c6c0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand-dark); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--brand); color: var(--on-brand); padding: .7em 1em; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; min-height: var(--header-h);
  display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-mark { font-size: 1.7rem; line-height: 1; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .68rem; }
.search {
  position: relative; flex: 1; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 0 .9rem; max-width: 540px; margin: 0 auto;
}
.search-icon { opacity: .5; font-size: .9rem; }
.search input {
  border: 0; background: none; font: inherit; color: var(--text);
  padding: .6rem .8rem; width: 100%; outline: none;
}
.search-clear { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: .9rem; padding: .3rem; }
.header-actions { display: flex; gap: .3rem; margin-left: auto; }
.icon-btn {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 50%; width: 42px; height: 42px; font-size: 1.05rem;
  cursor: pointer; display: grid; place-items: center; color: var(--text);
  transition: transform .12s ease, background .12s ease;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.badge {
  position: absolute; top: -4px; right: -4px; background: var(--brand); color: var(--on-brand);
  font-size: .65rem; border-radius: 999px; padding: 0 .35em; min-width: 1.2em;
  line-height: 1.4em; text-align: center; font-weight: 600;
}

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem 4rem; }

.hero {
  padding: 3.6rem .25rem 2rem; text-align: center; max-width: 640px; margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: -.035em;
  line-height: 1.05;
  margin-bottom: .6rem;
}
.hero p { color: var(--muted); font-size: 1.1rem; }
.hero p strong { color: var(--text); }
.hero .hero-hint { min-height: 1.2em; font-size: .9rem; margin-top: .8rem; }

.pantry {
  display: flex; gap: .5rem; margin-top: 1.6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .35rem .35rem .35rem 1.2rem; box-shadow: var(--shadow-sm);
}
.pantry input {
  flex: 1; font: inherit; font-size: 1.05rem; border: 0; background: none;
  color: var(--text); outline: none; min-width: 0; padding: .7rem 0;
}
.pantry .btn { flex-shrink: 0; }
@media (max-width: 520px) {
  .pantry { flex-direction: column; border-radius: var(--radius); padding: .6rem; }
  .pantry input { padding: .5rem .3rem; }
}

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; border-radius: 999px; padding: .6rem 1.1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ---------- Chips (active filters, diet badges) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--brand-soft); color: var(--brand-dark); border: 1px solid transparent;
  border-radius: 999px; padding: .35rem .7rem; font-size: .82rem; font-weight: 500;
}

/* ---------- Results ---------- */
.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin: .4rem 0 .9rem; padding: 0 .25rem;
}
#results-count { margin: 0; font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.active-filters .chip { background: var(--accent-soft); color: var(--accent-dark); }
.active-filters .chip button { background: none; border: 0; color: inherit; cursor: pointer; font-weight: 700; padding: 0 .2rem; }

.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-emoji { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.card-badges { position: absolute; top: .5rem; left: .5rem; right: .5rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.pill {
  font-size: .68rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px;
  background: var(--pastel-slate-bg); color: var(--pastel-slate-text);
}
.pill.easy { background: var(--pastel-mint-bg); color: var(--pastel-mint-text); }
.pill.medium { background: var(--pastel-amber-bg); color: var(--pastel-amber-text); }
.pill.hard { background: var(--pastel-coral-bg); color: var(--pastel-coral-text); }
.pill.halal { background: var(--pastel-teal-bg); color: var(--pastel-teal-text); }
.pill.struggle { background: var(--pastel-lav-bg); color: var(--pastel-lav-text); }
.fav-toggle {
  position: absolute; top: .5rem; right: .5rem; z-index: 2; width: 34px; height: 34px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.85); cursor: pointer;
  font-size: 1rem; display: grid; place-items: center; color: #d1738a;
}
:root[data-theme="dark"] .fav-toggle { background: rgba(0,0,0,.45); }
.card-body { padding: .8rem .85rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { font-size: .98rem; font-weight: 700; margin: 0; line-height: 1.3; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .74rem; color: var(--muted); }
.card-meta .dot::before { content: "·"; margin-right: .4rem; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cost { font-weight: 800; color: var(--brand-strong); font-size: .95rem; }
.cost small { font-weight: 500; color: var(--muted); font-size: .7rem; }
.match-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: .2rem; }
.match-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-strong), var(--brand)); }
.match-label { font-size: .72rem; color: var(--brand-strong); font-weight: 600; }
.diet-icons { display: flex; gap: .25rem; font-size: .85rem; }

/* ---------- Empty / load more ---------- */
.empty { text-align: center; padding: 3rem 1rem; }
.empty-emoji { font-size: 3rem; margin: 0; }
.load-more { display: block; margin: 1.5rem auto 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(25,40,36,.45); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal-panel {
  position: relative; background: var(--bg-alt); width: 100%; max-width: 720px;
  margin: auto; max-height: 92vh; overflow-y: auto; border-radius: var(--radius);
  box-shadow: var(--shadow); animation: pop .22s ease; z-index: 1;
}
:root[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.7); }
.modal-close { position: sticky; float: right; top: .7rem; right: .7rem; z-index: 5; box-shadow: var(--shadow); }
.modal-content { padding: 0 0 1.5rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }

.hero-img { position: relative; aspect-ratio: 16/9; background: var(--surface-2); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-img .card-emoji { font-size: 5rem; }
.hero-img .pill-row { position: absolute; bottom: .7rem; left: .7rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.detail { padding: 1.2rem 1.3rem 0; }
.detail h2 { font-size: 1.5rem; padding-right: 2rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .86rem; margin: .3rem 0 .9rem; }
.detail-meta b { color: var(--text); }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin: 1.2rem 0 .5rem; }

.servings-row { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.stepper button { background: var(--surface); border: 0; width: 34px; height: 34px; font-size: 1.1rem; cursor: pointer; color: var(--text); }
.stepper button:hover { background: var(--surface-2); }
.stepper span { padding: 0 .7rem; font-weight: 700; min-width: 2.6rem; text-align: center; }

.ing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.ing-list li {
  display: flex; align-items: baseline; gap: .5rem; padding: .45rem .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem;
}
.ing-list .qty { font-weight: 700; color: var(--brand-dark); min-width: 4.2rem; }
.ing-list .have { color: var(--brand-strong); }
.ing-list .missing { color: var(--muted); }
.ing-list input[type="checkbox"] { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

.swap {
  font-size: .78rem; color: var(--warn-dark); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: .4rem .6rem; margin-top: .35rem;
}

.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.macro {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .5rem; text-align: center;
}
.macro .v { font-size: 1.15rem; font-weight: 800; }
.macro .k { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.steps li { display: flex; align-items: flex-start; flex-wrap: wrap; }
.steps li p { margin: 0; padding-top: .15rem; }

/* ---------- Cook-along guide ---------- */
.glance {
  background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--radius-sm);
  padding: .7rem .9rem; font-weight: 600; margin: .2rem 0 .4rem; line-height: 1.4;
}

.equipment { display: flex; flex-wrap: wrap; gap: .5rem; }
.equipment-item {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 42px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .4rem .7rem; font-size: .9rem; font-weight: 600;
}
.equipment-item .ico { font-size: 1.15rem; }

.technique-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.technique-card {
  display: flex; gap: .8rem; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .8rem;
}
.technique-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.cut-size { font-size: .72rem; color: var(--brand-strong); font-weight: 700; background: var(--brand-soft); border-radius: 999px; padding: .1rem .5rem; }
.technique-text { min-width: 0; }
.technique-text p { margin: .15rem 0 0; color: var(--muted); }
.diagram { flex-shrink: 0; width: 62px; height: 42px; color: var(--muted); }
.diagram svg { width: 100%; height: 100%; display: block; }

.phases { display: grid; gap: 1rem; }
.phase-heading {
  display: flex; align-items: center; gap: .6rem; font-size: .95rem; margin: 0 0 .5rem;
}
.phase-heading::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.phase-count { font-size: .72rem; font-weight: 600; color: var(--muted); }
.phase-cook .phase-heading::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.phase-finish .phase-heading::before { background: var(--pastel-amber-text); box-shadow: 0 0 0 4px var(--pastel-amber-bg); }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.step-index {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.step-cut {
  font-size: .72rem; font-weight: 700; color: var(--brand-strong);
  background: var(--brand-soft); border-radius: 999px; padding: .15rem .55rem;
}

.video-embed { margin-top: 1.2rem; }
.video-play {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  min-height: 52px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.video-play:hover { background: var(--surface-2); }
.video-play-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-size: .8rem;
}
.video-embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius-sm); display: block; }


.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.detail-source { margin-top: .9rem; font-size: .78rem; color: var(--muted); }

/* ---------- Cook mode ---------- */
.cook {
  position: fixed; inset: 0; z-index: 120; background: var(--bg);
  display: flex; flex-direction: column;
}
.cook[hidden] { display: none; }
.cook-top { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.cook-progress { flex: 1; }
.cook-progress span { font-weight: 700; font-size: .9rem; color: var(--muted); }
.cook-body {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.2rem; text-align: center; gap: 1.5rem;
}
.cook-step-num { color: var(--brand); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.cook-step-text { font-size: clamp(1.4rem, 5vw, 2.2rem); font-weight: 600; line-height: 1.35; max-width: 22ch; margin: 0; }
.cook-timer { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.cook-timer .clock { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cook-nav { display: flex; gap: .7rem; padding: 1rem; border-top: 1px solid var(--border); }
.cook-nav .btn { flex: 1; padding: .9rem; }
.cook-ing { max-width: 30ch; color: var(--muted); font-size: .95rem; }
.cook-ing strong { color: var(--text); }

/* Cook mode: phase label, technique card, and intro screen */
.cook-phase { color: var(--accent-dark); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.cook-technique {
  display: flex; gap: .9rem; align-items: center; text-align: left; max-width: 34rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .8rem 1rem;
}
.cook-technique .diagram { width: 72px; height: 50px; color: var(--brand-strong); }
.cook-technique p { margin: .15rem 0 0; }
.cook-body-intro { justify-content: flex-start; text-align: left; align-items: stretch; }
.cook-intro { display: grid; gap: 1rem; max-width: 44rem; margin: 0 auto; width: 100%; }
.cook-intro-head { display: flex; align-items: center; gap: .7rem; }
.cook-intro-head h2 { margin: 0; font-size: 1.4rem; }
.cook-intro-emoji { font-size: 1.8rem; }
.cook-intro-block { display: grid; gap: .5rem; }
.cook-intro-block .section-title { margin: 0; }
.cook-phase-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.cook-phase-list li {
  display: flex; align-items: center; gap: .6rem; min-height: 42px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .5rem .8rem; font-weight: 600;
}
.cook-phase-list .muted { margin-left: auto; }
.phase-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.phase-dot.phase-cook { background: var(--accent); }
.phase-dot.phase-finish { background: var(--pastel-amber-text); }


/* ---------- Drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); z-index: 110;
  background: var(--bg-alt); border-left: 1px solid var(--border); display: flex; flex-direction: column;
  box-shadow: var(--shadow); animation: slidein .22s ease;
}
.drawer[hidden] { display: none; }
@keyframes slidein { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem; }
.drawer-foot { display: flex; gap: .6rem; padding: 1rem; border-top: 1px solid var(--border); }
.drawer-foot .btn { flex: 1; }
.drawer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.drawer-list li { display: flex; gap: .6rem; align-items: center; font-size: .92rem; }
.drawer-list input { accent-color: var(--brand); width: 1.1rem; height: 1.1rem; }
.drawer-list li.checked { color: var(--muted); text-decoration: line-through; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--text); color: var(--bg); padding: .7rem 1.2rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow); animation: pop .2s ease;
}
.toast[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 1rem 2.5rem; text-align: center; }
.site-footer p { margin: 0 0 .4rem; font-size: .84rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .header-inner { flex-wrap: wrap; gap: .5rem; }
  .search { order: 3; max-width: 100%; flex-basis: 100%; }
  .brand-text small { display: none; }
  .modal-panel {
    max-height: 95vh; border-radius: var(--radius) var(--radius) 0 0;
    margin: auto auto 0; max-width: 100%;
  }
  .modal { align-items: flex-end; }
  .macros { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 1.4rem; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .btn { padding: .55rem .9rem; }
}

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