/* UAU Kitchen — app-specific styles layered on shadcn tokens */

:root {
  --uau: oklch(0.64 0.15 38);
  --uau-foreground: oklch(0.985 0 0);
  --uau-soft: oklch(0.96 0.04 50);
  --uau-soft-foreground: oklch(0.40 0.12 38);

  --macro-carb: rgb(126, 126, 215);
  --macro-protein: rgb(157, 115, 236);
  --macro-fat: rgb(212, 164, 241);
  --macro-fiber: oklch(0.65 0.08 150);

  --tab-bar-h: 58px;
  --topbar-h: 72px;
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 72px;
  --rail-w: 300px;
}

/* iOS Safari auto-zooms into a focused field when its font-size is < 16px,
   and never zooms back out. Force --text-base (1rem) on iOS WebKit only so
   desktop and Android keep the project's smaller input typography. */
@supports (-webkit-touch-callout: none) {
  @media (hover: none) and (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
    textarea,
    select,
    [contenteditable="true"] {
      font-size: var(--text-base);
    }
  }
}

/* =========================================================================
   App shell — flex row that hosts sidebar + main + optional right rail.
   Mobile: single column, bottom tab-bar.
   Tablet (≥768): collapsed sidebar (icon-only).
   Desktop (≥1200): full sidebar + right rail.
   ========================================================================= */
.uau-shell {
  display: flex;
  /* Locked to the dynamic viewport so Safari's address bar transition can't
     leave a gap below the (static, in-flow) tab bar: when dvh grows, the
     shell grows with it and the tab bar stays glued to the bottom. */
  height: 100dvh;
  overflow: hidden;
  background: var(--background);
  color: var(--foreground);
}

/* Lock document scroll while the shell is mounted. Without this, an
   absolutely-positioned descendant with visibility:hidden but real layout
   (e.g. a closed ui/select dropdown) extends documentElement.scrollHeight
   past the viewport, letting iOS Safari scroll the whole page and drag the
   in-flow tab bar away from the bottom. */
html:has(> body > .uau-shell),
body:has(> .uau-shell) {
  overflow: hidden;
  height: 100%;
}

.uau-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.uau-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 20px 20px;
}
.uau-body::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .uau-body { padding: 24px 24px 32px; }
}
@media (min-width: 1200px) {
  .uau-body { padding: 28px 32px 40px; }
}

/* =========================================================================
   Sidebar (tablet/desktop)
   ========================================================================= */
.uau-sidebar {
  display: none;
  width: var(--sidebar-w-collapsed);
  flex-shrink: 0;
  flex-direction: column;
  background: var(--background);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100dvh;
}

@media (min-width: 768px) { .uau-sidebar { display: flex; } }
@media (min-width: 1200px) {
  .uau-sidebar { width: var(--sidebar-w); padding: 22px 16px; }
}

.uau-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.uau-sidebar__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.uau-sidebar__brand-name {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  display: none;
}
@media (min-width: 1200px) { .uau-sidebar__brand-name { display: block; } }

.uau-sidebar__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  margin-bottom: 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.uau-sidebar__cta-label { display: none; }
@media (min-width: 1200px) { .uau-sidebar__cta-label { display: inline; } }

.uau-sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.uau-sidebar__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.uau-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.uau-sidebar__item[data-active="true"] {
  background: var(--accent);
  color: var(--foreground);
  font-weight: 600;
}
.uau-sidebar__item-label {
  display: none;
  flex: 1;
}
@media (min-width: 1200px) {
  .uau-sidebar__item { justify-content: flex-start; padding: 10px 12px; }
  .uau-sidebar__item-label { display: inline; }
}

/* Coleções — section label + list items (desktop only, full sidebar) */
.uau-sidebar__section-label {
  display: none;
  margin: 14px 12px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.uau-sidebar__collection {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.uau-sidebar__collection:hover {
  background: var(--accent);
  color: var(--foreground);
}
.uau-sidebar__collection-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--muted-foreground);
  opacity: 0.5;
  flex-shrink: 0;
}
.uau-sidebar__collection-label { flex: 1; min-width: 0; }
.uau-sidebar__collection-count {
  font-size: 11px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* Active cooking sessions — links at the bottom of the nav that take the
   cook straight back into guided mode. Small pulsing dot signals "live". */
.uau-sidebar__active-session {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.uau-sidebar__active-session:hover { background: var(--accent); }
.uau-sidebar__active-session-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: oklch(0.72 0.16 140);
  flex-shrink: 0;
  animation: sidebar-active-pulse 1.8s ease-in-out infinite;
}
@keyframes sidebar-active-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(80, 185, 100, 0.6); }
  50%      { box-shadow: 0 0 0 5px rgba(80, 185, 100, 0); }
}
.uau-sidebar__active-session-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uau-sidebar__active-session-step {
  font-size: 11px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .uau-sidebar__section-label  { display: block; }
  .uau-sidebar__collection     { display: flex; }
  .uau-sidebar__active-session { display: flex; }
}

/* User card (sidebar footer — desktop only full, collapsed on tablet) */
.uau-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  justify-content: center;
}
.uau-sidebar__user:hover { background: var(--accent); }
.uau-sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: oklch(0.72 0.12 25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.uau-sidebar__user-body { display: none; flex: 1; min-width: 0; text-align: left; }
.uau-sidebar__user-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uau-sidebar__user-email {
  display: block;
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uau-sidebar__user-more { display: none; color: var(--muted-foreground); flex-shrink: 0; }
@media (min-width: 1200px) {
  .uau-sidebar__user { justify-content: flex-start; }
  .uau-sidebar__user-body { display: block; }
  .uau-sidebar__user-more { display: inline-block; }
}

/* =========================================================================
   Top bar (tablet/desktop) — title + centered search + actions
   ========================================================================= */
.uau-topbar {
  display: none;
  align-items: center;
  gap: 24px;
  height: var(--topbar-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 5;
}
@media (min-width: 768px) { .uau-topbar { display: flex; } }
@media (min-width: 1200px) { .uau-topbar { padding: 0 32px; } }

.uau-topbar__title {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.uau-topbar__greet {
  font-size: 12px;
  color: var(--muted-foreground);
}
.uau-topbar__h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.uau-topbar__search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
}
.uau-topbar__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* =========================================================================
   Mobile app bar (top) — hidden on tablet+
   ========================================================================= */
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 12px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}
@media (min-width: 768px) { .app-bar { display: none; } }

.app-bar__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.app-bar__right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   Shared search field
   ========================================================================= */
.search-bar__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 40px;
  background: var(--secondary);
  border-radius: var(--radius-md);
  padding: 0 8px 0 36px;
}
.search-bar__icon {
  position: absolute;
  left: 12px;
  color: var(--muted-foreground);
  pointer-events: none;
}
.search-bar__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: var(--foreground);
  padding: 0;
}
.search-bar__input::placeholder { color: var(--muted-foreground); }
.search-bar__kbd {
  font-size: 10.5px;
  color: var(--muted-foreground);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono, ui-monospace, monospace);
}

/* =========================================================================
   Bottom tab bar (mobile only)
   ========================================================================= */
/* In-flow (not fixed) flex child of .uau-main. With .uau-shell locked to
   100dvh, this renders glued to the visual viewport bottom even as Safari's
   address bar animates in/out — no gap, no jump. safe-area-inset-bottom
   keeps the bar above the iPhone home-indicator. */
.tab-bar {
  flex-shrink: 0;
  height: calc(var(--tab-bar-h) + env(safe-area-inset-bottom));
  /* Icons centered vertically so the gap above/below the icon+label group
     is symmetric — the safe-area inset only adds to the bottom chrome, not
     the "visible" bar area the icons live in. */
  padding: 0 8px env(safe-area-inset-bottom);
  background: oklch(from var(--background) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 10;
}
@media (min-width: 768px) { .tab-bar { display: none; } }

.tab-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted-foreground);
  padding: 4px 10px;
  background: none;
  border: 0;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.tab-bar__item[data-active="true"] { color: var(--foreground); }
.tab-bar__item svg { width: 22px; height: 22px; }

/* =========================================================================
   Right rail (desktop only)
   ========================================================================= */
.uau-rail {
  display: none;
  width: 260px;
  flex-shrink: 0;
  flex-direction: column;
  gap: 16px;
  padding: 24px 20px 32px 0;
}
@media (min-width: 1024px) { .uau-rail { display: flex; } }
@media (min-width: 1200px) {
  .uau-rail { width: var(--rail-w); gap: 20px; padding: 28px 24px 40px 0; }
}

.rail-card {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.rail-card__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.rail-card__hdr svg { color: var(--muted-foreground); }
.rail-card__row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.rail-card__row:first-of-type { border-top: 0; padding-top: 0; }
.rail-card__accent {
  width: 4px;
  border-radius: 4px;
  background: var(--primary);
  flex-shrink: 0;
}
.rail-card__empty {
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 8px 0;
  line-height: 1.45;
}
a.rail-card:hover { border-color: var(--foreground); }

/* =========================================================================
   Recipe card
   ========================================================================= */
.recipe-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.recipe-card__cover {
  aspect-ratio: 16 / 11;
  background: var(--muted);
  position: relative;
  overflow: hidden;
}
.recipe-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-card__cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--muted) 0%, var(--secondary) 100%);
  color: var(--muted-foreground);
}
.recipe-card__body { padding: 12px 14px 14px; }
.recipe-card__title {
  font-size: 15px; font-weight: 600; line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.recipe-card__meta {
  display: flex; gap: 10px;
  font-size: 12px; color: var(--muted-foreground);
  align-items: center;
  flex-wrap: wrap;
}
.recipe-card__meta > span {
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}

/* Compact variant — 240px wide, 4:3 cover. For inline lists / rail / suggestions. */
.recipe-card--compact {
  width: 240px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}
.recipe-card--compact .recipe-card__cover { aspect-ratio: 4 / 3; }
.recipe-card--compact .recipe-card__body { padding: 12px; }
.recipe-card--compact .recipe-card__title {
  font-size: 13.5px;
  margin-bottom: 4px;
}
.recipe-card--compact .recipe-card__meta {
  gap: 10px;
  font-size: 11.5px;
}

.share-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  background: var(--foreground);
  color: var(--background);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: share-toast-in 160ms ease-out;
}
@keyframes share-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Live search dropdown (Cmd+K) — absolute under the topbar input */
.uau-topbar__search { position: relative; }
.live-search__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  padding: 4px;
  z-index: 40;
  max-height: 420px;
  overflow-y: auto;
}
.live-search__dropdown[hidden] { display: none; }
.live-search__results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.live-search__result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
}
.live-search__result:hover,
.live-search__result[data-highlighted="true"] {
  background: var(--accent);
}
.live-search__result-icon {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.live-search__result-body { flex: 1; min-width: 0; }
.live-search__result-title {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-search__result-meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-search__result-arrow {
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.live-search__empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted-foreground);
}
.live-search__hint {
  padding: 8px 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted-foreground);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.live-search__hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--background);
  font-family: inherit;
  font-size: 10.5px;
  color: var(--muted-foreground);
  margin-right: 4px;
}

