/* ============ 小焰成长记 · 样式 ============ */
:root {
  --bg: #fff8f0;
  --bg2: #ffefe0;
  --card: #ffffff;
  --ink: #2f2a25;
  --ink2: #5b524a;
  --muted: #9a8f84;
  --line: #f1e6d9;
  --brand: #ff7a3d;
  --brand-2: #ffb03a;
  --study: #5b8def;
  --study-bg: #edf3ff;
  --life: #f5a524;
  --life-bg: #fff6e5;
  --sport: #2fb380;
  --sport-bg: #e9f9f1;
  --ok: #2fb380;
  --warn: #f2761a;
  --danger: #e5484d;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow: 0 6px 22px rgba(150, 100, 50, 0.09);
  --shadow-sm: 0 2px 8px rgba(150, 100, 50, 0.07);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(circle at 12% -10%, #ffe8cf 0%, transparent 55%),
                    radial-gradient(circle at 92% 4%, #e8f2ff 0%, transparent 45%);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.hide { display: none !important; }

/* ---------- 布局 ---------- */
#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(88px + var(--safe-b)); }
#app.admin-shell { max-width: 1040px; padding-bottom: 40px; }
.page-top { padding: 18px 2px 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.nowrap { white-space: nowrap; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.card.flat { box-shadow: var(--shadow-sm); }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.card-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.section-title {
  font-size: 14px; font-weight: 700; color: var(--ink2);
  margin: 22px 4px 10px; display: flex; align-items: center; justify-content: space-between;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 20px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px rgba(255, 122, 61, 0.32);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
}
.btn:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(255, 122, 61, 0.28); }
.btn.block { width: 100%; }
.btn.ghost {
  background: #fff; color: var(--ink2); border: 1.5px solid var(--line); box-shadow: none;
}
.btn.soft { background: var(--bg2); color: #a9551f; box-shadow: none; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; box-shadow: none; }
.btn.danger { background: #fff; color: var(--danger); border: 1.5px solid #ffd8d9; box-shadow: none; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.75); box-shadow: var(--shadow-sm); font-size: 17px;
}

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px 40px; }
.login-hero { text-align: center; margin-bottom: 18px; }
.login-hero .logo { font-size: 40px; line-height: 1; }
.login-hero h1 { font-size: 24px; margin-top: 10px; letter-spacing: 0.5px; }
.login-hero p { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.account-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.account {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: #fff; border-radius: var(--r-md); border: 2px solid transparent;
  box-shadow: var(--shadow-sm); transition: all 0.16s ease; text-align: left; width: 100%;
}
.account.active { border-color: var(--brand); background: #fffaf5; transform: translateY(-1px); }
.account .ava {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; background: var(--bg2);
}
.account .name { font-weight: 700; font-size: 16px; }
.account .role { font-size: 11.5px; color: var(--muted); }
.pin-box { margin-top: 18px; }
.pin-input {
  width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; padding: 0 16px; font-size: 18px; letter-spacing: 3px; text-align: center;
  outline: none; transition: border-color 0.15s;
}
.pin-input:focus { border-color: var(--brand); }
.login-tip { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* ---------- 顶部 ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 20px 4px 8px;
}
.topbar .hello { font-size: 20px; font-weight: 700; }
.topbar .date { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px;
  background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm); font-weight: 700; font-size: 13px;
}
.pill.warm { background: linear-gradient(135deg, #fff2e2, #ffe3c7); color: #b85d15; box-shadow: none; }

/* ---------- 宠物主卡 ---------- */
.pet-hero {
  position: relative; overflow: hidden; padding: 18px;
  background: linear-gradient(150deg, #fff4e6 0%, #ffe9d2 50%, #ffe0f0 100%);
  border-radius: 28px; box-shadow: var(--shadow);
}
.pet-hero::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), transparent 65%);
}
.pet-hero .pet-stage { display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.pet-hero .pet-figure { width: 108px; height: 108px; flex: 0 0 108px; }
.pet-hero .pet-svg { width: 100%; height: 100%; }
.pet-hero .pet-name { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.85);
  color: #b85d15; font-weight: 700;
}
.exp-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.75); overflow: hidden; margin-top: 10px; }
.exp-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #ff8a3d, #ffc53d); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.pet-hero .pet-hint { font-size: 11.5px; color: #a06a3c; margin-top: 6px; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes eyeBlink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
.pet-bob { animation: bob 2.8s ease-in-out infinite; transform-origin: 100px 160px; }
.pet-eyes { animation: eyeBlink 5s infinite; transform-origin: 100px 90px; }
.pet-crown { animation: bob 2.4s ease-in-out infinite; }
.pet-badge .pet-svg { width: 100%; height: 100%; }

/* ---------- 今日目标环 ---------- */
.goal-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.goal {
  background: #fff; border-radius: 18px; padding: 12px 8px 10px; text-align: center;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.goal .ring { position: relative; width: 62px; height: 62px; margin: 0 auto 6px; }
.goal .ring svg { transform: rotate(-90deg); }
.goal .ring .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.goal .lbl { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.goal .sub { font-size: 10.5px; color: var(--muted); }

/* ---------- 建议 ---------- */
.insight-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; }
.insight-scroll::-webkit-scrollbar { display: none; }
.insight {
  flex: 0 0 82%; scroll-snap-align: start; background: #fff; border-radius: 18px; padding: 13px 14px;
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--brand);
}
.insight.good { border-left-color: var(--ok); }
.insight.warn { border-left-color: var(--warn); }
.insight.info { border-left-color: var(--study); }
.insight .txt { font-size: 13px; color: var(--ink2); line-height: 1.62; }
.insight .ic { font-size: 15px; margin-right: 4px; }

/* ---------- 快捷打卡 ---------- */
.cat-tabs { display: flex; gap: 8px; }
.cat-tab {
  flex: 1; height: 40px; border-radius: 13px; background: #fff; color: var(--muted);
  font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-sm); display: flex;
  align-items: center; justify-content: center; gap: 5px; transition: all 0.15s;
}
.cat-tab.active { color: #fff; }
.cat-tab.active[data-cat="study"] { background: var(--study); }
.cat-tab.active[data-cat="life"] { background: var(--life); }
.cat-tab.active[data-cat="sport"] { background: var(--sport); }

.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act {
  background: #fff; border-radius: 20px; padding: 14px; text-align: left;
  box-shadow: var(--shadow-sm); position: relative; transition: transform 0.12s;
  display: flex; flex-direction: column; gap: 6px; min-height: 104px;
}
.act:active { transform: scale(0.975); }
.act .ic { font-size: 26px; line-height: 1; }
.act .nm { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.act .meta { font-size: 11px; color: var(--muted); margin-top: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.act .pts { color: var(--brand); font-weight: 700; }
.act .done-flag {
  position: absolute; top: 12px; right: 12px; font-size: 10px; padding: 1px 7px;
  border-radius: 999px; background: var(--sport-bg); color: var(--sport); font-weight: 700;
}
.act .plus {
  position: absolute; right: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg2); color: var(--brand); display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.act[data-cat="study"] .plus { background: var(--study-bg); color: var(--study); }
.act[data-cat="life"] .plus { background: var(--life-bg); color: var(--life); }
.act[data-cat="sport"] .plus { background: var(--sport-bg); color: var(--sport); }

/* ---------- 记录列表 ---------- */
.rec { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rec:last-child { border-bottom: none; }
.rec .ic {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-size: 19px; background: var(--bg2); flex: 0 0 40px;
}
.rec .t1 { font-weight: 700; font-size: 13.5px; }
.rec .t2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rec .pts { font-weight: 800; color: var(--brand); font-size: 14px; }
.rec .thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.chip-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.mini-chip {
  font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: #f7f1e8; color: var(--ink2);
}
.mini-chip.study { background: var(--study-bg); color: #3f6fd0; }
.mini-chip.life { background: var(--life-bg); color: #b67a12; }
.mini-chip.sport { background: var(--sport-bg); color: #1f8d63; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center; gap: 2px;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; max-width: 110px; height: 54px; border-radius: 16px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700;
}
.tabbar button .ti { font-size: 20px; line-height: 1; filter: saturate(0.15); transition: filter 0.2s; }
.tabbar button.active { color: var(--brand); background: #fff5ec; }
.tabbar button.active .ti { filter: none; }
.tabbar button.active .ti { transform: translateY(-1px); }

/* ---------- 底部弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(48, 32, 20, 0.42); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.18s ease;
}
.sheet {
  width: 100%; max-width: 560px; background: #fff; border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(20px + var(--safe-b)); max-height: 92vh; overflow-y: auto;
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: #e8ddd0; margin: 6px auto 12px; }
.sheet h3 { font-size: 18px; }
.sheet .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sheet-close { position: absolute; right: 14px; top: 14px; font-size: 20px; color: var(--muted); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }

/* 弹窗（桌面用） */
.modal-mask {
  position: fixed; inset: 0; background: rgba(48, 32, 20, 0.42); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.16s;
}
.modal {
  background: #fff; border-radius: 22px; width: 100%; max-width: 620px; max-height: 88vh;
  overflow-y: auto; padding: 20px; animation: slideUp 0.2s;
}
.modal h3 { font-size: 17px; margin-bottom: 4px; }

/* ---------- 表单 ---------- */
.field { margin-top: 16px; }
.field > label { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 7px; }
.field .req { color: var(--danger); }
.input, .textarea, select.input {
  width: 100%; border-radius: 14px; border: 1.5px solid var(--line); background: #fffdfa;
  padding: 12px 14px; outline: none; font-size: 15px; transition: border-color 0.15s;
}
.input:focus, .textarea:focus { border-color: var(--brand); background: #fff; }
.textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 12px; background: #f8f2ea; color: var(--ink2);
  font-size: 13px; font-weight: 600; border: 1.5px solid transparent; transition: all 0.13s;
}
.chip.on { background: #fff4ea; border-color: var(--brand); color: #c25a13; }
.chip.small { padding: 6px 11px; font-size: 12px; }
.num-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.unit-suffix {
  position: relative;
}
.unit-suffix .input { padding-right: 46px; }
.unit-suffix .u { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--muted); }

/* 拍照 */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-add {
  width: 76px; height: 76px; border-radius: 14px; border: 1.5px dashed #e3d3c1;
  display: grid; place-items: center; color: var(--muted); font-size: 11px; gap: 2px;
  background: #fffdfa; text-align: center;
}
.photo-add .big { font-size: 20px; }
.photo-thumb { position: relative; width: 76px; height: 76px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.photo-thumb .del {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; display: grid; place-items: center;
}

/* 定位 */
.loc-box {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px;
  background: #f6fbf8; border: 1.5px solid #d9f0e4; font-size: 12.5px; color: #23795a;
}
.loc-box.warn { background: #fff8ee; border-color: #ffe3c4; color: #a96718; }

/* ---------- 宠物页 ---------- */
.pet-stage-big {
  text-align: center; padding: 8px 0 4px;
  background: radial-gradient(circle at 50% 62%, #fff2df 0%, transparent 68%);
}
.pet-stage-big .fig { width: 230px; height: 230px; margin: 0 auto; }
.pet-stage-big .fig svg { width: 100%; height: 100%; }
.evo-chain { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.evo-item {
  flex: 0 0 84px; text-align: center; border-radius: 16px; padding: 8px 4px;
  background: #fff; box-shadow: var(--shadow-sm); opacity: 0.42; filter: grayscale(0.6); transition: all 0.2s;
}
.evo-item.unlocked { opacity: 1; filter: none; }
.evo-item.current { outline: 2px solid var(--brand); background: #fffaf5; }
.evo-item .fig { width: 56px; height: 56px; margin: 0 auto; }
.evo-item .fig svg { width: 100%; height: 100%; }
.evo-item .nm { font-size: 10.5px; font-weight: 700; margin-top: 2px; }
.evo-item .need { font-size: 9.5px; color: var(--muted); }
.skin-list { display: flex; gap: 10px; }
.skin {
  flex: 1; border-radius: 16px; padding: 10px 6px; text-align: center; background: #fff;
  box-shadow: var(--shadow-sm); border: 2px solid transparent; font-size: 11px; font-weight: 700;
}
.skin.on { border-color: var(--brand); }
.skin.locked { opacity: 0.55; }
.skin .swatch { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 4px; }

/* 商城 */
.reward {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.reward .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--bg2); }
.reward .cost { font-weight: 800; color: var(--brand); font-size: 13px; }

/* ---------- 家长端 ---------- */
.admin-tabs {
  display: flex; gap: 4px; background: #fff; padding: 5px; border-radius: 16px;
  box-shadow: var(--shadow-sm); overflow-x: auto;
}
.admin-tabs button {
  flex: 1; min-width: 78px; height: 38px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.admin-tabs button.active { background: linear-gradient(135deg, #fff1e4, #ffe4cd); color: #b85d15; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.kpi .v { font-size: 21px; font-weight: 800; }
.kpi .l { font-size: 11px; color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600;
  padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 10px 8px; border-bottom: 1px solid #faf4ec; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
.scroll-x { overflow-x: auto; }
.status { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.status.approved { background: var(--sport-bg); color: #1f8d63; }
.status.pending { background: #fff4e0; color: #b4780f; }
.status.rejected { background: #ffecec; color: #c0392b; }
.cfg-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-sm); margin-bottom: 8px;
}
.cfg-item .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--bg2); display: grid; place-items: center; font-size: 20px; }
.cfg-item .nm { font-weight: 700; font-size: 14px; }
.switch { width: 44px; height: 26px; border-radius: 99px; background: #e9e0d5; position: relative; transition: background 0.18s; flex: 0 0 44px; }
.switch::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--sport); }
.switch.on::after { transform: translateX(18px); }

/* 字段编辑器 */
.field-editor { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; background: #fffdfa; }
.field-editor .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.field-editor .head .idx { width: 22px; height: 22px; border-radius: 7px; background: #f1e6d9; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.field-editor .mini-label { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.field-editor .input { padding: 8px 10px; font-size: 13px; border-radius: 10px; }
.evo-warn { font-size: 11.5px; color: #a96718; background: #fff8ee; padding: 8px 10px; border-radius: 10px; }

/* toast */
#toast-wrap { position: fixed; left: 0; right: 0; bottom: 100px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 90; pointer-events: none; }
.toast {
  background: rgba(42, 30, 20, 0.92); color: #fff; padding: 10px 18px; border-radius: 14px;
  font-size: 13px; max-width: 86%; text-align: center; animation: toastIn 0.22s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.toast.good { background: linear-gradient(135deg, #2fb380, #25a172); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 升级彩带 */
.levelup {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center;
  background: rgba(30, 18, 10, 0.55); animation: fadeIn 0.2s;
}
.levelup .box {
  background: #fff; border-radius: 26px; padding: 26px 22px; text-align: center; width: 86%; max-width: 320px;
  animation: popIn 0.32s cubic-bezier(0.22, 1.4, 0.4, 1);
}
.levelup .fig { width: 150px; height: 150px; margin: 0 auto; }
@keyframes popIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 空状态 */
.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 13px; }
.empty .ic { font-size: 34px; display: block; margin-bottom: 8px; opacity: 0.7; }

/* 进度条（通用） */
.bar { height: 8px; border-radius: 99px; background: #f2e9de; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff8a3d, #ffc53d); }

/* 桌面适配 */
@media (min-width: 720px) {
  #app { padding-left: 24px; padding-right: 24px; }
  #app:not(.admin-shell) { box-shadow: 0 0 0 1px rgba(0,0,0,0.03); }
  .act-grid { grid-template-columns: repeat(3, 1fr); }
  .insight { flex-basis: 46%; }
  .tabbar { max-width: 560px; left: 50%; transform: translateX(-50%); border-radius: 22px 22px 0 0; }
}
