/* ============================================================
   灵兽乐园 · 视觉系统 v2
   近黑靛蓝底 + 极淡极光晕 + 玻璃拟态卡片
   主色：星云紫 --nebula / 极光青 --aurora；金色 --gold 只作星币点缀
   去掉硬立体阴影，改用柔和同色投影
   ============================================================ */
:root {
  --bg0: #07070f; --bg1: #0c0d1c; --bg2: #141634;
  --ink: #eef0ff; --muted: #98a1c9;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .045); --glass-hi: rgba(255, 255, 255, .08);
  --nebula: #8b7cff; --nebula-2: #6d5cf0; --aurora: #45e0d0;
  --gold: #ffcf6b; --gold-2: #ffb02e;
  --ok: #57e08f; --warn: #ffb45c; --bad: #ff7597;
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .34);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .26);
  --glow: 0 10px 30px rgba(109, 92, 240, .32);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --rail: 90px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink); background: var(--bg0); overflow-x: hidden;
  -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%;
  line-height: 1.45;
}
input, textarea, select { -webkit-user-select: text; user-select: text; font: inherit; }

/* 极淡极光晕背景（不再是大片紫渐变） */
.sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 620px at 14% -12%, rgba(139, 124, 255, .20), transparent 62%),
    radial-gradient(900px 520px at 92% -6%, rgba(69, 224, 208, .10), transparent 60%),
    radial-gradient(1000px 760px at 50% 122%, rgba(139, 124, 255, .10), transparent 62%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
}
.sky::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, .6) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 34% 62%, rgba(255, 255, 255, .45) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 46%, rgba(255, 255, 255, .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 84%, rgba(255, 255, 255, .4) 50%, transparent 51%);
}

#app {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: calc(14px + var(--safe-t)) 18px calc(98px + var(--safe-b));
  min-height: 100%;
}
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
small { font-size: 13px; }