.batch-total {
  margin-top: 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
}
.batch-total strong { color: var(--foreground); font-weight: 600; }

/* Shared empty state — centered SVG illustration + title + description + CTAs */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.empty-state__art {
  width: 120px; height: 80px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.empty-state__art svg { width: 100%; height: 100%; }
.empty-state__art[data-variant="icon"] {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty-state__art[data-variant="icon"] .empty-state__icon {
  width: 24px; height: 24px;
}
.empty-state__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.empty-state__desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.55;
}
.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}
.empty-state__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  background: var(--foreground);
  color: var(--background);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.empty-state__cta:hover { opacity: 0.9; }
.empty-state__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.empty-state__secondary:hover { background: var(--accent); }

.recipe-fork-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

.similar-recipes {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.similar-recipes__rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.similar-recipes__rail::-webkit-scrollbar { display: none; }
.similar-recipes__rail > * { scroll-snap-align: start; }

/* Featured hero — aspect ratio widens on larger screens */
.featured-card {
  position: relative;
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--muted);
  text-decoration: none;
  color: #fff;
  margin-bottom: 20px;
}
@media (min-width: 768px)  { .featured-card { aspect-ratio: 21 / 9; margin-bottom: 24px; } }
@media (min-width: 1200px) { .featured-card { aspect-ratio: 24 / 9; margin-bottom: 28px; } }

.featured-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.featured-card__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), oklch(from var(--primary) calc(l + 0.12) c h));
  color: var(--primary-foreground);
}
.featured-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75) 100%);
}
@media (min-width: 768px) {
  .featured-card__overlay {
    background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  }
}
.featured-card__body {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
}
@media (min-width: 768px) {
  .featured-card__body {
    left: 24px; right: auto; bottom: 0; top: 0;
    max-width: 420px;
    display: flex; flex-direction: column; justify-content: center;
  }
}
@media (min-width: 1200px) {
  .featured-card__body { left: 32px; max-width: 460px; }
}
.featured-card__badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
  margin-bottom: 8px;
  width: fit-content;
}
.featured-card__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
@media (min-width: 768px)  { .featured-card__title { font-size: 26px; font-weight: 700; } }
@media (min-width: 1200px) { .featured-card__title { font-size: 32px; } }

.featured-card__desc {
  display: none;
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.5;
  margin-top: 10px;
}
@media (min-width: 1200px) { .featured-card__desc { display: block; } }

.featured-card__meta {
  display: flex; gap: 14px;
  font-size: 12px; margin-top: 8px;
  opacity: 0.9;
}

/* =========================================================================
   Primitives
   ========================================================================= */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--foreground);
  cursor: pointer;
  transition: background .15s;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

/* =========================================================================
   Global timers tray — FAB at bottom-right + right-side sheet
   ========================================================================= */
.timers-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 55;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--foreground);
  color: var(--background);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.timers-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32); }
.timers-fab[data-state="live"] { animation: timers-fab-pulse 2.2s ease-in-out infinite; }
/* Something finished cooking — switch to green so the cook notices. Stronger
   ring pulse + bouncier so it beats whatever else is on screen. */
.timers-fab[data-state="done"] {
  background: oklch(0.72 0.16 140);
  color: #fff;
  animation: timers-fab-done-pulse 1.1s ease-in-out infinite;
}
@keyframes timers-fab-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(0, 0, 0, 0.18); }
  50%      { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(0, 0, 0, 0); }
}
@keyframes timers-fab-done-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(80, 185, 100, 0.55); transform: scale(1); }
  50%      { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 14px rgba(80, 185, 100, 0); transform: scale(1.05); }
}
/* Lift the FAB above the mobile tab bar so they don't overlap. The FAB is
   position:fixed (visual viewport) while the tab bar is now an in-flow flex
   child of .uau-shell — but both end up anchored to the visual bottom, so
   we still need the lift. */
@media (max-width: 767px) {
  .timers-fab { bottom: calc(var(--tab-bar-h) + env(safe-area-inset-bottom) + 12px); }
}
.timers-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: oklch(0.72 0.16 40);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Individual timer row inside the sheet. */
.timer-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
}
.timer-row[data-state="done"] {
  border-color: oklch(0.72 0.16 140);
  background: oklch(0.98 0.03 140);
}
.timer-row__hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.timer-row__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--foreground);
  min-width: 0;
  flex: 1;
}
.timer-row__recipe {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timer-row__step {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timer-row__state-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.timer-row__state-badge--live,
.timer-row__state-badge--done { display: none; }
.timer-row[data-state="live"] .timer-row__state-badge {
  background: oklch(0.94 0.04 240);
  color:      oklch(0.42 0.15 240);
}
.timer-row[data-state="live"] .timer-row__state-badge--live { display: inline; }
.timer-row[data-state="done"] .timer-row__state-badge {
  background: oklch(0.72 0.16 140);
  color: #fff;
}
.timer-row[data-state="done"] .timer-row__state-badge--done { display: inline; }
.timer-row__times {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.timer-row__progress { width: 100%; }
.timer-row__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.timer-row__remaining { font-size: 14px; font-weight: 600; }
.timer-row[data-state="done"] .timer-row__remaining { color: oklch(0.42 0.15 140); }
.timer-row__dismiss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--foreground);
}
.timer-row__dismiss:hover { background: var(--accent); }
.timer-row[data-state="done"] .timer-row__dismiss {
  background: oklch(0.72 0.16 140);
  color: #fff;
  border-color: oklch(0.72 0.16 140);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--muted);
  padding: 3px;
  border-radius: var(--radius-lg);
  gap: 2px;
  width: 100%;
}
.segmented__item {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  cursor: pointer;
  text-decoration: none;
  flex: 1;
  text-align: center;
}
.segmented__item[data-active="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

/* =========================================================================
   Discover tabs (Destaques / Recentes / Em alta / UAU) + sort/view toolbar
   ========================================================================= */
.discover-tabs {
  display: none;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 8px 0 16px;
  padding-bottom: 0;
}
@media (min-width: 48rem) {
  .discover-tabs { display: flex; }
}
.discover-tabs__item {
  padding: 10px 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.discover-tabs__item[data-active="true"] {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
  font-weight: 600;
}
.discover-tabs__item:hover { color: var(--foreground); }

.discover-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 48rem) {
  .discover-toolbar { display: flex; }
}
.discover-toolbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
}
.discover-toolbar__sort > svg { margin-right: 4px; }
.discover-toolbar__sort-item {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-weight: 500;
  text-decoration: none;
}
.discover-toolbar__sort-item[data-active="true"] {
  background: var(--secondary);
  color: var(--foreground);
}
.discover-toolbar__view {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.discover-toolbar__view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  color: var(--muted-foreground);
}
.discover-toolbar__view-btn[data-active="true"] {
  background: var(--secondary);
  color: var(--foreground);
}
.discover-toolbar__view-btn + .discover-toolbar__view-btn { border-left: 1px solid var(--border); }

/* List view — same card, full width + compact meta layout */
.uau-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uau-list .recipe-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: stretch;
}
.uau-list .recipe-card__cover { aspect-ratio: auto; height: 100%; }
.uau-list .recipe-card__body { padding: 12px 14px; }

/* =========================================================================
   Cook-mode split button (Modo Guiado primary + Modo Rápido alt)
   ========================================================================= */
.cook-split {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: visible;
}
.cook-split__main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background: var(--foreground);
  color: var(--background);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.cook-split__chev-wrap {
  display: inline-flex;
  align-items: stretch;
  align-self: stretch;
}
.cook-split__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 999px 999px 0;
  background: var(--foreground);
  color: var(--background);
  cursor: pointer;
}
/* fernandes-ui popover wraps the chev in <div class="relative inline-block">;
   stretch it so the chev button can fill the pill's height. */
.cook-split > [data-controller~="ui--popover"] {
  display: flex;
  align-items: stretch;
}
.cook-split__chev:hover { background: oklch(0.25 0 0); }
.cook-split--sm .cook-split__main {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}
.cook-split--sm .cook-split__chev { padding: 0 10px; }
.cook-split--lg .cook-split__main { padding: 14px 20px; font-size: 15px; }
.cook-split--lg .cook-split__chev { padding: 0 14px; }

.cook-split__menu {
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
}
.cook-split__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
}
.cook-split__option:hover { background: var(--secondary); }
.cook-split__option--active { background: var(--secondary); }
.cook-split__option-icon {
  display: inline-flex;
  width: 20px;
  justify-content: center;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.cook-split__option--active .cook-split__option-icon { color: var(--primary); }
.cook-split__option-body { flex: 1; min-width: 0; }
.cook-split__option-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}
.cook-split__option-meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Compact variant — used for the servings scaler (2/4/6/8) in recipe detail. */
.segmented.servings-scaler {
  display: inline-flex;
  width: auto;
  padding: 2px;
}
.segmented.servings-scaler .segmented__item {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 12px;
  min-width: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--foreground);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.chip[data-active="true"] {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  margin: 20px 0 10px;
}
.section-label__link {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
}

.scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }

.text-muted { color: var(--muted-foreground); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }

/* Grid that tracks the design: 2 → 3 → 4 columns */
.uau-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px)  { .uau-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1200px) { .uau-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

/* =========================================================================
   Scope menu popover (home + catalog)
   ========================================================================= */
.scope-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  cursor: pointer;
}
.scope-menu__trigger--lg { font-size: 20px; }
.scope-menu__chev { transition: transform 0.2s; }
[data-state="open"] .scope-menu__chev { transform: rotate(180deg); }

.scope-menu__content {
  width: 320px;
  padding: 6px;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.04);
}
.scope-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--foreground);
  cursor: pointer;
}
.scope-menu__item:hover { background: var(--accent); }
.scope-menu__item--active { background: var(--accent); }
.scope-menu__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.scope-menu__body { flex: 1; min-width: 0; }
.scope-menu__label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
}
.scope-menu__meta {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.scope-menu__count {
  font-size: 11px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--muted);
  flex-shrink: 0;
}
.scope-menu__counts {
  display: none;
  gap: 10px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.scope-menu__counts strong {
  color: var(--foreground);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) {
  .scope-menu__counts { display: inline-flex; }
}

/* =========================================================================
   Recipe detail
   ========================================================================= */
.recipe-hero {
  position: relative;
  aspect-ratio: 16 / 12;
  background: var(--muted);
  overflow: hidden;
  margin: -16px -20px 0;
}
@media (min-width: 768px) {
  .recipe-hero {
    aspect-ratio: 21 / 9;
    margin: -24px -24px 0;
    border-radius: var(--radius-lg);
  }
}
@media (min-width: 1200px) {
  .recipe-hero {
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: var(--radius-lg);
    max-height: 420px;
  }
}
.recipe-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.recipe-hero__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--secondary), var(--muted));
  color: var(--muted-foreground);
}
.recipe-hero__back {
  position: absolute;
  top: 16px; left: 16px;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.92);
  border: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--foreground);
  z-index: 2;
}
.recipe-hero__actions {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 2;
}
.recipe-hero__action {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.92);
  border: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--foreground);
}

