:root {
  color-scheme: light dark;
  interpolate-size: allow-keywords;

  --bg-light: #fafafa;
  --fg-light: #111113;
  --mut-light: #5e5e64;
  --line-light: #111113;
  --soft-light: #e2e2e7;
  --tint-light: #f2f2f4;
  --surface-1-light: #f2f2f4;
  --surface-2-light: #e8e8ec;
  --surface-3-light: #dcdce2;

  --bg-dark: #0a0a0c;
  --fg-dark: #f5f5f7;
  --mut-dark: #9e9ea7;
  --line-dark: #f5f5f7;
  --soft-dark: #25252b;
  --tint-dark: #141417;
  --surface-1-dark: #141417;
  --surface-2-dark: #1e1e23;
  --surface-3-dark: #2a2a31;

  --bg: var(--bg-light);
  --fg: var(--fg-light);
  --mut: var(--mut-light);
  --line: var(--line-light);
  --soft: var(--soft-light);
  --tint: var(--tint-light);
  --surface-1: var(--surface-1-light);
  --surface-2: var(--surface-2-light);
  --surface-3: var(--surface-3-light);
  --backdrop: rgb(0 0 0 / 0.42);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow-1: 0 2px 10px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-2: 0 14px 36px rgb(0 0 0 / 0.12), 0 4px 12px rgb(0 0 0 / 0.06);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  @media (prefers-color-scheme: dark) {
    --bg: var(--bg-dark);
    --fg: var(--fg-dark);
    --mut: var(--mut-dark);
    --line: var(--line-dark);
    --soft: var(--soft-dark);
    --tint: var(--tint-dark);
    --surface-1: var(--surface-1-dark);
    --surface-2: var(--surface-2-dark);
    --surface-3: var(--surface-3-dark);
    --backdrop: rgb(0 0 0 / 0.72);
    --shadow-1: 0 2px 12px rgb(0 0 0 / 0.35), 0 1px 3px rgb(0 0 0 / 0.25);
    --shadow-2: 0 16px 42px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35);
  }

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --bg: var(--bg-dark);
    --fg: var(--fg-dark);
    --mut: var(--mut-dark);
    --line: var(--line-dark);
    --soft: var(--soft-dark);
    --tint: var(--tint-dark);
    --surface-1: var(--surface-1-dark);
    --surface-2: var(--surface-2-dark);
    --surface-3: var(--surface-3-dark);
    --backdrop: rgb(0 0 0 / 0.72);
    --shadow-1: 0 2px 12px rgb(0 0 0 / 0.35), 0 1px 3px rgb(0 0 0 / 0.25);
    --shadow-2: 0 16px 42px rgb(0 0 0 / 0.55), 0 4px 14px rgb(0 0 0 / 0.35);
  }

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --bg: var(--bg-light);
    --fg: var(--fg-light);
    --mut: var(--mut-light);
    --line: var(--line-light);
    --soft: var(--soft-light);
    --tint: var(--tint-light);
    --surface-1: var(--surface-1-light);
    --surface-2: var(--surface-2-light);
    --surface-3: var(--surface-3-light);
    --backdrop: rgb(0 0 0 / 0.42);
    --shadow-1: 0 2px 10px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
    --shadow-2: 0 14px 36px rgb(0 0 0 / 0.12), 0 4px 12px rgb(0 0 0 / 0.06);
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --fg: light-dark(var(--fg-light), var(--fg-dark));
    --mut: light-dark(var(--mut-light), var(--mut-dark));
    --line: light-dark(var(--line-light), var(--line-dark));
    --soft: light-dark(var(--soft-light), var(--soft-dark));
    --tint: light-dark(var(--tint-light), var(--tint-dark));
    --surface-1: light-dark(var(--surface-1-light), var(--surface-1-dark));
    --surface-2: light-dark(var(--surface-2-light), var(--surface-2-dark));
    --surface-3: light-dark(var(--surface-3-light), var(--surface-3-dark));
    scrollbar-color: light-dark(#6b6b6b, #8a8a8a) light-dark(#f2f2f2, #141414);
  }
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 24px 190px;
}

/* Header */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 6vh;
}

.logo {
  font: italic 400 28px/1 "Instrument Serif", Georgia, serif;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  letter-spacing: -0.01em;
}

.head-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.head-nav .tbtn {
  border: 0;
  border-radius: 0;
  padding: 6px 2px;
  background: none;
  color: var(--mut);
  font-weight: 400;
}

.head-nav .tbtn:hover,
.head-nav .tbtn.is-active {
  background: none;
  color: var(--fg);
}

.tbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface-1);
  border: 1px solid var(--soft);
  color: var(--fg);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 180ms ease-out, transform 150ms ease-out;
}

.tbtn:hover {
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}

.tbtn.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.tbtn:active:not(:disabled) {
  transform: scale(0.97);
}

.tbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Home View */
#home-view {
  padding-top: clamp(20px, 6vh, 72px);
}

#home-view.is-drag .home-ask {
  background: var(--surface-2);
  border-color: var(--line);
}

h1 {
  font: 400 clamp(44px, 8.6vw, 102px)/0.95 "Instrument Serif", Georgia, serif;
  letter-spacing: -0.025em;
  margin: 0 0 38px;
}

.ask.home-ask {
  max-width: 720px;
  background: var(--surface-1);
  border: 1px solid var(--soft);
  border-radius: var(--r-xl);
  padding: 6px 10px 6px 24px;
  align-items: center;
  box-shadow: var(--shadow-1);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 220ms ease;
}

.ask.home-ask:focus-within {
  background: var(--bg);
  border-color: var(--line);
  box-shadow: var(--shadow-2);
}

.home-ask .go {
  margin-bottom: 0;
  padding: 11px 24px;
}

.home-ask input {
  font-size: clamp(19px, 2.5vw, 24px);
  padding: 10px 0;
}

.home-actions {
  max-width: 720px;
  margin-top: 16px;
  padding-left: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.quiet-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  border-radius: var(--r-pill);
  padding: 5px 10px;
  margin-left: -10px;
  font-size: 13px;
  color: var(--mut);
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms ease, background-color 150ms ease, transform 150ms ease-out;
}

.quiet-act:hover {
  color: var(--fg);
  background: var(--surface-1);
}

.quiet-act:active {
  transform: scale(0.97);
}

.quiet-act.is-active {
  color: var(--fg);
  background: var(--surface-1);
  font-weight: 500;
}

.mode-trigger {
  anchor-name: --mise-mode-anchor;
}

.mode-trigger::after {
  content: " ▾";
  opacity: 0.65;
}

.ask {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-bottom: 2px solid var(--line);
  max-width: 780px;
}

.ask input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--fg);
  font: 400 clamp(20px, 3.2vw, 30px)/1.3 "Instrument Serif", Georgia, serif;
  padding: 10px 0;
}

.ask input::placeholder {
  color: var(--mut);
}

.ask input:focus-visible {
  outline: none;
}

.photo-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--soft);
  background: var(--surface-1);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease-out;
}

.photo-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.go {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: var(--r-pill);
  padding: 9px 22px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-1);
  transition: opacity 150ms ease, box-shadow 180ms ease-out, transform 150ms ease-out;
}

.go:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-2);
}

.go:active:not(:disabled) {
  transform: scale(0.97);
}

.go:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.photo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  max-width: 780px;
}

.photo-thumb {
  position: relative;
  margin: 0;
  width: 68px;
  height: 68px;
  border: 1px solid var(--soft);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-1);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
}

.photo-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  line-height: 1;
  font-size: 13px;
  cursor: pointer;
}

.photo-hint {
  color: var(--mut);
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  max-width: 780px;
}

.chip {
  background: var(--surface-1);
  border: 1px solid transparent;
  color: var(--fg);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 150ms ease-out;
}

.chip:hover {
  background: var(--surface-2);
  border-color: var(--soft);
}

.chip.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.chip:active:not(:disabled) {
  transform: scale(0.96);
}

.m3-check-chip.is-active::before {
  content: "✓ ";
  font-weight: 600;
}

.home-prompts {
  max-width: 720px;
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-size: 13.5px;
  color: var(--mut);
}

.prompts-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-right: 2px;
}

.prompt-link {
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--mut);
  cursor: pointer;
  font-size: inherit;
  transition: color 0.14s ease;
}

