:root {
  color-scheme: light;
  --bg: #fbf6ef;
  --panel: #fffdf9;
  --panel-soft: #fff1ea;
  --ink: #2d2520;
  --muted: #8a7a6e;
  --line: #f0dfd3;
  --line-strong: #ead2c3;
  --red: #ff5a32;
  --red-dark: #d94124;
  --red-soft: #fff1ea;
  --green: #197a55;
  --shadow: 0 12px 34px rgba(112, 69, 44, 0.12);
  --shadow-soft: 0 8px 20px rgba(112, 69, 44, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: radial-gradient(circle at 50% 0%, #fffdf7 0%, #fbf6ef 48%, #f8f1e8 100%);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
}

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

.chef-app {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 0;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96) 0%, rgba(251, 246, 239, 0.94) 100%);
}

.topbar {
  display: grid;
  grid-template-columns: 58px 1fr 78px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 0 20px;
}

.title-block {
  min-width: 0;
  text-align: center;
}

.eyebrow,
.subtitle {
  display: none;
}

h1 {
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 500;
}

.icon-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.guide-btn {
  border: 0;
  border-radius: 999px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  font-size: 34px;
  font-weight: 300;
}

.ghost-btn {
  min-height: 38px;
  padding: 0 16px;
  background: rgba(255, 253, 249, 0.86);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.workbench {
  display: block;
}

.stage-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 444px;
  padding: 0 20px 10px;
  background: transparent;
}

.stage-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 52px;
}

.guide-btn {
  min-height: 42px;
  padding: 0 15px;
  background: linear-gradient(135deg, #ff6a3d, var(--red));
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(255, 90, 50, 0.24);
}

.stage-stats {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.stage-stats span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: #8a7a6e;
  font-size: 18px;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(112, 69, 44, 0.08);
}

.method-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 2px;
  scrollbar-width: none;
}

.method-strip::-webkit-scrollbar {
  display: none;
}

.method-chip {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.method-chip.is-active {
  border-color: var(--red);
  background: #fff1ea;
  color: var(--red-dark);
}

.method-food {
  width: 24px;
  height: 24px;
  border-radius: 0;
}

.pot-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 308px;
}

.heat-chip {
  display: none;
}

.stage-prompt {
  min-height: 22px;
  color: #7c675a;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.pot-ring {
  position: relative;
  width: min(72vw, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.14));
  overflow: visible;
}

.pot-wok {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--vessel-image, url("./assets/wok-real.webp")) center / var(--vessel-size, 94%) no-repeat;
  pointer-events: none;
}

.pot-ring[data-method="boil"] {
  --vessel-size: 76%;
  --drop-left: 50%;
  --drop-top: 49%;
  --drop-width: 34%;
  --drop-height: 25%;
  --front-clip-top: 54%;
}

.pot-ring[data-method="steam"] {
  --vessel-size: 75%;
  --drop-left: 50%;
  --drop-top: 49%;
  --drop-width: 36%;
  --drop-height: 24%;
  --front-clip-top: 56%;
}

.pot-ring[data-method="fry"] {
  --vessel-size: 72%;
  --drop-left: 50%;
  --drop-top: 52%;
  --drop-width: 42%;
  --drop-height: 26%;
  --front-clip-top: 58%;
}

.pot-ring[data-method="deep_fry"] {
  --vessel-size: 76%;
  --drop-left: 48%;
  --drop-top: 56%;
  --drop-width: 35%;
  --drop-height: 26%;
  --front-clip-top: 57%;
}

.pot-ring[data-method="roast"] {
  --vessel-size: 76%;
  --drop-left: 50%;
  --drop-top: 52%;
  --drop-width: 48%;
  --drop-height: 25%;
  --front-clip-top: 60%;
}

.pot-ring[data-method="airfryer"] {
  --vessel-size: 68%;
  --drop-left: 37%;
  --drop-top: 60%;
  --drop-width: 28%;
  --drop-height: 20%;
  --front-clip-top: 62%;
}

.pot-ring[data-method="salad"] {
  --vessel-size: 76%;
  --drop-left: 50%;
  --drop-top: 51%;
  --drop-width: 48%;
  --drop-height: 30%;
  --front-clip-top: 56%;
}