.recipe-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}
@media (min-width: 1200px) {
  .recipe-detail {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    margin-top: 24px;
    align-items: start;
  }
}

.recipe-detail__aside {
  display: none;
  flex-direction: column;
  gap: 20px;
}
/* Show only at lg+ (co-located with Tailwind's `hidden lg:flex` in the HTML
   — duplicated here so specificity can't lose the battle). */
@media (min-width: 64rem) {
  .recipe-detail__aside { display: flex; }
}
@media (min-width: 1200px) {
  .recipe-detail__aside {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
  }
}

.recipe-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 8px;
}
@media (min-width: 1200px) { .recipe-title { font-size: 32px; } }

.recipe-desc {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.55;
  margin-top: 8px;
  max-width: 620px;
}

.badge-cat {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 999px;
}

.meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 14px 4px;
  margin: 18px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
/* Hide the mobile meta-strip at lg+ (desktop aside renders its own card).
   Co-located with Tailwind's `.lg:hidden` but stronger because specificity
   is equal and this rule loads after. */
@media (min-width: 64rem) {
  .meta-strip { display: none; }
}
.meta-strip__cell {
  text-align: center;
  padding: 0 8px;
  border-right: 1px solid var(--border);
}
.meta-strip__cell:last-child { border-right: 0; }
.meta-strip__icon {
  color: var(--muted-foreground);
  margin-bottom: 6px;
  opacity: 0.7;
}
.meta-strip__value {
  display: flex; align-items: baseline; justify-content: center; gap: 3px;
}
.meta-strip__num {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.meta-strip__unit {
  font-size: 11px;
  color: var(--muted-foreground);
  font-weight: 500;
}
.meta-strip__label {
  font-size: 10.5px;
  color: var(--muted-foreground);
  margin-top: 3px;
}

.card-section {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
/* Mobile: trim chrome so the usable area isn't eaten by the page border +
   card border + row border stack. Card keeps a light border for grouping
   but drops its internal horizontal padding — inner lists can go edge to
   edge. */
@media (max-width: 640px) {
  .card-section {
    padding: 14px 12px;
    border-radius: var(--radius-md);
  }
}
.card-section__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-section__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ingredient-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
}
.ingredient-check:last-child { border-bottom: 0; }
.ingredient-check__box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}
.ingredient-check__body { flex: 1; min-width: 0; }
.ingredient-check__name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
}
.ingredient-check__note {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.ingredient-check__qty {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 64px;
  text-align: right;
}

.step-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-list__num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1200px) {
  .step-list__num { width: 34px; height: 34px; font-size: 14px; }
}
.step-list__text {
  flex: 1;
  padding-top: 4px;
  font-size: 14px;
  line-height: 1.55;
}
@media (min-width: 1200px) {
  .step-list__text { font-size: 14.5px; line-height: 1.6; }
}

/* Sticky bottom CTA (mobile) — now that the tab-bar is a static flex child
   of .uau-main, this sticky anchors to the bottom of the scrollable body and
   sits right above the tab-bar automatically. */
.recipe-cta {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  padding: 14px 16px 18px;
  background: linear-gradient(180deg, transparent, var(--background) 30%);
  display: flex;
  gap: 8px;
  z-index: 6;
}
@media (min-width: 768px) { .recipe-cta { display: none; } }
.recipe-cta > * { flex: 1; }
.recipe-cta > .is-primary { flex: 2; }

/* Desktop top action bar — breadcrumb + actions */
.recipe-topbar-actions {
  display: none;
}
@media (min-width: 768px) {
  .recipe-topbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }
}

/* =========================================================================
   Form primitives (used in Criar receita)
   ========================================================================= */
.form-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}
/* Hide the mobile stepper at md+ (the tablet header progress strip replaces it). */
@media (min-width: 48rem) {
  .form-stepper { display: none; }
}
.form-stepper__dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--border);
}
.form-stepper__dot[data-active="true"] { background: var(--primary); }

/* Tablet+ header strip on /recipes/new · /recipes/:id/edit */
.create-top {
  align-items: center;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.create-top__title-wrap { flex: 1; min-width: 0; }
.create-top__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.create-top__subtitle {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 3px;
}
.create-top__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.create-top__draft-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
  font-weight: 500;
}
.create-top__dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: oklch(0.70 0.14 145);
}

.create-progress {
  display: flex;
  gap: 4px;
  padding: 10px 0 16px;
  margin-bottom: 12px;
}
.create-progress__tick { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.create-progress__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}
.create-progress__tick[data-active="true"] .create-progress__bar {
  background: var(--foreground);
}
.create-progress__label {
  font-size: 11px;
  color: var(--muted-foreground);
  font-weight: 500;
}
.create-progress__tick[data-active="true"] .create-progress__label {
  color: var(--foreground);
  font-weight: 600;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

/* Recipe metadata row — porções / preparo / cozimento.
   One consistent 40px-tall input per field, icon-prefixed label, and a
   right-aligned "min" suffix for time fields so the numeric input stays
   flush-left and readable. */
.recipe-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.recipe-meta-row__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.recipe-meta-row__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}
.recipe-meta-row__label > svg { color: var(--muted-foreground); }
.recipe-meta-row__input {
  height: 40px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding-right: 12px;
}
.recipe-meta-row__input-with-suffix {
  position: relative;
}
.recipe-meta-row__input-with-suffix .recipe-meta-row__input {
  padding-right: 42px;
}
.recipe-meta-row__suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  pointer-events: none;
  letter-spacing: 0.01em;
}
@media (max-width: 500px) {
  .recipe-meta-row { grid-template-columns: 1fr 1fr; }
  .recipe-meta-row__field:first-child { grid-column: 1 / -1; }
}

/* Segmented difficulty picker — fills the container with 3 equal cells and
   uses a radio-visible selected state driven by data-active (set server-side)
   plus :has(:checked) for live updates. */
.difficulty-seg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
  padding: 4px;
  background: var(--secondary);
  border-radius: var(--radius-md);
}
.difficulty-seg__option {
  text-align: center;
  padding: 9px 0;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.difficulty-seg__option:hover { color: var(--foreground); }
.difficulty-seg__option:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.difficulty-seg__option:has(input:checked) {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px var(--border);
}
.fg__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fg__row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 500px) {
  .fg__row, .fg__row-3 { grid-template-columns: 1fr; }
}

/* Ingredient row — compact qty pill + name/notes + edit/remove icons.
   The pill, body, pencil and trash are all clickable; clicking pill or
   body opens the picker drawer pre-filled (edit mode) via recipe-form. */