.prompt-link:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-disclosure {
  max-width: 720px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--mut);
}

.home-disclosure summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color 0.14s ease;
}

.home-disclosure summary::-webkit-details-marker {
  display: none;
}

.home-disclosure summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform 0.15s ease;
}

.home-disclosure[open] summary::before {
  transform: rotate(90deg);
}

.home-disclosure summary:hover {
  color: var(--fg);
}

.disclosure-body {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}

.note {
  max-width: 720px;
  color: var(--mut);
  font-size: 12.5px;
  margin-top: 26px;
}

.err {
  border: 1px solid var(--soft);
  background: var(--surface-1);
  border-radius: var(--r-md);
  padding: 14px 18px;
  max-width: 720px;
  margin-top: 18px;
  font-size: 14px;
}

/* Library (Recent / Saved) */
.library {
  margin-top: 56px;
  max-width: 720px;
}

.lib-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lib-tab {
  background: none;
  border: 0;
  border-radius: var(--r-pill);
  padding: 6px 14px;
  color: var(--mut);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease-out;
}

.lib-tab:hover {
  color: var(--fg);
  background: var(--surface-1);
}

.lib-tab.is-active {
  color: var(--bg);
  background: var(--fg);
}

.lib-row {
  display: flex;
  align-items: center;
  border-radius: var(--r-md);
  padding: 2px 8px;
  transition: background-color 150ms ease;
}

.lib-row:hover {
  background: var(--surface-1);
}

.lib-open {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: none;
  border: 0;
  padding: 11px 6px;
  cursor: pointer;
}

.lib-title {
  font: 400 22px/1.2 "Instrument Serif", Georgia, serif;
}

.lib-meta {
  font-size: 13px;
  color: var(--mut);
  white-space: nowrap;
}

.lib-del {
  background: none;
  border: 0;
  color: var(--mut);
  font-size: 18px;
  padding: 8px 6px;
  cursor: pointer;
}

.lib-del:hover {
  color: var(--fg);
}

.lib-empty {
  color: var(--mut);
  font-size: 14px;
  border-top: 1px solid var(--soft);
  padding: 14px 0;
}

/* Recipe View */
.recipe-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.bar-left,
.bar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recipe-bar .go {
  margin-bottom: 0;
}

.stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mut);
  margin-bottom: 10px;
}

.title {
  font: 400 clamp(40px, 7.2vw, 84px)/0.98 "Instrument Serif", Georgia, serif;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.tag {
  font: italic 400 clamp(19px, 2.5vw, 26px)/1.35 "Instrument Serif", Georgia, serif;
  color: var(--mut);
  max-width: 680px;
  margin: 0 0 26px;
}

.change-banner {
  border-left: 2px solid var(--line);
  padding: 4px 0 4px 12px;
  font-size: 14px;
  margin: 0 0 22px;
  max-width: 680px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  background: var(--surface-1);
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  padding: 16px 22px;
}

.meta > div {
  padding: 2px 0;
}

.meta small {
  display: block;
  color: var(--mut);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.meta b {
  font: 400 28px/1.15 "Instrument Serif", Georgia, serif;
}

.meta-sub {
  display: block;
  font-size: 12px;
  color: var(--mut);
  margin-top: 2px;
}

.step-ctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--soft);
  border-radius: var(--r-pill);
  padding: 3px 6px;
}

.step-ctl button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-1);
  color: var(--fg);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 130ms ease-out;
}

.step-ctl button:hover {
  background: var(--fg);
  color: var(--bg);
}

.step-ctl button:active {
  transform: scale(0.92);
}

.unit-seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--soft);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  margin-top: 3px;
}

.seg-btn {
  background: none;
  border: 0;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.seg-btn.is-active {
  background: var(--fg);
  color: var(--bg);
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  margin-top: 44px;
}

@media (max-width: 780px) {
  .cols {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .meta > div {
    padding-right: 18px;
    margin-right: 18px;
  }
}

h2.h {
  font: 400 34px/1 "Instrument Serif", Georgia, serif;
  margin: 0 0 18px;
}

/* Ingredients */
ul.ing {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--soft);
}

.ing-row:last-child {
  border-bottom: 1px solid var(--soft);
}

.ing-check {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.box {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  transform: translateY(3px);
  transition: background-color 150ms ease, transform 180ms ease-out;
}

:is(.ing-row, .ord-ing-row).on .box {
  background: var(--fg);
  transform: translateY(3px) scale(1.04);
}

:is(.ing-row, .ord-ing-row).on .box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4.5px;
  height: 8.5px;
  border: solid var(--bg);
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

:is(.ing-row, .ord-ing-row).on span.t {
  text-decoration: line-through;
  color: var(--mut);
}

.amt {
  font-weight: 600;
  white-space: nowrap;
}

.sub {
  color: var(--mut);
  font-size: 14px;
}

.inline-ai-btn {
  flex: none;
  background: none;
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--mut);
  cursor: pointer;
}

:where(.ing-row:hover, .step-row:hover) .inline-ai-btn {
  border-color: var(--line);
  color: var(--fg);
}

.inline-ai-btn:focus-visible {
  border-color: var(--line);
  color: var(--fg);
}

.inline-ai-btn:hover,
.inline-ai-btn[aria-expanded="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.rev-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  font: 500 10px/1.3 "Instrument Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

/* Method Steps */
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: s;
}

.step-row {
  counter-increment: s;
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: 18px 0;
  border-top: 1px solid var(--soft);
}

.step-row:last-child {
  border-bottom: 1px solid var(--soft);
}

.step-row::before {
  content: counter(s);
  font: italic 400 30px/1 "Instrument Serif", Georgia, serif;
}

.step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.step-toggle {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.step-toggle h3 {
  margin: 0;
  font: 600 16px "Instrument Sans", sans-serif;
}

.step-text {
  margin: 0;
  max-width: 62ch;
  cursor: pointer;
}

.step-row.on {
  opacity: 0.4;
}

.step-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.timer-pill {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.timer-pill:hover,
.timer-pill.is-running {
  background: var(--fg);
  color: var(--bg);
}

.timer-pill.is-done {
  background: var(--fg);
  color: var(--bg);
  border-style: dashed;
}

.mins {
  color: var(--mut);
  font-size: 13px;
}

/* Tips */
.tips {
  margin-top: 44px;
  border-top: 2px solid var(--line);
  padding-top: 22px;
  max-width: 720px;
}

.tips p {
  margin: 0 0 10px;
}

/* Culinary Intelligence Accordions */
.intel {
  margin-top: 44px;
  border-top: 2px solid var(--line);
  padding-top: 22px;
}

.accordion {
  border-bottom: 1px solid var(--soft);
}

.intel-item {
  border-top: 1px solid var(--soft);
}

.intel-item > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75ch;
  padding: 15px 0;
  cursor: pointer;
  font: 400 24px/1.2 "Instrument Serif", Georgia, serif;
}

.intel-item > summary::marker,
.intel-item > summary::-webkit-details-marker {
  display: none;
}

.intel-item > summary::before {
  content: "▾";
  display: inline-block;
  font: 400 15px/1 "Instrument Sans", sans-serif;
  rotate: -90deg;
}

.intel-item[open] > summary::before {
  rotate: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  .intel-item > summary::before {
    transition: rotate 0.2s ease;
  }
}

.intel-item::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
}

.intel-item:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .intel-item::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.16s;
    transition-timing-function: ease-out;
    transition-behavior: allow-discrete;
  }
}

.intel-body {
  display: flow-root;
  padding: 6px 0 24px;
}

.intel-hint,
.intel-loading,
.intel-err,
.intel-note {
  color: var(--mut);
  font-size: 14px;
  margin: 8px 0 0;
}

.nut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 16px;
  padding: 10px 0 12px;
}

.nut-grid small,
.pair-grid small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.nut-grid b {
  font: 400 28px/1.1 "Instrument Serif", Georgia, serif;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag-pill {
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}

.flavor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 28px;
  margin: 6px 0 14px;
}

