:root {
  --rice: #f8faf7;
  --mist: #eef2ef;
  --ink: #17201d;
  --muted: #6f7b75;
  --line: #dce4df;
  --jade: #236a58;
  --jade-deep: #16483d;
  --jade-pale: #dfeee7;
  --chili: #f25a38;
  --chili-pale: #fee8df;
  --yolk: #f4c84d;
  --white: #ffffff;
  --shadow: 0 28px 70px rgba(27, 52, 44, 0.16);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--mist);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 18%, rgba(35, 106, 88, 0.09), transparent 26%),
    radial-gradient(circle at 82% 86%, rgba(244, 200, 77, 0.18), transparent 24%),
    var(--mist);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(242, 90, 56, 0.32);
  outline-offset: 2px;
}

.prototype-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) 430px;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 7vw, 112px);
  padding: 48px;
}

.prototype-notes {
  min-height: 760px;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.notes-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-seal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px 6px 16px 6px;
  color: white;
  background: var(--chili);
  font: 700 26px/1 "STKaiti", "KaiTi", serif;
  transform: rotate(-3deg);
}

.notes-brand p,
.notes-brand strong {
  margin: 0;
}

.notes-brand p {
  color: var(--jade);
  font: 700 11px/1.2 Consolas, monospace;
  letter-spacing: 0.14em;
}

.notes-brand strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.notes-thesis {
  margin-top: auto;
  max-width: 470px;
}

.notes-thesis > span {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(35, 106, 88, 0.28);
  border-radius: 999px;
  color: var(--jade);
  font-size: 12px;
  font-weight: 700;
}

.notes-thesis h1 {
  margin: 22px 0 18px;
  font: 800 clamp(48px, 5.4vw, 76px)/0.98 "STKaiti", "KaiTi", serif;
  letter-spacing: -0.05em;
}

.notes-thesis p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 54px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(35, 106, 88, 0.22);
}

.flow-list li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 18px;
  color: #8e9994;
  font-size: 12px;
}

.flow-list li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bdc8c2;
}

.flow-list li.is-current {
  color: var(--ink);
}

.flow-list li.is-current::before {
  background: var(--chili);
  box-shadow: 0 0 0 5px var(--chili-pale);
}

.flow-list b {
  font: 600 11px/1 Consolas, monospace;
  color: var(--jade);
}

.notes-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  color: #5e6b65;
  font-size: 13px;
  line-height: 1.6;
}

.notes-tip p {
  margin: 0;
}

.tip-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--chili);
  animation: breathe 2.2s infinite;
}

@keyframes breathe {
  50% { box-shadow: 0 0 0 6px rgba(242, 90, 56, 0.12); }
}

