/* Recipe page styles — extends recipe-base.css design system */

/* ============================================================
   Local helpers (from base design system)
   ============================================================ */
:root {
  --r-pill: 999px;
  --pop-sm: 3px 3px 0 var(--ink);
  --pop-md: 4px 4px 0 var(--ink);
  --pop-lg: 6px 6px 0 var(--ink);
  --pop-orange: 8px 8px 0 var(--orange);
  --pop-matcha: 8px 8px 0 var(--matcha);
}

/* shared eyebrow comment text */
.eyebrow-comment {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.eyebrow-comment::before {
  content: "// ";
  color: var(--orange-text);
}

/* shared button used in cards */
.btn.sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--pop-sm);
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 180ms cubic-bezier(.2, .8, .2, 1),
    background 180ms cubic-bezier(.2, .8, .2, 1);
  white-space: nowrap;
  font-family: var(--sans);
  cursor: pointer;
}

.btn.sm:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn.sm:active {
  transform: translate(0, 0);
  box-shadow: var(--pop-sm);
}

.btn.sm.primary {
  background: var(--ink);
  color: var(--paper);
}

.btn.sm.primary:hover {
  background: var(--orange-text);
}

.btn.sm.orange {
  background: var(--orange-text);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--orange-deep);
}

.btn.sm.orange:hover {
  box-shadow: 5px 5px 0 var(--orange-deep);
}

/* ============================================================
   Shared design tokens (used by recipe + ingredient pages)
   ============================================================ */
.card-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.card-eyebrow::before {
  content: "// ";
  color: var(--orange-text);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-size: 11px;
  border: 1px solid var(--rule);
}

.tag-chip.veg {
  background: var(--matcha-soft);
  color: var(--matcha-deep);
  border-color: transparent;
}

.tag-chip.warn {
  background: rgba(200, 75, 90, 0.12);
  color: var(--berry);
  border-color: transparent;
}

/* Nutrition grid (FDC density) */
.nut-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
  overflow-x: auto;
}

.nut-tab {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.nut-tab.active {
  color: var(--ink);
  border-bottom-color: var(--orange-text);
}

.nut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.nut-cell {
  background: var(--paper);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nut-cell .name {
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.nut-cell .name .unit {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}

.nut-cell .val {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}

.nut-cell .dv {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.nut-cell.essential {
  background: var(--cream-soft);
}

.nut-cell.high .val {
  color: var(--matcha-deep);
}

.nut-cell.warn .val {
  color: var(--berry);
}

.dv-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
  margin-top: 2px;
}

.dv-bar>span {
  display: block;
  height: 100%;
  background: var(--matcha);
  border-radius: 2px;
}

.dv-bar>span.over {
  background: var(--berry);
}

.dv-bar>span.warn {
  background: var(--butter);
}

/* Macro donut */
.macro-donut {
  width: 160px;
  height: 160px;
  position: relative;
  margin: 0 auto;
}

.macro-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.macro-donut .label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.macro-donut .label b {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
}

.macro-donut .label .u {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* Legend (donut + nutrition) */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.legend-item .sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* Nutrition legend swatches */
.r-nutri-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.r-nutri-legend .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.r-nutri-legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  background: var(--rule);
}

.r-nutri-legend .sw.high {
  background: var(--matcha);
}

.r-nutri-legend .sw.warn {
  background: var(--berry);
}

.r-nutri-legend .sw.regular {
  background: var(--cream-deep);
  border: 1px solid var(--rule-strong);
}

/* ============================================================
   Recipe page — premium redesign
   ============================================================ */
.recipe-page {
  padding: 92px 0 160px;
  position: relative;
  z-index: 2;
}

.r-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.r-breadcrumb a:hover {
  color: var(--orange-text);
}

.r-breadcrumb span {
  color: var(--ink-muted);
}

.r-breadcrumb .current {
  color: var(--ink);
}

/* ============================================================
   HERO — meta+image left, nutrition right
   ============================================================ */
.r-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 36px;
}

.r-hero-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.r-hero-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.r-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.r-hero-eyebrow .dot {
  color: var(--ink-muted);
}

.r-hero-eyebrow .star {
  color: var(--orange);
}

.r-hero-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.r-hero-title em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--orange);
}

.r-hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 50ch;
}