.ingredient-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 36px 36px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}
.ingredient-row:hover { border-color: color-mix(in oklch, var(--foreground) 15%, var(--border)); }
.ingredient-row.is-pending-destroy { opacity: 0.4; }
.ingredient-row__qty-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 10px;
  min-width: 72px;
  max-width: 110px;
  background: var(--secondary);
  color: var(--foreground);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.ingredient-row__qty-pill:hover {
  background: var(--accent);
  border-color: var(--border);
}
.ingredient-row__qty {
  font-size: 15.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.ingredient-row__unit {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.03em;
  text-transform: lowercase;
  line-height: 1.2;
  word-break: break-word;
}
.ingredient-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  color: var(--foreground);
  font: inherit;
  border-radius: var(--radius-sm);
}
.ingredient-row__body:hover { background: var(--accent); }
.ingredient-row__body:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.ingredient-row__name {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}
.ingredient-row__note {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.25;
}
.ingredient-row__edit,
.ingredient-row__remove {
  width: 36px; height: 36px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ingredient-row__edit:hover   { background: var(--accent); color: var(--foreground); }
.ingredient-row__remove:hover { background: var(--destructive); color: var(--destructive-foreground, #fff); }

/* Mobile: drop row chrome — hair-line separators inside the already-
   bordered Modo/Ingredientes card. Qty pill stays but gets slimmer. */
@media (max-width: 640px) {
  .ingredient-row {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 10px 2px;
    margin-bottom: 0;
    grid-template-columns: auto minmax(0, 1fr) 32px 32px;
    gap: 10px;
  }
  .ingredient-row:last-of-type { border-bottom: 0; }
  .ingredient-row:hover { border-color: var(--border); }
  .ingredient-row__qty-pill { min-width: 60px; padding: 6px 10px; }
  .ingredient-row__qty { font-size: 13.5px; }
  .ingredient-row__unit { font-size: 11px; }
  .ingredient-row__edit,
  .ingredient-row__remove { width: 32px; height: 32px; }
}

/* Match highlight — used by <mark class="search-highlight"> in search results */
.search-highlight {
  background: oklch(from var(--primary) l c h / 0.15);
  color: var(--primary);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Ingredient picker drawer — 3-stage flow */
.ing-picker { display: flex; flex-direction: column; gap: 16px; }
.ing-picker [data-stage-show] { display: none; }
.ing-picker[data-stage="pick-ingredient"] [data-stage-show="pick-ingredient"],
.ing-picker[data-stage="pick-unit"] [data-stage-show="pick-unit"],
.ing-picker[data-stage="filled"] [data-stage-show="filled"] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ing-picker__search-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  background: var(--background);
  border: 1px solid var(--ring);
  border-radius: var(--radius-md);
  padding: 0 12px 0 36px;
  box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.25);
}
.ing-picker__search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted-foreground);
  pointer-events: none;
}
.ing-picker__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  height: 100%;
}
.ing-picker__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}
.ing-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  color: var(--foreground);
}
.ing-picker__option:hover,
.ing-picker__option[data-highlighted="true"] { background: var(--accent); }
.ing-picker__option:focus { outline: none; }
.ing-picker__option:focus-visible,
.ing-picker__option[data-highlighted="true"] {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
  background: var(--accent);
}
.ing-picker__option-body { flex: 1; min-width: 0; }
.ing-picker__option-name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
}
.ing-picker__option-meta {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.ing-picker__section-label {
  padding: 6px 8px 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-weight: 500;
}
.ing-picker__empty {
  text-align: center;
  padding: 20px;
  color: var(--muted-foreground);
  font-size: 13px;
}

/* "Criar X como temporário" — appended to the end of search results */
.ing-picker__option--create {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 14px;
}
.ing-picker__create-icon {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: oklch(from var(--primary) l c h / 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ing-picker__selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.ing-picker__selected-avatar {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: oklch(from var(--primary) l c h / 0.15);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.ing-picker__selected-body { flex: 1; min-width: 0; }
.ing-picker__selected-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.ing-picker__selected-meta { font-size: 11.5px; color: var(--muted-foreground); margin-top: 2px; }
.ing-picker__selected-swap {
  background: transparent;
  border: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ing-picker__selected-swap:hover {
  background: var(--accent);
  color: var(--foreground);
}
.ing-picker__selected-swap:focus { outline: none; }
.ing-picker__selected-swap:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  background: var(--accent);
  color: var(--foreground);
}

/* Cover upload dropzone — focus ring when the sr-only file input has
   keyboard focus, since the visible label itself isn't focusable. */
.cover-upload:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-color: var(--ring);
}

/* Step row list — compact mobile-first rows (drag handle, number badge,
   excerpt, optional thumb, edit/remove). The heavy editing surface lives
   in the step-drawer; rows are just a map of the recipe's steps. */
.step-row-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-row {
  display: grid;
  grid-template-columns: 24px 32px minmax(0, 1fr) auto 36px 36px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.step-row:hover { border-color: color-mix(in oklch, var(--foreground) 15%, var(--border)); }
.step-row.sortable-ghost { opacity: 0.4; }
.step-row.sortable-chosen {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  border-color: var(--foreground);
}
.step-row__handle {
  color: var(--muted-foreground);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.step-row__handle:active { cursor: grabbing; }
.step-row__num {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-row__body {
  min-width: 0;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  color: var(--foreground);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.step-row__body:hover { background: var(--accent); }
.step-row__body:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.step-row__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: var(--foreground);
}
.step-row__excerpt:empty::before {
  content: "Passo sem descrição";
  color: var(--muted-foreground);
  font-style: italic;
}
.step-row__thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
}
.step-row__edit,
.step-row__remove {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-row__edit:hover { background: var(--accent); color: var(--foreground); }
.step-row__remove:hover {
  background: var(--destructive);
  color: var(--destructive-foreground, #fff);
}
/* Mobile: stacked layout — row 1 shows the meta (handle, number, thumb,
   edit, delete); row 2 spans the excerpt full-width with room for 3
   lines. Thumb bumps to 48px for a more substantial preview.
   Rows drop their individual borders/backgrounds and use a hair-line
   separator instead — the outer card already provides grouping, so the
   nested chrome would just steal usable width. */
@media (max-width: 640px) {
  .step-row-list { gap: 0; }
  .step-row {
    grid-template-columns: 22px 32px 48px minmax(0, 1fr) 32px 32px;
    grid-template-areas:
      "handle num thumb spacer edit remove"
      "body   body body  body   body body";
    gap: 4px 8px;
    padding: 10px 2px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .step-row:last-of-type { border-bottom: 0; }
  .step-row:hover { border-color: var(--border); }
  .step-row__handle { grid-area: handle; }
  .step-row__num    { grid-area: num; width: 28px; height: 28px; font-size: 12.5px; }
  .step-row__thumb  { grid-area: thumb; width: 48px; height: 48px; }
  .step-row__edit   { grid-area: edit; width: 32px; height: 32px; }
  .step-row__remove { grid-area: remove; width: 32px; height: 32px; }
  .step-row__body   {
    grid-area: body;
    padding: 2px 4px 4px;
  }
  .step-row__excerpt { -webkit-line-clamp: 3; line-clamp: 3; font-size: 13.5px; }
}
.step-row-empty {
  font-size: 13px;
  color: var(--muted-foreground);
  padding: 20px 12px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}

/* Step drawer — big textarea + photo slot, reused for add + edit. */
.step-drawer .step-editor-add {
  margin-top: 10px;
}
/* Desktop: narrow the inner content so the drawer feels like a sheet,
   not a full-width bar. Drawer root stays full-width (Vaul positions it
   edge-to-edge); the inner wrapper centers + caps the visible column.
   Also trims the max-height so the footer never clips below the viewport. */
.step-drawer__inner {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .step-drawer__inner {
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
  }
}
.step-drawer__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  width: 100%;
  max-height: 200px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted, var(--secondary));
  color: var(--muted-foreground);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
@media (min-width: 768px) {
  .step-drawer__photo {
    aspect-ratio: auto;
    height: 140px;
    max-height: 140px;
  }
}
.step-drawer__photo:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.step-drawer__photo[data-drop-active="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: oklch(from var(--primary) l c h / 0.08);
  border-style: solid;
}
.step-drawer__photo[data-has-photo="true"] {
  border-style: solid;
  border-color: var(--border);
}
.step-drawer__photo-empty {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}
.step-drawer__photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step-drawer__photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,0.68);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.step-drawer__photo-remove:hover { background: rgba(0,0,0,0.85); }

/* Legacy inline-row styles (kept for back-compat if ever re-enabled) */
.step-editor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-editor-row {
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.step-editor-row__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
@media (max-width: 500px) {
  .step-editor-row__body { grid-template-columns: minmax(0, 1fr) 56px; }
}
.step-editor-row.sortable-ghost {
  opacity: 0.4;
}
.step-editor-row.sortable-chosen {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  border-color: var(--foreground);
}
.step-editor-row__handle {
  color: var(--muted-foreground);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-editor-row__handle:active { cursor: grabbing; }
.step-editor-row__num {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-editor-row__input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 6px 0;
  color: var(--foreground);
  resize: none;
}
.step-editor-row__input::placeholder { color: var(--muted-foreground); }
.step-editor-row__remove {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-editor-row__remove:hover {
  background: var(--destructive);
  color: var(--destructive-foreground, #fff);
}

.step-editor-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.step-editor-add:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.step-editor-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0 2px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}
.step-editor-hint > svg { color: var(--muted-foreground); }

/* Per-step photo slot — 64×64 dropzone placed inside the step row body.
   Empty state is a dashed outline with icon; filled state is an object-cover
   image; drag-hover is outlined in primary so the drop target is obvious
   while dragging a file from the OS. */
.step-editor-row__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--muted, var(--secondary));
  color: var(--muted-foreground);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.step-editor-row__photo:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.step-editor-row__photo[data-drop-active="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: oklch(from var(--primary) l c h / 0.08);
  border-style: solid;
}
.step-editor-row__photo[data-has-photo="true"] {
  border-style: solid;
  border-color: var(--border);
}
.step-editor-row__photo-empty {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
  pointer-events: none;
}
.step-editor-row__photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 2px);
}
.step-editor-row__photo-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(0,0,0,0.68);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.step-editor-row__photo-remove:hover { background: rgba(0,0,0,0.85); }
@media (max-width: 500px) {
  .step-editor-row__photo { width: 56px; height: 56px; }
}

/* Form actions — sticky footer on mobile */
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* =========================================================================
   Week strip (plano semanal)
   ========================================================================= */
.week-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 14px;
}
.week-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.week-switch__btn:hover { background: var(--accent); }
.week-switch__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.week-switch__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 600;
}
.week-switch__today {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.week-strip__day {
  padding: 8px 4px;
  text-align: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  position: relative;
  text-decoration: none;
}
.week-strip__day[data-active="true"] {
  background: var(--primary);
  color: var(--primary-foreground);
}
.week-strip__dow {
  font-size: 11px;
  opacity: 0.7;
}
.week-strip__num {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}
.week-strip__dot {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--primary);
  margin: 4px auto 0;
}

/* Add to plan form */
.add-to-plan {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 120px;
}
.add-to-plan__hdr {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--secondary);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.add-to-plan__thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}
.add-to-plan__thumb img { width: 100%; height: 100%; object-fit: cover; }
.add-to-plan__hdr-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.add-to-plan__hdr-meta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.day-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.day-picker__day {
  padding: 10px 0;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  position: relative;
}
.day-picker__day input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day-picker__day:has(input:checked) {
  border: 1.5px solid var(--foreground);
  background: var(--foreground);
  color: var(--background);
}
.day-picker__dow {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}
.day-picker__num {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Meal plan day card */
.mealplan-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  margin-bottom: 10px;
}
.mealplan-day__hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.mealplan-day__weekday {
  font-size: 15px;
  font-weight: 600;
}
.mealplan-day__date {
  font-size: 13px;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-left: 4px;
}
.mealplan-meal {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--secondary);
  border-radius: var(--radius-md);
}
.mealplan-meal--empty {
  background: transparent;
  border: 1px dashed var(--border);
}
.mealplan-meal__slot {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted-foreground);
  width: 60px;
  flex-shrink: 0;
}
.mealplan-meal__name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  text-decoration: none;
  color: var(--foreground);
}
.mealplan-meal__name--empty { color: var(--muted-foreground); }

/* =========================================================================
   Shopping list
   ========================================================================= */
.shop-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  margin-bottom: 20px;
}
.shop-summary__ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.shop-summary__ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.shop-summary__body { flex: 1; min-width: 0; }
.shop-summary__main {
  font-weight: 600;
  font-size: 13.5px;
}
.shop-summary__sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.shop-pantry-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  margin-left: 2px;
  border-radius: 999px;
  background: oklch(0.96 0.04 145);
  color: oklch(0.38 0.12 145);
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
}

.shop-item[data-in-pantry="true"] .shop-item__name { color: var(--muted-foreground); }
.shop-item[data-in-pantry="true"] .shop-item__qty  { color: var(--muted-foreground); }
.shop-item__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: oklch(0.96 0.04 145);
  color: oklch(0.38 0.12 145);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.shop-group-hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 0 8px;
}
.shop-group-hdr__name {
  font-size: 13px;
  font-weight: 600;
}
.shop-group-hdr__count {
  font-size: 12px;
  color: var(--muted-foreground);
}

.shop-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  margin: 0;
  width: 100%;
  text-align: left;
  background: transparent;
  border-width: 0 0 1px 0;
  cursor: pointer;
}
.shop-item:last-child { border-bottom: 0; }
.shop-item__check {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--background);
  color: var(--primary-foreground);
}
.shop-item[data-checked="true"] .shop-item__check {
  background: var(--primary);
  border-color: var(--primary);
}
.shop-item__body { flex: 1; min-width: 0; }
.shop-item__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.shop-item[data-checked="true"] .shop-item__name {
  text-decoration: line-through;
  color: var(--muted-foreground);
}
.shop-item__meta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-item__qty {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
}
.shop-item[data-checked="true"] .shop-item__qty { color: var(--muted-foreground); }

/* Two-column layout for shopping on desktop */
@media (min-width: 1200px) {
  .shop-groups {
    column-count: 2;
    column-gap: 24px;
  }
  .shop-groups > * {
    break-inside: avoid;
  }
}

/* =========================================================================
   Onboarding — fullscreen centered flow (no sidebar/tab-bar)
   ========================================================================= */
.onb-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.onb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
  flex-shrink: 0;
}
.onb-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}
.onb-progress__dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--muted);
  transition: width 0.2s, background 0.2s, opacity 0.2s;
}
.onb-progress__dot[data-state="active"] {
  width: 18px;
  background: var(--foreground);
}
.onb-progress__dot[data-state="done"] {
  background: var(--foreground);
  opacity: 0.4;
}
.onb-count {
  font-size: 12px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}