.pot-ring[data-method="stew"],
.pot-ring[data-method="braise"] {
  --vessel-size: 78%;
  --drop-left: 50%;
  --drop-top: 50%;
  --drop-width: 36%;
  --drop-height: 25%;
  --front-clip-top: 55%;
}

.pan-drop-zone {
  position: absolute;
  left: var(--drop-left, 49%);
  top: var(--drop-top, 50%);
  z-index: 8;
  width: var(--drop-width, 47%);
  height: var(--drop-height, 43%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pot-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 14;
  background: var(--vessel-image, url("./assets/wok-real.webp")) center / var(--vessel-size, 94%) no-repeat;
  clip-path: inset(var(--front-clip-top, 55%) 0 0 0);
  pointer-events: none;
}

.pot-ring::after {
  content: "";
  position: absolute;
  left: 47%;
  top: 37%;
  z-index: 16;
  width: 44%;
  height: 13%;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-30deg);
  transform-origin: 82% 50%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 16% 50%, #f7f2ea 0 27%, #cfc5b8 28% 38%, transparent 39%),
    linear-gradient(90deg, transparent 0 28%, #8b5b3d 29% 100%);
  border-radius: 999px;
  filter: drop-shadow(0 8px 8px rgba(45, 37, 32, 0.22));
}

.pot-ring.is-bumping {
  animation: bump 360ms ease;
}

@keyframes bump {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.018);
  }
}

.pot-center {
  position: absolute;
  inset: 35%;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

body.has-items .pot-center {
  opacity: 0;
  transform: scale(0.84);
  pointer-events: none;
}

.pot-lid {
  display: none;
}

.pot-body {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px #f0dfd3;
}

.pot-face {
  color: var(--red);
  font-size: 22px;
  font-weight: 800;
}

#potHint {
  color: #666;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.steam {
  display: none;
}

.pot-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: var(--z);
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(var(--r));
  animation: popIn 220ms ease both;
}

.seasoning-mark {
  position: absolute;
  left: var(--mx);
  top: var(--my);
  z-index: 13;
  width: 28px;
  height: 12px;
  border-radius: 999px;
  opacity: 0.7;
  transform: translate(-50%, -50%) rotate(var(--mr));
  animation: seasoningMarkIn 360ms ease var(--delay) both;
  pointer-events: none;
}

.seasoning-mark-pour {
  background: radial-gradient(circle at 30% 45%, rgba(123, 56, 24, 0.52), rgba(123, 56, 24, 0.18) 58%, transparent 72%);
}

.seasoning-mark-squeeze {
  width: 34px;
  height: 14px;
  background: radial-gradient(circle at 32% 45%, rgba(205, 58, 36, 0.56), rgba(205, 58, 36, 0.18) 60%, transparent 72%);
}

.seasoning-mark-sprinkle {
  width: 32px;
  height: 22px;
  background:
    radial-gradient(circle at 18% 36%, rgba(64, 47, 36, 0.56) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 24%, rgba(64, 47, 36, 0.42) 0 7%, transparent 8%),
    radial-gradient(circle at 75% 58%, rgba(64, 47, 36, 0.5) 0 7%, transparent 8%),
    radial-gradient(circle at 42% 76%, rgba(64, 47, 36, 0.36) 0 6%, transparent 7%);
}

.seasoning-action {
  position: absolute;
  left: 62%;
  top: 20%;
  z-index: 18;
  width: 112px;
  height: 120px;
  pointer-events: none;
  animation: seasoningAction 980ms ease both;
}

.seasoning-tool {
  position: absolute;
  left: 42px;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 0;
  transform-origin: 20% 85%;
  filter: drop-shadow(0 8px 8px rgba(45, 37, 32, 0.2));
}

.seasoning-action-pour .seasoning-tool,
.seasoning-action-squeeze .seasoning-tool {
  animation: seasoningTilt 980ms ease both;
}

.seasoning-action-sprinkle .seasoning-tool {
  animation: seasoningShake 980ms ease both;
}