.r-hero-stage {
  position: relative;
  border-radius: var(--r-xl);
  border: 1.5px solid var(--ink);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: 6px 6px 0 var(--orange);
  aspect-ratio: 1 / 1;
  width: 100%;
}

.r-hero-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--media-x, 0), var(--media-y, 0)) scale(var(--media-scale, 1));
}

.r-hero-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 109, 46, 0.18) 0 14px, transparent 14px 28px),
    radial-gradient(circle at 50% 50%, var(--hero-b, var(--butter)) 0%, var(--hero-c, var(--orange)) 80%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.r-save-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 252, 243, 0.94);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--pop-sm);
  transition: transform 160ms, box-shadow 160ms, background 160ms;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.r-save-icon:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.r-save-icon:active {
  transform: translate(0, 0);
  box-shadow: 1px 1px 0 var(--ink);
}

.r-save-icon.saved {
  background: var(--berry);
  border-color: var(--ink);
}

.r-save-icon .heart {
  font-size: 22px;
  line-height: 1;
  color: var(--berry);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1.5);
}

.r-save-icon.saved .heart {
  color: var(--paper);
  transform: scale(1.15);
}

@keyframes save-burst {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.45) rotate(-10deg);
  }

  100% {
    transform: scale(1.15) rotate(0);
  }
}

.r-save-icon.just-saved .heart {
  animation: save-burst 460ms cubic-bezier(.2, .8, .2, 1);
}

/* Reaction controls on the hero photo: Save bookmark top-right, thumbs (up =
   like, down = hard-exclude — both feed recommendations) bottom-right. */
.r-react-bar {
  position: absolute;
  right: 16px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.r-react-bar.at-top { top: 16px; flex-direction: column; }
.r-react-bar.at-bottom { bottom: 16px; flex-direction: row; }

.r-react-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 252, 243, 0.94);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  box-shadow: var(--pop-sm);
  transition: transform 160ms, box-shadow 160ms, background 160ms;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.r-react-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.r-react-btn:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--ink); }
.r-react-btn.active { background: var(--ink); box-shadow: 3px 3px 0 var(--orange-text); }

.r-react-btn .heart {
  font-size: 22px;
  color: var(--berry);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1.5);
}
.r-react-btn.r-save-btn.saved { background: var(--berry); border-color: var(--ink); }
.r-react-btn.r-save-btn.saved .heart { color: var(--paper); transform: scale(1.15); }
.r-react-btn.just-saved .heart { animation: save-burst 460ms cubic-bezier(.2, .8, .2, 1); }

/* ----- Nutrition card ----- */
.r-nutri {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--pop-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.r-nutri-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.r-nutri-head h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.r-nutri-head .eyebrow-comment {
  font-size: 10px;
}

.r-nutri-cal {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--orange-soft) 0%, rgba(244, 214, 122, 0.28) 100%);
  border: 1px solid rgba(255, 109, 46, 0.28);
  border-radius: var(--r-md);
}

.r-nutri-cal .num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--ink);
}

.r-nutri-cal .unit {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 6px;
}

.r-nutri-cal .per {
  margin-left: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.2;
}

.r-nutri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.r-macro {
  padding: 12px 10px 10px;
  background: var(--cream-soft);
  border: 1px dashed var(--rule);
  border-radius: var(--r-md);
  text-align: center;
  position: relative;
}

.r-macro .ring {
  width: 34px;
  height: 34px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-c) calc(var(--ring-p) * 1%), var(--cream-deep) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.r-macro .ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--paper);
  border-radius: 50%;
}

.r-macro .ring b {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 600;
}

.r-macro .v {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.r-macro .v sup {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-muted);
}

.r-macro .l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}

.r-nutri-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.r-nutri-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--matcha-soft);
  color: var(--matcha-deep);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.r-nutri-tag.warm {
  background: var(--orange-soft);
  color: var(--orange-text);
}

.r-nutri-tag.warm-y {
  background: rgba(244, 214, 122, 0.4);
  color: #8a6a14;
}

.r-nutri-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.r-nutri-actions .btn {
  flex: 1;
  padding: 11px 14px;
  font-size: 12px;
}

/* ============================================================
   HERO RIGHT — stacks nutrition glance + order now (new design)
   ============================================================ */
.r-hero-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Nutrition glance card (replaces r-nutri in new design) */
.r-nutri-glance {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.r-nutri-glance .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.r-nutri-glance .head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.r-nutri-glance .card-eyebrow {
  font-size: 10px;
}

.r-macro-rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.r-nutri-glance .actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.r-nutri-glance .actions .btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 12.5px;
}