.flavor-row {
  display: grid;
  grid-template-columns: 64px 1fr 24px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.flavor-lbl {
  text-transform: capitalize;
  color: var(--mut);
}

.flavor-track {
  height: 4px;
  background: var(--soft);
}

.flavor-fill {
  height: 100%;
  background: var(--fg);
}

.flavor-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.intel-summary {
  margin: 6px 0 8px;
}

.intel-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.pair-grid b {
  display: block;
  font: 400 21px/1.2 "Instrument Serif", Georgia, serif;
  margin: 2px 0 4px;
}

.pair-grid p {
  margin: 0;
  font-size: 14px;
  color: var(--mut);
}

/* Skeleton Bars */
.sk-lines {
  padding: 8px 0;
}

.bar {
  height: 10px;
  background: var(--soft);
  margin-bottom: 12px;
  animation: p 1.2s ease-in-out infinite alternate;
}

.bar:nth-child(2) { width: 72%; animation-delay: 0.2s; }
.bar:nth-child(3) { width: 88%; animation-delay: 0.4s; }
.bar:nth-child(4) { width: 58%; animation-delay: 0.6s; }

@keyframes p {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

/* Floating Timer Bar */
.timer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 124px;
  pointer-events: none;
  padding: 0 24px;
  z-index: 20;
}

.timer-bar-in {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tb-item {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}

.tb-clock {
  font-variant-numeric: tabular-nums;
}

.tb-btn {
  background: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

/* Bottom Revision Dock */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--soft);
  padding: 10px 24px calc(12px + env(safe-area-inset-bottom, 0px));
}

.dock .in {
  max-width: 1060px;
  margin: 0 auto;
}

.dock-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.version-pills {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ver-pill {
  background: var(--surface-1);
  border: 1px solid var(--soft);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease-out;
}

.ver-pill:hover {
  background: var(--surface-2);
}

.ver-pill.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.dock-chips {
  margin-top: 0;
  max-width: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-chips .chip {
  white-space: nowrap;
  font-size: 12.5px;
  padding: 4px 12px;
}

.dock .ask {
  max-width: none;
  background: var(--surface-1);
  border: 1px solid var(--soft);
  border-radius: var(--r-xl);
  padding: 4px 8px 4px 18px;
  align-items: center;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.dock .ask:focus-within {
  background: var(--bg);
  border-color: var(--line);
}

.dock .ask input {
  font-size: 18px;
  padding: 6px 0;
}

.dock .go {
  margin-bottom: 0;
  padding: 7px 18px;
}

/* Mode Picker Popover */
[popover]:is(:popover-open, .\:popover-open) {
  display: block;
}

.mode-pop {
  width: min(272px, calc(100vw - 24px));
  padding: 8px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  transform-origin: top left;
}

@supports (position-area: block-end) {
  .mode-pop {
    position-anchor: --mise-mode-anchor;
    inset: auto;
    margin: 8px 0 0;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-block, flip-inline;
  }
}

@supports not (position-area: block-end) {
  .mode-pop {
    position: fixed;
    inset: auto 12px 24px 12px;
    margin: 0 auto;
  }
}

.mode-opt {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 130ms ease-out;
}

.mode-opt strong {
  font-size: 13.5px;
  font-weight: 500;
}

.mode-opt small {
  font-size: 12px;
  color: var(--mut);
}

.mode-opt:hover {
  background: var(--surface-1);
}

.mode-opt:active {
  transform: scale(0.98);
}

.mode-opt.is-active {
  background: var(--fg);
  color: var(--bg);
}

.mode-opt.is-active small {
  color: var(--bg);
  opacity: 0.78;
}

/* Anchored Popovers */
.ai-pop {
  background-color: var(--bg);
  color: var(--fg);
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  padding: 18px;
  width: min(400px, calc(100vw - 24px));
  max-height: min(460px, 75dvh);
  overflow-y: auto;
  box-shadow: var(--shadow-2);
  transform-origin: top left;
}

@supports (position-area: block-end) {
  .ai-pop {
    position-anchor: --mise-anchor;
    inset: auto;
    margin: 6px 0 0;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  }
}

@supports not (position-area: block-end) {
  .ai-pop {
    position: fixed;
    inset: auto 12px 16px 12px;
    width: auto;
    max-width: 440px;
    margin: 0 auto;
  }
}

.pop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--soft);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.pop-head small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.pop-head strong {
  font: 400 22px/1.15 "Instrument Serif", Georgia, serif;
}

.pop-close {
  background: none;
  border: 1px solid var(--soft);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  line-height: 1;
  font-size: 18px;
  cursor: pointer;
}

.pop-close:hover {
  border-color: var(--line);
  background: var(--fg);
  color: var(--bg);
}

.pop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pop-chips .chip {
  font-size: 12px;
  padding: 4px 10px;
}

.pop-p {
  margin: 0 0 8px;
  font-size: 14px;
}

.pop-status,
.pop-err {
  font-size: 13.5px;
  color: var(--mut);
  margin: 6px 0;
}

.pop-subhead {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  margin: 12px 0 6px;
}

.swap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--soft);
}

.swap-info b {
  display: block;
  font-size: 14px;
}

.swap-info small {
  color: var(--mut);
  font-size: 12.5px;
}

.pop-answer {
  border-left: 2px solid var(--line);
  padding-left: 10px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.pop-answer p {
  margin: 0 0 6px;
}

.pop-form {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--soft);
  padding-top: 10px;
  margin-top: 10px;
}

.pop-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 6px 0;
  font-size: 14px;
}

.pop-form .go {
  margin-bottom: 0;
  padding: 6px 14px;
  font-size: 13px;
}

/* Native Modal Dialogs */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background-color: transparent;
  overflow: hidden;
  overscroll-behavior: contain;
  transition-property: background-color, display, overlay;
  transition-duration: 0.14s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog,
[popover] {
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.1s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;

  @media (prefers-reduced-motion: no-preference) {
    transform: translateY(6px);
  }
}

:is(dialog[open], [popover]:popover-open):where(:not([data-closing])) {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: translateY(0);

    @starting-style {
      transform: translateY(6px);
    }
  }
}

dialog[open]:not([data-closing])::backdrop {
  background-color: var(--backdrop);

  @starting-style {
    background-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  [popover] {
    transition-duration: 0.05s;
  }
  .bar,
  .pulse-dot,
  .lib-open {
    animation: none;
    transition: none;
  }
}

.modal-sheet {
  width: min(600px, calc(100vw - 24px));
  max-height: min(88dvh, 760px);
  margin: auto;
  padding: 24px;
  background-color: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
  overflow-y: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-head small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.modal-head h2 {
  margin: 2px 0 0;
  font: 400 34px/1 "Instrument Serif", Georgia, serif;
}

.prov-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field input,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--soft);
  padding: 9px 12px;
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  border-color: var(--line);
  outline: none;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.field-help {
  color: var(--mut);
  font-size: 12.5px;
}

.env-pill {
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 999px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.preset-chips .chip {
  font-size: 12px;
  padding: 4px 10px;
}

.test-status {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-size: 13.5px;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--soft);
}

.modal-foot .go {
  margin-bottom: 0;
}

/* Fullscreen Cook Mode Dialog */
.cook-sheet {
  inset: 0;
  width: 100dvw;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--fg);
}

.cook-sheet[open] {
  display: flex;
  flex-direction: column;
}

.cook-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.cook-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cook-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.cook-recipe-name {
  margin: 2px 0 0;
  font: italic 400 22px/1.15 "Instrument Serif", Georgia, serif;
}

.cook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cook-progress {
  flex: none;
  height: 2px;
  background: var(--soft);
  margin: 14px 0 24px;
}

.cook-progress-fill {
  height: 100%;
  background: var(--fg);
  transition: width 0.2s ease;
}

.cook-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  padding-right: 4px;
}

.cook-body.has-drawer {
  grid-template-columns: minmax(0, 1fr) 280px;
}

@media (max-width: 700px) {
  .cook-body.has-drawer {
    grid-template-columns: 1fr;
  }
  .cook-ing-drawer {
    border-left: 0;
    border-top: 1px solid var(--soft);
    padding-left: 0;
    padding-top: 20px;
  }
}

.cook-step-num {
  font: italic 400 28px/1 "Instrument Serif", Georgia, serif;
  color: var(--mut);
  margin-bottom: 6px;
}

.cook-step-title {
  margin: 0 0 12px;
  font: 600 18px/1.2 "Instrument Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cook-step-text {
  margin: 0 0 22px;
  font: 400 clamp(24px, 3.6vw, 38px)/1.28 "Instrument Serif", Georgia, serif;
  max-width: 34ch;
}

