:root {
  --sky-1: #4fb9f2;
  --sky-2: #7fcdf9;
  --sky-3: #b4e4fd;
  --sky-4: #e7f7ff;
  --sky-card: #ffffff;
  --primary: #2e9bff;
  --primary-dark: #1475d8;
  --primary-soft: #d9efff;
  --yellow: #ffc93c;
  --orange: #ff9f45;
  --green: #5fcf80;
  --green-dark: #38a860;
  --pink: #ff7e9d;
  --ink: #1f3a5f;
  --ink-soft: #5a7ca6;
  --ink-light: #8fa9c8;
  --radius: 20px;
  --shadow: 0 8px 24px rgba(31, 58, 95, 0.12);
  --shadow-sm: 0 4px 14px rgba(31, 58, 95, 0.10);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 30%, var(--sky-3) 65%, var(--sky-4) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- 天空装饰 ---------- */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6c8 20%, var(--yellow) 60%, rgba(255, 201, 60, 0.55) 100%);
  box-shadow: 0 0 46px rgba(255, 201, 60, 0.85);
  animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 46px rgba(255, 201, 60, 0.85); }
  50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(255, 201, 60, 0.95); }
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.92;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud-1 {
  top: 70px;
  left: -160px;
  width: 120px;
  height: 42px;
  animation: drift 60s linear infinite;
}

.cloud-1::before { width: 52px; height: 52px; top: -22px; left: 18px; }
.cloud-1::after { width: 40px; height: 40px; top: -14px; left: 58px; }

.cloud-2 {
  top: 170px;
  left: -200px;
  width: 150px;
  height: 50px;
  animation: drift 80s linear infinite;
  animation-delay: -30s;
}

.cloud-2::before { width: 62px; height: 62px; top: -26px; left: 24px; }
.cloud-2::after { width: 48px; height: 48px; top: -16px; left: 76px; }

.cloud-3 {
  top: 300px;
  left: -140px;
  width: 100px;
  height: 36px;
  opacity: 0.75;
  animation: drift 55s linear infinite;
  animation-delay: -15s;
}

.cloud-3::before { width: 42px; height: 42px; top: -18px; left: 16px; }
.cloud-3::after { width: 34px; height: 34px; top: -12px; left: 52px; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 360px)); }
}