/* ============================================================
   ORDER NOW — GPS-gated partner kitchens prompt (new design)
   ============================================================ */
@keyframes r-pulse-mini {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

.r-order {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: 6px 6px 0 var(--matcha);
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.r-order>* {
  position: relative;
  z-index: 1;
}

.r-order-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.r-order-head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.r-order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
  padding: 4px 9px;
  border: 1px dashed var(--orange-deep);
  border-radius: 999px;
  background: var(--orange-soft);
}

.r-order-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: r-pulse-mini 1.6s ease-in-out infinite;
}

.r-order-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.r-order-title em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--orange);
}

.r-order-blurb {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.r-order-blurb b {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

.r-order-bullets {
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.r-order-bullets li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.r-order-bullets .bullet {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--matcha-deep);
  text-align: center;
}

.r-order-bullets .meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.r-order-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.r-order-cta {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--orange-text);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 4px 4px 0 var(--orange-deep);
  transition: transform 160ms, box-shadow 160ms;
  cursor: pointer;
  white-space: nowrap;
}

.r-order-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--orange-deep);
}

.r-order-cta:active {
  transform: translate(0, 0);
  box-shadow: 3px 3px 0 var(--orange-deep);
}

.r-order-cta-glyph {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.r-order-skip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  padding: 6px 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: dotted;
  text-decoration-color: var(--ink-faint);
  cursor: pointer;
}

.r-order-skip:hover {
  color: var(--ink);
}

.r-order-foot {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.r-order-foot::before {
  content: "// ";
  color: var(--matcha-deep);
}

.r-order-err {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--berry, #a23a4a);
  letter-spacing: 0.02em;
}

.r-order-place {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin: -4px 0 2px;
  padding: 5px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--matcha-soft, var(--cream-soft));
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.r-order-place-pin {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-text);
}

/* Place (city · pincode) pill shown in the order-now header once located. */
.r-order-place-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 62%;
  padding: 4px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--matcha-soft, var(--cream-soft));
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r-order-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.r-order-rest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--cream-soft);
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
}

.r-order-rest:hover {
  transform: translate(-1px, -1px);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--matcha);
}

.r-order-rest-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.r-order-rest-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.r-order-rest-star {
  color: var(--orange-text);
}

.r-order-rest-go {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms, color 160ms;
}

.r-order-rest-go:hover {
  background: var(--orange-text);
  color: var(--paper);
  border-color: var(--orange-text);
}

/* ============================================================
   STAGE — main step + sidebar
   ============================================================ */
.r-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

/* ----- main step card ----- */
.r-step-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  padding: 32px 36px 28px;
  box-shadow: 6px 6px 0 var(--matcha);
  position: relative;
}

.r-step-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.r-step-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.r-step-tag b {
  color: var(--ink);
  font-weight: 600;
}

.r-step-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rule), transparent);
}

.r-step-pacing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

.r-step-pacing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse-mini 1.6s ease-in-out infinite;
}

@keyframes pulse-mini {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

.r-step-title {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.r-step-detail {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.r-step-image {
  margin: 20px 0 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--ink);
  overflow: hidden;
  background: var(--cream-deep);
  position: relative;
}

.r-step-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r-step-image .placeholder {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(31, 26, 20, 0.06) 0 12px, transparent 12px 24px),
    var(--cream-soft);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.r-step-image .cap {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 252, 243, 0.92);
  border: 1px solid var(--rule);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink);
  backdrop-filter: blur(6px);
}

.r-step-tip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
  background: var(--matcha-soft);
  border-left: 3px solid var(--matcha);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.r-step-tip .label-h {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  color: var(--matcha-deep);
  white-space: nowrap;
}

.r-step-tip p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--matcha-deep);
}

.r-step-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule);
}

.r-step-foot-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  display: flex;
  gap: 14px;
  align-items: center;
}

.r-step-foot-meta b {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   SIDEBAR — ingredients + utensils with thumbnails
   ============================================================ */
.r-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 80px;
}

.r-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--pop-md);
  overflow: hidden;
}

.r-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  cursor: pointer;
  user-select: none;
}

.r-card-head:hover {
  background: var(--cream-soft);
}