.phone {
  position: relative;
  width: 430px;
  height: min(880px, calc(100vh - 48px));
  min-height: 680px;
  overflow: hidden;
  border: 8px solid #19211f;
  border-radius: 48px;
  background: var(--rice);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.phone-hardware {
  position: absolute;
  z-index: 50;
  top: 11px;
  left: 50%;
  width: 104px;
  height: 27px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #19211f;
  pointer-events: none;
}

.phone-hardware span {
  position: absolute;
  top: 10px;
  left: 36px;
  width: 34px;
  height: 5px;
  border-radius: 6px;
  background: #303b37;
}

.phone-hardware i {
  position: absolute;
  top: 9px;
  right: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #263b3c;
}

.status-bar {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 19px 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icons svg {
  width: 15px;
  height: 13px;
  fill: currentColor;
}

.battery {
  position: relative;
  width: 20px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.battery::after {
  content: "";
  position: absolute;
  top: 2px;
  right: -3px;
  width: 2px;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}

.battery i {
  position: absolute;
  inset: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.screen-root {
  height: 100%;
  overflow: hidden;
  background: var(--rice);
}

.screen {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  animation: screenIn 0.34s cubic-bezier(.22,.8,.24,1);
}

.boot-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
}

.tasks-empty {
  margin: 24px 16px;
  padding: 28px 18px;
  border-radius: 16px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
}
.tasks-group { margin: 14px 16px 6px; font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.task-card { margin: 0 16px 10px; padding: 14px 14px 12px; border-radius: 14px; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.task-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-title { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff4d6; color: #8a6d1a; flex-shrink: 0; }
.task-badge.is-error { background: #fdecec; color: #b3261e; }
.task-meta { margin: 8px 0 10px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.task-actions { display: flex; gap: 8px; }
.task-action { flex: 1; padding: 9px 0; border: 0; border-radius: 10px; background: var(--jade); color: white; font-size: 13px; font-weight: 700; }
.task-action.is-ghost { flex: 0 0 auto; padding: 9px 14px; background: transparent; color: var(--muted); border: 1px solid #e2e8e4; }
.task-progress { margin: 10px 0 8px; height: 6px; border-radius: 999px; background: #eef2ef; overflow: hidden; }
.task-progress i { display: block; height: 100%; background: var(--jade); border-radius: 999px; transition: width 0.4s ease; }
.task-stages-mini { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 10px; color: #b6bfb9; }
.task-stages-mini .is-done { color: var(--jade); font-weight: 700; }

.screen::-webkit-scrollbar { display: none; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
}

.screen.has-tabbar {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.top-safe {
  padding-top: 51px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 22px 6px;
}

.page-head .hello {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.page-head h1 {
  margin: 0;
  font: 800 31px/1.15 "STKaiti", "KaiTi", serif;
  letter-spacing: -0.04em;
}

.avatar-button,
.icon-button,
.back-button,
.round-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.avatar-button {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--yolk);
  box-shadow: 0 5px 14px rgba(40, 70, 60, 0.12);
  font: 800 18px/1 "STKaiti", serif;
}

.search-launch {
  width: calc(100% - 44px);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 22px 14px;
  padding: 13px 15px;
  border: 1px solid #e1e7e3;
  border-radius: 15px;
  color: #8a948f;
  background: white;
  box-shadow: 0 6px 18px rgba(37, 72, 60, 0.05);
  cursor: pointer;
  text-align: left;
}

.search-launch svg,
.icon-button svg,
.back-button svg,
.round-button svg,
.tab-item svg,
.primary-action svg,
.mini-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mood-strip {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 1px 22px 18px;
  scrollbar-width: none;
}

.mood-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #65726c;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mood-chip.is-active {
  color: white;
  border-color: var(--jade);
  background: var(--jade);
}

.hero-recipe {
  position: relative;
  min-height: 386px;
  margin: 0 14px;
  overflow: hidden;
  border-radius: 29px;
  color: white;
  background: #2b3d36;
  box-shadow: 0 18px 36px rgba(37, 68, 58, 0.16);
}

.hero-recipe > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-recipe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 25, 22, 0.02) 24%, rgba(17, 25, 22, 0.87) 100%);
}

.hero-badge {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(18, 36, 31, 0.72);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
}

.hero-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #88e2b5;
}

.hero-save {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: white;
  background: rgba(18, 36, 31, 0.58);
  backdrop-filter: blur(9px);
}

.hero-save.is-saved {
  color: var(--yolk);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.hero-kicker {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-content h2 {
  margin: 0;
  font: 800 34px/1.12 "STKaiti", "KaiTi", serif;
  letter-spacing: -0.03em;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.hero-meta span + span::before {
  content: "·";
  margin-right: 8px;
}

.hero-open {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: 15px;
  color: var(--ink);
  background: var(--yolk);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.hero-open i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  font-style: normal;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 22px 13px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.section-head button,
.text-button {
  padding: 0;
  border: 0;
  color: var(--jade);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.recipe-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 22px 8px;
  scrollbar-width: none;
}

.recipe-card {
  flex: 0 0 178px;
  padding: 0;
  border: 0;
  border-radius: 19px;
  background: white;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 8px 20px rgba(35, 69, 57, 0.07);
  cursor: pointer;
}

.recipe-card img {
  width: 100%;
  height: 124px;
  display: block;
  object-fit: cover;
}

.recipe-card-copy {
  padding: 12px 13px 13px;
}

.recipe-card h3 {
  margin: 0;
  font-size: 15px;
}

.recipe-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.trust-note {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 22px;
  padding: 14px;
  border-radius: 16px;
  color: var(--jade-deep);
  background: var(--jade-pale);
  font-size: 12px;
  line-height: 1.5;
}

.trust-note strong {
  display: block;
}

.trust-note span {
  color: #59766d;
  font-size: 10px;
}

.trust-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--jade);
  font-weight: 900;
}

.tabbar {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(214, 224, 219, 0.86);
  background: rgba(251, 252, 250, 0.94);
  backdrop-filter: blur(18px);
}

.compact-tabbar {
  grid-template-columns: repeat(2, 1fr);
  padding-right: 58px;
  padding-left: 58px;
}

.tab-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 2px;
  border: 0;
  color: #89938e;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.tab-item.is-active {
  color: var(--jade);
  font-weight: 800;
}

.tab-badge {
  position: absolute;
  top: 1px;
  right: 50%;
  transform: translateX(14px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--chili);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.tab-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--chili);
}

/* Recipe detail */
.detail-hero {
  position: relative;
  height: 350px;
  overflow: hidden;
  color: white;
  background: #284038;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 24, 21, 0.2), transparent 38%, rgba(12, 20, 17, 0.78));
}

.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-nav {
  position: absolute;
  z-index: 4;
  top: 52px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
}

.back-button,
.round-button {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  color: white;
  background: rgba(18, 35, 30, 0.68);
  backdrop-filter: blur(10px);
}

.detail-title {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 24px;
}

.detail-title p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.detail-title h1 {
  margin: 0;
  font: 800 38px/1.1 "STKaiti", "KaiTi", serif;
}

.detail-body {
  position: relative;
  z-index: 4;
  margin-top: -12px;
  padding: 20px 22px 112px;
  border-radius: 24px 24px 0 0;
  background: var(--rice);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
}

.quick-facts div {
  padding: 0 13px;
  border-right: 1px solid var(--line);
}

.quick-facts div:first-child { padding-left: 0; }
.quick-facts div:last-child { border-right: 0; }
.quick-facts span { display: block; color: var(--muted); font-size: 10px; }
.quick-facts strong { display: block; margin-top: 4px; font-size: 15px; }

.detail-summary {
  margin: 18px 0 0;
  color: #55635d;
  font-size: 14px;
  line-height: 1.75;
}

.detail-section {
  margin-top: 27px;
}

.detail-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 13px;
}

.detail-section-head h2 {
  margin: 0;
  font-size: 19px;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 11px;
}

.ingredient-list {
  display: grid;
  gap: 2px;
}

.ingredient-row {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid #e9eeeb;
  cursor: pointer;
}

.ingredient-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #b8c4be;
  border-radius: 8px;
  color: white;
  transition: 0.18s ease;
}

.ingredient-row.is-checked .check-box {
  border-color: var(--jade);
  background: var(--jade);
}

.ingredient-row.is-checked .check-box::after {
  content: "✓";
  font-size: 13px;
  font-weight: 900;
}

.ingredient-row.is-checked .ingredient-name {
  color: #9ca6a1;
  text-decoration: line-through;
}

.ingredient-name { font-size: 13px; }
.ingredient-amount { color: var(--muted); font-size: 12px; }
.ingredient-amount.is-unspecified { color: #a0aaa5; font-size: 10px; }

.step-preview-list {
  display: grid;
  gap: 10px;
}

.step-preview {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 13px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: white;
}

.step-preview img {
  width: 82px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.step-preview strong { display: block; color: var(--chili); font-size: 10px; }
.step-preview p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }

.detail-sticky {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(248, 250, 247, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.mini-action {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--jade);
  background: white;
  cursor: pointer;
}

.primary-action {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--jade);
  box-shadow: 0 9px 20px rgba(35, 106, 88, 0.22);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* Cooking mode */
.cook-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #edf2ef;
}

.cook-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 54px 16px 10px;
}

.cook-head .back-button,
.cook-head .round-button {
  color: var(--ink);
  background: white;
  box-shadow: 0 5px 13px rgba(33, 65, 55, 0.08);
}

.cook-head-center {
  text-align: center;
}

.cook-head-center span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.cook-head-center strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.stove-ruler {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 3px 19px 13px;
}

.ruler-mark {
  flex: 1;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d5dfda;
  cursor: pointer;
  transition: 0.2s ease;
}

.ruler-mark.is-done { background: #78a697; }
.ruler-mark.is-current { flex-grow: 2.2; background: var(--chili); }

.cook-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 14px;
  scrollbar-width: none;
}

.cook-scroll::-webkit-scrollbar { display: none; }

.cook-visual {
  position: relative;
  height: min(43vh, 350px);
  min-height: 250px;
  overflow: hidden;
  border-radius: 26px;
  background: #263a33;
  box-shadow: 0 16px 30px rgba(37, 64, 55, 0.12);
}

.cook-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: imageIn 0.3s ease;
}

.cook-visual.is-compact {
  height: min(34vh, 280px);
  min-height: 218px;
}

@keyframes imageIn { from { opacity: .45; transform: scale(1.02); } }

.visual-label {
  position: absolute;
  top: 13px;
  left: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(20, 35, 30, 0.68);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 700;
}

.visual-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8ce0b5;
}

.cook-card {
  position: relative;
  z-index: 2;
  margin: -18px 8px 0;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 24px rgba(33, 63, 53, 0.08);
}

.step-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--chili);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.step-eyebrow span:last-child {
  color: #93a09a;
  font: 600 10px/1 Consolas, monospace;
  letter-spacing: 0;
}

.cook-card h1 {
  margin: 13px 0 15px;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: -0.025em;
}

.cook-card.is-dense h1 {
  margin-bottom: 12px;
  font-size: 19px;
  line-height: 1.48;
}

.step-supplies {
  padding-top: 14px;
  border-top: 1px solid #edf1ef;
}

.step-supplies-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
}

.step-supplies-label span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.step-supplies-label small {
  color: #99a49f;
  font-size: 9px;
}

.used-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.used-ingredient {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cfe1d9;
  border-radius: 10px;
  color: var(--jade-deep);
  background: #edf6f1;
}

.used-ingredient em,
.used-ingredient b {
  padding: 6px 8px;
  font-size: 10px;
  font-style: normal;
}

.used-ingredient em {
  font-weight: 700;
}

.used-ingredient b {
  border-left: 1px solid #cfe1d9;
  color: white;
  background: var(--jade);
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-weight: 800;
}

.used-ingredient.is-unspecified {
  border-color: #dfe5e2;
  color: #6f7b75;
  background: #f5f7f6;
}

.used-ingredient.is-unspecified b {
  border-left-color: #dfe5e2;
  color: #8d9893;
  background: #e9eeeb;
  font-family: inherit;
  font-weight: 600;
}

.heat-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 6px 9px;
  border-radius: 9px;
  color: #8a431f;
  background: var(--chili-pale);
  font-size: 10px;
}