.cook-ing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.cook-pill {
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13.5px;
}

.cook-timers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cook-timers .timer-pill {
  padding: 7px 16px;
  font-size: 14px;
}

.cook-ask-box {
  border-top: 1px solid var(--soft);
  padding-top: 18px;
  max-width: 680px;
}

.cook-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cook-quick-chips .chip {
  font-size: 12px;
  padding: 4px 10px;
}

.cook-ask-form input {
  font-size: 18px;
  padding: 7px 0;
}

.cook-ask-form .go {
  margin-bottom: 6px;
  padding: 6px 16px;
}

.cook-help-loading {
  color: var(--mut);
  font-size: 14px;
  margin: 12px 0 0;
}

.cook-help-card {
  margin-top: 14px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
  font-size: 15px;
}

.cook-help-card p {
  margin: 0 0 8px;
}

.cook-cue {
  color: var(--mut);
  font-size: 13.5px;
}

.cook-ing-drawer {
  border-left: 1px solid var(--soft);
  padding-left: 24px;
}

.cook-ing-drawer h3 {
  margin: 0 0 12px;
  font: 400 26px/1 "Instrument Serif", Georgia, serif;
}

.cook-ing-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cook-ing-drawer li {
  padding: 8px 0;
  border-top: 1px solid var(--soft);
  font-size: 14.5px;
}

.cook-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--soft);
  padding-top: 16px;
  margin-top: 24px;
}

.cook-foot .go {
  margin-bottom: 0;
}

.cook-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.cook-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--soft);
  background: none;
  font-size: 12px;
  cursor: pointer;
}

.cook-dot.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* Ingredient Tag Entry Bar */
.ing-tags-bar {
  max-width: 720px;
  margin: 16px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

.ing-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ing-tag-list:not(:empty) {
  margin-bottom: 10px;
}

.ing-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

.ing-tag-pill button {
  background: none;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.ing-tag-entry {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ing-tag-entry input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--soft);
  padding: 6px 0;
  font-size: 14px;
}

.ing-tag-entry input:focus {
  border-bottom-color: var(--line);
  outline: none;
}

.alt-submit {
  margin-bottom: 10px;
  white-space: nowrap;
}

/* Provider Picker Dialog */
.prov-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.prov-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--soft);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.prov-item:hover {
  border-color: var(--line);
}

.prov-item-main strong {
  display: block;
  font: 400 22px/1.15 "Instrument Serif", Georgia, serif;
}

.prov-item-main small {
  font-size: 12.5px;
  opacity: 0.72;
}

.prov-status {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.prov-item.is-unconfigured {
  opacity: 0.55;
}

.prov-item.is-active {
  opacity: 1;
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* Dish Options Grid (#ideas-view) */
.ideas-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.ideas-title {
  font: 400 clamp(34px, 5.5vw, 58px)/1 "Instrument Serif", Georgia, serif;
  letter-spacing: -0.02em;
  margin: 12px 0 6px;
}

.ideas-sub {
  margin: 0;
  font: italic 400 clamp(17px, 2vw, 22px)/1.35 "Instrument Serif", Georgia, serif;
  color: var(--mut);
}

.ideas-refine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.idea-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
  text-align: left;
  padding: 0;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 200ms ease-out, transform 180ms ease-out;
}

.idea-card:hover {
  background: var(--bg);
  border-color: var(--line);
  box-shadow: var(--shadow-2);
}

.idea-card:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: no-preference) {
  .idea-card {
    animation: view-rise 320ms cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
  }
  .idea-card:nth-child(2) { animation-delay: 35ms; }
  .idea-card:nth-child(3) { animation-delay: 70ms; }
  .idea-card:nth-child(4) { animation-delay: 105ms; }
  .idea-card:nth-child(5) { animation-delay: 140ms; }
  .idea-card:nth-child(6) { animation-delay: 175ms; }
  .idea-card:hover {
    transform: translateY(-3px);
  }
}

.dish-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--tint);
  border-bottom: 1px solid var(--soft);
}

.dish-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.06);
  transition: filter 0.25s ease, transform 0.3s ease;
}

.dish-frame.is-color img {
  filter: none;
}

.idea-card:hover .dish-frame img {
  transform: scale(1.02);
}

.dish-frame-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic 400 18px "Instrument Serif", Georgia, serif;
  color: var(--mut);
}

.dish-frame.is-loading {
  background: linear-gradient(110deg, var(--tint) 30%, var(--soft) 50%, var(--tint) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.idea-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.idea-meta {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  margin-bottom: 6px;
}

.idea-title {
  margin: 0 0 6px;
  font: 400 26px/1.12 "Instrument Serif", Georgia, serif;
}

.idea-tag {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--mut);
  line-height: 1.45;
}

.idea-uses {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--soft);
  font-size: 12px;
}

.idea-pill {
  border: 1px solid var(--soft);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--mut);
}

.idea-pill.is-pantry {
  border-color: var(--line);
  color: var(--fg);
}

.idea-cta {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
}

.idea-card:hover .idea-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.idea-card-sk {
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
  min-height: 310px;
}

.idea-card-sk .idea-body {
  gap: 10px;
}

/* Recipe Hero Photograph */
.recipe-hero {
  position: relative;
  margin: 0 0 28px;
  border: 1px solid var(--soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
}

.recipe-hero .dish-frame {
  border-bottom: 0;
  max-height: 360px;
}

.hero-tools {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
}

.hero-btn {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.hero-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.hero-credit {
  padding: 7px 12px;
  border-top: 1px solid var(--soft);
  font-size: 12px;
  color: var(--mut);
  background: var(--bg);
}

.hero-credit a {
  color: inherit;
  text-underline-offset: 3px;
}

.img-optin-box {
  border-top: 1px solid var(--soft);
  border-bottom: 1px solid var(--soft);
  padding: 14px 0;
  margin: 14px 0 10px;
}

.img-optin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.img-optin-head strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.img-optin-head small {
  display: block;
  max-width: 360px;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--mut);
}

/* Library & Cook Mode Thumbnails */
.lib-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lib-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--soft);
  border-radius: var(--r-sm);
  filter: grayscale(100%) contrast(1.06);
}

.cook-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cook-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--soft);
  border-radius: var(--r-sm);
  filter: grayscale(100%) contrast(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .dish-frame.is-loading {
    animation: none;
  }
  .idea-card,
  .dish-frame img {
    transition: none;
  }
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Full-Screen BYOK Settings Page */
.settings-shell {
  max-width: 760px;
  padding-top: clamp(8px, 3vh, 36px);
}

.st-head {
  margin-bottom: 24px;
}

.st-head h1 {
  margin: 12px 0 8px;
  font: 400 clamp(40px, 6vw, 68px)/0.98 "Instrument Serif", Georgia, serif;
}

.st-sub {
  margin: 0;
  color: var(--mut);
  font-size: 15px;
}

.st-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--soft);
  margin-bottom: 28px;
}

.st-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 2px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mut);
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.st-tab:hover {
  color: var(--fg);
}

.st-tab.is-active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.st-group {
  min-inline-size: 0;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-top: 1px solid var(--soft);
  margin: 0 0 28px;
  padding: 20px 0 0;
}

.st-group code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.st-group legend {
  padding: 0 10px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.prov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.prov-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.prov-card-wrap {
  display: flex;
}

.prov-card {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 14px 40px 14px 16px;
  border: 1px solid var(--soft);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 180ms ease-out, transform 150ms ease-out;
}

.prov-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.45;
  transition: opacity 150ms ease;
}

.prov-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.prov-card:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.prov-card:active {
  transform: scale(0.98);
}

.prov-card-wrap input:focus-visible + .prov-card {
  outline: 2px solid CanvasText;
  outline-offset: 3px;
}

.prov-card.is-selected {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  box-shadow: var(--shadow-1);
}

.prov-card.is-selected::before {
  opacity: 0.9;
}

.prov-card.is-selected::after {
  transform: scale(1);
}

.prov-card-name {
  font: 400 20px/1.15 "Instrument Serif", Georgia, serif;
}

.prov-card-tag {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

.prov-card-sub {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.35;
  opacity: 0.76;
}

.st-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.st-field:last-child {
  margin-bottom: 0;
}

.st-field label,
.st-field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.st-field input:not([type="range"]),
.st-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--surface-1);
  color: var(--fg);
  border: 1px solid var(--soft);
  border-radius: var(--r-md);
  font-size: max(1rem, 1em);
  line-height: 1.4;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 180ms ease-out;
}