.r-card-head h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.r-card-head .count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-style: normal;
}

.r-chev {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: grid;
  place-items: center;
  font-size: 11px;
  transition: transform 240ms;
}

.r-card.open .r-chev {
  transform: rotate(180deg);
}

.r-card-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms cubic-bezier(.2, .8, .2, 1);
}

.r-card.open .r-card-body {
  grid-template-rows: 1fr;
}

.r-card-body>div {
  overflow: hidden;
}

.r-card-inner {
  padding: 4px 14px 16px;
  border-top: 1px dashed var(--rule);
}

.r-servings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--cream-deep);
  border-radius: var(--r-md);
  margin: 12px 0 10px;
}

.r-servings .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.r-serv-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.r-serv-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all 160ms;
}

.r-serv-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.r-serv-val {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  min-width: 18px;
  text-align: center;
}

.r-ing-list,
.r-ut-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.r-ing-row,
.r-ut-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 6px 10px 6px 6px;
  background: var(--cream-soft);
  border-radius: var(--r-md);
  font-size: 13px;
  transition: all 200ms;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
}

.r-ing-row {
  grid-template-columns: 42px 1fr auto 28px;
}

.r-ut-row {
  grid-template-columns: 42px 1fr 28px;
}

.r-ing-row:hover,
.r-ut-row:hover {
  border-color: var(--rule-strong);
  background: var(--paper);
}

.r-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--cream-deep);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 18px;
}

.r-thumb.essential::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--paper);
}

.r-ing-row .name,
.r-ut-row .name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.r-ing-amt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange-text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.r-ing-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  transition: background 180ms, color 180ms, border-color 180ms, transform 200ms;
  flex-shrink: 0;
  justify-self: end;
}

.r-ing-row:hover .r-ing-arrow,
.r-ut-row:hover .r-ing-arrow {
  background: var(--orange-text);
  color: var(--paper);
  border-color: var(--orange-deep);
  transform: translateX(2px);
}

.r-card-foot {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px dashed var(--rule);
}

.r-card-foot .btn {
  flex: 1;
}

/* ============================================================
   HEALTH MARQUEE
   ============================================================ */
.r-marquee {
  margin-top: 32px;
  background: var(--matcha);
  color: var(--paper);
  border-radius: var(--r-md);
  border: 1.5px solid var(--matcha-deep);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  height: 52px;
}

.r-marquee-tag {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--matcha-deep);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  height: 52px;
}

.r-marquee-tag .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--butter);
  animation: pulse-mini 1.6s ease-in-out infinite;
}

.r-marquee-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 52px;
}

.r-marquee-strip {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: r-scroll 38s linear infinite;
  width: max-content;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
}

.r-marquee-strip .item {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 56px;
}

.r-marquee-strip .item::after {
  content: "✷";
  color: var(--butter);
  font-size: 12px;
  font-style: normal;
}

@keyframes r-scroll {
  from {
    transform: translate(0, -50%);
  }

  to {
    transform: translate(-50%, -50%);
  }
}

/* ============================================================
   MUSIC-STYLE PLAYER (always visible, fixed bottom)
   ============================================================ */
.r-player {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 16px));
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  z-index: 60;
  box-shadow: 0 14px 36px -10px rgba(31, 26, 20, 0.32), 3px 3px 0 var(--ink);
}

.r-player-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 14px 8px 10px;
  min-height: 60px;
}

/* ---- TRANSPORT (prev / play / next) ---- */
.r-pl-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.r-pl-step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  transition: color 160ms, background 160ms, transform 120ms;
}

.r-pl-step:hover:not(:disabled) {
  color: var(--ink);
  background: var(--cream-deep);
}

.r-pl-step:active:not(:disabled) {
  transform: scale(0.92);
}

.r-pl-step:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.r-pl-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms, background 160ms;
  flex-shrink: 0;
  margin: 0 2px;
}

.r-pl-play:hover {
  background: var(--orange-text);
}

.r-pl-play:active {
  transform: scale(0.94);
}

.r-player.playing .r-pl-play {
  background: var(--orange-text);
  animation: pl-pulse 1.6s ease-in-out infinite;
}

@keyframes pl-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 109, 46, 0.45);
  }

  60% {
    box-shadow: 0 0 0 8px rgba(255, 109, 46, 0);
  }
}