.heat-note span {
  color: #b66a49;
}

.heat-note b {
  font-weight: 800;
}

.cue-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 14px;
  color: #68531b;
  background: #fff4cf;
  font-size: 11px;
  line-height: 1.45;
}

.cue-card b {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #d49b00;
  font-size: 11px;
}

.timer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 13px 14px;
  border: 1px solid #e4e9e6;
  border-radius: 15px;
  background: #fbfcfb;
}

.timer-card span { color: var(--muted); font-size: 10px; }
.timer-card strong { display: block; margin-top: 3px; font: 700 18px/1 Consolas, monospace; }
.timer-button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--chili);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.timer-button.is-running { color: var(--ink); background: var(--yolk); }

.cook-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(214, 224, 219, 0.86);
  background: rgba(248, 250, 247, 0.96);
  backdrop-filter: blur(16px);
}

.cook-actions .primary-action {
  justify-content: space-between;
  padding-left: 18px;
  padding-right: 12px;
}

.cook-actions .primary-action i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--jade);
  background: white;
  font-style: normal;
}

/* Library and profile */
.simple-head {
  padding: 62px 22px 10px;
}

.simple-head p { margin: 0; color: var(--muted); font-size: 12px; }
.simple-head h1 { margin: 6px 0 0; font: 800 31px/1.1 "STKaiti", "KaiTi", serif; }

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 17px 22px;
}

