/* 咕嘟厨房 v60 — cozy cooking mini-game HUD · wood · cream · terracotta */

:root {
  --cream: #fffdf7;
  --cream-2: #fff8ea;
  --cream-3: #f3e6c8;
  --paper: #efe2c4;
  --wood: #8b6844;
  --wood-mid: #a67b4b;
  --wood-dark: #5a4030;
  --wood-deep: #3f2c20;
  --ink: #3f2f24;
  --muted: #9a7a55;
  --terra: #c45a3a;
  --terra-deep: #9a3f28;
  --gold: #e8a84c;
  --gold-deep: #c88830;
  --lamp: #ffd8a0;
  --leaf: #3a7a48;
  --burn: #5a2418;
  --shadow: rgba(63, 47, 36, 0.22);
  --radius: 16px;
  --radius-sm: 12px;
  --type: 'Yuanti SC', 'YouYuan', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  font-family: var(--type);
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, rgba(255, 200, 110, 0.35), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 100%, rgba(196, 90, 58, 0.08), transparent 50%),
    linear-gradient(180deg, #f6ead2, #e8d5b0);
  color: var(--wood-dark);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  letter-spacing: 0.02em;
}

#main-view {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100svh;
  max-width: 540px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  gap: 10px;
}
body[data-page="home"] #main-view {
  height: 100dvh; height: 100svh;
  max-height: 100dvh; max-height: 100svh;
  overflow: hidden;
}
body[data-page="cook"] #main-view { max-width: 1180px; }
body[data-page="cook"] .daily-info { display: none; }

.hidden { display: none !important; }

h1 { font-size: 1.45rem; letter-spacing: 0.06em; font-weight: 800; }
h2 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 800; letter-spacing: 0.04em; }
h3 { font-size: 1rem; margin: 14px 0 8px; color: var(--wood); }
a { color: inherit; }

/* —— Wood / stamp buttons —— */
.btn {
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #f5e6c8, #e8d4a8);
  color: var(--wood-dark);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary, .btn.stamp.primary {
  background: linear-gradient(180deg, #d96a48, var(--terra-deep));
  color: #fff8f0;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.btn.stamp {
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink), inset 0 -2px 0 rgba(0,0,0,0.12);
}
.btn.wood-btn {
  background: linear-gradient(180deg, #c9a06a, #8b6844);
  color: #fff8ea;
  border-color: var(--wood-deep);
  box-shadow: 0 3px 0 var(--wood-deep);
}
.btn.small { padding: 5px 11px; font-size: 0.8rem; box-shadow: 0 2px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
}

input, select {
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fffdf5;
  color: var(--wood-dark);
  width: 100%;
  box-shadow: inset 0 2px 4px rgba(63,47,36,0.06);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(232, 168, 76, 0.3);
}

/* —— Top HUD: one wooden plaque —— */
.topbar.wood-plaque {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo stats" "daily daily";
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  flex: 0 0 auto;
  padding: 9px 14px 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(70,45,25,0.08) 18px 19px),
    linear-gradient(180deg, rgba(255,248,220,0.22), transparent 42%),
    linear-gradient(180deg, #c9a06a 0%, #a67b4b 48%, #8b6844 100%);
  border: 3.5px solid var(--wood-deep);
  border-radius: 12px;
  width: 100%;
  box-shadow:
    0 4px 0 rgba(63, 44, 32, 0.5),
    inset 0 1px 0 rgba(255, 230, 180, 0.4),
    inset 0 -3px 0 rgba(0,0,0,0.15);
  color: #fff8ea;
}
.topbar .logo { grid-area: logo; }
.hud-stats { grid-area: stats; }
.daily-info { grid-area: daily; }
.topbar .logo {
  display: flex; align-items: center; gap: 6px;
  font-weight: 900; font-size: 1.05rem; letter-spacing: 0.08em;
  text-decoration: none; color: #fff8ea; flex-shrink: 0;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.logo-mark { font-size: 1.25rem; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.2)); }
.hud-stats {
  display: flex; gap: 10px; align-items: center;
  margin-left: 0; flex-wrap: nowrap; justify-content: flex-end;
  font-size: 0.8rem; font-weight: 700;
  min-width: 0;
}
.ticket, .clock, .me-tag {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  white-space: nowrap;
  color: #fff8ea;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.me-tag {
  max-width: 7em; overflow: hidden; text-overflow: ellipsis;
  opacity: 0.92; font-weight: 600;
}
.ticket b, .clock b { font-weight: 900; }
.daily-info {
  flex: 1 1 100%;
  margin: 0; padding: 2px 0 0;
  font-size: 0.74rem; line-height: 1.4;
  color: rgba(255, 248, 234, 0.88);
  border-top: 1px dashed rgba(255, 230, 180, 0.35);
  text-align: center;
  letter-spacing: 0.04em;
}
.daily-info.claimed { opacity: 0.65; }

/* —— Login: door to kitchen —— */
#login-view {
  position: relative;
  min-height: 100dvh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow: hidden; background: #1c1812;
}
#login-view::before {
  content: '';
  position: absolute; inset: -20px;
  background: url(img/kitchen_bg.png?v=70) center 30% / cover;
  filter: blur(8px) brightness(0.45) saturate(1.1);
  transform: scale(1.05);
}
.login-sky {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(28,24,18,0.3), rgba(42,33,24,0.55));
}
.login-orb {
  position: absolute; top: 12%; right: 14%;
  width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe9a8, #e8a84c 55%, transparent 70%);
  box-shadow: 0 0 36px rgba(255, 220, 140, 0.5);
  animation: orbPulse 3.2s ease-in-out infinite;
}
.login-spark {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #ffe9a8; box-shadow: 0 0 8px #ffe9a8;
  animation: twinkle 2.6s ease-in-out infinite;
}
.login-spark.a { top: 22%; left: 18%; }
.login-spark.b { top: 16%; left: 42%; animation-delay: 0.8s; width: 4px; height: 4px; }
.login-spark.c { top: 34%; left: 10%; animation-delay: 1.5s; }

.wood-card, .login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 14px;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(139,104,68,0.07) 22px 23px),
    linear-gradient(180deg, rgba(255,250,235,0.2), transparent 28%),
    linear-gradient(165deg, #fff8ea, #e8d4a8);
  border: 4px solid var(--wood-deep);
  border-radius: 14px;
  padding: 26px 20px 20px;
  box-shadow:
    0 8px 0 rgba(47, 36, 28, 0.45),
    0 0 40px rgba(255, 200, 120, 0.18),
    inset 0 0 0 2px rgba(255, 230, 180, 0.35);
  animation: cardIn 0.45s ease-out;
}
.login-door-top {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 12px;
  background: linear-gradient(180deg, #c9a06a, #8b6844);
  border: 2px solid var(--wood-deep);
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}
.login-logo { position: relative; height: 68px; display: grid; place-items: center; }
.logo-pot {
  font-size: 3rem;
  filter: drop-shadow(0 4px 0 rgba(74, 59, 50, 0.15));
  animation: potBob 2.8s ease-in-out infinite;
}
.logo-steam {
  position: absolute; top: 4px; width: 10px; height: 22px;
  border-radius: 999px; background: rgba(255,255,255,0.55);
  filter: blur(2px); animation: steamRise 2s ease-in-out infinite; opacity: 0;
}
.logo-steam.s1 { left: 42%; }
.logo-steam.s2 { left: 54%; animation-delay: 0.7s; height: 18px; }
.login-sub { color: var(--muted); font-size: 0.9rem; margin-top: -4px; line-height: 1.55; }
.login-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 4px;
}
.login-mode-btn {
  border: 1.5px solid rgba(92, 58, 32, 0.28);
  background: rgba(255, 248, 235, 0.85);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.4rem;
  font: inherit;
  cursor: pointer;
}
.login-mode-btn.on {
  background: var(--stamp, #c45c26);
  border-color: transparent;
  color: #fff7ea;
  font-weight: 600;
}
.login-community-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin: 4px 0 2px;
}
.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}
.login-or::before, .login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
.login-or span { white-space: nowrap; }
#login-password-label.hidden { display: none; }
.login-mode-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.login-ai-key {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  text-align: left;
}
.login-ai-key.hidden, #login-form-fields.hidden { display: none; }
.login-ai-key-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}
.login-error {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(180, 40, 40, 0.1);
  border: 1.5px solid rgba(180, 40, 40, 0.45);
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}
.login-error.hidden { display: none; }
.ai-register-form label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a4038;
  text-align: left;
}
.ai-register-form .login-error { margin-top: 8px; }
.ai-register-section .login-ai-key { margin-top: 10px; }

.login-card label, .done-card label {
  text-align: left; font-size: 0.88rem;
  display: flex; flex-direction: column; gap: 6px; font-weight: 700;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes potBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes steamRise {
  0% { transform: translateY(8px); opacity: 0; }
  35% { opacity: 0.85; }
  100% { transform: translateY(-18px); opacity: 0; }
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* —— Hanging tags (tabs) —— */
.tabs, .hanging-tags {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 6px 2px 12px; margin-bottom: 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .hanging-tags::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  border: 2.5px solid var(--wood-deep);
  border-radius: 8px 8px 12px 12px;
  padding: 8px 14px 10px;
  font-size: 0.84rem; font-family: inherit; font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #e8d4a8, #c9a06a);
  color: var(--wood-deep);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--wood-deep);
  position: relative;
  transition: transform 0.12s, box-shadow 0.12s;
}
.tab::before {
  content: '';
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: #d4b070; border: 2px solid var(--wood-deep);
}
.tab:hover { transform: translateY(-1px); }
.tab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-deep); }
.tab.on {
  background: linear-gradient(180deg, #5a4030, #3f2c20);
  color: #fff8ea;
  box-shadow: 0 3px 0 #2a1c14;
}

/* —— Shop: market crates —— */
.page-sheet {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  width: 100%; padding-bottom: 8px;
}
.page-market {
  background:
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(139,104,68,0.04) 40px 41px),
    linear-gradient(180deg, rgba(139,104,68,0.08), transparent 120px);
  border-radius: 16px;
  padding: 4px 2px 12px;
}
.page-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.page-head h1, .wood-title {
  font-size: 1.15rem; margin: 0; border: none; padding: 0;
  letter-spacing: 0.08em; font-weight: 900;
  color: var(--wood-deep);
}
.back, .wood-tag {
  flex-shrink: 0; text-decoration: none;
  color: #fff8ea; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em;
  background: linear-gradient(180deg, #c9a06a, #8b6844);
  border: 2.5px solid var(--wood-deep);
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 2px 0 var(--wood-deep);
}
.back:hover, .wood-tag:hover { filter: brightness(1.05); }
.back:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--wood-deep); }