/* ---- NOW PLAYING (counter + name + bar + time) ---- */
.r-pl-now {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.r-pl-now-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.r-pl-counter {
  flex-shrink: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--orange-text);
  font-variant-numeric: tabular-nums;
}

.r-pl-counter .dim {
  color: var(--ink-muted);
  font-weight: 400;
}

.r-pl-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* progress bar */
.r-pl-bar {
  position: relative;
  height: 4px;
  background: var(--cream-deep);
  border-radius: 999px;
  cursor: pointer;
  overflow: visible;
}

.r-pl-bar::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}

.r-pl-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--orange);
  border-radius: 999px;
  transition: width 600ms linear;
}

.r-pl-bar-knob {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--orange-text);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 180ms;
  pointer-events: none;
}

.r-pl-bar:hover .r-pl-bar-knob,
.r-player.playing .r-pl-bar-knob {
  transform: translate(-50%, -50%) scale(1);
}

.r-pl-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.r-pl-time {
  color: var(--ink);
  font-weight: 500;
}

.r-pl-time.end {
  color: var(--ink-muted);
  font-weight: 400;
}

.r-pl-status {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.r-player.playing .r-pl-status {
  color: var(--orange-text);
}

/* ---- STEP DOTS (right side) ---- */
.r-pl-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border-left: 1px dashed var(--rule);
  margin-left: 2px;
  padding-left: 12px;
}

.r-pl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream-deep);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  transition: all 180ms;
  padding: 0;
}

.r-pl-dot:hover {
  transform: scale(1.25);
  border-color: var(--ink);
}

.r-pl-dot.done {
  background: var(--matcha);
  border-color: var(--matcha-deep);
}

.r-pl-dot.now {
  background: var(--orange);
  border-color: var(--ink);
  width: 22px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 109, 46, 0.18);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .r-stage {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
  }

  .r-side {
    position: static;
  }

  .r-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .r-hero-right {
    flex-direction: column;
  }

  .r-hero-stage {
    aspect-ratio: 1 / 1;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    box-shadow: 6px 6px 0 var(--orange);
  }
}

@media (max-width: 880px) {
  .r-stage {
    grid-template-columns: 1fr;
  }

  .r-step-card {
    padding: 24px;
  }

  .r-nutri-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .r-hero-right {
    flex-direction: column;
  }

  /* Once stacked into a column, flex-basis 280px (from the side-by-side rule)
     would constrain card HEIGHT; combined with overflow:hidden it crops the
     order card. Let cards size to their content instead — like the nutrition
     card. */
  .r-hero-right > *,
  .r-order {
    flex: 0 0 auto;
  }

}

@media (max-width: 640px) {
  .recipe-page {
    padding: 80px 0 140px;
  }

  .r-step-card {
    padding: 20px;
    border-radius: var(--r-lg);
  }

  .r-player {
    width: calc(100vw - 12px);
    bottom: 6px;
  }

  .r-player-inner {
    padding: 6px 10px 6px 6px;
    gap: 10px;
    min-height: 54px;
  }

  .r-pl-controls {
    gap: 0;
  }

  .r-pl-step {
    width: 26px;
    height: 26px;
  }

  .r-pl-step svg {
    width: 12px;
    height: 12px;
  }

  .r-pl-play {
    width: 34px;
    height: 34px;
  }

  .r-pl-name {
    font-size: 12px;
  }

  .r-pl-dots {
    padding-left: 8px;
    gap: 4px;
  }

  .r-pl-dot {
    width: 6px;
    height: 6px;
  }

  .r-pl-dot.now {
    width: 16px;
  }

  .r-hero-stage {
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-lg);
  }

  .r-hero-title {
    font-size: clamp(32px, 9vw, 48px);
  }

  .r-hero-tagline {
    font-size: 16px;
  }

  .r-save-icon {
    width: 44px;
    height: 44px;
    top: 12px;
    right: 12px;
  }

  .r-save-icon .heart {
    font-size: 18px;
  }

  .r-marquee-strip .item {
    font-size: 15px;
    gap: 36px;
  }

  .r-marquee-strip .item::after {
    content: "·";
  }
}
/* ============================================================
   FULL FDA-SHAPED NUTRITION SECTION
   ============================================================ */