.st-field input:not([type="range"]):focus,
.st-field select:focus {
  background: var(--bg);
  border-color: var(--line);
  box-shadow: var(--shadow-1);
  outline: none;
}

.st-field input:user-invalid {
  border-color: var(--fg);
}

.st-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.st-input-row input {
  flex: 1 1 240px;
  min-width: 0;
}

.st-input-row .tbtn {
  min-height: 48px;
  padding: 8px 16px;
}

.st-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.st-presets .chip {
  font-size: 12px;
  padding: 5px 11px;
}

.st-range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.st-range-row span {
  font-size: 12.5px;
  color: var(--mut);
  white-space: nowrap;
}

.st-range-row input[type="range"] {
  flex: 1;
  min-height: 48px;
  accent-color: var(--fg);
  cursor: pointer;
}

.st-help {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mut);
  line-height: 1.5;
}

.st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.st-actions .go,
.st-actions .tbtn {
  margin-bottom: 0;
  min-height: 48px;
  padding: 10px 20px;
}

.st-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--mut);
}

.st-status.is-error {
  color: var(--fg);
  border-left: 2px solid var(--fg);
  padding-left: 10px;
}

.st-data-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 8px 0 12px;
}

.st-data-list > div {
  background: var(--surface-1);
  border: 1px solid var(--soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
}

.st-data-list dt {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mut);
}

.st-data-list dd {
  margin: 4px 0 0;
  font: 400 24px/1.1 "Instrument Serif", Georgia, serif;
}

.st-danger-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.st-danger-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--soft);
}

.st-danger-row strong {
  display: block;
  font-size: 14.5px;
}

.st-danger-row small {
  display: block;
  color: var(--mut);
  font-size: 13px;
  max-width: 440px;
}

.st-danger-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-danger-btns .go,
.st-danger-btns .tbtn {
  margin-bottom: 0;
  min-height: 48px;
}

/* Custom Material Controls */
.st-range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.m3-range-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

input[type="range"].m3-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
  min-height: 48px;
  background: transparent;
  cursor: pointer;
}

input[type="range"].m3-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(
    to right,
    var(--fg) 0%,
    var(--fg) var(--val-pct, 58%),
    var(--surface-2) var(--val-pct, 58%),
    var(--surface-2) 100%
  );
  border: 1px solid var(--soft);
}

input[type="range"].m3-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--fg);
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-1);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

input[type="range"].m3-slider:hover::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: var(--shadow-2);
}

input[type="range"].m3-slider:active::-webkit-slider-thumb {
  transform: scale(1.18);
}

input[type="range"].m3-slider::-moz-range-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--soft);
}

input[type="range"].m3-slider::-moz-range-progress {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--fg);
}

input[type="range"].m3-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fg);
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-1);
  transition: transform 150ms ease-out;
}

select.m3-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 10px 38px 10px 14px;
  background-color: var(--surface-1);
  color: var(--fg);
  border: 1px solid var(--soft);
  border-radius: var(--r-md);
  font-size: max(1rem, 1em);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23636369' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 180ms ease-out;
}

select.m3-select:hover {
  background-color: var(--surface-2);
  border-color: var(--line);
}

select.m3-select:focus {
  background-color: var(--bg);
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}

@supports (appearance: base-select) {
  select.m3-select,
  select.m3-select::picker(select) {
    appearance: base-select;
  }

  select.m3-select {
    background-image: none;
    padding: 10px 14px;
  }

  select.m3-select::picker-icon {
    color: var(--mut);
    transition: transform 180ms ease-out;
  }

  select.m3-select:open::picker-icon {
    transform: rotate(180deg);
  }

  select.m3-select::picker(select) {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--soft);
    border-radius: var(--r-md);
    padding: 6px;
    margin-top: 6px;
    box-shadow: var(--shadow-2);
  }

  select.m3-select option {
    padding: 9px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
  }

  select.m3-select option:hover {
    background: var(--surface-1);
  }

  select.m3-select option::checkmark {
    color: var(--fg);
  }
}

.m3-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 4px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid var(--soft);
}

.m3-step-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease-out;
}

.m3-step-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.m3-step-btn:active {
  transform: scale(0.92);
}

.m3-step-val {
  min-width: 32px;
  text-align: center;
  font: 400 24px/1 "Instrument Serif", Georgia, serif;
  font-variant-numeric: tabular-nums;
}

.m3-seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  min-height: 48px;
  border-radius: var(--r-pill);
  background: var(--surface-1);
  border: 1px solid var(--soft);
}

.m3-seg-btn {
  flex: 1;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--mut);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms ease-out;
}

.m3-seg-btn:hover {
  color: var(--fg);
}

.m3-seg-btn.is-active {
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-1);
}

/* Culinary Pot Loading Indicator */
.cook-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 36px 24px;
  margin: 12px 0 24px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--soft);
}

.cook-loader-emblem {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--soft);
  box-shadow: var(--shadow-1);
  display: grid;
  place-items: center;
}

.cook-pot-svg {
  width: 44px;
  height: 40px;
  color: var(--fg);
}

.cook-pot-svg.is-sm {
  width: 22px;
  height: 20px;
  flex: none;
}

.cook-loader-title {
  font: 400 24px/1.15 "Instrument Serif", Georgia, serif;
}

.cook-loader-detail {
  margin: 0;
  font-size: 13.5px;
  color: var(--mut);
}

.cook-loader.is-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}

@media (prefers-reduced-motion: no-preference) {
  .pot-lid {
    transform-origin: 32px 23px;
    animation: simmer-lid 1.9s ease-in-out infinite;
  }

  .pot-steam {
    animation: steam-rise 1.9s ease-in-out infinite;
  }
  .pot-steam-1 { animation-delay: 0s; }
  .pot-steam-2 { animation-delay: 0.45s; }
  .pot-steam-3 { animation-delay: 0.9s; }

  .pot-heat {
    animation: ember-pulse 2.2s ease-in-out infinite;
  }

  .view-enter {
    animation: view-rise 260ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
  }

  .mode-pop:is(:popover-open, .\:popover-open),
  .ai-pop:is(:popover-open, .\:popover-open) {
    animation:
      pop-grow 260ms linear(0, 0.45 15%, 1.08 35%, 0.97 55%, 1.01 75%, 1) both,
      fade-in 150ms ease-out both;
  }

  .ob-anim-next {
    animation: ob-slide-next 280ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
  }

  .ob-anim-prev {
    animation: ob-slide-prev 280ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
  }
}

@keyframes steam-rise {
  0% { opacity: 0; translate: 0 3px; }
  40% { opacity: 0.9; }
  100% { opacity: 0; translate: 0 -6px; }
}

@keyframes simmer-lid {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  35% { translate: 0 -1px; rotate: -1.4deg; }
  70% { translate: 0 -0.5px; rotate: 1.2deg; }
}

@keyframes ember-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.95; }
}

@keyframes pop-grow {
  from { scale: 0.92; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes view-rise {
  from { opacity: 0; translate: 0 8px; }
}

@keyframes ob-slide-next {
  from { opacity: 0; translate: 14px 0; }
}

@keyframes ob-slide-prev {
  from { opacity: 0; translate: -14px 0; }
}

/* Full-Screen Onboarding Flow */
.ob-shell {
  max-width: 660px;
  margin: 0 auto;
  padding-top: clamp(4px, 2.5vh, 28px);
}

.ob-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.ob-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
}

.ob-step-count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ob-progress {
  flex: 1;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}

.ob-progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--fg);
  transition: width 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ob-card {
  background: var(--bg);
  border: 1px solid var(--soft);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-1);
}

.ob-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 8px;
}

.ob-emblem {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 1px solid var(--soft);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.ob-pot {
  width: 48px;
  height: 44px;
}

.ob-step-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  margin-bottom: 8px;
}

.ob-title {
  margin: 0 0 10px;
  font: 400 clamp(38px, 6vw, 62px)/0.98 "Instrument Serif", Georgia, serif;
}

.ob-sub {
  margin: 0 0 24px;
  max-width: 52ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--mut);
}

