/* 古诗学堂 儿童化样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #3a2f28;
  --muted: #7a6a5a;
  --bg: #fff8ec;
  --card: #ffffff;
  --sky: #bde3ff;
  --red: #ff6b6b;
  --green: #58c98b;
  --gold: #ffb800;
}
html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #d9f0ff 0%, #fff8ec 55%, #ffe9d6 100%);
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ---------- 首页 ---------- */
.view { max-width: 860px; margin: 0 auto; padding: 16px 16px 48px; }
.hero {
  background: linear-gradient(135deg, #7ec8ff, #a7e08b);
  border-radius: 26px;
  padding: 26px 22px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(90, 150, 200, .25);
}
.hero-title { font-size: 30px; letter-spacing: 2px; }
.hero-sub { margin-top: 6px; font-size: 15px; opacity: .95; }
.stats { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.stat {
  background: rgba(255,255,255,.9); color: var(--ink);
  border-radius: 18px; padding: 10px 16px; min-width: 96px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-num { font-size: 24px; font-weight: 800; }
.stat-label { font-size: 13px; color: var(--muted); }

.group { margin-top: 26px; }
.group-title {
  font-size: 19px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.group-title::before { content: "📚"; font-size: 20px; }
.poem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.poem-card-home {
  background: var(--card); border-radius: 20px; padding: 16px 14px;
  text-align: center; cursor: pointer; border: 3px solid transparent;
  box-shadow: 0 6px 14px rgba(120,100,80,.12);
  transition: transform .15s, border-color .15s;
}
.poem-card-home:hover { transform: translateY(-4px); }
.poem-card-home.done { border-color: var(--green); background: #f3fff8; }
.poem-card-home .emoji { font-size: 40px; display: block; }
.poem-card-home .t { font-size: 19px; font-weight: 800; margin-top: 6px; }
.poem-card-home .a { font-size: 13px; color: var(--muted); margin-top: 2px; }
.poem-card-home .s { display: inline-block; margin-top: 8px; font-size: 13px; }

/* ---------- 详情页 ---------- */
.back-btn {
  margin: 4px 0 14px; background: #fff; color: var(--ink);
  border: none; padding: 10px 18px; border-radius: 999px; font-size: 16px;
  cursor: pointer; box-shadow: 0 4px 10px rgba(120,100,80,.15);
}
.poem-card, .guess-card, .quest-card {
  background: var(--card); border-radius: 24px; padding: 22px;
  box-shadow: 0 8px 20px rgba(120,100,80,.12); margin-bottom: 16px;
}
.poem-head { display: flex; align-items: center; gap: 14px; }
.poem-emoji { font-size: 44px; }
.poem-title { font-size: 26px; font-weight: 800; }
.poem-author { font-size: 15px; color: var(--muted); margin-top: 2px; }
.poem-stars { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.poem-lines {
  margin-top: 18px; text-align: center; padding: 20px 6px;
  font-size: 30px; line-height: 1.9; letter-spacing: 2px;
  font-family: "Kaiti", "STKaiti", "KaiTi_GB2312", serif;
  border-top: 2px dashed #f0e4d2; border-bottom: 2px dashed #f0e4d2;
}
.poem-lines .line { transition: background .2s, color .2s; padding: 2px 10px; border-radius: 10px; }
.poem-lines .line.active { background: #fff3cf; color: #b07b00; }

.card-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.card-tip { font-size: 14px; color: var(--muted); margin-bottom: 12px; }

.audio-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn {
  border: none; border-radius: 999px; font-size: 17px; font-weight: 700;
  padding: 12px 22px; cursor: pointer; transition: transform .12s, filter .12s;
  color: #fff; }
.btn:active { transform: scale(.96); }
.btn-primary { background: linear-gradient(135deg, #58a6ff, #7ec8ff); }
.btn-follow { background: linear-gradient(135deg, #00a98f, #3ec9b0); }
.btn-ghost { background: #eef2f6; color: var(--ink); }
.btn-rec { background: linear-gradient(135deg, #ff6b6b, #ff8e53); }
.btn-done {
  width: 100%; margin-top: 14px; padding: 14px;
  background: linear-gradient(135deg, #58c98b, #8ee08f); font-size: 18px;
}
.rec-status { margin-top: 10px; font-size: 16px; color: #d9534f; font-weight: 700; }
.playbar { margin-top: 12px; }
.rec-audio { width: 100%; margin-top: 6px; }
.mic-warn { margin-top: 12px; color: #d9534f; font-size: 14px; }

.voice-picker {
  margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #faf6ee; border-radius: 14px; padding: 10px 14px;
}
.voice-picker label { font-size: 15px; font-weight: 700; }
.voice-picker select {
  font-size: 15px; padding: 6px 10px; border-radius: 10px; border: 2px solid #e6dcc8;
  background: #fff; color: var(--ink); max-width: 100%;
}
.voice-hint { font-size: 13px; color: var(--muted); }
.note { margin-top: 10px; font-size: 14px; color: #2a7f5f; font-weight: 600; }
.poem-audio { width: 100%; margin-top: 10px; }

.quest-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.quest-item {
  display: flex; align-items: center; gap: 12px;
  background: #faf6ee; border-radius: 16px; padding: 12px 14px;
}
.quest-item .star { font-size: 24px; opacity: .25; filter: grayscale(1); }
.quest-item.lit .star { opacity: 1; filter: none; }
.quest-item .q { font-size: 16px; font-weight: 700; }
.quest-item .d { font-size: 13px; color: var(--muted); }
