/* ==================== 语文听写页样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f0f2f8;
  min-height: 100vh;
  color: #333;
}

/* ---------- 顶部 ---------- */
.header {
  background: linear-gradient(135deg, #f7a8c4 0%, #e879a6 100%);
  color: #fff;
  padding: 20px 20px 18px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 20px rgba(232, 121, 166, 0.28);
  position: relative;
}
.header h1 { font-size: 22px; letter-spacing: 1px; margin-bottom: 4px; }
.date-display { font-size: 14px; opacity: .92; }
.btn-back-home {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.22); padding: 6px 14px; border-radius: 12px;
}
.btn-back-home:hover { background: rgba(255,255,255,.36); }

.page-body { max-width: 900px; margin: 0 auto; padding: 18px 16px 40px; }

/* ---------- 今日词语 ---------- */
.content-card {
  background: #fff; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 16px;
}
.content-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.content-card__title { font-size: 17px; font-weight: 800; color: #1f2937; }
.content-card__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cbtn {
  border: 1px solid #d9dee8; background: #f8fafc; color: #334155;
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 6px 11px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
.cbtn:hover { background: #eef2f7; }
.cbtn--swap { border-color: #f3c5d8; background: #fdf2f7; color: #b8437a; }
.cbtn--swap:hover { background: #fbe6ef; }
.content-card__sub { font-size: 12.5px; color: #94a3b8; margin-top: 7px; line-height: 1.6; }

.hide-note {
  margin-top: 10px; padding: 8px 12px; border-radius: 10px;
  background: #fff7e6; border: 1px solid #f5e0b8; color: #9a6b16;
  font-size: 12.5px; font-weight: 600;
}

.word-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px; margin-top: 14px;
}
.wcard {
  position: relative;
  border: 1px solid #e6eaf2; border-radius: 12px; background: #fbfcfe;
  padding: 9px 11px 8px;
}
.wcard__no {
  position: absolute; left: 8px; top: 7px;
  font-size: 10.5px; color: #b9c2d0; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wcard__word { font-size: 20px; font-weight: 800; color: #23303f; letter-spacing: 1px; padding-left: 16px; }
.wcard__py { font-size: 11.5px; color: #8b95a6; margin-top: 2px; padding-left: 16px; min-height: 15px; }
.wcard__book {
  display: inline-block; margin-top: 5px; margin-left: 16px;
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: #c9a2d8; border-radius: 5px; padding: 1px 6px;
}
.wcard__say {
  position: absolute; right: 6px; top: 6px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 3px; border-radius: 6px; opacity: .55;
}
.wcard__say:hover { opacity: 1; background: #eef4ff; }
.wcard.is-done { background: #f4fdf7; border-color: #cdeed9; }

/* 只留拼音（遮住汉字） */
.word-grid.is-masked .wcard__word { visibility: hidden; }
.word-grid.is-masked .wcard__say { visibility: hidden; }

.empty { grid-column: 1 / -1; padding: 20px; text-align: center; color: #9aa4b4; font-size: 14px; }

/* ---------- 完成一行 ---------- */
.done-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e6eaf2; }
.done-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.done-row__text { font-size: 14px; color: #64748b; }
.done-row.is-done .done-row__text { color: #1f8a53; font-weight: 800; }
.dbtn--done { background: #1f8a53; border-color: #1f8a53; color: #fff; }
.dbtn--done:hover { background: #197345; }
.dbtn--ghost { background: #fff; color: #94a3b8; border-color: #dde3ec; font-size: 12px; padding: 5px 10px; }

/* ---------- 听写控制台 ---------- */
.dict-panel { margin-bottom: 16px; }
.dict-card {
  background: #fff; border-radius: 16px; padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-left: 4px solid #e879a6;
}
.dict-card__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dict-card__badge {
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: #e879a6; border-radius: 8px; padding: 3px 10px;
}
.dict-card__count { font-size: 14px; color: #475569; font-variant-numeric: tabular-nums; }
.dict-card__count b { font-size: 19px; color: #c2417a; }
.dict-card__bar { flex: 1; min-width: 90px; height: 7px; background: #f0e2ea; border-radius: 99px; overflow: hidden; }
.dict-card__bar i { display: block; height: 100%; background: #e879a6; border-radius: 99px; transition: width .3s; }
.dict-card__hint { font-size: 15px; font-weight: 700; color: #7a4a60; margin: 12px 0; }
.dict-card__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dict-card__label { font-size: 13px; color: #94a3b8; font-weight: 700; }
.dict-card__btns { display: flex; gap: 10px; flex-wrap: wrap; }

.dopt {
  border: 1px solid #e2e8f0; background: #f8fafc; color: #475569;
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 6px 11px; border-radius: 10px; cursor: pointer;
}
.dopt:hover { background: #eef2f7; }
.dopt.is-on { background: #fdeef5; border-color: #f0b6d1; color: #b8437a; }

.dbtn {
  border: 1px solid #d9dee8; background: #fff; color: #334155;
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 9px 16px; border-radius: 11px; cursor: pointer;
}
.dbtn:hover { background: #f5f7fa; }
.dbtn--main { background: #e879a6; border-color: #e879a6; color: #fff; }
.dbtn--main:hover { background: #dd6598; }

.dict-card__answers {
  margin-top: 12px; padding: 11px 13px; border-radius: 11px;
  background: #f7fbf8; border: 1px solid #d6ecdf;
  font-size: 15px; line-height: 2; color: #1f5138; letter-spacing: .5px;
}

/* ---------- 本周 ---------- */
.week-card {
  background: #fff; border-radius: 16px; padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 16px;
}
.week-card__title { font-size: 15px; font-weight: 800; color: #1f2937; margin-bottom: 12px; }
.week-card__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wday {
  border: 1px solid #e9edf4; border-radius: 11px; background: #fafbfd;
  padding: 9px 4px; text-align: center;
}
.wday.is-done { background: #f2fdf6; border-color: #cdeed9; }
.wday.is-today { box-shadow: 0 0 0 2px #f3c5d8 inset; }
.wday__name { font-size: 11.5px; color: #94a3b8; font-weight: 700; }
.wday__mark { font-size: 15px; line-height: 1.5; color: #cbd5e1; }
.wday__time { font-size: 10.5px; color: #7fae93; font-variant-numeric: tabular-nums; min-height: 13px; }

/* ---------- 用法 ---------- */
.tip-card {
  background: #fff; border-radius: 16px; padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.tip-card__title { font-size: 15px; font-weight: 800; color: #1f2937; margin-bottom: 10px; }
.tip-card__list { margin: 0; padding-left: 20px; font-size: 13.5px; color: #52606f; line-height: 1.95; }
.tip-card__list b { color: #1f2937; }
.tip-card__note { margin-top: 10px; font-size: 12.5px; color: #94a3b8; }

@media (max-width: 520px) {
  .page-body { padding: 14px 12px 32px; }
  .content-card, .dict-card, .week-card, .tip-card { padding: 14px 14px; }
  .word-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  .wcard { padding: 8px 8px 7px; }
  .wcard__word { font-size: 17px; padding-left: 13px; }
  .wcard__py { font-size: 10.5px; padding-left: 13px; }
  .wcard__book { margin-left: 13px; }
  .week-card__days { gap: 4px; }
  .wday { padding: 7px 2px; }
  .wday__name { font-size: 10.5px; }
}