.seasoning-stream {
  position: absolute;
  left: 37px;
  top: 48px;
  width: 9px;
  height: 56px;
  border-radius: 999px;
  opacity: 0;
  transform: rotate(23deg);
  transform-origin: top center;
  background: linear-gradient(180deg, rgba(126, 56, 25, 0.92), rgba(126, 56, 25, 0.08));
  animation: seasoningStream 980ms ease both;
}

.seasoning-action-squeeze .seasoning-stream {
  width: 13px;
  height: 42px;
  background: linear-gradient(180deg, rgba(222, 67, 42, 0.9), rgba(222, 67, 42, 0.05));
}

.seasoning-particles {
  position: absolute;
  left: 18px;
  top: 48px;
  width: 72px;
  height: 68px;
  opacity: 0;
  background:
    radial-gradient(circle at 14% 20%, rgba(55, 42, 33, 0.62) 0 4%, transparent 5%),
    radial-gradient(circle at 44% 12%, rgba(55, 42, 33, 0.5) 0 3%, transparent 4%),
    radial-gradient(circle at 72% 38%, rgba(55, 42, 33, 0.55) 0 4%, transparent 5%),
    radial-gradient(circle at 34% 62%, rgba(55, 42, 33, 0.42) 0 3%, transparent 4%),
    radial-gradient(circle at 62% 76%, rgba(55, 42, 33, 0.46) 0 3%, transparent 4%);
}

.seasoning-action-sprinkle .seasoning-stream {
  display: none;
}

.seasoning-action-sprinkle .seasoning-particles {
  animation: seasoningSprinkle 980ms ease both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(0.72);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--r)) scale(1);
  }
}

@keyframes seasoningMarkIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--mr)) scale(0.6);
  }
  to {
    opacity: 0.72;
    transform: translate(-50%, -50%) rotate(var(--mr)) scale(1);
  }
}

@keyframes seasoningAction {
  0% {
    opacity: 0;
    transform: translate(8px, -10px) scale(0.88);
  }
  14%,
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-18px, 26px) scale(0.96);
  }
}

@keyframes seasoningTilt {
  0%,
  100% {
    transform: rotate(0deg);
  }
  28%,
  72% {
    transform: rotate(-58deg);
  }
}

@keyframes seasoningShake {
  0%,
  100% {
    transform: rotate(-8deg) translateY(0);
  }
  24% {
    transform: rotate(-20deg) translateY(3px);
  }
  42% {
    transform: rotate(8deg) translateY(-2px);
  }
  62% {
    transform: rotate(-18deg) translateY(3px);
  }
}

@keyframes seasoningStream {
  0%,
  22%,
  86%,
  100% {
    opacity: 0;
    transform: rotate(23deg) scaleY(0.1);
  }
  35%,
  72% {
    opacity: 1;
    transform: rotate(23deg) scaleY(1);
  }
}

@keyframes seasoningSprinkle {
  0%,
  20%,
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
  42%,
  74% {
    opacity: 1;
    transform: translateY(18px);
  }
}

.food-visual {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.food-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.seasoning-action .seasoning-tool {
  width: 56px;
  height: 56px;
  border-radius: 0;
}

.method-chip .method-food {
  width: 34px;
  height: 34px;
  border-radius: 0;
}

.ring-food {
  width: var(--size);
  height: var(--size);
  border-radius: 0;
  border: 0;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.18));
}

.card-food {
  width: 94px;
  height: 94px;
  border-radius: 24px;
  box-shadow: none;
}

.mini-food {
  width: 24px;
  height: 24px;
  border-radius: 0;
  box-shadow: none;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.secondary-btn {
  min-height: 52px;
  padding: 0 18px;
  font-size: 20px;
  font-weight: 600;
}

.primary-btn {
  background: linear-gradient(135deg, #ff6a3d, var(--red));
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 90, 50, 0.24);
}

.secondary-btn {
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink);
  border: 2px solid #2d2520;
  box-shadow: 0 8px 14px rgba(112, 69, 44, 0.08);
}

.selected-panel {
  margin: 0 0 14px;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.9);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.panel-title span {
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}

.panel-title strong {
  color: var(--red);
  font-size: 18px;
}

