/* WORDMONv3 — 移动优先、单列 app 布局、底部 tab 导航 */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1d2433;
  --ink-2: #5b6478;
  --ink-3: #9aa3b8;
  --line: #e7eaf3;
  --accent: #5b7cfa;
  --accent-2: #7c5cfc;
  --accent-soft: #eef1ff;
  --green: #2fbf8f;
  --green-soft: #e6f8f1;
  --red: #f0616d;
  --red-soft: #fdeceb;
  --amber: #f5a623;
  --amber-soft: #fdf3e0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(29, 36, 51, 0.06);
  --shadow-lift: 0 8px 28px rgba(29, 36, 51, 0.14);
  --tabbar-h: 62px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--ink); }

.app-shell { min-height: 100vh; }
.app-loading { padding: 80px; text-align: center; color: var(--ink-3); }

/* ---- iPad shell: 左侧栏 + 宽内容区 ---- */
.ipad-shell { display: flex; align-items: stretch; min-height: 100vh; }

.side-nav {
  width: 244px; flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 24px;
  padding: 26px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.app-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.side-title { font-size: 18px; font-weight: 800; }
.side-stats { display: flex; flex-direction: column; gap: 8px; }
.side-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: var(--bg); border-radius: 12px;
  padding: 10px 14px; text-align: left;
}
.side-chip strong { color: var(--ink); font-size: 16px; }
.side-chip.tap:active { background: var(--accent-soft); }
.side-menu { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 700; color: var(--ink-2);
  padding: 13px 14px; border-radius: 13px;
  transition: background 0.12s;
}
.side-item .si { font-size: 21px; width: 26px; text-align: center; }
.side-item:active { background: var(--bg); }
.side-item.on { background: var(--accent-soft); color: var(--accent); }