.onb-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 140px;
  scrollbar-width: none;
}
.onb-body::-webkit-scrollbar { display: none; }

.onb-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.onb-subtitle {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 340px;
}

.onb-footer {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  padding: 16px 20px 28px;
  background: linear-gradient(180deg, transparent, var(--background) 30%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  z-index: 2;
}
.onb-footer__cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.onb-footer__cta[disabled],
.onb-footer__cta[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
}
.onb-footer__link {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Option cards (persona, household, restrictions, macros, social) */
.onb-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.onb-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
}
.onb-option:has(input:checked),
.onb-option[data-active="true"] {
  border-color: var(--foreground);
  border-width: 1.5px;
  background: var(--secondary);
}
.onb-option input { position: absolute; opacity: 0; pointer-events: none; }
.onb-option__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--muted);
  color: var(--muted-foreground);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.onb-option:has(input:checked) .onb-option__icon {
  background: var(--foreground);
  color: var(--background);
}
.onb-option__body { flex: 1; min-width: 0; }
.onb-option__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
.onb-option__sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.onb-macros-preview {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  margin-bottom: 4px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
}
.onb-macros-preview__num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.onb-macros-preview__unit {
  font-size: 10px;
  color: var(--muted-foreground);
}
.onb-macros-preview__sep {
  display: inline-block;
  width: 1px; height: 10px;
  background: var(--border);
}
.macro-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  margin-right: 2px;
  vertical-align: middle;
}

.onb-social-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.onb-social-preview__avatars { display: inline-flex; }
.onb-social-preview__avatar {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 2px solid var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  margin-left: -10px;
}
.onb-social-preview__avatar:first-child { margin-left: 0; }
.onb-social-preview__copy {
  font-size: 11.5px;
  color: var(--muted-foreground);
  line-height: 1.3;
}
.onb-social-preview__bold {
  color: var(--foreground);
  font-weight: 600;
  font-size: 13px;
}
.onb-option__radio {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--background);
  flex-shrink: 0;
}
.onb-option:has(input:checked) .onb-option__radio {
  background: var(--foreground);
  border: 0;
}
.onb-option__radio svg { opacity: 0; }
.onb-option:has(input:checked) .onb-option__radio svg { opacity: 1; }

/* Chip picker (restrictions) */
.onb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.onb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.onb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.onb-chip:has(input:checked) {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* Pantry grid */
.onb-pantry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.onb-pantry__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}
.onb-pantry__item input { position: absolute; opacity: 0; pointer-events: none; }
.onb-pantry__item:has(input:checked) {
  border: 1.5px solid var(--foreground);
  background: var(--secondary);
}
.onb-pantry__emoji {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 6px;
}
.onb-pantry__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.onb-pantry__item:has(input:checked) .onb-pantry__name { color: var(--foreground); }
.onb-pantry__check {
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--foreground);
  color: var(--background);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
}
.onb-pantry__item:has(input:checked) .onb-pantry__check { opacity: 1; }

/* Notification toggle list */
.onb-switches {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.onb-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.onb-switch:last-child { border-bottom: 0; }
.onb-switch__body { flex: 1; }
.onb-switch__label {
  font-size: 14px;
  font-weight: 500;
}
.onb-switch__desc {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
  line-height: 1.4;
}
.onb-toggle {
  position: relative;
  width: 40px; height: 24px;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.onb-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.onb-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--background);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: left 0.15s;
}
.onb-toggle:has(input:checked) { background: var(--foreground); }
.onb-toggle:has(input:checked)::after { left: 18px; }

/* Welcome screen */
.welcome-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 140px;
  text-align: center;
}
.welcome-mark {
  width: 96px; height: 96px;
  border-radius: 28px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 48px;
  position: relative;
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.12), 0 2px 8px oklch(0 0 0 / 0.06);
}
.welcome-mark__sparkle {
  position: absolute;
  bottom: -6px; right: -6px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: oklch(0.72 0.16 65);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.welcome-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.welcome-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 14px;
}
.welcome-lead {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.55;
  max-width: 300px;
}

/* Done screen */
.done-mark {
  width: 72px; height: 72px;
  margin: 12px auto 28px;
  border-radius: 999px;
  background: oklch(0.72 0.14 145 / 0.15);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.done-mark__inner {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: oklch(0.55 0.14 145);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* Household icon */
.household-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.onb-option:has(input:checked) .household-icon { background: var(--background); }
.household-icon__dot {
  width: 6px; height: 10px;
  border-radius: 3px;
  background: var(--muted-foreground);
  margin: 0 1.5px;
}
.onb-option:has(input:checked) .household-icon__dot { background: var(--foreground); }

/* =========================================================================
   Modo Guiado — fullscreen cooking flow
   ========================================================================= */
.guided-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.guided-screen--warm { background: oklch(0.98 0.01 75); }

/* T2 — Guided tablet step 3-col */
@media (min-width: 1024px) {
  .guided-screen--t2 {
    max-width: none;
    padding: 0;
  }
  .guided-t2-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    min-height: calc(100dvh - 56px);
  }
  /* Solo mode: M7 timer + active-wait don't render the left/right columns,
     so without this override the center column would be placed in the 280px
     first slot. Collapse to a single fr so content has full width. */
  .guided-t2-grid.guided-t2-grid--solo {
    grid-template-columns: minmax(0, 1fr);
  }
  .guided-t2__col {
    padding: 22px 20px;
    overflow-y: auto;
  }
  .guided-t2__col--center { padding: 28px 48px 140px; }
  .guided-t2__col--left  { border-right: 1px solid var(--border); }
  .guided-t2__col--right { border-left: 1px solid var(--border); }

  .guided-t2__step-number {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--foreground);
  }
  .guided-t2__step-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
  }
  .guided-t2__step-text {
    font-size: 22px;
    line-height: 1.5;
    letter-spacing: -0.005em;
    max-width: 620px;
    margin-top: 24px;
  }

  .guided-t2-steplist {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .guided-t2-steplist__item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    text-decoration: none;
  }
  .guided-t2-steplist__item[data-state="current"] {
    background: var(--foreground);
    color: var(--background);
  }
  .guided-t2-steplist__item[data-state="done"] { opacity: 0.55; }
  .guided-t2-steplist__item[data-kind="active-wait"] {
    border: 1.5px dashed oklch(0.75 0.08 150 / 0.55);
    background: oklch(0.97 0.03 150);
  }
  .guided-t2-steplist__item[data-kind="passive-wait"] {
    border: 1px solid oklch(0.82 0.06 285 / 0.4);
    background: oklch(0.96 0.03 285);
  }
  .guided-t2-steplist__num {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: var(--muted);
    color: var(--muted-foreground);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
  }
  .guided-t2-steplist__item[data-state="current"] .guided-t2-steplist__num {
    background: rgba(255,255,255,0.15);
    color: var(--background);
  }
  .guided-t2-steplist__item[data-state="done"] .guided-t2-steplist__num {
    background: var(--foreground);
    color: var(--background);
  }

  .guided-t2-ingredient {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 10px 10px 10px 14px;
    border-radius: 8px;
    align-items: center;
  }
  .guided-t2-ingredient[data-highlight="true"] {
    background: oklch(0.96 0.02 280);
  }
  .guided-t2-ingredient[data-highlight="true"]::before {
    content: "";
    position: absolute;
    left: 2px; top: 6px; bottom: 6px;
    width: 4px;
    border-radius: 2px;
    background: oklch(0.55 0.18 280);
  }
  .guided-t2-ingredient__qty {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  /* Footer stays anchored under the center column only.
     Compound selector `.guided-footer.guided-t2__footer` to beat the
     `.guided-footer` base rule that appears LATER in this file. */
  .guided-footer.guided-t2__footer {
    position: fixed;
    left: 280px; right: 320px;
    bottom: 0;
    padding: 16px 48px 22px;
    background: linear-gradient(180deg, transparent, var(--background) 30%);
    display: flex;
    gap: 10px;
    z-index: 3;
  }
}

/* Mobile default: hide T2 grid, show regular guided layout */
.guided-t2-grid { display: contents; }
.guided-t2__col--left,
.guided-t2__col--right { display: none; }
@media (min-width: 1024px) {
  .guided-t2-grid { display: grid; }
  .guided-t2__col--left,
  .guided-t2__col--right { display: flex; flex-direction: column; }
}

/* T3 — Reflection as centered modal on tablet+ */
.guided-t3-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.95 0.01 75);
  z-index: 10;
  overflow-y: auto;
  padding: 24px;
}
.guided-t3-modal {
  max-width: 880px;
  margin: 40px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.18), 0 4px 16px oklch(0 0 0 / 0.08);
  overflow: hidden;
}
.guided-t3-modal__head {
  padding: 20px 32px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.guided-t3-modal__grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .guided-t3-modal__grid { grid-template-columns: 1fr 1fr; }
  .guided-t3-modal__left { border-right: 1px solid var(--border); }
}
.guided-t3-modal__left  { padding: 32px; }
.guided-t3-modal__right { padding: 32px; }

.guided-t3__title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.guided-t3__title-mark {
  width: 48px; height: 48px;
  border-radius: 999px;
  background: oklch(0.55 0.14 145);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.guided-t3__title-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.portion-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--secondary);
  border: 1px solid var(--border);
}
.portion-stepper__btn {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.portion-stepper__value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: center;
}

