/* Get Crisped: the recipes app (docs/food-site.md). Mobile first; on a wide screen the same app centres with a side
   rail. Light + dark (system or the toggle), no framework, no layout shift, 44 px targets, reduced motion respected. */

/* ------------------------------------------------------------------ tokens */
:root {
  --charcoal: #16120f;
  --gold: #f5b21b;
  --flame: #f26a1b;
  --deep: #d8561c;
  --cream: #f3eee6;

  --bg: #f4efe7;
  --surface: #fffcf7;
  --surface-2: #ebe4d9;
  --surface-3: #e0d7c9;
  --ink: #16120f;
  --ink-2: #6b6158;
  --ink-3: #9a8f84;
  --line: rgba(22, 18, 15, 0.09);
  --line-2: rgba(22, 18, 15, 0.16);
  --accent: #d8561c;
  --accent-ink: #b4450f;
  --accent-title: #d8561c;
  --accent-soft: rgba(216, 86, 28, 0.1);
  --gold-soft: rgba(245, 178, 27, 0.22);
  --on-accent: #16120f;
  --glass: rgba(255, 252, 247, 0.74);
  --glass-strong: rgba(255, 252, 247, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --glass-line: rgba(22, 18, 15, 0.08);
  --focus: #b4450f;
  --shadow-1: 0 1px 2px rgba(22, 18, 15, 0.05), 0 2px 10px rgba(22, 18, 15, 0.05);
  --shadow-2: 0 2px 6px rgba(22, 18, 15, 0.05), 0 14px 34px -10px rgba(22, 18, 15, 0.22);
  --shadow-3: 0 10px 30px -8px rgba(22, 18, 15, 0.28), 0 30px 70px -20px rgba(22, 18, 15, 0.3);
  --shadow-glass: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 8px 28px -6px rgba(22, 18, 15, 0.22), 0 2px 6px rgba(22, 18, 15, 0.06);
  --skeleton-a: #e9e1d5;
  --skeleton-b: #f3ede4;
  --cook-bg: #f6f1ea;
  --seg-on: #fffcf7;

  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-xl: 28px;
  --gutter: 20px;
  --bar-h: 52px;
  --tabbar-h: 64px;
  --rail-w: 248px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.077 22.3%,
        1.121 25.4%, 1.149 28.8%, 1.159 32.4%, 1.154 35.3%, 1.129 40.5%, 1.051 49.8%, 1.017 55.4%, 0.991 62.4%, 0.977 69.4%,
        0.975 77.8%, 0.997 92.3%, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16120f;
    --surface: #211b17;
    --surface-2: #2c241f;
    --surface-3: #372e28;
    --ink: #f3eee6;
    --ink-2: #b5aa9e;
    --ink-3: #85796e;
    --line: rgba(243, 238, 230, 0.08);
    --line-2: rgba(243, 238, 230, 0.15);
    --accent: #f26a1b;
    --accent-ink: #f5b21b;
    --accent-title: #f5b21b;
    --accent-soft: rgba(242, 106, 27, 0.14);
    --gold-soft: rgba(245, 178, 27, 0.16);
    --glass: rgba(33, 27, 23, 0.68);
    --glass-strong: rgba(33, 27, 23, 0.9);
    --glass-edge: rgba(255, 255, 255, 0.07);
    --glass-line: rgba(255, 255, 255, 0.06);
    --focus: #f5b21b;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 16px 36px -10px rgba(0, 0, 0, 0.6);
    --shadow-3: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 30px 70px -20px rgba(0, 0, 0, 0.7);
    --shadow-glass: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 10px 30px -8px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    --skeleton-a: #2a231e;
    --skeleton-b: #352c26;
    --cook-bg: #120e0c;
    --seg-on: #463a32;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16120f;
  --surface: #211b17;
  --surface-2: #2c241f;
  --surface-3: #372e28;
  --ink: #f3eee6;
  --ink-2: #b5aa9e;
  --ink-3: #85796e;
  --line: rgba(243, 238, 230, 0.08);
  --line-2: rgba(243, 238, 230, 0.15);
  --accent: #f26a1b;
  --accent-ink: #f5b21b;
  --accent-title: #f5b21b;
  --accent-soft: rgba(242, 106, 27, 0.14);
  --gold-soft: rgba(245, 178, 27, 0.16);
  --glass: rgba(33, 27, 23, 0.68);
  --glass-strong: rgba(33, 27, 23, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.06);
  --focus: #f5b21b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 16px 36px -10px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  --shadow-glass: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 10px 30px -8px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
  --skeleton-a: #2a231e;
  --skeleton-b: #352c26;
  --cook-bg: #120e0c;
  --seg-on: #463a32;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + var(--safe-t) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: var(--gold-soft);
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ico {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.inline-ico {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  margin: 0 0.1em;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: 12px;
  top: calc(8px + var(--safe-t));
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip:focus {
  transform: none;
}
html:not(.js) .needs-js {
  display: none !important;
}
main:focus {
  outline: none;
}

/* ------------------------------------------------------------------ type */
.largetitle {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 2.15rem;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.h2,
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.h-small {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tl {
  display: inline;
}
.tl-em {
  display: block;
  font-style: italic;
  font-weight: 520;
  color: var(--accent-title);
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ glass + buttons */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-glass);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s var(--spring), background-color 0.2s;
}
.icon-btn.glass {
  border: 1px solid var(--glass-line);
}
.icon-btn:active {
  transform: scale(0.9);
}
.icon-btn .ico {
  width: 21px;
  height: 21px;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px 0 13px;
  border-radius: 999px;
  border: 0;
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--ink);
  transition: transform 0.25s var(--spring);
}
.pill-btn:active {
  transform: scale(0.95);
}
.pill-btn .ico {
  width: 19px;
  height: 19px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.28s var(--spring), box-shadow 0.2s, background-color 0.2s;
}
.btn:active {
  transform: scale(0.96);
}
.btn .ico {
  width: 20px;
  height: 20px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #f7922a 55%, var(--flame) 100%);
  color: var(--on-accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 8px 22px -8px rgba(242, 106, 27, 0.65);
}
.btn-ghost {
  background: var(--surface-2);
  color: var(--ink);
}
.ti {
  display: none;
}
:root:not([data-theme]) .ti-auto,
:root[data-theme="light"] .ti-light,
:root[data-theme="dark"] .ti-dark {
  display: block;
}

/* ------------------------------------------------------------------ app frame: tab bar (phone) / rail (wide) */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + 28px + var(--safe-b));
}
.tabbar {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  width: min(420px, calc(100% - 28px));
  height: var(--tabbar-h);
  transform: translateX(-50%);
  border-radius: 32px;
  padding: 6px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.8) blur(22px);
  backdrop-filter: saturate(1.8) blur(22px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-glass);
  view-transition-name: tabbar;
  transition: transform 0.45s var(--spring), opacity 0.3s;
}
.rail-brand,
.rail-foot {
  display: none;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
  gap: 4px;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  border-radius: 26px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s, background-color 0.25s, transform 0.3s var(--spring);
}
.tab:active {
  transform: scale(0.94);
}
.tab-ico {
  position: relative;
  display: grid;
  place-items: center;
}
.tab .ico {
  width: 23px;
  height: 23px;
}
.tab[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
}
.tab[aria-current="page"] .ico {
  stroke-width: 2.2;
}
.tab[aria-current="page"] .tab-ico .ico {
  color: var(--accent);
}
.tab-badge {
  position: absolute;
  top: -4px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--flame);
  color: #16120f;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.js .p-recipe:not(.nav-show) .tabbar {
  transform: translate(-50%, calc(100% + 24px + var(--safe-b)));
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  height: calc(var(--bar-h) + var(--safe-t));
  padding: var(--safe-t) 12px 0;
  transition: background-color 0.25s, box-shadow 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  transition: opacity 0.25s;
}
.topbar.is-scrolled::before {
  opacity: 1;
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
}
.topbar-lead,
.topbar-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar-trail {
  justify-content: flex-end;
}
.topbar-title {
  min-width: 0;
  max-width: 56vw;
  text-align: center;
  font-weight: 650;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.topbar.is-scrolled .topbar-title {
  opacity: 1;
  transform: none;
}
.topbar:not(.is-scrolled) .icon-btn:not(.glass) {
  background: transparent;
}
.topbar-recipe {
  margin-bottom: calc(-1 * (var(--bar-h) + var(--safe-t)));
}
.topbar-recipe:not(.is-scrolled) .icon-btn.glass {
  background: rgba(22, 18, 15, 0.32);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.4);
}
.topbar.is-scrolled .icon-btn.glass {
  box-shadow: none;
  background: var(--surface-2);
}
.install-btn {
  color: var(--ink);
}

/* ------------------------------------------------------------------ page sections */
main {
  display: block;
}
.hello,
.page-head,
.section,
.empty,
.footer,
.search-sticky,
.results-bar,
.rows,
.ios-hint {
  margin-left: var(--gutter);
  margin-right: var(--gutter);
}
.hello {
  padding-top: 4px;
}
.hello-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  transform-origin: left center;
}
.hello-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  box-shadow: 0 8px 20px -8px rgba(216, 86, 28, 0.55), 0 0 0 1px var(--line);
}
.hello-tag {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.page-head {
  padding: 2px 0 14px;
}
.page-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.page-sub .inline-ico {
  margin: 0;
  color: var(--accent);
}
@supports (animation-timeline: scroll()) {
  .p-home .hello-brand,
  .page-head .largetitle {
    animation: title-away linear both;
    animation-timeline: scroll(root);
    animation-range: 0 110px;
  }
  .page-head .largetitle {
    transform-origin: left center;
  }
}
@keyframes title-away {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.92);
  }
}