.r-nutri-full {
  margin-top: 36px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--pop-md);
  padding: 28px 32px 32px;
  scroll-margin-top: 120px;
}
.r-nutri-full-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}
.r-nutri-full-head h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.r-nutri-full-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--orange);
}
.r-nutri-full-blurb {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 6px;
  max-width: 62ch;
  line-height: 1.5;
}
.r-nutri-full-source {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-align: right;
  max-width: 340px;
}
.r-nutri-full-source strong {
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

.r-nutri-mode {
  display: inline-flex;
  padding: 4px;
  background: var(--cream-deep);
  border-radius: var(--r-pill);
  margin-bottom: 18px;
  gap: 2px;
}
.r-nutri-mode button {
  padding: 8px 18px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms;
}
.r-nutri-mode button:hover:not(:disabled) { color: var(--ink); }
.r-nutri-mode button:disabled { opacity: 0.4; cursor: not-allowed; }
.r-nutri-mode button.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
}
.r-nutri-mode .count {
  margin-left: 6px;
  opacity: 0.6;
  font-weight: 400;
}

.r-nutri-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.r-nutri-tabs::-webkit-scrollbar { height: 4px; }
.r-nutri-tabs::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }
.r-nutri-tab {
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 160ms, border-color 160ms;
}
.r-nutri-tab:hover { color: var(--ink); }
.r-nutri-tab.active {
  color: var(--ink);
  border-bottom-color: var(--orange-text);
  font-weight: 600;
}
.r-nutri-tab .badge {
  background: var(--cream-deep);
  color: var(--ink-muted);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 500;
}
.r-nutri-tab.active .badge {
  background: var(--orange-soft);
  color: var(--orange-text);
}

.r-nutri-group { margin-bottom: 22px; }
.r-nutri-group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.r-nutri-group-title::before {
  content: "/";
  color: var(--orange-text);
  font-weight: 700;
}
.r-nutri-group-title .grp-count {
  margin-left: auto;
  color: var(--ink-muted);
}

.r-nutri-grid.r-nutri-grid--cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
.r-nutri-cell {
  background: var(--paper);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: background 160ms;
}
.r-nutri-cell:hover { background: var(--cream-soft); }
.r-nutri-cell .name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-nutri-cell .val {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  font-weight: 400;
  white-space: nowrap;
}
.r-nutri-cell .val .unit {
  font-family: var(--mono);
  font-style: normal;
  font-size: 9.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.r-nutri-cell .dv {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 86px;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.r-nutri-cell .dv .dv-bar { width: 42px; flex: none; }
.r-nutri-cell .dv .pct { font-weight: 600; color: var(--ink-muted); min-width: 30px; text-align: right; }
.r-nutri-cell .dv.nodv { color: var(--ink-faint); }
.r-nutri-cell.flag-high::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--matcha);
}
.r-nutri-cell.flag-warn::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--berry);
}
.r-nutri-cell.flag-high .val { color: var(--matcha-deep); }
.r-nutri-cell.flag-warn .val { color: var(--berry); }

.dv-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
  margin-top: 4px;
  position: relative;
}
.dv-bar > span {
  display: block;
  height: 100%;
  background: var(--matcha);
  border-radius: 2px;
  transition: width 320ms cubic-bezier(.2, .8, .2, 1);
}
.dv-bar > span.warn { background: var(--berry); }
.dv-bar > span.over {
  background: repeating-linear-gradient(45deg,
    var(--berry) 0 4px, #b3434f 4px 8px);
}

.r-nutri-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  align-items: center;
}
.r-nutri-legend .item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.r-nutri-legend .sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.r-nutri-legend .sw.high { background: var(--matcha); }
.r-nutri-legend .sw.warn { background: var(--berry); }
.r-nutri-legend .sw.regular { background: var(--rule-strong); }
.r-nutri-legend .dv-ref { margin-left: auto; }

.r-nutri-disclaim {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  max-width: 80ch;
  line-height: 1.5;
}
.r-nutri-disclaim em {
  font-style: italic;
  color: var(--ink-muted);
}

