/* =========================================================
   言葉星雲 · Kotoba Nebula
   简约 / 克制 / 深色 · 词云 · 我的
   ========================================================= */
:root {
  --bg: #08090c;
  --bg-soft: #0b0d10;
  --surface: #0e1013;
  --surface-2: #13161b;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --text: #e9eaee;
  --text-2: #8b909a;
  --text-3: #555a63;
  --unfamiliar: #c98d95;
  --fuzzy: #bfaa79;
  --mastered: #86b5ae;
  --new: #4d525b;
  --radius: 18px;
  --tab-h: 64px;
  --font: "HarmonyOS Sans SC", "HarmonyOS Sans", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
}
body { overflow: hidden; -webkit-font-smoothing: antialiased; }

button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; padding: 0; }
input { font-family: inherit; }

/* ---------------- 背景 ---------------- */
.space {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.035), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255, 255, 255, 0.02), transparent 60%),
    var(--bg);
}
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

/* ---------------- 骨架 ---------------- */
#app {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 5;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 22px 6px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text);
}
.top-streak {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

#main {
  flex: 1;
  min-height: 0;
  padding: 6px 22px calc(var(--tab-h) + env(safe-area-inset-bottom) + 14px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
#main::-webkit-scrollbar { display: none; }

.view { display: none; }
.view.active { display: block; animation: viewIn 0.34s ease both; }
@keyframes viewIn { from { transform: translateY(6px); } to { transform: none; } }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  z-index: 30;
  bottom: 0; left: 0; right: 0;
  max-width: 520px;
  margin: 0 auto;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: stretch;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  transition: color 0.2s ease;
}
.tab.active { color: var(--text); }
.tab.active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
}

/* ---------------- 通用 ---------------- */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #0a0b0d;
  background: #e6e7ea;
  transition: background 0.18s ease, transform 0.16s ease;
}
.btn-primary:active { transform: scale(0.985); background: #d9dade; }
.btn-ghost {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: transparent;
}
.btn-ghost:active { background: rgba(255, 255, 255, 0.03); }
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  border: 1px solid var(--line);
  background: transparent;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.04); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title { font-size: 12px; color: var(--text-2); letter-spacing: 0.1em; }
.card-sub { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------------- 词云页 ---------------- */
#view-cloud.active { display: flex; flex-direction: column; height: 100%; }
#app[data-view="cloud"] #main { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 2px); overflow: hidden; }

.hero {
  flex: none;
  padding: 14px 2px 0;
}
.hero-date {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-3);
}
.hero-title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.cloud-stage {
  position: relative;
  flex: 1;
  min-height: 300px;
  margin: 6px -6px 0;
  border-radius: 22px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.cloud-stage:active { cursor: grabbing; }
#cloudCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cloud-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  margin: 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-3);
  opacity: 0.7;
  pointer-events: none;
}

.goal-block { flex: none; padding: 14px 2px 12px; }
.goal-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.goal-value { font-variant-numeric: tabular-nums; color: var(--text-3); letter-spacing: 0.02em; }
.goal-value b { font-size: 14px; color: var(--text); font-weight: 600; }
.goal-value i { font-style: normal; margin: 0 3px; }
.goal-value em { font-style: normal; }
.goal-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.goal-track i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* ---------------- 我的 ---------------- */
.me-head { padding: 16px 2px 20px; }
.me-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.me-head p { margin: 0; font-size: 11.5px; color: var(--text-3); letter-spacing: 0.1em; }