.section {
  margin-top: 34px;
}
.section-feature {
  margin-top: 24px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-feature .section-head {
  margin: 0;
}
.see-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding-left: 12px;
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.see-all .ico {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}
.section-count {
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------ search field + chips */
.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 20px;
  view-transition-name: searchbox;
}
.searchbox-ico {
  position: absolute;
  left: 16px;
  color: var(--ink-2);
  pointer-events: none;
}
.searchbox input {
  width: 100%;
  height: 54px;
  padding: 0 48px 0 50px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  font-size: 1.04rem;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.searchbox input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}
.searchbox input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.searchbox input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-1);
}
.searchbox-clear {
  position: absolute;
  right: 5px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
}
.searchbox-clear .ico {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--surface-2);
  stroke-width: 2.6;
  box-sizing: content-box;
}
.chips {
  display: flex;
  gap: 8px;
}
.chips-scroll {
  margin: 14px calc(-1 * var(--gutter)) 0;
  padding: 2px var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.chips-scroll::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--spring);
}
.chip:active {
  transform: scale(0.95);
}
.chip .ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip[aria-pressed="true"] .ico {
  color: var(--gold);
}
.chip-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

/* ------------------------------------------------------------------ iOS install hint */
.ios-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 6px 12px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.35;
}
.ios-hint img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
}
.ios-hint p {
  flex: 1;
}