/* ---- main / views ---- */
.app-main { flex: 1; min-width: 0; overflow-x: hidden; }
.main-inner {
  max-width: 980px; margin: 0 auto;
  padding: 30px 34px 60px;
  display: flex; flex-direction: column; gap: 20px;
}
/* 列表型页面（报告/积分）收窄，阅读更舒服 */
.main-inner.view-report, .main-inner.view-points { max-width: 760px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.section-title {
  font-size: 15px; font-weight: 700; color: var(--ink-2);
  margin: 8px 2px -6px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .link-btn { font-size: 14px; color: var(--accent); font-weight: 600; }

/* 任务/词库列表：宽屏自动双列 */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.task-grid .empty-note { grid-column: 1 / -1; }

/* ---- 今日 view ---- */
.daily-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lift);
}
.daily-card .daily-top { display: flex; align-items: center; justify-content: space-between; }
.daily-card h2 { font-size: 22px; font-weight: 800; }
.daily-card .daily-sub { font-size: 14px; opacity: 0.85; margin-top: 5px; }
.daily-done-badge { font-size: 13px; background: rgba(255,255,255,0.22); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.daily-progress { margin-top: 14px; }
.daily-progress-bar { height: 8px; background: rgba(255,255,255,0.28); border-radius: 999px; overflow: hidden; }
.daily-progress-fill { height: 100%; background: #fff; border-radius: 999px; transition: width 0.3s; }
.daily-progress-pct { display: block; margin-top: 6px; font-size: 12px; opacity: 0.9; }
.daily-actions { display: flex; gap: 10px; margin-top: 14px; }
.daily-start-btn {
  flex: 1;
  background: #fff; color: var(--accent);
  font-weight: 800; font-size: 16px;
  border-radius: 12px; padding: 12px;
  transition: transform 0.1s;
}
.daily-start-btn:active { transform: scale(0.97); }
.daily-mini-btn {
  background: rgba(255,255,255,0.18); color: #fff;
  font-weight: 600; font-size: 14px;
  border-radius: 12px; padding: 12px 14px;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-tile {
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px 6px; text-align: center;
}
.stat-tile .num { font-size: 20px; font-weight: 800; }
.stat-tile .lbl { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat-tile.tappable:active { background: var(--accent-soft); }
.stat-tile .num.warn { color: var(--amber); }
.stat-tile .num.bad { color: var(--red); }
.stat-tile .num.ok { color: var(--green); }

.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 14px;
  font-size: 15px; font-weight: 700; text-align: left;
}
.quick-btn .qi { font-size: 22px; }
.quick-btn .qd { font-size: 12px; color: var(--ink-3); font-weight: 500; display: block; }
.quick-btn:active { background: var(--accent-soft); }

/* ---- task list ---- */
.task-toolbar { display: flex; gap: 8px; align-items: center; }
.task-toolbar .spacer { flex: 1; }
.tool-btn {
  font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  box-shadow: var(--shadow);
}
.tool-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.tool-btn.active { background: var(--ink); color: #fff; }
.tool-btn.danger.active { background: var(--red); }

.task-item {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid transparent;
}
.task-item:active { background: #fafbff; }
.task-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.task-item.selected.for-delete { border-color: var(--red); background: var(--red-soft); }
.task-kind-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--accent-soft);
}
.task-kind-icon.mc { background: var(--amber-soft); }
.task-kind-icon.reading { background: var(--green-soft); }
.task-kind-icon.lib { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; display: flex; gap: 8px; }
.task-progress { text-align: right; flex-shrink: 0; }
.task-progress .pct { font-size: 15px; font-weight: 800; color: var(--accent); }
.task-progress .frac { font-size: 11px; color: var(--ink-3); }
.task-progress .pct.done { color: var(--green); }

.select-confirm-bar {
  position: fixed; left: 244px; right: 0;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; padding: 10px 16px;
  pointer-events: none;
  z-index: 30;
}
.select-confirm-bar .inner {
  pointer-events: auto;
  display: flex; gap: 10px; align-items: center;
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 10px 12px 10px 18px;
  box-shadow: var(--shadow-lift);
  font-size: 14px; font-weight: 600;
  max-width: 560px;
}
.select-confirm-bar button {
  background: var(--accent); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 8px 16px; font-size: 14px;
}
.select-confirm-bar button.danger { background: var(--red); }
.select-confirm-bar button.ghost { background: rgba(255,255,255,0.15); }

/* ---- task detail sheet & modals ---- */
.overlay {
  position: fixed; inset: 0; z-index: 70; /* 高于 .challenge-screen(60)，退出确认等弹窗要压在挑战页上 */
  background: rgba(20, 24, 35, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.center { align-items: center; padding: 24px; }
.sheet {
  background: var(--card);
  width: 100%; max-width: 680px;
  border-radius: 22px 22px 0 0;
  max-height: 86vh;
  display: flex; flex-direction: column;
  animation: sheet-up 0.22s ease;
}
/* iPad 上任务详情里的单词表双列 */
.word-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head {
  padding: 16px 18px 10px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: 17px; font-weight: 800; flex: 1; }
.sheet-close { font-size: 15px; color: var(--ink-3); padding: 6px 10px; }
.sheet-body { overflow-y: auto; padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }

.modal {
  background: var(--card); border-radius: var(--radius);
  width: 100%; max-width: 340px;
  padding: 22px 20px;
  box-shadow: var(--shadow-lift);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0.5; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button {
  flex: 1; padding: 11px; border-radius: 12px;
  font-size: 15px; font-weight: 700;
}
.btn-plain { background: var(--bg); color: var(--ink-2); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* ---- batch pick ---- */
.batch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.batch-grid button {
  padding: 14px 6px; border-radius: 12px;
  background: var(--bg); font-size: 15px; font-weight: 700;
}
.batch-grid button small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.batch-grid button:active { background: var(--accent-soft); }

/* ---- word list in detail ---- */
.word-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--line);
}
.word-row:last-child { border-bottom: none; }
.word-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.word-dot.mastered { background: var(--green); }
.word-dot.learning { background: var(--amber); }
.word-main { flex: 1; min-width: 0; }
.word-en { font-size: 15px; font-weight: 700; }
.word-zh { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-speak { font-size: 17px; padding: 6px; color: var(--accent); }

/* ---- import sheet ---- */
.import-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.import-tabs button {
  flex: 1; padding: 9px 4px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--ink-2);
}
.import-tabs button.on { background: var(--ink); color: #fff; }
.import-field label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 12px 0 6px; }
.import-field textarea {
  width: 100%; min-height: 140px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; font-size: 15px; background: #fbfcff;
}
.import-field input[type="text"], .import-field select, .import-field input[type="number"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 12px; background: #fbfcff;
}
.import-field textarea:focus, .import-field input:focus, .import-field select:focus { outline: none; border-color: var(--accent); }
.ai-clean-btn { font-size: 13px; color: var(--accent); font-weight: 700; }
.import-submit {
  width: 100%; margin-top: 16px; padding: 13px;
  border-radius: 12px; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.import-submit:disabled { opacity: 0.55; }
.import-hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.preview-list { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 12px; max-height: 240px; overflow-y: auto; }
.gen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.preset-item:last-child { border-bottom: none; }
.preset-info { flex: 1; }
.preset-name { font-size: 15px; font-weight: 700; }
.preset-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.preset-add {
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 7px 14px;
  flex-shrink: 0;
}
.preset-add:disabled { background: var(--bg); color: var(--ink-3); }

/* ---- report ---- */
.report-hero { display: flex; gap: 10px; }
.report-hero .stat-tile { flex: 1; }
.cal-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 8px; }
.cal-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.cal-bar { width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); min-height: 4px; }
.cal-bar.empty { background: var(--line); }
.cal-lbl { font-size: 10px; color: var(--ink-3); }
.cal-num { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.weak-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.weak-row:last-child { border-bottom: none; }
.weak-point { font-size: 14px; font-weight: 700; flex: 1; }
.weak-bar-wrap { flex: 2; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.weak-bar { height: 100%; border-radius: 999px; background: var(--green); }
.weak-bar.low { background: var(--red); }
.weak-bar.mid { background: var(--amber); }
.weak-acc { font-size: 13px; font-weight: 700; width: 44px; text-align: right; }
.mini-word-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini-word-row:last-child { border-bottom: none; }
.mini-word-row .w { font-weight: 700; }
.mini-word-row .m { color: var(--ink-3); font-size: 13px; }
.mini-word-row .x { color: var(--red); font-size: 12px; font-weight: 700; }
.empty-note { text-align: center; color: var(--ink-3); font-size: 13px; padding: 16px 0; }

/* ---- points ---- */
.points-hero {
  background: linear-gradient(135deg, #ffb84d, #f59e0b);
  color: #fff; border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow-lift);
}
.points-hero .total { font-size: 40px; font-weight: 900; line-height: 1.15; }
.points-hero .sub { font-size: 13px; opacity: 0.9; }
.redeem-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.redeem-row button {
  background: rgba(255,255,255,0.2); color: #fff;
  border-radius: 12px; padding: 10px 4px; font-size: 14px; font-weight: 800;
}
.redeem-row button:disabled { opacity: 0.45; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ledger-row:last-child { border-bottom: none; }
.ledger-note { color: var(--ink-2); }
.ledger-date { color: var(--ink-3); font-size: 11px; }
.ledger-delta { font-weight: 800; }
.ledger-delta.plus { color: var(--green); }
.ledger-delta.minus { color: var(--red); }
.redeem-status { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.redeem-status.pending { background: var(--amber-soft); color: var(--amber); }
.redeem-status.done { background: var(--green-soft); color: var(--green); }
.mark-done-btn { font-size: 12px; color: var(--accent); font-weight: 700; padding: 4px 8px; }

/* 导航已移至左侧栏 .side-nav */

/* ---- challenge (fullscreen) ---- */
.challenge-screen {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
}
.ch-head {
  width: 100%; max-width: 780px;
  display: flex; align-items: center; gap: 14px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 22px 12px;
}
.ch-quit { font-size: 20px; color: var(--ink-3); padding: 4px 8px; }
.ch-progress-wrap { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ch-progress { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.25s; }
.ch-count { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ch-chips { width: 100%; max-width: 780px; display: flex; gap: 8px; padding: 0 22px 6px; }
.ch-chip { font-size: 12px; font-weight: 700; background: var(--card); border-radius: 999px; padding: 4px 11px; box-shadow: var(--shadow); color: var(--ink-2); }
.ch-chip.fire { color: #e8590c; }
.ch-body { width: 100%; max-width: 780px; flex: 1; overflow-y: auto; padding: 16px 22px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }

.q-card {
  background: var(--card); border-radius: 22px;
  box-shadow: var(--shadow); padding: 30px 26px;
  display: flex; flex-direction: column; gap: 16px;
}
.q-type-tag { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); align-self: flex-start; border-radius: 999px; padding: 4px 12px; }
.q-prompt { font-size: 32px; font-weight: 800; text-align: center; padding: 10px 0; }
.q-prompt.small { font-size: 22px; font-weight: 700; }
.q-prompt.sentence { font-size: 23px; line-height: 1.7; text-align: left; font-weight: 600; }
.q-phonetic { text-align: center; color: var(--ink-3); font-size: 14px; margin-top: -12px; }
.q-hint { text-align: center; color: var(--ink-2); font-size: 15px; }
.q-hint .mask { letter-spacing: 2px; font-weight: 700; font-family: "SF Mono", Menlo, monospace; }
.q-meaning-hint { text-align: center; font-size: 15px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 8px; }

.speak-big {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 6px auto; box-shadow: var(--shadow-lift);
}
.speak-big:active { transform: scale(0.94); }
.speak-inline { font-size: 20px; color: var(--accent); padding: 2px 8px; vertical-align: middle; }

.opt-grid { display: flex; flex-direction: column; gap: 12px; }
.opt-btn {
  background: var(--bg); border: 2px solid transparent;
  border-radius: 14px; padding: 17px 18px;
  font-size: 18px; font-weight: 600; text-align: left;
  transition: background 0.12s;
}
.opt-btn:active { background: var(--accent-soft); }
.opt-btn.correct { background: var(--green-soft); border-color: var(--green); color: #1d7a5c; }
.opt-btn.wrong { background: var(--red-soft); border-color: var(--red); color: #b23842; }
.opt-btn.dim { opacity: 0.45; }

.spell-input {
  width: 100%; border: 2px solid var(--line); border-radius: 14px;
  padding: 16px; font-size: 23px; text-align: center; font-weight: 700;
  background: #fbfcff;
}
.spell-input:focus { outline: none; border-color: var(--accent); }
.spell-submit {
  width: 100%; padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 18px; font-weight: 800;
}

.reading-passage {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 14px;
  font-size: 16px; line-height: 1.8;
}
.reading-passage h4 { font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.reading-passage .psg-pos { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.feedback-card {
  border-radius: 20px; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  animation: pop 0.18s ease;
}
.feedback-card.good { background: var(--green-soft); }
.feedback-card.bad { background: var(--red-soft); }
.fb-title { font-size: 21px; font-weight: 900; }
.feedback-card.good .fb-title { color: #1d7a5c; }
.feedback-card.bad .fb-title { color: #b23842; }
.fb-word { font-size: 25px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fb-meaning { font-size: 15px; color: var(--ink-2); }
.fb-example { font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.65); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.fb-explain { font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.65); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.fb-next {
  margin-top: 6px; padding: 13px; border-radius: 14px;
  font-size: 16px; font-weight: 800; color: #fff;
}
.feedback-card.good .fb-next { background: var(--green); }
.feedback-card.bad .fb-next { background: var(--red); }
.fb-retry-note { font-size: 12px; color: var(--ink-3); text-align: center; }

/* completion */
.complete-card { text-align: center; padding: 26px 20px; }
.complete-emoji { font-size: 52px; }
.complete-title { font-size: 22px; font-weight: 900; margin-top: 6px; }
.complete-stats { display: flex; justify-content: center; gap: 18px; margin: 14px 0; }
.complete-stats .cs { text-align: center; }
.complete-stats .cs .n { font-size: 22px; font-weight: 800; }
.complete-stats .cs .l { font-size: 12px; color: var(--ink-3); }
.points-block { background: var(--amber-soft); border-radius: 14px; padding: 12px 14px; text-align: left; margin-bottom: 14px; }
.points-block .pb-total { font-size: 16px; font-weight: 800; color: #b45309; margin-bottom: 4px; }
.points-block .pb-line { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; padding: 2px 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600;
  border-radius: 999px; padding: 11px 22px;
  box-shadow: var(--shadow-lift);
  z-index: 90; max-width: 88vw; text-align: center;
  animation: pop 0.18s ease;
}

.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 登录页 ---- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 28px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

.login-logo { width: 76px; height: 76px; margin-bottom: 18px; }

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub { color: var(--ink-3); font-size: 15px; margin-top: 4px; }

.login-form {
  width: 100%;
  max-width: 300px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 17px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.15s;
}

.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { letter-spacing: normal; color: var(--ink-3); }

.login-btn {
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: var(--shadow);
  transition: opacity 0.15s, transform 0.1s;
}

.login-btn:active { transform: scale(0.985); }
.login-btn:disabled { opacity: 0.55; }

.login-err {
  min-height: 20px;
  color: var(--red);
  font-size: 14px;
}

.login-tip { margin-top: 22px; color: var(--ink-3); font-size: 13px; }