.selected-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.selected-list::-webkit-scrollbar {
  display: none;
}

.selected-chip {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.selected-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
  line-height: 1;
}

.empty-tip {
  color: var(--muted);
  line-height: 1.7;
}

.catalog {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  min-height: 430px;
  border: 1px solid var(--line-strong);
  border-radius: 28px 28px 0 0;
  background: var(--panel);
  overflow: hidden;
}

.catalog-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
}

.catalog-head h2,
.catalog-head p {
  display: none;
}

.search-box {
  grid-column: 2;
  justify-self: end;
  width: min(230px, 100%);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 999px;
  background: #f6eee8;
  color: var(--muted);
  font-size: 20px;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.tabs {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f8efe8;
}

.tab-btn {
  position: relative;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid #eadbd0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  text-align: left;
  padding: 0 18px;
}

.tab-btn.is-active {
  background: #fffdf9;
  color: var(--ink);
  font-weight: 700;
}

.tab-btn.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: var(--red);
}

.item-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  max-height: 540px;
  overflow-y: auto;
  padding: 18px;
  background: #fffaf4;
}

.manual-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 18px 4px;
  border-top: 1px solid var(--line);
  background: #fffaf4;
}

.manual-box label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.manual-box input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 0 15px;
  background: #fffdf9;
  color: var(--ink);
}

.manual-box button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.item-card {
  position: relative;
  min-height: 164px;
  display: grid;
  justify-items: center;
  align-content: start;
  grid-template-rows: auto auto auto auto;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf9;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 5px 13px rgba(112, 69, 44, 0.08);
}

.item-card.is-selected {
  border-color: var(--red);
  background: #fff8f3;
  box-shadow: 0 8px 18px rgba(255, 90, 50, 0.16);
}

.item-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.card-food {
  width: 82px;
  height: 82px;
  margin-bottom: 0;
}

.item-card strong {
  width: 100%;
  min-height: 24px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-all;
}

.item-hint {
  color: var(--muted);
  font-size: 13px;
}

.item-type {
  color: #5f4637;
  font-size: 13px;
  font-weight: 600;
}

.note-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 0;
  color: var(--muted);
  font-weight: 600;
}

.note-box textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  padding: 13px 15px;
  background: #fffdf9;
  color: var(--ink);
}

.result-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.result-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-card {
  position: relative;
  width: min(100%, 720px);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 30px;
  border-radius: 28px 28px 0 0;
  background: #fffdf9;
  box-shadow: 0 -24px 64px rgba(67, 43, 30, 0.24);
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  background: #fff1ea;
  font-size: 28px;
}

.result-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.result-loading[hidden],
.result-content[hidden] {
  display: none !important;
}

.loader {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 7px solid #f3e3d8;
  border-top-color: var(--red);
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-content {
  padding-right: 34px;
}

.result-type {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff1ea;
  color: var(--red);
  font-weight: 800;
}

.result-type-normal {
  background: #e8f8ef;
  color: #197a55;
}

.result-type-dark,
.result-type-danger {
  background: #2d2520;
  color: #fff8ef;
}

.result-kicker,
.result-subtitle {
  color: var(--green);
  font-weight: 800;
}

.result-subtitle {
  color: #6f6259;
  line-height: 1.55;
}

.result-title {
  margin: 8px 0 12px;
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 20px;
}

.score-badge,
.dark-badge {
  padding: 10px 14px;
  border-radius: 16px;
  font-weight: 900;
  text-align: center;
}

.score-badge {
  min-width: 88px;
  background: linear-gradient(135deg, #ff6a3d, var(--red));
  color: #fff;
  font-size: 28px;
}

.dark-badge {
  min-width: 108px;
  background: #2d2520;
  color: #fff;
  font-size: 20px;
}

.level-badge,
.flavor-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff1ea;
  color: #5f4637;
  font-weight: 700;
}

.used-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.used-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff1ea;
  color: #5f4637;
  font-weight: 700;
}

.result-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.result-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.result-section p,
.result-section li {
  color: #6f6259;
  line-height: 1.72;
}