/* Tablet+ overview (T1) — 2 colunas: recipe card à esquerda, steps à direita */
@media (min-width: 768px) {
  .guided-screen--overview {
    max-width: 1120px;
    padding: 0 32px;
  }
  .guided-overview {
    display: grid;
    grid-template-columns: 40fr 60fr;
    gap: 32px;
    padding-top: 32px;
  }
  .guided-overview__aside { display: flex; flex-direction: column; gap: 18px; }
  .guided-overview__main  { display: flex; flex-direction: column; }
  .guided-overview .guided-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Hide the mobile-only title block on tablet+, and vice versa */
.guided-overview__mobile-head { display: block; }
.guided-overview__aside-card { display: none; }
@media (min-width: 768px) {
  .guided-overview__mobile-head { display: none; }
  .guided-overview__aside-card { display: flex; flex-direction: column; gap: 14px; }
}

.guided-overview__recipe-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}
.guided-overview__recipe-cover {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--muted);
  position: relative;
}
.guided-overview__recipe-cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.guided-overview__recipe-cover-cat {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 500;
}
.guided-overview__recipe-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.guided-overview__recipe-desc {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.guided-overview__meta-row {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.guided-overview__meta-row b {
  color: var(--foreground);
  font-weight: 600;
}

.guided-header {
  padding: 14px 16px 10px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.guided-header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.guided-header__title {
  font-size: 13px;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
@media (min-width: 48rem) {
  .guided-header__title { max-width: 520px; font-size: 14px; }
}
.guided-header__count {
  font-size: 12px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 38px;
  text-align: right;
}
.guided-header__bar {
  display: flex;
  gap: 3px;
}
.guided-header__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}
.guided-header__seg[data-state="active"] { background: var(--foreground); }
.guided-header__seg[data-state="done"]   { background: var(--foreground); opacity: 0.45; }

/* UAU Guiado seal */
.uau-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: oklch(0.95 0.03 280);
  color: oklch(0.40 0.15 280);
  border: 1px solid oklch(0.40 0.15 280 / 0.15);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.uau-seal--on-dark {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}
.uau-seal svg { width: 12px; height: 12px; }

/* =========================================================================
   Nutrition detail (macro ring + macro bars)
   ========================================================================= */
.nutri-page { max-width: 760px; margin: 0 auto; }

.macro-ring { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.macro-ring__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.macro-ring__kcal {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.macro-ring__label {
  font-size: 10px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.macro-bar {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.macro-bar__dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.macro-bar__name { font-size: 13.5px; font-weight: 500; }
.macro-bar__value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--muted-foreground);
}
.macro-bar__vd {
  font-size: 11px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}
.macro-bar__track {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}
.macro-bar__fill { height: 100%; border-radius: 999px; }
.macro-bar + .macro-bar { border-top: 1px solid var(--border); }

.nutri-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}
.nutri-detail-row + .nutri-detail-row { border-top: 1px solid var(--border); }
.nutri-detail-row__name { font-size: 13.5px; }
.nutri-detail-row__values {
  display: flex; gap: 14px; align-items: baseline;
}
.nutri-detail-row__value {
  font-size: 13.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.nutri-detail-row__vd {
  font-size: 11.5px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  min-width: 44px; text-align: right;
}

/* Mise en place structured sections (M3) */
.mise-section { margin-bottom: 22px; }
.mise-section__hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.mise-ingredients {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.mise-ingredient {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.mise-ingredient input { display: none; }
.mise-ingredient__box {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.mise-ingredient:has(input:checked) .mise-ingredient__box {
  background: oklch(0.55 0.14 145);
  border-color: oklch(0.55 0.14 145);
}
.mise-ingredient:has(input:checked) { opacity: 0.5; }
.mise-ingredient__qty {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.utensils { display: flex; flex-wrap: wrap; gap: 6px; }
.utensil-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.preflight {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--secondary);
  border: 1px solid var(--border);
}
.preflight__hdr {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}
.preflight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13.5px;
}
.preflight-item:last-child { margin-bottom: 0; }
.preflight-item input { display: none; }
.preflight-item__box {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.preflight-item:has(input:checked) .preflight-item__box {
  background: oklch(0.55 0.14 145);
  border-color: oklch(0.55 0.14 145);
}
.preflight-item:has(input:checked) { opacity: 0.5; }

/* Cognitive load badge (M1 cover) */
.load-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--muted);
  font-size: 12px;
}
.load-badge__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.load-badge__value {
  font-weight: 600;
  color: var(--foreground);
}

/* Barrier chips */
.barrier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
}
.barrier-chip[data-variant="neutral"] { background: var(--muted); color: var(--foreground); border: 1px solid transparent; }
.barrier-chip[data-variant="alert"]   { background: oklch(0.95 0.04 55);  color: oklch(0.40 0.14 55);  border: 1px solid oklch(0.75 0.10 55 / 0.4); }
.barrier-chip[data-variant="time"]    { background: oklch(0.96 0.03 240); color: oklch(0.40 0.12 240); border: 1px solid oklch(0.75 0.10 240 / 0.3); }
.barrier-chip[data-variant="public"]  { background: oklch(0.96 0.04 150); color: oklch(0.35 0.12 150); border: 1px solid oklch(0.72 0.10 150 / 0.3); }

/* Callouts */
.callout {
  padding: 14px;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 10px;
}
.callout__icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.callout__body { flex: 1; min-width: 0; }
.callout__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.callout__text { font-size: 13px; line-height: 1.5; }
.callout--dica {
  background: oklch(0.96 0.04 75);
  border: 1px solid oklch(0.85 0.06 75 / 0.5);
}
.callout--dica .callout__label { color: oklch(0.45 0.12 75); }
.callout--dica .callout__text  { color: oklch(0.30 0.08 75); }
.callout--alerta {
  background: oklch(0.96 0.04 35);
  border: 1px solid oklch(0.85 0.08 35 / 0.6);
}
.callout--alerta .callout__label { color: oklch(0.48 0.14 35); }
.callout--alerta .callout__text  { color: oklch(0.32 0.10 35); }

/* Inline "Já fiz" checkbox inside a callout (M2 Antecipação) */
.callout--with-check { align-items: flex-start; }
.callout__check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin-top: 2px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.callout__check:hover { background: oklch(0.92 0.04 75 / 0.6); }
.callout__check input[type=checkbox] { cursor: pointer; }
.callout--with-check[data-done="true"] { opacity: 0.65; }
.callout--with-check[data-done="true"] .callout__text {
  text-decoration: line-through;
  text-decoration-color: var(--muted-foreground);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Step preview card */
.guided-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.guided-step-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  min-height: 110px;
  text-decoration: none;
  color: inherit;
}
.guided-step-card[data-kind="active-wait"] {
  background: oklch(0.97 0.03 150);
  border: 1.5px dashed oklch(0.75 0.08 150 / 0.55);
}
.guided-step-card[data-kind="passive-wait"] {
  background: oklch(0.96 0.03 285);
  border: 1px solid oklch(0.82 0.06 285 / 0.4);
}
.guided-step-card__hdr {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.guided-step-card__num {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--foreground);
  color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.guided-step-card__emoji {
  font-size: 20px;
  line-height: 1;
}
.guided-step-card__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 4px 0;
}
.guided-step-card__desc {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* State photo */
.state-photo {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 35% 22% at 35% 30%, oklch(0.92 0.06 85) 0%, transparent 60%),
    radial-gradient(ellipse 85% 70% at 50% 55%, oklch(0.78 0.09 60) 0%, transparent 65%),
    oklch(0.90 0.05 70);
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.04), 0 4px 12px oklch(0 0 0 / 0.05);
}
.state-photo__label {
  position: absolute;
  bottom: 10px; left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* Step main block */
.guided-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 140px;
  scrollbar-width: none;
}
.guided-body::-webkit-scrollbar { display: none; }

.guided-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.guided-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 18px;
}
.guided-text {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  margin-bottom: 18px;
}

/* Timer button inline */
.timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--foreground);
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

/* Giant timer ring (M7) */
/* Autoplay toggle (Modo Guiado M7) — persistido em localStorage */
.autoplay-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 0 auto 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.autoplay-toggle:hover { background: var(--accent); }
.autoplay-toggle[data-active="true"] {
  background: oklch(0.96 0.04 145);
  color: oklch(0.38 0.12 145);
  border-color: oklch(0.85 0.08 145 / 0.5);
}
.autoplay-toggle__off { display: none; }
.autoplay-toggle[data-active="false"] .autoplay-toggle__on { display: none; }
.autoplay-toggle[data-active="false"] .autoplay-toggle__off { display: inline-flex; }

/* Pause/continue/start button — one button with three states:
   running (ticking), paused (stopped mid-run), idle (cancelled, ready to start over).
   Only the variant matching [data-state] is visible. */
.guided-timer__pause {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.guided-timer__pause-icon--running,
.guided-timer__pause-icon--paused,
.guided-timer__pause-icon--idle,
.guided-timer__pause-label--running,
.guided-timer__pause-label--paused,
.guided-timer__pause-label--idle { display: none; }
.guided-timer__pause[data-state="running"] .guided-timer__pause-icon--running,
.guided-timer__pause[data-state="running"] .guided-timer__pause-label--running,
.guided-timer__pause[data-state="paused"]  .guided-timer__pause-icon--paused,
.guided-timer__pause[data-state="paused"]  .guided-timer__pause-label--paused,
.guided-timer__pause[data-state="idle"]    .guided-timer__pause-icon--idle,
.guided-timer__pause[data-state="idle"]    .guided-timer__pause-label--idle { display: inline-flex; }

.guided-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.guided-timer__ring {
  position: relative;
  width: 260px;
  height: 260px;
  margin-bottom: 12px;
}
.guided-timer__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.guided-timer__num {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.guided-timer__caption {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 8px;
}

/* Cleanup checklist (active-wait) */
.cleanup-list {
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
  background: var(--card);
  margin-bottom: 14px;
}
.cleanup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.cleanup-item:last-child { border-bottom: 0; }
.cleanup-item__box {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.cleanup-item input { display: none; }
.cleanup-item:has(input:checked) .cleanup-item__box {
  background: var(--foreground);
  border-color: var(--foreground);
}
.cleanup-item__text { flex: 1; font-size: 15px; }
.cleanup-item:has(input:checked) .cleanup-item__text {
  color: var(--muted-foreground);
  text-decoration: line-through;
}

/* Footer bar (prev/next) */
.guided-footer {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px 26px;
  background: linear-gradient(180deg, transparent, var(--background) 25%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.guided-footer > * { flex: 1; }
.guided-footer > .is-primary { flex: 2; }
.guided-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
}
.guided-btn--primary {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}
.guided-btn--pill {
  border-radius: 999px;
  padding: 0 28px;
  height: 56px;
  font-size: 16px;
}
.guided-btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

/* Done screen mark (guided reflection) */
.guided-done-mark {
  width: 72px; height: 72px;
  margin: 12px auto 20px;
  border-radius: 999px;
  background: oklch(0.70 0.14 145 / 0.15);
  display: flex; align-items: center; justify-content: center;
}
.guided-done-mark__inner {
  width: 54px; height: 54px;
  border-radius: 999px;
  background: oklch(0.55 0.14 145);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.star-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 20px;
}
.star-row__star--filled { color: oklch(0.72 0.16 75); }
.star-row__star--empty  { color: var(--border); }
.pill-row {
  display: flex;
  gap: 6px;
}
.pill-row__pill {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.pill-row__pill[data-active="true"] {
  background: var(--foreground);
  color: var(--background);
  border: 1.5px solid var(--foreground);
}

/* Uppercase mini-label (utility) */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* =========================================================================
   Settings — menu rows + toggle rows + 2-col desktop
   ========================================================================= */
.settings-layout {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
@media (min-width: 768px) {
  .settings-layout { flex-direction: row; }
}

.settings-main {
  flex: 1;
  min-width: 0;
  background: var(--muted);
}
.uau-shell .settings-main { background: var(--muted); }

.settings-subnav {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-subnav::-webkit-scrollbar { display: none; }
.settings-subnav__list {
  display: flex;
  gap: 4px;
}
.settings-subnav__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.settings-subnav__item[data-active="true"] {
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 600;
}

@media (min-width: 1024px) {
  .settings-subnav {
    width: 280px;
    flex-shrink: 0;
    border-bottom: 0;
    border-right: 1px solid var(--border);
    padding: 24px 14px;
    overflow-x: visible;
    display: flex;
    flex-direction: column;
  }
  .settings-subnav__list { flex-direction: column; gap: 2px; }
  .settings-subnav__item { width: 100%; padding: 10px 12px; }
}

.settings-subnav__footer {
  display: none;
}
@media (min-width: 1024px) {
  .settings-subnav__footer {
    display: block;
    margin-top: auto;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
  }
}
.settings-subnav__signout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: oklch(0.55 0.18 25);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.settings-subnav__signout:hover { background: oklch(0.55 0.18 25 / 0.06); }

.settings-hero {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.settings-hero__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.settings-hero__desc {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.55;
  max-width: 520px;
}

.settings-pantry__footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.settings-body {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
@media (min-width: 1024px) {
  .settings-body--split {
    display: flex;
    align-items: stretch;
    min-height: calc(100dvh - 64px);
  }
  .settings-body--split .settings-subnav { min-height: 100%; }
}

.settings-content {
  padding: 14px 0 24px;
}
@media (min-width: 768px) {
  .settings-content { padding: 28px 28px 40px; max-width: 720px; }
}
@media (min-width: 1024px) {
  .settings-body--split .settings-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
    padding: 32px 40px 40px;
  }
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: inherit;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--muted);
  color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-row--destructive .settings-row__icon {
  background: oklch(0.95 0.04 25);
  color: oklch(0.55 0.18 25);
}
.settings-row--destructive .settings-row__label { color: oklch(0.55 0.18 25); }
.settings-row__body { flex: 1; min-width: 0; }
.settings-row__label {
  font-size: 14px;
  font-weight: 500;
}
.settings-row__sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-row__chev {
  color: var(--muted-foreground);
  opacity: 0.6;
  flex-shrink: 0;
}

.settings-section-hdr {
  padding: 16px 18px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* Desktop-style grouped card */
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 18px;
}
@media (min-width: 768px) {
  .settings-card { margin: 0 0 20px; }
}

/* Padded variant — for cards that don't use settings-toggle-row (which
   brings its own internal padding). Use via the `settings/card` partial.
   `overflow: visible` so fernandes-ui select / popovers can escape the
   card bounds (base .settings-card uses overflow:hidden to clip row
   borders; the padded variant doesn't need that). */
.settings-card--padded {
  padding: 20px;
  overflow: visible;
}
@media (min-width: 768px) {
  .settings-card--padded { padding: 22px 24px; }
}
.settings-card__header + .settings-card__body { margin-top: 14px; }
.settings-card__body  + .settings-card__footer { margin-top: 16px; }
.settings-card__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.settings-card__title--danger { color: var(--destructive); }
.settings-card__desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.55;
}
.settings-card__body {
  font-size: 13.5px;
  color: var(--foreground);
  line-height: 1.55;
}
.settings-card__body > * + * { margin-top: 12px; }
.settings-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.settings-card--danger {
  border-color: oklch(0.88 0.06 25);
}
.settings-card--danger .settings-card__title { color: var(--destructive); }

/* In-card action row — left-aligned buttons with top divider. Use inside
   settings/card body for "Salvar preferências", "Baixar meus dados",
   "Apagar conta", etc. */
.settings-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.settings-toggle-row:last-child { border-bottom: 0; }
.settings-toggle-row__body { flex: 1; min-width: 0; }
.settings-toggle-row__title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
}
.settings-toggle-row__desc {
  font-size: 12.5px;
  color: var(--muted-foreground);
  line-height: 1.45;
}
@media (min-width: 768px) {
  .settings-toggle-row__title { font-weight: 600; margin-bottom: 4px; }
  .settings-toggle-row__desc { font-size: 13px; line-height: 1.5; }
}

/* Plan card inside settings */
.plan-card {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 18px;
}
@media (min-width: 768px) {
  .plan-card { margin: 0; }
}
.plan-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

/* Confirm sheet (mobile) */
.confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.confirm-sheet__panel {
  width: 100%;
  max-width: 560px;
  background: var(--background);
  border-radius: 22px 22px 0 0;
  padding: 22px 22px 28px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.confirm-sheet__handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 18px;
}
.confirm-sheet__hdr {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.confirm-sheet__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: oklch(0.95 0.04 55);
  color: oklch(0.45 0.14 55);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.confirm-sheet__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.confirm-sheet__text {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 18px;
}
.confirm-sheet__actions {
  display: flex;
  gap: 8px;
}
.confirm-sheet__actions > *:first-child { flex: 4; }
.confirm-sheet__actions > *:last-child  { flex: 6; }

/* Settings screen uses simpler mobile chrome */
.settings-mobile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .settings-mobile-header { display: none; } }
.settings-mobile-header__title {
  font-size: 16px;
  font-weight: 600;
}

/* =========================================================================
   Admin panel (desktop-first)
   ========================================================================= */
.admin-layout {
  display: flex;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
}
.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 16px;
}
.admin-sidebar__brand-mark {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
}
.admin-sidebar__brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.admin-sidebar__section {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px;
}
.admin-sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-md);
  color: var(--sidebar-foreground);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.admin-sidebar__item[data-active="true"] {
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}
.admin-sidebar__item svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}
.admin-sidebar__item[data-active="true"] svg { color: var(--sidebar-accent-foreground); }

.admin-main {
  flex: 1;
  overflow: auto;
  padding: 24px 32px;
}
@media (max-width: 1023px) {
  .admin-sidebar { display: none; }
  .admin-main { padding: 16px; }
}

/* Admin stats grid */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
}
.admin-stat {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-stat__label {
  font-size: 12px;
  color: var(--muted-foreground);
}
.admin-stat__value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.admin-stat__delta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Admin table */
.admin-table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Cards that host a fernandes-ui select must NOT clip their children — the
   select dropdown content is `position: absolute` and gets clipped by the
   card's `overflow: hidden`, even when the dropdown flips upward. */
.admin-table-card:has([data-controller~="ui--select"]) {
  overflow: visible;
}
.admin-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}
.admin-toolbar__search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}
.admin-toolbar__search input {
  padding-left: 32px;
  height: 32px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 13px;
}
.admin-toolbar__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-table thead th {
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.adm-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.adm-table tbody tr:hover { background: var(--muted); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table .num {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--muted-foreground);
}
.adm-table__name {
  font-weight: 500;
  color: var(--foreground);
}
.adm-table__id {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.adm-table__actions {
  display: inline-flex;
  gap: 6px;
}
.adm-table__action {
  width: 28px; height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.adm-table__action:hover { background: var(--accent); color: var(--foreground); }
.adm-table__checkcol {
  width: 36px;
  padding-left: 14px;
  padding-right: 8px;
}
.adm-table__checkcol input[type=checkbox] { cursor: pointer; }

.adm-segmented {
  display: inline-flex;
  background: var(--muted);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 1px;
}
.adm-segmented__item {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius-sm) - 2px);
  text-decoration: none;
}
.adm-segmented__item[data-active="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

.adm-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.adm-pill--pending {
  background: oklch(0.96 0.05 85);
  color: oklch(0.40 0.12 55);
}

.adm-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.adm-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--background);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.adm-pagination__btn:hover { background: var(--accent); }
.adm-pagination__label { font-variant-numeric: tabular-nums; }

.adm-bulk-bar {
  position: sticky;
  bottom: 12px;
  margin: 12px 14px;
  padding: 10px 14px;
  background: var(--foreground);
  color: var(--background);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.adm-bulk-bar[hidden] { display: none; }
.adm-bulk-bar__count { font-size: 13px; font-weight: 500; }
.adm-bulk-bar__actions { display: inline-flex; gap: 8px; }
.adm-bulk-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: var(--background);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.adm-bulk-bar__btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.adm-bulk-bar__btn:not([disabled]):hover { background: rgba(255, 255, 255, 0.2); }

.admin-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Admin edit form modal-like panel (uses uau-body full page) */
.admin-form {
  max-width: 720px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.admin-form__hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.admin-form__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.admin-form__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.admin-form__desc {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 4px;
}
.admin-form hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}
.admin-form__nutri-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 640px) { .admin-form__nutri-grid { grid-template-columns: repeat(2, 1fr); } }
.admin-form__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* =========================================================================
   Profile
   ========================================================================= */
.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 18px;
}
.profile-identity__avatar {
  width: 64px; height: 64px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}
.profile-identity__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.profile-identity__email {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.profile-identity__meta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 6px;
}
.profile-identity__meta b { color: var(--foreground); font-weight: 500; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.profile-stat {
  padding: 12px;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  text-align: center;
}
.profile-stat__value {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.profile-stat__label {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Signed-in banner inside settings landing */
.settings-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  background: var(--card);
  margin-bottom: 14px;
}
.settings-profile__avatar {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}
.settings-profile__body { flex: 1; min-width: 0; }
.settings-profile__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.settings-profile__email {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================================
   Auth screens (devise) — shadcn login-01 inspired card
   ========================================================================= */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 16px;
  background: var(--muted);
}
@media (min-width: 640px) {
  .auth-shell { padding: 48px 24px; }
}

.auth-shell__brand {
  display: flex;
  justify-content: center;
}
.auth-shell__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.auth-shell__brand-mark {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--foreground);
  color: var(--background);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-shell__foot-note {
  max-width: 360px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.5;
  padding: 0 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.auth-card__header {
  padding: 28px 28px 14px;
  text-align: center;
}
.auth-card__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.2;
}
.auth-card__desc {
  font-size: 13.5px;
  color: var(--muted-foreground);
  line-height: 1.45;
}
.auth-card__body  { padding: 0 28px 24px; }
.auth-card__footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, var(--card));
  text-align: center;
  font-size: 13px;
  color: var(--muted-foreground);
}
.auth-card__link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.auth-card__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-card__link--inline {
  font-size: 12px;
  color: var(--muted-foreground);
  font-weight: 500;
}
.auth-card__link--inline:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 6px;
}
.auth-form__hint {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 4px;
  line-height: 1.4;
}
.auth-form__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--foreground);
  cursor: pointer;
}
.auth-form__checkbox input[type=checkbox] { cursor: pointer; }