@media (max-width: 880px) {
  .r-nutri-full { padding: 22px; }
  .r-nutri-grid.r-nutri-grid--cells {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}
@media (max-width: 520px) {
  .r-nutri-grid.r-nutri-grid--cells {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Recipe-detail redesign (parity with Flutter): square-hero decision panel,
   servings slider, collapsed sections, dense nutrition, full-screen player.
   ========================================================================== */

/* Hero decision panel (right column) header spacing. The square-photo grid is
   set on the base .r-hero rule so the mobile media query can still override it. */
.r-hero-right .r-hero-header { display: flex; flex-direction: column; gap: 10px; margin-bottom: 2px; }
/* Hero sits tighter above the now full-width Cook-now CTA, which spans the whole
   container (not the narrow right column) and leads into the collapsed sections. */
.r-hero { margin-bottom: 18px; }
.r-cook-cta { margin-bottom: 14px; }

/* Stacked collapsed sections below the hero. */
.r-sections { display: flex; flex-direction: column; gap: 14px; }

/* ── Servings slider card ─────────────────────────────────────────────────── */
.r-serv-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 18px 12px;
}
.r-serv-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.r-serv-card-head h3 {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; color: var(--ink); margin: 0;
}
.r-serv-card-head p { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin: 2px 0 0; letter-spacing: 0.02em; }
.r-serv-badge {
  flex: none; min-width: 44px; text-align: center;
  font-family: var(--sans); font-weight: 600; font-size: 22px; line-height: 1; color: var(--orange-text);
  background: var(--orange-soft); border: 1.5px solid var(--orange); border-radius: 999px; padding: 6px 14px;
}
.r-serv-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 14px 0 0;
  background: var(--cream-deep); border-radius: 999px; outline: none; cursor: pointer;
}
.r-serv-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 999px;
  background: linear-gradient(var(--orange), var(--orange)) 0/var(--fill, 0) no-repeat, var(--cream-deep); }
.r-serv-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px;
  background: var(--ink); border: 2px solid var(--paper); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.r-serv-slider::-moz-range-track { height: 6px; border-radius: 999px; background: var(--cream-deep); }
.r-serv-slider::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--orange); }
.r-serv-slider::-moz-range-thumb { width: 18px; height: 18px; background: var(--ink); border: 2px solid var(--paper); border-radius: 50%; }
.r-serv-ticks { display: flex; justify-content: space-between; margin: 7px 4px 0;
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.r-serv-ticks .on { color: var(--orange-text); font-weight: 600; }

/* ── Cook now CTA ─────────────────────────────────────────────────────────── */
.r-cook-cta {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--orange); color: var(--paper); border: 1.5px solid var(--ink);
  border-radius: var(--r-lg); box-shadow: 4px 4px 0 var(--ink); padding: 13px 16px; transition: transform 80ms, box-shadow 80ms;
}
.r-cook-cta:hover { transform: translate(1px,1px); box-shadow: 3px 3px 0 var(--ink); }
.r-cook-cta:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.r-cook-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.r-cook-cta-play { flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 50%; }
.r-cook-cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-cook-cta-txt b { font-family: var(--sans); font-weight: 600; font-size: 17px; }
.r-cook-cta-txt span { font-family: var(--mono); font-size: 10.5px; opacity: 0.9; letter-spacing: 0.02em; }
.r-cook-cta-arrow { flex: none; font-size: 18px; }

/* ── Method (collapsed steps overview) ────────────────────────────────────── */
.r-method-list { display: flex; flex-direction: column; }
.r-method-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: 9px 2px; border-bottom: 1px solid var(--rule); color: inherit; }
.r-method-row:last-child { border-bottom: none; }
.r-method-row:hover .r-method-title { color: var(--orange-text); }
.r-method-n { flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--cream-deep); border: 1.5px solid var(--ink); border-radius: 50%;
  font-family: var(--mono); font-size: 11px; color: var(--ink); }
.r-method-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.r-method-title { font-size: 14.5px; color: var(--ink); line-height: 1.25; }
.r-method-dur { font-family: var(--mono); font-size: 10.5px; color: var(--ink-muted); }
.r-method-play { flex: none; color: var(--orange-text); display: grid; place-items: center; }

/* ── Nutrition glance: collapsible ────────────────────────────────────────── */
.r-nutri-glance.collapsible .head { cursor: pointer; }
.r-nutri-glance .head .kcal-sum { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.r-nutri-glance .head .r-chev { margin-left: 10px; color: var(--ink-muted); transition: transform 200ms; }
.r-nutri-glance.collapsible.open .head .r-chev { transform: rotate(180deg); }
.r-nutri-glance .actions .btn { width: 100%; }

/* ── Full nutrition: embedded inside a CollapseCard ───────────────────────── */
.r-nutri-full.embedded { background: none; border: none; box-shadow: none; padding: 0; border-radius: 0; }
.r-nutri-full-prov { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); margin: 0 0 14px; letter-spacing: 0.02em; }