.result-section ol {
  margin: 0;
  padding-left: 22px;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.result-actions .action-home {
  grid-column: 1 / -1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #2d2520;
  background: #2d2520;
  color: #fff8ef;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}

.guide-modal {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}

.guide-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.guide-card {
  padding: 22px 20px 18px;
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.guide-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.guide-list {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #6f6259;
  line-height: 1.65;
}

.guide-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.guide-card .primary-btn {
  width: 100%;
}

.result-actions button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 8px;
  background: #fffdf9;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.result-actions .action-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.result-actions .hot {
  border-color: var(--red);
  background: linear-gradient(135deg, #ff6a3d, var(--red));
  color: #fff;
}

.share-app {
  display: grid;
  align-content: start;
}

.ghost-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.86);
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}

.share-card {
  width: min(calc(100% - 32px), 720px);
  margin: 18px auto 40px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.share-hero {
  padding-bottom: 8px;
}

body.is-cooking .pot-ring {
  animation: simmer 1s ease-in-out infinite;
}

body.is-cooking .pot-ring::after {
  opacity: 1;
  animation: spatulaStir 760ms ease-in-out infinite;
}

body.is-cooking .pot-item {
  animation: stirFood 820ms ease-in-out infinite;
}

@keyframes spatulaStir {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-34deg) translate(-3%, -1%);
  }
  45% {
    transform: translate(-50%, -50%) rotate(-9deg) translate(8%, 5%);
  }
  70% {
    transform: translate(-50%, -50%) rotate(-23deg) translate(1%, 8%);
  }
}

@keyframes stirFood {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(var(--r)) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) rotate(calc(var(--r) + 8deg)) translateY(-8px);
  }
}

@keyframes simmer {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (max-width: 760px) {
  .chef-app {
    width: 100%;
    padding-top: 10px;
  }

  .topbar {
    grid-template-columns: 48px 1fr 64px;
    min-height: 62px;
    padding: 0 16px;
  }

  h1 {
    font-size: 24px;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
    font-size: 31px;
  }

  .ghost-btn {
    min-height: 34px;
    padding: 0 12px;
    font-size: 16px;
    box-shadow: none;
  }

  .stage-card {
    min-height: 388px;
    padding: 0 16px 8px;
  }

  .stage-meta {
    gap: 10px;
  }

  .guide-btn {
    min-height: 38px;
    font-size: 16px;
    padding: 0 12px;
  }

  .stage-stats {
    gap: 8px;
  }

  .stage-stats span {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }

  .pot-stage {
    min-height: 250px;
  }

  .pot-ring {
    width: min(70vw, 315px);
  }

  .pot-item {
    width: var(--size);
    height: var(--size);
  }

  .ring-food {
    width: var(--size);
    height: var(--size);
  }

  .action-row {
    gap: 10px;
  }

  .primary-btn,
  .secondary-btn {
    min-height: 48px;
    font-size: 18px;
  }

  .catalog {
    grid-template-columns: 96px minmax(0, 1fr);
    border-radius: 24px 24px 0 0;
  }

  .catalog-head {
    min-height: 56px;
    padding: 8px 14px;
  }

  .search-box {
    min-height: 38px;
    font-size: 16px;
  }

  .tab-btn {
    min-height: 64px;
    padding: 0 14px;
    font-size: 18px;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .manual-box {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px 14px 4px;
  }

  .item-card {
    min-height: 148px;
    border-radius: 18px;
  }

  .card-food {
    width: 54px;
    height: 54px;
  }

  .item-card strong {
    font-size: 16px;
    min-height: 22px;
  }

  .item-hint,
  .item-type {
    font-size: 12px;
  }

  .drawer-card {
    padding: 26px 18px;
  }

  .result-content {
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  .stage-card {
    min-height: 372px;
  }

  .stage-stats span:last-child {
    display: none;
  }

  .pot-stage {
    min-height: 238px;
  }

  .catalog {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .tab-btn {
    min-height: 56px;
    padding: 0 11px;
    font-size: 16px;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .item-card {
    min-height: 142px;
    padding: 10px 8px;
  }

  .card-food {
    width: 50px;
    height: 50px;
  }
}