.auth-field { display: block; }
.auth-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.auth-field__label-row .auth-form__label { margin-bottom: 0; }

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}
.auth-btn--primary {
  background: var(--foreground);
  color: var(--background);
}
.auth-btn--primary:hover { opacity: 0.92; }

.auth-card__alert {
  padding: 12px 14px;
  margin-bottom: 4px;
  border: 1px solid oklch(0.85 0.10 25 / 0.6);
  background: oklch(0.97 0.03 25);
  color: oklch(0.35 0.14 25);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.auth-card__alert-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-card__alert-list {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
  line-height: 1.5;
}

/* Admin · status pills */
.adm-pill--ok {
  background: oklch(0.95 0.06 145);
  color: oklch(0.36 0.13 145);
}
.adm-pill--review {
  background: oklch(0.95 0.06 75);
  color: oklch(0.40 0.16 65);
}
.adm-pill--user {
  background: oklch(0.93 0.05 280);
  color: oklch(0.36 0.13 280);
}

/* Admin · source pills (USDA blue, TACO green, TBCA purple, manual neutral) */
.adm-source-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  letter-spacing: 0.04em;
}
.adm-source-pill--usda   { background: oklch(0.92 0.07 240); color: oklch(0.35 0.16 240); }
.adm-source-pill--taco   { background: oklch(0.92 0.07 145); color: oklch(0.35 0.16 145); }
.adm-source-pill--tbca   { background: oklch(0.93 0.06 295); color: oklch(0.35 0.16 295); }
.adm-source-pill--off    { background: oklch(0.93 0.07 35);  color: oklch(0.36 0.16 35); }
.adm-source-pill--pof    { background: oklch(0.93 0.07 175); color: oklch(0.35 0.16 175); }
.adm-source-pill--manual { background: var(--secondary);     color: var(--secondary-foreground); }

