/* ============================================================================
 *  style.css —— 《奇怪厨房》样式表
 *  整体风格：暖色调（奶油黄 / 焦糖橙 / 木纹棕 / 暖粉），圆润、手绘感。
 * ========================================================================== */

/* ---------------------------------------------------------------- 变量 */
:root {
  --cream:      #fff6e6;
  --cream-2:    #ffedd6;
  --paper:      #fffaf0;
  --caramel:    #e08a3c;
  --caramel-d:  #c46f24;
  --amber:      #f5b942;
  --wood:       #8b5a2b;
  --wood-d:     #5d3a17;
  --choco:      #4a2f1c;
  --ink:        #3c2a1a;
  --ink-2:      #7a5a3a;
  --peach:      #ffb4a2;
  --pink:       #ff8fa3;
  --gold:       #f7c22e;
  --shadow:     0 10px 30px rgba(93, 58, 23, .18);
  --shadow-lg:  0 22px 60px rgba(93, 58, 23, .3);
  --radius:     20px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  overflow: hidden;
}

body {
  background:
    radial-gradient(1200px 700px at 12% -8%,  #ffe0b0 0%, rgba(255,224,176,0) 62%),
    radial-gradient(900px 600px at 92% 6%,   #ffd0a8 0%, rgba(255,208,168,0) 60%),
    radial-gradient(900px 700px at 50% 118%, #ffc98f 0%, rgba(255,201,143,0) 62%),
    linear-gradient(168deg, #fff4e2 0%, #ffe9cd 46%, #ffdcb4 100%);
}

/* 背景的淡淡厨房小图案 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(circle at 8% 22%,  rgba(224,138,60,.13) 0 3px, transparent 3px),
    radial-gradient(circle at 22% 78%, rgba(224,138,60,.11) 0 2px, transparent 2px),
    radial-gradient(circle at 78% 32%, rgba(224,138,60,.12) 0 3px, transparent 3px),
    radial-gradient(circle at 92% 72%, rgba(224,138,60,.1)  0 2px, transparent 2px);
  background-size: 220px 220px, 180px 180px, 260px 260px, 200px 200px;
}

/* ---------------------------------------------------------------- 通用 */
.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: flex; }

.btn {
  font-family: var(--font);
  font-size: 17px; font-weight: 800;
  border: none; cursor: pointer;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, filter .18s, background .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.btn:active { transform: scale(.95); }
.btn .btn-emoji { font-size: 1.15em; }

.btn-primary {
  color: #fffaf0;
  background: linear-gradient(160deg, #f6a94b 0%, var(--caramel) 52%, var(--caramel-d) 100%);
  box-shadow: 0 8px 0 #a85a17, 0 14px 26px rgba(168,90,23,.32);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-2px); }
.btn-primary:active:not(:disabled) { box-shadow: 0 4px 0 #a85a17; transform: translateY(3px); }
.btn-primary:disabled {
  background: linear-gradient(160deg, #d8c6ae, #c3ad92);
  box-shadow: 0 6px 0 #a08c74, none; cursor: not-allowed; color: #fff8ec; opacity: .85;
}

.btn-ghost {
  color: var(--wood-d);
  background: var(--cream);
  border: 2.5px solid #e8cca4;
  box-shadow: 0 6px 0 #e2c9a4, 0 10px 20px rgba(93,58,23,.12);
}
.btn-ghost:hover:not(:disabled) { background: #fff; transform: translateY(-2px); }
.btn-ghost:active:not(:disabled) { box-shadow: 0 2px 0 #e2c9a4; transform: translateY(3px); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.btn-xl { font-size: 23px; padding: 19px 46px; }

/* ============================================================ 开始界面 */
#start-screen {
  align-items: center; justify-content: center;
  text-align: center;
}
.start-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 20px;
  animation: floatIn .7s cubic-bezier(.22,1,.36,1) both;
}
.start-title-wrap { line-height: 1.15; }
.start-title {
  margin: 0;
  font-size: clamp(46px, 9vw, 86px);
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 3px 0 #ffd79b, 0 7px 0 #e8b877, 0 14px 22px rgba(120,70,20,.26);
  background: linear-gradient(180deg, #a8632a 0%, #7a4418 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 #ffd79b) drop-shadow(0 6px 0 #e8b877);
}
.start-sub {
  margin: 18px 0 0; font-size: 13px; letter-spacing: .28em;
  color: var(--ink-2); font-weight: 700; opacity: .9;
}
.start-cat { animation: catBob 2.6s ease-in-out infinite; filter: drop-shadow(0 18px 26px rgba(120,70,20,.28)); }
.start-cat svg { display: block; width: clamp(165px, 23vh, 225px); height: auto; }
.start-tip { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; opacity: .8; }

/* --- 开始界面的按钮组：两个按钮永远都在、永远一样大 --- */
.start-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
/* 关键：固定同样的宽度，两个按钮一样大，「继续游戏」被禁用时也不会缩水 */
.start-actions .btn {
  width: clamp(240px, 30vw, 300px);
  justify-content: center;
}
/* 包裹层：让「继续游戏」和「开始新游戏」的外框也完全一致 */
.btn-guard { display: flex; }

.start-save-info {
  font-size: 13px; font-weight: 800; color: #8a6234;
  background: linear-gradient(160deg, #fff6e2, #ffe8c8);
  border: 2.5px dashed #e9c592; border-radius: 999px;
  padding: 7px 18px; margin-bottom: 2px;
  max-width: min(560px, 92vw); text-align: center; line-height: 1.5;
  animation: floatIn .5s cubic-bezier(.22,1,.36,1) both;
}
.start-save-info b { color: #b4721e; }
.start-save-info.empty { color: #a89478; border-style: dashed; }
.start-newgame-warn { margin: 0; font-size: 11.5px; color: #b09a7d; font-weight: 700; text-align: center; }

/* --- 开始新游戏的确认弹窗 --- */
.btn-danger {
  color: #fff8f6;
  background: linear-gradient(160deg, #e06a6a 0%, #c04545 55%, #a32d2d 100%);
  box-shadow: 0 8px 0 #8a2222, 0 14px 26px rgba(140,40,40,.3);
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-2px); }
.btn-danger:active:not(:disabled) { box-shadow: 0 4px 0 #8a2222; transform: translateY(3px); }

.newgame-list {
  list-style: none; margin: 0 0 18px; padding: 12px 16px;
  background: #fff6e2; border: 2.5px solid #f0dcbb; border-radius: 16px;
  text-align: left;
}
.newgame-list li {
  font-size: 13.5px; font-weight: 700; color: #7a5a3a;
  padding: 5px 0 5px 20px; position: relative; line-height: 1.5;
}
.newgame-list li::before {
  content: "•"; position: absolute; left: 4px; color: #c97b22; font-weight: 900;
}
.newgame-list b { color: #b4721e; }

/* 三个按钮：普通存档下「我是新玩家」快捷按钮会隐藏 */
.newgame-buttons { flex-direction: column; align-items: stretch; }
.newgame-buttons .btn { width: 100%; }
.newgame-buttons .btn-ghost + .btn-danger { margin-top: 2px; }

@keyframes catBob {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-13px) rotate(1.2deg); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================ 主界面 */
#main-screen { flex-direction: column; }

/* --- 顶部栏 --- */
#topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 20px;
  background: linear-gradient(180deg, rgba(255,247,232,.96), rgba(255,238,214,.86));
  border-bottom: 3px solid #eccfa4;
  box-shadow: 0 6px 18px rgba(120,70,20,.1);
  z-index: 30;
  backdrop-filter: blur(6px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.topbar-label { font-weight: 900; color: var(--wood-d); font-size: 14px; white-space: nowrap; }

.badge-list { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 2px; }
.badge-list::-webkit-scrollbar { height: 5px; }
.badge-list::-webkit-scrollbar-thumb { background: #e3c49a; border-radius: 4px; }

.badge {
  position: relative;
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 23px;
  background: #f6ead7;
  border: 2.5px dashed #ddc19b;
  filter: grayscale(1); opacity: .45;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  cursor: help;
}
.badge .badge-name {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--choco); color: #ffeecd; font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 5;
}
.badge:hover .badge-name { opacity: 1; }
.badge.unlocked {
  filter: none; opacity: 1;
  background: linear-gradient(155deg, #fff3d4, #ffdca4);
  border: 2.5px solid #e8a33d;
  box-shadow: 0 0 0 3px rgba(247,194,46,.22), 0 6px 16px rgba(200,130,40,.32);
  animation: badgePop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes badgePop { 0% { transform: scale(.5) rotate(-18deg); } 70% { transform: scale(1.18) rotate(6deg); } 100% { transform: none; } }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.sound-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 14px; cursor: pointer;
  border: 3px solid #e9c592; background: linear-gradient(160deg, #fff6e2, #ffe4bc);
  font-size: 19px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(150,95,35,.16);
  transition: transform .16s, filter .16s;
}
.sound-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.sound-btn:active { transform: scale(.94); }
.sound-btn.off { filter: grayscale(1); opacity: .6; }

.merit-box {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(160deg, #fff6e2, #ffe4bc);
  border: 3px solid #e9c592; border-radius: 16px;
  padding: 7px 16px;
  box-shadow: inset 0 2px 0 #fff, 0 5px 14px rgba(150,95,35,.18);
}
.merit-label { font-size: 12.5px; font-weight: 900; color: var(--ink-2); letter-spacing: .06em; }
.merit-value {
  font-size: 27px; font-weight: 900; color: #b4721e;
  font-variant-numeric: tabular-nums; min-width: 62px; text-align: right;
  transition: color .3s, transform .2s;
}
.merit-value.pos { color: #3f8f4a; }
.merit-value.neg { color: #b03a3a; }
.merit-value.bump { animation: meritBump .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes meritBump { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* --- 中间舞台 / 平底锅 --- */
#stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px 16px;
  /* ★ 原来是 overflow:hidden —— 手机上菜品栏占位高，内容被居中挤压后
     上下同时裁掉，锅底那句提示就被吞了一半。
     改成允许纵向滚动：空间够时居中，不够时能滚，不会再裁掉内容。 */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.pot-zone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  /* margin:auto 让它在有空间时保持居中，空间不足时从顶部开始、可滚动 */
  margin: auto;
  flex: 0 0 auto;
  max-height: none;
}

.pot-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.pot-pan {
  position: relative;
  width: min(46vh, 470px); max-width: 88vw;
  aspect-ratio: 460 / 300;
  transition: transform .2s;
}
.pot-pan.shake { animation: panShake .45s ease-in-out; }
@keyframes panShake {
  0%,100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-1.4deg); }
  50% { transform: translateX(6px) rotate(1.2deg); }
  80% { transform: translateX(-4px) rotate(-.6deg); }
}
.pan-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 22px 26px rgba(110,65,20,.3)); }

/* 锅内可放食材的区域（用百分比定位在锅中间） */
.pan-inner {
  position: absolute; left: 9%; top: 22%; width: 66%; height: 60%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  pointer-events: none;
}
.pan-placeholder {
  color: #cbb79c; font-size: 15px; font-weight: 700; letter-spacing: .1em;
  text-shadow: 0 1px 0 rgba(255,255,255,.06);
  animation: phPulse 2.4s ease-in-out infinite;
}
@keyframes phPulse { 0%,100% { opacity: .55; } 50% { opacity: .95; } }

/* 锅里的食材浮标 */
.pan-item {
  display: flex; flex-direction: column; align-items: center;
  animation: dropIn .45s cubic-bezier(.34,1.56,.64,1) both;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.42));
}
.pan-item .pi-icon { font-size: clamp(34px, 6.4vh, 62px); line-height: 1; animation: itemBob 2.2s ease-in-out infinite; }
.pan-item img.pi-icon { width: clamp(34px, 6.4vh, 62px); height: auto; border-radius: 10px; }
.pan-item .pi-name {
  margin-top: 2px; font-size: 12px; font-weight: 800; color: #ffe9c6;
  background: rgba(60,42,26,.6); padding: 1px 8px; border-radius: 999px;
}
.pan-item:nth-child(2) .pi-icon { animation-delay: -.7s; }
@keyframes itemBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes dropIn {
  0%   { transform: translateY(-90px) scale(.4) rotate(-30deg); opacity: 0; }
  70%  { transform: translateY(6px) scale(1.12) rotate(6deg); opacity: 1; }
  100% { transform: none; }
}

/* 灶火 */
.stove { display: flex; gap: 8px; margin-top: -14px; height: 30px; align-items: flex-end; opacity: .0; transition: opacity .3s; }
.stove.on { opacity: 1; }
.stove .flame { width: 20px; height: 30px; border-radius: 50% 50% 46% 46%; animation: flame .5s ease-in-out infinite alternate; }
.flame.f1 { background: radial-gradient(circle at 50% 70%, #ffe680 0 30%, #ff9d2e 62%, #ff5f1f 100%); animation-delay: 0s; }
.flame.f2 { background: radial-gradient(circle at 50% 70%, #fff3a8 0 30%, #ffb03a 62%, #ff6a1f 100%); animation-delay: .14s; height: 24px; }
.flame.f3 { background: radial-gradient(circle at 50% 70%, #ffe680 0 30%, #ff9d2e 62%, #ff5f1f 100%); animation-delay: .27s; }
@keyframes flame { from { transform: scaleY(.76) scaleX(.94); opacity: .8; } to { transform: scaleY(1.12) scaleX(1.04); opacity: 1; } }

.pot-actions { display: flex; gap: 14px; align-items: center; }
.pot-actions .btn { font-size: 19px; padding: 14px 34px; }
.pot-hint { margin: 0; font-size: 13.5px; color: var(--ink-2); font-weight: 700; opacity: .85; }

/* --- 底部菜品栏 --- */
#pantry {
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(255,243,224,.97), rgba(255,231,201,.99));
  border-top: 3px solid #eccfa4;
  box-shadow: 0 -8px 24px rgba(120,70,20,.14);
  border-radius: 26px 26px 0 0;
  z-index: 25;
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.pantry-toggle {
  width: 100%; border: none; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 22px; background: transparent;
  font-size: 16px; font-weight: 900; color: var(--wood-d);
}
.pantry-toggle .pt-left { display: flex; align-items: center; gap: 10px; }
.pantry-toggle em {
  font-style: normal; font-size: 13px; font-weight: 800;
  background: var(--caramel); color: #fff8ec;
  padding: 2px 10px; border-radius: 999px;
}
.pantry-toggle .pt-right { font-size: 12.5px; color: var(--ink-2); font-weight: 700; display: flex; gap: 6px; align-items: center; }
#pantry-caret { display: inline-block; transition: transform .35s; }
#pantry.collapsed { transform: translateY(calc(100% - 54px)); }

.pantry-body {
  max-height: 38vh; overflow-y: auto; padding: 4px 20px 18px;
}
.pantry-body::-webkit-scrollbar { width: 9px; }
.pantry-body::-webkit-scrollbar-track { background: #f4e2c8; border-radius: 9px; }
.pantry-body::-webkit-scrollbar-thumb { background: #dcb98a; border-radius: 9px; }

.cat-block { margin-bottom: 12px; }
.cat-title {
  /* 变成可点击的按钮：点一下就能折叠/展开这个区 */
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--font);
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 900; color: var(--wood-d);
  margin: 10px 0 9px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(255,250,240,.9), rgba(255,241,222,.75));
  border: 2.5px solid #efd9b8;
  border-radius: 14px;
  box-shadow: 0 3px 0 #e9d3ae;
  transition: transform .16s, box-shadow .16s, background .18s;
}
.cat-title:hover { background: #fff8ec; }
.cat-title:active { transform: translateY(2px); box-shadow: 0 1px 0 #e9d3ae; }
.cat-title .ct-bar { width: 6px; height: 18px; border-radius: 4px; flex: 0 0 auto; }
.cat-title .ct-name { flex: 0 0 auto; }
.cat-title .ct-count {
  font-size: 12px; font-weight: 700; color: var(--ink-2); opacity: .8;
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-title .ct-caret {
  flex: 0 0 auto; font-size: 11px; color: var(--ink-2); opacity: .7;
  transition: transform .28s cubic-bezier(.22,1,.36,1);
}
/* 折叠态：收起食材、箭头转下来 */
.cat-block.collapsed .ingredients { display: none; }
.cat-block.collapsed .cat-title { margin-bottom: 0; }
.cat-block.collapsed .cat-title .ct-caret { transform: rotate(180deg); }

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

.ing-card {
  width: 92px; padding: 9px 5px 7px;
  background: var(--paper);
  border: 2.5px solid #efd9b8;
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; user-select: none;
  font-family: var(--font);
  box-shadow: 0 4px 0 #e9d3ae, 0 8px 16px rgba(140,90,35,.1);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, border-color .18s, background .18s;
  position: relative; overflow: hidden;
}
.ing-card:hover { transform: translateY(-5px) rotate(-1.4deg); border-color: var(--amber); box-shadow: 0 7px 0 #e9d3ae, 0 14px 22px rgba(140,90,35,.2); }
.ing-card:active { transform: translateY(1px) scale(.97); }
.ing-card .ing-pic {
  font-size: 33px; line-height: 1; height: 42px; display: grid; place-items: center;
  filter: drop-shadow(0 3px 3px rgba(120,80,30,.22)); transition: transform .2s;
}
.ing-card .ing-pic img { width: 40px; height: 40px; object-fit: contain; }
.ing-card:hover .ing-pic { transform: scale(1.14) rotate(6deg); }
.ing-card .ing-name { font-size: 12.5px; font-weight: 800; color: #5b3d20; letter-spacing: .02em; }

.ing-card.selected {
  background: linear-gradient(160deg, #fff0c9, #ffd88a);
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(224,138,60,.28), 0 6px 0 #d9a35e, 0 12px 22px rgba(190,120,40,.3);
}
.ing-card.selected .ing-name { color: #8a4a12; }
.ing-card .ing-check {
  position: absolute; top: 5px; right: 5px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--caramel); color: #fff;
  font-size: 13px; font-weight: 900;
  display: grid; place-items: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.ing-card.selected .ing-check { transform: scale(1); }
.ing-card.selected::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  animation: shine 1.1s ease-out;
}
@keyframes shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

.ing-card.dim { opacity: .42; filter: saturate(.55); }
.ing-card.limit { animation: nope .35s; }
@keyframes nope {
  0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); }
}

/* ============================================================ 遮罩 & 弹窗 */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% 40%, rgba(74,47,28,.42), rgba(50,30,14,.72));
  backdrop-filter: blur(5px);
  padding: 16px;
}
.overlay.show { display: flex; animation: fadeIn .22s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: linear-gradient(170deg, #fffdf7, #fff1dd);
  border: 4px solid #e9c592;
  border-radius: 26px;
  padding: 26px 28px;
  width: min(430px, 92vw);
  box-shadow: var(--shadow-lg), inset 0 3px 0 #fff;
  animation: popIn .35s cubic-bezier(.34,1.56,.64,1) both;
  text-align: center;
}
@keyframes popIn { from { transform: scale(.85) translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-title { margin: 0 0 6px; font-size: 21px; font-weight: 900; color: #7a4418; }
.modal-sub { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.modal-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }

.nickname-random {
  font-size: 25px; font-weight: 900; color: #b4721e;
  background: linear-gradient(160deg, #fff6e2, #ffe6bd);
  border: 3px dashed #e9c592; border-radius: 16px;
  padding: 14px; margin-bottom: 12px; letter-spacing: .04em;
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
.text-input {
  width: 100%; font-family: var(--font); font-size: 17px; font-weight: 800; color: var(--ink);
  padding: 12px 16px; border-radius: 14px;
  border: 3px solid #e9d3ae; background: #fffdf9;
  outline: none; text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.text-input:focus { border-color: var(--caramel); box-shadow: 0 0 0 4px rgba(224,138,60,.18); }
.textarea { text-align: left; resize: none; height: 96px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.nickname-meta { text-align: right; font-size: 12px; color: var(--ink-2); margin: 6px 4px 14px; font-weight: 700; }

/* 打星 */
.rating-stars { display: flex; justify-content: center; gap: 8px; margin: 12px 0 6px; }
.rating-stars span {
  font-size: 44px; line-height: 1; cursor: pointer;
  color: #e6d6bb; text-shadow: 0 3px 0 rgba(150,110,60,.18);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), color .18s;
}
.rating-stars span:hover { transform: scale(1.2) rotate(-8deg); }
.rating-stars span.on { color: var(--gold); text-shadow: 0 0 16px rgba(247,194,46,.75), 0 3px 0 #c99a12; }
.rating-text { font-size: 13.5px; font-weight: 800; color: var(--ink-2); margin-bottom: 14px; }

/* ============================================================ 加载遮罩 */
#loading-overlay .loading-card {
  background: linear-gradient(170deg, #fffdf7, #ffeed8);
  border: 4px solid #e9c592; border-radius: 28px;
  padding: 26px 34px 30px; text-align: center;
  box-shadow: var(--shadow-lg); width: min(420px, 90vw);
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
.loading-cat svg { animation: catBob 1.5s ease-in-out infinite; }
.loading-text {
  margin: 6px 0 16px; font-size: 20px; font-weight: 900; color: #a8632a;
  min-height: 28px; letter-spacing: .04em;
  animation: textSwap .4s ease;
}
@keyframes textSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading-bar {
  height: 18px; border-radius: 999px; background: #f0dcc0;
  border: 2.5px solid #e0c39a; overflow: hidden;
  box-shadow: inset 0 3px 6px rgba(120,80,30,.16);
}
.loading-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffd166, #f0982c 60%, #e0701c);
  border-radius: 999px; position: relative;
  transition: width .28s ease;
}
.loading-bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255,255,255,.6) 50%, transparent 68%);
  animation: shine 1.1s linear infinite;
}
.loading-sub { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-2); font-weight: 700; }

/* ============================================================ 结果卡 */
#result-overlay .result-card {
  background: linear-gradient(172deg, #fffdf8, #fff0dc 62%, #ffe6c9);
  border: 4px solid #e9c592;
  border-radius: 28px;
  width: min(880px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
  padding: 18px 24px 22px;
  box-shadow: var(--shadow-lg), inset 0 3px 0 #fff;
  animation: resultIn .5s cubic-bezier(.22,1,.36,1) both;
  position: relative;
}
#result-overlay .result-card::-webkit-scrollbar { width: 10px; }
#result-overlay .result-card::-webkit-scrollbar-thumb { background: #e0c39a; border-radius: 10px; }
@keyframes resultIn {
  from { transform: scale(.82) translateY(40px) rotate(-2deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.result-card.tier-normal  { border-color: #efc07a; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(224,138,60,.16); }
.result-card.tier-legend  { border-color: #f0c33c; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(247,194,46,.28), 0 0 60px rgba(247,194,46,.4); }
.result-card.tier-hell    { border-color: #c96a6a; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(176,58,58,.22), 0 0 60px rgba(176,58,58,.3); }
.result-card.tier-dark    { border-color: #a389c4; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(123,94,167,.2); }
.result-card.tier-weird   { border-color: #e0b45c; box-shadow: var(--shadow-lg), 0 0 0 6px rgba(201,138,46,.18); }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-tier {
  font-size: 14px; font-weight: 900; color: #fff8ec;
  padding: 5px 18px; border-radius: 999px;
  background: linear-gradient(160deg, #f0a648, #cf7522);
  letter-spacing: .14em;
  box-shadow: 0 4px 0 rgba(150,90,25,.45);
}
.result-tier.legend { background: linear-gradient(160deg, #ffd95e, #d99f0e); box-shadow: 0 4px 0 #a87a08; color: #4a3208; }
.result-tier.hell   { background: linear-gradient(160deg, #e06a6a, #a72b2b); box-shadow: 0 4px 0 #7d1c1c; }
.result-tier.dark   { background: linear-gradient(160deg, #9d7fc9, #6a4c96); box-shadow: 0 4px 0 #4d3470; }
.result-tier.weird  { background: linear-gradient(160deg, #f0c168, #bd8322); box-shadow: 0 4px 0 #8f6216; }

.result-close {
  border: none; background: #f3e3ca; color: #8a6234;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 16px; font-weight: 900; transition: background .2s, transform .2s;
}
.result-close:hover { background: #ecd6b3; transform: rotate(90deg); }

/* 菜品图 */
.dish-pic-wrap {
  position: relative;
  width: min(300px, 62vw); aspect-ratio: 1 / 1;
  margin: 8px auto 6px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 34%, #fff6e2, #f6e2c4);
  border: 4px solid #f0d9b4;
  box-shadow: inset 0 4px 18px rgba(160,110,50,.16), 0 10px 22px rgba(140,90,35,.16);
  overflow: hidden;
  display: grid; place-items: center;
  animation: picPop .55s cubic-bezier(.34,1.56,.64,1) both .1s;
}
@keyframes picPop { from { transform: scale(.7) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.dish-pic { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-pic-fallback {
  position: absolute; inset: 0; display: none;
  place-items: center;
  background: radial-gradient(circle at 50% 34%, #fffaf0, #f2dfc2);
}
.dish-pic-fallback.show { display: grid; }
.dish-pic-fallback svg { width: 100%; height: 100%; }
.dish-pic-fallback .miss-path {
  position: absolute; bottom: 6px; left: 0; right: 0;
  font-size: 10.5px; color: #a9825a; text-align: center; word-break: break-all; padding: 0 8px;
}

.dish-name {
  margin: 6px 0 14px; text-align: center;
  font-size: clamp(24px, 4.4vw, 34px); font-weight: 900; color: #6b3d13;
  letter-spacing: .06em;
  text-shadow: 0 3px 0 #ffe0b0;
}

/* 结果卡主体：左信息 + 右按钮 */
.result-main {
  display: grid; grid-template-columns: 1fr 210px; gap: 18px;
  align-items: stretch;
  background: linear-gradient(160deg, #fff8ea, #ffefd8);
  border: 3px solid #f0dcbb; border-radius: 22px;
  padding: 16px;
}
.author-row { display: flex; gap: 12px; align-items: center; }
.author-cat { flex: 0 0 auto; width: 108px; }
.author-cat svg { display: block; width: 100%; height: auto; animation: catBob 2.4s ease-in-out infinite; }
.author-text { min-width: 0; }
.author-name { font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 4px; letter-spacing: .08em; }
.author-comment {
  display: inline-block;
  font-size: clamp(16px, 2.4vw, 21px); font-weight: 900; color: #a33c3c;
  background: #fff3e0; border: 2.5px dashed #eabf8a; border-radius: 14px;
  padding: 7px 14px; line-height: 1.35;
  position: relative;
}
.author-comment::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 14px; height: 14px; background: #fff3e0;
  border-left: 2.5px dashed #eabf8a; border-bottom: 2.5px dashed #eabf8a;
}

.score-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.score-label { font-size: 13px; font-weight: 900; color: var(--ink-2); }
.score-stars { font-size: 24px; letter-spacing: 2px; color: #e6d6bb; }
.score-stars i { font-style: normal; }
.score-stars i.on { color: var(--gold); text-shadow: 0 0 12px rgba(247,194,46,.6), 0 2px 0 #c99a12; }
.score-num { font-size: 17px; font-weight: 900; color: #b4721e; }
.score-num span { font-size: 12px; color: var(--ink-2); }
.merit-delta {
  display: inline-block; margin-top: 10px;
  font-size: 14px; font-weight: 900; padding: 4px 14px; border-radius: 999px;
}
.merit-delta.pos { color: #2f7a3a; background: #dff0dc; border: 2px solid #a8d3a2; }
.merit-delta.neg { color: #a32d2d; background: #fbe0e0; border: 2px solid #e0a8a8; }

.result-buttons { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.result-buttons .btn { width: 100%; }

/* 未匹配分支 */
.result-dark { text-align: center; padding: 4px 0 8px; }
.result-dark p {
  margin: 0; display: inline-block;
  font-size: clamp(17px, 2.6vw, 23px); font-weight: 900; color: #8a4a12;
  background: #fff3e0; border: 3px dashed #e0b078; border-radius: 18px;
  padding: 12px 26px;
}
.dark-footer { display: none; justify-content: center; margin-top: 16px; }
.dark-footer.show { display: flex; }

/* 评论区 */
.comment-zone {
  margin-top: 18px;
  background: linear-gradient(160deg, #fff8ea, #fff0da);
  border: 3px solid #f0dcbb; border-radius: 22px;
  padding: 14px 16px 12px;
}
.comment-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 900; color: var(--wood-d);
  padding-bottom: 10px; border-bottom: 2.5px dashed #e8d0ab; margin-bottom: 10px;
}
.comment-count { font-size: 12.5px; font-weight: 800; color: #fff8ec; background: var(--caramel); padding: 2px 11px; border-radius: 999px; }

/* --- 评论状态提示（加载中 / 离线 / 失败重试）--- */
.comment-status { display: none; }
.comment-status.show { display: block; margin-bottom: 10px; }

.cs-loading, .cs-offline, .cs-error {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 14px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
}
.cs-loading {
  color: #8a6234; background: #fff6e2; border: 2.5px dashed #e9d3ae;
}
.cs-offline {
  color: #7a6a52; background: #f6f1e6; border: 2.5px solid #e2d6c0;
}
.cs-error {
  color: #a33c3c; background: #fdeaea; border: 2.5px solid #e8b4b4;
}
.cs-error .cs-msg { flex: 1; min-width: 0; word-break: break-word; }

/* 转圈的小指示器 */
.cs-spinner {
  width: 14px; height: 14px; flex: 0 0 auto;
  border: 2.5px solid #e9d3ae; border-top-color: var(--caramel);
  border-radius: 50%;
  animation: csSpin .7s linear infinite;
}
@keyframes csSpin { to { transform: rotate(360deg); } }

/* 失败时的重试按钮 */
.cs-retry {
  flex: 0 0 auto; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; font-weight: 900; color: #a33c3c;
  background: #fff; border: 2.5px solid #e8b4b4; border-radius: 999px;
  padding: 5px 14px; transition: background .18s, transform .16s;
}
.cs-retry:hover { background: #fff3f3; transform: translateY(-1px); }
.cs-retry:active { transform: translateY(1px); }

/* 加载中的骨架屏 */
.comment-skeleton { display: flex; flex-direction: column; gap: 10px; }
.comment-skeleton .sk {
  height: 62px; border-radius: 16px;
  background: linear-gradient(100deg, #faf3e6 30%, #fff8ec 50%, #faf3e6 70%);
  background-size: 220% 100%;
  border: 2.5px solid #f2e6d2;
  animation: skShine 1.25s linear infinite;
}
@keyframes skShine { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.comment-list { display: flex; flex-direction: column; gap: 10px; max-height: 34vh; overflow-y: auto; padding-right: 4px; }.comment-list::-webkit-scrollbar { width: 8px; }
.comment-list::-webkit-scrollbar-thumb { background: #e0c39a; border-radius: 8px; }

.comment-item {
  display: flex; gap: 11px; align-items: flex-start; justify-content: flex-start;
  text-align: left;
  background: #fffdf8; border: 2.5px solid #f0e0c6; border-radius: 16px;
  padding: 10px 13px;
  animation: commentIn .35s cubic-bezier(.22,1,.36,1) both;
  box-shadow: 0 3px 10px rgba(150,100,45,.08);
}
@keyframes commentIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.comment-avatar {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(155deg, #ffe6bd, #ffd08a);
  border: 2.5px solid #e9c592;
}
.comment-main { flex: 1 1 auto; min-width: 0; text-align: left; }
.comment-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.comment-nick { font-size: 14px; font-weight: 900; color: #8a4a12; }
.comment-stars { font-size: 15px; color: #e6d6bb; letter-spacing: 1px; }
.comment-stars i { font-style: normal; }
.comment-stars i.on { color: var(--gold); text-shadow: 0 0 8px rgba(247,194,46,.55); }
.comment-time { font-size: 11px; color: #ab8a62; font-weight: 700; margin-left: auto; }
.comment-body { margin-top: 5px; font-size: 14px; line-height: 1.62; color: #5b3d20; white-space: pre-wrap; word-break: break-word; }
.comment-body.empty { color: #b09a7d; font-style: italic; }
.comment-empty {
  text-align: center; padding: 22px 10px; color: #b09a7d;
  font-size: 14px; font-weight: 700; line-height: 1.7;
}
.comment-empty .ce-cat { font-size: 40px; display: block; margin-bottom: 6px; }

.comment-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 2.5px dashed #e8d0ab;
}
.comment-footer-tip { font-size: 12.5px; color: var(--ink-2); font-weight: 700; }

/* ============================================================ 成就提示条 */
.achievement-layer {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 300; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 12px; width: min(500px, 92vw);
  max-height: 40vh; overflow: hidden;
}
.ach-toast {
  display: flex; align-items: center; gap: 13px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(155deg, #fff6df, #ffd894 70%, #ffc466);
  border: 3.5px solid #e5a63a; border-top: none;
  box-shadow: 0 14px 34px rgba(170,105,20,.42), inset 0 -3px 0 rgba(255,255,255,.5);
  animation: achDrop .55s cubic-bezier(.22,1.4,.36,1) both;
}
.ach-toast.out { animation: achUp .42s cubic-bezier(.5,0,.75,0) forwards; }
@keyframes achDrop { from { transform: translateY(-130%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes achUp { from { transform: none; opacity: 1; } to { transform: translateY(-130%); opacity: 0; } }

.ach-icon {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: 15px;
  display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(155deg, #fff8e6, #ffdfa6);
  border: 2.5px solid #e5a63a;
  box-shadow: 0 4px 12px rgba(170,105,20,.3);
  animation: badgePop .6s cubic-bezier(.34,1.56,.64,1);
}
.ach-text { min-width: 0; }
.ach-tag { font-size: 11.5px; font-weight: 900; letter-spacing: .22em; color: #a8632a; }
.ach-name { font-size: 20px; font-weight: 900; color: #6b3d13; line-height: 1.25; text-shadow: 0 2px 0 #fff3d6; }
.ach-desc { font-size: 12px; color: #8a6234; font-weight: 700; margin-top: 2px; }
.ach-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 36%, rgba(255,255,255,.75) 50%, transparent 64%);
  animation: shine 1.3s ease-out;
  overflow: hidden;
}

/* ============================================================ 成就一览面板 */
.topbar-left {
  cursor: pointer; border-radius: 16px; padding: 5px 10px;
  transition: background .2s;
}
.topbar-left:hover { background: rgba(255,255,255,.6); }
.topbar-left:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
.topbar-more {
  font-style: normal; font-size: 11.5px; font-weight: 800;
  color: var(--caramel); opacity: .85; margin-left: 2px;
}

.ach-modal { width: min(620px, 94vw); position: relative; text-align: left; }
.ach-progress-line { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.ach-progress-bar {
  flex: 1; height: 16px; border-radius: 999px;
  background: #f0dcc0; border: 2.5px solid #e0c39a; overflow: hidden;
  box-shadow: inset 0 3px 6px rgba(120,80,30,.16);
}
.ach-progress-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffd166, #f0982c 60%, #e0701c);
  border-radius: 999px; transition: width .5s cubic-bezier(.22,1,.36,1);
}
.ach-progress-text { font-size: 14px; font-weight: 900; color: #b4721e; white-space: nowrap; }

.ach-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px;
  max-height: 54vh; overflow-y: auto; padding: 3px 5px 3px 3px;
}
.ach-grid::-webkit-scrollbar { width: 9px; }
.ach-grid::-webkit-scrollbar-thumb { background: #e0c39a; border-radius: 9px; }

.ach-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 13px;
  border-radius: 18px;
  border: 2.5px solid #f0e0c6;
  background: #fffdf8;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ach-item.unlocked {
  background: linear-gradient(160deg, #fff8e4, #ffedcc);
  border-color: #e9b45c;
  box-shadow: 0 4px 14px rgba(200,140,50,.18);
}
.ach-item.locked { opacity: .82; }

.ach-item-icon {
  width: 50px; height: 50px; flex: 0 0 auto; border-radius: 15px;
  display: grid; place-items: center; font-size: 26px;
  background: #f2e8d8; border: 2.5px solid #e2d0b4;
  filter: grayscale(1) opacity(.55);
  transition: filter .35s;
}
.ach-item.unlocked .ach-item-icon {
  filter: none;
  background: linear-gradient(155deg, #fff3d4, #ffdca4);
  border-color: #e8a33d;
  box-shadow: 0 0 0 3px rgba(247,194,46,.2), 0 5px 12px rgba(200,130,40,.28);
}
.ach-item-body { flex: 1; min-width: 0; }
.ach-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ach-item-name { font-size: 15.5px; font-weight: 900; color: #6b3d13; }
.ach-item-state {
  font-size: 10.5px; font-weight: 900; letter-spacing: .06em;
  padding: 2px 9px; border-radius: 999px;
}
.ach-item-state.on { color: #2f7a3a; background: #dff0dc; border: 2px solid #a8d3a2; }
.ach-item-state.off { color: #9c8a70; background: #f1e8d9; border: 2px solid #ddcdb2; }

.ach-item-desc { margin-top: 5px; font-size: 13px; font-weight: 700; color: #7a5a3a; line-height: 1.5; }
.ach-item-cond {
  margin-top: 7px; font-size: 12.5px; line-height: 1.65; color: #8a6234;
  background: #fff6e6; border-left: 4px solid #e9c592;
  border-radius: 8px; padding: 6px 10px;
}
.ach-item-cond b { color: #b4721e; }
.ach-item-progress { margin-top: 7px; display: flex; align-items: center; gap: 9px; }
.ach-item-progress .bar {
  flex: 1; height: 9px; border-radius: 999px; background: #f0dcc0; overflow: hidden;
}
.ach-item-progress .bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffd166, #f0982c);
  transition: width .5s cubic-bezier(.22,1,.36,1);
}
.ach-item-progress .num { font-size: 11.5px; font-weight: 900; color: #b4721e; white-space: nowrap; }
.ach-item.unlocked .ach-item-progress .bar i { background: linear-gradient(90deg, #a8e0a0, #4fae52); }

@media (max-width: 560px) {
  .ach-grid { grid-template-columns: 1fr; max-height: 58vh; }
}

/* ============================================================ 更新公告 */
.announce-overlay {
  z-index: 250;                 /* 在结果卡之上、成就提示条之下 */
  background: radial-gradient(900px 620px at 50% 40%, rgba(74,47,28,.5), rgba(44,26,12,.8));
}
.announce-card {
  width: min(540px, 93vw);
  background: linear-gradient(172deg, #fffdf8, #fff1dc 60%, #ffe8cc);
  border: 4px solid #e9c592;
  border-radius: 26px;
  padding: 22px 26px 18px;
  box-shadow: var(--shadow-lg), inset 0 3px 0 #fff;
  animation: announceIn .5s cubic-bezier(.22,1.4,.36,1) both;
  cursor: default;
}
@keyframes announceIn {
  from { transform: translateY(-24px) scale(.9); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.announce-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.announce-title { margin: 0; font-size: 21px; font-weight: 900; color: #7a4418; }
.announce-badge {
  font-size: 12px; font-weight: 900; letter-spacing: .1em;
  color: #fff8ec; background: linear-gradient(160deg, #f0a648, #cf7522);
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(150,90,25,.4);
  animation: badgeGlow 1.8s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%,100% { filter: brightness(1); }
  50%     { filter: brightness(1.16); }
}
.announce-body { font-size: 14.5px; line-height: 1.85; color: #5b3d20; }
.announce-body p { margin: 0 0 12px; }
.announce-date { font-size: 12.5px; color: var(--ink-2); font-weight: 700; margin-bottom: 10px; }
.announce-mail {
  display: inline-block; margin-top: 6px;
  font-size: 16px; font-weight: 900; color: #b4721e;
  background: #fff6e2; border: 3px dashed #e9c592; border-radius: 14px;
  padding: 9px 18px; text-decoration: none;
  transition: background .2s, transform .16s, border-color .2s;
  word-break: break-all;
}
.announce-mail:hover { background: #ffeccb; border-color: var(--caramel); transform: translateY(-2px); }
.announce-footer {
  margin-top: 16px; padding-top: 12px;
  border-top: 2.5px dashed #e8d0ab;
  font-size: 12.5px; color: var(--ink-2); font-weight: 700; text-align: center;
}
.announce-hint {
  margin-top: 8px; text-align: center;
  font-size: 12px; color: #b09a7d; font-weight: 700;
  animation: phPulse 2.2s ease-in-out infinite;
}

/* ============================================================ 打赏 */
.tip-topbtn { font-size: 20px; }
.tip-modal { width: min(420px, 92vw); text-align: center; position: relative; }
.tip-close { position: absolute; top: 12px; right: 12px; }
.tip-notice {
  margin: 2px 0 16px; padding: 9px 12px;
  font-size: 12.5px; font-weight: 800; line-height: 1.6;
  color: #a33c3c; background: #fdeaea;
  border: 2.5px solid #e8b4b4; border-radius: 14px;
}
.tip-amounts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tip-amount-btn {
  font-family: var(--font); cursor: pointer;
  min-width: 96px; padding: 12px 18px;
  font-size: 20px; font-weight: 900; color: #8a4a12;
  background: linear-gradient(160deg, #fffdf8, #ffeed6);
  border: 3px solid #e9d3ae; border-radius: 16px;
  box-shadow: 0 5px 0 #e2c9a4;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, border-color .18s, background .18s;
}
.tip-amount-btn small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-2); margin-top: 3px; }
.tip-amount-btn:hover { transform: translateY(-3px); border-color: var(--amber); }
.tip-amount-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #e2c9a4; }
.tip-amount-btn.active {
  background: linear-gradient(160deg, #fff0c9, #ffd88a);
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(224,138,60,.28), 0 5px 0 #d9a35e;
  color: #6b3d13;
}
.tip-qr-wrap {
  position: relative;
  width: min(230px, 62vw); aspect-ratio: 1 / 1;
  margin: 0 auto 10px;
  border-radius: 18px; overflow: hidden;
  background: #fff;
  border: 3px solid #e9d3ae;
  box-shadow: inset 0 3px 12px rgba(160,110,50,.12);
  display: grid; place-items: center;
}
.tip-qr { width: 100%; height: 100%; object-fit: contain; display: block; }
.tip-qr-fallback {
  position: absolute; inset: 0; display: none; place-items: center;
  background: repeating-linear-gradient(45deg, #fdf6ea, #fdf6ea 14px, #f7ecda 14px, #f7ecda 28px);
  padding: 14px; text-align: center;
}
.tip-qr-fallback.show { display: grid; }
.tip-qr-fallback .qf-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.tip-qr-fallback .qf-text { font-size: 12.5px; font-weight: 800; color: #a9825a; line-height: 1.7; }
.tip-qr-fallback .qf-path {
  margin-top: 6px; font-size: 11px; color: #b09a7d; word-break: break-all; font-weight: 700;
}
.tip-qr-tip { font-size: 13.5px; font-weight: 800; color: var(--ink-2); min-height: 20px; }
.tip-thanks {
  margin-top: 8px; font-size: 13.5px; font-weight: 800; color: #2f7a3a;
  min-height: 20px; opacity: 0; transition: opacity .3s;
}
.tip-thanks.show { opacity: 1; }
.tip-footnote { margin: 14px 0 0; font-size: 11.5px; color: #b09a7d; font-weight: 700; line-height: 1.6; }

/* ============================================================ 轻提示小横幅 */
.tip-banner {
  position: fixed; left: 50%; bottom: 26px;
  transform: translate(-50%, 140%);
  z-index: 400;
  max-width: min(560px, 92vw);
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(155deg, #fffaf0, #ffe6bd);
  border: 3px solid #e9c592;
  color: #7a4418;
  font-size: 14.5px; font-weight: 800;
  box-shadow: 0 14px 32px rgba(120,70,20,.32), inset 0 2px 0 #fff;
  opacity: 0; pointer-events: none;
  transition: transform .34s cubic-bezier(.22,1.4,.36,1), opacity .3s;
  text-align: center;
}
.tip-banner.show { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================ 小屏适配 */
@media (max-width: 720px) {
  .result-main { grid-template-columns: 1fr; }
  .result-buttons { flex-direction: row; }
  .result-buttons .btn { flex: 1; }
  .author-cat { width: 84px; }
  .merit-value { font-size: 22px; min-width: 48px; }
  .badge { width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
  .ing-card { width: 78px; }
  .ing-card .ing-pic { font-size: 27px; height: 34px; }
  /* ★ 手机上菜品栏别占太多，否则中间舞台没地方显示锅和提示 */
  .pantry-body { max-height: 34vh; }
  .comment-time { display: none; }
  /* 锅和按钮紧凑一点，保证「挑 2 个食材」那句提示始终露得出来 */
  .pot-pan { width: min(330px, 78vw); }
  .pot-actions { gap: 10px; }
  .pot-actions .btn { font-size: 16px; padding: 11px 22px; }
  .pot-hint { font-size: 12.5px; }
  .cat-title { font-size: 13.5px; padding: 6px 10px; }
  .cat-title .ct-count { font-size: 11px; }
}
@media (max-width: 420px) {
  .pot-actions .btn { font-size: 15px; padding: 10px 16px; }
  .btn-xl { font-size: 19px; padding: 15px 32px; }
  .pantry-body { max-height: 30vh; }
  .ing-card { width: 70px; }
  .ingredients { gap: 8px; }
}
