/* 《培育》HUD 样式。主题 token 与 data.js THEME 同值。 */
:root {
  --paper: #F6F1E6; --linen: #EFE9DC; --ink: #3B3A36; --ink-soft: #6E6A60;
  --sage: #8FB39A; --sage-deep: #5F8A6E; --gold: #E8C27A; --soil: #2B231D; --glass: #DFEEF0;
  --radius: 14px; --shadow: 0 6px 18px rgba(60, 50, 30, .14);
  --motion: 220ms cubic-bezier(.2, .8, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --title-font: var(--yoroll-font-title, sans-serif);
  --body-font: var(--yoroll-font-body, sans-serif);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { color: var(--ink); font-family: var(--body-font); user-select: none; -webkit-user-select: none; }
.hidden { display: none !important; }
#game canvas { touch-action: none; }

/* ---------- 通用组件 ---------- */
/* C-BTN 药丸纸片按钮：外壳到位后由 .has-art 切换为 border-image */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 120px; padding: 0 26px;
  font-family: var(--title-font); font-size: 18px; color: var(--ink); letter-spacing: 1px;
  background: var(--paper); border: 1.5px solid var(--sage); border-radius: 999px;
  box-shadow: 0 2px 6px rgba(60, 50, 30, .12); cursor: pointer;
  transition: transform var(--motion), filter var(--motion);
}
.pill-btn > span { display: block; line-height: 1.1; white-space: nowrap; pointer-events: none; }
.pill-btn:active { transform: translateY(1px) scale(.97); }
.pill-btn:focus-visible, .icon-btn:focus-visible, .potion:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
.pill-btn[disabled] { filter: grayscale(.8) opacity(.55); cursor: default; transform: none; }
.pill-btn.primary { color: #2f4a3a; }
/* 纸片外壳（UI-BTN-PILL 1491×533，端帽≈270px 固定、中段拉伸、保留纸面 fill） */
.pill-btn {
  background: transparent; border-radius: 0; box-shadow: none;
  border-style: solid; border-width: 12px 24px 14px 24px; padding: 0 6px;
  border-image-source: url("assets/ui_btn_pill.webp");
  border-image-slice: 60 270 70 270 fill; border-image-width: 1; border-image-repeat: stretch;
}

/* C-ICON 圆形图标按钮（code） */
.icon-btn {
  position: relative; width: 48px; height: 48px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink-soft); border: 1.5px solid rgba(110, 106, 96, .35);
  box-shadow: 0 2px 6px rgba(60, 50, 30, .12); cursor: pointer; transition: transform var(--motion);
}
.icon-btn svg { width: 24px; height: 24px; pointer-events: none; }
.icon-btn:active { transform: scale(.92); }
.icon-btn[disabled] { opacity: .5; }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--sage-deep); color: #fff; font: 12px/20px var(--body-font);
}
#soundBtn .snd-off { display: none; }
#soundBtn.muted .snd-on { display: none; }
#soundBtn.muted .snd-off { display: block; }