/* ------------------------------------------------------------------ media placeholders */
.card-media,
.feature-media,
.hero-media,
.row-media,
.step-media,
.cook-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(110deg, var(--skeleton-a) 8%, var(--skeleton-b) 18%, var(--skeleton-a) 33%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
.card-media img,
.feature-media img,
.hero-media img,
.row-media img,
.step-media img,
.cook-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--gold-soft), transparent 70%), var(--surface-2);
}
.card-ph .art {
  width: 55%;
}
@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* ------------------------------------------------------------------ meta line */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.meta .m {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.meta .mm {
  display: inline;
}
.meta .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}
.est {
  font-size: 0.8em;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------------ hearts */
.heart {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(22, 18, 15, 0.34);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  transition: transform 0.35s var(--spring), background-color 0.2s;
}
.heart .ico {
  width: 21px;
  height: 21px;
  transition: fill 0.2s, color 0.2s;
}
.heart:active {
  transform: scale(0.86);
}
[data-save][aria-pressed="true"] .ico {
  fill: currentColor;
}
.heart[aria-pressed="true"] {
  color: var(--flame);
  background: rgba(255, 252, 247, 0.92);
}
.heart.pop .ico,
.ab-save.pop .ico {
  animation: heart-pop 0.55s var(--spring);
}
@keyframes heart-pop {
  0% {
    transform: scale(0.6);
  }
  45% {
    transform: scale(1.28);
  }
  100% {
    transform: scale(1);
  }
}
.heart-lg {
  top: 14px;
  right: 14px;
}
.heart-row {
  position: static;
  color: var(--ink-2);
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.heart-row[aria-pressed="true"] {
  color: var(--flame);
  background: transparent;
}

/* ------------------------------------------------------------------ feature card (Latest) */
.feature {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-3);
  transform: translateZ(0);
}
.feature-link {
  display: block;
  color: #fff;
  text-decoration: none;
}
.feature-media {
  aspect-ratio: 4 / 5;
  max-height: 72svh;
  width: 100%;
}
.feature-media img {
  transition: transform 0.8s var(--ease);
}
.feature-body {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 90px 22px 22px;
  background: linear-gradient(to top, rgba(14, 10, 8, 0.92) 0%, rgba(14, 10, 8, 0.66) 46%, rgba(14, 10, 8, 0) 100%);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: rgba(245, 178, 27, 0.95);
  color: #16120f;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
.feature-title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(1.9rem, 8.4vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.feature-title .tl-em {
  color: var(--gold);
}
.feature-sum {
  max-width: 34em;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.97rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta-on-dark {
  color: rgba(255, 255, 255, 0.86);
}
.feature-cta {
  display: none;
}
/* poster: the cover shown as it is, the title in a panel under it */
.feature-poster .feature-link,
.feature-poster .feature-body {
  background: radial-gradient(120% 90% at 0% 100%, rgba(242, 106, 27, 0.24), transparent 60%), linear-gradient(135deg, #2a201a, #16120f 70%);
}
.feature-poster .feature-body {
  position: static;
  padding: 20px 22px 24px;
}
.feature-poster .feature-media {
  max-height: none;
}
@media (hover: hover) {
  .feature-link:hover .feature-media img {
    transform: scale(1.03);
  }
}

.more-soon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px var(--gutter) 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-2);
  color: var(--ink-2);
  font-size: 0.95rem;
}
.more-soon .ico {
  color: var(--accent);
}

/* ------------------------------------------------------------------ cards, carousels, grid */
.card {
  position: relative;
  min-width: 0;
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-lg);
  -webkit-touch-callout: none;
}
.card-media {
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  transform: translateZ(0);
}
.card-media img {
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) {
  .card-link:hover .card-media img {
    transform: scale(1.04);
  }
}
.card-link:active .card-media {
  transform: scale(0.98);
  transition: transform 0.2s;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 4px 0;
}
.card-eyebrow {
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.carousel-wrap {
  position: relative;
}
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(56%, 240px);
  gap: 14px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.carousel > .card {
  scroll-snap-align: start;
}
.car-btn {
  display: none;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 14px;
}
.grid .card-title {
  font-size: 1.04rem;
}

/* ------------------------------------------------------------------ search page */
.search-sticky {
  position: sticky;
  z-index: 30;
  top: calc(var(--bar-h) + var(--safe-t));
  margin-top: -6px;
  padding: 6px 0 4px;
  background: var(--bg);
}
.search-sticky .searchbox {
  margin-top: 0;
}
.search-sticky .chips-scroll {
  margin-top: 12px;
}
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-top: 8px;
}
.results-count {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.results-count strong {
  color: var(--ink);
}
.sort {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.sort select {
  height: 44px;
  padding: 0 34px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 650;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.sort-ico {
  position: absolute;
  right: 12px;
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
  pointer-events: none;
  stroke-width: 2.4;
}
.rows {
  display: grid;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  animation: row-in 0.42s var(--ease) both;
}
.row:last-child {
  border-bottom: 0;
}
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.row-link {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 108px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-md);
}
.row-media {
  width: 86px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  box-shadow: var(--shadow-1);
}
.row-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.row-eyebrow {
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.row-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-title mark {
  background: linear-gradient(transparent 58%, var(--gold-soft) 58%);
  color: inherit;
  border-radius: 2px;
}
.row:active .row-media {
  transform: scale(0.97);
  transition: transform 0.2s;
}
.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(110deg, var(--skeleton-a) 8%, var(--skeleton-b) 18%, var(--skeleton-a) 33%);
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
}
.sk-row {
  grid-template-columns: 86px 1fr;
  gap: 16px;
  animation: none;
}
.sk-media {
  width: 86px;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
}
.sk-lines {
  display: grid;
  gap: 10px;
}
.sk-line {
  height: 12px;
}
.sk-w40 {
  width: 40%;
}
.sk-w60 {
  width: 60%;
}
.sk-w80 {
  width: 82%;
  height: 18px;
}
.noscript {
  margin: 20px var(--gutter);
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ empty states */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 36px 8px 24px;
}
.empty h2,
.h1-empty {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.empty p {
  max-width: 30em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.empty-art {
  width: 168px;
  margin-bottom: 6px;
  animation: float 5s ease-in-out infinite;
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.empty-page {
  min-height: 70vh;
  min-height: 70dvh;
  justify-content: center;
}
.kicker {
  color: var(--accent-ink) !important;
  font-weight: 750;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.searchbox-404 {
  width: min(100%, 420px);
  margin-top: 14px;
}
@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}
.art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.art-glow {
  fill: var(--gold);
  opacity: 0.14;
}
.art-pan {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.art-in {
  fill: var(--surface-2);
}
.art-stripe {
  fill: var(--flame);
}
.art-flame {
  fill: var(--flame);
  transform-origin: 70px 116px;
  animation: flicker 2.2s ease-in-out infinite;
}
@keyframes flicker {
  50% {
    transform: scale(1.04, 0.95);
  }
}

/* ------------------------------------------------------------------ footer */
.footer {
  margin-top: 56px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  color: var(--ink-2);
  font-size: 0.88rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--ink);
}
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.social-center {
  justify-content: center;
  margin-top: 8px;
}
.soc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.soc .ico {
  width: 19px;
  height: 19px;
  color: var(--accent);
}
.footer-note {
  max-width: 44em;
  line-height: 1.5;
}
.footer-small {
  font-size: 0.8rem;
}

/* ------------------------------------------------------------------ recipe: hero + intro */
.hero {
  position: relative;
}
.hero-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 76svh;
  view-transition-name: hero-img;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 140px;
  background: linear-gradient(rgba(10, 8, 6, 0.42), rgba(10, 8, 6, 0));
  pointer-events: none;
}
.hero-lqip {
  filter: blur(14px);
  transform: scale(1.08);
}
.sheet {
  position: relative;
  z-index: 2;
  margin-top: -30px;
  padding: 26px var(--gutter) 6px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, 0.35);
}
.sheet::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 5px;
  margin-left: -19px;
  border-radius: 3px;
  background: var(--line-2);
}
.r-head {
  display: grid;
  gap: 12px;
}
.eyebrow {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}
.r-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2.2rem, 9.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.r-sum {
  color: var(--ink-2);
  font-size: 1.06rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pills li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.pills-diet li {
  background: var(--gold-soft);
}
.facts {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: 6px;
  padding: 14px 4px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
}
.facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.2;
}
.facts li + li {
  border-left: 1px solid var(--line);
}
.facts .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.facts strong {
  display: block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chip-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 500;
}

/* macros */
.macros {
  margin-top: 26px;
}
.macros-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.macros-per {
  color: var(--ink-2);
  font-size: 0.85rem;
}
.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.macro {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px 12px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.macro-val {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.macro-unit {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--ink-2);
}
.macro-label {
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}
.macro-protein {
  background: linear-gradient(150deg, #ffc93c, var(--gold) 60%, #f39a1d);
  border-color: transparent;
  color: #16120f;
  box-shadow: 0 10px 24px -12px rgba(245, 160, 27, 0.9);
}
.macro-protein .macro-unit,
.macro-protein .macro-label {
  color: rgba(22, 18, 15, 0.78);
}
.macro-bar {
  display: block;
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
}
.macro-protein .macro-bar {
  background: rgba(22, 18, 15, 0.16);
}
.macro-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: grow 0.9s 0.2s var(--ease) both;
}
.macro-protein .macro-fill {
  background: #16120f;
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; }
.w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; }
.w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; }
.w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
.macros-basis {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.45;
}
.macros-basis .ico {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* sticky action bar (phone: floating glass capsule above the tab bar) */
.actionbar {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  width: min(420px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  padding: 6px;
  border-radius: 30px;
  transform: translateX(-50%);
  background: var(--glass-strong);
  -webkit-backdrop-filter: saturate(1.8) blur(22px);
  backdrop-filter: saturate(1.8) blur(22px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-glass);
  transition: transform 0.45s var(--spring);
}
.p-recipe.nav-show .actionbar {
  transform: translate(-50%, calc(-1 * (var(--tabbar-h) + 10px)));
}
html:not(.js) .actionbar {
  bottom: calc(10px + var(--safe-b) + var(--tabbar-h) + 10px);
}
.ab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-width: 48px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s var(--spring), background-color 0.2s, color 0.2s;
}
.ab-btn:active {
  transform: scale(0.92);
}
.ab-btn .ab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ab-cook {
  flex: 1 1 auto;
  background: linear-gradient(135deg, var(--gold) 0%, #f7922a 55%, var(--flame) 100%);
  color: #16120f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 8px 20px -10px rgba(242, 106, 27, 0.9);
}
.ab-cook .ab-label {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
}
.ab-save[aria-pressed="true"] {
  color: var(--flame);
}
html:not(.js) .actionbar {
  justify-content: space-around;
}

/* ------------------------------------------------------------------ recipe: ingredients */
.r-cols {
  margin-top: 26px;
}
.ingredients {
  margin: 0 var(--gutter);
}
.card-surface {
  padding: 22px 18px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.sec-count {
  color: var(--ink-2);
  font-size: 0.88rem;
}
.ing-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.stepper {
  display: flex;
  align-items: center;
  flex: 1 1 150px;
  justify-content: space-between;
  height: 48px;
  padding: 2px;
  border-radius: 24px;
  background: var(--surface-2);
}
.stepper-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--seg-on);
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--spring), opacity 0.2s;
}
.stepper-btn:active {
  transform: scale(0.88);
}
.stepper-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.stepper-btn .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}
.stepper-val {
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1 1 180px;
  height: 48px;
  padding: 3px;
  border-radius: 24px;
  background: var(--surface-2);
}
.seg-btn {
  border: 0;
  border-radius: 21px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 650;
  font-size: 0.9rem;
  transition: background-color 0.25s, color 0.2s, box-shadow 0.25s;
}
.seg-btn[aria-checked="true"] {
  background: var(--seg-on);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.scale-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--gold-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}
.scale-note .ico {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--accent-ink);
}
.ing-list {
  margin-top: 10px;
}
.ing + .ing {
  border-top: 1px solid var(--line);
}
.ing-row {
  display: grid;
  grid-template-columns: 30px 78px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 13px 0;
  cursor: pointer;
  min-height: 44px;
}
.tick-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.tick {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 9px;
  border: 2px solid var(--line-2);
  color: transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.35s var(--spring);
}
.tick .ico {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}
.tick-input:checked + .tick {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.06);
}
.tick-input:focus-visible + .tick {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.ing-amt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-variant-numeric: tabular-nums;
}
.q {
  font-weight: 700;
  line-height: 1.3;
}
.ing-amt .q-i {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.86rem;
}
.ing-list[data-units="metric"] .ing-amt:has(.q-m) .q-i,
.ing-list[data-units="imperial"] .ing-amt:has(.q-i) .q-m,
.r-units-metric .need-amt:has(.q-m) .q-i,
.r-units-imperial .need-amt:has(.q-i) .q-m {
  display: none;
}
.ing-list[data-units="imperial"] .ing-amt .q-i,
.r-units-imperial .need-amt .q-i {
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
}
.ing-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.ing-note {
  color: var(--ink-2);
  font-size: 0.86rem;
}
.ing-list.is-scaled .ing-note[data-numeric] {
  display: none;
}
.ing-row:has(.tick-input:checked) .ing-text,
.ing-row:has(.tick-input:checked) .ing-amt {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.ing.is-changed .q {
  animation: flash 0.7s var(--ease);
}
@keyframes flash {
  30% {
    color: var(--accent);
  }
}
.equipment {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

/* ------------------------------------------------------------------ recipe: method */
.method {
  margin: 40px var(--gutter) 0;
}
.steps {
  display: grid;
  gap: 34px;
  margin-top: 18px;
  counter-reset: step;
}
.step-media {
  aspect-ratio: 4 / 3;
  max-height: 56svh;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  margin-bottom: 16px;
}
.step-badge,
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: #16120f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
}
.step-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
}
.step-num {
  flex: none;
  box-shadow: none;
}
.step-body {
  display: grid;
  gap: 10px;
}
.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.step-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.step-chips li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.84rem;
  font-weight: 600;
}
.step-chips .ico {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.step-chips .chip-heat {
  background: var(--accent-soft);
}
.step-text {
  font-size: 1.08rem;
  line-height: 1.62;
  text-wrap: pretty;
}
.uses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.uses li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  font-size: 0.84rem;
  line-height: 1.3;
}
.need-amt {
  display: inline-flex;
  flex: none;
  white-space: nowrap;
  gap: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.need-amt .q-i {
  color: var(--ink-2);
  font-weight: 600;
}
.need-amt .q-m + .q-i::before {
  content: "· ";
}
.r-units-imperial .need-amt .q-i::before {
  content: none;
}

/* notes, watch, PDF card */
.notes-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.note {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 0.97rem;
  line-height: 1.5;
}
.note h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
}
.note h3 .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.note ul:not(.pills) {
  display: grid;
  gap: 8px;
}
.note ul:not(.pills) li {
  position: relative;
  padding-left: 16px;
}
.note ul:not(.pills) li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.note-small {
  color: var(--ink-2);
  font-size: 0.84rem;
}
.note-safety {
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
}
.watch-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.watch-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.3s var(--spring), background-color 0.2s;
}
.watch-link:active {
  transform: scale(0.98);
}
.watch-link > .ico:first-child {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.watch-link span {
  flex: 1;
}
.watch-arrow {
  width: 18px;
  height: 18px;
  color: var(--ink-2);
}
.pdf-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #2a201a, #16120f);
  color: #f3eee6;
  text-decoration: none;
  box-shadow: var(--shadow-2);
  transition: transform 0.3s var(--spring);
}
.pdf-card:active {
  transform: scale(0.98);
}
.pdf-ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--flame));
  color: #16120f;
}
.pdf-ico .ico {
  width: 26px;
  height: 26px;
}
.pdf-text {
  display: grid;
  gap: 3px;
  flex: 1;
}
.pdf-title {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.2rem;
}
.pdf-meta {
  color: rgba(243, 238, 230, 0.75);
  font-size: 0.85rem;
}
.pdf-go {
  color: var(--gold);
}