.grid, .crate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 14px;
  padding-bottom: 8px;
}
.item-card {
  background:
    repeating-linear-gradient(180deg, transparent 0 14px, rgba(90,60,30,0.07) 14px 15px),
    linear-gradient(180deg, #e8d4a8 0%, #c9a06a 100%);
  border: 3.5px solid var(--wood-deep);
  border-radius: 8px;
  padding: 12px 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow:
    0 4px 0 rgba(63, 44, 32, 0.4),
    inset 0 0 0 2px rgba(255, 230, 180, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.item-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(180deg, #8b6844, #a67b4b);
  border-bottom: 2px solid var(--wood-deep);
  border-radius: 4px 4px 0 0;
  pointer-events: none;
}
.item-card::after {
  content: '';
  position: absolute; left: 6px; right: 6px; bottom: 48px; height: 2px;
  background: rgba(63,44,32,0.15);
  pointer-events: none;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 rgba(63, 44, 32, 0.35);
}
.item-card:active { transform: translateY(1px) scale(0.98); }
.item-pic {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(232,168,76,0.2), transparent 60%),
    linear-gradient(180deg, #fff8ea, #f0e0c0);
  border-radius: 8px;
  padding: 10px 6px;
  display: flex; justify-content: center; align-items: center;
  min-height: 90px;
  border: 2px solid rgba(63, 44, 32, 0.2);
  margin-top: 4px;
}
.item-card .icon { font-size: 2rem; }
.item-card .name {
  font-weight: 900; font-size: 0.95rem; text-align: center;
  letter-spacing: 0.06em; color: var(--wood-deep);
}
.item-card .sub {
  font-size: 0.78rem; color: #f5e6c8; text-align: center;
  font-weight: 800; margin: 0 auto;
  letter-spacing: 0.06em;
  background: #3f2c20;
  border: 2px solid #2a1c14;
  border-radius: 4px;
  padding: 2px 10px;
  width: fit-content;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.item-card .buy {
  width: 100%; white-space: nowrap; margin-top: 4px;
  background: linear-gradient(180deg, #d96a48, var(--terra-deep));
  color: #fff8f0;
  border-radius: 50% / 30%;
  letter-spacing: 0.12em;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  box-shadow: 0 3px 0 #5a2418, inset 0 1px 0 rgba(255,255,255,0.2);
}
.item-card .stepper { justify-content: center; width: 100%; }
.item-card.weird { border-style: dashed; }

.badge {
  display: inline-block; font-size: 0.72rem;
  background: var(--cream-3); border: 2px solid var(--ink);
  border-radius: 6px; padding: 0 8px; color: var(--wood-dark); font-weight: 700;
}
.badge.dark { background: var(--ink); color: #f3e3c9; }
.hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper b { min-width: 1.4em; text-align: center; font-weight: 900; }
.stepper .btn.small {
  width: 34px; min-width: 34px; height: 34px; min-height: 34px;
  padding: 0; border-radius: 8px; line-height: 1;
  background: linear-gradient(180deg, #e8d4a8, #c9a06a);
}

/* —— Fridge / pantry —— */
.page-pantry .pantry-shelf {
  background:
    repeating-linear-gradient(180deg,
      #4a5c64 0 52px,
      #2f3c42 52px 56px,
      #3d4e56 56px 108px,
      #2f3c42 108px 112px,
      #455660 112px 164px,
      #2f3c42 164px 168px);
  border: 4px solid var(--wood-deep);
  border-radius: 14px;
  padding: 18px 14px 22px;
  min-height: 240px;
  box-shadow:
    inset 0 10px 28px rgba(0,0,0,0.35),
    inset 0 0 0 3px rgba(255,255,255,0.04),
    0 5px 0 rgba(63,44,32,0.35);
  position: relative;
}
.page-pantry .pantry-shelf::before {
  content: '';
  position: absolute; left: 12%; right: 12%; top: -2px;
  height: 10px;
  background: linear-gradient(180deg, #c9a06a, #8b6844);
  border: 2px solid var(--wood-deep);
  border-radius: 0 0 8px 8px;
}
.dish-card {
  background: linear-gradient(165deg, #fffef9, #f5e6c8);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 3px 0 rgba(63,44,32,0.25);
  display: flex; gap: 12px; align-items: flex-start;
}
.dish-card .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dish-card .head .name { font-weight: 900; letter-spacing: 0.04em; }
.dish-card .ops {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px;
}
.dish-card .ops button:only-child { grid-column: 1 / -1; }
.dish-body { flex: 1; min-width: 0; }
.dish-thumb { flex: 0 0 auto; }
.dish-thumb .dish-svg { width: 76px; }

.ingredient-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ingredient-chip, .ing-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #fff8ea, #f0e0c0);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.85rem; font-weight: 700;
  box-shadow: 0 2px 0 rgba(63,44,32,0.2);
}
.ing-chip { font-family: inherit; color: inherit; cursor: pointer; }
.ing-chip.used-up, .ing-chip:disabled { opacity: 0.4; cursor: not-allowed; }

.empty {
  color: #c8b090; font-size: 0.88rem; text-align: center;
  padding: 28px 14px;
  background: rgba(255,248,234,0.12);
  border: 2px dashed rgba(255,230,180,0.35);
  border-radius: 12px;
}
.page-pantry .empty { color: #d8c8a8; }
.empty a { color: #ffb080; font-weight: 800; }

.progress {
  height: 16px;
  background: #3a3228;
  border: 2.5px solid #1a1510;
  border-radius: 8px;
  overflow: hidden; margin: 8px 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 6px;
  transition: width 0.5s;
}

.gift-item {
  font-size: 0.85rem; padding: 10px 0;
  border-bottom: 1px dashed rgba(255,230,180,0.3);
  color: #f0e0c0; font-weight: 600;
}
.panel-foot {
  text-align: center; font-size: 0.8rem; color: var(--muted);
  margin-top: 16px; padding-bottom: 8px; letter-spacing: 0.04em;
}

/* —— Toast —— */
#toast {
  position: fixed; left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--wood-deep); color: var(--cream);
  border: 2.5px solid #2a1c14;
  border-radius: 12px;
  padding: 12px 18px;
  max-width: min(88vw, 420px);
  font-size: 0.9rem; font-weight: 700;
  box-shadow: 0 5px 0 rgba(0,0,0,0.3);
  z-index: 99; white-space: pre-line;
  animation: toastIn 0.25s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Home kitchen stage ===== */
.page-home { flex: 1 1 auto; min-height: 0; display: flex; width: 100%; }
.stage {
  flex: 1 1 auto; min-height: 0;
  display: grid; place-items: center; width: 100%;
  container-type: size;
}
.scene {
  position: relative;
  width: min(100%, 560px, calc((100svh - 10rem) * 0.8));
  aspect-ratio: 4 / 5;
  height: auto; max-height: 100%; min-height: 0;
  border-radius: 20px; overflow: hidden;
  border: 3.5px solid var(--wood-deep);
  background: linear-gradient(#f7e6c4 0 58%, #c9955a 58% 61%, #e0b57a 61% 100%);
  box-shadow: 0 6px 0 rgba(63,44,32,0.35), 0 20px 40px rgba(63,44,32,0.18);
}
.scene::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 58%;
  background:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(190,150,100,0.14) 28px 30px),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(190,150,100,0.14) 28px 30px);
  pointer-events: none;
}
.scene::after {
  content: ''; position: absolute; inset: auto 0 0; height: 39%;
  background: repeating-linear-gradient(90deg, transparent 0 48px, rgba(120,85,45,0.12) 48px 50px);
  pointer-events: none;
}
.scene-vignette {
  display: none; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 48%, rgba(42,33,24,0.18) 100%),
    linear-gradient(180deg, rgba(42,33,24,0.06), transparent 14%, transparent 78%, rgba(42,33,24,0.14));
}

/* CSS deco fallback */
.lamp { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); width: 4px; height: 54px; background: var(--wood); z-index: 1; }
.lamp::before {
  content: ''; position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 24px; background: var(--gold);
  border: 2.5px solid var(--ink); border-radius: 40px 40px 12px 12px;
}
.lamp::after {
  content: ''; position: absolute; bottom: -72px; left: 50%; transform: translateX(-50%);
  width: 140px; height: 64px;
  background: radial-gradient(ellipse at center top, rgba(255,220,140,0.4), transparent 70%);
  pointer-events: none;
}
.rack {
  position: absolute; top: 12%; left: 6%;
  display: flex; gap: 10px; padding: 5px 12px;
  background: #b98d5f; border: 2.5px solid var(--ink); border-radius: 999px; z-index: 1;
}
.rack span { font-size: 1.1rem; }
.scene-window {
  position: absolute; top: 12%; right: 6%;
  width: clamp(64px, 22%, 100px); height: clamp(64px, 22%, 100px);
  border-radius: 50%;
  background: linear-gradient(#1f2b47, #3d4d78);
  border: 6px solid #b98d5f; overflow: hidden; z-index: 1;
}
.scene-window .moon { position: absolute; top: 12%; left: 44%; font-size: 2rem; }
.scene-window .star { position: absolute; color: #ffe9a8; font-size: 0.7rem; animation: twinkle 2.6s ease-in-out infinite; }
.scene-window .s1 { top: 62%; left: 20%; }
.scene-window .s2 { top: 30%; left: 20%; animation-delay: 1.2s; }
.scene-cat { position: absolute; bottom: 3.5%; left: 44%; font-size: 1.5rem; z-index: 1; }
.cat-zzz {
  position: absolute; bottom: 8%; left: 52%;
  font-size: 0.7rem; color: var(--muted); z-index: 2; pointer-events: none;
  animation: zzz 2.4s ease-in-out infinite;
}
@keyframes zzz {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 1; }
}
.cabinets {
  position: absolute; top: 0; left: 0; right: 0; height: 9%;
  background: repeating-linear-gradient(90deg, #c9955a 0 18%, #b8864c 18% 19%, #c9955a 19% 36%);
  border-bottom: 2.5px solid var(--ink); z-index: 1;
}
.counter {
  position: absolute; left: 0; right: 0; top: 56%; height: 5%;
  background: linear-gradient(#d4a574, #c9955a);
  border-top: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); z-index: 1;
}
.plant {
  position: absolute; z-index: 1; width: 28px; height: 36px;
  background:
    radial-gradient(circle at 50% 70%, #6aaa5a 0 40%, transparent 41%),
    radial-gradient(circle at 30% 45%, #7bb86a 0 28%, transparent 29%),
    radial-gradient(circle at 70% 45%, #5d9950 0 28%, transparent 29%);
  pointer-events: none;
}
.plant::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 16px; height: 10px; background: #c4453c;
  border: 2px solid var(--ink); border-radius: 2px 2px 6px 6px;
}
.plant-l { left: 4%; top: 34%; }
.plant-r { right: 38%; top: 18%; transform: scale(0.85); }
.notes {
  position: absolute; left: 38%; top: 14%; width: 34px; height: 28px;
  background: var(--cream-3); border: 2px solid var(--ink);
  border-radius: 2px; transform: rotate(-6deg); z-index: 1;
}

/* Hotspots: invisible hit + wooden hanging signs */
.spot {
  position: absolute;
  display: block;
  background: none; border: none; padding: 0;
  color: var(--wood-dark); font-family: inherit;
  cursor: pointer; z-index: 3;
  text-decoration: none;
  transition: filter 0.15s;
}
.spot:hover { filter: brightness(1.08); }
.spot:active { filter: brightness(0.95); }
.spot:focus-visible .wood-sign {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wood-sign {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%) rotate(-2deg);
  white-space: nowrap;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(60,40,20,0.12) 10px 11px),
    linear-gradient(180deg, #d4b070 0%, #a67b4b 55%, #8b6844 100%);
  border: 2.5px solid var(--wood-deep);
  border-radius: 5px;
  padding: 6px 12px 7px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fff8ea;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  box-shadow:
    0 3px 0 rgba(47, 36, 28, 0.55),
    inset 0 1px 0 rgba(255, 230, 180, 0.4);
  pointer-events: none;
  z-index: 4;
}
.wood-sign::before {
  content: '';
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 10px;
  background: #5a4030;
}
.wood-sign::after {
  content: '';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: #c9a06a; border: 2px solid var(--wood-deep);
}
.wood-sign-hot {
  background: linear-gradient(180deg, #e09060, #c45a3a 60%, #9a3f28);
  transform: translateX(-50%) rotate(1deg);
}
.wood-sign-cool {
  background: linear-gradient(180deg, #8aab9a, #5a7a6a 60%, #3d5a4e);
  transform: translateX(-50%) rotate(-1deg);
}

.spot-shop { left: 6%; top: 26%; width: 28%; height: 28%; }
.spot-stove { left: 8%; bottom: 8%; width: 36%; height: 36%; }
.spot-fridge { right: 6%; bottom: 8%; width: 30%; height: 40%; }
.spot-table { right: 1%; bottom: 0; width: 28%; height: 28%; }

/* Idle FX (photo) */
.idle-stove, .idle-zzz { display: none; pointer-events: none; z-index: 2; }
.idle-steam {
  position: absolute; width: 10px; height: 28px; border-radius: 999px;
  background: rgba(255,255,255,0.45); filter: blur(3px);
  animation: steamPuff 2.2s ease-in-out infinite; opacity: 0;
}
.idle-steam.a { left: 42%; top: 38%; }
.idle-steam.b { left: 48%; top: 36%; animation-delay: 0.7s; height: 22px; }
.idle-flame {
  position: absolute; left: 44%; top: 58%;
  width: 18px; height: 14px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 80%, #ff9020, transparent 70%);
  filter: blur(2px);
  animation: fireGlow 1.2s ease-in-out infinite alternate;
  opacity: 0.7;
}
.idle-zzz {
  position: absolute; right: 18%; top: 22%;
  font-size: 0.85rem; color: rgba(255,248,234,0.75); font-weight: 800;
  animation: zzz 2.8s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Photo kitchen */
.scene.has-photo {
  aspect-ratio: 3 / 4;
  width: min(100%, 560px, calc((100svh - 10rem) * 0.75));
  background-size: cover;
  background-position: center top;
  background-color: #2a2118;
  box-shadow: 0 8px 0 rgba(63,44,32,0.4), 0 24px 48px rgba(63,44,32,0.22);
}
.scene.has-photo::before,
.scene.has-photo::after,
.scene.has-photo .css-deco { display: none; }
.scene.has-photo .scene-vignette { display: block; }
.scene.has-photo .idle-stove,
.scene.has-photo .idle-zzz { display: block; position: absolute; }

/* Hit areas over basket / stove / fridge in kitchen_bg.png */
.scene.has-photo .spot-shop {
  left: 3%; top: 40%; width: 26%; height: 26%;
}
.scene.has-photo .spot-shop .wood-sign { bottom: 2%; left: 55%; }
.scene.has-photo .spot-stove {
  left: 30%; top: 38%; width: 30%; height: 32%;
  right: auto; bottom: auto;
}
.scene.has-photo .spot-stove .wood-sign { bottom: 0; }
.scene.has-photo .spot-fridge {
  left: 64%; top: 30%; width: 32%; height: 42%;
  right: auto; bottom: auto;
}
.scene.has-photo .spot-table {
  left: 72%; top: 70%; width: 27%; height: 29%;
  right: auto; bottom: auto;
}
.scene.has-photo .spot-fridge .wood-sign { bottom: 8%; left: 45%; }
.scene.has-photo .idle-stove { left: 34%; top: 40%; width: 24%; height: 28%; }
.scene.has-photo .idle-zzz { right: 14%; top: 20%; }

@keyframes fireGlow {
  from { opacity: 0.4; transform: scale(0.92); }
  to { opacity: 0.85; transform: scale(1.1); }
}

/* Food icons */
.food-icon {
  display: block; width: 56px; height: 56px; margin: 0 auto;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}
img.food-icon { background: none; }
.food-icon-sheet {
  background-image: url(img/food_icons.png);
  background-repeat: no-repeat; background-size: 400% 400%;
}
.item-card .food-icon { width: 72px; height: 72px; }
.ing-chip .food-icon, .ingredient-chip .food-icon { width: 28px; height: 28px; margin: 0; }

/* ===== Cook page — immersive stove (no side asides) ===== */
.page-cook {
  flex: 1 1 auto; min-height: min(78vh, 720px); overflow: hidden;
  width: 100%; position: relative;
  border: 3.5px solid var(--wood-deep);
  border-radius: 20px;
  padding: 0;
  background: #2a2118;
  box-shadow: 0 8px 0 rgba(63,44,32,0.35);
  display: flex; flex-direction: column;
}
.cook-scene {
  position: absolute; inset: -6% -10% -2% -10%;
  width: auto; height: auto; max-width: none;
  width: 120%; height: 112%;
  object-fit: cover; object-position: 48% 70%;
  z-index: 0; pointer-events: none; user-select: none;
  filter: saturate(1.04) brightness(0.88) contrast(1.04);
}
.cook-veil {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    /* mute lamp hotspot behind vessel — warm vignette, no white disc */
    radial-gradient(ellipse at 50% 34%, rgba(42,33,24,0.28) 0%, rgba(42,33,24,0.08) 34%, transparent 58%),
    radial-gradient(ellipse at 50% 48%, transparent 22%, rgba(42,33,24,0.30) 100%),
    radial-gradient(ellipse at 50% 72%, rgba(255, 140, 60, 0.07), transparent 42%),
    linear-gradient(180deg, rgba(42,33,24,0.22), transparent 14%, transparent 58%, rgba(42,33,24,0.48));
}
.page-cook > *:not(.cook-scene):not(.cook-veil) { position: relative; z-index: 1; }

/* Top chrome: back + compact method icons + book */
.cook-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 0;
  pointer-events: none;
}
.cook-chrome > * { pointer-events: auto; }
.cook-back {
  flex-shrink: 0;
  padding: 6px 10px !important;
  font-size: 0.82rem !important;
}
.method-tabs.method-icons {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  justify-content: center; padding: 0; margin: 0;
  scrollbar-width: none;
}
.method-tabs.method-icons::-webkit-scrollbar { display: none; }
.method-tab {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; text-decoration: none;
  width: 34px; min-width: 34px; height: 36px;
  padding: 3px 1px 2px !important;
  border-radius: 10px !important;
  font-size: 0.55rem !important;
  letter-spacing: 0 !important;
  box-shadow: 0 1.5px 0 var(--wood-deep) !important;
  border-width: 2px !important;
}
.method-tab::before { display: none !important; }
.method-tab .method-label { line-height: 1; font-weight: 800; }
.method-ico {
  display: block; width: 18px; height: 18px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  border-radius: 0; flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}
@media (max-width: 420px) {
  .method-tab .method-label { display: none; }
  .method-tab { width: 32px; min-width: 32px; height: 32px; }
  .method-ico { width: 20px; height: 20px; }
}
.recipe-book-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border: 2.5px solid var(--wood-deep);
  border-radius: 12px;
  background: linear-gradient(180deg, #e8d4a8, #c9a06a);
  box-shadow: 0 2px 0 var(--wood-deep);
  font-size: 1.15rem; cursor: pointer;
  line-height: 1;
}
.recipe-book-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--wood-deep); }

/* Center stage: vessel only */
.cook-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 4px 12px 8px;
  text-align: center;
}
.stove-stage {
  position: relative; width: 100%;
  min-height: min(48vh, 320px);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 4vh;
  pointer-events: none;
}
.page-cook .vessel {
  position: relative;
  width: min(240px, 62vw); height: min(240px, 62vw);
  margin: 0 auto; border: none; border-radius: 0;
  background: transparent; overflow: visible; touch-action: none;
  z-index: 4; pointer-events: auto;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,0.28));
  transition: filter 0.2s, transform 0.15s;
}
.page-cook .vessel:hover,
.page-cook .vessel.drop-ready {
  filter: drop-shadow(0 0 14px rgba(232,168,76,0.55)) drop-shadow(0 14px 18px rgba(0,0,0,0.38));
  transform: scale(1.02);
}
.page-cook .vessel-art {
  display: block; width: 100%; height: 100%;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  pointer-events: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.page-cook .in-pot {
  position: absolute; inset: 34% 24% 26%;
  display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 5px;
  z-index: 2; pointer-events: none;
}
.page-cook .in-pot .drop {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 0; border-radius: 50%; overflow: visible;
  background: #f7f0de;
  border: 2px solid rgba(255,250,238,.9);
  box-shadow: 0 3px 7px rgba(24,31,27,.34), inset 0 0 0 1px rgba(42,55,48,.16);
  font-size: 0.62rem; font-weight: 900; color: #fff;
}
.page-cook .in-pot .drop .food-icon {
  width: 34px; height: 34px; margin: 0;
  border-radius: 50%;
}
.page-cook .in-pot .drop b {
  position: absolute; right: -4px; bottom: -3px;
  min-width: 17px; height: 17px; padding: 0 3px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,.86); border-radius: 999px;
  background: var(--leaf-deep); box-shadow: 0 2px 4px rgba(0,0,0,.22);
  line-height: 1;
}
.page-cook .in-pot-empty { display: none; }

/* Short chalk hint under pot */
.chalk-hint {
  margin: 0;
  padding: 4px 12px;
  max-width: min(320px, 90%);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em;
  color: #f5e6c8;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
  background: rgba(26, 20, 14, 0.45);
  border: 1px solid rgba(255,248,234,0.12);
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

/* Tiny step dots (not fat tabs) */
.cook-progress.step-dots {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;
  gap: 8px; list-style: none; margin: 2px 0 0; padding: 0;
}
.cook-progress.step-dots li {
  width: 10px; height: 10px; padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,248,234,0.55);
  background: rgba(42,33,24,0.35);
  box-shadow: none; transform: none;
  font-size: 0; color: transparent; overflow: hidden;
  position: relative;
}
.cook-progress.step-dots li::after { display: none; }
.cook-progress.step-dots li + li::before { display: none; }
.cook-progress.step-dots li.on {
  background: #f0c070;
  border-color: #fff8ea;
  box-shadow: 0 0 8px rgba(240,200,80,0.55);
  transform: scale(1.15);
}
.cook-progress.step-dots li.done {
  opacity: 1;
  background: rgba(232,168,76,0.55);
  border-color: rgba(255,248,234,0.35);
}

.cook-actions {
  width: min(100%, 300px);
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.page-cook .cook-actions .btn {
  width: auto; min-width: 140px; max-width: 220px;
  align-self: center;
  min-height: 40px;
  padding: 8px 22px !important;
  border-radius: 999px !important;
}
.page-cook .cook-actions .progress { width: min(100%, 260px); align-self: center; }

.technique-card {
  width: min(100%, 290px);
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 11px 14px;
  border: 1px solid rgba(255,248,234,.24);
  border-radius: 16px;
  color: #fff8e8;
  background: linear-gradient(180deg, rgba(54,70,58,.92), rgba(35,48,41,.94));
  box-shadow: 0 4px 12px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.08);
}
.technique-card strong { font-size: .94rem; letter-spacing: .08em; }
.technique-card span { font-size: .76rem; color: #d9d5c1; }
.technique-pips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.technique-pips i {
  width: 19px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.18);
  transition: transform .16s ease, background .16s ease;
}
.technique-pips i.done { background: #f2c75c; border-color: #ffe49b; transform: translateY(-1px); }
.technique-controls { display: flex; justify-content: center; gap: 8px; width: 100%; }
.page-cook .cook-actions .technique-controls .btn { min-width: 0; width: 46%; padding-inline: 12px !important; }
.skim-dots { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 38px; }
.skim-dot {
  width: 33px; height: 25px; border: 0; border-radius: 48% 52% 45% 55%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f5e8c9 16% 43%, #d8c59e 72%);
  box-shadow: 0 2px 0 rgba(65,47,28,.55), 0 0 10px rgba(255,248,210,.26);
  animation: skimBob 1.5s ease-in-out infinite alternate;
}
.skim-dot:nth-child(2) { animation-delay: -.5s; transform: scale(.84); }
.skim-dot:nth-child(3) { animation-delay: -1s; transform: scale(.92); }
.preheat-card { background: linear-gradient(180deg, rgba(95,58,38,.94), rgba(57,39,30,.95)); }
.cover-card { background: linear-gradient(180deg, rgba(54,79,72,.94), rgba(34,54,50,.95)); }
@keyframes skimBob { from { translate: 0 -2px; } to { translate: 0 3px; } }

/* Bottom ingredient tray — horizontal chips */
.cook-tray {
  display: flex; align-items: stretch; gap: 6px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(42,33,24,0.55) 28%, rgba(42,33,24,0.72));
  border-top: 1px solid rgba(255,248,234,0.08);
  z-index: 5;
}
.ing-tray {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  flex: 1; min-width: 0;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.ing-tray .ing-tile {
  flex: 0 0 auto;
  width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 4px 5px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255,248,234,0.92);
  font-family: inherit; color: inherit; cursor: grab;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.12s;
}
.ing-tray .ing-tile:hover:not(:disabled) { transform: translateY(-2px); }
.ing-tray .ing-tile .name { font-size: 0.68rem; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ing-tray .ing-tile .qty { font-size: 0.62rem; color: var(--muted); }
.ing-tray .ing-tile .food-icon { width: 34px; height: 34px; margin: 0; }
.ing-tray .ing-tile.used-up, .ing-tray .ing-tile:disabled { opacity: 0.4; cursor: not-allowed; }
.ing-tray .empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; margin: 0;
  font-size: 0.82rem; color: #f5e6c8;
  background: none; border: none; white-space: nowrap;
}
.ing-tray .empty a { color: #f0c070; font-weight: 800; }
.tray-clear {
  flex-shrink: 0; align-self: center;
  width: 36px; height: 36px;
  border: 2px solid rgba(255,248,234,0.35);
  border-radius: 10px;
  background: rgba(42,33,24,0.55);
  color: #f5e6c8; font-size: 1.1rem; cursor: pointer;
  line-height: 1;
}
.tray-clear:active { transform: scale(0.96); }

/* Recipe bottom sheet */
.recipe-sheet {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.recipe-sheet.hidden { display: none; }
.sheet-backdrop {
  position: absolute; inset: 0;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(20,14,10,0.45);
}
.sheet-panel {
  position: relative; z-index: 1;
  max-height: min(58vh, 420px);
  overflow: auto;
  margin: 0 8px 8px;
  border-radius: 16px 16px 14px 14px;
  animation: sheetUp 0.22s ease-out;
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 900; margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 2px dashed rgba(90,64,48,0.25);
  letter-spacing: 0.08em; color: var(--wood-deep);
}
.sheet-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: 2px solid var(--wood-deep); background: #fff8ea;
  font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--wood-deep);
}
.wood-panel {
  background:
    linear-gradient(180deg, rgba(255,250,235,0.12), transparent 20%),
    linear-gradient(180deg, #f5e6c8, #e8d4a8);
  border: 3px solid var(--wood-deep);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 0 rgba(63,44,32,0.3);
}
.cook-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cook-steps li {
  background: #fff8ea; border: 2px solid rgba(90,64,48,0.25);
  border-radius: 10px; padding: 8px 10px;
}
.cook-steps li b { display: block; letter-spacing: 0.04em; }
.cook-steps li span { font-size: 0.76rem; color: var(--wood); }
.cook-steps li.on {
  border-color: var(--ink); background: #fff3d6;
  box-shadow: 0 2px 0 rgba(63,44,32,0.12);
}
.cook-steps li.done { opacity: 0.5; }
.recipe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.recipe-chip {
  border: 2px solid var(--wood-deep);
  background: #fff8ec; color: #5a4030;
  border-radius: 8px; padding: 4px 10px;
  font-size: 12px; font-family: inherit; font-weight: 700;
  cursor: pointer; letter-spacing: 0.02em;
}
.recipe-chip:hover { background: #ffe8c8; }

/* —— Fire gauge / thermometer —— */
.heat-wrap.skill-heat, .heat-wrap.fire-gauge {
  display: flex; flex-direction: column; gap: 8px;
  width: min(320px, 94%); margin: 0 auto 4px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(58,50,40,0.92), rgba(42,36,28,0.92));
  border: 2.5px solid #1a1510;
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,200,100,0.12);
  backdrop-filter: blur(4px);
}
.heat-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #d4b896; font-weight: 800; letter-spacing: 0.08em;
}
.heat-labels .sweet { color: #f0d060; font-weight: 900; position: relative; }
.heat-labels .sweet::after {
  content: '◆'; position: absolute; left: 50%; bottom: -9px;
  transform: translateX(-50%); font-size: 7px; color: #f0d060;
}
.progress.heat, .fire-track {
  position: relative; height: 18px;
  background: linear-gradient(90deg, #4a6a8a, #c8b090 30%, #e8a84c 55%, #c45a3a 78%, #3a1810);
  border-radius: 10px; overflow: visible;
  border: 2px solid #1a1510;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
}
.progress.heat .sweet-band, .fire-track .sweet-band {
  position: absolute; top: -3px; bottom: -3px;
  background: rgba(240, 200, 80, 0.35);
  border-left: 2px solid #f0d060;
  border-right: 2px solid #f0d060;
  border-radius: 4px;
  z-index: 1;
  box-shadow: 0 0 14px rgba(240, 200, 80, 0.45);
}
.progress.heat .heat-fill, .fire-track .heat-fill {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 2;
  border-radius: 8px;
  background: linear-gradient(90deg, #7eb0ff, #90d070 40%, #f0b45a 70%, #e05030);
  transition: width 0.08s linear;
  box-shadow: 2px 0 10px rgba(255,140,40,0.5);
}
.heat-fill.zone-perfect {
  box-shadow: 2px 0 8px rgba(0,0,0,0.2), 0 0 18px rgba(240, 200, 80, 0.75);
}
.heat-fill.zone-burned {
  background: linear-gradient(90deg, #7eb0ff, #90d070 25%, #f0b45a 45%, #8b2a1a 80%, #1a0804);
  box-shadow: 2px 0 10px rgba(140,40,20,0.6);
}
.heat-status {
  font-weight: 900; font-size: 14px; color: #f5e6c8;
  min-height: 1.25em; letter-spacing: 0.08em;
}
.heat-gauge-icon {
  text-align: center; font-size: 1rem; line-height: 1; margin-bottom: -2px;
  filter: drop-shadow(0 0 6px rgba(255,140,40,0.5));
}
.heat-boil .fire-track { background: linear-gradient(90deg, #7dabc2, #86c3bf 38%, #d9c778 66%, #765445); }
.heat-boil .heat-fill { background: linear-gradient(90deg, #9adce6, #73c8b5 48%, #f0d06b 82%); }
.heat-stirFry .fire-track { background: linear-gradient(90deg, #527a86, #db9a3d 38%, #db552f 72%, #32120e); }
.heat-steam .fire-track { background: linear-gradient(90deg, #739ca3, #a6d4cf 45%, #e6e0be 72%, #8d705e); }
.heat-bake .fire-track { background: linear-gradient(90deg, #8a735f, #d69d55 48%, #b55a32 75%, #351712); }

.finish-btn {
  border-radius: 50% / 40% !important;
  min-height: 48px !important;
  font-size: 1.02rem !important;
  letter-spacing: 0.12em !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,0.2) !important;
}
.finish-btn.zone-perfect {
  background: linear-gradient(180deg, #f0d060, #c88830) !important;
  color: #3f2c20 !important;
  box-shadow: 0 4px 0 #6a4a20, 0 0 0 3px rgba(240,200,80,0.4) !important;
  animation: perfectPulse 1.1s ease-in-out infinite;
}
.finish-btn.zone-overdone {
  background: linear-gradient(180deg, #f0a060, #c45a3a) !important;
  color: #fff8f0 !important;
}
.finish-btn.zone-burned {
  background: linear-gradient(180deg, #4a2018, #1a0804) !important;
  border-color: #0a0402 !important;
  color: #f5d0a0 !important;
  box-shadow: 0 4px 0 #0a0402, 0 0 16px rgba(140,40,20,0.5) !important;
  animation: burnShake 0.45s ease-in-out infinite;
}
.finish-btn.zone-underdone {
  background: linear-gradient(180deg, #a8c8e8, #6a98c0) !important;
  color: #1c3048 !important;
}
@keyframes perfectPulse {
  0%, 100% { box-shadow: 0 4px 0 #6a4a20, 0 0 0 3px rgba(240,200,80,0.3); }
  50% { box-shadow: 0 4px 0 #6a4a20, 0 0 0 6px rgba(240,200,80,0.55), 0 0 22px rgba(255,220,100,0.45); }
}
@keyframes burnShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  75% { transform: translateX(1px); }
}

/* Heat FX — warm lamp / fire only, NO giant white disc */
.heat-fx {
  pointer-events: none; position: absolute; inset: 8% 12% auto; height: 48%;
  opacity: 0; transition: opacity 0.25s; z-index: 5;
}
.heat-fx.on { opacity: 1; }
.heat-fx .steam {
  position: absolute; bottom: 10%; width: 12px; height: 32px;
  border-radius: 999px; background: rgba(255,245,220,0.35);
  filter: blur(3px); opacity: 0;
}
.heat-fx.on .steam { animation: steamPuff 1.4s ease-in-out infinite; }
.heat-fx .steam.p1 { left: 28%; }
.heat-fx .steam.p2 { left: 48%; animation-delay: 0.35s !important; height: 38px; }
.heat-fx .steam.p3 { left: 64%; animation-delay: 0.7s !important; height: 28px; }
.heat-fx .ember {
  position: absolute; bottom: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #ff8a40; opacity: 0; filter: blur(1px);
}
.heat-fx.on .ember { animation: emberFloat 1.1s ease-out infinite; }
.heat-fx .ember.e1 { left: 36%; }
.heat-fx .ember.e2 { left: 58%; animation-delay: 0.4s !important; }
.heat-fx.on {
  background:
    radial-gradient(ellipse at 50% 92%, rgba(255,140,40,0.38), transparent 58%);
  animation: sizzle 0.55s ease-in-out infinite alternate;
}
.heat-fx.zone-perfect {
  background:
    radial-gradient(ellipse at 50% 92%, rgba(255,180,70,0.48), transparent 58%);
}
.heat-fx.zone-burned {
  background:
    radial-gradient(ellipse at 50% 88%, rgba(40,10,5,0.55), transparent 62%);
  animation: burnFlicker 0.35s ease-in-out infinite alternate;
}
.heat-fx.zone-burned .steam { background: rgba(60,40,30,0.45); filter: blur(4px); }
.heat-fx.zone-burned .ember { background: #ff4020; box-shadow: 0 0 8px #ff4020; }
.heat-fx.zone-overdone {
  background: radial-gradient(ellipse at 50% 90%, rgba(255,100,40,0.42), transparent 60%);
}

@keyframes steamPuff {
  0% { transform: translateY(10px) scaleX(0.8); opacity: 0; }
  30% { opacity: 0.7; }
  100% { transform: translateY(-48px) scaleX(1.2); opacity: 0; }
}
@keyframes emberFloat {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-40px) scale(0.4); opacity: 0; }
}
@keyframes sizzle {
  from { transform: scaleY(0.92); opacity: 0.78; }
  to { transform: scaleY(1.06); opacity: 1; }
}
@keyframes burnFlicker {
  from { opacity: 0.7; filter: brightness(0.9); }
  to { opacity: 1; filter: brightness(1.15); }
}

.fly-ing {
  position: fixed; z-index: 80; font-size: 1.6rem; pointer-events: none;
  transition: transform 0.45s ease, opacity 0.45s ease;
  margin-left: -20px; margin-top: -20px;
}
.fly-ing .food-icon { width: 40px; height: 40px; }
.dish-svg {
  width: min(240px, 70vw); height: auto; display: block; margin: 0 auto; overflow: visible;
}
.dish-svg-fixed,
.dish-svg-generated { filter: drop-shadow(0 4px 5px rgba(73, 52, 34, .12)); }
.dish-svg .dish-steam path { animation: steamRise 2.2s ease-in-out infinite; }
.dish-svg .dish-steam path:nth-child(2) { animation-delay: 0.35s; }
.dish-svg .dish-steam path:nth-child(3) { animation-delay: 0.7s; }

/* ===== Done / gift — recipe card reveal ===== */
#done-overlay, #gift-overlay {
  position: fixed; inset: 0;
  background: rgba(42, 33, 24, 0.62);
  z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}
.done-card, .recipe-reveal {
  position: relative; z-index: 2;
  width: min(420px, 100%);
  max-height: min(92dvh, 92svh); overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255,250,235,0.2), transparent 25%),
    linear-gradient(165deg, #fffef9, #f5e6c8);
  border: 3.5px solid var(--wood-deep);
  border-radius: 16px;
  padding: 22px 18px 18px;
  box-shadow: 0 8px 0 rgba(63,44,32,0.4), 0 24px 48px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 12px; text-align: center;
  animation: cardIn 0.35s ease-out;
}
.done-card h2 { border: none; margin: 0; padding: 0; font-size: 1.2rem; letter-spacing: 0.06em; }
.done-visual {
  display: flex; justify-content: center;
  background: radial-gradient(ellipse at 50% 80%, rgba(74,59,50,0.08), transparent 55%);
  border-radius: 14px; padding: 10px 0;
}
.done-visual .dish-svg { width: min(220px, 68vw); }
.done-spark { font-weight: 900; letter-spacing: 0.1em; font-size: 1.05rem; color: var(--wood-deep); }
.done-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.done-ops .btn:first-child { grid-column: 1 / -1; }
.rename-row { display: flex; gap: 8px; }
.done-tag {
  display: inline-block; align-self: center; font-size: 0.85rem;
  color: var(--muted); background: var(--cream-3);
  border: 2px solid var(--ink); border-radius: 8px; padding: 3px 12px; font-weight: 700;
}
.done-tag.dark { color: #8b2d5c; background: #f5e0ea; }
.done-tag.perfect { color: var(--leaf); background: #e4f5e8; }

#done-overlay.juice-perfect .done-card {
  box-shadow: 0 8px 0 rgba(63,44,32,0.35), 0 0 40px rgba(255, 210, 100, 0.45);
  border-color: #c88830;
}
#done-overlay.juice-burned .done-card {
  background: linear-gradient(165deg, #3a2820, #2a1810);
  color: #f0d0b0; border-color: #1a0804;
  box-shadow: 0 8px 0 #0a0402, inset 0 0 30px rgba(0,0,0,0.4);
}
#done-overlay.juice-burned .done-spark,
#done-overlay.juice-burned h2 { color: #f0d0b0; }
#done-overlay.juice-burned .done-tag { background: #2a1810; color: #e09060; border-color: #5a3020; }
#done-overlay.juice-burned .hint { color: #c09070; }

#done-overlay .done-burst {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255,220,150,0.5), transparent 55%);
  opacity: 0; z-index: 1;
}
#done-overlay .done-burst.pop { animation: juicePop 0.75s ease-out; }
#done-overlay .done-confetti {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0;
  background:
    radial-gradient(circle at 20% 30%, #ffd76a 0 4px, transparent 5px),
    radial-gradient(circle at 75% 25%, #7ecf8a 0 5px, transparent 6px),
    radial-gradient(circle at 30% 70%, #ff8a6a 0 4px, transparent 5px),
    radial-gradient(circle at 80% 65%, #e8a84c 0 5px, transparent 6px),
    radial-gradient(circle at 50% 20%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 55% 80%, #e8a84c 0 4px, transparent 5px);
}
@keyframes juicePop {
  0% { opacity: 0; transform: scale(0.75); }
  35% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.2); }
}
@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(-20px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(40px); }
}

@media (max-width: 380px) {
  .hud-stats { font-size: 0.74rem; gap: 6px; }
  .logo-text { font-size: 0.92rem; }
  .wood-sign { font-size: 0.74rem; padding: 6px 10px; }
}
@media (max-height: 700px) {
  .scene.has-photo { width: min(100%, calc((100svh - 8rem) * 0.72)); }
}

/* ========================================================================== */
/* v80 — evergreen shared kitchen                                             */
/* One room, one 4:5 camera, one visual system on every route and screen.     */
/* ========================================================================== */

:root {
  --cream: #f7f2e8;
  --cream-2: #eee8db;
  --cream-3: #ded8ca;
  --paper: #faf7ef;
  --wood: #725b43;
  --wood-mid: #95785a;
  --wood-dark: #3c352d;
  --wood-deep: #242521;
  --ink: #282b27;
  --muted: #756f64;
  --terra: #cf6f50;
  --terra-deep: #a94e39;
  --gold: #d5a24c;
  --gold-deep: #aa792e;
  --leaf: #587365;
  --leaf-deep: #334b42;
  --cobalt: #315f79;
  --shadow: rgba(28, 34, 30, 0.2);
  --radius: 18px;
  --radius-sm: 12px;
  --type: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}

html { background: #dfe5dc; }

body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.72), transparent 22rem),
    radial-gradient(circle at 84% 82%, rgba(92,120,104,.16), transparent 24rem),
    linear-gradient(145deg, #eef0e8, #d8e0d7 46%, #e7dfd2);
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

#main-view {
  width: min(100%, 620px);
  max-width: 620px;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  gap: 10px;
}

body[data-page="home"] #main-view {
  height: 100svh;
  max-height: 100svh;
}

body[data-page="cook"] #main-view,
body[data-page="shop"] #main-view,
body[data-page="fridge"] #main-view {
  max-width: 620px;
}

.topbar.wood-plaque {
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 5px;
  min-height: 58px;
  padding: 8px 12px 7px;
  color: var(--ink);
  background: rgba(250, 247, 239, .91);
  border: 1px solid rgba(42, 55, 48, .18);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(42, 55, 48, .10), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(16px) saturate(1.15);
}

.topbar .logo {
  gap: 8px;
  color: var(--ink);
  font-size: .98rem;
  text-shadow: none;
  letter-spacing: .04em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px 11px 13px 9px;
  color: #fffdf8;
  background: var(--leaf-deep);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 4px 10px rgba(37,58,50,.18);
  font-size: .92rem;
  font-weight: 900;
  filter: none;
  transform: rotate(-2deg);
}

.hud-stats {
  gap: 8px;
  font-size: .72rem;
  font-weight: 650;
}

.ticket, .clock, .me-tag {
  color: var(--muted);
  text-shadow: none;
}

.ticket {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fffdf8;
  background: var(--cobalt);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.16);
}

.ticket b { color: #fff; }
.me-tag { max-width: 5.8em; }
.clock { opacity: .72; }

.daily-info {
  padding-top: 4px;
  color: var(--muted);
  border-top: 1px solid rgba(42,55,48,.09);
  font-size: .68rem;
  letter-spacing: .01em;
}

.page-home {
  align-items: stretch;
  justify-content: center;
}

.stage {
  container-type: normal;
  height: 100%;
  place-items: start center;
}

.scene,
.scene.has-photo {
  width: min(100%, 576px, calc((100svh - 6.5rem) * .8));
  aspect-ratio: 4 / 5;
  max-height: 100%;
  border: 1px solid rgba(28,35,31,.32);
  border-radius: 24px;
  background-size: cover;
  background-position: center center;
  box-shadow: 0 20px 50px rgba(34,43,38,.20), 0 3px 0 rgba(255,255,255,.65) inset;
}


.scene-vignette {
  background:
    linear-gradient(180deg, rgba(22,35,29,.04), transparent 22%, transparent 72%, rgba(24,33,29,.13)),
    radial-gradient(ellipse at 50% 48%, transparent 56%, rgba(18,28,24,.10));
}

.scene.has-photo .idle-stove { left: 31%; top: 31%; width: 39%; height: 33%; }
.scene.has-photo .idle-zzz { display: none; }
.idle-flame { left: 48%; top: 50%; }
.idle-steam.a { left: 45%; top: 22%; }
.idle-steam.b { left: 52%; top: 20%; }

.spot {
  border-radius: 28px;
  outline: 1px solid transparent;
  transition: background .18s ease, outline-color .18s ease, transform .18s ease;
}

.spot:hover,
.spot:focus-visible {
  filter: none;
  background: rgba(250,247,239,.10);
  outline-color: rgba(255,255,255,.7);
  transform: translateY(-2px);
}

.scene.has-photo .spot-shop {
  left: 0;
  top: 38%;
  width: 31%;
  height: 40%;
}

.scene.has-photo .spot-stove {
  left: 31%;
  top: 31%;
  width: 39%;
  height: 31%;
}

.scene.has-photo .spot-fridge {
  left: 72%;
  top: 10%;
  width: 27%;
  height: 59%;
}

.wood-sign,
.wood-sign-hot,
.wood-sign-cool {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 74px;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 999px;
  color: #fff;
  background: rgba(31,43,37,.78);
  box-shadow: 0 7px 18px rgba(18,24,21,.22), inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(10px) saturate(1.15);
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .04em;
  transform: translateX(-50%);
}

.wood-sign small {
  color: rgba(255,255,255,.66);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.wood-sign::before {
  top: -12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f8df96;
  border: 2px solid rgba(37,52,45,.66);
  box-shadow: 0 0 0 4px rgba(248,223,150,.18);
}
.wood-sign::after { display: none; }
.scene.has-photo .spot-shop .wood-sign { left: 51%; bottom: 4%; }
.scene.has-photo .spot-stove .wood-sign { left: 50%; bottom: 3%; }
.scene.has-photo .spot-fridge .wood-sign { left: 47%; bottom: 5%; }
.scene.has-photo .spot-table .wood-sign { left: 48%; bottom: 17%; }
.wood-sign-table { background: rgba(137,91,56,.86); }

/* Login uses the same permanent kitchen instead of a separate themed world. */
#login-view {
  background: #dce3da;
}
#login-view::before {
  inset: -24px;
  background: url(img/kitchen_room_stylized.png?v=87) center / cover;
  filter: blur(12px) brightness(.72) saturate(.86);
  transform: scale(1.08);
}
.login-sky {
  background: linear-gradient(180deg, rgba(237,242,233,.25), rgba(34,48,41,.50));
}
.login-orb, .login-spark { display: none; }
.wood-card, .login-card {
  max-width: 360px;
  gap: 13px;
  padding: 30px 24px 24px;
  color: var(--ink);
  background: rgba(250,247,239,.94);
  border: 1px solid rgba(42,55,48,.24);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(20,29,25,.30), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
}
.login-card h1 { color: var(--ink); }
.login-sub { color: var(--muted); }
.login-door-top { display: none; }
.login-logo { width: 66px; height: 66px; }
.logo-pot {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px 18px 22px 16px;
  color: #fff;
  background: var(--leaf-deep);
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(51,75,66,.25), inset 0 -3px 0 rgba(0,0,0,.14);
  transform: rotate(-3deg);
}
.logo-steam { display: none; }

input, select {
  border: 1px solid rgba(42,55,48,.28);
  border-radius: 11px;
  background: rgba(255,255,255,.80);
  box-shadow: inset 0 1px 2px rgba(36,43,39,.06);
}
input:focus, select:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(88,115,101,.18);
}

.btn {
  border: 1px solid rgba(35,45,39,.38);
  border-radius: 12px;
  color: var(--ink);
  background: #f3eee3;
  box-shadow: 0 3px 0 rgba(35,45,39,.28);
  letter-spacing: .02em;
}
.btn:hover { box-shadow: 0 4px 0 rgba(35,45,39,.26); }
.btn.primary, .btn.stamp.primary {
  color: #fff;
  background: linear-gradient(180deg, #638371, #405e51);
  border-color: #2f493e;
  text-shadow: none;
}
.btn.wood-btn {
  color: #fff;
  background: linear-gradient(180deg, #8a7158, #68523f);
  border-color: #4c3c30;
  box-shadow: 0 3px 0 #47382c;
}

/* Every interaction route keeps the 4:5 cabinet instead of changing device. */
.page-cook,
.page-sheet {
  width: min(100%, 576px, calc((100svh - 6.5rem) * .8));
  aspect-ratio: 4 / 5;
  min-height: 0;
  max-height: calc(100svh - 6.5rem);
  margin: 0 auto;
  border: 1px solid rgba(28,35,31,.32);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(34,43,38,.20), 0 3px 0 rgba(255,255,255,.55) inset;
}

.page-sheet {
  position: relative;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(rgba(247,242,232,.93), rgba(247,242,232,.96)),
    url(img/kitchen_room_stylized.png?v=87) center / cover;
}

.page-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 0 0 10px;
  background: linear-gradient(#f7f2e8 75%, transparent);
}
.wood-title { color: var(--ink); text-shadow: none; }
.back.wood-tag {
  color: var(--leaf-deep);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(42,55,48,.22);
  box-shadow: 0 2px 0 rgba(42,55,48,.14);
}

.tab,
.method-tab {
  border-color: rgba(42,55,48,.32) !important;
  background: rgba(250,247,239,.86) !important;
  color: var(--ink) !important;
}
.tab.on,
.method-tab.on {
  color: #fff !important;
  background: var(--leaf-deep) !important;
}

.card, .item-card, .dish-card, .gift-item, .ingredient-chip {
  border-color: rgba(42,55,48,.20);
  background: rgba(255,255,255,.74);
  box-shadow: 0 5px 16px rgba(38,48,42,.08);
}

.tabs, .hanging-tags {
  gap: 7px;
  padding: 2px 1px 10px;
}
.tab {
  padding: 7px 12px;
  border-width: 1px;
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(42,55,48,.18);
  letter-spacing: .01em;
}
.tab::before { display: none; }

.grid, .crate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.item-card {
  gap: 5px;
  padding: 9px;
  border: 1px solid rgba(42,55,48,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 5px 16px rgba(38,48,42,.08);
}
.item-card::before,
.item-card::after { display: none; }
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(38,48,42,.12);
}
.item-pic {
  min-height: 78px;
  margin: 0;
  padding: 7px 4px;
  border: 1px solid rgba(42,55,48,.11);
  border-radius: 11px;
  background: rgba(245,241,231,.78);
}
.item-card .food-icon { width: 64px; height: 64px; }
.item-card .name {
  color: var(--ink);
  font-size: .88rem;
  letter-spacing: .01em;
}
.item-card .sub {
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  font-size: .7rem;
  letter-spacing: .01em;
}
.item-card .buy {
  margin-top: 2px;
  min-height: 36px;
  border-radius: 10px;
  color: #fff;
  background: var(--leaf-deep);
  border-color: #2b4138;
  box-shadow: 0 3px 0 #24352e;
  text-shadow: none;
  letter-spacing: .04em;
  font-size: .78rem;
}
.item-card .stepper { gap: 8px; }
.stepper .btn.small,
.item-card .stepper .btn.small {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 9px;
  border-width: 1px;
  color: var(--leaf-deep);
  background: #eef1e9;
  box-shadow: 0 2px 0 rgba(42,55,48,.18);
}

.page-pantry .pantry-shelf {
  min-height: 240px;
  padding: 12px;
  border: 1px solid rgba(42,55,48,.18);
  border-radius: 15px;
  background: rgba(238,241,234,.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.page-pantry .pantry-shelf::before { display: none; }
.ingredient-chip, .ing-chip {
  border-width: 1px;
  border-radius: 10px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 3px 10px rgba(38,48,42,.07);
}
.dish-card {
  border-width: 1px;
  background: rgba(255,255,255,.80);
  box-shadow: 0 5px 16px rgba(38,48,42,.08);
}
.empty {
  color: var(--muted);
  background: rgba(255,255,255,.52);
  border: 1px dashed rgba(42,55,48,.24);
}

.page-cook {
  flex: 0 1 auto;
  background: #28322c;
}
.cook-scene {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.78) brightness(.72) contrast(1.02);
}
.cook-veil {
  background:
    radial-gradient(ellipse at 50% 56%, transparent 12%, rgba(19,27,23,.18) 54%, rgba(18,24,21,.44)),
    linear-gradient(180deg, rgba(20,28,24,.28), transparent 18%, transparent 62%, rgba(18,25,22,.64));
}

.cook-chrome { padding: 10px 10px 0; }
.cook-back,
.recipe-book-btn {
  color: #fff !important;
  background: rgba(28,39,34,.76) !important;
  border: 1px solid rgba(255,255,255,.26) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.16) !important;
  backdrop-filter: blur(10px);
}
.method-tabs.method-icons { gap: 5px; }
.method-tab {
  width: 38px;
  min-width: 38px;
  height: 40px;
  border-radius: 11px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.14) !important;
  backdrop-filter: blur(10px);
}

.cook-stage {
  justify-content: flex-end;
  gap: 5px;
  padding: 0 12px 8px;
}
.stove-stage {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0;
  align-items: flex-end;
}
.page-cook .vessel {
  width: min(196px, 50vw);
  height: min(196px, 50vw);
  filter: drop-shadow(0 13px 14px rgba(0,0,0,.34));
}
.page-cook .vessel[data-vessel="oven"] {
  width: min(218px, 55vw);
  height: min(218px, 55vw);
}
.page-cook .vessel[data-vessel="wok"] {
  width: min(210px, 54vw);
  height: min(210px, 54vw);
}
.page-cook .vessel[data-vessel="bowl"] .in-pot { inset: 28% 22% 37%; }
.page-cook .vessel[data-vessel="pot"] .in-pot { inset: 30% 22% 39%; }
.page-cook .vessel[data-vessel="wok"] .in-pot { inset: 40% 25% 31%; }
.page-cook .vessel[data-vessel="steamer"] .in-pot { inset: 31% 25% 43%; }
.page-cook .vessel[data-vessel="oven"] .in-pot { inset: 42% 27% 29%; }
.page-cook .vessel.ingredient-landed { animation: vesselLand .28s ease-out; }
.page-cook .vessel.is-stirring { animation: vesselStir .32s ease-in-out infinite alternate; }
.page-cook .vessel.toss-left { animation: vesselTossLeft .24s ease-out; }
.page-cook .vessel.toss-right { animation: vesselTossRight .24s ease-out; }
.page-cook .vessel.mix-clockwise { animation: vesselMixClockwise .26s ease-out; }
.page-cook .vessel.mix-counter { animation: vesselMixCounter .26s ease-out; }
.page-cook .vessel.lid-closed { filter: drop-shadow(0 0 12px rgba(215,239,225,.34)) drop-shadow(0 13px 14px rgba(0,0,0,.34)); }
.page-cook .vessel.is-heating[data-heat-zone="perfect"] {
  filter: drop-shadow(0 0 16px rgba(255,208,91,.56)) drop-shadow(0 13px 14px rgba(0,0,0,.34));
}
@keyframes vesselLand {
  0% { transform: scale(1); }
  48% { transform: scale(1.055) translateY(-3px); }
  100% { transform: scale(1); }
}
@keyframes vesselStir {
  from { transform: rotate(-1.2deg) translateX(-2px); }
  to { transform: rotate(1.2deg) translateX(2px); }
}
@keyframes vesselTossLeft {
  45% { transform: rotate(-7deg) translate(-9px, -8px) scale(1.02); }
}
@keyframes vesselTossRight {
  45% { transform: rotate(7deg) translate(9px, -8px) scale(1.02); }
}
@keyframes vesselMixClockwise {
  55% { transform: rotate(5deg) scale(1.025); }
}
@keyframes vesselMixCounter {
  55% { transform: rotate(-5deg) scale(1.025); }
}
.chalk-hint {
  color: #fffdf7;
  background: rgba(25,36,31,.68);
  border-color: rgba(255,255,255,.20);
  backdrop-filter: blur(10px);
}
.cook-tray {
  background: linear-gradient(180deg, rgba(24,33,29,.08), rgba(24,33,29,.76) 22%, rgba(24,33,29,.90));
}
.ing-tray .ing-tile {
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 11px;
  background: rgba(250,247,239,.92);
  box-shadow: 0 3px 10px rgba(0,0,0,.14);
}
.tray-clear { backdrop-filter: blur(8px); }

/* Prep counter: a real decision layer between market and stove. */
.scene.has-photo .spot-stove {
  left: 31%; top: 27%; width: 39%; height: 23%;
}
.scene.has-photo .spot-stove .wood-sign { left: 50%; bottom: 1%; }
.scene.has-photo .spot-prep {
  left: 29%; top: 50%; width: 43%; height: 29%;
}
.scene.has-photo .spot-prep .wood-sign { left: 50%; bottom: 42%; }
.wood-sign-prep { background: rgba(74,92,70,.86); }

.page-prep { padding-bottom: 0; }
.prep-intro {
  margin: -2px 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(42,55,48,.13);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  font-size: .74rem;
  line-height: 1.55;
}
.prep-section { margin-bottom: 12px; }
.prep-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 1px 7px;
}
.prep-section-head h2 {
  margin: 0; color: var(--ink); font-size: .88rem; letter-spacing: .04em;
}
.prep-section-head a,
.text-btn {
  padding: 0; border: 0; color: var(--leaf-deep); background: transparent;
  font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer;
}
.prep-stock {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px;
}
.prep-stock > .empty { grid-column: 1 / -1; }
.prep-stock-card {
  min-width: 0; min-height: 64px; padding: 7px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(42,55,48,.17); border-radius: 12px;
  color: var(--ink); background: rgba(255,255,255,.68);
  box-shadow: 0 3px 10px rgba(38,48,42,.06); cursor: pointer; text-align: left;
}
.prep-stock-card.selected {
  border-color: var(--leaf); background: #eef3eb;
  box-shadow: 0 0 0 2px rgba(88,115,101,.13);
}
.prep-stock-pic,
.prep-card-pic {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 11px; background: #f5efdf;
}
.prep-stock-pic .food-icon,
.prep-card-pic .food-icon { width: 46px; height: 46px; margin: 0; }
.prep-stock-card > span:last-child { min-width: 0; display: grid; gap: 3px; }
.prep-stock-card b { font-size: .78rem; }
.prep-stock-card small { color: var(--muted); font-size: .62rem; white-space: nowrap; }

.prep-workbench {
  padding: 10px;
  border: 1px solid rgba(42,55,48,.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,.72), transparent 42%),
    rgba(224,230,217,.78);
  box-shadow: inset 0 1px rgba(255,255,255,.5), 0 5px 18px rgba(38,48,42,.07);
}
.prep-workbench-body { min-height: 142px; }
.prep-workbench-empty {
  min-height: 130px;
  display: grid; place-items: center; align-content: center; gap: 3px;
  color: var(--muted); text-align: center;
  border: 1px dashed rgba(42,55,48,.18); border-radius: 13px;
  background: rgba(255,255,255,.45);
}
.prep-workbench-empty strong { color: var(--leaf-deep); font-size: .76rem; }
.prep-workbench-empty small { font-size: .62rem; }
.prep-empty-board {
  width: 66px; height: 38px; margin-bottom: 2px;
  background: url('img/prep-tools/cutting_board.png?v=95') center / contain no-repeat;
  opacity: .58;
}
.prep-workbench-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 7px;
}
.prep-workbench-top > div:first-child { display: grid; gap: 2px; }
.prep-workbench-top strong { font-size: .82rem; color: var(--ink); }
.prep-workbench-top small { color: var(--muted); font-size: .61rem; }
.prep-work-qty { display: flex; align-items: center; gap: 6px; }
.prep-work-qty button {
  width: 28px; height: 28px; padding: 0;
  border: 1px solid rgba(42,55,48,.2); border-radius: 8px;
  color: var(--leaf-deep); background: rgba(255,255,255,.7); font-weight: 900;
}
.prep-work-qty button:disabled { opacity: .35; }
.prep-work-qty b { min-width: 15px; text-align: center; font-size: .75rem; }
.prep-work-options {
  display: flex; justify-content: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 7px;
}
.prep-work-options button {
  min-height: 30px; padding: 3px 10px 3px 5px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(42,55,48,.2); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.72);
  font: inherit; font-size: .66rem; font-weight: 800; cursor: pointer;
}
.prep-work-options button.on { color: #fff; border-color: var(--leaf-deep); background: var(--leaf-deep); }
.prep-work-options .food-icon { width: 24px; height: 24px; margin: 0; pointer-events: none; }
.prep-action-stage {
  position: relative; isolation: isolate;
  width: min(100%, 330px); height: 210px; margin: 0 auto;
  overflow: hidden; touch-action: none; user-select: none; cursor: grab;
  border: 1px solid rgba(42,55,48,.16); border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(91,72,49,.13), transparent 43%),
    linear-gradient(180deg, rgba(255,253,245,.86), rgba(236,229,211,.91));
  box-shadow: inset 0 2px rgba(255,255,255,.62), inset 0 -10px 24px rgba(74,56,36,.06);
}
.prep-action-stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.prep-action-stage:active { cursor: grabbing; }
.prep-action-stage::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: 17px; height: 8px; z-index: -1;
  border-radius: 50%; background: rgba(46,35,25,.14); filter: blur(7px);
}
.prep-action-surface {
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: 82%; height: 82%; object-fit: contain;
  transform: translate(-50%,-42%); pointer-events: none;
}
.action-stir .prep-action-surface { width: 67%; height: 67%; transform: translate(-50%,-34%); }
.action-place .prep-action-surface { width: 68%; height: 68%; transform: translate(-50%,-32%); }
.prep-action-food {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: 54%; height: 54%; object-fit: contain;
  transform: translate(-50%,-53%); pointer-events: none;
  filter: drop-shadow(0 5px 5px rgba(57,42,27,.13));
  transition: opacity .16s ease, transform .16s ease;
}
.action-cut .prep-action-food, .action-knead .prep-action-food { width: 49%; height: 49%; }
.action-stir .prep-action-food { width: 45%; height: 45%; transform: translate(-50%,-42%); }
.prep-action-tool {
  position: absolute; z-index: 4; right: 4%; top: 8%;
  width: 38%; height: 38%; object-fit: contain; pointer-events: none;
  transform: rotate(-18deg); transform-origin: 75% 75%;
  filter: drop-shadow(0 4px 4px rgba(50,35,22,.18));
}
.action-stir .prep-action-tool { right: 17%; top: 5%; width: 34%; transform: rotate(-25deg); }
.action-tap .prep-action-tool { right: 8%; top: 5%; width: 32%; transform: rotate(-15deg); }
.action-knead .prep-action-tool { right: 11%; top: 4%; width: 40%; transform: rotate(-8deg); }
.action-place .prep-action-tool { display: none; }
.prep-gesture-mark {
  position: absolute; z-index: 5; left: 50%; top: 50%; width: 116px; height: 54px;
  transform: translate(-50%,-50%); pointer-events: none; opacity: .5;
}
.action-cut .prep-gesture-mark { border-top: 2px dashed rgba(54,83,68,.62); }
.action-cut .prep-gesture-mark::after { content: '↔'; position: absolute; left: 50%; top: -20px; transform: translateX(-50%); color: var(--leaf-deep); font-size: 1rem; }
.action-tap .prep-gesture-mark { width: 48px; height: 48px; border: 2px dashed rgba(54,83,68,.55); border-radius: 50%; }
.action-tap .prep-gesture-mark::after { content: '↓'; display: block; text-align: center; color: var(--leaf-deep); font-weight: 900; }
.action-stir .prep-gesture-mark { width: 88px; height: 66px; border: 2px dashed rgba(54,83,68,.55); border-radius: 50%; }
.action-stir .prep-gesture-mark::after { content: '↻'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--leaf-deep); font-size: 1.2rem; }
.action-knead .prep-gesture-mark::after,
.action-place .prep-gesture-mark::after { content: '↕'; display: block; text-align: center; color: var(--leaf-deep); font-size: 1.1rem; }
.action-place .prep-gesture-mark::after { content: '↓'; }
.prep-done-stamp {
  display: none; position: absolute; z-index: 7; right: 12px; bottom: 12px;
  width: 48px; height: 48px; place-items: center;
  border: 3px solid #bf654d; border-radius: 50%; color: #a94f3c;
  font-size: .72rem; font-weight: 900; transform: rotate(-9deg);
  background: rgba(255,248,234,.82);
}
.prep-action-stage.done .prep-done-stamp { display: grid; animation: prepStamp .3s ease-out; }
.prep-action-stage.done .prep-gesture-mark,
.prep-action-stage.done .prep-action-tool { display: none; }
.prep-action-copy { display: grid; justify-items: center; gap: 2px; margin-top: 7px; text-align: center; }
.prep-action-copy strong { color: var(--leaf-deep); font-size: .76rem; }
.prep-action-copy span { color: var(--muted); font-size: .61rem; }
.prep-action-progress { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.prep-action-progress i { width: 27px; height: 6px; border-radius: 999px; background: rgba(54,83,68,.14); transition: background .15s, transform .15s; }
.prep-action-progress i.done { background: #d7a94e; transform: translateY(-1px); }
.prep-action-stage.act-cut .prep-action-tool { animation: prepKnife .2s ease-out; }
.prep-action-stage.act-tap .prep-action-tool { animation: prepTap .2s ease-out; }
.prep-action-stage.act-stir .prep-action-tool { animation: prepStir .28s linear; }
.prep-action-stage.act-knead .prep-action-tool { animation: prepKnead .24s ease-out; }
.prep-action-stage.act-place .prep-action-food { animation: prepPlace .25s ease-in; }
@keyframes prepKnife { 45% { transform: translate(-50px,24px) rotate(-30deg); } }
@keyframes prepTap { 45% { transform: translate(-15px,34px) rotate(-34deg); } }
@keyframes prepStir { to { transform: rotate(335deg); } }
@keyframes prepKnead { 50% { transform: translate(-18px,28px) rotate(4deg); } }
@keyframes prepPlace { to { transform: translate(-50%,12%) scale(.78); opacity: .72; } }
@keyframes prepStamp { from { opacity: 0; transform: rotate(-18deg) scale(1.5); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }

.prep-board {
  padding: 10px; border: 1px solid rgba(42,55,48,.16); border-radius: 15px;
  background: rgba(231,235,225,.72);
}
.prep-plan { display: grid; gap: 8px; }
.prep-card {
  padding: 8px; border: 1px solid rgba(42,55,48,.15); border-radius: 12px;
  background: rgba(255,255,255,.82); box-shadow: 0 3px 10px rgba(38,48,42,.06);
}
.prep-card-main { display: flex; align-items: center; gap: 8px; }
.prep-card-pic { width: 42px; height: 42px; flex-basis: 42px; }
.prep-card-pic .food-icon { width: 42px; height: 42px; }
.prep-card-name { min-width: 62px; display: grid; gap: 2px; }
.prep-card-name b { font-size: .78rem; }
.prep-card-name small { color: var(--muted); font-size: .62rem; }
.prep-qty { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.prep-qty button,
.prep-remove {
  width: 27px; height: 27px; padding: 0;
  border: 1px solid rgba(42,55,48,.20); border-radius: 8px;
  color: var(--leaf-deep); background: #f2f4ee; font-weight: 900; cursor: pointer;
}
.prep-qty button:disabled { opacity: .35; cursor: not-allowed; }
.prep-qty b { min-width: 16px; text-align: center; font-size: .75rem; }
.prep-remove { color: #8a5c4b; background: #f5ece6; }
.prep-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 7px 0 0 50px; }
.prep-options button {
  min-height: 28px; padding: 4px 8px 4px 4px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(42,55,48,.20); border-radius: 999px;
  color: var(--muted); background: #f5f2e9; font-size: .67rem; font-weight: 800; cursor: pointer;
}
.prep-options button .food-icon { width: 22px; height: 22px; margin: 0; pointer-events: none; }
.prep-options button.on {
  color: #fff; border-color: var(--leaf-deep); background: var(--leaf-deep);
}
.prep-ready-pill {
  padding: 4px 8px; border-radius: 999px;
  color: var(--leaf-deep); background: #e8f0e7;
  font-size: .63rem; font-weight: 800;
}
.prep-options .prep-redo {
  min-height: 26px; padding: 3px 9px;
  color: var(--leaf-deep); background: transparent;
}
.prep-footer {
  position: sticky; bottom: -1px; z-index: 3;
  margin: 6px -14px 0; padding: 10px 14px calc(11px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid rgba(42,55,48,.12);
  background: rgba(247,242,232,.94); backdrop-filter: blur(12px);
}
.prep-footer p { margin: 0; color: var(--muted); font-size: .7rem; }
.prep-footer .btn { min-width: 126px; min-height: 39px; }

.ing-tray .ing-tile .prep {
  max-width: 100%; color: var(--leaf-deep); font-size: .58rem; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* The shared table is a permanent co-living loop, independent from events. */
.page-table {
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(224,184,120,.18), transparent 32%),
    rgba(247,242,232,.96);
}
.table-intro {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(42,55,48,.13);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.58);
  font-size: .74rem;
  line-height: 1.55;
}
.table-reaction {
  margin: 0 0 12px;
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(113,83,49,.22);
  border-radius: 14px;
  color: #473a2f;
  background: linear-gradient(135deg, #fff7df, #f4ead4);
  box-shadow: 0 7px 18px rgba(74,57,39,.08);
}
.table-reaction strong { font-size: .8rem; line-height: 1.5; }
.table-reaction span { color: #786655; font-size: .66rem; }
.table-section {
  margin-bottom: 13px;
  padding: 11px;
  border: 1px solid rgba(42,55,48,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
}
.table-section-head {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.table-section-head h2 { margin: 0 0 2px; font-size: .9rem; color: var(--ink); }
.table-section-head p { margin: 0; color: var(--muted); font-size: .64rem; line-height: 1.45; }
.table-section-head a { color: var(--leaf-deep); font-size: .7rem; font-weight: 800; }
.table-warm-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgba(126,68,40,.2); border-radius: 50%;
  color: #a95737; background: #fae5ce;
  font-family: serif; font-size: .8rem; font-weight: 900;
}
.table-dishes { display: grid; gap: 9px; }
.table-dish-card {
  min-width: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: 104px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(79,65,47,.16);
  border-radius: 14px;
  background: rgba(255,252,245,.92);
  box-shadow: 0 5px 14px rgba(61,48,35,.07);
}
.table-dish-visual {
  width: 104px; height: 104px;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 55%, #eee5d5 56% 61%, transparent 62%);
}
.table-dish-visual .dish-svg { width: 104px; }
.table-dish-visual { position: relative; }
.table-dish-visual.is-being-eaten .dish-svg { animation: dishTaste .36s ease both; }
.table-dish-visual.is-being-eaten::after {
  content: '✦';
  position: absolute;
  right: 12px;
  top: 9px;
  color: #d49b45;
  font-size: 1.15rem;
  animation: tasteSpark .36s ease both;
}
@keyframes dishTaste {
  0% { transform: scale(1); }
  48% { transform: scale(.88) rotate(-2deg); }
  100% { transform: scale(1); }
}
@keyframes tasteSpark {
  0% { opacity: 0; transform: translateY(8px) scale(.5); }
  55% { opacity: 1; transform: translateY(0) scale(1.15); }
  100% { opacity: 0; transform: translateY(-7px) scale(.85); }
}
.table-dish-info { min-width: 0; display: grid; gap: 5px; align-content: center; }
.table-dish-info h3 { margin: 0; font-size: .86rem; line-height: 1.25; color: var(--ink); }
.table-maker { margin: 0; color: var(--muted); font-size: .64rem; line-height: 1.35; }
.table-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.table-tags span {
  padding: 3px 6px; border-radius: 999px;
  color: var(--leaf-deep); background: #e9efe8;
  font-size: .58rem; font-weight: 800;
}
.table-tags span.dark { color: #78423b; background: #f2dfdb; }
.table-eat-btn { min-height: 34px; justify-self: start; margin-top: 2px; padding-inline: 16px; }
.table-empty { padding-block: 24px; }

.table-own-dishes { display: grid; gap: 7px; }
.table-own-row {
  padding: 7px;
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(42,55,48,.12);
  border-radius: 12px;
  background: rgba(247,245,238,.9);
}
.table-own-visual { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; }
.table-own-visual .dish-svg { width: 62px; }
.table-own-copy { min-width: 0; display: grid; gap: 3px; }
.table-own-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.table-own-copy span { color: var(--muted); font-size: .6rem; }
.table-own-ops { display: grid; gap: 4px; }
.table-own-ops .btn { min-width: 68px; padding-inline: 8px; }

.meal-log { display: grid; gap: 7px; }
.meal-log-item {
  padding: 9px 10px;
  border-left: 3px solid rgba(88,115,101,.45);
  border-radius: 4px 10px 10px 4px;
  background: rgba(239,242,233,.72);
}
.meal-log-head { display: flex; flex-wrap: wrap; gap: 4px 7px; align-items: baseline; }
.meal-log-head strong { color: var(--leaf-deep); font-size: .68rem; }
.meal-log-head span { color: var(--muted); font-size: .62rem; }
.meal-log-item p { margin: 5px 0 0; color: #4d514d; font-size: .67rem; line-height: 1.5; }

.heat-wrap.skill-heat, .heat-wrap.fire-gauge {
  background: rgba(24,34,29,.84);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.wood-panel,
.done-card,
.recipe-reveal {
  background: rgba(250,247,239,.97);
  border: 1px solid rgba(42,55,48,.28);
  box-shadow: 0 18px 60px rgba(18,27,23,.28);
}

#toast {
  color: #fff;
  background: rgba(31,44,38,.94);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 36px rgba(20,29,25,.24);
}

@media (min-width: 760px) {
  #main-view { padding-top: 18px; padding-bottom: 18px; }
  .scene,
  .scene.has-photo,
  .page-cook,
  .page-sheet { max-height: calc(100svh - 7.2rem); }
}

@media (max-width: 420px) {
  #main-view { padding-left: 8px; padding-right: 8px; gap: 8px; }
  .topbar.wood-plaque { padding: 7px 9px 6px; border-radius: 13px; }
  .logo-text { font-size: .88rem; }
  .logo-mark { width: 29px; height: 29px; }
  .hud-stats { gap: 6px; font-size: .67rem; }
  .clock { display: none; }
  .wood-sign { min-width: 64px; padding: 6px 9px; font-size: .72rem; }
  .wood-sign small { display: none; }
  .scene,
  .scene.has-photo,
  .page-cook,
  .page-sheet { border-radius: 18px; }
  .page-cook .vessel { width: min(176px, 48vw); height: min(176px, 48vw); }
  .table-dish-card { grid-template-columns: 88px minmax(0,1fr); }
  .table-dish-visual { width: 88px; height: 88px; }
  .table-dish-visual .dish-svg { width: 88px; }
  .table-own-row { grid-template-columns: 48px minmax(0,1fr); }
  .table-own-visual { width: 48px; height: 48px; }
  .table-own-visual .dish-svg { width: 52px; }
  .table-own-ops { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

@media (max-height: 700px) {
  .scene,
  .scene.has-photo,
  .page-cook,
  .page-sheet { width: min(100%, calc((100svh - 5.8rem) * .8)); }
  .daily-info { display: none; }
  .page-cook .vessel { width: min(158px, 44vw); height: min(158px, 44vw); }
  .cook-stage { gap: 3px; }
}

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

/* —— Shared kitchen: public room, private fridges —— */
.shared-kitchen-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff8ea;
  background: rgba(38,70,58,.56);
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.shared-kitchen-btn.has-company::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #f6d888;
  box-shadow: 0 0 0 3px rgba(246,216,136,.15);
}
.cook-share-toggle {
  position: absolute;
  right: 58px;
  top: 12px;
  z-index: 3;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(28,39,34,.76);
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
  backdrop-filter: blur(10px);
  font: 800 .72rem/1 inherit;
  cursor: pointer;
}
.cook-share-toggle.on {
  color: #20362d;
  background: #f2d98f;
  border-color: #fff2c8;
}
.cook-share-toggle:disabled { opacity: .72; cursor: default; }

.shared-kitchen-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 12px;
}
.shared-kitchen-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(25,33,29,.58);
  backdrop-filter: blur(5px);
}
.shared-kitchen-panel {
  position: relative;
  width: min(94vw, 620px);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(52,70,61,.22);
  border-radius: 24px;
  color: #29352f;
  background:
    radial-gradient(circle at 92% 4%, rgba(217,188,119,.22), transparent 28%),
    linear-gradient(180deg, #f8f6ed, #edf1e8);
  box-shadow: 0 24px 70px rgba(20,30,25,.28), inset 0 1px 0 #fff;
}
.shared-kitchen-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shared-kitchen-head h2 { margin: 2px 0 0; font-size: 1.45rem; }
.shared-kitchen-head .eyebrow { margin: 0; color: #6f796f; font-size: .7rem; letter-spacing: .08em; }
.shared-kitchen-rule {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 13px;
  color: #4c5d53;
  background: rgba(255,255,255,.68);
  font-size: .78rem;
  line-height: 1.55;
}
.shared-room-section {
  margin-top: 11px;
  padding: 12px;
  border: 1px solid rgba(55,77,65,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.54);
}
.shared-room-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.shared-room-title h3 { margin: 0; font-size: .96rem; }
.shared-room-title span { color: #7c837e; font-size: .68rem; }
.kitchen-switch-list { display: flex; flex-wrap: wrap; gap: 7px; }
.kitchen-switch-chip {
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid rgba(55,77,65,.18);
  border-radius: 999px;
  color: #40584d;
  background: #fffdf7;
  font: 800 .74rem/1 inherit;
  cursor: pointer;
}
.kitchen-switch-chip.on { color: #fff; background: #436b5a; border-color: #436b5a; }
.kitchen-invite-list, .kitchen-access-list { display: grid; gap: 7px; }
.kitchen-invite-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 11px;
  background: #f3f2e8;
  font-size: .73rem;
}
.kitchen-invite-row small { display: block; margin-top: 2px; color: #7c837e; }
.kitchen-invite-row button {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #4a735f;
  font-weight: 800;
  cursor: pointer;
}
.kitchen-invite-row button.quiet { color: #68746d; background: #e5e8e2; }
.kitchen-invite-form { margin: 9px 0; }
.kitchen-invite-form label { display: block; margin-bottom: 5px; color: #53655b; font-size: .71rem; font-weight: 800; }
.kitchen-invite-form > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.kitchen-invite-form input {
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(55,77,65,.2);
  border-radius: 10px;
  color: #33463d;
  background: #fff;
  font: inherit;
}
.kitchen-invite-form button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #446c59;
  font-weight: 800;
  cursor: pointer;
}
.shared-presence, .shared-pantry, .shared-donate-list { display: flex; flex-wrap: wrap; gap: 7px; }
.presence-chip, .pantry-chip, .donate-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(55,77,65,.16);
  border-radius: 11px;
  background: #fffdf7;
  font-size: .74rem;
}
.presence-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ba17d;
  box-shadow: 0 0 0 3px rgba(107,161,125,.15);
}
.presence-chip small, .pantry-chip small { color: #7d857f; }
.donate-chip { cursor: pointer; color: #365448; font: inherit; font-size: .72rem; }
.shared-donate-box { margin-top: 9px; }
.shared-donate-box summary { cursor: pointer; color: #50655a; font-size: .75rem; font-weight: 800; }
.shared-donate-list { margin-top: 8px; }
.shared-session-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 10px;
  border-radius: 13px;
  background: #eef3eb;
  border: 1px solid rgba(63,91,76,.16);
}
.shared-session-card + .shared-session-card { margin-top: 8px; }
.shared-session-card strong { font-size: .83rem; }
.shared-session-card p { grid-column: 1; margin: 0; color: #68736c; font-size: .7rem; line-height: 1.45; }
.shared-session-card .join-cook {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: #3f6958;
  font-weight: 800;
  cursor: pointer;
}
.shared-events { display: grid; gap: 6px; }
.shared-event { display: flex; gap: 8px; color: #657068; font-size: .72rem; line-height: 1.4; }
.shared-event b { color: #33483e; }
.shared-empty { margin: 0; color: #858c87; font-size: .74rem; }

@media (max-width: 420px) {
  .shared-kitchen-btn { padding: 2px 6px; font-size: .64rem; }
  .shared-kitchen-overlay { padding: 7px; }
  .shared-kitchen-panel { width: 100%; max-height: 94vh; padding: 14px; border-radius: 20px; }
  .cook-share-toggle { right: 54px; top: 10px; padding: 0 8px; font-size: .66rem; }
}

/* ========================================================================== */
/* v101 — home life panels                                                    */
/* 手机端：动态面板排在场景下方；桌面端：面板分列场景两侧，吃掉两边的空当。  */
/* ========================================================================== */

.home-grid {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.page-home .stage {
  flex: 0 0 auto;
  height: auto;
}

.home-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 13px 12px;
  color: var(--ink);
  background: rgba(250, 247, 239, .92);
  border: 1px solid rgba(42, 55, 48, .16);
  border-radius: 15px;
  box-shadow: 0 10px 26px rgba(42, 55, 48, .08), inset 0 1px 0 rgba(255, 255, 255, .75);
}

.home-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-panel-head h2 {
  margin: 0;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.home-panel-head a,
.home-panel-head button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cobalt);
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.home-panel-head a:hover,
.home-panel-head button:hover { text-decoration: underline; }

.home-panel-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .8rem;
}

.home-table-summary { margin: 0; color: var(--muted); font-size: .72rem; }

.home-dish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.home-dish-row:hover { background: rgba(49, 95, 121, .07); }

.home-dish-visual {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.home-dish-visual .dish-svg { width: 44px; margin: 0; }

.home-dish-copy { display: flex; flex-direction: column; min-width: 0; }
.home-dish-copy b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-dish-copy small { color: var(--muted); font-size: .68rem; }

.home-panel-cta { color: var(--cobalt); font-size: .76rem; font-weight: 700; text-decoration: none; }
.home-panel-cta:hover { text-decoration: underline; }

.home-presence { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .78rem; }
.home-presence i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ba17d;
  box-shadow: 0 0 0 3px rgba(107, 161, 125, .15);
}

.home-gift-line { margin: 0; font-size: .78rem; }

.home-event { justify-content: space-between; }
.home-event span:nth-child(2) { flex: 1; }
.home-event small { color: #9aa19b; white-space: nowrap; }

@media (min-width: 1024px) {
  body[data-page="home"] #main-view {
    width: min(100%, 1240px);
    max-width: 1240px;
  }

  .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "table stage life";
    align-items: start;
    gap: 18px;
  }

  .page-home .stage { grid-area: stage; }
  .home-panel-table { grid-area: table; }
  .home-panel-life { grid-area: life; }

  body[data-page="home"] .scene,
  body[data-page="home"] .scene.has-photo {
    width: min(560px, calc((100svh - 9rem) * .8));
  }

  .home-panel { margin-top: 6px; }
}

/* 接到 AI 客户端（串门面板） */
.mcp-access-hint { margin: 0 0 8px; color: #7c837e; font-size: .74rem; line-height: 1.5; }
.mcp-access-row { display: flex; gap: 6px; }
.mcp-access-row input { flex: 1; min-width: 0; font-size: .72rem; padding: 8px 10px; border-radius: 10px; border: 1px solid #d9d2c5; background: #fbf8f2; color: #4a4038; }
.mcp-access-row button { padding: 8px 12px; border-radius: 10px; border: 1px solid #c9bfae; background: #efe6d6; color: #4a4038; font-size: .78rem; }


/* 1.9.0 visit */
.visit-banner {
  position: sticky; top: 0; z-index: 40;
  text-align: center;
  padding: 6px 12px;
  background: linear-gradient(90deg, #3d6b4f, #5a8f6a);
  color: #f4fff6;
  font-size: .85rem;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(30,60,40,.25);
}
.visit-banner b { font-weight: 700; }
body.is-visiting {
  box-shadow: inset 0 0 0 3px #3d6b4f;
}
body.is-visiting .topbar { border-bottom-color: #3d6b4f; }
.visit-perm-summary { font-size: .82rem; color: #445044; margin: 0 0 8px; }
.visit-perm-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; margin-bottom: 8px;
  background: #f3f7f2; border-radius: 12px; border: 1px solid #d5e0d4;
}
.visit-perm-card strong { font-size: .9rem; }
.visit-perm-card small { color: #6a756a; }
.visit-perm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.visit-perm-actions button {
  border: 1px solid #b7c7b5; background: #fff; border-radius: 999px;
  padding: 4px 10px; font-size: .72rem; cursor: pointer;
}
.visit-perm-actions button:hover { background: #e7f2e6; }
.kitchen-invite-form select {
  max-width: 8.5rem; border-radius: 10px; border: 1px solid #c5d2c3;
  padding: 6px 8px; background: #fff; font-size: .8rem;
}

.carry-bag-list, .carry-pack-list, .carry-others { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.carry-chip, .carry-pack-chip {
  border: 1px dashed #7a9a78; background: #f7fbf5; border-radius: 999px;
  padding: 4px 10px; font-size: .75rem; cursor: pointer;
}
.carry-chip.deposit { border-style: solid; background: #e8f3e6; }
.carry-chip.unpack { border-color: #b0a48a; background: #faf6ee; }
.carry-others { flex-direction: column; font-size: .78rem; color: #556055; }
.carry-others .carry-guest-row { padding: 4px 0; }
.prep-stock-card.carry-stock-card { border-color: #7a9a78; background: #f4faf2; }


/* 1.9.2 launch gate: community primary, local human closed, AI register secondary */
.login-local-closed {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(120, 80, 40, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}
.login-ai-details {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(120, 80, 40, 0.28);
  background: rgba(255, 255, 255, 0.35);
  padding: 0 12px 12px;
}
.login-ai-summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  user-select: none;
}
.login-ai-summary::-webkit-details-marker { display: none; }
.login-ai-summary::before {
  content: "▸ ";
  color: var(--muted);
}
.login-ai-details[open] > .login-ai-summary::before { content: "▾ "; }
.login-ai-fields { margin-top: 2px; }
.login-community-btn { width: 100%; justify-content: center; }

/* —— 1.9.3 任务 / 成就 / 上门打工 —— */
.hud-extra-btn {
  appearance: none;
  border: 1px solid rgba(120, 72, 32, .28);
  background: linear-gradient(180deg, #fff6e8, #f3dfc0);
  color: #5a3a1c;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}
.hud-extra-btn:hover { filter: brightness(1.04); }
.hud-extra-btn.has-claim {
  background: linear-gradient(180deg, #ffe8a3, #ffb347);
  box-shadow: 0 0 0 2px rgba(255, 170, 40, .35);
}

.side-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; justify-content: flex-end; align-items: stretch;
}
.side-overlay.hidden { display: none; }
.side-backdrop {
  position: absolute; inset: 0; border: 0; background: rgba(40, 24, 12, .42);
  cursor: pointer;
}
.side-panel {
  position: relative; z-index: 1;
  width: min(420px, 100%);
  max-width: 100%;
  background: linear-gradient(180deg, #fffaf0, #f6ead7);
  color: #3d2a18;
  overflow: auto;
  padding: 16px 16px 28px;
  box-shadow: -8px 0 28px rgba(40, 20, 8, .25);
  border-left: 1px solid rgba(120, 72, 32, .18);
}
.side-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  margin-bottom: 8px;
}
.side-panel-head h2 { margin: 0; font-size: 1.15rem; }
.side-panel-head .eyebrow {
  margin: 0 0 2px; font-size: .7rem; letter-spacing: .04em; opacity: .7;
}
.side-panel-lead {
  margin: 0 0 14px; font-size: .78rem; line-height: 1.45; opacity: .82;
}
.side-block {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(120, 72, 32, .12);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.side-block-title {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.side-block-title h3 { margin: 0; font-size: .92rem; }
.side-block-title span { font-size: .68rem; opacity: .65; }

.quest-list, .job-list { display: flex; flex-direction: column; gap: 8px; }
.quest-card, .job-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(120, 72, 32, .1);
}
.quest-card.locked { opacity: .55; }
.quest-card .q-body { min-width: 0; }
.quest-card .q-name { font-weight: 700; font-size: .84rem; }
.quest-card .q-desc { font-size: .72rem; opacity: .75; line-height: 1.35; margin-top: 2px; }
.quest-card .q-meta { font-size: .68rem; margin-top: 4px; color: #8a5a28; }
.quest-card button, .job-card button {
  appearance: none; border: 0; border-radius: 999px;
  padding: 6px 10px; font: inherit; font-size: .72rem; font-weight: 700;
  background: #5a3a1c; color: #fff8e8; cursor: pointer; white-space: nowrap;
}
.quest-card button:disabled, .job-card button:disabled {
  background: #cbb79a; cursor: default;
}
.quest-card .q-badge-slot { width: 48px; height: 48px; }
.badge-shelf {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
}
.badge-chip {
  width: 72px; text-align: center; font-size: .65rem; line-height: 1.25;
}
.badge-chip .badge-svg { display: block; margin: 0 auto 4px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.badge-empty { font-size: .78rem; opacity: .65; padding: 6px 0; }

.job-post-form { display: flex; flex-direction: column; gap: 8px; }
.job-post-form label { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; }
.job-post-form label.check { flex-direction: row; align-items: center; gap: 8px; }
.job-post-form input, .job-post-form select {
  font: inherit; padding: 6px 8px; border-radius: 8px;
  border: 1px solid rgba(120,72,32,.25); background: #fff;
}
.job-card { grid-template-columns: 1fr auto; }
.job-card .j-name { font-weight: 700; font-size: .84rem; }
.job-card .j-desc { font-size: .72rem; opacity: .78; margin-top: 2px; line-height: 1.35; }
.job-card .j-actions { display: flex; flex-direction: column; gap: 4px; }
.job-status {
  display: inline-block; font-size: .65rem; padding: 1px 6px; border-radius: 999px;
  background: #efe2cc; color: #6a4420; margin-left: 4px;
}
.job-status.open { background: #d8f3dc; color: #1b5e20; }
.job-status.accepted { background: #dcecff; color: #0d47a1; }
.job-status.completed { background: #eee; color: #555; }
.job-status.offered { background: #fff3cd; color: #7a5b00; }

@media (max-width: 520px) {
  .side-panel { width: 100%; }
  .hud-extra-btn { padding: 2px 6px; font-size: .64rem; }
}

/* ===== 中秋限定皮肤（mid-autumn）：小月饼徽章、节日问候；夜景底图由 app.js 按日期切换 ===== */
body.mid-autumn .logo-text::after {
  content: " 🥮";
}
body.mid-autumn .daily-info::after {
  content: " · 🌕 中秋快乐";
  color: #c99a3f;
  font-weight: 700;
}

/* 主界面菜谱入口（右上角书架） */
.spot-recipe { right: 10%; top: 6%; width: 22%; height: 16%; }
.scene.has-photo .spot-recipe { left: 74%; top: 4%; width: 22%; height: 20%; right: auto; bottom: auto; }
.wood-sign-recipe { background: rgba(146,110,66,.86); }

/* 全局菜谱面板 */
.recipe-book-tip { margin: 0 0 8px; font-size: 12px; color: #8a7a66; }
#recipe-book-sheet .sheet-panel, #guide-sheet .sheet-panel { display: flex; flex-direction: column; }
#recipe-book-sheet .sheet-head, #guide-sheet .sheet-head, #recipe-book-sheet .recipe-book-tip { flex: none; }
.recipe-book-list { flex: 1; min-height: 0; overflow: auto; }
.recipe-book-group h3 { margin: 12px 0 4px; font-size: 14px; color: #5a4632; }
.recipe-book-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.recipe-book-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: #fff8ea; border: 1.5px solid rgba(90,64,48,.18); }
.recipe-book-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recipe-book-main small { color: #9a8a72; font-size: 11px; }
.recipe-book-row + .recipe-book-row { border-top: 1px dashed rgba(120,90,50,.18); }
.recipe-book-row strong { flex: none; }
.recipe-book-row span { flex: 1; font-size: 12px; color: #7a6a55; }
.recipe-book-row em { flex: none; font-style: normal; font-size: 11px; color: #4a7a4f; }
.recipe-book-row.cookable { background: rgba(122,160,90,.14); }
.seasonal-badge { font-style: normal; }

/* 菜品描述（饭桌/冰箱卡） */
.table-dish-desc { margin: 4px 0 0; font-size: 12px; color: #7a6a55; line-height: 1.5; }
.dish-desc { margin: 4px 0 2px; font-size: 12px; color: #7a6a55; line-height: 1.5; }

/* 用餐记录筛选：三段并排，当前态高亮 */
.seg-tabs { display: inline-flex; background: rgba(120,90,50,.12); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-tabs .seg { border: none; background: none; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-family: inherit; color: #7a6a55; cursor: pointer; transition: background .15s, color .15s; }
.seg-tabs .seg:hover { color: #4a3a28; }
.seg-tabs .seg.on { background: #fffaf2; color: #4a3a28; box-shadow: 0 1px 3px rgba(63,44,32,.18); font-weight: 600; }

/* 主界面指南入口（菜谱木牌左边） */
.spot-guide { right: 32%; top: 6%; width: 20%; height: 14%; }
.scene.has-photo .spot-guide { left: 48%; top: 4%; width: 20%; height: 18%; right: auto; bottom: auto; }
.wood-sign-guide { background: rgba(91,110,146,.88); }

/* 指南面板排版 */
.guide-panel .guide-body { flex: 1; min-height: 0; overflow: auto; padding-right: 4px; }
.guide-body section { margin-bottom: 14px; }
.guide-body h3 { margin: 0 0 5px; font-size: 14px; color: #5a4632; }
.guide-body p, .guide-body li { font-size: 13px; color: #6b5d4c; line-height: 1.65; }
.guide-body ol, .guide-body ul { margin: 0; padding-left: 20px; }
.guide-body b { color: #4a3a28; }

/* ---------- 1.11 想吃 + 回声 ---------- */
.home-sub { margin: 4px 0 -2px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.home-sub:first-of-type { margin-top: 0; }
.home-echo { display: flex; flex-direction: column; gap: 2px; padding: 6px 9px; border-radius: 10px; background: rgba(42, 55, 48, .04); }
.home-echo.is-new { background: rgba(214, 150, 52, .16); box-shadow: inset 3px 0 0 #c98a2b; }
.home-echo p { margin: 0; font-size: .8rem; font-weight: 700; }
.home-echo q { font-size: .78rem; color: var(--ink); quotes: '「' '」'; }
.home-echo small { color: var(--muted); font-size: .66rem; }
.home-link-btn { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--cobalt); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.home-link-btn:hover { text-decoration: underline; }
.home-wish-mine { display: flex; flex-direction: column; gap: 4px; }
.home-wish-mine p { margin: 0; font-weight: 700; }
.home-wish-mine small, .home-wish-more { color: var(--muted); font-size: .68rem; }
.home-wish-arrived { display: block; padding: 8px 10px; border-radius: 10px; background: rgba(214, 150, 52, .18); color: var(--ink); font-weight: 800; text-decoration: none; }
.home-wish-arrived:hover { background: rgba(214, 150, 52, .28); }
.home-wish-form { display: flex; gap: 6px; }
.home-wish-form input { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border: 1px solid rgba(42, 55, 48, .22); border-radius: 10px; background: #fff; font: inherit; font-size: .8rem; }
.home-wish-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px dashed rgba(42, 55, 48, .14); }
.home-wish-copy { display: flex; flex-direction: column; min-width: 0; }
.home-wish-copy b { font-size: .8rem; overflow-wrap: anywhere; }
.home-wish-copy small { color: var(--muted); font-size: .66rem; }
.home-wish-row .btn, .home-wish-form .btn { flex: 0 0 auto; white-space: nowrap; }
.page-cook { position: relative; }
.cook-wish-banner { position: absolute; z-index: 40; top: 60px; left: 12px; right: 12px; width: auto; max-width: calc(100% - 24px); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; padding: 7px 11px; border-radius: 11px; background: rgba(250, 247, 239, .95); color: var(--ink); font-size: .76rem; font-weight: 700; box-shadow: 0 4px 12px rgba(42, 55, 48, .12); }
.cook-wish-banner button { flex: 0 0 auto; padding: 0; border: 0; background: none; color: var(--cobalt); font: inherit; font-size: .7rem; cursor: pointer; }
.badge.wish { background: rgba(214, 150, 52, .22); color: #7a4f10; }
.table-older { margin-top: 10px; }
.table-older > summary { padding: 8px 4px; color: var(--muted); font-size: .76rem; font-weight: 700; cursor: pointer; }
.table-older[open] > summary { margin-bottom: 8px; }

/* ================= 1.12 画面三处（珂珂 11.14）：画缩成顶上一条 · 状态画进画里 · 统一卡片和按钮 ================= */
/* —— 状态画进画里 —— */
.scene-state { position: absolute; z-index: 3; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; }
.scene-state img { width: 100%; height: auto; display: block; filter: drop-shadow(0 2px 3px rgba(40, 30, 20, .28)); }
.scene-state.hidden { display: none; }
.scene-board { left: 59.5%; top: 1.5%; width: 17%; transition: transform .18s ease; }
.scene-board:hover, .scene-board:focus-visible { transform: scale(1.06) rotate(-1deg); }
.scene-note { left: 78%; top: 21%; width: 12%; transform: rotate(4deg); transform-origin: 50% 0; animation: noteSway 3.2s ease-in-out infinite; }
@keyframes noteSway { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-3deg); } }
/* 灶上的热气：平时不冒，有正在做的锅才冒 */
.scene.has-photo .idle-stove { display: none !important; }
.scene.has-photo.is-cooking .idle-stove { display: block !important; }
.scene.has-photo.is-cooking .idle-flame { display: none; }
.home-chips { display: none; }
@media (prefers-reduced-motion: reduce) { .scene-note { animation: none; } }

/* —— 手机：画缩成顶上一条，「厨房里的事」提上首屏 —— */
@media (max-width: 720px) {
  .page-home .stage { height: auto; }
  .page-home .scene, .page-home .scene.has-photo {
    width: 100%; aspect-ratio: 16 / 10; max-height: none; border-radius: 18px;
    background-size: 100% auto; background-position: 50% 4%;   /* 露出原画上半截：抽油烟机、墙、灶上的锅、冰箱上门 */
  }
  .page-home .scene .spot { display: none; }
  .page-home .scene-board { left: 59.5%; top: -1%; width: 17%; }
  .page-home .scene-note { left: 78%; top: 38%; width: 12%; }
  .page-home .scene.has-photo .idle-stove { left: 33%; top: 52%; width: 34%; height: 40%; }
  .home-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
  .home-chips a, .home-chips button {
    flex: 1 1 auto; min-width: 3.6em; padding: 8px 6px; text-align: center; white-space: nowrap;
    border: 1px solid rgba(42, 55, 48, .2); border-radius: 11px; background: rgba(250, 247, 239, .95);
    color: var(--ink); font: inherit; font-size: .78rem; font-weight: 800; text-decoration: none; cursor: pointer;
    box-shadow: 0 2px 0 rgba(42, 55, 48, .12);
  }
  .home-chips a:active, .home-chips button:active { transform: translateY(1px); box-shadow: none; }
}

/* —— 统一：纸页不透明、和画同一套暖底色；次要按钮从棕木头改成浅底描边 —— */
.page-sheet { background: #f7f2e8; border-radius: 18px; }
.btn.wood-btn {
  background: #f3ecdd; color: var(--ink); text-shadow: none;
  border: 1.5px solid rgba(63, 47, 36, .34); box-shadow: 0 2px 0 rgba(63, 47, 36, .2);
}
.btn.wood-btn:hover { box-shadow: 0 3px 0 rgba(63, 47, 36, .22); }
.btn.wood-btn:active { box-shadow: 0 1px 0 rgba(63, 47, 36, .2); }
/* 冒气要看得见：有锅的时候把热气加粗加白，多一缕 */
.scene.has-photo.is-cooking .idle-steam { width: 13px; height: 38px; background: rgba(255, 255, 255, .9); filter: blur(4px); }
.scene.has-photo.is-cooking .idle-stove::after {
  content: ''; position: absolute; left: 36%; top: 26%; width: 11px; height: 30px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); filter: blur(4px); opacity: 0; animation: steamPuff 2.2s ease-in-out 1.3s infinite;
}
/* 桌面整幅画上：纸条让开冰箱上的「菜谱」牌子 */
@media (min-width: 721px) { .scene-note { left: 74.5%; top: 27%; width: 10%; } }