/* C-CHIP（code） */
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: rgba(246, 241, 230, .92); border: 1px solid rgba(110, 106, 96, .25); border-radius: 12px;
  font-size: 14px; color: var(--ink-soft); box-shadow: 0 2px 6px rgba(60, 50, 30, .08); white-space: nowrap;
}
button.chip { cursor: pointer; font-family: var(--body-font); }
.chip.late { opacity: .62; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.chip.ready .chip-dot { background: var(--sage-deep); box-shadow: 0 0 0 4px rgba(143, 179, 154, .3); }

/* C-PANEL 纸卡面板 */
.paper-panel {
  position: relative; background: var(--paper); border-radius: 18px;
  border: 1px solid rgba(110, 106, 96, .18); box-shadow: var(--shadow);
}
.paper-panel .panel-inner { position: relative; padding: 10px 10px 6px; }
/* 纸卡外壳（UI-PANEL-PAPER 970×950，毛边约 70px 固定，纸面中心 fill） */
.paper-panel {
  background: transparent; border-radius: 0; box-shadow: none;
  border-style: solid; border-width: 22px;
  border-image-source: url("assets/ui_panel_paper.webp");
  border-image-slice: 70 fill; border-image-width: 1; border-image-repeat: stretch;
}

/* ---------- 主玩法 HUD ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud > * { pointer-events: auto; }
.hud-top {
  position: absolute; left: calc(16px + var(--safe-l)); right: calc(16px + var(--safe-r)); top: calc(14px + var(--safe-t));
  display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.hud-top-right { display: flex; align-items: center; gap: 10px; }
.icon-col { position: absolute; display: flex; gap: 12px; }
.potion-bar { position: absolute; display: flex; align-items: flex-end; justify-content: center; gap: 10px; touch-action: none; }

/* C-POTION */
.potion {
  position: relative; width: 64px; height: 84px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: center; transition: transform var(--motion);
}
.potion .bottle { width: 100%; height: 100%; background-repeat: no-repeat; background-position: center bottom; pointer-events: none; }
.potion .bottle.fallback { position: absolute; left: 14px; right: 14px; bottom: 6px; top: 22px; width: auto; height: auto; border-radius: 40% 40% 46% 46%; border: 2px solid rgba(59, 58, 54, .45); }
.potion::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -2px; height: 10px; border-radius: 50%; background: rgba(60, 50, 30, .12); z-index: -1; }
.potion.sel { transform: translateY(-8px); }
.potion.sel::before {
  content: ''; position: absolute; inset: -6px -2px 0; border-radius: 40%;
  background: radial-gradient(closest-side, var(--glow, #fff) 0%, transparent 100%); opacity: .55; z-index: -1;
}
.potion-bar.shake { animation: shake .36s; }
/* 剩余份数：右上角小圆标 + 瓶底水位条 */
.potion .potion-count {
  position: absolute; top: 2px; right: 2px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: rgba(246, 241, 230, .96); color: var(--ink); font-size: 13px; line-height: 22px; text-align: center;
  box-shadow: 0 1px 3px rgba(40, 30, 20, .22); pointer-events: none; font-variant-numeric: tabular-nums;
}
.potion .potion-meter {
  position: absolute; left: 16%; right: 16%; bottom: -7px; height: 4px; border-radius: 2px;
  background: rgba(59, 58, 54, .16); overflow: hidden; pointer-events: none;
}
.potion .potion-meter i { display: block; height: 100%; width: 100%; background: var(--glow, #8EC9E8); transition: width .2s; }
.potion.low .potion-count { background: #F4D9A6; }
.potion.empty .bottle { filter: grayscale(.85) opacity(.45); }
.potion.empty .potion-count { background: rgba(110, 106, 96, .85); color: #F6F1E6; }
.order-water { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft, #6E6A60); line-height: 1.9; }
.order-water .ow { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; color: var(--ink); }
.order-water .ow i { width: 9px; height: 9px; border-radius: 50%; background: var(--wc); box-shadow: 0 0 0 1px rgba(59, 58, 54, .25); }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }

.toast {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(70px + var(--safe-t));
  max-width: min(420px, 86vw); padding: 10px 18px; border-radius: 12px; text-align: center;
  background: rgba(246, 241, 230, .95); color: var(--ink); font-size: 14px; box-shadow: var(--shadow);
  pointer-events: none; transition: opacity var(--motion);
}

/* 布局变体：桌面横屏 */
body.lay-desktop .icon-col { right: calc(20px + var(--safe-r)); bottom: calc(24px + var(--safe-b)); flex-direction: column; }
body.lay-desktop .potion-bar { left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); padding: 8px 22px 10px; }
/* 手机竖屏 */
body.lay-portrait .icon-col { left: 50%; transform: translateX(-50%); bottom: calc(112px + var(--safe-b)); flex-direction: row; }
body.lay-portrait .potion-bar { left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); gap: 4px; }
body.lay-portrait .potion { width: 60px; height: 84px; }
body.lay-portrait .pill-btn { min-width: 96px; padding: 0 16px; font-size: 16px; min-height: 44px; }
body.lay-portrait .chip { height: 38px; font-size: 13px; padding: 0 10px; }
/* 手机横屏：HUD 侧栏 */
body.lay-short .hud-top { right: auto; flex-direction: column; align-items: flex-start; }
body.lay-short .hud-top-right { flex-direction: column; align-items: flex-start; }
body.lay-short .icon-col { left: calc(16px + var(--safe-l)); bottom: calc(10px + var(--safe-b)); flex-direction: row; flex-wrap: wrap; width: 180px; }
body.lay-short .potion-bar { right: calc(10px + var(--safe-r)); top: 50%; transform: translateY(-50%); flex-direction: column; gap: 0; }
body.lay-short .potion { width: 56px; height: 70px; }
body.lay-short .pill-btn { min-width: 100px; min-height: 44px; font-size: 15px; padding: 0 14px; }

/* ---------- 标题屏 ---------- */
.screen { position: fixed; inset: 0; z-index: 30; }
.title-screen { display: flex; align-items: center; justify-content: center; background: var(--linen); }
.title-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
/* 木箱花园版：标题页透出后面真实的木箱场景，只加一层柔雾 */
.title-screen.live-scene { background: transparent; }
.title-screen.live-scene .title-bg { background: radial-gradient(ellipse at center, rgba(239,233,220,0.18) 0%, rgba(239,233,220,0.55) 100%); backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); }
.title-card { width: min(360px, 84vw); margin-top: 22vh; }
.title-card .panel-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.game-title { margin: 0; font-size: 44px; letter-spacing: 8px; color: #35503f; font-weight: 700; }
.game-sub { margin: 4px 0 18px; color: var(--ink-soft); font-size: 14px; letter-spacing: 4px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: stretch; }

/* ---------- 弹窗 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-mask { position: absolute; inset: 0; background: rgba(43, 35, 29, .35); }
.modal-panel { width: min(440px, 92vw); max-height: min(640px, 88vh); display: flex; flex-direction: column; }
.modal-panel .panel-inner { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.modal-title { margin: 0 44px 12px; text-align: center; font-size: 22px; color: #35503f; font-weight: 700; }
.modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; font-size: 15px; line-height: 1.6; color: var(--ink); touch-action: pan-y; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; flex: none; }
.close-x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; }

/* 新的一天：极淡明暗呼吸 */
.day-veil { position: fixed; inset: 0; z-index: 20; pointer-events: none; background: #2b231d; opacity: 0; }
.day-veil.breath { animation: breath 1.4s ease-in-out; }
@keyframes breath { 0% { opacity: 0; } 45% { opacity: .22; } 100% { opacity: 0; } }

.loading { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: var(--linen); color: var(--ink-soft); font-size: 14px; }
.loading-drop { width: 18px; height: 24px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #8EC9E8; animation: drip 1.1s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(-14px) scale(.6); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(14px) scale(1); opacity: 0; } }

/* ---------- 弹窗内容 ---------- */
.row-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 10px; border-radius: 12px; background: rgba(239, 233, 220, .7); border: 1px solid rgba(110, 106, 96, .12); }
.row.full { background: rgba(143, 179, 154, .22); border-color: rgba(95, 138, 110, .35); }
.row-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-num { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.row.full .row-num { color: var(--sage-deep); }
.item-icon { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.item-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item-icon i { width: 18px; height: 18px; border-radius: 50%; background: var(--sage); }
.order-from { margin: 0; color: var(--ink-soft); font-size: 13px; text-align: center; }
.order-greet { margin: 6px 4px 10px; text-align: center; color: var(--ink); }
.order-card.late .order-greet { color: var(--ink-soft); }
.order-meta { margin: 8px 0 0; text-align: center; color: var(--ink-soft); font-size: 13px; }
.note { margin: 6px 2px; color: var(--ink-soft); font-size: 13px; }
.center { text-align: center; }
.sec { margin: 6px 0 4px; font-size: 15px; color: #35503f; font-family: var(--title-font); font-weight: 400; }
.sec small { font-size: 12px; color: var(--ink-soft); font-family: var(--body-font); margin-left: 6px; }
.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.codex-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: rgba(239, 233, 220, .6); font-size: 12px; text-align: center; line-height: 1.3; }
.codex-cell .item-icon { width: 44px; height: 44px; }
.codex-cell.unknown .item-icon img { filter: brightness(0); opacity: .22; }
.codex-cell.unknown span { color: var(--ink-soft); }
.codex-cell.rare:not(.unknown) { background: rgba(232, 194, 122, .22); }
.settle .stat-row { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.stat { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; background: rgba(239, 233, 220, .7); }
.stat b { font-size: 20px; color: #35503f; font-weight: 700; }
.stat span { font-size: 12px; color: var(--ink-soft); }
.unlock { margin: 4px 0 0; padding: 8px 12px 8px 28px; border-radius: 12px; background: rgba(143, 179, 154, .18); color: #35503f; font-size: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 6px; }
.toggle { position: relative; width: 56px; height: 32px; border-radius: 16px; border: 1.5px solid rgba(110, 106, 96, .35); background: #ddd6c7; cursor: pointer; padding: 0; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: left var(--motion); }
.toggle.on { background: var(--sage); }
.toggle.on i { left: 27px; }
.modal-actions .pill-btn { min-width: 112px; }

/* 交互态：悬停 / 按下 */
.pill-btn:hover:not([disabled]) { filter: brightness(1.04) drop-shadow(0 3px 6px rgba(60, 50, 30, .16)); transform: translateY(-1px); }
.pill-btn:active:not([disabled]) { filter: brightness(.96); transform: translateY(1px) scale(.97); }
.icon-btn:hover:not([disabled]) { color: var(--sage-deep); border-color: rgba(95, 138, 110, .55); }
.icon-btn:active:not([disabled]) { transform: scale(.92); background: #ece5d6; }
button.chip:hover { border-color: rgba(95, 138, 110, .5); color: var(--ink); }
button.chip:active { transform: scale(.97); background: #ece5d6; }
.potion:hover { transform: translateY(-4px); }
.potion.sel:hover { transform: translateY(-9px); }
.potion:active { transform: translateY(-2px) scale(.94); }
.toggle:hover { border-color: rgba(95, 138, 110, .6); }
.toggle:active i { width: 27px; }
#basketBtn.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- 手势引导（无文字） ---------- */
.gesture { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.g-finger, .g-ripple { position: absolute; left: 0; top: 0; }
.g-finger { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .85); border: 2px solid rgba(59, 58, 54, .45); box-shadow: 0 4px 10px rgba(60, 50, 30, .25); animation: gfinger 3.6s ease-in-out infinite; }
.g-ripple { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .8); opacity: 0; animation: gripple 3.6s ease-out infinite; }
@keyframes gfinger {
  0% { transform: translate(var(--x1), calc(var(--y1) + 40px)); opacity: 0; }
  10% { transform: translate(var(--x1), var(--y1)) scale(1); opacity: 1; }
  18% { transform: translate(var(--x1), var(--y1)) scale(.8); }
  26% { transform: translate(var(--x1), var(--y1)) scale(1); }
  50% { transform: translate(var(--x2), var(--y2)) scale(1); }
  56%, 86% { transform: translate(var(--x2), var(--y2)) scale(.8); opacity: 1; }
  100% { transform: translate(var(--x2), var(--y2)) scale(1); opacity: 0; }
}
@keyframes gripple {
  0%, 55% { transform: translate(var(--x2), var(--y2)) scale(.3); opacity: 0; }
  60% { opacity: .9; }
  88% { transform: translate(var(--x2), var(--y2)) scale(1); opacity: .6; }
  100% { transform: translate(var(--x2), var(--y2)) scale(1.1); opacity: 0; }
}

/* ---------- 任务卡（常驻：关卡 + 订单进度） ---------- */
.order-chip { display: none !important; }
.hud-top { align-items: flex-start; }
.task-card {
  width: 214px; padding: 10px 12px 10px; border-radius: 16px; cursor: pointer; text-align: left;
  background: rgba(246, 241, 230, .95); border: 1.5px solid rgba(143, 179, 154, .55); box-shadow: var(--shadow);
  transition: transform var(--motion), border-color var(--motion), box-shadow var(--motion), opacity var(--motion);
}
.task-card:hover { border-color: var(--sage-deep); transform: translateY(-1px); }
.task-card:active { transform: scale(.98); }
.task-card:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
.task-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.task-level { font-family: var(--title-font); font-size: 19px; color: #35503f; white-space: nowrap; }
.task-theme { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.task-from { margin-top: 2px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-items { list-style: none; margin: 8px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.task-item { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 2px 8px 2px 4px; border-radius: 10px; background: rgba(239, 233, 220, .8); font-size: 13px; }
.task-item .item-icon { width: 30px; height: 30px; }
.task-item .ti-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item b { flex: none; font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.task-item.full { background: rgba(143, 179, 154, .28); }
.task-item.full b { color: var(--sage-deep); }
.task-foot { font-size: 12px; color: var(--ink-soft); }
.task-card.ready { border-color: var(--sage-deep); box-shadow: 0 0 0 4px rgba(143, 179, 154, .35), var(--shadow); animation: taskReady 1.8s ease-in-out infinite; }
.task-card.ready .task-foot { color: #35503f; font-weight: 700; }
.task-card.late { opacity: .78; }
@keyframes taskReady { 50% { box-shadow: 0 0 0 8px rgba(143, 179, 154, .18), var(--shadow); } }
/* 手机竖屏：任务卡放到第二行，整行横排 */
body.lay-portrait .hud-top { flex-wrap: wrap; row-gap: 8px; }
body.lay-portrait .hud-top-right { order: 1; margin-left: auto; }
body.lay-portrait .task-card { order: 2; width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 52px; }
body.lay-portrait .task-head { flex-direction: column; gap: 0; flex: none; }
body.lay-portrait .task-level { font-size: 16px; }
body.lay-portrait .task-theme { font-size: 11px; max-width: 72px; }
body.lay-portrait .task-from, body.lay-portrait .task-foot { display: none; }
body.lay-portrait .task-items { flex-direction: row; flex-wrap: nowrap; overflow: hidden; margin: 0; flex: 1 1 auto; min-width: 0; gap: 4px; }
body.lay-portrait .task-item { min-height: 36px; padding: 2px 6px 2px 2px; }
body.lay-portrait .task-item .ti-name { display: none; }
body.lay-portrait .task-item .item-icon { width: 28px; height: 28px; }
/* 手机横屏：左侧栏里的紧凑任务卡 */
body.lay-short .task-card { width: 184px; padding: 6px 8px; }
body.lay-short .task-from, body.lay-short .task-foot { display: none; }
body.lay-short .task-items { flex-direction: row; flex-wrap: wrap; margin: 4px 0 0; }
body.lay-short .task-item .ti-name { display: none; }
body.lay-short .task-item { min-height: 30px; padding: 1px 6px 1px 2px; }
body.lay-short .task-item .item-icon { width: 26px; height: 26px; }

/* ---------- 新手引导 ---------- */
.coach { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.coach-ring { position: absolute; border: 3px solid rgba(255, 252, 240, .95); box-shadow: 0 0 0 3px rgba(95, 138, 110, .55), 0 0 22px rgba(255, 244, 214, .7); animation: coachPulse 1.6s ease-in-out infinite; }
@keyframes coachPulse { 50% { transform: scale(1.04); opacity: .7; } }
.coach-bubble {
  position: absolute; width: min(320px, calc(100vw - 20px)); padding: 12px 14px 10px; border-radius: 16px; pointer-events: auto;
  background: var(--paper); border: 1.5px solid var(--sage); box-shadow: 0 10px 28px rgba(60, 50, 30, .24);
  animation: coachIn .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes coachIn { from { opacity: 0; transform: translateY(6px); } }
.coach-step { font-size: 12px; color: var(--sage-deep); margin-bottom: 4px; letter-spacing: 1px; }
.coach-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.coach-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.coach-actions:empty { display: none; }
.coach-skip { margin-right: auto; background: none; border: 0; padding: 8px 4px; min-height: 40px; color: var(--ink-soft); font-size: 13px; text-decoration: underline; cursor: pointer; }
.coach-skip:hover { color: var(--ink); }
.coach .pill-btn.coach-ok { min-width: 96px; min-height: 42px; font-size: 16px; }

/* ---------- 关卡开场横幅 ---------- */
.level-banner {
  position: fixed; left: var(--dish-cx, 50%); top: var(--dish-cy, 50%); z-index: 26; transform: translate(-50%, -50%); pointer-events: none;
  min-width: 240px; padding: 16px 40px 14px; text-align: center; border-radius: 18px;
  background: rgba(246, 241, 230, .96); border: 1.5px solid var(--sage); box-shadow: 0 12px 30px rgba(60, 50, 30, .25);
}
.level-banner.in { animation: bannerIn .42s cubic-bezier(.2, .8, .2, 1) both; }
.level-banner.out { animation: bannerOut .32s ease-in both; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -30%) scale(.92); } }
@keyframes bannerOut { to { opacity: 0; transform: translate(-50%, -70%); } }
.lb-num { font-family: var(--title-font); font-size: 34px; letter-spacing: 6px; color: #35503f; }
.lb-theme { margin-top: 4px; font-size: 15px; letter-spacing: 3px; color: var(--ink-soft); }

/* ---------- 天数签：今日浇水量 ---------- */
.day-chip small { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.day-chip small:empty { display: none; }
body.lay-portrait .day-chip small, body.lay-short .day-chip small { display: none; }

/* ---------- 长按结束今天 ---------- */
.hold-btn { position: relative; overflow: hidden; touch-action: none; -webkit-touch-callout: none; }
.hold-btn .hold-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--hold, 0) * 100%); border-radius: 999px; pointer-events: none;
  background: linear-gradient(90deg, rgba(143, 179, 154, .3), rgba(95, 138, 110, .62));
}
.hold-btn > span { position: relative; }
.hold-btn.holding { transform: scale(.97); filter: brightness(1.03); }

/* ---------- 魔法水瓶：按剩余量分状态（满瓶 / 大半瓶 / 小半瓶 / 见底 / 空瓶） ---------- */
.potion .bottle { position: relative; }
.potion .bottle:not(.fallback) { filter: grayscale(.75) brightness(1.12) opacity(.42); }
.potion .bottle-liquid {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-repeat: no-repeat; background-position: center bottom; pointer-events: none;
  clip-path: inset(calc((1 - var(--lv, 1)) * 100%) 0 0 0); transition: clip-path .35s ease;
}
.potion .bottle-wrap.back .bottle-liquid { clip-path: inset(calc((1 - var(--lv2, 0)) * 100%) 0 0 0); }
.potion[data-state="empty"] .bottle-liquid { display: none; }
.potion .bottle-liquid.fallback { left: 14px; right: 14px; bottom: 6px; top: 22px; border-radius: 40% 40% 46% 46%; }
.potion .bottle.fallback { background: rgba(239, 233, 220, .6) !important; }
.potion .potion-meter { display: none; }
.potion .potion-state {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 0 6px; height: 16px; line-height: 16px; border-radius: 8px; font-size: 10px; color: var(--ink-soft);
  background: rgba(246, 241, 230, .92); box-shadow: 0 1px 2px rgba(40, 30, 20, .16);
}
.potion[data-state="full"] .bottle-liquid { filter: drop-shadow(0 0 6px var(--glow, #fff)) saturate(1.1); }
.potion[data-state="full"] .potion-state { color: #35503f; }
.potion[data-state="dregs"] .potion-state, .potion[data-state="dregs"] .potion-count { background: #F4D9A6; color: #6b4a1a; }
.potion[data-state="dregs"] .bottle-liquid { animation: dregs 1.6s ease-in-out infinite; }
@keyframes dregs { 50% { opacity: .65; } }
.potion[data-state="empty"] .bottle { filter: grayscale(1) opacity(.3); }
.potion[data-state="empty"] .potion-state { background: rgba(110, 106, 96, .85); color: #F6F1E6; }
body.lay-short .potion .potion-state { display: none; } /* 横屏手机竖排太挤：只靠液面高低与明暗区分 */

/* ---------- 库存（左下常驻） ---------- */
.inventory {
  position: absolute; width: 214px; padding: 8px 10px 10px; border-radius: 16px; cursor: pointer;
  background: rgba(246, 241, 230, .95); border: 1.5px solid rgba(143, 179, 154, .55); box-shadow: var(--shadow);
  transition: transform var(--motion), border-color var(--motion);
}
.inventory:hover { border-color: var(--sage-deep); }
.inventory:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
.inventory.bump { animation: invBump .4s; }
@keyframes invBump { 40% { transform: scale(1.05); } }
.inv-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.inv-title { font-family: var(--title-font); font-size: 16px; color: #35503f; }
.inv-head small { font-size: 12px; color: var(--ink-soft); }
.inv-more { margin-left: auto; font-size: 12px; color: var(--sage-deep); }
.inv-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 44px); gap: 5px; }
.inv-slot {
  position: relative; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(239, 233, 220, .95); border: 1px solid rgba(110, 106, 96, .18);
}
.inv-slot .item-icon { width: 34px; height: 34px; }
.inv-slot b { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 400; color: var(--ink); text-shadow: 0 0 2px #fff, 0 0 2px #fff; font-variant-numeric: tabular-nums; }
.inv-slot.empty { background: rgba(239, 233, 220, .4); border-style: dashed; }
.inv-slot.want { border-color: var(--sage-deep); box-shadow: inset 0 0 0 1px rgba(95, 138, 110, .45); }
.inv-slot.more { font-size: 13px; color: var(--ink-soft); }
body.lay-desktop .inventory { left: calc(16px + var(--safe-l)); bottom: calc(16px + var(--safe-b)); }
@media (max-width: 980px) { body.lay-desktop .inventory { bottom: calc(118px + var(--safe-b)); } }
body.lay-portrait .inventory {
  left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(100px + var(--safe-b)); width: auto;
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
}
body.lay-portrait .inv-head { flex-direction: column; align-items: flex-start; gap: 0; margin: 0; flex: none; }
body.lay-portrait .inv-more { display: none; }
body.lay-portrait .inv-slots { flex: 1 1 auto; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
body.lay-portrait .inv-slot { width: auto; height: 36px; }
body.lay-portrait .inv-slot .item-icon { width: 28px; height: 28px; }
body.lay-short .inventory { left: calc(12px + var(--safe-l)); bottom: calc(8px + var(--safe-b)); width: 184px; padding: 6px 8px 8px; }
body.lay-short .inv-slots { grid-template-columns: repeat(4, 38px); gap: 4px; }
body.lay-short .inv-slot { width: 38px; height: 38px; }
body.lay-short .inv-slot .item-icon { width: 30px; height: 30px; }

/* 顶部右侧：天数 / 长按结束今天 / 齿轮 */
body.lay-short .hud-top { width: 184px; }
body.lay-short .hud-top-right { flex-direction: row; flex-wrap: wrap; align-items: center; width: 184px; gap: 8px; }
body.lay-short .hud-top-right .hold-btn { order: 3; width: 100%; }
body.lay-portrait .hud-top-right { gap: 6px; }

/* ---------- 悬停花盆：需要多少水 ---------- */
.pot-tip {
  position: fixed; z-index: 18; width: 224px; padding: 10px 12px; border-radius: 14px; pointer-events: none;
  background: rgba(246, 241, 230, .97); border: 1.5px solid rgba(143, 179, 154, .6); box-shadow: 0 8px 22px rgba(40, 30, 20, .22);
  font-size: 13px; color: var(--ink); line-height: 1.45;
}
.tt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tt-head b { font-size: 16px; font-weight: 400; color: #35503f; }
.tt-head span { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.tt-need { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.tt-need li { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; background: rgba(239, 233, 220, .9); }
.tt-need li i { width: 10px; height: 10px; border-radius: 50%; background: var(--wc); box-shadow: 0 0 0 1px rgba(59, 58, 54, .25); flex: none; }
.tt-need li span { flex: 1 1 auto; }
.tt-need li b { font-weight: 400; font-variant-numeric: tabular-nums; font-size: 14px; }
.tt-need li.full { background: rgba(143, 179, 154, .28); }
.tt-today { font-size: 12px; color: var(--ink-soft); }
.tt-state { margin-top: 3px; font-size: 12.5px; color: #7a5a2a; }
.tt-state.ok { color: var(--sage-deep); }
.tt-acid { margin-top: 2px; font-size: 11.5px; color: #3f8a73; }

/* ---------- 全屏浇水圆环 ---------- */
.pour-overlay {
  position: fixed; inset: 0; z-index: 24; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; background: rgba(22, 17, 12, .42); backdrop-filter: blur(7px) brightness(.72); -webkit-backdrop-filter: blur(7px) brightness(.72);
  opacity: 0; transition: opacity .16s ease; touch-action: none; user-select: none;
}
.pour-overlay.on { opacity: 1; }
.pour-title { color: #F6F1E6; font-size: 22px; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); text-align: center; }
.pour-stage { position: relative; transition: opacity .15s, transform .15s; }
.pour-stage canvas { display: block; }
.pour-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.pc-num { display: flex; align-items: baseline; gap: 4px; }
.pc-num b { font-size: clamp(44px, 12vmin, 78px); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.pc-num span { color: #F6F1E6; font-size: 18px; }
.pc-water { margin-top: 6px; color: rgba(246, 241, 230, .92); font-size: 14px; max-width: 66%; }
.pc-need { margin-top: 4px; color: rgba(246, 241, 230, .82); font-size: 13px; max-width: 64%; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pour-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 92vw; }
.pour-legend .pl { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 13px; color: #F6F1E6; background: rgba(246, 241, 230, .12); border: 1px solid rgba(246, 241, 230, .18); font-variant-numeric: tabular-nums; }
.pour-legend .pl i { width: 10px; height: 10px; border-radius: 50%; background: var(--wc); }
.pour-legend .pl.cur { border-color: var(--wc); background: rgba(246, 241, 230, .2); }
.pour-legend .pl.full { opacity: .7; }
.pour-hint { padding: 8px 18px; border-radius: 999px; background: rgba(246, 241, 230, .94); color: var(--ink); font-size: 15px; text-align: center; max-width: 92vw; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.pour-overlay.armed .pour-stage { opacity: .4; transform: scale(.94); }
.pour-overlay.armed .pour-hint { background: #F4D9A6; }
body.lay-portrait .pour-title, body.lay-short .pour-title { font-size: 18px; }
body.lay-short .pour-overlay { gap: 6px; }
body.lay-short .pour-legend { display: none; }
@media (max-width: 420px) { .pc-water { font-size: 12px; } .pc-need { font-size: 11.5px; } .pour-hint { font-size: 13px; } }

/* 圆环下方的说明只出现一次：没有文字时整条收起 */
.pour-hint.quiet { visibility: hidden; }
.pour-cancel { min-height: 40px; font-size: 15px; }
/* 喂慢慢：整个遮罩都可以按住 */
.pour-overlay.feed { cursor: pointer; }

/* ---------- 委托看板：一份委托一个方格 ---------- */
.order-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin: 0 0 12px; }
.ob-cell { position: relative; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 4px 2px; border-radius: 12px; border: 1.5px solid rgba(110, 106, 96, .22); background: rgba(239, 233, 220, .7); cursor: pointer;
  font-family: var(--body-font); color: var(--ink); min-width: 0; }
.ob-cell .ob-icon { position: relative; display: flex; align-items: center; justify-content: center; height: 32px; }
.ob-cell .item-icon { width: 30px; height: 30px; }
.ob-cell .ob-more { position: absolute; right: -14px; top: -2px; font-style: normal; font-size: 10.5px; color: var(--ink-soft); }
.ob-cell .ob-sub { font-size: 11.5px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-cell .ob-coin { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; color: #8C6A48; }
.ob-cell .ob-coin .coin-ic { width: 10px; height: 10px; }
.ob-cell.active { background: #FFFBF1; border-color: rgba(143, 179, 154, .6); }
.ob-cell.ready { background: rgba(143, 179, 154, .28); border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(143, 179, 154, .3); animation: obReady 1.6s ease-in-out infinite; }
.ob-cell.done { opacity: .62; background: rgba(239, 233, 220, .45); }
.ob-cell.later { cursor: default; border-style: dashed; background: transparent; color: var(--ink-soft); }
.ob-cell.later .ob-seal { width: 26px; height: 18px; border-radius: 3px; background: #EADFC8; border: 1px solid #CDB991; position: relative; }
.ob-cell.later .ob-seal::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #C98F7A; }
.ob-check { position: absolute; right: -6px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--sage-deep); }
.ob-check::after { content: ''; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes obReady { 50% { box-shadow: 0 0 0 5px rgba(143, 179, 154, .18); } }
.order-one.flash { animation: orderFlash .9s ease-out; }
@keyframes orderFlash { 0% { box-shadow: 0 0 0 4px rgba(232, 194, 122, .8); } 100% { box-shadow: 0 0 0 0 rgba(232, 194, 122, 0); } }
.task-board { display: flex; flex-wrap: wrap; gap: 3px; margin: 3px 0 2px; }
.tb-cell { width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(110, 106, 96, .35); background: #FFFBF1; }
.tb-cell.done { background: var(--sage-deep); border-color: var(--sage-deep); }
.tb-cell.ready { background: #E8C27A; border-color: #C9A050; }
.tb-cell.later { border-style: dashed; background: transparent; }
.pot-ic img { filter: none; }
@media (prefers-reduced-motion: reduce) { .ob-cell.ready, .order-one.flash, .snail-spill { animation: none; } }

/* ---------- 委托卡（弹窗内，每份委托一段） ---------- */
.order-one { padding: 8px 10px 10px; margin: 0 0 10px; border-radius: 14px; background: rgba(239, 233, 220, .55); border: 1px solid rgba(110, 106, 96, .12); }
.order-one.ok { background: rgba(143, 179, 154, .18); border-color: rgba(95, 138, 110, .35); }
.order-one .order-greet { margin: 4px 2px 6px; }
.order-act { display: flex; justify-content: center; margin-top: 8px; }
.order-act .pill-btn { min-height: 42px; font-size: 16px; }
.set-row .set-btn { min-width: 92px; min-height: 40px; font-size: 15px; }
.task-item.empty { background: transparent; color: var(--ink-soft); }
.task-card.fresh { animation: taskFresh 1.2s ease-out 2; }
@keyframes taskFresh { 30% { box-shadow: 0 0 0 6px rgba(232, 194, 122, .45), var(--shadow); border-color: var(--gold); } }

@media (max-height: 520px) { .title-card { margin-top: 18vh; } .game-title { font-size: 34px; } .game-sub { margin-bottom: 10px; } }

/* =====================================================================
   第 N 轮：一天一浇、独立圆环、水瓶状态、手套/铲子、种子库存、金币商店、小蜗牛
   ===================================================================== */
/* ---------- 药水栏：水瓶 + 工具 ---------- */
.potion-bar { align-items: flex-end; gap: 14px; }
.potion-bar .bottles { display: flex; align-items: flex-end; gap: 10px; }
.potion-bar .tools { display: flex; align-items: flex-end; gap: 8px; padding-left: 14px; border-left: 1.5px dashed rgba(110, 106, 96, .3); }
.potion .bottle-wrap { position: absolute; inset: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease; }
.potion .bottle-wrap.back { opacity: 0; transform: translate(-10px, -6px) scale(.84); }
.potion.double .bottle-wrap.back { opacity: 1; }
.potion.double .bottle-wrap.front { transform: translate(6px, 2px) scale(.94); }
.potion .bottle-wrap .bottle { position: absolute; inset: 0; width: auto; height: auto; }
.potion .bottle-wrap .bottle.fallback { inset: 22px 14px 6px; }
.potion .potion-key {
  position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 6px; font-size: 11px; line-height: 18px; text-align: center;
  color: var(--ink-soft); background: rgba(246, 241, 230, .8); pointer-events: none; opacity: 0; transition: opacity var(--motion);
}
.potion:hover .potion-key, .potion.sel .potion-key { opacity: 1; }
body.lay-portrait .potion .potion-key { display: none; }
/* 选中：明显抬起 + 水色光环 + 底座光点 */
.potion.sel { transform: translateY(-12px) scale(1.06); }
.potion.sel::before {
  inset: -8px -6px -4px; border-radius: 22px; opacity: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, #fff) 55%, transparent) 0%, transparent 100%);
  box-shadow: 0 0 0 2.5px var(--glow, #fff), 0 0 18px var(--glow, #fff);
  animation: selGlow 1.6s ease-in-out infinite;
}
.potion.sel .potion-state { background: var(--glow, #fff); color: #2b231d; font-weight: 700; }
.potion.sel:hover { transform: translateY(-13px) scale(1.06); }
@keyframes selGlow { 50% { box-shadow: 0 0 0 2.5px var(--glow, #fff), 0 0 30px var(--glow, #fff); } }
.potion .potion-count { min-width: 30px; }
.potion[data-state="more"] .potion-state { color: #35503f; }
.potion[data-state="more"] .bottle-liquid, .potion[data-state="full"] .bottle-liquid { filter: drop-shadow(0 0 5px var(--glow, #fff)) saturate(1.1); }
.potion[data-state="low"] .potion-count { background: #F4E4C4; }
.potion[data-state="empty"] .bottle { filter: grayscale(1) brightness(1.15) opacity(.32); }
.potion[data-state="empty"] { cursor: not-allowed; }
.potion.wobble { animation: bottleWobble .6s ease-in-out; transform-origin: 50% 90%; }
@keyframes bottleWobble { 15% { rotate: -14deg; } 35% { rotate: 11deg; } 55% { rotate: -7deg; } 75% { rotate: 4deg; } 100% { rotate: 0deg; } }
/* 手套 / 铲子 */
.tool-btn {
  position: relative; width: 58px; height: 74px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; transition: transform var(--motion);
}
.tool-btn .tool-ic {
  width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(246, 241, 230, .94); border: 1.5px solid rgba(110, 106, 96, .3); box-shadow: 0 2px 6px rgba(60, 50, 30, .14);
}
.tool-btn .tool-ic img, .tool-btn .tool-ic svg { width: 38px; height: 38px; object-fit: contain; pointer-events: none; }
.tool-btn .tool-name { font-size: 11px; color: var(--ink-soft); padding: 0 6px; height: 16px; line-height: 16px; border-radius: 8px; background: rgba(246, 241, 230, .92); }
.tool-btn:hover { transform: translateY(-3px); }
.tool-btn.sel { transform: translateY(-10px); }
.tool-btn.sel .tool-ic { border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(143, 179, 154, .55), 0 0 16px rgba(232, 194, 122, .6); background: #fffaf0; }
.tool-btn.sel .tool-name { background: var(--sage-deep); color: #fff; }
.tool-btn.shake, .inventory.shake, .potion-bar.shake { animation: shake .36s; }
body.lay-portrait .potion-bar { gap: 6px; }
body.lay-portrait .potion-bar .bottles { gap: 2px; }
body.lay-portrait .potion { width: 52px; height: 80px; }
body.lay-portrait .potion-bar .tools { gap: 4px; padding-left: 6px; }
body.lay-portrait .tool-btn { width: 44px; height: 64px; }
body.lay-portrait .tool-btn .tool-ic { width: 40px; height: 40px; border-radius: 12px; }
body.lay-portrait .tool-btn .tool-ic img, body.lay-portrait .tool-btn .tool-ic svg { width: 30px; height: 30px; }
body.lay-short .potion-bar { flex-direction: column; align-items: center; gap: 4px; }
body.lay-short .potion-bar .bottles { flex-direction: column; gap: 0; }
body.lay-short .potion-bar .tools { flex-direction: column; border-left: 0; border-top: 1.5px dashed rgba(110, 106, 96, .3); padding: 4px 0 0; gap: 2px; }
body.lay-short .tool-btn { width: 52px; height: 50px; }
body.lay-short .tool-btn .tool-name { display: none; }
body.lay-short .tool-btn .tool-ic { width: 44px; height: 44px; }

/* ---------- 金币 ---------- */
.coin-ic { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none; vertical-align: -3px;
  background: radial-gradient(circle at 35% 30%, #FFF1C2 0 18%, #F2C66D 40%, #C9973F 100%); box-shadow: inset 0 0 0 1.5px rgba(150, 105, 40, .55); }
.coin-chip b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 18px; }
.coin-chip .coin-shop { font-size: 12px; color: var(--sage-deep); padding-left: 6px; border-left: 1px solid rgba(110, 106, 96, .25); }
.coin-chip.bump { animation: bump .45s; }
body.lay-portrait .coin-chip .coin-shop { display: none; }
body.lay-short .coin-chip { order: 2; }

/* ---------- 库存：种子 ---------- */
.inv-head { cursor: pointer; border-radius: 8px; }
.inv-head:hover .inv-more { text-decoration: underline; }
.inv-slot { cursor: pointer; }
.inv-slot.empty { cursor: default; }
.inv-slot.seed { background: #F3EBD7; border-color: rgba(143, 120, 80, .35); cursor: grab; touch-action: none; }
.inv-slot.seed:active { cursor: grabbing; }
.inv-slot.seed .seed-tag { position: absolute; left: 2px; top: 1px; font-style: normal; font-size: 10px; line-height: 14px; padding: 0 3px; border-radius: 5px; color: #fff; background: #8C6A48; }
.inv-slot.seed.sel { border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(143, 179, 154, .55); background: #fffaf0; }
.inv-slot img { pointer-events: none; -webkit-user-drag: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 30; width: 56px; height: 56px; pointer-events: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; background: rgba(246, 241, 230, .92); border: 2px dashed rgba(110, 106, 96, .5); box-shadow: 0 8px 18px rgba(40, 30, 20, .25); }
.drag-ghost.ok { border-color: var(--sage-deep); border-style: solid; box-shadow: 0 0 0 4px rgba(143, 179, 154, .45), 0 8px 18px rgba(40, 30, 20, .25); }
.drag-ghost .item-icon { width: 44px; height: 44px; }

/* ---------- 悬停提示 ---------- */
.pot-tip .tt-need { display: flex; align-items: center; gap: 7px; margin: 7px 0 4px; padding: 5px 9px; border-radius: 9px; background: rgba(239, 233, 220, .95); flex-direction: row; }
.pot-tip .tt-need i { width: 12px; height: 14px; flex: none; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--wc); box-shadow: 0 0 0 1px rgba(59, 58, 54, .3); }
.pot-tip .tt-need span { flex: 1 1 auto; }
.pot-tip .tt-need span b { font-size: 16px; font-weight: 700; color: #35503f; }
.pot-tip .tt-need em { font-style: normal; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.tt-state.thirsty { color: #b0662a; }
.tt-state.miss { color: #8a7d6a; }

/* ---------- 全屏浇水圆环 ---------- */
.pc-water { margin: 0; font-family: var(--title-font); font-size: clamp(22px, 6vmin, 34px); letter-spacing: 2px; color: #F6F1E6; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); max-width: 70%; }
.pc-feel { margin-top: 4px; font-size: 14px; color: rgba(246, 241, 230, .86); letter-spacing: 1px; }
.pc-result { margin-top: 8px; font-family: var(--title-font); font-size: clamp(26px, 8vmin, 44px); letter-spacing: 4px; color: #FFF4D6; text-shadow: 0 0 18px rgba(255, 244, 214, .7), 0 2px 8px rgba(0, 0, 0, .4); animation: resultPop .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.pc-result.r-under, .pc-result.r-wrong { color: #D9D1C2; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.pc-result.r-perfect { font-size: clamp(32px, 10vmin, 56px); }
@keyframes resultPop { from { opacity: 0; transform: scale(.6); } }
.pour-legend { color: #F6F1E6; font-size: 14px; padding: 5px 14px; border-radius: 999px; background: rgba(246, 241, 230, .12); border: 1px solid rgba(246, 241, 230, .2); }
.pour-legend.warn { background: rgba(232, 160, 90, .28); border-color: rgba(244, 200, 150, .6); }
.wt { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.wt i { width: 10px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--wc); }
.pour-overlay.hit .pour-hint { background: #FFF4D6; box-shadow: 0 0 22px rgba(255, 244, 214, .8); }
.pour-overlay.spill .pour-stage { animation: spillShake .18s linear infinite; }
.pour-overlay.spill .pour-hint { background: #F4D9A6; }
.pour-overlay.done .pour-hint { font-weight: 700; }
@keyframes spillShake { 25% { translate: -2px 1px; } 75% { translate: 2px -1px; } }

/* ---------- 弹窗内容补充 ---------- */
.row-name small.kind, .row-name .kind { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.3; white-space: normal; }
.order-seeds { margin: 6px 4px 0; font-size: 13px; color: #6b5233; }
.task-item .ti-name small { margin-left: 3px; font-size: 10px; color: #8C6A48; }
.seed-ic img { filter: saturate(.9); }
.water-ic i { width: 18px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--wc); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .08), 0 0 0 1px rgba(59, 58, 54, .25); }
.shop-coins { margin: 0 0 6px; text-align: center; color: var(--ink-soft); }
.shop-coins b { font-size: 20px; color: var(--ink); margin: 0 3px; }
.buy-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px; min-width: 72px; height: 40px; padding: 0 12px; justify-content: center;
  border-radius: 12px; border: 1.5px solid var(--sage); background: var(--paper); cursor: pointer; font-family: var(--body-font); color: var(--ink);
}
.buy-btn b { font-weight: 700; font-variant-numeric: tabular-nums; }
.buy-btn:hover:not([disabled]) { border-color: var(--sage-deep); background: #fffaf0; }
.buy-btn[disabled] { opacity: .45; cursor: default; }
.buy-btn.bought { animation: bump .4s; }
/* 慢慢的信 */
.modal-root.letter-mode .modal-title { color: #6b5233; }
.letter { position: relative; padding: 4px 4px 0; }
.letter-open { margin: 0 0 8px; font-style: italic; color: var(--ink-soft); text-align: center; }
.letter-list { margin: 0; padding: 10px 12px 10px 26px; border-radius: 12px; background: repeating-linear-gradient(transparent 0 27px, rgba(143, 120, 80, .14) 27px 28px), rgba(243, 235, 215, .7); line-height: 28px; font-size: 14.5px; }
.letter-ps { margin: 10px 4px 0; color: #8C6A48; font-size: 14px; }
.letter-sign { margin: 8px 6px 0; text-align: right; color: #6b5233; font-size: 16px; }

/* ---------- 小蜗牛「慢慢」 ---------- */
.snail-face { display: inline-block; width: 26px; height: 26px; flex: none; background: var(--snail-url, none) center / contain no-repeat; }
.snail-face.big { width: 64px; height: 64px; }
.snail { position: fixed; left: 0; top: 0; z-index: 9; width: 84px; height: 48px; cursor: pointer; transition: none; }
.snail .snail-body { width: 84px; height: 48px; animation: snailCrawl 1.4s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 3px 2px rgba(40, 30, 20, .22)); }
/* 侧身图朝右；向左爬时水平翻转 */
.snail-side { display: block; width: 84px; height: 48px; background: url("assets/snail_side.webp") 50% 50% / 132px 132px no-repeat; }
.snail.flip .snail-side { transform: scaleX(-1); }
.snail-spill { position: fixed; z-index: 8; width: 60px; height: 16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--wc) 70%, transparent), transparent); animation: spillFade 2.5s ease-out forwards; }
@keyframes spillFade { from { opacity: 0; transform: scale(.4); } 15% { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.25); } }
.snail:hover .snail-body { filter: drop-shadow(0 4px 3px rgba(40, 30, 20, .25)) brightness(1.08); }
.snail:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 2px; border-radius: 50%; }
@keyframes snailCrawl { 50% { transform: scaleX(1.06) scaleY(.95); } }
.snail-want { position: absolute; left: 34px; top: -26px; width: 34px; height: 30px; border-radius: 50%; background: #FFFDF6; border: 1.5px solid #D9CDB6;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(40, 30, 20, .2); animation: wantBob 1.6s ease-in-out infinite; }
.snail-want::after { content: ''; position: absolute; left: 4px; bottom: -6px; width: 7px; height: 7px; border-radius: 50%; background: #FFFDF6; border: 1.5px solid #D9CDB6; }
.snail-want .item-icon { width: 24px; height: 24px; }
.want-drop { width: 12px; height: 15px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--wc); box-shadow: 0 0 0 1px rgba(59, 58, 54, .3); }
@keyframes wantBob { 50% { transform: translateY(-3px); } }
.snail-bubble {
  position: fixed; z-index: 22; width: min(300px, calc(100vw - 20px)); padding: 10px 14px 12px; border-radius: 16px;
  background: var(--paper); border: 1.5px solid #CDB991; box-shadow: 0 10px 26px rgba(60, 50, 30, .24); animation: coachIn .25s cubic-bezier(.2, .8, .2, 1);
}
.sb-text { margin: 4px 0 0; font-size: 14.5px; line-height: 1.65; white-space: pre-line; }
.sb-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.sb-actions .pill-btn { min-width: 0; min-height: 40px; font-size: 15px; }
.coach-who { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.coach-who b { font-size: 14px; font-weight: 400; color: #6b5233; }
.coach-who .coach-step { margin: 0 0 0 auto; }
.snail-heart { position: fixed; z-index: 23; width: 12px; height: 12px; pointer-events: none; background: #E89A9A; transform: rotate(45deg); border-radius: 2px 0 0 0; animation: heartUp 1.3s ease-out forwards; }
.snail-heart::before, .snail-heart::after { content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: inherit; }
.snail-heart::before { left: -6px; top: 0; } .snail-heart::after { left: 0; top: -6px; }
@keyframes heartUp { from { opacity: 0; translate: 0 0; } 20% { opacity: 1; } to { opacity: 0; translate: 0 -46px; } }

@media (prefers-reduced-motion: reduce) {
  .snail .snail-body, .snail-want, .potion.sel::before, .pour-overlay.spill .pour-stage, .potion.wobble { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .day-veil.breath, .potion-bar.shake, .loading-drop, #basketBtn.bump { animation: none; }
  .g-finger { animation-duration: 7s; }
  .coach-ring, .coach-bubble, .task-card.ready, .level-banner.in, .level-banner.out { animation: none; }
}