.ob-welcome-acts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.ob-primary {
  margin-bottom: 0;
  min-height: 48px;
  padding: 11px 28px;
}

.ob-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) auto;
  gap: 20px;
}

@media (max-width: 560px) {
  .ob-two-col {
    grid-template-columns: 1fr;
  }
}

.ob-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--soft);
}

.ob-foot-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* Ingredient Order Strip */
.ing-order-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--soft);
}

.ing-order-bar .quiet-act {
  margin-left: 0;
}

/* Ordering Sheet Modal Dialog */
.order-sheet {
  width: min(760px, calc(100vw - 24px));
  max-height: min(88dvh, 840px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--soft);
  border-radius: var(--r-xl);
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.order-sheet[open] {
  display: flex;
  flex-direction: column;
}

.order-sheet .go,
.mcp-app-card .go {
  margin-bottom: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-sheet a.tbtn,
.mcp-app-card a.tbtn,
.order-sheet a.quiet-act {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ord-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  padding: clamp(18px, 3vw, 28px);
  gap: 16px;
}

.ord-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex: none;
}

.ord-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.ord-head h2 {
  margin: 2px 0 0;
  font: 400 32px/1.05 "Instrument Serif", Georgia, serif;
}

.ord-tabs {
  flex: none;
  width: 100%;
}

.ord-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
}

.ord-top-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ord-count {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mut);
}

.ord-top-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ord-app-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.ord-app-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--soft);
  background: var(--surface-1);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 140ms ease-out;
}

.ord-app-pill:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.ord-app-pill:active {
  transform: scale(0.98);
}

.ord-app-pill.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.ord-app-pill small {
  font-size: 11.5px;
  opacity: 0.72;
  margin-left: auto;
}

.ord-mcp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ord-addr-wrap {
  flex: 1;
  min-width: 200px;
}

.ord-addr-select {
  min-height: 42px;
}

.ord-sm-btn {
  padding: 9px 18px;
  font-size: 13.5px;
}

.ord-loading {
  padding: 4px 0;
}

.ord-err,
.ord-warn {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-1);
  font-size: 13.5px;
}

.ord-receipt {
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-1);
  font-size: 13.5px;
}

.ord-receipt small {
  display: block;
  margin-top: 4px;
  color: var(--mut);
  word-break: break-word;
}

.ord-ing-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--soft);
}

.ord-ing-item {
  border-bottom: 1px solid var(--soft);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ord-ing-item.is-have .t {
  opacity: 0.55;
}

.ord-ing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ord-ing-row .ing-check {
  flex: 1;
  min-width: 0;
}

.ord-row-act {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ord-ext-link {
  margin-left: 0;
  padding: 6px 10px;
}

.ord-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.ord-product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--soft);
}

.ord-product-meta {
  min-width: 0;
}

.ord-product-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.ord-product-meta small {
  display: block;
  font-size: 12px;
  color: var(--mut);
  margin-top: 2px;
}

.ord-add-btn {
  flex-shrink: 0;
  padding: 5px 12px;
}

.ord-cart-card {
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ord-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.ord-cart-head strong {
  display: block;
  font-size: 15px;
}

.ord-cart-head small {
  display: block;
  font-size: 13px;
  color: var(--mut);
  margin-top: 2px;
}

.ord-cart-acts {
  display: flex;
  gap: 8px;
}

.ord-confirm-box {
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ord-confirm-box p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.ord-confirm-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ord-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--soft);
  font-size: 13px;
  color: var(--mut);
}

.ord-empty {
  margin: 4px 0;
  color: var(--mut);
  font-size: 14px;
}

.ord-food-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
}

.ord-rest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ord-rest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--soft);
}

.ord-rest-card.is-closed {
  opacity: 0.55;
}

.ord-rest-card strong {
  display: block;
  font-size: 14.5px;
}

.ord-rest-card small {
  display: block;
  font-size: 12.5px;
  color: var(--mut);
  margin-top: 2px;
}

.ord-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ord-menu-head strong {
  display: block;
  font-size: 16px;
}

.ord-menu-head small {
  color: var(--mut);
  font-size: 12.5px;
}

.ord-launch-card {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ord-launch-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ord-launch-acts :is(.go, .tbtn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ord-launch-acts :is(.go, .tbtn),
.ord-cart-card :is(.go, .tbtn),
.ord-banner :is(.go, .tbtn) {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Delivery & MCP Settings Cards */
.mcp-companion-head {
  margin-bottom: 12px;
}

.mcp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--soft);
  background: var(--surface-1);
  font-size: 12px;
  font-weight: 500;
  color: var(--mut);
  white-space: nowrap;
  flex-shrink: 0;
}

.mcp-badge.is-on {
  border-color: var(--line);
  color: var(--fg);
}

.mcp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mut);
}

.mcp-dot.is-on {
  background: currentColor;
}

.mcp-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.mcp-app-card {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--soft);
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mcp-app-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.mcp-app-top strong {
  display: block;
  font-size: 15px;
}

.mcp-app-top small {
  display: block;
  font-size: 12px;
  color: var(--mut);
  margin-top: 2px;
}

.mcp-perm-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mut);
}

.mcp-blinkit-cfg {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcp-blinkit-cfg .field-split {
  grid-template-columns: 1fr;
}

.mcp-otp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mcp-otp-row input {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--soft);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
}

.mcp-app-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--soft);
}

.mcp-meta {
  font-size: 12px;
  color: var(--mut);
}

.mcp-card-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mcp-card-msg {
  margin: 0;
  padding: 9px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--soft);
  background: var(--bg);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--mut);
}

.mcp-card-msg.is-error {
  border-color: var(--line);
  color: var(--fg);
}

.ob-oauth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.ord-product-meta {
  flex: 1;
}

.ord-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm, 10px);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--soft);
  background: var(--surface-2, var(--soft));
}

.ord-product-meta s,
.ord-mrp {
  color: var(--mut);
  opacity: 0.72;
  text-decoration: line-through;
}

.ord-qty-ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  flex-shrink: 0;
}

.ord-qty-ctl .m3-step-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  font-size: 14px;
}

.ord-qty-ctl span {
  min-width: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ord-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--fg);
  border-radius: var(--r-lg, 16px);
  background: var(--bg);
  box-shadow: 0 -8px 20px color-mix(in srgb, var(--fg) 8%, transparent);
}

.ord-sticky-bar strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.ord-sticky-bar small {
  display: block;
  font-size: 12px;
  color: var(--mut);
}

.ord-goto-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 14px);
  background: var(--surface-1);
}

.ord-goto-box > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

.ord-goto-box[open] > summary {
  margin-bottom: 10px;
}

.ord-bill {
  margin: 0;
  display: grid;
  gap: 6px;
}

.ord-bill > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--mut);
}

.ord-bill dt,
.ord-bill dd {
  margin: 0;
}

.ord-bill dd {
  font-variant-numeric: tabular-nums;
}

.ord-bill > div.is-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.ord-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.ord-pay-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 12px);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.ord-pay-opt:hover {
  border-color: var(--fg);
  background: var(--surface-1);
}

.ord-pay-opt.is-active {
  border-color: var(--fg);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--fg);
}

.ord-pay-opt strong {
  font-size: 13px;
  font-weight: 600;
}

.ord-pay-opt small {
  font-size: 12px;
  color: var(--mut);
}

.ord-qr-card,
.ord-track-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 16px);
  background: var(--surface-1);
}

.ord-qr-card h3,
.ord-track-card h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
}

.ord-qr-frame {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #000000;
}

.ord-qr-frame svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.mcp-cloud-guide {
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 12px);
  background: var(--surface-1);
  font-size: 13px;
  color: var(--mut);
  overflow-wrap: anywhere;
}

.mcp-cloud-guide > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--fg);
}

.mcp-cloud-guide[open] > summary {
  margin-bottom: 8px;
}

.mcp-cloud-guide ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  line-height: 1.45;
  min-width: 0;
}

.mcp-cloud-guide li {
  min-width: 0;
}

.mcp-cloud-guide a {
  color: var(--fg);
  text-decoration: underline;
}

.mcp-cloud-note {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--mut);
  line-height: 1.45;
}

/* ==========================================================================
   Material 3 Expressive Full-Canvas Architecture & Motion Design Overhaul
   ========================================================================== */