.library-card {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: white;
  text-align: left;
  box-shadow: 0 8px 18px rgba(35, 69, 57, 0.06);
  cursor: pointer;
}

.library-card img { width: 100%; height: 150px; display: block; object-fit: cover; }
.library-card div { padding: 11px 12px 13px; }
.library-card h3 { margin: 0; font-size: 14px; }
.library-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }

.profile-card {
  margin: 17px 22px;
  padding: 20px;
  border-radius: 24px;
  color: white;
  background: var(--jade-deep);
}

.profile-row { display: flex; align-items: center; gap: 13px; }
.profile-avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 19px 7px 19px 7px; color: var(--ink); background: var(--yolk); font: 800 23px/1 "STKaiti", serif; }
.profile-row h2 { margin: 0; font-size: 18px; }
.profile-row p { margin: 4px 0 0; color: rgba(255,255,255,.66); font-size: 11px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 22px; background: rgba(255,255,255,.18); }
.profile-stats div { padding: 11px; background: var(--jade-deep); text-align: center; }
.profile-stats strong { display: block; font-size: 20px; }
.profile-stats span { color: rgba(255,255,255,.6); font-size: 9px; }

.menu-list { margin: 12px 22px; overflow: hidden; border-radius: 19px; background: white; }
.menu-row { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px; border: 0; border-bottom: 1px solid #edf0ee; background: white; cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-row span { font-size: 13px; }
.menu-row i { color: #a1aba6; font-style: normal; }

/* Sheets and completion */
.sheet-layer {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: rgba(17, 27, 24, 0.48);
  backdrop-filter: blur(4px);
}

.sheet-layer[hidden] { display: none; }

.bottom-sheet {
  width: 100%;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--rice);
  animation: sheetUp 0.32s cubic-bezier(.2,.82,.28,1);
}

@keyframes sheetUp { from { transform: translateY(100%); } }

.sheet-grabber { width: 38px; height: 4px; margin: 0 auto 18px; border-radius: 9px; background: #cdd6d1; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-close { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #e8eeea; cursor: pointer; }
.sheet-copy { margin: 8px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.link-input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; font-size: 12px; }
.sheet-action { width: 100%; min-height: 49px; margin-top: 11px; border: 0; border-radius: 14px; color: white; background: var(--chili); font-weight: 800; cursor: pointer; }
.sheet-action:disabled { opacity: .62; cursor: wait; }
.sheet-link { width: 100%; margin-top: 8px; padding: 10px 0; border: 0; background: transparent; color: var(--jade); font-size: 13px; font-weight: 700; cursor: pointer; }
.import-progress { display: grid; gap: 11px; margin: 18px 0 4px; }
.import-step { display: flex; align-items: center; gap: 10px; color: #8b9690; font-size: 12px; }
.import-step i { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #cbd4cf; border-radius: 50%; font: 700 9px/1 Consolas, monospace; }
.import-step.is-active { color: var(--ink); font-weight: 700; }
.import-step.is-active i { color: white; border-color: var(--chili); background: var(--chili); }
.import-step.is-done i { color: white; border-color: var(--jade); background: var(--jade); }
.import-error { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fdecec; color: #b3261e; font-size: 12px; display: flex; flex-direction: column; gap: 6px; }
.import-error strong { font-size: 11px; letter-spacing: 0.04em; }
.import-retry { align-self: flex-start; padding: 6px 12px; border: 1px solid #b3261e; border-radius: 999px; background: white; color: #b3261e; font-size: 12px; font-weight: 600; }
.review-issues { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(179, 38, 30, 0.4); }
.review-issues > span { font-size: 11px; color: #b3261e; font-weight: 700; }
.review-issues ul { margin: 6px 0 0; padding-left: 16px; font-size: 12px; color: #6b4a47; }
.review-issues li { margin: 2px 0; }

.completion {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 62px 22px 22px;
  color: white;
  background: var(--jade-deep);
  animation: screenIn .35s ease;
}

.completion-mark { width: 60px; height: 60px; display: grid; place-items: center; margin-top: auto; border-radius: 22px 7px 22px 7px; color: var(--ink); background: var(--yolk); font-size: 27px; font-weight: 900; transform: rotate(-3deg); }
.completion h1 { margin: 21px 0 9px; font: 800 39px/1.1 "STKaiti", "KaiTi", serif; }
.completion > p { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.7; }
.completion-photo { position: relative; height: 220px; margin: 28px 0 18px; overflow: hidden; border-radius: 24px; }
.completion-photo img { width: 100%; height: 100%; object-fit: cover; }
.completion-photo span { position: absolute; right: 12px; bottom: 12px; padding: 7px 10px; border-radius: 999px; color: white; background: rgba(18,35,30,.68); backdrop-filter: blur(8px); font-size: 10px; }
.rating-row { display: flex; gap: 8px; margin-bottom: 16px; }
.rating-chip { flex: 1; padding: 10px 5px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: rgba(255,255,255,.75); background: transparent; font-size: 11px; cursor: pointer; }
.rating-chip.is-active { color: var(--ink); border-color: var(--yolk); background: var(--yolk); font-weight: 800; }
.completion .primary-action { color: var(--ink); background: white; box-shadow: none; }
.completion .text-button { margin-top: 13px; color: rgba(255,255,255,.65); }

.toast {
  position: absolute;
  z-index: 130;
  left: 50%;
  bottom: 94px;
  max-width: calc(100% - 44px);
  padding: 11px 15px;
  border-radius: 999px;
  color: white;
  background: rgba(21, 34, 29, 0.92);
  box-shadow: 0 8px 24px rgba(20, 33, 29, 0.2);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: .24s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  body { background: var(--rice); }
  .prototype-stage { display: block; min-height: 100vh; padding: 0; }
  .prototype-notes { display: none; }
  .phone { width: 100%; height: 100vh; min-height: 620px; border: 0; border-radius: 0; box-shadow: none; }
  .phone-hardware { display: none; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .prototype-stage { padding: 18px; }
  .prototype-notes { min-height: 660px; }
  .phone { height: calc(100vh - 28px); min-height: 650px; }
  .hero-recipe { min-height: 340px; }
}

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

/* Recipe management prototype v2 */
.management-head {
  align-items: center;
  padding-top: 14px;
}

.management-head h1 {
  font-size: 29px;
}

.today-board {
  margin: 14px;
  padding: 20px;
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 48%),
    var(--jade-deep);
  box-shadow: 0 17px 34px rgba(28, 70, 58, .18);
}

.today-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.today-board-head > div span,
.today-board-head > div strong {
  display: block;
}

.today-board-head > div span {
  color: rgba(255,255,255,.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.today-board-head > div strong {
  margin-top: 4px;
  font: 800 24px/1.1 "STKaiti", "KaiTi", serif;
}

.today-board-head > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.today-board-head svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.today-menu-list {
  display: grid;
  gap: 8px;
}

.today-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  transition: .2s ease;
}

.today-menu-row.is-done {
  opacity: .64;
}

.today-recipe-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.today-recipe-main img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.today-recipe-main span {
  min-width: 0;
}

.today-recipe-main strong,
.today-recipe-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-recipe-main strong {
  font-size: 13px;
}

.today-recipe-main small {
  margin-top: 5px;
  color: rgba(255,255,255,.58);
  font-size: 9px;
}

.today-done-button {
  min-width: 65px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: var(--yolk);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.today-done-button:disabled {
  color: white;
  background: rgba(255,255,255,.15);
  cursor: default;
}

.today-done-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.empty-menu {
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.26);
  border-radius: 17px;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.05);
  font-size: 11px;
  cursor: pointer;
}

.empty-menu b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--yolk);
  font-size: 17px;
}

.today-progress {
  height: 4px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.today-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--yolk);
  transition: width .35s ease;
}

.today-progress-copy {
  margin: 7px 0 0;
  color: rgba(255,255,255,.55);
  font-size: 9px;
  text-align: right;
}

.compact-search {
  margin: 0;
}

.home-tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 9px;
  margin: 18px 22px 20px;
}

.home-tool-row .search-launch {
  width: 100%;
  min-width: 0;
  min-height: 54px;
}

.inline-import-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-radius: 15px;
  color: #4c3e12;
  background: var(--yolk);
  box-shadow: 0 7px 18px rgba(162, 122, 16, .15);
  cursor: pointer;
  text-align: left;
}

.inline-import-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline-import-button strong,
.inline-import-button small {
  display: block;
}

.inline-import-button strong {
  font-size: 11px;
}

.inline-import-button small {
  margin-top: 3px;
  color: rgba(76, 62, 18, .66);
  font-size: 8px;
}

.section-head > div .section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
}

.familiar-list {
  display: grid;
  gap: 9px;
  padding: 0 22px 24px;
}

.familiar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-radius: 17px;
  background: white;
  box-shadow: 0 7px 18px rgba(34, 67, 56, .06);
}

.familiar-row > button:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.familiar-row img {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
}

.familiar-row strong,
.familiar-row small {
  display: block;
}

.familiar-row strong {
  font-size: 13px;
}

.familiar-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.add-today {
  width: 34px;
  height: 34px;
  border: 1px solid #d7e1dc;
  border-radius: 11px;
  color: var(--jade);
  background: var(--jade-pale);
  font-size: 20px;
  cursor: pointer;
}

/* Scrollable recipe detail */
.management-hero {
  height: 320px;
}

.management-detail-body {
  padding-bottom: 38px;
}

.management-facts {
  padding-top: 5px;
}

.recipe-skill-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.skill-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  color: #707c76;
  background: #ebefed;
  font-size: 10px;
  font-weight: 800;
}

