:root {
  --rice: #f4f7f1;
  --paper: #ffffff;
  --ink: #142b26;
  --muted: #687c76;
  --line: #d8e2dc;
  --celadon: #dcece2;
  --leaf: #2d6a4f;
  --deep-leaf: #173c32;
  --lacquer: #e34a37;
  --lacquer-dark: #b93629;
  --egg: #f4c64f;
  --steam: #edf1ed;
  --shadow: 0 18px 45px rgba(20, 43, 38, 0.1);
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #cddfd5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #cddfd5; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: #cddfd5;
}

button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(227, 74, 55, 0.28);
  outline-offset: 2px;
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.app-root {
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--rice);
  box-shadow: 0 0 80px rgba(20, 43, 38, 0.12);
  overflow-x: hidden;
}

.screen {
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 20px calc(98px + var(--safe-bottom));
  animation: screen-in 320ms ease both;
}

.screen--plain { padding-bottom: calc(32px + var(--safe-bottom)); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--deep-leaf);
  color: var(--egg);
  transform: rotate(-3deg);
}

.brand-mark svg { width: 21px; height: 21px; }

.icon-button,
.back-button {
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  cursor: pointer;
}

.icon-button:hover,
.back-button:hover { background: var(--celadon); }

.icon-button svg,
.back-button svg { width: 22px; height: 22px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--lacquer-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

.display-title {
  max-width: 560px;
  margin-bottom: 14px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(40px, 12vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.display-title em {
  color: var(--lacquer);
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.display-title em::after {
  content: "";
  position: absolute;
  left: 3px;
  right: -5px;
  bottom: -4px;
  height: 7px;
  background: var(--egg);
  z-index: -1;
  transform: rotate(-1.5deg);
}

.lead {
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero-board {
  position: relative;
  min-height: 280px;
  margin: 26px 0 22px;
  border-radius: 30px 30px 30px 10px;
  overflow: hidden;
  background: #b9d3c2;
  border: 1px solid rgba(20, 43, 38, 0.08);
}

.cutting-board {
  position: absolute;
  width: 77%;
  height: 72%;
  left: 11%;
  top: 16%;
  border-radius: 44% 20% 38% 18%;
  background: #e8c390;
  transform: rotate(-5deg);
  box-shadow: 0 22px 40px rgba(65, 67, 46, 0.2);
}

.cutting-board::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 18px;
  right: 22px;
  top: 20px;
  border-radius: 999px;
  background: #b88e61;
}

.ingredient-shape { position: absolute; z-index: 2; }
.tomato {
  width: 92px; height: 92px; left: 16%; top: 28%; border-radius: 50%;
  background: var(--lacquer); box-shadow: inset -12px -10px 0 rgba(136, 32, 22, 0.14), 0 12px 22px rgba(126, 38, 28, 0.2);
}
.tomato::before {
  content: ""; position: absolute; width: 42px; height: 24px; left: 24px; top: -6px;
  background: var(--leaf); clip-path: polygon(50% 0, 61% 36%, 100% 28%, 72% 53%, 89% 85%, 54% 69%, 34% 100%, 31% 63%, 0 59%, 28% 40%);
}
.egg-shape {
  width: 104px; height: 78px; left: 45%; top: 48%; border-radius: 52% 48% 55% 45%;
  background: #fffaf0; transform: rotate(12deg); box-shadow: 0 12px 20px rgba(75, 61, 43, 0.12);
}
.egg-shape::after {
  content: ""; position: absolute; width: 48px; height: 43px; left: 30px; top: 18px; border-radius: 50%;
  background: var(--egg); box-shadow: inset -5px -5px 0 rgba(185, 132, 25, 0.12);
}
.pepper {
  width: 128px; height: 46px; right: 11%; top: 27%; border-radius: 70% 18% 70% 18%;
  background: #4b875f; transform: rotate(25deg); box-shadow: inset -12px -5px 0 rgba(10, 79, 49, 0.15), 0 10px 18px rgba(29, 81, 56, 0.15);
}
.pepper::before {
  content: ""; position: absolute; width: 42px; height: 16px; left: -27px; top: 2px; border-radius: 18px 0 0 18px;
  background: var(--deep-leaf); transform: rotate(-24deg);
}
.tofu {
  width: 70px; height: 60px; right: 16%; bottom: 12%; border-radius: 9px;
  background: #fff8d7; transform: rotate(-8deg); box-shadow: inset -7px -6px 0 #f1e5b1, 0 12px 20px rgba(89, 71, 35, 0.13);
}

.scan-corners::before,
.scan-corners::after {
  content: "";
  position: absolute;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-color: var(--paper);
  border-style: solid;
}
.scan-corners::before { right: 16px; top: 16px; border-width: 3px 3px 0 0; }
.scan-corners::after { left: 16px; bottom: 16px; border-width: 0 0 3px 3px; }

.primary-button,
.secondary-button,
.text-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button { background: var(--deep-leaf); color: white; box-shadow: 0 12px 24px rgba(23, 60, 50, 0.2); }
.primary-button:hover { background: #0f3027; transform: translateY(-1px); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { background: #a9b8b1; color: #f4f7f1; box-shadow: none; cursor: not-allowed; transform: none; }
.primary-button svg, .secondary-button svg { width: 20px; height: 20px; }
.secondary-button { background: var(--celadon); color: var(--deep-leaf); }
.secondary-button:hover { background: #cfe3d7; }
.text-button { min-height: 44px; background: transparent; color: var(--leaf); }
.text-button:hover { background: var(--celadon); }
.button-stack { display: grid; gap: 10px; }

.home-screen .topbar { min-height: 42px; margin-bottom: 8px; }
.home-screen .eyebrow { margin-bottom: 7px; font-size: 10px; letter-spacing: .1em; }
.home-screen .display-title { margin-bottom: 9px; font-size: clamp(38px, 11vw, 52px); }
.home-screen .lead { margin-bottom: 0; font-size: 14px; line-height: 1.5; }
.home-screen .hero-board { min-height: 138px; margin: 14px 0 13px; border-radius: 16px 16px 16px 7px; }
.home-screen .cutting-board { width: 64%; height: 82%; left: 18%; top: 9%; }
.home-screen .tomato { width: 62px; height: 62px; left: 20%; top: 27%; }
.home-screen .tomato::before { width: 30px; height: 17px; left: 16px; top: -5px; }
.home-screen .egg-shape { width: 72px; height: 54px; left: 45%; top: 45%; }
.home-screen .egg-shape::after { width: 34px; height: 30px; left: 20px; top: 12px; }
.home-screen .pepper { width: 88px; height: 32px; right: 14%; top: 24%; }
.home-screen .pepper::before { width: 29px; height: 12px; left: -19px; }
.home-screen .tofu { width: 48px; height: 42px; right: 20%; bottom: 8%; }

.home-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-action {
  min-width: 0;
  min-height: 82px;
  padding: 9px 5px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid #bfd0c5;
  border-radius: 14px;
  background: white;
  color: var(--deep-leaf);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.home-action:hover { border-color: var(--leaf); background: #f7faf8; transform: translateY(-1px); }
.home-action:active { transform: translateY(1px); }
.home-action:disabled { opacity: .58; cursor: wait; transform: none; }
.home-action > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--celadon); }
.home-action > span svg { width: 18px; height: 18px; }
.home-action strong { overflow: hidden; max-width: 100%; font-size: 13px; white-space: nowrap; }
.home-action small { overflow: hidden; max-width: 100%; color: #536d63; font-size: 9px; white-space: nowrap; }
.home-action--camera { border-color: var(--deep-leaf); background: var(--deep-leaf); color: white; }
.home-action--camera:hover { background: #0f3027; }
.home-action--camera > span { background: rgba(255,255,255,.13); color: var(--egg); }
.home-action--camera small { color: #d9e7df; }
.home-action--voice.is-listening { border-color: var(--lacquer); background: #fff0ed; color: var(--lacquer-dark); }
.home-action--voice.is-listening > span { background: var(--lacquer); color: white; animation: voice-pulse 1.25s ease-in-out infinite; }

.voice-capture {
  min-height: 58px;
  margin-top: 9px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #bdd0c4;
  border-radius: 13px;
  background: white;
}
.voice-capture-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--celadon); color: var(--leaf); }
.voice-capture-icon svg { width: 18px; height: 18px; }
.voice-capture > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.voice-capture strong { font-size: 11px; }
.voice-capture small { overflow: hidden; color: #526b62; font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.voice-capture > button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--steam); cursor: pointer; }
.voice-capture > button svg { width: 16px; height: 16px; }
.voice-capture--listening { border-color: #e39b91; background: #fff8f6; }
.voice-capture--listening .voice-capture-icon { background: var(--lacquer); color: white; animation: voice-pulse 1.25s ease-in-out infinite; }
.voice-capture--error { border-color: #e6b2aa; background: #fff3f1; }

@keyframes voice-pulse {
  0%, 100% { transform: scale(.92); opacity: .72; }
  50% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .home-action--voice.is-listening > span,
  .voice-capture--listening .voice-capture-icon { animation: none; }
}

@media (max-height: 700px) {
  .home-screen .topbar { min-height: 36px; margin-bottom: 4px; }
  .home-screen .display-title { font-size: 36px; }
  .home-screen .lead { font-size: 13px; line-height: 1.42; }
  .home-screen .hero-board { min-height: 112px; margin: 10px 0; }
  .home-action { min-height: 74px; }
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 18px var(--safe-bottom);
  background: rgba(255,255,255,0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-item {
  border: 0;
  background: transparent;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  border-radius: 14px;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.is-active { color: var(--deep-leaf); background: var(--celadon); font-weight: 800; }

.progress-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 2px 0 30px;
}
.progress-rail::before {
  content: "";
  position: absolute;
  left: 9%; right: 9%; top: 11px;
  height: 2px;
  background: var(--line);
}
.progress-stop { position: relative; z-index: 1; display: grid; justify-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.progress-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--rice); border: 2px solid var(--line); font-size: 10px; }
.progress-stop.is-done .progress-dot { background: var(--leaf); border-color: var(--leaf); color: white; }
.progress-stop.is-current { color: var(--ink); font-weight: 800; }
.progress-stop.is-current .progress-dot { background: var(--egg); border-color: var(--egg); color: var(--ink); box-shadow: 0 0 0 5px rgba(244, 198, 79, 0.2); }

.page-title { margin-bottom: 8px; font-family: "Songti SC", "STSong", serif; font-size: clamp(30px, 8vw, 42px); line-height: 1.1; letter-spacing: -0.04em; }
.page-lead { margin-bottom: 26px; color: var(--muted); line-height: 1.6; }

.section-block { padding: 26px 0; border-top: 1px solid var(--line); }
.section-block:first-of-type { border-top: 0; padding-top: 8px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-count { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--celadon); color: var(--leaf); font-size: 12px; font-weight: 800; }
.section-heading-tags { display: inline-flex; align-items: center; gap: 7px; }
.type-badge { min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 9px; font-size: 10px; font-weight: 800; }
.type-badge--main { background: #dfeee3; color: #276247; }
.type-badge--seasoning { background: #ffefbd; color: #815608; }

.ingredient-editor-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ingredient-editor-row { min-width: 0; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 26px; align-items: center; align-content: start; gap: 8px; border: 1px solid #bad2c1; border-radius: 14px; background: #edf6ef; }
.ingredient-editor-identity { min-width: 0; display: grid; gap: 3px; }
.ingredient-editor-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ingredient-editor-identity small { color: #527062; font-size: 10px; }
.recognition-warning { margin: -8px 0 18px; padding: 12px 14px; display: grid; gap: 4px; border: 1px solid #e4c875; border-radius: 13px; background: #fff7d9; color: #684c12; }
.recognition-warning strong { font-size: 12px; }
.recognition-warning span { font-size: 11px; line-height: 1.55; }
.chip-remove { width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--steam); display: grid; place-items: center; cursor: pointer; }
.chip-remove:hover { background: #f7d8d4; color: var(--lacquer-dark); }
.chip-remove svg { width: 14px; height: 14px; }
.ingredient-quantity-control { grid-column: 1 / -1; min-width: 0; min-height: 42px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 32px; align-items: stretch; overflow: hidden; border: 1px solid #b8cec0; border-radius: 11px; background: white; }
.ingredient-quantity-control > button { min-width: 0; padding: 0; border: 0; background: #f5f8f6; color: var(--leaf); font-size: 18px; cursor: pointer; }
.ingredient-quantity-control > button:hover { background: #e3efe7; }
.ingredient-quantity-control label { min-width: 0; }
.ingredient-quantity-input { width: 100%; height: 100%; min-width: 0; padding: 0 2px; border: 0; outline: 0; background: white; color: var(--ink); text-align: right; font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.ingredient-quantity-input::-webkit-outer-spin-button, .ingredient-quantity-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.ingredient-quantity-input:focus { box-shadow: inset 0 0 0 2px rgba(39,98,71,.18); }
.ingredient-unit { min-width: 22px; padding: 0 4px 0 2px; display: grid; place-items: center start; color: #4a6258; font-size: 11px; font-weight: 800; }
.ingredient-add-form { margin-top: 18px; padding-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 86px 72px; gap: 9px; border-top: 1px solid #cfdcd4; }
.ingredient-add-form label { min-width: 0; display: grid; gap: 6px; }
.ingredient-add-form label > span { color: #4d675c; font-size: 10px; font-weight: 800; }
.ingredient-add-form select { width: 100%; min-height: 46px; padding: 0 9px; border: 1px solid #cbd9d1; border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 800; }
.text-input { width: 100%; min-height: 46px; border: 1px solid #cbd9d1; border-radius: 14px; background: var(--paper); color: var(--ink); padding: 0 14px; }
.ingredient-add-form .text-input { min-width: 0; border-radius: 12px; }
.add-button { grid-column: 1 / -1; width: 100%; min-height: 46px; border: 0; border-radius: 12px; background: var(--celadon); color: var(--leaf); font-weight: 800; cursor: pointer; }

.seasoning-section { color: var(--ink); }
.seasoning-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.seasoning-choice { min-height: 44px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #e5cf91; border-radius: 12px; background: #fffaf0; color: #76531a; cursor: pointer; }
.seasoning-choice .check { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid #d7b75e; border-radius: 7px; color: transparent; }
.seasoning-choice .check svg { width: 14px; height: 14px; }
.seasoning-choice.is-selected { border-color: #c08a1d; background: #ffefbd; color: #684500; font-weight: 800; }
.seasoning-choice.is-selected .check { border-color: #b77d10; background: #b77d10; color: white; }

.control-label { display: block; margin-bottom: 11px; font-size: 13px; font-weight: 800; }
.control-group + .control-group { margin-top: 22px; }
.segmented { display: grid; grid-template-columns: repeat(var(--segments, 4), 1fr); gap: 5px; padding: 4px; border-radius: 16px; background: #e8eee9; }
.segment { min-height: 40px; padding: 4px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.segment.is-selected { background: var(--paper); color: var(--ink); font-weight: 800; box-shadow: 0 4px 12px rgba(20, 43, 38, 0.08); }

.stepper { display: inline-grid; grid-template-columns: 44px 58px 44px; align-items: center; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--paper); }
.stepper button { height: 44px; border: 0; background: transparent; font-size: 21px; cursor: pointer; }
.stepper button:hover { background: var(--celadon); }
.stepper output { text-align: center; font-weight: 800; }
.stepper--dish-count { grid-template-columns: 44px 64px 44px; }
.control-help { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.choice-card { min-height: 48px; border: 1px solid #cbd9d1; border-radius: 14px; background: var(--paper); padding: 0 13px; display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.choice-card .check { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 7px; border: 1.5px solid #b7c8be; color: transparent; }
.choice-card.is-selected { border-color: var(--leaf); background: #f0f7f2; }
.choice-card.is-selected .check { background: var(--leaf); border-color: var(--leaf); color: white; }
.choice-card.is-warn.is-selected { border-color: #d49736; background: #fff8e4; }
.choice-card.is-warn.is-selected .check { background: #d49736; border-color: #d49736; }

.toggle-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-copy strong { display: block; font-size: 14px; }
.toggle-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.switch { width: 50px; height: 30px; padding: 3px; border: 0; border-radius: 99px; background: #cbd5cf; cursor: pointer; transition: background 160ms ease; }
.switch::after { content: ""; display: block; width: 24px; height: 24px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(20,43,38,.18); transition: transform 160ms ease; }
.switch.is-on { background: var(--leaf); }
.switch.is-on::after { transform: translateX(20px); }

.allergen-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-choice { min-height: 38px; border: 1px solid #cbd9d1; border-radius: 12px; background: var(--paper); padding: 0 13px; color: var(--muted); font-size: 12px; cursor: pointer; }
.tag-choice.is-selected { color: #812a20; background: #fbe2df; border-color: #e9aaa2; font-weight: 800; }

.sticky-action {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 760px);
  padding: 12px 20px var(--safe-bottom);
  background: linear-gradient(to top, var(--rice) 75%, rgba(244,247,241,0));
}

.screen.has-bottom-nav { padding-bottom: calc(98px + var(--safe-bottom)); }
.screen.has-sticky-action { padding-bottom: calc(96px + var(--safe-bottom)); }
.screen.has-nav-and-sticky { padding-bottom: calc(180px + var(--safe-bottom)); }
.sticky-action--with-nav {
  bottom: calc(65px + var(--safe-bottom));
  padding-bottom: 12px;
}

.result-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.result-summary strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 38px; line-height: 1; }
.result-summary span { color: var(--muted); font-size: 12px; }

.result-list { display: grid; gap: 14px; }
.menu-allocation { margin: -4px 0 18px; padding: 14px 15px; display: grid; gap: 8px; border: 1px solid #ccd9d1; border-radius: 13px; background: white; }
.menu-allocation span { font-size: 12px; line-height: 1.5; }
.allocation-line { padding: 8px 10px; display: grid; grid-template-columns: 54px 1fr; gap: 7px; border-radius: 9px; }
.allocation-line b { font-size: 11px; }
.allocation-line--main { background: #edf6ef; color: #345e4a; }
.allocation-line--seasoning { background: #fff5d8; color: #76521b; }
.search-bar {
  min-height: 54px;
  margin: -8px 0 20px;
  padding: 5px 5px 5px 15px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd9d1;
  border-radius: 17px;
  background: var(--paper);
  box-shadow: 0 4px 8px rgba(20,43,38,.05);
}
.search-bar svg { width: 20px; height: 20px; color: var(--leaf); }
.search-bar input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-bar button { min-height: 42px; border: 0; border-radius: 12px; padding: 0 15px; background: var(--deep-leaf); color: white; font-weight: 800; cursor: pointer; }
.recipe-card { width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); text-align: left; transition: transform 170ms ease, border-color 170ms ease; }
.recipe-card:hover { transform: translateY(-2px); border-color: #a9c2b3; }
.recipe-card.is-selected { border: 2px solid var(--leaf); }
.recipe-card-open { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.recipe-card-open:focus-visible { outline-offset: -4px; }
.recipe-art { position: relative; min-height: 150px; overflow: hidden; background: var(--celadon); }
.recipe-art::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: #f9f7e8; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 12px 25px rgba(20,43,38,.12); }
.recipe-art--generated::before { display: none; }
.recipe-art-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-image-label { position: absolute; z-index: 3; right: 10px; bottom: 10px; padding: 5px 7px; border-radius: 8px; background: rgba(23,60,50,.86); color: white; font-size: 10px; font-weight: 800; letter-spacing: .02em; backdrop-filter: blur(5px); }
.recipe-image-status { position: absolute; z-index: 3; right: 10px; bottom: 10px; min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.65); border-radius: 9px; background: rgba(255,255,255,.88); color: var(--deep-leaf); font-size: 10px; font-weight: 800; box-shadow: 0 4px 12px rgba(20,43,38,.1); backdrop-filter: blur(5px); }
.recipe-image-status svg { width: 14px; height: 14px; animation: recipe-image-pulse 1.2s ease-in-out infinite; }
.recipe-art .food-piece { position: absolute; z-index: 2; box-shadow: 0 8px 16px rgba(20,43,38,.14); }
.recipe-art--label { display: grid; place-items: center; }
.recipe-art--label::before { width: 112px; height: 112px; box-shadow: none; }
.ingredient-art-label { position: relative; z-index: 2; display: grid; justify-items: center; gap: 4px; color: var(--deep-leaf); }
.ingredient-art-label b { font-family: "Songti SC", "STSong", serif; font-size: 31px; letter-spacing: -0.03em; }
.food-tomato { width: 74px; height: 55px; border-radius: 50% 45% 52% 48%; background: var(--lacquer); left: calc(50% - 65px); top: 44px; transform: rotate(-18deg); }
.food-egg { width: 86px; height: 60px; border-radius: 50%; background: var(--egg); left: calc(50% - 10px); top: 58px; transform: rotate(14deg); }
.food-pepper { width: 118px; height: 25px; border-radius: 70% 20%; background: #4b875f; left: calc(50% - 64px); top: 48px; transform: rotate(-20deg); }
.food-pork { width: 104px; height: 18px; border-radius: 20px; background: #ca8369; left: calc(50% - 30px); top: 76px; transform: rotate(18deg); }
.food-tofu { width: 57px; height: 48px; border-radius: 8px; background: #fff2c4; left: calc(50% - 10px); top: 62px; transform: rotate(-7deg); }
.rank-flag { position: absolute; z-index: 3; left: 14px; top: 14px; padding: 7px 9px; border-radius: 9px; background: var(--deep-leaf); color: white; font-size: 11px; font-weight: 800; }
.recipe-card .recipe-art { min-height: 130px; }
.recipe-card-body { padding: 15px; }
.recipe-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.recipe-card h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 24px; letter-spacing: -0.03em; }
.recipe-reason { display: block; margin: 9px 0 4px; color: #4f685f; font-size: 12px; line-height: 1.55; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 9px 0; color: var(--muted); font-size: 12px; }
.recipe-meta span { display: inline-flex; align-items: center; gap: 5px; }
.recipe-meta svg { width: 15px; height: 15px; }
.missing-note { margin-top: 11px; color: #996b1e; font-size: 11px; font-weight: 700; }
.seasoning-note { display: inline-flex; width: fit-content; padding: 6px 8px; border-radius: 8px; background: #fff5d8; color: #76521b; }
.menu-card-actions { min-height: 58px; padding: 8px 10px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); background: #f8faf8; }
.choose-recipe { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b9ccc0; border-radius: 12px; background: white; color: var(--leaf); font-weight: 800; cursor: pointer; }
.choose-recipe svg { width: 17px; height: 17px; }
.choose-recipe.is-selected { border-color: var(--leaf); background: var(--leaf); color: white; }
.recipe-image-retry { min-height: 40px; margin-right: auto; padding: 0 10px; border: 0; background: transparent; color: var(--leaf); font-size: 11px; font-weight: 800; cursor: pointer; }
.recipe-loading-card { min-height: 250px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.recipe-loading-card span, .recipe-loading-card i { display: block; background: linear-gradient(100deg, #e7eee9 20%, #f5f8f6 40%, #e7eee9 60%); background-size: 200% 100%; animation: recipe-loading 1.4s ease-in-out infinite; }
.recipe-loading-card span { height: 135px; }
.recipe-loading-card i { height: 12px; margin: 15px 16px 0; border-radius: 8px; }
.recipe-loading-card i:nth-child(2) { width: 45%; height: 22px; }
.recipe-loading-card i:nth-child(3) { width: 62%; }
.recipe-loading-card i:nth-child(4) { width: 78%; }

@keyframes recipe-image-pulse {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes recipe-loading {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .recipe-image-status svg, .recipe-loading-card span, .recipe-loading-card i { animation: none; }
}

.ingredient-search-screen { padding-bottom: calc(92px + var(--safe-bottom)); }
.ingredient-search-box {
  min-height: 58px;
  margin: 24px 0 13px;
  padding: 5px 5px 5px 15px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #b9cfc1;
  border-radius: 16px;
  background: white;
}
.ingredient-search-box:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(39,98,71,.12); }
.ingredient-search-box svg { width: 20px; height: 20px; color: var(--leaf); }
.ingredient-search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.ingredient-search-box input::placeholder { color: #5d716a; opacity: 1; }
.ingredient-search-box button { min-height: 46px; padding: 0 17px; border: 0; border-radius: 12px; background: var(--deep-leaf); color: white; font-weight: 800; cursor: pointer; }
.ingredient-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 28px; }
.ingredient-examples > span { margin-right: 2px; color: var(--muted); font-size: 11px; }
.ingredient-examples button, .ingredient-search-empty button { min-height: 36px; padding: 0 11px; border: 1px solid #bad2c1; border-radius: 11px; background: #edf6ef; color: #2f6249; font-weight: 800; cursor: pointer; }
.ingredient-search-result-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.ingredient-search-result-heading h2 { margin: 0; font-size: 19px; letter-spacing: -0.02em; }
.ingredient-search-result-heading > span { color: var(--muted); font-size: 11px; }
.ingredient-search-loading { display: grid; gap: 12px; }
.ingredient-search-loading-row { min-height: 180px; padding: 18px 16px 18px 116px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 16px; background: white; }
.ingredient-search-loading-row span, .ingredient-search-loading-row i { display: block; height: 12px; margin-bottom: 13px; border-radius: 7px; background: linear-gradient(100deg, #e7eee9 20%, #f5f8f6 40%, #e7eee9 60%); background-size: 200% 100%; animation: recipe-loading 1.4s ease-in-out infinite; }
.ingredient-search-loading-row span { position: absolute; inset: 0 auto 0 0; width: 100px; height: auto; margin: 0; border-radius: 0; }
.ingredient-search-loading-row i:nth-child(2) { width: 72%; height: 20px; }
.ingredient-search-loading-row i:nth-child(3) { width: 92%; }
.ingredient-search-loading-row i:nth-child(4) { width: 78%; }
.ingredient-result-list { display: grid; gap: 12px; }
.ingredient-result { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.ingredient-result-open { width: 100%; padding: 0; display: grid; grid-template-columns: 100px 1fr; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ingredient-result-open:focus-visible { outline-offset: -4px; }
.ingredient-result-art .recipe-art { height: 100%; min-height: 180px; }
.ingredient-result-art .recipe-art::before { width: 90px; height: 90px; }
.ingredient-result-art .ingredient-art-label b { font-size: 26px; }
.ingredient-result-body { min-width: 0; padding: 15px 14px; display: grid; align-content: start; gap: 8px; }
.ingredient-result-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; }
.ingredient-result-body h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 22px; letter-spacing: -0.03em; }
.ingredient-result-needs { padding: 7px 8px; display: grid; grid-template-columns: 52px 1fr; gap: 6px; border-radius: 9px; font-size: 10px; line-height: 1.45; }
.ingredient-result-needs b { font-size: 10px; }
.ingredient-result-needs--main { background: #edf6ef; color: #345e4a; }
.ingredient-result-needs--seasoning { background: #fff5d8; color: #76521b; }
.ingredient-result-excerpt { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.ingredient-result-link { margin-top: 2px; display: inline-flex; align-items: center; gap: 3px; color: var(--leaf); font-size: 11px; font-weight: 800; }
.ingredient-result-link svg { width: 14px; height: 14px; }
.ingredient-search-empty { padding: 34px 20px; border: 1px solid var(--line); border-radius: 16px; background: white; text-align: center; }
.ingredient-search-empty > svg { width: 38px; height: 38px; color: var(--leaf); }
.ingredient-search-empty h3 { margin: 13px 0 7px; font-size: 18px; }
.ingredient-search-empty p { margin: 0 auto 17px; max-width: 48ch; color: var(--muted); font-size: 12px; line-height: 1.65; }
.ingredient-search-empty > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; }
.ingredient-search-empty > div span { color: var(--muted); font-size: 11px; }
.ingredient-search-source { margin-top: 13px; padding: 10px 12px; display: grid; grid-template-columns: 58px 1fr; gap: 7px; border-radius: 10px; background: #edf6ef; color: #345e4a; font-size: 10px; line-height: 1.55; }
.ingredient-search-source b { font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  .ingredient-search-loading-row span, .ingredient-search-loading-row i { animation: none; }
}

.batch-cook-screen { padding-bottom: calc(118px + var(--safe-bottom)); }
.batch-phase-rail { margin: 4px 0 28px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.batch-phase-rail > span { display: grid; grid-template-columns: 34px auto; align-items: center; gap: 8px; color: var(--muted); }
.batch-phase-rail b { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #bfcfc5; border-radius: 50%; background: white; font-size: 12px; font-style: normal; }
.batch-phase-rail b svg { width: 17px; height: 17px; }
.batch-phase-rail em { font-size: 13px; font-style: normal; font-weight: 800; }
.batch-phase-rail i { height: 1px; background: #c9d7ce; }
.batch-phase-rail .is-current { color: var(--deep-leaf); }
.batch-phase-rail .is-current b { border-color: var(--deep-leaf); background: var(--deep-leaf); color: white; }
.batch-phase-rail .is-done { color: var(--leaf); }
.batch-phase-rail .is-done b { border-color: var(--leaf); background: #e3f0e7; color: var(--leaf); }
.batch-cook-screen--cook .batch-phase-rail .is-current { color: var(--lacquer-dark); }
.batch-cook-screen--cook .batch-phase-rail .is-current b { border-color: var(--lacquer); background: var(--lacquer); }
.batch-menu-strip { margin: 21px 0 17px; display: flex; flex-wrap: wrap; gap: 7px; }
.batch-menu-strip span { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 10px; background: #e6f1e9; color: #315f49; font-size: 11px; font-weight: 800; }
.batch-round-heading { margin-bottom: 11px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.batch-round-heading span { font-size: 15px; font-weight: 850; }
.batch-round-heading small { color: var(--muted); font-size: 11px; }
.batch-task-list { display: grid; gap: 13px; }
.batch-task { padding: 17px; display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.batch-task-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.batch-task-header > span:first-child { display: grid; gap: 4px; }
.batch-task-header small { color: var(--leaf); font-size: 11px; font-weight: 800; }
.batch-cook-screen--cook .batch-task-header small { color: var(--lacquer-dark); }
.batch-task-header strong { font-family: "Songti SC", "STSong", serif; font-size: 22px; line-height: 1.25; letter-spacing: -0.03em; }
.batch-task-count { flex: none; min-width: 40px; min-height: 30px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; background: #edf3ef; color: var(--leaf); font-size: 11px; font-weight: 800; }
.batch-task-time { display: inline-flex; width: fit-content; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.batch-task-time svg { width: 15px; height: 15px; }
.batch-task-ingredients { gap: 8px; }
.batch-task > p { margin: 0; font-size: 15px; line-height: 1.72; }
.batch-task.is-completed { border-color: #a9c9b4; background: #f4f8f5; }
.batch-task-list--single { grid-template-columns: minmax(0, 1fr); }
.prep-task-complete { width: 100%; min-height: 54px; padding: 8px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid #b8cec0; border-radius: 12px; background: white; color: var(--leaf); text-align: left; cursor: pointer; }
.prep-task-complete:hover { background: #edf6ef; }
.prep-task-complete:focus-visible { outline: 3px solid rgba(39,98,71,.24); outline-offset: 2px; }
.prep-task-check { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1.5px solid #8fb29c; border-radius: 7px; color: transparent; }
.prep-task-check svg { width: 17px; height: 17px; }
.prep-task-complete > span:last-child { display: grid; gap: 2px; }
.prep-task-complete strong { font-size: 13px; }
.prep-task-complete small { color: #557068; font-size: 10px; }
.prep-task-complete[aria-checked="true"] { border-color: var(--leaf); background: #e3f0e7; }
.prep-task-complete[aria-checked="true"] .prep-task-check { border-color: var(--leaf); background: var(--leaf); color: white; }
.batch-sticky-action { padding-top: 10px; }
.batch-step-actions { width: 100%; display: grid; grid-template-columns: .8fr 1.7fr; gap: 9px; }
.batch-step-actions button { width: 100%; }
.batch-step-actions button:disabled { opacity: .45; cursor: not-allowed; }

.detail-hero { margin: 0 -20px 24px; }
.detail-hero .recipe-art { min-height: 230px; }
.detail-hero--compact .recipe-art { min-height: 175px; }
.detail-header { position: absolute; z-index: 5; top: max(16px, env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; }
.detail-header .back-button { background: rgba(255,255,255,.9); box-shadow: 0 6px 18px rgba(20,43,38,.12); }
.detail-title { margin-bottom: 8px; font-family: "Songti SC", "STSong", serif; font-size: 38px; letter-spacing: -0.04em; }
.detail-subtitle { color: var(--muted); line-height: 1.55; }
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 22px 0 28px; }
.fact { padding: 13px 8px; background: var(--paper); border: 1px solid var(--line); text-align: center; }
.fact:first-child { border-radius: 14px 4px 4px 14px; }
.fact:last-child { border-radius: 4px 14px 14px 4px; }
.fact strong { display: block; font-size: 17px; }
.fact span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.cook-panel { margin: 26px -20px 0; padding: 28px 20px calc(30px + var(--safe-bottom)); background: var(--deep-leaf); color: white; }
.cook-panel--standalone { margin-top: 22px; }
.cook-kicker { margin: 0 0 8px; color: #a8d1ba; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.cook-panel h2 { font-family: "Songti SC", "STSong", serif; font-size: 29px; line-height: 1.25; }
.step-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.step-heading-row h2 { margin-bottom: 18px; }
.step-duration { flex: none; min-height: 38px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; background: rgba(255,255,255,.12); color: white; font-size: 11px; }
.step-duration svg { width: 16px; height: 16px; }
.step-card { min-height: 200px; padding: 18px; border-radius: 16px; background: white; color: var(--ink); display: grid; gap: 18px; align-content: space-between; }
.step-card > p { margin: 0; font-size: 17px; line-height: 1.75; }
.step-ingredients { display: grid; gap: 9px; }
.step-ingredient-group { padding: 13px 14px; border-radius: 12px; }
.step-ingredient-group--main { background: #edf6ef; color: #2f5946; }
.step-ingredient-group--seasoning { background: #fff5d8; color: #76521b; }
.step-card-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 800; }
.step-ingredients ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.step-ingredients li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; font-size: 13px; }
.ingredient-measure { flex: none; display: grid; justify-items: end; gap: 2px; text-align: right; }
.ingredient-measure strong { white-space: nowrap; }
.ingredient-measure small { max-width: 160px; color: #8a631e; font-size: 10px; font-weight: 750; line-height: 1.35; }
.measure-line { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; }
.measure-line em { min-width: 28px; color: #987026; font-size: 9px; font-style: normal; font-weight: 850; letter-spacing: .06em; }
.measure-line--kitchen small { font-size: 11px; }
.step-tip { display: flex; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-tip svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--egg); }
.timer-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid transparent; border-radius: 15px; background: #eef5f0; transition: background-color .2s ease, border-color .2s ease; }
.timer-box.is-overtime { border-color: #e7c15d; background: #fff3cf; }
.timer-value { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 850; letter-spacing: .03em; }
.timer-controls { display: flex; align-items: center; gap: 7px; }
.timer-reset { min-height: 42px; padding: 0 10px; border: 1px solid #cbd8d0; border-radius: 11px; background: white; color: var(--leaf); font-weight: 800; cursor: pointer; }
.timer-button { min-height: 38px; border: 0; border-radius: 11px; padding: 0 14px; background: var(--egg); color: var(--ink); font-weight: 800; cursor: pointer; }
.step-progress { display: flex; justify-content: center; gap: 6px; margin: 16px 0; }
.step-progress span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); }
.step-progress span.is-current { width: 22px; border-radius: 99px; background: var(--egg); }
.step-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; }
.step-actions button:disabled { opacity: .45; cursor: not-allowed; }
.cook-panel .secondary-button { background: rgba(255,255,255,.12); color: white; }
.cook-panel .primary-button { background: var(--egg); color: var(--ink); box-shadow: none; }

.install-inline { width: 100%; min-height: 46px; margin: 8px 0 28px; border: 1px solid #b9ccc0; border-radius: 12px; background: white; color: var(--leaf); font-weight: 800; cursor: pointer; }
.install-inline:hover { background: var(--celadon); }

.scan-screen { display: grid; align-content: center; justify-items: center; text-align: center; }
.scan-orbit { position: relative; width: 220px; height: 220px; margin-bottom: 34px; }
.scan-orbit::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; border: 2px dashed #9ebbaa; animation: rotate 8s linear infinite; }
.scan-orbit::after { content: ""; position: absolute; inset: 48px; border-radius: 50%; background: var(--celadon); box-shadow: inset 0 0 0 1px #bfd4c7; }
.scan-line { position: absolute; z-index: 2; left: 50px; right: 50px; height: 3px; top: 60px; background: var(--lacquer); box-shadow: 0 0 13px rgba(227,74,55,.55); animation: scan 1.6s ease-in-out infinite alternate; }
.scan-icon { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; color: var(--deep-leaf); }
.scan-icon svg { width: 54px; height: 54px; }
.scan-orbit.is-error::before { border-color: #dfaaa3; animation: none; }
.scan-orbit.is-error::after { background: #f8dfdc; box-shadow: inset 0 0 0 1px #e8b9b3; }
.scan-orbit.is-error .scan-line { display: none; }
.scan-orbit.is-error .scan-icon { color: var(--lacquer-dark); }
.scan-screen h1 { margin-bottom: 9px; font-family: "Songti SC", "STSong", serif; font-size: 32px; }
.scan-screen p { max-width: 360px; color: var(--muted); line-height: 1.6; }
.scan-tags { display: flex; justify-content: center; gap: 7px; min-height: 28px; }
.scan-tags span { padding: 6px 8px; border-radius: 8px; background: white; color: var(--leaf); font-size: 11px; animation: tag-pop 1.4s both; }
.scan-tags span:nth-child(2) { animation-delay: .25s; }
.scan-tags span:nth-child(3) { animation-delay: .5s; }
.scan-actions { width: min(100%, 340px); margin-top: 18px; display: grid; gap: 10px; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(98px); } }
@keyframes tag-pop { 0%, 35% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: none; } }

.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state svg { width: 48px; height: 48px; color: var(--leaf); margin-bottom: 14px; }
.empty-state h2 { color: var(--ink); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: end center; background: rgba(10,29,24,.45); backdrop-filter: blur(7px); }
.modal { width: min(100%, 520px); padding: 22px; border-radius: 24px 24px 14px 14px; background: var(--paper); box-shadow: var(--shadow); animation: modal-up 240ms ease both; }
.modal h2 { margin-bottom: 8px; font-family: "Songti SC", "STSong", serif; font-size: 25px; }
.modal p { color: var(--muted); line-height: 1.6; }
.install-steps { margin: 18px 0 22px; padding: 0; list-style: none; counter-reset: install; }
.install-steps li { counter-increment: install; position: relative; min-height: 38px; padding: 4px 0 14px 44px; }
.install-steps li::before { content: counter(install); position: absolute; left: 0; top: 0; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--celadon); color: var(--leaf); font-weight: 800; }
@keyframes modal-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(92px + var(--safe-bottom)); transform: translateX(-50%); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 13px; animation: toast 2.6s both; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

@media (min-width: 680px) {
  .screen { padding-left: 54px; padding-right: 54px; }
  .detail-hero, .cook-panel { margin-left: -54px; margin-right: -54px; }
  .cook-panel { padding-left: 54px; padding-right: 54px; }
  .hero-board { min-height: 360px; }
  .button-stack { grid-template-columns: 1fr 1fr; }
  .primary-button, .secondary-button { width: auto; }
  .sticky-action .primary-button { width: 100%; }
  .recipe-card-open { display: grid; grid-template-columns: 230px 1fr; }
  .recipe-art { min-height: 100%; }
  .detail-hero .recipe-art { min-height: 310px; }
  .batch-task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .batch-task-list--single { grid-template-columns: minmax(0, 1fr); }
}

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