/* ------------------------------------------------------------------ cook mode */
.cook {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--cook-bg);
  color: var(--ink);
  overflow: hidden;
}
.cook[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  animation: cook-in 0.45s var(--ease);
}
.cook::backdrop {
  background: rgba(10, 8, 6, 0.6);
}
@keyframes cook-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
}
.cook-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: calc(8px + var(--safe-t)) 14px 6px;
}
.cook-count {
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.cook-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.wake {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.wake .ico {
  width: 15px;
  height: 15px;
  color: var(--accent-ink);
}
.cook-progress {
  display: flex;
  gap: 5px;
  padding: 6px 18px 4px;
}
.cook-progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
  position: relative;
}
.cook-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--gold), var(--flame));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.cook-progress span.is-on::after {
  transform: scaleX(1);
}
.cook-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  outline: none;
}
.cook-track::-webkit-scrollbar {
  display: none;
}
.cook-slide {
  flex: 0 0 100%;
  height: 100%;
  overflow-y: auto;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 14px 22px 24px;
}
.cook-inner {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  align-content: start;
}
.cook-media {
  aspect-ratio: 16 / 10;
  max-height: 30svh;
  width: 100%;
  border-radius: var(--r-lg);
  margin-bottom: 4px;
}
.cook-kicker {
  color: var(--accent-ink);
  font-weight: 750;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cook-title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(1.9rem, 7.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: -6px;
}
.cook-text {
  font-size: clamp(1.4rem, 5.6vw, 2.05rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.cook-text-sm {
  font-size: 1.15rem;
  color: var(--ink-2);
}
.cook-need {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.need-list {
  display: grid;
  gap: 8px;
}
.need-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.12rem;
  line-height: 1.35;
}
.need-list .need-amt {
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--gold-soft);
}
.cook-done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.cook-done-actions .ab-save[aria-pressed="true"] {
  color: var(--flame);
}
.cook-inner-done {
  justify-items: center;
  text-align: center;
  padding-top: 8vh;
}
.done-art {
  width: 180px;
  animation: float 5s ease-in-out infinite;
}
.cook-nav {
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
}
.cook-nav .btn {
  min-height: 58px;
}
.cook-nav .btn-primary {
  flex: 1;
  font-size: 1.08rem;
}
.cook-nav .btn-ghost {
  padding: 0 18px 0 14px;
}
.cook-nav .btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(10px + var(--safe-b) + var(--tabbar-h) + 14px);
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: min(440px, calc(100vw - 28px));
  min-height: 50px;
  padding: 4px 6px 4px 18px;
  border-radius: 18px;
  background: #16120f;
  color: #f3eee6;
  box-shadow: var(--shadow-3);
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px) scale(0.96);
  transition: opacity 0.25s, transform 0.4s var(--spring);
}
:root[data-theme="dark"] .toast {
  background: #f3eee6;
  color: #16120f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast {
    background: #f3eee6;
    color: #16120f;
  }
}
.toast.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.p-recipe .toast {
  bottom: calc(10px + var(--safe-b) + 60px + 12px);
}
.p-recipe.nav-show .toast {
  bottom: calc(10px + var(--safe-b) + var(--tabbar-h) + 10px + 60px + 12px);
}
.toast-text {
  padding: 8px 0;
}
.toast-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--gold);
  font-weight: 750;
  text-decoration: none;
}
:root[data-theme="dark"] .toast-action {
  color: #b4450f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast-action {
    color: #b4450f;
  }
}