.skill-badge.master { color: #755600; background: #fff1bb; }
.skill-badge.familiar { color: var(--jade-deep); background: var(--jade-pale); }
.skill-badge.learning { color: #8b4b2d; background: var(--chili-pale); }

.recipe-skill-line button,
.section-edit {
  padding: 6px 0;
  border: 0;
  color: var(--jade);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.management-detail-body .detail-section {
  margin-top: 30px;
}

.management-detail-body .detail-section-head {
  align-items: center;
}

.management-detail-body .detail-section-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.management-detail-body .detail-section-head h2 {
  font-size: 21px;
}

.section-index {
  width: 27px;
  height: 27px;
  display: grid !important;
  place-items: center;
  border-radius: 9px 3px 9px 3px;
  color: white !important;
  background: var(--chili);
  font: 700 9px/1 Consolas, monospace !important;
}

.plain-ingredient-list {
  overflow: hidden;
  border-radius: 17px;
  background: white;
}

.plain-ingredient-row {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid #e9eeeb;
}

.plain-ingredient-row:last-child {
  border-bottom: 0;
}

.plain-ingredient-row span {
  font-size: 13px;
}

.plain-ingredient-row strong {
  color: var(--jade);
  font: 700 12px/1 Consolas, "Microsoft YaHei UI", sans-serif;
}

.steps-stream {
  display: grid;
  gap: 15px;
}

.stream-step {
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: 0 8px 22px rgba(33, 67, 55, .065);
}

.stream-step-image {
  position: relative;
  height: 205px;
  overflow: hidden;
  background: #dfe7e3;
}

.stream-step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-step-image span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px 4px 12px 4px;
  color: white;
  background: var(--chili);
  font: 800 11px/1 Consolas, monospace;
}

.stream-step p {
  margin: 0;
  padding: 15px 16px 17px;
  font-size: 14px;
  line-height: 1.65;
}

/* Recipe library */
.integrated-library {
  padding-top: 2px;
}

.integrated-library-head {
  margin-bottom: 11px;
}

.integrated-library-head h2 span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  place-items: center;
  border-radius: 8px 3px 8px 3px;
  color: white;
  background: var(--chili);
  font: 800 9px/1 Consolas, monospace;
  vertical-align: 3px;
}

.library-toolbar {
  display: flex;
  gap: 6px;
  margin: 16px 22px 12px;
  padding: 4px;
  border-radius: 13px;
  background: #e8eeea;
}

.home-library-toolbar {
  margin-top: 0;
}

.library-toolbar button {
  flex: 1;
  min-height: 35px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.library-toolbar button.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 9px rgba(35,66,56,.08);
}

.library-list-v2 {
  display: grid;
  gap: 10px;
  padding: 0 22px 24px;
}

.home-library-list {
  padding-bottom: 30px;
}

.library-row-v2 {
  position: relative;
  padding: 8px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 7px 19px rgba(35,69,57,.06);
}

.library-row-main {
  width: 100%;
  display: grid;
  grid-template-columns: 25px 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 60px 0 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.skill-rank {
  color: #9eaaa4;
  font: 700 10px/1 Consolas, monospace;
  text-align: center;
}

.library-row-main img {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
}

.library-row-copy strong,
.library-row-copy small,
.library-row-copy em {
  display: block;
}

.library-row-copy strong { font-size: 13px; }
.library-row-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.library-row-copy em { margin-top: 7px; color: var(--jade); font-size: 9px; font-style: normal; font-weight: 800; }
.library-row-copy em.master { color: #9b7200; }
.library-row-copy em.new { color: #929d98; }

.library-today-button {
  position: absolute;
  right: 10px;
  top: 50%;
  min-width: 48px;
  padding: 7px 6px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--jade);
  background: var(--jade-pale);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.library-today-button.is-added {
  color: #68756f;
  background: #edf1ef;
}

/* Unified recipe editor and AI review */
.editor-screen {
  padding-bottom: 30px;
  background: #eef3f0;
}

.editor-head {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 54px 14px 11px;
  border-bottom: 1px solid rgba(215,225,220,.9);
  background: rgba(248,250,247,.95);
  backdrop-filter: blur(16px);
}

.editor-head > div {
  text-align: center;
}

.editor-head > div span,
.editor-head > div strong {
  display: block;
}

.editor-head > div span {
  color: var(--muted);
  font-size: 9px;
}

.editor-head > div strong {
  margin-top: 3px;
  font-size: 13px;
}

.editor-back,
.editor-save-top {
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
}

.editor-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.editor-save-top {
  color: var(--jade);
  font-size: 11px;
  font-weight: 800;
}

.review-banner {
  margin: 14px 14px 0;
  padding: 17px;
  border-radius: 20px;
  color: white;
  background: var(--jade-deep);
}

.review-banner > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.review-banner > div b {
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--yolk);
  font-size: 9px;
}

.review-banner > div strong {
  font-size: 15px;
}

.review-banner p {
  margin: 11px 0;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  line-height: 1.65;
}

.review-banner ul {
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-banner li {
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  font-size: 8px;
}

.editor-body {
  padding: 14px;
}

.editor-cover {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 21px;
  background: #dce5e0;
}

.editor-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-cover span {
  position: absolute;
  left: 11px;
  bottom: 11px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(20,35,30,.68);
  backdrop-filter: blur(8px);
  font-size: 9px;
}

.editor-section {
  margin-top: 13px;
  padding: 17px;
  border-radius: 20px;
  background: white;
}

.editor-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.editor-section-title > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px 3px 8px 3px;
  color: white;
  background: var(--chili);
  font: 700 8px/1 Consolas, monospace;
}

.editor-section-title h2 {
  margin: 0;
  font-size: 17px;
}

.editor-section-title button {
  margin-left: auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  color: var(--jade);
  background: var(--jade-pale);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.field-label {
  display: block;
  margin-top: 12px;
}

.field-label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.field-label input,
.field-label textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dce5e0;
  border-radius: 12px;
  color: var(--ink);
  background: #fbfcfb;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

.small-field {
  position: relative;
  width: 145px;
}

.small-field input {
  padding-right: 42px;
}

.small-field b {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--muted);
  font-size: 10px;
}

.editor-hint {
  margin: -6px 0 12px;
  color: #929d98;
  font-size: 9px;
}

.ingredient-editor-list {
  display: grid;
  gap: 7px;
}

.ingredient-editor-row {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 92px 26px;
  gap: 6px;
  align-items: center;
}

.drag-handle {
  color: #a0aba5;
  font: 700 8px/1 Consolas, monospace;
}

.ingredient-editor-row input {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid #dee6e2;
  border-radius: 10px;
  color: var(--ink);
  background: #fbfcfb;
  font-size: 10px;
}

.ingredient-editor-row button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #a16a57;
  background: var(--chili-pale);
  cursor: pointer;
}

.step-editor-list {
  display: grid;
  gap: 10px;
}

.step-editor-card {
  display: grid;
  grid-template-columns: 82px minmax(0,1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid #e3e9e6;
  border-radius: 15px;
  background: #fbfcfb;
}

.step-editor-card > img {
  width: 82px;
  height: 94px;
  border-radius: 11px;
  object-fit: cover;
}

.step-editor-copy label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--chili);
  font: 800 8px/1 Consolas, monospace;
}

.step-editor-copy textarea {
  width: 100%;
  min-height: 63px;
  padding: 8px;
  border: 1px solid #e0e7e3;
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font-size: 10px;
  line-height: 1.45;
  resize: vertical;
}

.step-editor-tools {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

.step-editor-tools button {
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: #eaf0ed;
  font-size: 8px;
  cursor: pointer;
}

.step-editor-tools button:last-child {
  margin-left: auto;
  color: #9e5b43;
  background: var(--chili-pale);
}

.step-editor-tools button:disabled {
  opacity: .35;
  cursor: default;
}

/* Today menu selection */
.menu-picker {
  max-height: 82%;
  display: flex;
  flex-direction: column;
}

.menu-pick-list {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow-y: auto;
  margin-bottom: 4px;
}

.menu-pick-row {
  display: grid;
  grid-template-columns: 45px 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
}

.menu-pick-row input {
  position: absolute;
  opacity: 0;
}

.menu-pick-row img {
  width: 45px;
  height: 45px;
  border-radius: 11px;
  object-fit: cover;
}

.menu-pick-row strong,
.menu-pick-row small {
  display: block;
}

.menu-pick-row strong { font-size: 12px; }
.menu-pick-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.menu-pick-row i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #cdd8d2; border-radius: 9px; color: #86928c; font-style: normal; }
.menu-pick-row.is-selected { border-color: #93bcae; background: #f0f7f4; }
.menu-pick-row.is-selected i { color: white; border-color: var(--jade); background: var(--jade); }

/* Home two-panel view */
.screen.management-home {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-panels {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.home-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  transition: transform .3s cubic-bezier(.22, .8, .24, 1);
  -webkit-overflow-scrolling: touch;
}

.home-panel::-webkit-scrollbar { display: none; }

.today-panel { transform: translateY(0); }
.recipes-panel { transform: translateY(100%); }
.home-panels[data-view="recipes"] .today-panel { transform: translateY(-100%); }
.home-panels[data-view="recipes"] .recipes-panel { transform: translateY(0); }

.home-switch-fab {
  position: absolute;
  z-index: 30;
  right: 18px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--jade);
  box-shadow: 0 10px 22px rgba(35, 106, 88, .3);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-switch-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(35, 106, 88, .36);
}

.home-switch-fab:active {
  transform: translateY(0) scale(.94);
}

.home-switch-fab-arrow {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .32s cubic-bezier(.22, .8, .24, 1);
  transform: rotate(0deg);
}

.home-switch-fab-arrow.is-up {
  transform: rotate(180deg);
}

.home-switch-fab.is-flip .home-switch-fab-arrow {
  animation: fabArrowPop .34s ease;
}

@keyframes fabArrowPop {
  0% { opacity: .3; }
  50% { opacity: 1; }
}

.home-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 6px 0 4px;
  background: rgba(248, 250, 247, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 228, 223, .7);
}

.home-sticky .home-tool-row {
  margin-top: 0;
  margin-bottom: 10px;
}

.home-library-toolbar {
  margin-top: 0;
}

.library-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.library-filter-button.has-count {
  color: var(--chili);
  font-weight: 800;
}

.library-filter-button.is-active {
  color: var(--chili);
  background: white;
  box-shadow: 0 3px 9px rgba(242, 90, 56, .12);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: white;
  background: var(--chili);
  font: 800 9px/1 Consolas, monospace;
}

.library-empty {
  padding: 38px 22px 30px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.library-empty p { margin: 0; }
.library-empty .text-button { font-size: 12px; font-weight: 800; }

/* Filter sheet */
.filter-sheet {
  max-height: 86%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.filter-group { margin-top: 12px; }
.filter-group-label { margin: 0 0 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chips-ingredients { max-height: 168px; overflow-y: auto; padding: 2px 0; scrollbar-width: none; }
.filter-chips-ingredients::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #65726c;
  background: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.filter-chip.is-active { color: white; border-color: var(--jade); background: var(--jade); }
.filter-empty { color: var(--muted); font-size: 11px; }
.filter-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 9px; margin-top: 18px; }
.filter-secondary {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: white;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 900px) {
  .stream-step-image { height: 220px; }
  .editor-head { padding-top: calc(52px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  .home-panel { transition: none; }
}