/* ---------- 底部导航（竖屏）/ 左侧竖栏（横屏） ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 4px;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: rgba(9, 10, 22, .82);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid var(--line);
}
.nav a {
  flex: 1; max-width: 150px; text-align: center; color: var(--muted); text-decoration: none;
  font-size: 12px; padding: 8px 0; border-radius: 16px; position: relative; transition: color .18s, background .18s;
}
.nav a .ic { display: block; margin: 0 auto 3px; width: 24px; height: 24px; }
.nav a .ic svg { width: 100%; height: 100%; display: block; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav a b { font-weight: 600; }
.nav a.on { color: #fff; background: var(--glass-hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav a.on .ic { color: var(--nebula); filter: drop-shadow(0 0 8px rgba(139, 124, 255, .7)); }
.nav a .dot {
  position: absolute; top: 4px; right: calc(50% - 26px); background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; line-height: 18px; padding: 0 4px;
  box-shadow: 0 0 12px rgba(255, 117, 151, .6);
}

/* ---------- 通用 ---------- */
.card {
  background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.big-btn {
  appearance: none; border: 0; border-radius: 999px; padding: 14px 26px; min-height: 52px;
  font-size: 17px; font-weight: 700; color: #fff; cursor: pointer; transition: transform .1s, filter .15s;
  background: linear-gradient(180deg, #9b8cff, var(--nebula-2));
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.big-btn:active { transform: translateY(2px) scale(.99); filter: brightness(.96); }
.big-btn.blue { background: linear-gradient(180deg, #5fe6d6, #24b6a6); box-shadow: 0 10px 30px rgba(36, 182, 166, .3), inset 0 1px 0 rgba(255, 255, 255, .3); }
.big-btn.green { background: linear-gradient(180deg, #6ee7a0, #26a765); box-shadow: 0 10px 30px rgba(38, 167, 101, .28), inset 0 1px 0 rgba(255, 255, 255, .28); }
.big-btn.gold { color: #3a2400; background: linear-gradient(180deg, #ffe08a, var(--gold-2)); box-shadow: 0 10px 28px rgba(255, 176, 46, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.big-btn.red { background: linear-gradient(180deg, #ff8fa8, #e04a72); box-shadow: 0 10px 30px rgba(224, 74, 114, .28); }
.big-btn.ghost { color: var(--ink); background: var(--glass-hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.big-btn:disabled { filter: grayscale(.7) opacity(.5); }
.btn-sm {
  appearance: none; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 14px; font-size: 15px;
  font-weight: 600; color: var(--ink); background: var(--glass-hi); cursor: pointer;
}
.btn-sm.ok { background: rgba(87, 224, 143, .18); border-color: rgba(87, 224, 143, .45); color: #b9f4d4; }
.btn-sm.no { background: rgba(255, 117, 151, .16); border-color: rgba(255, 117, 151, .45); color: #ffc2d3; }
.btn-sm.gold { background: rgba(255, 207, 107, .18); border-color: rgba(255, 207, 107, .45); color: #ffe6b4; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.page-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 16px; }
.page-title h2 { font-size: 25px; letter-spacing: .5px; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 207, 107, .12);
  color: var(--gold); border: 1px solid rgba(255, 207, 107, .32); border-radius: 999px;
  padding: 7px 15px; font-weight: 800; font-size: 17px; white-space: nowrap;
}
.section-h { font-size: 15px; font-weight: 700; letter-spacing: .5px; margin: 22px 4px 10px; color: var(--muted); }

/* ---------- 首页布局（先竖屏单列 → 横屏两栏） ---------- */
.home { display: grid; gap: 14px; grid-template-columns: 1fr;
  grid-template-areas: "hero" "trip" "stage" "xp" "streak" "wish" "daily" "actions"; }
.home-stage { grid-area: stage; position: relative; }
.xp-card { grid-area: xp; }
.streak-card { grid-area: streak; }
.daily-card { grid-area: daily; }
.home-actions { grid-area: actions; }
.hero-card { grid-area: hero; }

@media (min-width: 1000px) and (orientation: landscape) {
  #app { max-width: 1440px; padding: calc(18px + var(--safe-t)) calc(24px + var(--safe-r)) 20px calc(var(--rail) + 24px + var(--safe-l)); }
  .nav {
    left: 0; top: 0; bottom: 0; right: auto; width: var(--rail);
    flex-direction: column; justify-content: center; gap: 10px;
    padding: calc(14px + var(--safe-t)) 12px calc(14px + var(--safe-b)) calc(12px + var(--safe-l));
    border-top: 0; border-right: 1px solid var(--line);
  }
  .nav a { flex: none; width: 100%; max-width: none; padding: 12px 4px; border-radius: 16px; }
  .nav a .ic { width: 26px; height: 26px; }
  .nav a .dot { right: 12px; top: 6px; }
  .home {
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr);
    grid-template-areas: "stage hero" "stage trip" "stage xp" "stage streak" "stage wish" "stage daily" "stage actions";
    align-content: start;
  }
  .home .home-stage { display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- 首页 · 主角卡片 ---------- */
.hero-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.hero-card .hero-main { flex: 1; min-width: 0; }
.hero-card .name { font-size: 23px; font-weight: 800; letter-spacing: .3px; }
/* 名字后面的改名小铅笔：平时淡淡的不抢眼，手指碰上去才亮（孩子端要够大好点） */
.hero-card .name-edit {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 5px 6px; margin-left: 6px; vertical-align: 3px;
  border-radius: 10px; opacity: .5; transition: opacity .2s, background .2s;
}
.hero-card .name-edit:hover, .hero-card .name-edit:active { opacity: 1; background: var(--glass-hi); }
.hero-card .form { color: var(--muted); font-size: 14px; margin-top: 2px; }
.lv-badge {
  flex: none; display: flex; align-items: center; justify-content: center; min-width: 60px; height: 60px;
  padding: 0 10px; border-radius: 18px; font-weight: 900; font-size: 19px;
  background: linear-gradient(150deg, rgba(139, 124, 255, .35), rgba(69, 224, 208, .18));
  border: 1px solid rgba(139, 124, 255, .45); color: #fff;
  box-shadow: 0 0 26px rgba(109, 92, 240, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.stars { color: var(--gold); letter-spacing: 2px; }
.parent-lock {
  appearance: none; border: 1px solid var(--line-2); background: var(--glass-hi); color: var(--muted);
  border-radius: 14px; width: 44px; height: 44px; font-size: 18px; cursor: pointer; flex: none;
}
/* 声音开关：开着的时候亮一点，让娃一眼看出现在有没有声音 */
.sound-btn { font-size: 17px; }
.sound-btn.on { color: #ffd166; border-color: rgba(255, 209, 102, .5); background: rgba(255, 209, 102, .12); }

.stage { position: relative; width: 100%; height: min(56vh, 600px); min-height: 320px; margin: 2px auto 0; }
@media (min-width: 1000px) and (orientation: landscape) { .stage { height: min(80vh, 760px); } }
.stage .aura {
  position: absolute; left: 50%; top: 50%; width: min(80%, 560px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; filter: blur(46px); opacity: .85;
  animation: aura 6.5s ease-in-out infinite; pointer-events: none;
}
@keyframes aura { 0%, 100% { transform: translate(-50%, -50%) scale(.9); opacity: .7; } 50% { transform: translate(-50%, -50%) scale(1.06); opacity: .95; } }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage .pet-wrap { position: absolute; left: 50%; top: 50%; width: min(80vw, 470px, 50vh); aspect-ratio: 1; transform: translate(-50%, -48%); cursor: pointer; }
@media (min-width: 1000px) and (orientation: landscape) { .stage .pet-wrap { width: min(44vw, 560px, 74vh); } }
.stage .pet-inner { width: 100%; height: 100%; }
.bubble {
  position: absolute; left: 50%; top: 4%; transform: translateX(-50%) scale(.7); opacity: 0;
  max-width: min(88%, 440px); z-index: 3; background: rgba(255, 255, 255, .96); color: #1c1a36;
  font-size: 18px; font-weight: 600; line-height: 1.45; padding: 12px 18px; border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38); transition: all .28s cubic-bezier(.3, 1.5, .5, 1);
  pointer-events: none; text-align: center;
}
.bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -9px; border: 9px solid transparent; border-top-color: rgba(255, 255, 255, .96); border-bottom: 0; }
.float-num {
  position: absolute; left: 50%; top: 38%; font-size: 38px; font-weight: 900; color: var(--gold);
  text-shadow: 0 4px 18px rgba(0, 0, 0, .6); animation: floatup 1.7s ease-out forwards;
  pointer-events: none; z-index: 4; white-space: nowrap;
}
@keyframes floatup {
  0% { transform: translate(-50%, 0) scale(.5); opacity: 0; }
  20% { transform: translate(-50%, -22px) scale(1.18); opacity: 1; }
  100% { transform: translate(-50%, -128px) scale(1); opacity: 0; }
}

/* 下一形态预告（横屏浮在左下角；竖屏成为普通一块） */
.next-preview {
  position: static; margin-top: 12px; padding: 12px 14px; border-radius: 18px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(150deg, rgba(139, 124, 255, .16), rgba(255, 255, 255, .04));
  border: 1px solid var(--line-2);
}
.next-preview .box { width: 58px; height: 58px; flex: none; }
.next-preview .tx { min-width: 0; }
.next-preview .tx b { font-size: 16px; }
.next-preview .tx p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.next-preview .silhouette { filter: grayscale(1) brightness(.62) contrast(1.05); }
@media (min-width: 1000px) and (orientation: landscape) {
  .next-preview {
    position: absolute; left: 0; bottom: 6px; margin: 0; width: 216px;
    background: rgba(10, 11, 24, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
}

/* 成长条 */
.xp-card { padding: 16px; }
.xp-bar { height: 12px; background: rgba(0, 0, 0, .38); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); margin: 10px 0 8px; }
.xp-fill {
  height: 100%; border-radius: 999px; transition: width .9s cubic-bezier(.3, 1, .3, 1);
  background: linear-gradient(90deg, var(--nebula), var(--aurora));
  box-shadow: 0 0 16px rgba(107, 200, 255, .55);
}
.xp-text { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.next-form { margin-top: 8px; font-size: 15.5px; }
.next-form b { color: var(--gold); }

/* 连续打卡卡 */
.streak-card { padding: 15px 16px; }
.streak-head { display: flex; align-items: baseline; gap: 8px; }
.streak-head .lab { font-size: 14px; color: var(--muted); }
.streak-num { font-size: 27px; font-weight: 900; color: var(--gold); line-height: 1; }
.streak-hint { margin-left: auto; font-size: 13px; color: var(--muted); }
.week-dots { display: flex; gap: 6px; margin-top: 12px; }
.week-dots i {
  flex: 1; height: 40px; border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-style: normal;
  font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  transition: all .25s;
}
.week-dots i em { font-style: normal; font-size: 14px; font-weight: 800; opacity: .35; }
.week-dots i.on { background: linear-gradient(180deg, rgba(255, 207, 107, .3), rgba(255, 207, 107, .1)); border-color: rgba(255, 207, 107, .5); color: var(--gold); }
.week-dots i.on em { opacity: 1; }
.week-dots i.today { box-shadow: inset 0 0 0 2px rgba(139, 124, 255, .7); }
.week-dots i.today em { opacity: 1; }
.streak-foot { margin-top: 11px; font-size: 13px; color: var(--muted); }

/* 今日能量 + 下一步 */
.daily-card { display: flex; flex-direction: column; gap: 14px; padding: 15px 16px; }
.daily-top { display: flex; align-items: center; gap: 14px; }
.daily-card .num { font-size: 34px; font-weight: 900; color: var(--ink); line-height: 1; }
.daily-card .cap-bar { height: 8px; background: rgba(0, 0, 0, .38); border-radius: 999px; overflow: hidden; margin: 7px 0 5px; }
.daily-card .cap-bar div { height: 100%; background: linear-gradient(90deg, var(--aurora), var(--gold)); border-radius: 999px; transition: width .8s; }
.quick-tasks { display: flex; flex-direction: column; gap: 8px; }
.qt-title { font-size: 13px; color: var(--muted); }
.quick {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(139, 124, 255, .1); color: var(--ink);
  border-radius: 14px; padding: 11px 14px; font-size: 15.5px; transition: transform .12s, border-color .18s;
}
.quick:active { transform: scale(.98); border-color: rgba(139, 124, 255, .65); }
.quick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick b { color: var(--gold); font-weight: 800; }

.mood-banner { margin-top: 12px; padding: 12px 16px; border-radius: 16px; font-size: 15.5px; line-height: 1.5; border: 1px solid transparent; }
.mood-banner.hungry { background: rgba(255, 180, 92, .12); border-color: rgba(255, 180, 92, .38); }
.mood-banner.weak { background: rgba(255, 117, 151, .12); border-color: rgba(255, 117, 151, .42); }
.mood-banner.leave { background: rgba(139, 124, 255, .12); border-color: rgba(139, 124, 255, .38); }
/* 「再饿下去就要变小了」：唯一会让孩子心里一紧的提示，所以给它红色 + 呼吸式光晕 */
.mood-banner.danger {
  background: rgba(255, 77, 79, .14); border-color: rgba(255, 77, 79, .52); color: #ffe0e0;
  animation: danger-glow 1.9s ease-in-out infinite;
}
@keyframes danger-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0), inset 0 0 0 0 rgba(255, 77, 79, 0); }
  50% { box-shadow: 0 0 20px 0 rgba(255, 77, 79, .32), inset 0 0 22px 0 rgba(255, 77, 79, .12); }
}

/* ---------- 宠物形象右上角的"要变小了"警告三角 ----------
   位置按家长要求放在**宠物形象**的右上角，悬在形象框外侧，不压头也不压身体。 */
.stage .shrink-warn {
  position: absolute; top: -2%; right: 1%; z-index: 7; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stage .shrink-warn .sw-icon { display: block; line-height: 0; color: #ffb02e; }
.stage .shrink-warn .sw-icon svg {
  width: clamp(40px, 6.2vw, 58px); height: auto; display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .5));
}
.stage .shrink-warn.weak .sw-icon { color: #ff8a1f; }
.stage .shrink-warn.danger .sw-icon { color: #ff3b3b; animation: sw-pulse .95s ease-in-out infinite; }
.stage .shrink-warn.danger .sw-icon svg { filter: drop-shadow(0 0 12px rgba(255, 59, 59, .8)); }
.stage .shrink-warn.hungry .sw-icon { animation: sw-pulse 2.2s ease-in-out infinite; }
@keyframes sw-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.stage .shrink-warn .sw-days {
  font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(8, 9, 20, .82); border: 1px solid rgba(255, 255, 255, .18); color: #ffd9a8;
}
.stage .shrink-warn.danger .sw-days { color: #ffc9c9; border-color: rgba(255, 77, 79, .5); }

/* 曾经在这里叠过一层 CSS 眼泪，已删除：泪滴只能按整帧比例估坐标，
   而不同灵兽/形态的眼睛位置都不一样，实际总是挂在眉毛上，很难看。
   "可怜"改由 -sad.mp4 那张委屈脸本身来表达。 */
/* 饿得没力气：缓慢地上下打蔫（比快速发抖更像"没劲"，也不影响看视频） */
.stage .pet-wrap.sad .pet-inner { animation: pet-droop 3.4s ease-in-out infinite; }
@keyframes pet-droop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(2.5px); } 65% { transform: translateY(-1.5px); } }
/* 点它一下：手动抖一抖（放在 sad 规则后面，特异性更高才压得住常驻动画） */
.stage .pet-wrap.sad .pet-inner.pet-shiver, .pet-inner.pet-shiver { animation: pet-shiver .55s ease-in-out; }
@keyframes pet-shiver {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-4px) rotate(-.8deg); }
  50% { transform: translateX(4px) rotate(.8deg); }
  80% { transform: translateX(-2px) rotate(-.4deg); }
}
/* 台词里写了什么动作，画面就真做出来（写在 .pet-wrap 外层，
   和 .pet-inner 上的跳跃/发抖/打蔫互不打断，可以同时发生）。
   ⚠️ .pet-wrap 的居中就是靠基础 transform: translate(-50%, -48%) 实现的，
   所以每个 keyframes 都必须从头带着这个平移，否则一动画猫就飞出画面。 */
.stage .pet-wrap.act-chirp { animation: act-chirp .55s ease-out; }
@keyframes act-chirp {
  0%, 100% { transform: translate(-50%, -48%); }
  42% { transform: translate(-50%, -48%) translateY(-6%) scale(1.03, .97); }
}
.stage .pet-wrap.act-tilt { animation: act-tilt .95s ease-in-out; }
@keyframes act-tilt {
  0%, 100% { transform: translate(-50%, -48%) rotate(0); }
  45% { transform: translate(-50%, -48%) translateX(-3%) rotate(-13deg); }
}
.stage .pet-wrap.act-nuzzle { animation: act-nuzzle 1.15s ease-in-out; }
@keyframes act-nuzzle {
  0%, 100% { transform: translate(-50%, -48%) translateX(0) rotate(0); }
  25% { transform: translate(-50%, -48%) translateX(-8%) rotate(-5deg); }
  50% { transform: translate(-50%, -48%) translateX(0) rotate(0); }
  75% { transform: translate(-50%, -48%) translateX(8%) rotate(5deg); }
}
/* 转圈：绕纵轴转一整圈（像原地转个身），比平面翻滚更不容易看成"头朝下" */
.stage .pet-wrap.act-spin { animation: act-spin 1.25s cubic-bezier(.4, 0, .3, 1); }
@keyframes act-spin {
  0% { transform: translate(-50%, -48%) perspective(700px) rotateY(0); }
  100% { transform: translate(-50%, -48%) perspective(700px) rotateY(360deg); }
}
.stage .pet-wrap.act-hop { animation: act-hop .8s ease-out; }
@keyframes act-hop {
  0%, 100% { transform: translate(-50%, -48%) translateY(0); }
  35% { transform: translate(-50%, -48%) translateY(-15%) scale(1.05, .95); }
  70% { transform: translate(-50%, -48%) translateY(0) scale(1.04, .96); }
}

.home-actions { display: flex; gap: 12px; }
.home-actions .big-btn { flex: 1; }

/* ---------- 完成任务爽反馈 ---------- */
.celebrate {
  position: fixed; left: 50%; top: 24%; transform: translate(-50%, 0); z-index: 95; pointer-events: none;
  font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 6px 26px rgba(0, 0, 0, .65);
  white-space: nowrap; animation: celebrate 1.7s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
@keyframes celebrate {
  0% { opacity: 0; transform: translate(-50%, 22px) scale(.5); }
  22% { opacity: 1; transform: translate(-50%, -12px) scale(1.16); }
  70% { opacity: 1; transform: translate(-50%, -42px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -96px) scale(1); }
}
.coin-fly {
  position: fixed; z-index: 94; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold-2) 62%, #d9961a);
  box-shadow: 0 0 16px rgba(255, 194, 26, .75); animation: coin-fly .8s cubic-bezier(.4, 1.3, .5, 1) forwards;
}
@keyframes coin-fly { to { transform: translate(var(--dx), var(--dy)) scale(.5); opacity: .1; } }
.pulse { animation: pulse .9s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(139, 124, 255, .55); } 100% { box-shadow: 0 0 0 24px rgba(139, 124, 255, 0); } }
.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- 任务 ---------- */
.today-card { display: flex; align-items: center; gap: 14px; }
.today-card .num { font-size: 40px; font-weight: 900; color: var(--gold); }
.cap-bar { height: 8px; background: rgba(0, 0, 0, .38); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.cap-bar div { height: 100%; background: linear-gradient(90deg, var(--aurora), var(--gold)); border-radius: 999px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.task {
  display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-radius: 18px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 1px solid var(--line-2);
  cursor: pointer; transition: transform .12s, border-color .18s; min-height: 78px;
}
.task:active { transform: scale(.975); border-color: rgba(139, 124, 255, .6); }
.task .ic { font-size: 30px; width: 40px; text-align: center; flex: none; }
.task .nm { font-size: 16px; font-weight: 700; line-height: 1.3; }
.task .pt { font-size: 13.5px; color: var(--gold); font-weight: 800; margin-top: 2px; }
.task .st { margin-left: auto; font-size: 12.5px; white-space: nowrap; padding: 6px 10px; border-radius: 999px; font-weight: 700; flex: none; }
.task .st.todo { background: rgba(139, 124, 255, .2); color: #cfc6ff; border: 1px solid rgba(139, 124, 255, .45); }
.task .st.pending { background: rgba(255, 180, 92, .16); color: var(--warn); border: 1px solid rgba(255, 180, 92, .4); }
.task .st.done { background: rgba(87, 224, 143, .16); color: var(--ok); border: 1px solid rgba(87, 224, 143, .4); }
.task.done { opacity: .62; }

/* ---------- 兑换 ---------- */
.wish { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, rgba(139, 124, 255, .22), rgba(69, 224, 208, .14)); }
.wish .ic { font-size: 44px; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.reward {
  position: relative; text-align: center; padding: 16px 12px 14px; border-radius: 20px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 1px solid var(--line-2);
}
.reward .ic { font-size: 44px; }
.reward .nm { font-size: 15.5px; font-weight: 700; min-height: 44px; margin: 6px 0; line-height: 1.35; }
.reward .cost { color: var(--gold); font-weight: 900; font-size: 17px; margin-bottom: 8px; }
.reward .lim { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.reward .star { position: absolute; top: 8px; right: 10px; font-size: 20px; background: none; border: 0; cursor: pointer; opacity: .35; }
.reward .star.on { opacity: 1; filter: drop-shadow(0 0 8px rgba(255, 207, 107, .7)); }
.reward .big-btn { padding: 10px 18px; min-height: 44px; font-size: 15px; }

/* ---------- 聊天 ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 150px - var(--safe-b) - var(--safe-t)); height: calc(100dvh - 150px - var(--safe-b) - var(--safe-t)); }
@media (min-width: 1000px) and (orientation: landscape) { .chat-page { height: calc(100dvh - 44px); } }
.chat-head { display: flex; align-items: center; gap: 10px; }
.chat-head .mini { width: 62px; height: 62px; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 2px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 20px; font-size: 17.5px; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.msg.pet { background: rgba(255, 255, 255, .95); color: #1c1a36; align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.me { background: linear-gradient(135deg, var(--nebula), var(--nebula-2)); align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: 14px; }
.typing span { display: inline-block; width: 8px; height: 8px; background: #8b7fd6; border-radius: 50%; margin: 0 2px; animation: typing 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-5px); opacity: 1; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; border: 1px solid var(--line-2); background: var(--glass-hi); color: var(--ink); border-radius: 999px; padding: 9px 15px; font-size: 15px; cursor: pointer; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; min-width: 0; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .32); color: var(--ink); padding: 0 18px; font-size: 17px; height: 52px; outline: none; }
.chat-input input:focus { border-color: var(--nebula); box-shadow: 0 0 0 3px rgba(139, 124, 255, .2); }
.chat-locked { text-align: center; padding-top: 10px; }
.chat-locked .pet-box { width: min(300px, 70vw); aspect-ratio: 1; margin: 10px auto; cursor: pointer; }

/* ---------- 图鉴 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.form-cell { text-align: center; background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 1px solid var(--line-2); border-radius: 18px; padding: 8px 4px; }
.form-cell .box { aspect-ratio: 1; }
.form-cell.locked .box { filter: grayscale(1) brightness(.38); opacity: .85; }
.form-cell .fn { font-size: 13px; font-weight: 700; min-height: 34px; line-height: 1.3; }
.form-cell .fl { font-size: 12px; color: var(--muted); }

/* 终极形态目标卡（图鉴页顶部，可点） */
.goal-card {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px;
  padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  appearance: none; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, rgba(255, 176, 46, .16), rgba(139, 124, 255, .15) 55%, rgba(69, 224, 208, .13));
  border: 1px solid rgba(255, 207, 107, .34);
  transition: transform .16s, border-color .2s;
}
.goal-card:active { transform: scale(.988); }
.goal-card.done { border-color: rgba(87, 224, 143, .42); background: linear-gradient(135deg, rgba(87, 224, 143, .18), rgba(69, 224, 208, .13)); }
.goal-card .gc-art { width: 94px; height: 94px; flex: none; }
.goal-card .gc-art img, .goal-card .gc-art svg { width: 100%; height: 100%; object-fit: contain; }
.goal-card .gc-h { font-size: 18px; font-weight: 800; letter-spacing: .2px; line-height: 1.3; }
.goal-card .gc-tx { font-size: 14.5px; color: var(--muted); margin: 4px 0 0; }
.goal-card .gc-tx b { color: var(--gold); }
.goal-card .gc-sub { font-size: 12.5px; color: var(--muted); opacity: .82; margin-top: 4px; }
.goal-card .xp-bar { margin: 10px 0 0; }

/* 八只灵兽的终极形态一览（弹窗内） */
.myth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.myth-cell { text-align: center; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--line); }
.myth-cell small { display: block; font-size: 12px; color: var(--muted); }
.myth-cell b { display: block; font-size: 14px; margin-top: 3px; }
.myth-cell em { display: block; font-style: normal; font-size: 11px; color: var(--muted); opacity: .78; margin-top: 3px; }
.myth-cell.on { border-color: rgba(255, 207, 107, .5); background: rgba(255, 176, 46, .13); }
.myth-cell.unowned { opacity: .55; }

/* 徽章墙 */
.badge-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.badge {
  text-align: center; padding: 13px 8px; border-radius: 18px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line-2); opacity: .48; filter: saturate(.35);
}
.badge.on { opacity: 1; filter: none; border-color: rgba(255, 207, 107, .42); }
.badge .bi { font-size: 30px; line-height: 1.1; margin-bottom: 5px; }
.badge b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.badge small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.pet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pet-card { text-align: center; border-radius: 18px; background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 2px solid var(--line); padding: 8px; cursor: pointer; }
.pet-card.on { border-color: rgba(139, 124, 255, .8); box-shadow: 0 0 26px rgba(109, 92, 240, .35); }
.pet-card .box { aspect-ratio: 1; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 22px; border-left: 2px solid var(--line); margin-left: 8px; position: relative; font-size: 15px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.timeline li.down::before { background: var(--bad); }

/* ---------- 选蛋 / 初始设置 ---------- */
.setup { text-align: center; padding-top: 10px; }
.setup h1 { font-size: 31px; margin: 10px 0; }
.setup p { font-size: 17.5px; color: var(--muted); line-height: 1.6; }
.egg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 600px) { .egg-grid { grid-template-columns: repeat(2, 1fr); } }
.egg-cell { background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 2px solid var(--line); border-radius: 20px; padding: 6px 4px 10px; cursor: pointer; transition: transform .15s, border-color .15s; }
.egg-cell.on { border-color: rgba(139, 124, 255, .8); background: rgba(139, 124, 255, .14); transform: scale(1.04); }
.egg-cell .box { aspect-ratio: 1; }
.egg-cell b { display: block; font-size: 16.5px; }
.egg-cell small { color: var(--muted); }
.field { display: block; text-align: left; margin: 14px auto; max-width: 420px; }
.field span { display: block; font-size: 15px; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .inp { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .32); color: var(--ink); padding: 0 14px; font-size: 17px; outline: none; }
.field input:focus, .inp:focus { border-color: var(--nebula); }
.species-preview { width: 220px; height: 220px; margin: 0 auto; }

/* ---------- 弹窗 ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 14, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: linear-gradient(170deg, rgba(32, 33, 64, .96), rgba(16, 17, 36, .98));
  border: 1px solid var(--line-2); border-radius: 26px; padding: 22px; width: min(420px, 100%);
  text-align: center; animation: pop .25s cubic-bezier(.3, 1.5, .5, 1); max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .07);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.modal h3 { font-size: 21px; margin-bottom: 8px; }
.modal p { font-size: 16.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 16px; }
.modal .btns { display: flex; flex-direction: column; gap: 10px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 10px 0 18px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); }
.pin-dots i.f { background: var(--nebula); border-color: var(--nebula); box-shadow: 0 0 12px rgba(139, 124, 255, .8); }
.pin-dots.err { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-pad button { height: 64px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--glass-hi); color: var(--ink); font-size: 25px; font-weight: 700; cursor: pointer; }
.pin-pad button:active { background: rgba(139, 124, 255, .25); }

.toast {
  position: fixed; left: 50%; top: calc(20px + var(--safe-t)); transform: translate(-50%, -150%); z-index: 90;
  background: rgba(255, 255, 255, .96); color: #1c1a36; font-weight: 700; font-size: 16.5px; padding: 12px 22px;
  border-radius: 999px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; max-width: 90vw; text-align: center; opacity: 0; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 进化过场（保留原有结构，配色更新） ---------- */
.cutscene { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 50% 45%, #241a63, #05040e 72%); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; overflow: hidden; }
.cutscene.show { opacity: 1; }
.cs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cs-rays { position: absolute; left: 50%; top: 45%; width: 180vmax; height: 180vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(rgba(255, 255, 255, .1) 0 8deg, transparent 8deg 20deg); opacity: 0; transition: opacity .6s; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cs-pet { position: absolute; left: 50%; top: 45%; width: min(70vw, 420px, 50vh); aspect-ratio: 1; transform: translate(-50%, -50%); }
.cs-new { opacity: 0; transform: translate(-50%, -50%) scale(.3); transition: transform .8s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; }
.cutscene.revealed .cs-new { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cutscene.revealed .cs-old { opacity: 0; }
.cutscene.revealed .cs-rays { opacity: 1; }
.cutscene.charging .cs-old { animation: charge 1.6s ease-in forwards; }
@keyframes charge {
  0% { filter: brightness(1); transform: translate(-50%, -50%); }
  20% { transform: translate(calc(-50% - 4px), -50%); }
  40% { transform: translate(calc(-50% + 4px), -50%); }
  60% { transform: translate(calc(-50% - 6px), -50%) scale(1.05); }
  80% { transform: translate(calc(-50% + 6px), -50%) scale(1.1); }
  100% { filter: brightness(8) saturate(0); transform: translate(-50%, -50%) scale(1.15); }
}
.cs-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .35s; }
.cutscene.flash .cs-flash { opacity: 1; }
.cutscene.revealed .cs-flash { opacity: 0; transition: opacity .9s; }
.cs-text { position: absolute; top: calc(45% + min(35vw, 210px, 25vh) + 6px); left: 16px; right: 16px; text-align: center; font-size: 23px; line-height: 1.5; font-weight: 700; text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.cs-text b { font-size: 31px; color: var(--gold); }
.cs-text small { font-size: 15.5px; color: var(--muted); font-weight: 500; }
.cs-btn { position: absolute; bottom: calc(40px + var(--safe-b)); left: 50%; transform: translateX(-50%); min-width: 200px; }
.cs-btn:active { transform: translateX(-50%) translateY(3px); }
.cutscene.down { background: radial-gradient(circle at 50% 45%, #22222f, #05050a 72%); }
.cutscene.levelup .cs-new { animation: lvjump 1s .2s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lvjump { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -62%) scale(1.1); } 100% { transform: translate(-50%, -50%) scale(1); } }

/* ---------- 家长后台 ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.tabs button { flex: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15.5px; color: var(--muted); background: var(--glass); cursor: pointer; position: relative; }
.tabs button.on { color: #fff; background: linear-gradient(180deg, var(--nebula), var(--nebula-2)); border-color: transparent; }
.tabs .dot { background: var(--bad); color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 6px; margin-left: 4px; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: flex; align-items: center; gap: 10px; background: var(--glass-hi); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.pitem .t { flex: 1; }
.pitem .time { color: var(--muted); font-size: 12px; }
.edit-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.edit-table td, .edit-table th { padding: 4px; text-align: left; }
.edit-table input, .edit-table select { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .32); color: var(--ink); padding: 0 8px; font-size: 15px; }
.edit-table input[type=checkbox] { width: 22px; height: 22px; }
.edit-table .w-ic { width: 52px; } .edit-table .w-num { width: 70px; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.award-grid button { text-align: left; border: 1px solid var(--line-2); background: var(--glass-hi); color: var(--ink); border-radius: 14px; padding: 10px 12px; font-size: 15px; cursor: pointer; }
.award-grid button b { color: var(--gold); float: right; }
.award-grid button.neg b { color: var(--bad); }
.log-item { padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; gap: 10px; }
.log-item .p { margin-left: auto; font-weight: 800; }
.log-item .p.pos { color: var(--ok); } .log-item .p.neg { color: var(--bad); }
.chat-log-day { margin-bottom: 14px; }
.chat-log-day .m { font-size: 14px; padding: 4px 0; line-height: 1.5; }
.chat-log-day .m.user b { color: #9fd3ff; } .chat-log-day .m.assistant b { color: var(--gold); }
.form-rows .field { max-width: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 15.5px; }
.switch-row input { width: 26px; height: 26px; }

/* ============================================================
   启动骨架 + 离线提示（首屏体验）
   ============================================================ */
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 24px; }
.boot .orb {
  width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #cdc2ff, var(--nebula-2) 46%, #2a1b63 74%, rgba(42, 27, 99, 0) 79%);
  box-shadow: 0 0 70px rgba(139, 124, 255, .45), inset 0 0 30px rgba(255, 255, 255, .18);
  animation: bootPulse 1.8s ease-in-out infinite;
}
@keyframes bootPulse { 0%, 100% { transform: scale(.9); opacity: .72; } 50% { transform: scale(1.07); opacity: 1; } }
.boot-title { font-size: 25px; font-weight: 800; letter-spacing: .16em; }
.boot-sub { color: var(--muted); font-size: 15.5px; line-height: 1.7; max-width: 30em; }
#bootAct .big-btn { margin-top: 4px; }

.offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: calc(9px + var(--safe-t)) 14px 10px; text-align: center;
  font-size: 14px; font-weight: 700; color: #40260a;
  background: linear-gradient(180deg, #ffd08a, #ffb45c);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  animation: offlineIn .32s ease;
}
.offline-bar[hidden] { display: none; }
@keyframes offlineIn { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ============================================================
   灵兽心愿 · 家长表扬贴纸 · 成长周报
   ============================================================ */

/* ---------- 首页 · 灵兽心愿 ---------- */
.wish-card {
  grid-area: wish; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 207, 107, .16), rgba(139, 124, 255, .12));
  border-color: rgba(255, 207, 107, .28);
}
.wish-card .wc-ic { font-size: 32px; flex: none; line-height: 1; filter: drop-shadow(0 6px 16px rgba(255, 176, 46, .3)); }
.wish-card .grow { min-width: 0; }
.wish-card b { display: block; font-size: 15.5px; }
.wish-card .wc-tx { font-size: 14px; color: var(--muted); margin: 3px 0; }
.wish-card .xp-bar { height: 8px; margin: 12px 0 6px; }
.wish-card .big-btn { flex: none; min-width: 0; padding: 0 14px; font-size: 15.5px; }
.wish-card.done { background: linear-gradient(135deg, rgba(87, 224, 143, .18), rgba(69, 224, 208, .12)); border-color: rgba(87, 224, 143, .3); }
/* 商店页里把"灵兽心愿"那一条标出来 */
.reward.is-wish { border-color: rgba(255, 207, 107, .5); box-shadow: 0 0 24px rgba(255, 176, 46, .18); }
.wish-tag { display: inline-block; margin: 2px 0 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--gold); background: rgba(255, 207, 107, .16); border: 1px solid rgba(255, 207, 107, .38); }
@media (max-width: 560px) {
  .wish-card { flex-wrap: wrap; }
  .wish-card .big-btn { width: 100%; }
}

/* ---------- 孩子端 · 表扬贴纸全屏 ---------- */
.praise-overlay {
  position: fixed; inset: 0; z-index: 95; padding: 20px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #0b0b18; /* 实色底：一定挡住下面的内容，不留半透明缝隙 */
  opacity: 0; transition: opacity .32s;
}
.praise-overlay.show { opacity: 1; }
.praise-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(104, 72, 190, .9), rgba(11, 11, 24, .4) 68%);
}
.praise-card {
  position: relative; z-index: 2; width: min(460px, 92vw); text-align: center; padding: 26px 22px 22px;
  border-radius: 30px; border: 1px solid rgba(255, 207, 107, .35);
  background: linear-gradient(170deg, rgba(46, 44, 92, .97), rgba(20, 20, 44, .98));
  box-shadow: 0 26px 64px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: scale(.82) translateY(12px); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1);
}
.praise-overlay.show .praise-card { transform: scale(1) translateY(0); }
.praise-from { font-size: 14px; color: var(--muted); letter-spacing: .06em; }
.praise-sticker { font-size: 96px; line-height: 1.15; margin: 6px 0 0; filter: drop-shadow(0 12px 34px rgba(255, 207, 107, .45)); animation: stickerBob 1.5s ease-in-out infinite; }
@keyframes stickerBob { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.09) rotate(3deg); } }
.praise-name { font-size: 28px; font-weight: 900; color: var(--gold); letter-spacing: .04em; margin-top: 2px; }
.praise-text { font-size: 18px; line-height: 1.6; margin: 12px 4px 20px; }
.praise-ok { width: 100%; }
.praise-ok.attention { animation: plead 1.7s ease-in-out infinite; }
@keyframes plead { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.praise-confetti { position: absolute; top: -8%; pointer-events: none; animation: confettiFall 2.9s linear infinite; }
@keyframes confettiFall {
  0% { transform: translateY(-8vh) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(114vh) rotate(420deg); opacity: .85; }
}

/* ---------- 家长端 · 表扬贴纸 ---------- */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 4px 0 8px; }
.sticker-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px;
  border: 1px solid var(--line-2); border-radius: 18px; background: var(--glass-hi);
  color: var(--ink); font-size: 13.5px; cursor: pointer;
}
.sticker-btn .si { font-size: 34px; line-height: 1.1; }
.sticker-btn.on { border-color: rgba(255, 207, 107, .7); background: linear-gradient(160deg, rgba(255, 207, 107, .22), rgba(255, 207, 107, .05)); box-shadow: 0 0 22px rgba(255, 176, 46, .22); }
.pr-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.pr-preview .pv-ic { font-size: 36px; line-height: 1; }
.pi-ic { font-size: 22px; width: 28px; text-align: center; flex: none; }

/* ---------- 家长端 · 成长周报 ---------- */
.report-head { text-align: center; padding: 18px 16px; }
.rh-num { font-size: 44px; font-weight: 900; color: var(--gold); line-height: 1; }
.rh-num small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.rh-trend { display: inline-block; margin: 10px 0 8px; padding: 5px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 700; background: var(--glass-hi); border: 1px solid var(--line-2); color: var(--muted); }
.rh-trend.up { color: #ffd9a0; border-color: rgba(255, 176, 46, .4); background: rgba(255, 176, 46, .14); }
.rh-trend.down { color: #9fd3ff; border-color: rgba(90, 180, 255, .35); background: rgba(90, 180, 255, .12); }
.rh-sub { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.report-bars { padding: 16px 14px 12px; }
.rb-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 152px; }
.rb-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.rb-col b { font-size: 12.5px; color: var(--gold); height: 15px; line-height: 1; }
.rb-bar { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.rb-bar i { display: block; width: 100%; min-height: 4px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--aurora), var(--nebula)); transition: height .55s cubic-bezier(.3, 1.3, .5, 1); }
.rb-bar i.future { background: rgba(255, 255, 255, .09); }
.rb-col em { font-size: 12.5px; color: var(--muted); font-style: normal; }
.rb-legend { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.report-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 8px; margin-top: 12px; }
.rm { background: var(--glass-hi); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.rm span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.rm b { font-size: 19px; }
.grow-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.grow-row:last-child { border-bottom: 0; }
.grow-row .grow-lv { margin-left: auto; }
.grow-row .grow-lv i.up { font-style: normal; color: var(--ok); font-size: 12.5px; }
.tips { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.7; }
.tips li { margin-bottom: 7px; }
.tips li:last-child { margin-bottom: 0; }

/* ============================================================
   打扮页
   左（或上）：灵兽大图 + 装饰层；右（或下）：槽位切换 + 饰品货架。
   孩子点一下穿上、再点一下脱下，不用进任何弹窗。
   ============================================================ */
.dress-wrap { display: grid; gap: 14px; align-items: start; }
@media (min-width: 820px) {
  .dress-wrap { grid-template-columns: minmax(280px, 44%) 1fr; gap: 20px; }
}
.dress-stage {
  position: relative; background: radial-gradient(120% 90% at 50% 15%, rgba(139, 124, 255, .16), transparent 70%), var(--glass);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm);
}
.dress-stage.editing { border-color: rgba(255, 207, 107, .5); box-shadow: 0 0 0 1px rgba(255, 207, 107, .25), var(--shadow-sm); }
.dress-box { position: relative; width: 100%; aspect-ratio: 1; }
.dress-tip {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); white-space: nowrap;
  font-size: 13px; color: var(--gold); background: rgba(7, 7, 15, .78); border: 1px solid rgba(255, 207, 107, .35);
  border-radius: 999px; padding: 4px 12px; pointer-events: none;
}
.dress-side { min-width: 0; }
.slot-tabs { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.slot-tab {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--muted);
  font-size: 15px; font-family: inherit; transition: .18s;
}
.slot-tab span { font-size: 17px; }
.slot-tab.on {
  background: linear-gradient(180deg, rgba(139, 124, 255, .34), rgba(109, 92, 240, .22));
  border-color: rgba(139, 124, 255, .6); color: #fff; box-shadow: var(--glow);
}
.dress-hint { font-size: 13px; margin: 8px 0 10px; }
.decor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.decor-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: .18s;
  text-align: center;
}
.decor-card:active { transform: scale(.96); }
.decor-card b { font-size: 13px; font-weight: 600; }
.decor-card small { font-size: 12px; color: var(--muted); }
.decor-card .dc-art { width: 62px; height: 62px; display: grid; place-items: center; }
.decor-card .dc-art svg { width: 100%; height: 100%; }
.decor-card .dc-art.light svg { filter: drop-shadow(0 0 3px var(--glow)); }
.decor-card.locked .dc-art { filter: grayscale(.55) brightness(.72); }
.decor-card.locked small { color: var(--gold); }
.decor-card.on {
  border-color: rgba(69, 224, 208, .6); background: rgba(69, 224, 208, .12);
  box-shadow: 0 0 0 1px rgba(69, 224, 208, .25), 0 8px 22px rgba(69, 224, 208, .18);
}
.decor-card.on small { color: var(--aurora); }
.dress-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.size-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.size-row input[type=range] { width: 132px; accent-color: var(--nebula); }
/* 角度数字兼做"回正"按钮：点一下回到 0° */
.rot-val { min-width: 48px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--glass); color: inherit; font: inherit; cursor: pointer; }
.dress-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.dress-note b { color: var(--ink); }
.dress-sub { font-size: 15px; font-weight: 400; color: var(--muted); }
/* 竖屏：宠物占满宽度会把饰品货架挤到导航底下，所以给画面一个高度上限，
   靠 width + aspect-ratio 保持 1:1（直接压 max-height 会让装饰层的百分比定位失真） */
@media (max-width: 819px), (orientation: portrait) {
  .dress-box { width: min(100%, 44vh); margin: 0 auto; }
  .dress-stage { padding: 8px 8px 10px; }
  .dress-tip { position: static; transform: none; margin: 8px auto 0; width: fit-content; }
  .decor-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .decor-card .dc-art { width: 52px; height: 52px; }
}

/* ============================================================
   语音朗读相关
   孩子认字少，"听"比"看"重要 → 每条回复都能单独重念，且按钮要够大、够显眼。
   ============================================================ */
.msg.pet { position: relative; font-size: 19px; line-height: 1.6; }
/* 浮在气泡右下角外侧，不挤压文字 */
.msg-say {
  position: absolute; right: -13px; bottom: -13px; width: 34px; height: 34px;
  display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  background: #fff; border: 2px solid rgba(139, 124, 255, .55);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .4); font-size: 16px; line-height: 1; color: #4b4170;
  -webkit-tap-highlight-color: transparent;
}
.msg-say:active { transform: scale(.86); }
.msg.me { font-size: 18px; }
.tts-warn {
  margin: 0 0 12px; padding: 11px 15px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.6;
  background: rgba(255, 209, 102, .13); border: 1px solid rgba(255, 209, 102, .38); color: #ffd166;
}

/* ============================================================
   出门旅行页
   左边（宽屏）或上边：六个场景卡；右边：收集进度 + 旅行相册。
   卡片的配色直接用场景自己的 sky 渐变，一眼能分出"这是海边还是雪山"。
   ============================================================ */
.trip-intro { margin: -4px 4px 14px; font-size: 15px; line-height: 1.6; }
.trip-cols { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) {
  .trip-cols { grid-template-columns: 1fr minmax(200px, 26%); gap: 20px; }
  .trip-side { position: sticky; top: 12px; }
}
.trip-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

.trip-card {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  padding: 14px 15px 13px; border-radius: var(--radius); font-family: inherit; color: var(--ink);
  /* 每个地方自己的色调压进卡里，一眼能分出海边、雪山、星空 */
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--sky2) 46%, transparent) 0%, transparent 62%),
    var(--glass);
  border: 1px solid color-mix(in srgb, var(--sky2) 34%, var(--line)); transition: .18s;
}
.trip-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--sky1), var(--sky2));
}
.trip-card:active { transform: scale(.985); }
.trip-card.done { border-color: rgba(255, 209, 102, .55); box-shadow: 0 0 0 1px rgba(255, 209, 102, .22), var(--shadow-sm); }
.tc-top { display: flex; align-items: center; gap: 10px; }
.tc-ic { font-size: 27px; line-height: 1; }
.tc-name { flex: 1; min-width: 0; }
.tc-name b { display: block; font-size: 17px; }
.tc-name small { font-size: 12.5px; color: var(--muted); }
.tc-photo { font-size: 15px; opacity: .85; }
.tc-desc { margin: 8px 0 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.tc-finds { display: flex; align-items: center; gap: 7px; }
.find-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .18);
  color: var(--muted);
}
.find-dot.on { background: rgba(69, 224, 208, .16); border: 1px solid rgba(69, 224, 208, .5); color: var(--ink); }
.tc-prog { margin-left: auto; font-size: 13px; color: var(--muted); }
.tc-done {
  position: absolute; right: 12px; bottom: 12px; font-size: 11.5px; color: var(--gold);
  background: rgba(255, 209, 102, .14); border-radius: 999px; padding: 2px 9px;
}
.trip-side { display: grid; gap: 12px; }
.trip-badge-card, .trip-album {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.trip-badge-card b, .trip-album b { font-size: 14px; color: var(--muted); font-weight: 600; }
.trip-big { font-size: 40px; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; }
.trip-big span { font-size: 17px; color: var(--muted); font-weight: 500; }
.trip-tip { font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.al-cell {
  aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 19px;
  background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .16); color: var(--muted);
}
.al-cell.on { background: linear-gradient(160deg, var(--sky1), var(--sky2)); border: 1px solid rgba(255, 255, 255, .22); }

/* --- 在路上 --- */
.trip-away { text-align: center; max-width: 560px; margin: 0 auto; }
.ta-stage {
  position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #201a44, #120f28); border: 1px solid var(--line);
}
.ta-sky {
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 20%, rgba(139, 124, 255, .3), transparent 70%);
}
.ta-pet { position: absolute; inset: 3% 17% 19% 17%; }
.ta-pet .pet-wrap, .ta-pet .art-wrap { width: 100%; height: 100%; }
.ta-road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 55%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6%;
}
.ta-car { font-size: 42px; animation: car-bob .9s ease-in-out infinite; display: inline-block; }
@keyframes car-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
.ta-where { margin: 16px 0 4px; font-size: 16px; }
.ta-clock { font-size: 50px; font-weight: 800; letter-spacing: 1px; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.ta-clock.ready { color: var(--gold); animation: ready-pulse 1s ease-in-out infinite; }
@keyframes ready-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ta-hint { font-size: 14px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }

/* --- 开箱 --- */
.trip-reward {
  position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 4, 14, .84); opacity: 0; transition: opacity .3s;
}
.trip-reward.show { opacity: 1; }
.tr-card {
  width: min(430px, 100%); max-height: 90vh; overflow: auto; text-align: center;
  background: #14112c; border: 1px solid var(--line-2); border-radius: 26px; padding: 0 22px 22px;
  transform: translateY(20px) scale(.95); transition: transform .38s cubic-bezier(.2, .9, .3, 1.15);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.trip-reward.show .tr-card { transform: none; }
.tr-sky {
  margin: 0 -22px 16px; height: 132px; display: grid; place-items: center; font-size: 60px;
  background: linear-gradient(155deg, var(--sky1), var(--sky2));
}
.tr-head b { font-size: 20px; }
.tr-head small { font-size: 13.5px; color: var(--muted); }
.tr-hello { font-size: 15px; line-height: 1.65; color: var(--muted); margin: 10px 0 16px; }
.tr-items { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tr-item {
  min-width: 84px; padding: 10px 8px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
  opacity: 0; transform: translateY(12px) scale(.88); transition: .3s cubic-bezier(.2, .9, .3, 1.2);
}
.tr-item.in { opacity: 1; transform: none; }
.tr-ic { display: block; font-size: 28px; line-height: 1.2; }
.tr-item b { display: block; font-size: 15px; }
.tr-item small { font-size: 11.5px; color: var(--muted); }
.tr-bonus {
  margin: 16px 0 0; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.6;
  background: rgba(255, 209, 102, .14); border: 1px solid rgba(255, 209, 102, .4); color: var(--gold);
}
.tr-bonus.big { font-size: 16px; font-weight: 700; }
.tr-card .big-btn { margin-top: 18px; }

/* 首页：它出门了（点一下去旅行页看倒计时） */
.trip-home-banner {
  grid-area: trip;
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 0;
  padding: 12px 15px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, rgba(139, 124, 255, .18), rgba(69, 224, 208, .1));
  border: 1px solid rgba(139, 124, 255, .35); color: var(--ink); text-align: left;
  transition: .18s;
}
.trip-home-banner:active { transform: scale(.985); }
.trip-home-banner { margin: 0; }
.trip-home-banner .tb-ic { font-size: 22px; }
.trip-home-banner .tb-text { flex: 1; font-size: 15px; line-height: 1.5; }
.trip-home-banner .tb-text b { color: var(--aurora); }
.trip-home-banner .tb-go {
  font-size: 13px; color: var(--muted); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 3px 11px; white-space: nowrap;
}
.trip-home-banner.ready {
  background: linear-gradient(135deg, rgba(255, 209, 102, .2), rgba(255, 138, 171, .12));
  border-color: rgba(255, 209, 102, .5);
}
.trip-home-banner.ready .tb-go { color: var(--gold); border-color: rgba(255, 209, 102, .55); }

/* ============================================================
   特产：12 件 / 每个地方
   3 件的时候还能用小圆点，12 件就必须换成"格子带"——
   一条能一眼扫完的进度条，颜色按稀有度分：青=常见、紫=稀有、金=传说。
   ============================================================ */
.find-bar { display: flex; gap: 3px; flex: 1; min-width: 0; }
.find-bar .seg {
  flex: 1; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .1);
  transition: background .25s, box-shadow .25s;
}
.find-bar .seg.on.r1 { background: #45e0d0; box-shadow: 0 0 6px rgba(69, 224, 208, .5); }
.find-bar .seg.on.r2 { background: #a98bff; box-shadow: 0 0 6px rgba(169, 139, 255, .5); }
.find-bar .seg.on.r3 { background: #ffd166; box-shadow: 0 0 7px rgba(255, 209, 102, .65); }
.find-dot { display: none; }
.tc-book {
  flex: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 0;
  display: grid; place-items: center; font-size: 16px; font-family: inherit;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: var(--ink);
}
.tc-book:active { transform: scale(.9); }
.tc-finds { align-items: center; }
.tc-prog { margin-left: 8px; flex: none; font-variant-numeric: tabular-nums; }

/* 开箱：稀有度镶边 */
.tr-item.r2 { border-color: rgba(169, 139, 255, .55); box-shadow: 0 0 14px rgba(169, 139, 255, .25); }
.tr-item.r3 { border-color: rgba(255, 209, 102, .7); box-shadow: 0 0 18px rgba(255, 209, 102, .35); }
.tr-item.r3 .tr-ic { filter: drop-shadow(0 0 6px rgba(255, 209, 102, .8)); }
.tr-item.r2 small { color: #b9a6ff; }
.tr-item.r3 small { color: var(--gold); }

/* 特产图鉴 */
.bk-card { text-align: left; }
.bk-card .tr-head { text-align: center; }
.bk-body { margin: 4px 0 0; }
.bk-group { margin-bottom: 14px; }
.bk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; color: var(--muted); }
.bk-r { font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.bk-r.r1 { background: rgba(69, 224, 208, .16); color: var(--aurora); }
.bk-r.r2 { background: rgba(169, 139, 255, .18); color: #b9a6ff; }
.bk-r.r3 { background: rgba(255, 209, 102, .18); color: var(--gold); }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 7px; }
.bk-item {
  padding: 8px 6px 7px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .14);
}
.bk-item.on { border-style: solid; background: rgba(255, 255, 255, .08); }
.bk-item.on.r2 { border-color: rgba(169, 139, 255, .5); }
.bk-item.on.r3 { border-color: rgba(255, 209, 102, .6); }
.bk-ic { display: block; font-size: 23px; line-height: 1.25; }
.bk-item:not(.on) .bk-ic { opacity: .32; filter: grayscale(1); }
.bk-item b { display: block; font-size: 13px; font-weight: 600; }
.bk-item:not(.on) b { color: var(--muted); letter-spacing: 1px; }
.bk-item em { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; font-style: normal; }
.bk-item .bk-hidden { opacity: .55; }

/* ============================================================
   聊天：直接说话的麦克风
   iPad 输入法的语音键会顶起半个屏幕，把对话全遮住。
   所以自己在输入框右边放一个：点一下就说，说的字直接落进输入框。
   ============================================================ */
.chat-input { align-items: center; }
.mic-btn {
  flex: none; width: 52px; height: 52px; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
  background: var(--glass-hi); border: 1px solid var(--line-2); color: var(--ink);
  transition: transform .12s, background .18s, border-color .18s, box-shadow .18s;
}
.mic-btn svg { width: 24px; height: 24px; }
.mic-btn:active { transform: scale(.92); }
/* 正在听：变红 + 一圈一圈往外扩，孩子一眼知道"它现在在听我说话" */
.mic-btn.on {
  background: linear-gradient(180deg, #ff8fa8, #e04a72); border-color: #ff8fa8; color: #fff;
  box-shadow: 0 0 0 0 rgba(224, 74, 114, .6); animation: mic-live 1.25s ease-out infinite;
}
@keyframes mic-live {
  0% { box-shadow: 0 0 0 0 rgba(224, 74, 114, .55); }
  70% { box-shadow: 0 0 0 14px rgba(224, 74, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 74, 114, 0); }
}
.chat-input .send-btn { flex: none; padding: 0 20px; min-width: 76px; }
/* 说完了但还没发出去：按钮自己跳，孩子不用认字也知道该按哪个 */
.chat-input .send-btn.ready { animation: send-ready .9s ease-in-out infinite; }
@keyframes send-ready {
  0%, 100% { transform: scale(1); box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .32); }
  50% { transform: scale(1.07); box-shadow: 0 0 0 4px rgba(155, 140, 255, .22), var(--glow); }
}
/* 边说话边显示听到的字 */
.mic-hint {
  display: none; margin: 0 0 8px; padding: 9px 14px; border-radius: 14px;
  font-size: 15px; line-height: 1.5; color: #ffd6de;
  background: rgba(224, 74, 114, .14); border: 1px solid rgba(255, 143, 168, .35);
}
.mic-hint.on { display: block; }

/* 麦克风按钮：要一眼看出"能点"，所以给它一点紫，跟"发送"分开 */
.mic-btn { color: #fff; background: linear-gradient(180deg, rgba(155, 140, 255, .3), rgba(109, 92, 240, .16)); border-color: rgba(155, 140, 255, .42); }
.mic-btn svg { width: 26px; height: 26px; }
/* 书本按钮：内联 SVG 图标 */
.tc-book svg { width: 18px; height: 18px; }
/* 空着的格子也要看得见，不然"12 格"看起来像没有 */
.find-bar .seg { background: rgba(255, 255, 255, .15); }

/* 图鉴弹层再压一压：12 件全列出来会很高，标题区收窄、卡片瘦身，尽量一屏看完 */
.bk-card { max-height: 92vh; padding-bottom: 18px; }
.bk-card .tr-sky { height: 92px; font-size: 44px; margin-bottom: 12px; }
.bk-card .bk-item { padding: 7px 6px 6px; }
.bk-card .bk-item:not(.on) b { color: var(--muted); font-weight: 500; }
.bk-card .bk-item:not(.on) .bk-ic { font-size: 19px; }
.bk-card .bk-item em { min-height: 15px; }
.bk-group { margin-bottom: 11px; }
.bk-card .big-btn { display: block; margin: 6px auto 0; }

/* ---------- 家长后台 · 灵兽的声音 ---------- */
.voice-list { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px; }
.voice-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line);
}
.voice-row.on { border-color: var(--nebula); background: rgba(140, 120, 255, .14); }
.vp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.vp-info b { font-size: 15.5px; }
.vp-info span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.vp-btns { display: flex; gap: 6px; flex-shrink: 0; }
.small-btn {
  font: inherit; font-size: 13px; padding: 7px 11px; border-radius: 11px; cursor: pointer;
  color: var(--fg); background: var(--glass-hi); border: 1px solid var(--line-2);
}
.small-btn:active { transform: scale(.96); }
.small-btn.on { color: #12122a; background: linear-gradient(160deg, var(--nebula), var(--aurora)); border-color: transparent; font-weight: 700; }