/* ------------------------------------------------------------------ tablet */
@media (min-width: 700px) {
  :root {
    --gutter: 32px;
  }
  .shell {
    max-width: 860px;
    margin: 0 auto;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 18px;
  }
  .carousel {
    grid-auto-columns: 240px;
  }
  .largetitle {
    font-size: 2.6rem;
  }
  .feature-media {
    aspect-ratio: 16 / 11;
  }
  .feature-poster .feature-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .feature-poster .feature-media {
    order: 2;
    aspect-ratio: 4 / 5;
  }
  .feature-poster .feature-body {
    order: 1;
    justify-content: center;
    padding: 32px;
  }
  .rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
  .row:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-media {
    max-height: 70svh;
    aspect-ratio: 16 / 12;
  }
  .sheet {
    padding-top: 30px;
  }
  .cook-media {
    max-height: 34svh;
  }
}

/* ------------------------------------------------------------------ desktop: side rail, two columns */
@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
  }
  html {
    scroll-padding-top: 90px;
  }
  .tabbar {
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--rail-w);
    height: auto;
    transform: none;
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: none;
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .js .p-recipe:not(.nav-show) .tabbar {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .rail-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    min-height: 48px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 680;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
  }
  .rail-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .tabs {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 4px;
  }
  .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    height: 50px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    border: 0;
    width: 100%;
  }
  .tab:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .rail-foot {
    display: block;
    margin-top: auto;
  }
  .topbar [data-theme-toggle] {
    display: none;
  }
  .shell {
    max-width: none;
    margin: 0 0 0 var(--rail-w);
    padding-bottom: 24px;
  }
  .shell > main,
  .shell > .footer {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
  }
  .shell > .footer {
    margin-left: max(var(--gutter), calc((100% - 1180px) / 2 + var(--gutter)));
    margin-right: max(var(--gutter), calc((100% - 1180px) / 2 + var(--gutter)));
  }
  .topbar {
    padding: 0 24px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px 22px;
  }
  .carousel {
    grid-auto-columns: 250px;
    gap: 20px;
  }
  .car-btn {
    position: absolute;
    top: calc(50% - 60px);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--ink);
    opacity: 0;
    transition: opacity 0.2s, transform 0.3s var(--spring);
  }
  .car-prev {
    left: -14px;
  }
  .car-next {
    right: -14px;
  }
  .carousel-wrap:hover .car-btn:not(:disabled),
  .car-btn:focus-visible {
    opacity: 1;
  }
  .car-btn:disabled {
    opacity: 0 !important;
    pointer-events: none;
  }
  .hello {
    display: grid;
    grid-template-columns: auto minmax(320px, 440px);
    justify-content: space-between;
    align-items: center;
    gap: 16px 32px;
    padding-top: 12px;
  }
  .hello .searchbox {
    margin: 0;
  }
  .hello .chips-scroll {
    grid-column: 1 / -1;
    margin-top: 4px;
  }
  .hello-logo {
    width: 68px;
    height: 68px;
  }
  .largetitle {
    font-size: 3rem;
  }
  .feature {
    border: 1px solid var(--line);
  }
  .feature-link {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    min-height: 480px;
    background: radial-gradient(120% 90% at 0% 100%, rgba(242, 106, 27, 0.22), transparent 60%), linear-gradient(135deg, #2a201a, #16120f 70%);
  }
  .feature-media {
    order: 2;
    aspect-ratio: auto;
    height: 100%;
    min-height: 480px;
    max-height: none;
  }
  .feature-body {
    position: static;
    order: 1;
    justify-content: center;
    gap: 16px;
    padding: 52px 48px;
    background: none;
  }
  .feature-title {
    font-size: clamp(2.8rem, 3.6vw, 3.6rem);
  }
  .feature-sum {
    font-size: 1.08rem;
    -webkit-line-clamp: 3;
  }
  .feature-poster .feature-link {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 40%);
  }
  .feature-poster .feature-media {
    aspect-ratio: 4 / 5;
    height: auto;
    min-height: 0;
  }
  .feature-poster .feature-body {
    padding: 52px 48px;
  }
  .feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold) 0%, #f7922a 55%, var(--flame) 100%);
    color: #16120f;
    font-weight: 700;
    transition: transform 0.3s var(--spring);
  }
  .feature-link:hover .feature-cta {
    transform: translateX(4px);
  }
  .feature-cta .ico {
    width: 19px;
    height: 19px;
  }
  .chips-scroll {
    flex-wrap: wrap;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-sticky {
    top: var(--bar-h);
  }
  .page-head {
    padding-top: 10px;
  }

  /* recipe */
  .topbar-recipe {
    margin-bottom: 0;
  }
  .topbar-recipe:not(.is-scrolled) .icon-btn.glass {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: var(--shadow-1);
  }
  .r-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: start;
    margin: 8px var(--gutter) 0;
  }
  .hero {
    position: sticky;
    top: calc(var(--bar-h) + 16px);
  }
  .hero-media {
    aspect-ratio: 4 / 5;
    max-height: calc(100vh - var(--bar-h) - 40px);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-3);
  }
  .hero-media::after {
    display: none;
  }
  .sheet {
    margin: 0;
    padding: 12px 0 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .sheet::before {
    display: none;
  }
  .r-title {
    font-size: clamp(2.8rem, 4.4vw, 4.2rem);
  }
  .actionbar {
    position: static;
    width: auto;
    margin-top: 26px;
    transform: none;
    height: auto;
    padding: 0;
    gap: 10px;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    box-shadow: none;
    flex-wrap: wrap;
  }
  .p-recipe.nav-show .actionbar {
    transform: none;
  }
  .ab-btn {
    height: 52px;
    padding: 0 18px;
    border-radius: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
  }
  .ab-btn .ab-label {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
  }
  /* Cook mode is the one wide call to action; Save · Recipe card · Share sit under it as equal tiles (icon over
     label), so the bar never wraps a lone button onto its own line, whatever the column's width */
  .ab-btn:not(.ab-cook) {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    height: 66px;
    padding: 0 8px;
    border-radius: 20px;
    font-size: 0.84rem;
  }
  .ab-btn:not(.ab-cook) .ico {
    width: 22px;
    height: 22px;
  }
  .ab-cook {
    order: -1;
    flex: 1 0 100%;
    height: 56px;
    font-size: 1.05rem;
    border: 0;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--gold) 0%, #f7922a 55%, var(--flame) 100%);
  }
  .r-cols {
    display: grid;
    grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    margin: 56px var(--gutter) 0;
  }
  .r-side {
    position: sticky;
    top: calc(var(--bar-h) + 16px);
    max-height: calc(100vh - var(--bar-h) - 32px);
    overflow-y: auto;
    border-radius: var(--r-lg);
    scrollbar-width: thin;
  }
  .ingredients,
  .method,
  .r-main .section {
    margin-left: 0;
    margin-right: 0;
  }
  .method {
    margin-top: 0;
  }
  .steps {
    gap: 44px;
  }
  .step {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .step:not(:has(.step-media)) {
    grid-template-columns: minmax(0, 1fr);
  }
  .step-media {
    margin: 0;
    aspect-ratio: 4 / 5;
  }
  .related {
    margin-top: 56px;
  }
  .toast,
  .p-recipe .toast,
  .p-recipe.nav-show .toast {
    left: calc(50% + var(--rail-w) / 2);
    bottom: 28px;
  }
  .cook-slide {
    padding-top: 24px;
  }
  .cook-media {
    max-height: 36svh;
  }
}
@media (min-width: 1440px) {
  .hero-media {
    max-height: 760px;
  }
}