.stat-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.stat-line > div { display: flex; flex-direction: column; gap: 5px; }
.stat-line b {
  font-size: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-line span { font-size: 10px; color: var(--text-3); letter-spacing: 0.08em; }

.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-nav .icon-btn { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.cal-nav span {
  min-width: 82px;
  text-align: center;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week { margin: 16px 0 4px; }
.cal-week span { text-align: center; font-size: 9.5px; color: var(--text-3); letter-spacing: 0.06em; }
.cal-grid { gap: 2px 0; }
.cal-cell {
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  border-radius: 9px;
}
.cal-cell.empty { opacity: 0; }
.cal-cell.future { opacity: 0.45; }
.cal-cell.checked { color: var(--text); }
.cal-cell.checked::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-2);
}
.cal-cell.today { color: var(--text); }
.cal-cell.today::before {
  content: "";
  position: absolute;
  inset: 4px 6px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
}

.dist-bar {
  display: flex;
  height: 5px;
  margin: 18px 0 14px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}
.dist-bar i { display: block; height: 100%; transition: width 0.5s ease; }
.d-unfamiliar { background: var(--unfamiliar); }
.d-fuzzy { background: var(--fuzzy); }
.d-mastered { background: var(--mastered); }
.d-new { background: var(--new); }
.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.dist-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dist-legend i { width: 5px; height: 5px; border-radius: 1px; }
.dist-legend b { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }

.row-btn {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  transition: opacity 0.18s ease;
}
.row-btn:active { opacity: 0.6; }
.row-btn .row-val { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.row-btn i { font-style: normal; color: var(--text-3); font-size: 15px; }
.row-btn[hidden] { display: none; }

/* ---------------- 词库（词组） ---------------- */
.book-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.book-card {
  width: 100%;
  text-align: left;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.book-card:active { transform: scale(0.99); }
.book-card.active { border-color: rgba(255, 255, 255, 0.26); background: #13161b; }
.book-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.book-no {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.10em;
  color: var(--text-3);
  vertical-align: 2px;
}
.book-name { font-size: 18px; font-weight: 600; letter-spacing: 0.06em; }
.book-flag {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.book-count { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.book-sub { margin-top: 6px; font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; }
.book-bar { margin-top: 12px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.book-bar i { display: block; height: 100%; background: var(--text-2); border-radius: 2px; transition: width 0.4s ease; }
.words-book { margin: 12px 0 0 2px; font-size: 10.5px; color: var(--text-2); letter-spacing: 0.08em; }

/* ---------------- 词库 ---------------- */
.words-head { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.back-btn { flex: none; }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.search-box input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.search-box input::placeholder { color: var(--text-3); }
.filter-row { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 2px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-3);
  border: 1px solid var(--line);
  background: transparent;
  transition: all 0.18s ease;
}
.filter-chip.active {
  color: #0a0b0d;
  background: #e6e7ea;
  border-color: transparent;
  font-weight: 600;
}
.words-count { margin: 12px 0 10px 2px; font-size: 10px; color: var(--text-3); letter-spacing: 0.08em; }
.word-list { display: flex; flex-direction: column; }
.word-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: opacity 0.16s ease;
}
.word-row:active { opacity: 0.6; }
.wr-main { flex: 1; min-width: 0; }
.wr-word { font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }
.wr-kana { font-size: 10px; color: var(--text-3); margin-left: 7px; font-weight: 400; }
.wr-meaning {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.wr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
}
.badge-unfamiliar { color: var(--unfamiliar); }
.badge-fuzzy { color: var(--fuzzy); }
.badge-mastered { color: var(--mastered); }
.badge-new { color: var(--text-3); }
.wr-due { font-size: 9px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.empty-state { text-align: center; padding: 56px 0; color: var(--text-3); font-size: 12px; line-height: 2; }

/* ---------------- 浮层通用 ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.overlay.open { display: flex; }

/* ---------------- 学习 ---------------- */
.overlay.study { align-items: stretch; justify-content: center; }
.study-shell {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
  animation: viewIn 0.3s ease both;
}
.study-top { flex: none; display: flex; align-items: center; gap: 14px; padding-bottom: 18px; }
.study-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.sp-bar { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.sp-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text);
  transition: width 0.4s ease;
}
.study-progress span { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

.quiz {
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0 44px;
  overflow: hidden;
}
.quiz-type { margin: 0 0 22px; font-size: 10.5px; letter-spacing: 0.16em; color: var(--text-3); }
.quiz-stem {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.05em;
  color: var(--text);
  text-align: center;
  word-break: break-word;
}
.quiz-stem.is-sentence { font-size: 21px; line-height: 1.75; letter-spacing: 0.02em; }
.quiz-sub { margin: 14px 0 0; font-size: 11px; color: var(--text-3); letter-spacing: 0.14em; text-align: center; line-height: 1.7; }
.quiz-options { flex: none; display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  position: relative;
  width: 100%;
  min-height: 54px;
  padding: 15px 44px 15px 18px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.opt-btn:active { background: rgba(255, 255, 255, 0.04); }
.opt-btn.correct { border-color: rgba(134, 181, 174, 0.55); color: var(--mastered); background: rgba(134, 181, 174, 0.06); }
.opt-btn.wrong { border-color: rgba(201, 141, 149, 0.55); color: var(--unfamiliar); background: rgba(201, 141, 149, 0.06); }
.opt-btn.dim { opacity: 0.35; }
.opt-btn.correct::after {
  content: "✓";
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
}
.opt-btn.wrong::after {
  content: "✕";
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}

.quiz-feedback {
  display: none;
  flex: none;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.quiz-feedback.show { display: block; animation: fbIn 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
@keyframes fbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fb-kana { margin: 0 0 4px; font-size: 10.5px; letter-spacing: 0.2em; color: var(--text-3); }
.fb-word { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: 0.04em; }
.fb-pos {
  flex: none;
  font-size: 9.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.fb-meaning { margin: 10px 0; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.fb-ex { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.fb-ex-jp { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.fb-ex-cn { margin: 4px 0 0; font-size: 10.5px; line-height: 1.6; color: var(--text-3); }
.quiz-feedback .btn-primary { height: 46px; }

/* ---------------- 结算 ---------------- */
.overlay.summary { align-items: center; justify-content: center; padding: 24px; }
.summary-card {
  width: 100%;
  max-width: 340px;
  padding: 30px 26px 22px;
  border-radius: 22px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: summaryIn 0.42s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes summaryIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.summary-kicker { margin: 0 0 10px; font-size: 10px; letter-spacing: 0.2em; color: var(--text-3); }
.summary-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: 0.02em; }
.summary-sub { margin: 0 0 22px; font-size: 11px; color: var(--text-3); }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.summary-grid > div { display: flex; flex-direction: column; gap: 4px; }
.summary-grid b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-grid span { font-size: 9px; color: var(--text-3); letter-spacing: 0.08em; }
.summary-streak { margin: 15px 0 20px; font-size: 10.5px; color: var(--text-3); letter-spacing: 0.06em; }
.summary-actions { display: flex; gap: 9px; }
.summary-actions .btn-primary { flex: 1.3; height: 46px; }
.summary-actions .btn-ghost { flex: 1; height: 46px; }

/* ---------------- 单词详情 ---------------- */
.overlay.sheet { align-items: flex-end; justify-content: center; }
.sheet-panel {
  width: 100%;
  max-width: 520px;
  padding: 10px 24px calc(26px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--bg-soft);
  animation: sheetUp 0.38s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 36px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); margin: 4px auto 20px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; }
.sheet-kana { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.22em; color: var(--text-3); }
.sheet-word { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: 0.05em; line-height: 1.1; }
.sheet-romaji { margin: 7px 0 0; font-size: 10px; letter-spacing: 0.26em; color: var(--text-3); }
.sheet-meaning { margin: 14px 0 12px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.sheet-meta { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  font-size: 9.5px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--text-3);
  border: 1px solid var(--line);
  letter-spacing: 0.06em;
}
.tag-state.unfamiliar { color: var(--unfamiliar); border-color: rgba(201, 141, 149, 0.3); }
.tag-state.fuzzy { color: var(--fuzzy); border-color: rgba(191, 170, 121, 0.3); }
.tag-state.mastered { color: var(--mastered); border-color: rgba(134, 181, 174, 0.3); }
.tag-state.new { color: var(--text-3); }
.sheet-example {
  margin-top: 16px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.sheet-rate { margin-top: 18px; }
.sheet-rate > p { margin: 0 0 10px; font-size: 9.5px; color: var(--text-3); letter-spacing: 0.14em; }
.sheet-rate-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip-btn {
  height: 42px;
  border-radius: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.chip-btn:active { transform: scale(0.98); }
.chip-btn.active.c-unfamiliar { color: var(--unfamiliar); border-color: rgba(201, 141, 149, 0.45); }
.chip-btn.active.c-fuzzy { color: var(--fuzzy); border-color: rgba(191, 170, 121, 0.45); }
.chip-btn.active.c-mastered { color: var(--mastered); border-color: rgba(134, 181, 174, 0.45); }
.c-unfamiliar { color: var(--unfamiliar); }
.c-fuzzy { color: var(--fuzzy); }
.c-mastered { color: var(--mastered); }
.sheet-progress { margin: 14px 0 0; font-size: 9.5px; color: var(--text-3); letter-spacing: 0.04em; }

/* ---------------- 每日目标 ---------------- */
.overlay.goal { align-items: center; justify-content: center; padding: 24px; }
.goal-card {
  width: 100%;
  max-width: 330px;
  padding: 26px 22px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: summaryIn 0.38s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.goal-kicker { margin: 0 0 8px; font-size: 10px; letter-spacing: 0.2em; color: var(--text-3); }
.goal-sub { margin: 0 0 18px; font-size: 11.5px; line-height: 1.7; color: var(--text-2); }
.goal-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 16px; }
.goal-opt {
  height: 44px;
  border-radius: 11px;
  font-size: 14px;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: transparent;
  font-variant-numeric: tabular-nums;
  transition: all 0.16s ease;
}
.goal-opt.active { color: #0a0b0d; background: #e6e7ea; border-color: transparent; font-weight: 600; }
.goal-cancel { width: 100%; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 22px);
  transform: translate(-50%, 10px);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(20, 23, 28, 0.96);
  border: 1px solid var(--line-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s ease;
  max-width: 84vw;
  text-align: center;
  line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 380px) {
  .hero-title { font-size: 19px; }
  .cal-cell { height: 31px; }
}
@media (min-width: 900px) {
  #app { max-width: 560px; }
  .tabbar { max-width: 560px; }
  .sheet-panel { max-width: 560px; }
  .study-shell { max-width: 560px; }
}