/* ── Full-screen cooking player ───────────────────────────────────────────── */
.r-cook-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--ink); overflow: hidden; }
.r-cook-bg { position: absolute; inset: 0; background-size: cover; background-position: center;
  background-color: var(--cream-deep); display: grid; place-items: center; }
.r-cook-emoji { font-size: 140px; opacity: 0.5; }
.r-cook-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(31,26,20,0.55) 0%, rgba(31,26,20,0.08) 16%,
    rgba(31,26,20,0) 42%, rgba(31,26,20,0.78) 80%, rgba(31,26,20,0.95) 100%); }
.r-cook-ui { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.r-cook-top { display: flex; align-items: center; justify-content: space-between; }
.r-cook-counter { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--paper);
  text-shadow: 0 1px 6px rgba(31,26,20,.7); }
.r-cook-icon { width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
  background: rgba(31,26,20,0.45); color: var(--paper); border: 1.2px solid rgba(255,252,243,0.6);
  border-radius: 50%; font-size: 16px; transition: background 160ms; }
.r-cook-icon.on { background: var(--orange); border-color: var(--orange); }
.r-cook-caption { margin-top: auto; max-width: 760px; }
.r-cook-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--butter); text-shadow: 0 1px 6px rgba(31,26,20,.8); }
.r-cook-eyebrow span { color: rgba(255,252,243,0.75); margin-left: 8px; }
.r-cook-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(24px, 4vw, 34px);
  color: var(--paper); line-height: 1.1; margin: 8px 0 0; text-shadow: 0 2px 10px rgba(31,26,20,.85); }
.r-cook-detail { font-size: clamp(15px, 2vw, 18px); line-height: 1.45; color: rgba(255,252,243,0.94);
  margin: 10px 0 0; max-width: 680px; text-shadow: 0 1px 8px rgba(31,26,20,.8); }
.r-cook-tip { margin: 12px 0 0; max-width: 680px; background: rgba(122,156,90,0.92); border-radius: var(--r-md);
  padding: 10px 12px; }
.r-cook-tip .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper); }
.r-cook-tip p { color: var(--paper); font-size: 14px; margin: 3px 0 0; line-height: 1.4; }
.r-cook-controls { margin-top: 16px; max-width: 760px; align-self: center; width: 100%; }
.r-cook-time { display: flex; align-items: baseline; gap: 12px; }
.r-cook-time b { font-family: var(--mono); font-size: 38px; font-weight: 600; color: var(--paper);
  text-shadow: 0 2px 10px rgba(31,26,20,.85); line-height: 1; }
.r-cook-time span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,252,243,0.6); }
.r-cook-time span.on { color: var(--butter); }
.r-cook-time i { margin-left: auto; font-family: var(--mono); font-style: normal; font-size: 12px; color: rgba(255,252,243,0.6); }
.r-cook-untimed { font-family: var(--mono); font-size: 12px; color: rgba(255,252,243,0.7); text-align: center; padding: 6px 0; }
.r-cook-bar { height: 7px; border-radius: 4px; background: rgba(255,252,243,0.25); margin-top: 10px; cursor: pointer; overflow: hidden; }
.r-cook-bar-fill { height: 100%; background: var(--orange); border-radius: 4px; }
.r-cook-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.r-cook-dot { width: 7px; height: 7px; padding: 0; border: none; border-radius: 4px; cursor: pointer;
  background: rgba(255,252,243,0.32); transition: width 200ms, background 200ms; }
.r-cook-dot.done { background: var(--paper); }
.r-cook-dot.now { width: 20px; background: var(--orange); }
.r-cook-transport { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 18px; }
.r-cook-tbtn { width: 50px; height: 50px; display: grid; place-items: center; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 80ms, box-shadow 80ms; }
.r-cook-tbtn:hover { transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.r-cook-tbtn:disabled { opacity: 0.35; cursor: not-allowed; }
.r-cook-tbtn.play { width: 66px; height: 66px; background: var(--orange); color: var(--paper); }
@media (max-width: 560px) {
  .r-cook-tbtn { width: 46px; height: 46px; }
  .r-cook-tbtn.play { width: 60px; height: 60px; }
  .r-cook-time b { font-size: 32px; }
}