/* Admin · ingredient detail */
.adm-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.adm-detail__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .adm-detail__grid { grid-template-columns: 2fr 1fr; }
}
.adm-detail__macros {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
}
.adm-detail__macro {
  background: var(--muted);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: left;
}
.adm-detail__micros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

/* Admin · review queue cards */
.adm-review-card {
  padding: 0;
  overflow: hidden;
}
.adm-review-card__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.adm-review-card__actions {
  display: flex;
  gap: 6px;
  align-self: flex-start;
  flex-wrap: wrap;
}
.adm-review-card__suggestions {
  background: var(--muted);
}
.adm-review-card__sug-head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adm-review-card__sug-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
  display: grid;
  gap: 4px;
}
.adm-review-card__sug-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--background);
  border-radius: var(--radius-sm);
}
.adm-review-card__sug-item:hover {
  background: var(--accent);
}

/* Admin · "Desrotulando" alternative-product cards */
.adm-alts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 0 20px 20px;
}
.adm-alt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--background);
  border: 1px solid var(--border);
}
.adm-alt-card--nova1 { border-left: 4px solid oklch(0.65 0.15 145); }   /* green — in_natura */
.adm-alt-card--nova2 { border-left: 4px solid oklch(0.70 0.13 95);  }   /* lime  — culinary */
.adm-alt-card--nova3 { border-left: 4px solid oklch(0.74 0.13 70);  }   /* amber — processed */
.adm-alt-card--nova4 { border-left: 4px solid oklch(0.65 0.20 25);  }   /* red   — ultra-processed */
.adm-alt-card--nova0 { border-left: 4px solid var(--border); }          /* unknown */
.adm-alt-card__rank {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.adm-alt-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.adm-alt-card__nova {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.adm-alt-card__nova--1       { background: oklch(0.93 0.07 145); color: oklch(0.32 0.16 145); }
.adm-alt-card__nova--2       { background: oklch(0.94 0.08 95);  color: oklch(0.36 0.15 95);  }
.adm-alt-card__nova--3       { background: oklch(0.94 0.10 70);  color: oklch(0.38 0.15 70);  }
.adm-alt-card__nova--4       { background: oklch(0.93 0.10 25);  color: oklch(0.38 0.18 25);  }
.adm-alt-card__nova--unknown { background: var(--secondary); color: var(--secondary-foreground); }
.adm-alt-card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.adm-alt-card__brand {
  font-size: 11px;
  color: var(--muted-foreground);
  font-style: italic;
}
.adm-alt-card__macros {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.adm-alt-card__metric-label {
  color: var(--muted-foreground);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.adm-alt-card__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.adm-alt-card__flag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
}
.adm-alt-card__flag--bad { background: oklch(0.93 0.10 25); color: oklch(0.40 0.18 25); }
.adm-alt-card__flag--ok  { background: oklch(0.93 0.07 145); color: oklch(0.32 0.16 145); }

.adm-alt-card__outliers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.adm-alt-card__outlier {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px dashed transparent;
  cursor: help;
}
.adm-alt-card__outlier--warning  { background: oklch(0.96 0.06 90);  color: oklch(0.42 0.14 80);  border-color: oklch(0.78 0.12 85); }
.adm-alt-card__outlier--alert    { background: oklch(0.94 0.10 50);  color: oklch(0.40 0.18 40);  border-color: oklch(0.72 0.16 45); }
.adm-alt-card__outlier--critical { background: oklch(0.92 0.14 25);  color: oklch(0.36 0.20 25);  border-color: oklch(0.62 0.20 25); font-weight: 600; }

.adm-alt-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

/* Admin · ingredient builder (/admin/ingredients/:id/build) */
.adm-pill--neutral {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.adm-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--background);
  color: var(--foreground);
}
.adm-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  background: var(--secondary);
  color: var(--foreground);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

.adm-builder__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.adm-builder__scroll {
  overflow-x: auto;
  border-top: 1px solid var(--border);
}
.adm-builder__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-builder__table thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted-foreground);
  padding: 8px 12px;
  vertical-align: top;
}
.adm-builder__table tbody th,
.adm-builder__table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.adm-builder__macro-col   { min-width: 140px; }
.adm-builder__current-col { min-width: 90px;  background: oklch(0.97 0.01 240); }
.adm-builder__source-col  { min-width: 140px; }

.adm-builder__macro-cell {
  font-weight: 500;
  text-align: left;
  background: var(--card);
}
.adm-builder__current-cell {
  background: oklch(0.98 0.01 240);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.adm-builder__cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.adm-builder__cell--divergent { background: oklch(0.97 0.05 90); }
.adm-builder__cell--warning   { background: oklch(0.95 0.08 60);  color: oklch(0.36 0.16 50); }
.adm-builder__cell--critical  { background: oklch(0.93 0.12 25);  color: oklch(0.34 0.20 25); font-weight: 600; }

.adm-builder__row--needs-attention th.adm-builder__macro-cell {
  border-left: 3px solid oklch(0.72 0.16 70);
  padding-left: 9px;
}

.adm-builder__flag {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  cursor: help;
}
.adm-builder__flag--critical { color: oklch(0.50 0.22 25); }
.adm-builder__flag--warning  { color: oklch(0.55 0.18 70); }
.adm-builder__flag--divergent { color: oklch(0.55 0.14 90); opacity: 0.8; }

.adm-builder__source-name {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  font-weight: 400;
}
.adm-builder__shortcut {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--secondary);
  color: var(--muted-foreground);
}

.adm-builder__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 20px;
  font-size: 11px;
  color: var(--muted-foreground);
  background: var(--secondary);
  border-top: 1px solid var(--border);
}
.adm-builder__legend > div { display: inline-flex; align-items: center; gap: 6px; }
.adm-builder__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.adm-builder__swatch--current   { background: oklch(0.92 0.04 240); }
.adm-builder__swatch--divergent { background: oklch(0.94 0.10 90); }
.adm-builder__swatch--warning   { background: oklch(0.92 0.12 60); }
.adm-builder__swatch--critical  { background: oklch(0.85 0.16 25); }

.adm-builder__source-unlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 120ms;
}
.adm-builder__source-unlink:hover {
  opacity: 1;
  background: oklch(0.93 0.10 25);
  color: oklch(0.40 0.18 25);
}

.adm-builder__provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
  margin-top: 3px;
}
.adm-builder__provenance-pill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  line-height: 14px;
  height: 14px;
}
.adm-builder__provenance-pill--usda   { background: oklch(0.92 0.07 240); color: oklch(0.35 0.16 240); }
.adm-builder__provenance-pill--taco   { background: oklch(0.92 0.07 145); color: oklch(0.35 0.16 145); }
.adm-builder__provenance-pill--tbca   { background: oklch(0.93 0.06 295); color: oklch(0.35 0.16 295); }
.adm-builder__provenance-pill--off    { background: oklch(0.93 0.07 35);  color: oklch(0.36 0.16 35); }
.adm-builder__provenance-pill--pof    { background: oklch(0.93 0.07 175); color: oklch(0.35 0.16 175); }
.adm-builder__provenance-pill--manual {
  background: var(--secondary);
  color: var(--muted-foreground);
  font-style: italic;
  font-weight: 500;
}

.adm-locale-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--secondary);
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
}

.adm-builder__action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  transition: background 120ms;
}
.adm-builder__action:hover { background: var(--accent); }
.adm-builder__action--adopt {
  background: oklch(0.95 0.06 145);
  color: oklch(0.32 0.16 145);
  border-color: oklch(0.78 0.10 145);
}
.adm-builder__action--adopt:hover { background: oklch(0.92 0.10 145); }
.adm-builder__action--ignore {
  color: var(--muted-foreground);
}

/* Translation multi-locale form */
.adm-translate-form { width: 100%; }
.adm-translate-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.adm-translate-form__field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 200px;
  min-width: 0;
}
.adm-translate-form__input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--input);
  border-radius: 4px;
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
}
.adm-translate-form__input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring);
}

/* OFF Brazil multi-select cards (Desrotulando seed review) */
.adm-off-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 20px 20px;
}
.adm-off-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, transform 80ms;
}
.adm-off-card:hover { border-color: oklch(0.65 0.12 70); transform: translateY(-1px); }
.adm-off-card:has(input:checked) {
  border-color: oklch(0.55 0.18 145);
  background: oklch(0.98 0.04 145);
  box-shadow: 0 0 0 1px oklch(0.55 0.18 145);
}
.adm-off-card--recommended:not(:has(input:checked)) {
  border-style: dashed;
  border-color: oklch(0.65 0.14 70);
}
.adm-off-card__check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 18px;
  height: 18px;
  accent-color: oklch(0.55 0.18 145);
}
.adm-off-card__star {
  position: absolute;
  top: 8px;
  right: 28px;
  font-size: 14px;
  color: oklch(0.60 0.18 70);
  line-height: 1;
}
.adm-off-card__external {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--background);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 3;
  transition: background 120ms;
}
.adm-off-card__external:hover { background: var(--accent); color: var(--foreground); }
.adm-off-card__media {
  position: relative;
  width: 100%;
  height: 120px;
  background: oklch(0.97 0.005 240);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm-off-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.adm-off-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  opacity: 0.4;
}
.adm-off-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 60px;
}
.adm-off-card__title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.adm-off-card__brand {
  font-size: 11px;
  color: var(--muted-foreground);
}
.adm-off-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.adm-off-card__code {
  font-size: 10px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

/* Duplicate / merge candidate row */
.adm-duplicate {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  transition: border-color 120ms;
}
.adm-duplicate:hover { border-color: oklch(0.72 0.10 280); }