:root {
  --spring-fast: linear(0, 0.45 14%, 0.92 32%, 1.06 50%, 0.99 72%, 1);
  --spring-spatial: linear(0, 0.38 11%, 0.86 27%, 1.08 44%, 1.02 62%, 0.99 80%, 1);
  --ease-exp-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --r-2xl: 36px;
}

/* 1. Full-Viewport Fluid Canvas & Sticky Glass Header */
.wrap {
  max-width: 1680px;
  width: 100%;
  padding: clamp(18px, 2.6vw, 40px) clamp(20px, 4.2vw, 68px) 190px;
}

.site-head {
  position: sticky;
  top: 12px;
  z-index: 15;
  margin-bottom: clamp(28px, 5vh, 56px);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.logo {
  font-size: clamp(28px, 2.4vw, 34px);
  transition: transform 280ms var(--spring-fast), letter-spacing 240ms var(--ease-exp-out);
}

.logo:hover {
  transform: scale(1.04);
  letter-spacing: 0.01em;
}

.head-nav {
  gap: 8px;
}

.head-nav .tbtn {
  border-radius: var(--r-pill);
  padding: 8px 16px;
  background: transparent;
  color: var(--mut);
  font-weight: 500;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-radius 280ms var(--spring-fast),
    transform 240ms var(--spring-fast);
}

.head-nav .tbtn:hover {
  background: var(--surface-1);
  color: var(--fg);
  border-radius: 14px;
}

.head-nav .tbtn.is-active {
  background: var(--fg);
  color: var(--bg);
  border-radius: 14px;
}

/* Scroll-Driven Top Progress Ribbon */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 2.5px;
      background: var(--fg);
      transform-origin: 0 50%;
      scale: 0 1;
      z-index: 40;
      pointer-events: none;
      animation: scroll-progress-grow linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes scroll-progress-grow {
  from { scale: 0 1; }
  to { scale: 1 1; }
}

/* 2. Material 3 Expressive Shape-Morphing Interactive Primitives */
.go,
.tbtn,
.chip,
.quiet-act,
.lib-tab,
.st-tab,
.ver-pill,
.timer-pill,
.seg-btn,
.m3-seg-btn,
.hero-btn {
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    border-radius 300ms var(--spring-fast),
    box-shadow 220ms var(--ease-exp-out),
    transform 260ms var(--spring-fast);
}

@media (prefers-reduced-motion: no-preference) {
  .go:hover:not(:disabled) {
    border-radius: 14px;
    transform: translateY(-2px) scale(1.02);
  }

  .go:active:not(:disabled) {
    border-radius: 10px;
    transform: scale(0.95);
  }

  .tbtn:hover:not(:disabled),
  .chip:hover:not(:disabled),
  .ver-pill:hover:not(:disabled),
  .timer-pill:hover:not(:disabled) {
    border-radius: 12px;
    transform: translateY(-1px);
  }

  .tbtn:active:not(:disabled),
  .chip:active:not(:disabled),
  .ver-pill:active:not(:disabled),
  .timer-pill:active:not(:disabled) {
    border-radius: 9px;
    transform: scale(0.94);
  }
}

/* 3. Uncontained Widescreen Home Stage */
#home-view {
  padding-top: clamp(8px, 3vh, 36px);
}

.home-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 5vw, 88px);
  align-items: start;
}

@media (min-width: 1120px) {
  .home-stage:has(> .library:not([hidden])) {
    grid-template-columns: minmax(0, 7.2fr) minmax(380px, 4.8fr);
  }
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mut);
  margin-bottom: 14px;
}

.home-kicker::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--fg);
}

#home-view h1 {
  font-size: clamp(50px, 7.8vw, 122px);
  line-height: 0.93;
  letter-spacing: -0.032em;
  margin: 0 0 clamp(28px, 4.5vh, 48px);
  max-width: 15ch;
}

#home-view h1:focus,
#ideas-heading:focus,
#recipe-heading:focus,
#settings-heading:focus,
#ob-heading:focus {
  outline: none;
}

/* Open Architectural Prompt Stage (Unboxed) */
.ask.home-ask {
  max-width: 980px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--fg);
  border-radius: 0;
  padding: 10px 0 16px;
  box-shadow: none;
  gap: 16px;
  transition:
    border-color 200ms ease,
    padding 280ms var(--spring-fast),
    background-color 220ms ease;
}

.ask.home-ask:focus-within {
  background: transparent;
  border-bottom-width: 3px;
  box-shadow: none;
  padding-left: 10px;
}

.home-ask input {
  font-size: clamp(22px, 2.8vw, 34px);
  padding: 8px 0;
}

.home-ask .go {
  padding: 14px 32px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-actions {
  max-width: 980px;
  margin-top: 20px;
  padding-left: 0;
  gap: 10px;
}

.home-actions .quiet-act {
  margin-left: 0;
  background: var(--surface-1);
  padding: 8px 16px;
  color: var(--fg);
  font-weight: 500;
}

.home-actions .quiet-act:hover {
  background: var(--surface-2);
  border-radius: 12px;
}

.home-actions .quiet-act.is-active {
  background: var(--fg);
  color: var(--bg);
  border-radius: 12px;
}

/* Unboxed Ingredient Tag Bar & Declarative Entry */
.ing-tags-bar {
  max-width: 980px;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--fg);
  border-radius: 0;
  padding: 8px 0 8px 18px;
  margin-top: 20px;
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 240ms var(--ease-exp-out),
    translate 280ms var(--spring-fast),
    display 240ms;
  transition-behavior: allow-discrete;
}

@starting-style {
  .ing-tags-bar {
    opacity: 0;
    translate: 0 -10px;
  }
}

.home-prompts,
.home-disclosure,
.note,
.err {
  max-width: 980px;
}

.home-prompts {
  margin-top: 36px;
  gap: 8px 14px;
}

.prompt-link {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface-1) 65%, transparent);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-radius 240ms var(--spring-fast),
    transform 220ms var(--spring-fast);
}

.prompt-link:hover {
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  border-radius: 10px;
  transform: translateY(-1px);
}

/* Open Editorial Recipe Library Gallery */
.library {
  margin-top: 0;
  max-width: none;
  width: 100%;
}

.lib-tabs {
  margin-bottom: 18px;
}

.rlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.lib-row {
  background: var(--surface-1);
  border-radius: 24px;
  padding: 6px 14px;
  transition:
    background-color 180ms ease,
    border-radius 300ms var(--spring-fast),
    transform 280ms var(--spring-spatial),
    box-shadow 220ms var(--ease-exp-out);
}

@media (prefers-reduced-motion: no-preference) {
  .lib-row:hover {
    background: var(--surface-2);
    border-radius: 16px;
    transform: translateY(-3px);
    box-shadow: var(--shadow-1);
  }
}

.lib-thumb {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  transition: border-radius 260ms var(--spring-fast), transform 280ms var(--spring-fast);
}

.lib-row:hover .lib-thumb {
  border-radius: 10px;
  transform: scale(1.05);
}

/* 4. Uncontained Full-Spread Recipe View (#view) */
.recipe-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(32px, 5vh, 56px);
}

@media (min-width: 1024px) {
  .recipe-masthead.has-hero {
    grid-template-columns: minmax(0, 6.2fr) minmax(380px, 5.8fr);
  }
}

.recipe-intro {
  min-width: 0;
}

.title {
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.028em;
  width: fit-content;
}

.tag {
  max-width: 56ch;
  font-size: clamp(20px, 2.2vw, 27px);
}

/* Unboxed Architectural Typographic Meta Strip */
.meta {
  background: transparent;
  border: 0;
  border-top: 1.5px solid var(--fg);
  border-bottom: 1px solid var(--soft);
  border-radius: 0;
  padding: 20px 0;
  gap: 18px 42px;
}

.meta b {
  font-size: clamp(28px, 2.8vw, 38px);
  display: inline-block;
}

/* Borderless Expressive Squircle Hero Photo */
.recipe-hero {
  margin: 0;
  border: 0;
  border-radius: var(--r-2xl);
  background: var(--surface-1);
  box-shadow: var(--shadow-2);
  view-transition-name: mise-hero-photo;
}

.vt-hero-source {
  view-transition-name: mise-hero-photo;
}

.recipe-hero .dish-frame {
  max-height: 480px;
  aspect-ratio: 16 / 11;
}

