/* ============================================================
 * 每日听力星球 —— 样式
 * 移动端优先，平板/手机都能流畅使用
 * ============================================================ */

:root {
  --pri: #5b6cff;
  --pri2: #8a5bff;
  --acc: #ff9f43;
  --ok: #2ecc71;
  --bad: #ff5d5d;
  --ink: #2b2f4a;
  --muted: #8a90b0;
  --card: #ffffff;
  --bg: #eef2ff;
  --radius: 18px;
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(91, 108, 255, 0.16), transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(255, 159, 67, 0.14), transparent 40%),
    radial-gradient(circle at 50% 95%, rgba(138, 91, 255, 0.12), transparent 45%),
    var(--bg);
  min-height: 100vh;
}

#app { max-width: 620px; margin: 0 auto; padding: 0 14px 40px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px 10px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(238, 242, 255, 0));
}
.logo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 18px; font-weight: 800; letter-spacing: 0.5px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.streak-chip {
  background: linear-gradient(135deg, #ff9f43, #ff6b6b);
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 3px 8px rgba(255, 107, 107, 0.35);
}
.icon-btn {
  border: none; background: var(--card); width: 38px; height: 38px;
  border-radius: 50%; font-size: 18px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(43, 47, 74, 0.12);
}

/* ---------- 通用卡片与按钮 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(43, 47, 74, 0.08);
}
.card-title {
  font-size: 15px; font-weight: 800; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.hidden { display: none !important; }

.btn {
  display: block; width: 100%;
  border: none; cursor: pointer;
  font-size: 16px; font-weight: 700;
  padding: 13px 18px; border-radius: 14px;
  margin-top: 10px;
  transition: transform 0.08s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.96); }
.btn.big { font-size: 18px; padding: 15px 18px; }
.btn.small { font-size: 14px; padding: 9px 14px; width: auto; }
.btn-primary {
  background: linear-gradient(135deg, var(--pri), var(--pri2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(91, 108, 255, 0.35);
}
.btn-ghost {
  background: #eef1ff; color: var(--pri);
  box-shadow: none;
}
.btn-play {
  background: linear-gradient(135deg, #ff9f43, #ff6b6b);
  color: #fff; font-size: 18px;
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.35);
}
.btn.disabled { opacity: 0.45; pointer-events: none; }
.link-btn {
  border: none; background: none; color: var(--pri);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 0;
  font-family: inherit;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 130px; margin-top: 10px; }

/* ---------- 个人资料卡 ---------- */
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 58px; height: 58px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pri), var(--pri2));
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 14px rgba(91, 108, 255, 0.4);
}
.p-info { flex: 1; min-width: 0; }
.p-name { font-size: 17px; font-weight: 800; }
.p-level { font-size: 13px; color: var(--pri); font-weight: 700; margin: 2px 0 7px; }
.xp-bar {
  height: 10px; border-radius: 999px; background: #e6e9ff; overflow: hidden;
}
.xp-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--pri), var(--acc));
  transition: width 0.6s ease;
}
.xp-text { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- 今日任务卡 ---------- */
.mission-card { border-top: 5px solid var(--pri); }
.mission-head { display: flex; align-items: center; gap: 12px; }
.mission-emoji { font-size: 42px; line-height: 1; }
.mission-title { font-size: 19px; font-weight: 800; }
.mission-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mission-desc { font-size: 14px; color: #5a5f7d; margin: 12px 0 4px; }
.done-box {
  background: #eafaf1; color: #1e9e5f; font-weight: 700; font-size: 14px;
  border-radius: 12px; padding: 12px; margin-top: 10px; text-align: center;
}

/* ---------- 打卡日历 ---------- */
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calendar-head .card-title { margin: 0; }
.calendar-month { color: var(--muted); font-size: 12px; font-weight: 700; margin-top: -7px; }
.calendar-nav {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #eef1ff; color: var(--pri); font-size: 24px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-week { margin-top: 15px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.calendar-grid { margin-top: 6px; }
.calendar-day {
  min-height: 38px; border-radius: 11px; background: #f6f7ff; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; position: relative;
}
.calendar-day.empty-day { background: transparent; }
.calendar-day.checked { background: #e5f8ed; color: #17945a; cursor: pointer; }
.calendar-day.checked b { font-size: 10px; line-height: 10px; }
.calendar-day.today { outline: 2px solid var(--pri); outline-offset: -2px; }
.calendar-day.today.checked { background: linear-gradient(135deg, #e5f8ed, #eef1ff); }
.calendar-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 11px; font-weight: 700; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.checked-dot { background: #8eddb2; }
.today-dot { border: 2px solid var(--pri); }

/* ---------- 徽章 ---------- */
.badge-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.mini-badge {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: #eef1ff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.mini-badge.locked { filter: grayscale(1); opacity: 0.35; }

/* ---------- 历史成绩 ---------- */
.hist-list { display: flex; flex-direction: column; gap: 6px; }
.hist-row {
  display: flex; align-items: center; gap: 8px;
  background: #f6f7ff; border-radius: 12px; padding: 9px 12px;
  font-size: 13px; cursor: pointer; transition: background 0.15s ease, transform 0.08s ease;
}
.hist-row:hover { background: #edf0ff; }
.hist-row:active { transform: scale(0.99); }
.hist-row:focus { outline: 2px solid var(--pri); outline-offset: 2px; }
.hist-date { color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.hist-title { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-stars { color: var(--acc); flex: none; letter-spacing: 1px; }
.hist-xp { color: var(--ok); font-weight: 800; flex: none; }
.hist-arrow { color: var(--pri); font-size: 22px; line-height: 1; flex: none; }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 8px 0; }

/* ---------- 自由练习 ---------- */
.card-sub { font-size: 12px; color: var(--muted); font-weight: 700; min-width: 0; }
.prac-card-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; }
.prac-card-title .card-sub { grid-column: 1; grid-row: 2; margin-top: -7px; }
.prac-card-title .link-btn { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.prac-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.prac-mini {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #f6f7ff; border: none; border-radius: 14px; padding: 10px 6px;
  cursor: pointer; font-family: inherit; text-align: center;
}
.prac-mini:active { background: #e9ecff; }
.prac-mini-title {
  font-size: 12px; font-weight: 800; color: var(--ink); line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prac-mini-lv { font-size: 10px; color: var(--acc); letter-spacing: 1px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.chip-btn {
  border: 2px solid #dfe3ff; background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.chip-btn.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.prac-list { display: flex; flex-direction: column; gap: 8px; }
.prac-item {
  display: flex; align-items: center; gap: 12px;
  background: #f6f7ff; border: none; border-radius: 14px;
  padding: 11px 14px; cursor: pointer; font-family: inherit; text-align: left;
}
.prac-item:active { background: #e9ecff; }
.prac-emoji { font-size: 30px; }
.prac-info { flex: 1; min-width: 0; }
.prac-title { display: block; font-weight: 800; font-size: 15px; color: var(--ink); }
.prac-meta { font-size: 12px; color: var(--muted); }
.prac-go { color: var(--pri); font-size: 16px; }

/* ---------- 关卡头 ---------- */
.stage-head { margin: 6px 0 14px; }
.stage-badge {
  display: inline-block; font-size: 13px; font-weight: 800; color: var(--pri);
  background: #e6e9ff; border-radius: 999px; padding: 4px 12px;
}
.stage-title { font-size: 22px; font-weight: 800; margin-top: 6px; }
.dots { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dot {
  display: flex; align-items: center; gap: 5px;
  background: #e6e9ff; color: var(--muted);
  border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700;
}
.dot.active { background: var(--pri); color: #fff; }
.dot.done { background: #d7f5e3; color: #1e9e5f; }
.dot-num { font-weight: 800; }
.stage-foot { text-align: center; margin-top: 4px; }

/* ---------- 听力播放 ---------- */
.listen-card { text-align: center; }
.speed-control {
  background: #f6f7ff; border-radius: 14px; padding: 9px 11px 10px; margin: 8px 0 10px;
}
.speed-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.speed-label { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.speed-value { color: var(--pri); font-size: 15px; }
.speed-slider { display: block; width: 100%; margin: 8px 0 1px; accent-color: var(--pri); cursor: pointer; }
.speed-scale { display: flex; justify-content: space-between; color: #8c94b8; font-size: 10px; font-weight: 700; }
.speed-options { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.speed-option {
  border: 1px solid #dfe3ff; background: #fff; color: var(--muted);
  border-radius: 999px; padding: 5px 7px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.speed-option.active { background: var(--pri); border-color: var(--pri); color: #fff; }
.listen-visual { height: 64px; display: flex; align-items: center; justify-content: center; }
.bars { display: flex; align-items: center; gap: 6px; height: 46px; }
.bars i {
  width: 8px; height: 14px; border-radius: 4px;
  background: linear-gradient(180deg, var(--pri), var(--pri2));
  transition: height 0.25s ease;
}
.playing .bars i { animation: eq 0.9s ease-in-out infinite; }
.playing .bars i:nth-child(2) { animation-delay: 0.15s; }
.playing .bars i:nth-child(3) { animation-delay: 0.3s; }
.playing .bars i:nth-child(4) { animation-delay: 0.45s; }
.playing .bars i:nth-child(5) { animation-delay: 0.6s; }
@keyframes eq {
  0%, 100% { height: 12px; }
  50% { height: 44px; }
}
.listen-tip { font-size: 14px; color: #5a5f7d; margin: 0 0 4px; }
.theme-tag {
  display: inline-block; margin-left: 6px; background: #eef1ff; color: var(--pri);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700;
}

/* ---------- 提示 chips ---------- */
.hints-title { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.hints-count { color: var(--muted); font-weight: 700; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: #eef1ff; color: var(--pri); font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 6px 13px;
}
.chip.ok { background: #d7f5e3; color: #1e9e5f; }
.hint-note { font-size: 12px; color: var(--muted); }

/* ---------- 复述输入 ---------- */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.mode-tab {
  border: 2px solid #dfe3ff; background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.mode-tab.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.mode-tabs .btn { margin-top: 0; }
.retell-clear { margin-left: auto; }
.retell-card textarea {
  width: 100%; border: 2px solid #dfe3ff; border-radius: 14px;
  padding: 12px; font-size: 16px; font-family: inherit; resize: vertical;
  min-height: 96px; color: var(--ink);
}
.retell-card textarea:focus { outline: none; border-color: var(--pri); }
.mic-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff0f0; color: #d64545; font-weight: 700; font-size: 13px;
  border-radius: 12px; padding: 10px 12px; margin-top: 8px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- 题目 ---------- */
.q-text { font-size: 17px; font-weight: 800; margin: 12px 0 14px; line-height: 1.5; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 11px;
  border: 2px solid #dfe3ff; background: #fff; border-radius: 14px;
  padding: 12px 14px; font-size: 15px; font-weight: 700; color: var(--ink);
  cursor: pointer; text-align: left; font-family: inherit; transition: all 0.12s ease;
}
.opt:active { transform: scale(0.98); }
.opt-letter {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: #eef1ff; color: var(--pri); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.opt.correct { border-color: var(--ok); background: #eafaf1; }
.opt.correct .opt-letter { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: #fff0f0; animation: shake 0.3s ease; }
.opt.wrong .opt-letter { background: var(--bad); color: #fff; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.tf-opts .opt { font-size: 16px; justify-content: center; }
.gap-row { display: flex; gap: 8px; }
.gap-input {
  flex: 1; border: 2px solid #dfe3ff; border-radius: 14px;
  padding: 12px; font-size: 17px; font-family: inherit;
}
.gap-input:focus { outline: none; border-color: var(--pri); }
.gap-row .btn { width: auto; flex: none; margin-top: 0; }

/* ---------- 反馈 ---------- */
.result-box { text-align: center; }
.review-listen-btn { margin: 12px 0 10px; }
.fb-q { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.fb-line { font-size: 14px; border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; text-align: left; }
.ok-line { background: #eafaf1; color: #1e9e5f; }
.bad-line { background: #fff0f0; color: #d64545; }
.good-line { background: #eafaf1; color: #1e9e5f; }
.fb-explain {
  font-size: 13px; color: #5a5f7d; background: #f6f7ff;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; text-align: left;
}

/* ---------- 复述得分环 ---------- */
.score-ring {
  --p: 0;
  width: 118px; height: 118px; margin: 4px auto 10px;
  border-radius: 50%;
  background: conic-gradient(var(--pri) calc(var(--p) * 1%), #e6e9ff 0);
  display: flex; align-items: center; justify-content: center;
}
.score-ring.small { width: 86px; height: 86px; margin: 2px auto 8px; }
.score-ring.small span { width: 66px; height: 66px; font-size: 18px; }
.score-ring span {
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: var(--pri);
}
.score-msg { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.score-xp { font-size: 14px; color: #5a5f7d; margin-bottom: 12px; }
.score-xp b { color: var(--ok); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 9px; font-size: 13px; justify-content: center; }
.mini-label { color: var(--muted); font-weight: 700; }
.orig-text {
  background: #f6f7ff; border-radius: 12px; padding: 12px; margin-bottom: 8px;
  text-align: left;
}
.orig-title { font-size: 13px; font-weight: 800; color: var(--pri); margin-bottom: 6px; }
.orig-text p { font-size: 14px; line-height: 1.7; margin: 0; color: #5a5f7d; }

/* ---------- 复述对比（逐句标色） ---------- */
.cmp-legend { font-size: 12px; color: var(--muted); margin: 4px 0 8px; text-align: left; }
.cmp-sentence-title { font-size: 13px; font-weight: 800; color: var(--pri); margin: 12px 0 4px; text-align: left; }
.cmp-line { font-size: 15px; line-height: 1.9; margin-bottom: 4px; text-align: left; }
.cmp-label { color: var(--muted); font-weight: 700; font-size: 13px; }
.cmp-word { padding: 0 2px; border-radius: 4px; }
.cmp-word.ok { color: #1e9e5f; background: #d7f5e3; }
.cmp-word.diff { color: #d64545; background: #ffe3e3; font-weight: 700; }

/* ---------- 跳过按钮行 ---------- */
.listen-row { display: flex; gap: 8px; }
.listen-row .btn { margin-top: 0; flex: 1; }

/* ---------- 结算 ---------- */
.result-card { text-align: center; padding-top: 26px; }
.stars { font-size: 44px; letter-spacing: 6px; color: var(--acc); line-height: 1.2; }
.star-off { color: #e3e6f5; }
.result-title { font-size: 20px; font-weight: 800; margin-top: 6px; }
.result-mode { font-size: 13px; color: var(--muted); margin-top: 2px; }
.xp-gain {
  font-size: 30px; font-weight: 800; color: var(--ok); margin: 10px 0 14px;
}
.breakdown { text-align: left; background: #f6f7ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.bd-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: #5a5f7d; }
.bd-row b { color: var(--ok); }
.bd-row.bonus { color: var(--acc); font-weight: 700; }
.transcript {
  background: #f6f7ff; border-radius: 14px; padding: 14px; margin-top: 10px;
  text-align: left;
}
.transcript p { font-size: 14px; line-height: 1.8; margin: 0 0 8px; color: #5a5f7d; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30, 34, 70, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal-card {
  background: #fff; border-radius: 22px; padding: 24px;
  width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: pop 0.22s ease;
}
.modal-card.center { text-align: center; }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-emoji { font-size: 44px; }
.modal-title { font-size: 19px; font-weight: 800; margin: 8px 0; }
.modal-sub { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.name-input {
  width: 100%; border: 2px solid #dfe3ff; border-radius: 14px;
  padding: 13px; font-size: 17px; text-align: center; font-family: inherit;
  margin-bottom: 6px;
}
.name-input:focus { outline: none; border-color: var(--pri); }
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.badge-item {
  border: 2px solid #e6e9ff; border-radius: 14px; padding: 12px; text-align: center;
}
.badge-item.locked { opacity: 0.55; filter: grayscale(1); }
.badge-emoji { font-size: 30px; }
.badge-name { font-weight: 800; font-size: 14px; margin-top: 4px; }
.badge-desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.badge-owned { font-size: 12px; color: var(--ok); font-weight: 700; margin-top: 5px; }
.badge-locked-tag { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 5px; }
.history-detail-card { text-align: center; }
.history-detail-title { font-size: 20px; font-weight: 800; margin-top: 8px; }
.history-detail-mode { color: var(--muted); font-size: 13px; margin-top: 3px; }
.history-stars-big { color: var(--acc); font-size: 36px; letter-spacing: 4px; margin: 12px 0 16px; }
.history-score-grid { background: #f6f7ff; border-radius: 14px; padding: 8px 14px; text-align: left; }
.history-score-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e5e8fb; color: #5a5f7d; font-size: 14px; }
.history-score-row:last-child { border-bottom: none; }
.history-score-row b { color: var(--pri); text-align: right; }
.history-score-row b.score-good { color: var(--ok); }
.history-score-row b.score-bad { color: #d64545; }
.history-total { display: flex; justify-content: space-between; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #eafaf1; color: #5a5f7d; font-weight: 700; }
.history-total b { color: var(--ok); }
.history-old-note { background: #fff8e8; color: #8a6b25; border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.6; text-align: left; }
.badge-summary { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }

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

/* ---------- 彩带 ---------- */
.confetti {
  position: fixed; top: -30px; z-index: 55; pointer-events: none;
  animation: fall var(--dur) linear var(--delay) forwards;
}
@keyframes fall {
  to { transform: translate(var(--drift), 112vh) rotate(680deg); }
}

.footer-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
code { background: #e6e9ff; border-radius: 6px; padding: 1px 6px; font-size: 12px; }

@media (max-width: 400px) {
  .logo { font-size: 15px; white-space: nowrap; }
  .topbar { gap: 5px; }
  .top-actions { gap: 4px; }
  .streak-chip { font-size: 12px; padding: 4px 8px; }
  .icon-btn { width: 34px; height: 34px; font-size: 16px; }
  .speed-control { padding: 8px 9px 9px; }
  .speed-options { justify-content: flex-start; }
  .speed-option { padding: 5px 7px; font-size: 11px; }
  .stars { font-size: 36px; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
}