/* ------------------------------------------------------------------ view transitions (cross-document) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 0.2s ease both vt-out;
}
::view-transition-new(root) {
  animation: 0.34s var(--ease) both vt-in;
}
::view-transition-group(hero-img) {
  animation-duration: 0.48s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 10;
}
::view-transition-old(hero-img),
::view-transition-new(hero-img) {
  height: 100%;
  width: 100%;
  object-fit: cover;
  overflow: clip;
  animation-duration: 0.48s;
}
::view-transition-group(searchbox),
::view-transition-group(tabbar) {
  animation-duration: 0.36s;
  animation-timing-function: var(--ease);
}
html.vt-theme::view-transition-old(root),
html.vt-theme::view-transition-new(root) {
  animation: 0.32s ease both vt-fade;
}
html.vt-theme::view-transition-old(root) {
  animation-name: vt-out;
}
@keyframes vt-fade {
  from {
    opacity: 0;
  }
}
html.cook-open,
html.cook-open body {
  overflow: hidden;
}
@keyframes vt-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .p-home .hello-brand,
  .page-head .largetitle {
    animation: none !important;
  }
  .card-media,
  .feature-media,
  .hero-media,
  .row-media,
  .step-media,
  .cook-media,
  .sk {
    animation: none !important;
  }
}

/* ------------------------------------------------------------------ print (the recipe card PDF is the real print version) */
@media print {
  .tabbar,
  .topbar,
  .actionbar,
  .toast,
  .related,
  .watch,
  .ing-controls,
  .footer {
    display: none !important;
  }
  .sheet {
    margin: 0;
  }
  .hero-media {
    max-height: 40vh;
  }
}