/* ---------- 顶部状态栏 ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(79, 185, 242, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-emoji { font-size: 30px; animation: wiggle 2.6s ease-in-out infinite; display: inline-block; }

@keyframes wiggle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

.brand-text { color: #fff; line-height: 1.15; }

.brand-title { font-size: 17px; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 6px rgba(20, 90, 160, 0.4); }

.brand-sub { font-size: 11px; color: rgba(255, 255, 255, 0.92); }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hchip {
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.hchip.points { color: #b7791f; }

.hchip.dino { color: var(--ink); }

.hchip.dino.dino-hungry { color: #e53935; animation: blink 1.1s step-start infinite; }

@keyframes blink { 50% { opacity: 0.45; } }

/* ---------- 主内容 ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.view { display: none; }
.view.active { display: block; animation: fadeUp 0.35s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 问候 ---------- */
.greet {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.greet-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-sm);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.greet-text { color: #fff; text-shadow: 0 2px 6px rgba(20, 90, 160, 0.4); }

.greet-hi { font-size: 18px; font-weight: 800; }

.name-edit { border-bottom: 2px dashed rgba(255, 255, 255, 0.85); cursor: pointer; }

.mini-btn {
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}

.greet-sub { font-size: 13px; color: rgba(255, 255, 255, 0.95); }

/* ---------- 恐龙小卡 ---------- */
.dino-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.dino-mini-card:active { transform: scale(0.98); border-color: var(--primary); }

.dino-mini-emoji { font-size: 40px; animation: breath 2.4s ease-in-out infinite; }

@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.dino-mini-info { flex: 1; min-width: 0; }

.dino-mini-name { font-weight: 800; font-size: 15px; margin-bottom: 5px; }

.mini-bar { height: 8px; background: #e6eef7; border-radius: 999px; overflow: hidden; }

.mini-bar i { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width 0.4s ease; }

.dino-mini-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

.dino-mini-arrow { font-size: 22px; color: var(--ink-light); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--sky-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.card-head h2 { font-size: 16px; color: var(--primary-dark); }

.claim-hint { font-size: 12px; color: var(--ink-light); white-space: nowrap; }

.banner {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 12px;
}

.banner-done {
  background: #e2f7ea;
  color: var(--green-dark);
}

.big-banner {
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.hchip.dino { cursor: pointer; }

/* ---------- 任务列表 ---------- */
.task-list { display: flex; flex-direction: column; gap: 10px; }

.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f4fafe;
  border: 2px solid #e0effc;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
}

.task:hover { border-color: var(--primary); }

.task-checked {
  background: #e8f8ee;
  border-color: var(--green);
}

.task-locked { opacity: 0.75; cursor: default; }
.task-locked:hover { border-color: #e0effc; }

.task-arrow { margin-left: auto; color: var(--ink-light); font-size: 18px; align-self: center; }

.task-learn {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--primary-dark);
}

.task-checked .task-learn { color: var(--green-dark); }

.task-locked .task-learn { color: var(--ink-light); }

.task input { display: none; }

.task-box {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--primary);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  transition: all 0.18s ease;
}

.task-checked .task-box { background: var(--green); border-color: var(--green); }

.task-body { flex: 1; min-width: 0; }

.task-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.task-icon { font-size: 18px; }

.task-title { font-size: 14px; font-weight: 700; }

.task-special { border-color: #ffd9a8; background: #fff8ef; }

.task-special .task-box { border-color: var(--orange); }

.task-special.task-checked { border-color: var(--green); background: #e8f8ee; }

.task-special.task-checked .task-box { background: var(--green); border-color: var(--green); }

.tag-bonus {
  background: var(--yellow);
  color: #8a5a00;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
}

.task-desc { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }

.task-checked .task-desc { color: var(--ink-light); text-decoration: line-through; }

/* ---------- 进度条 ---------- */
.bar {
  height: 10px;
  background: #e6eef7;
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #5ec5ff);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.bar.big { height: 14px; }

.bar-green { background: var(--green) !important; }
.bar-yellow { background: var(--yellow) !important; }
.bar-red { background: #ef5350 !important; }
.bar-blue { background: linear-gradient(90deg, var(--primary), #5ec5ff) !important; }

.today-progress { margin-bottom: 12px; }

.today-progress span { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn:disabled { cursor: not-allowed; }

.btn-main {
  background: linear-gradient(135deg, var(--primary), #5ec5ff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(46, 155, 255, 0.4);
}

.btn-main:disabled { background: #c6d8ea; box-shadow: none; color: #fff; }

.btn-main:not(:disabled):active { transform: scale(0.97); }

.btn-ghost { background: #e3f2fd; color: var(--primary-dark); }

.btn-buy {
  width: auto;
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #5ec5ff);
  color: #fff;
}

.btn-buy:disabled { background: #c6d8ea; }

.btn-disabled { opacity: 0.6; }

.hint { text-align: center; font-size: 12px; color: var(--ink-light); margin-top: 8px; }

/* ---------- 15天计划 ---------- */
.plan-tip { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.plan-card {
  border: none;
  border-radius: 16px;
  padding: 12px 10px;
  text-align: left;
  background: #f4fafe;
  border: 2px solid #e0effc;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: all 0.15s ease;
  position: relative;
}

.plan-card:active { transform: scale(0.96); }

.plan-card.today { border-color: var(--primary); background: #e8f3ff; box-shadow: 0 0 0 3px rgba(46, 155, 255, 0.18); }

.plan-card.done { background: #e8f8ee; border-color: var(--green); }

.plan-card.missed { opacity: 0.72; }

.plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }

.plan-day { font-size: 14px; font-weight: 800; color: var(--primary-dark); }

.plan-card.done .plan-day { color: var(--green-dark); }

.plan-badge {
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 7px;
}

.badge-done { background: var(--green); color: #fff; }
.badge-today { background: var(--primary); color: #fff; }
.badge-missed { background: #ffd9a8; color: #8a5a00; }

.plan-date { font-size: 11px; color: var(--ink-light); margin-bottom: 4px; }

.plan-label { font-size: 13px; font-weight: 700; margin-bottom: 6px; }

.plan-emoji { font-size: 24px; margin-bottom: 8px; }

.plan-progress { height: 7px; background: #e6eef7; border-radius: 999px; overflow: hidden; }

.plan-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #5ec5ff); border-radius: 999px; }

.plan-overall { margin-bottom: 12px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 50, 90, 0.5);
  backdrop-filter: blur(3px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 20px 18px 26px;
  position: relative;
  animation: slideUp 0.28s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #eef4fb;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}

.modal-title { font-size: 17px; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }

.modal-date { font-size: 12px; color: var(--ink-light); margin-bottom: 14px; }

/* ---------- 学习内容面板 ---------- */
.lesson-modal .modal { padding-bottom: 30px; }

.lesson-hero {
  background: linear-gradient(135deg, var(--primary-soft), #eef8ff);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.lesson-hero-title { font-size: 16px; font-weight: 800; color: var(--primary-dark); }

.lesson-hero-desc { font-size: 13px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }

.lesson-steps { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }

.lesson-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f4fafe;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.lesson-block {
  background: #f4fafe;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.lesson-block-title { font-size: 14px; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }

.lesson-card-tpl { background: #fff8ef; border: 2px dashed #ffd9a8; }

.card-line { font-size: 13px; color: var(--ink); margin-bottom: 8px; letter-spacing: 2px; }

.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.char-cell {
  background: #fff;
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.char-big { font-size: 34px; font-weight: 800; line-height: 1.2; color: var(--ink); }

.char-word { font-size: 11px; color: var(--ink-soft); }

.lesson-note { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }

.table-box {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.table-item {
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.eng-list { display: flex; flex-direction: column; gap: 6px; }

.eng-item {
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.words-wrap { display: flex; flex-wrap: wrap; gap: 7px; }

.word-chip {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
}

.lesson-tips {
  background: #fffbe9;
  border: 2px solid #ffe9a8;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.lesson-tips-title { font-size: 13px; font-weight: 800; color: #a97b16; margin-bottom: 6px; }

.lesson-tip { font-size: 13px; color: #7a5a10; line-height: 1.6; }

.lesson-finish { margin-top: 4px; }

.lesson-hero-progress { margin-top: 10px; }

.lp-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }

.lesson-hint { text-align: center; margin-top: 10px; }

/* ---------- 互动面板：跟读列表 ---------- */
.listen-list { display: flex; flex-direction: column; gap: 8px; }

.listen-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 2px solid #e0effc;
  border-radius: 14px;
  padding: 9px 12px;
  transition: all 0.18s ease;
}

.listen-item.read-done {
  background: #e8f8ee;
  border-color: var(--green);
}

.listen-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.read-done .listen-text { color: var(--green-dark); }

.listen-acts { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.icon-btn {
  border: none;
  background: var(--primary-soft);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.icon-btn:active { transform: scale(0.88); }

.read-btn {
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.read-done .read-btn { background: var(--green); border-color: var(--green); color: #fff; }

.char-py { font-size: 13px; color: var(--ink-soft); font-weight: 700; }

.mini-speak {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
  padding: 0;
}

/* ---------- 互动面板：闯关 ---------- */
.quiz-sub-title { font-size: 13px; font-weight: 800; color: var(--ink); margin-top: 12px; margin-bottom: 8px; }

.q-score {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  background: var(--yellow);
  color: #8a5a00;
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 800;
}

.quiz-slot {
  background: #fff;
  border: 2px dashed var(--primary-soft);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}

.q-text { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; margin-bottom: 10px; }

.q-options { display: flex; flex-direction: column; gap: 8px; }

.q-opt {
  border: 2px solid #e0effc;
  background: #f4fafe;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s ease;
}

.q-opt:active { transform: scale(0.97); }

.q-opt.opt-correct { background: #e8f8ee; border-color: var(--green); color: var(--green-dark); }

.q-opt:disabled { opacity: 0.6; cursor: default; }

.q-input { display: flex; gap: 8px; }

.q-input input {
  flex: 1;
  border: 2px solid #e0effc;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
}

.q-input input:focus { outline: none; border-color: var(--primary); }

.q-submit {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.q-feedback { font-size: 13px; font-weight: 700; margin-top: 10px; min-height: 18px; }

.fb-right { color: var(--green-dark); }

.fb-wrong { color: #e53935; }

.q-next {
  display: block;
  margin-top: 10px;
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- 动手实践 ---------- */
.practice-title { font-size: 14px; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; }

.practice-steps { display: flex; flex-direction: column; gap: 8px; }

.lesson-practice { background: #fff8ef; border: 2px dashed #ffd9a8; }

/* ---------- 恐龙页 ---------- */
.dino-card { text-align: center; }

.mood-happy .dino-big { filter: drop-shadow(0 10px 18px rgba(95, 207, 128, 0.5)); }
.mood-ok .dino-big { filter: drop-shadow(0 10px 18px rgba(255, 201, 60, 0.5)); }
.mood-hungry .dino-big { filter: drop-shadow(0 10px 18px rgba(239, 83, 80, 0.5)); }

.dino-stage-name { font-size: 18px; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }

.dino-stage-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 18px;
  margin-bottom: 14px;
  filter: grayscale(1);
  opacity: 0.45;
}

.dino-stage-track .on { filter: none; opacity: 1; animation: pop 0.5s ease; }

@keyframes pop { from { transform: scale(0.4); } to { transform: scale(1); } }

.sep { color: var(--ink-light); font-size: 12px; }

.dino-big {
  display: inline-block;
  line-height: 1;
  margin: 6px 0 14px;
  animation: dinoJump 2.2s ease-in-out infinite;
  cursor: pointer;
}

@keyframes dinoJump {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  30% { transform: translateY(-12px) rotate(3deg); }
  60% { transform: translateY(0) rotate(-2deg); }
}

.dino-big.pet-shake { animation: petShake 0.5s ease; }

@keyframes petShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-8px) rotate(-8deg); }
  50% { transform: translateX(8px) rotate(8deg); }
  75% { transform: translateX(-6px) rotate(-5deg); }
}

.dino-bubble {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--primary-soft);
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  max-width: 90%;
}

.dino-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

.dino-stats { display: flex; flex-direction: column; gap: 14px; text-align: left; }

.stat-label { font-size: 13px; font-weight: 700; margin-bottom: 6px; }

.stat-sub { font-size: 12px; color: var(--ink-light); margin-top: 5px; }

/* ---------- 喂食 ---------- */
.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.feed-btn {
  border: 2px solid #e0effc;
  background: #f4fafe;
  border-radius: 16px;
  padding: 12px 6px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.feed-btn:active { transform: scale(0.92); background: #e8f3ff; border-color: var(--primary); }

.feed-emoji { font-size: 30px; }

.feed-name { font-size: 12px; font-weight: 700; color: var(--ink); }

.empty { font-size: 13px; color: var(--ink-light); text-align: center; padding: 10px 0; }

.feed-list { display: flex; flex-direction: column; gap: 6px; }

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4fafe;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
}

.feed-time { margin-left: auto; color: var(--ink-light); font-size: 12px; }

/* ---------- 商店 ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.shop-card {
  background: #f4fafe;
  border: 2px solid #e0effc;
  border-radius: 16px;
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shop-emoji { font-size: 42px; margin-bottom: 6px; }

.shop-name { font-weight: 800; font-size: 15px; margin-bottom: 4px; }

.shop-desc { font-size: 11px; color: var(--ink-soft); margin-bottom: 8px; }

.shop-effects { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; justify-content: center; }

.shop-effects span {
  background: #e3f2fd;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
}

.shop-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; }

.shop-price { font-size: 13px; font-weight: 800; color: #b7791f; }

.shop-owned {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
}

.inv-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.inv-item {
  background: #f4fafe;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

.inv-item span:first-child { font-size: 18px; }

.inv-qty { color: var(--green-dark); }

.inv-empty { opacity: 0.4; }

/* ---------- 底部导航 ---------- */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 10px 16px 14px;
  pointer-events: none;
}

.tab-bar {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  padding: 6px;
  pointer-events: auto;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 18px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  color: var(--ink-light);
  transition: all 0.18s ease;
}

.tab-btn .tab-ico { font-size: 21px; }

.tab-btn .tab-txt { font-size: 11px; font-weight: 700; }

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), #5ec5ff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(46, 155, 255, 0.4);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 50, 90, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  max-width: 88vw;
  text-align: center;
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 彩带 ---------- */
#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }

.confetti {
  position: absolute;
  top: -12px;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* ---------- 响应式 ---------- */
@media (min-width: 600px) {
  .plan-grid { grid-template-columns: repeat(5, 1fr); }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .feed-grid { grid-template-columns: repeat(5, 1fr); }
  .inv-list { grid-template-columns: repeat(5, 1fr); }
  .modal { border-radius: 24px; margin-bottom: 6vh; }
}