@media (prefers-reduced-motion: no-preference) {
  .recipe-hero .dish-frame img {
    transition: filter 0.35s ease, transform 0.6s var(--ease-exp-out);
  }
  .recipe-hero:hover .dish-frame img {
    transform: scale(1.035);
  }
}

.hero-btn {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  padding: 6px 14px;
}

.hero-credit {
  border-top: 0;
  background: color-mix(in srgb, var(--surface-1) 60%, var(--bg));
  padding: 9px 18px;
}

/* Wide Asymmetric Ingredients & Method Canvas */
.cols {
  grid-template-columns: minmax(300px, 4.2fr) minmax(0, 7.8fr);
  gap: clamp(44px, 6vw, 108px);
  margin-top: clamp(32px, 4.5vh, 56px);
  align-items: start;
}

@media (min-width: 980px) {
  .cols > section:first-child {
    position: sticky;
    top: 84px;
  }
}

@media (max-width: 900px) {
  .cols {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

h2.h {
  font-size: clamp(32px, 3.2vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.ing-row {
  padding: 13px 10px;
  border-radius: 14px;
  border-top-color: color-mix(in srgb, var(--soft) 65%, transparent);
  transition:
    background-color 180ms ease,
    padding-inline 240ms var(--spring-fast),
    transform 240ms var(--spring-fast);
}

@media (prefers-reduced-motion: no-preference) {
  .ing-row:hover {
    background: var(--surface-1);
    padding-inline: 14px;
  }
}

.box {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  transition:
    background-color 180ms ease,
    border-radius 280ms var(--spring-fast),
    transform 280ms var(--spring-fast);
}

:is(.ing-row, .ord-ing-row).on .box {
  border-radius: 50%;
  transform: translateY(3px) scale(1.12);
}

.step-row {
  grid-template-columns: 58px 1fr;
  padding: 24px 14px;
  border-radius: 22px;
  transition:
    background-color 200ms ease,
    transform 280ms var(--spring-spatial),
    opacity 220ms ease;
}

.step-row::before {
  font-size: clamp(34px, 3.4vw, 48px);
  color: var(--mut);
  transition: color 200ms ease, transform 280ms var(--spring-fast);
}

@media (prefers-reduced-motion: no-preference) {
  .step-row:hover {
    background: var(--surface-1);
    transform: translateX(6px);
  }
  .step-row:hover::before {
    color: var(--fg);
    transform: scale(1.08);
  }
}

.step-toggle h3 {
  font-size: 17.5px;
}

.step-text {
  font-size: 16.5px;
  line-height: 1.68;
  max-width: 72ch;
}

/* Full-Width Notes & 2-Column Widescreen Culinary Intelligence */
.tips,
.intel {
  max-width: none;
  margin-top: clamp(48px, 6vh, 76px);
  padding-top: 28px;
}

@media (min-width: 1024px) {
  .intel .accordion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 56px;
    border-bottom: 0;
  }
}

.flavor-track {
  height: 7px;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.flavor-fill {
  border-radius: var(--r-pill);
  transform-origin: 0 50%;
  transition: scale 500ms var(--spring-spatial);
  @starting-style {
    scale: 0 1;
  }
}

/* Floating Glass Capsule Revision Dock */
.dock {
  left: clamp(12px, 3vw, 40px);
  right: clamp(12px, 3vw, 40px);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
  border: 1px solid var(--soft);
  border-radius: 30px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  box-shadow: var(--shadow-2);
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 240ms var(--ease-exp-out),
    translate 320ms var(--spring-spatial),
    display 240ms;
  transition-behavior: allow-discrete;
}

@starting-style {
  .dock {
    opacity: 0;
    translate: 0 24px;
  }
}

/* 5. Full-Canvas Dish Options Grid (#ideas-view) */
.ideas-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: clamp(22px, 2.6vw, 36px);
}

.idea-card {
  border: 0;
  border-radius: 32px;
  background: var(--surface-1);
  transition:
    background-color 200ms ease,
    border-radius 340ms var(--spring-fast),
    box-shadow 260ms var(--ease-exp-out),
    transform 320ms var(--spring-spatial);
}

.idea-card .dish-frame {
  border-bottom: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .idea-card:hover {
    background: var(--surface-2);
    border-radius: 18px;
    transform: translateY(-6px);
    box-shadow: var(--shadow-2);
  }
}

/* 6. Uncontained Widescreen Settings, Onboarding & Order Workbench */
.settings-shell {
  max-width: none;
  width: 100%;
}

.st-tabs {
  border-bottom: 0;
  gap: 8px;
  margin-bottom: 32px;
}

.st-tab {
  border: 0;
  border-radius: var(--r-pill);
  margin-bottom: 0;
  padding: 9px 18px;
  background: var(--surface-1);
}

.st-tab:hover {
  background: var(--surface-2);
  border-radius: 14px;
}

.st-tab.is-active {
  background: var(--fg);
  color: var(--bg);
  border-radius: 14px;
}

@media (min-width: 1120px) {
  #st-ai-form,
  #st-kitchen-form,
  .st-delivery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 56px;
    align-items: start;
  }

  #st-ai-form > :is(.st-actions, .st-status),
  #st-kitchen-form > :is(.st-actions, .st-status),
  .st-delivery > #st-delivery-form {
    grid-column: 1 / -1;
  }
}

.prov-card,
.mcp-app-card,
.st-data-list > div {
  border-color: transparent;
  border-radius: 24px;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    border-radius 300ms var(--spring-fast),
    transform 280ms var(--spring-spatial),
    box-shadow 220ms var(--ease-exp-out);
}

@media (prefers-reduced-motion: no-preference) {
  .prov-card:hover,
  .mcp-app-card:hover {
    border-radius: 16px;
    transform: translateY(-3px);
  }
}

.ob-shell {
  max-width: 1160px;
}

.ob-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(12px, 2.5vh, 32px) 0;
}

.order-sheet {
  width: min(1060px, calc(100vw - 24px));
  max-height: min(90dvh, 900px);
  border: 0;
  border-radius: 34px;
}

.ord-product-card,
.ord-cart-card,
.ord-rest-card,
.ord-banner,
.ord-launch-card {
  border-color: transparent;
  border-radius: 22px;
}

/* 7. Choreographed Staggered Cascades, Value Pop & View Transitions */
@media (prefers-reduced-motion: no-preference) {
  .ing-row,
  .step-row,
  .idea-card,
  .lib-row {
    animation: expressive-cascade 420ms var(--spring-spatial) backwards;
    animation-delay: calc(var(--stagger-i, 0) * 32ms);
  }

  .is-popping {
    animation: value-spring-pop 340ms var(--spring-fast);
  }

  ::view-transition-group(mise-hero-photo) {
    animation-duration: 380ms;
    animation-timing-function: var(--spring-spatial);
  }
}

::view-transition-old(mise-hero-photo),
::view-transition-new(mise-hero-photo) {
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

@keyframes expressive-cascade {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes value-spring-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@media (max-width: 600px) {
  .wrap {
    padding: 14px 16px 180px;
  }
  .site-head {
    top: 6px;
    padding: 8px 12px;
  }
  .head-nav {
    gap: 4px;
  }
  .head-nav .tbtn {
    padding: 6px 10px;
    font-size: 12.5px;
  }
  .rlist,
  .ideas-grid {
    grid-template-columns: 1fr;
  }
  .step-row {
    grid-template-columns: 38px 1fr;
    padding: 18px 8px;
  }
  .ord-food-inputs {
    grid-template-columns: 1fr;
  }
  .ord-ing-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .ord-row-act {
    width: 100%;
    justify-content: flex-end;
  }
  .ord-sticky-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .ord-pay-grid {
    grid-template-columns: 1fr;
  }
  .mcp-app-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Stylesheet */
@media print {
  :root {
    --bg: #ffffff !important;
    --fg: #000000 !important;
    --mut: #555555 !important;
    --line: #000000 !important;
    --soft: #d9d9d9 !important;
  }
  .site-head,
  .recipe-bar,
  .ing-order-bar,
  .inline-ai-btn,
  .timer-bar,
  .dock,
  .ai-pop,
  dialog {
    display: none !important;
  }
  .wrap {
    padding: 0;
  }
  .cols {
    grid-template-columns: 5fr 7fr !important;
    gap: 32px !important;
  }
}
