/* ---------- 首页 ---------- */
.streak { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--warn-50); color: var(--warn); font-weight: 600; } .streak b { font-size: 18px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.stat-v { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; } .stat-l { font-size: 13px; color: var(--muted); margin-top: 2px; }
.task { display: flex; flex-direction: column; gap: 12px; } .task-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .task-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow); transition: .15s; }
.quick-card .icon { color: var(--primary); margin-bottom: 6px; } .quick-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, max-content); align-content: start; justify-content: start; gap: 5px; overflow-x: auto; padding: 2px; }
.heatmap.wide .hm-cell { width: 15px; height: 15px; }
.hm-cell { display: block; width: 17px; height: 17px; border-radius: 3.5px; background: var(--hm0); } .hm-cell.hm-pad { background: none; }
.hm-cell.l1 { background: var(--hm1); } .hm-cell.l2 { background: var(--hm2); } .hm-cell.l3 { background: var(--hm3); } .hm-cell.l4 { background: var(--hm4); }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; }

/* ---------- 单词本 ---------- */
.book-card { display: flex; flex-direction: column; gap: 10px; transition: .15s; } .book-card:hover { border-color: var(--primary); }
.bc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } .bc-title { font-size: 17px; font-weight: 700; color: var(--text); word-break: break-word; }
.bc-desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.bc-meta { display: flex; gap: 14px; flex-wrap: wrap; } .bc-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.book-hero { display: flex; flex-direction: column; gap: 12px; } .bh-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .bh-progress { display: flex; flex-direction: column; gap: 10px; }
.share-desc { color: var(--muted); line-height: 1.7; white-space: pre-wrap; }
.share-hero { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: linear-gradient(135deg, var(--primary-50), var(--surface)); } .share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.share-panel { display: flex; flex-direction: column; gap: 4px; }
.more-menu { position: relative; } .more-menu summary { list-style: none; cursor: pointer; padding: 9px 12px; } .more-menu summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; z-index: 20; display: flex; flex-direction: column; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 9px; text-align: left; color: var(--text); font-size: 14.5px; } .menu button:hover, .menu a:hover { background: var(--surface-2); }
.word-list { display: flex; flex-direction: column; }
.word-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--border); } .word-row:last-child { border-bottom: 0; }
.word-row > .chk { margin-top: 8px; } .word-row > .icon-btn { margin-top: 0; }
.wr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wr-word { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .wr-word b { font-size: 16.5px; word-break: break-word; }
.phon { color: var(--muted); font-family: "Lucida Sans Unicode", "Arial Unicode MS", var(--font); font-size: 14px; } .phon.big { font-size: 18px; }
.meaning { color: var(--muted); font-size: 14px; line-height: 1.6; } .meaning.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--primary-50); border-radius: 12px; margin-bottom: 8px; position: sticky; top: 8px; z-index: 5; }
.add-word { margin-bottom: 4px; }
.pager-wrap { margin-top: 14px; } .pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; } .page-nums { display: flex; gap: 4px; }
.page-btn { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; display: inline-grid; place-items: center; }
.page-btn.active { background: var(--fill); border-color: var(--fill); color: #fff; } .page-dots { padding: 0 4px; color: var(--muted); align-self: center; }
.pager-info { color: var(--muted); font-size: 13px; text-align: center; width: 100%; margin-top: 4px; } .pager .pager-info { margin-top: 6px; }
.user-card { display: flex; align-items: center; gap: 14px; }

/* ---------- 导入 ---------- */
.radio-cards, .mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-card, .mode-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; position: relative; transition: .15s; }
.radio-card input { position: absolute; opacity: 0; } .radio-card.active, .mode-card.active { border-color: var(--primary); background: var(--primary-50); }
.mode-card:disabled { opacity: .45; } .mode-n { position: absolute; right: 14px; top: 12px; font-weight: 700; color: var(--primary); }
.pv { display: flex; flex-direction: column; gap: 14px; } .pv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.pv-tile { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; } .pv-tile b { font-size: 22px; } .pv-tile span { font-size: 13px; color: var(--muted); }
.pv-tile.ok b { color: var(--success); } .pv-tile.bad b { color: var(--danger); }
.sample { display: flex; flex-direction: column; gap: 8px; } .sample-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .sample-row .meaning { flex-basis: 100%; }
.failed { background: var(--danger-50); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.failed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--danger); }
.failed-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; } .tag-fail { background: var(--surface); border: 1px solid var(--border); padding: 2px 10px; border-radius: 8px; font-size: 13.5px; }
.split-box { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.split-head { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--border); }
.split-list { max-height: 360px; overflow: auto; } .split-row { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; } .split-row:last-child { border-bottom: 0; } .split-row:hover { background: var(--surface-2); }
.split-row .chk { margin-top: 4px; }

/* ---------- 听写页 ---------- */
body.fullscreen { background: var(--surface); }
.dict-root { min-height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); }
.dict-top { display: flex; align-items: center; gap: 14px; padding: 14px 0; } .dict-progress { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.dict-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding-bottom: 8vh; text-align: center; }
.speaker { width: 116px; height: 116px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 32px var(--glow); transition: .15s; }
.speaker:hover { transform: scale(1.04); } .speaker:active { transform: scale(.96); }
.input-wrap { width: 100%; max-width: 480px; }
.dict-input { width: 100%; text-align: center; font-size: 28px; font-weight: 600; padding: 14px 16px; border: 0; border-bottom: 3px solid var(--border); background: transparent; outline: none; color: var(--text); letter-spacing: .02em; transition: .15s; border-radius: 0; }
.dict-input:focus { border-bottom-color: var(--primary); } .dict-input.shake { animation: shake .35s; border-bottom-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.dict-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.hint-line { font-family: var(--mono); font-size: 22px; letter-spacing: .1em; min-height: 30px; color: var(--primary); }
.q-meaning { max-width: 520px; min-height: 0; } .q-meaning .meaning { color: var(--text); font-size: 15.5px; background: var(--surface-2); padding: 10px 16px; border-radius: 12px; text-align: left; }
.key-tips { display: block; } @media (hover: none) { .key-tips { display: none; } }
.dict-stage.result .res-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 99px; font-weight: 700; }
.dict-stage.ok .res-badge { background: var(--success-50); color: var(--success); } .dict-stage.bad .res-badge { background: var(--danger-50); color: var(--danger); }
.res-word { font-size: 38px; font-weight: 800; letter-spacing: .02em; word-break: break-word; } .dc-ok { color: var(--success); } .dc-bad { color: var(--danger); text-decoration: underline wavy; text-underline-offset: 6px; }
.res-yours { color: var(--muted); } .wrong-input { color: var(--danger); text-decoration: line-through; font-weight: 600; } .wrong-input.small { font-size: 13px; }
.res-meaning { max-width: 520px; text-align: left; background: var(--surface-2); padding: 12px 18px; border-radius: 14px; } .res-meaning .meaning { color: var(--text); font-size: 15.5px; }
.dict-finish { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0 40px; text-align: center; }
.ring { --p: 0; width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring-in { width: 140px; height: 140px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; } .ring-in b { font-size: 40px; line-height: 1; } .ring-in span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.fin-stats { display: flex; gap: 34px; } .fin-stats div { display: flex; flex-direction: column; } .fin-stats b { font-size: 22px; } .fin-stats span { color: var(--muted); font-size: 13px; }
.fin-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } .fin-wrongs { width: 100%; text-align: left; }
.stepper { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 统计图 ---------- */
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 190px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; } .bar-track { flex: 1; width: 100%; max-width: 28px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.bar-fill { width: 100%; background: var(--hm2); display: flex; align-items: flex-end; border-radius: 8px 8px 0 0; } .bar-ok { width: 100%; background: var(--primary); }
.bar-lab { font-size: 11px; } .bar-val { height: 16px; font-size: 11px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 8px; } .dot.ok { background: var(--primary); } .dot.all { background: var(--hm2); }
.plan-card { display: flex; flex-direction: column; gap: 12px; } .plan-card.paused { opacity: .65; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bn-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: 11.5px; font-weight: 500; border-radius: 10px; }
  .bn-link.active { color: var(--primary); }
  .stats-row, .quick { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 23px; }
}
@media (max-width: 640px) {
  .grid-2, .radio-cards, .mode-grid { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 14px; }
  .page-head { gap: 10px; }
  .res-word { font-size: 30px; } .dict-input { font-size: 24px; }
  .speaker { width: 100px; height: 100px; }
  .bars { gap: 3px; } .bar-lab { font-size: 9.5px; }
  .toolbar > .select { flex: 1; }
  .modal { border-radius: 18px; }
  .fin-stats { gap: 22px; }
}

/* ---------- 分类 / 单词本 / 帮助 / 管理后台 ---------- */
.gap-s { gap: 6px; }
.row.gap-s { display: inline-flex; align-items: center; flex-wrap: wrap; }
.badge.cat { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.cat-bar { margin: -4px 0 2px; }
.cat-pick .chip-btn { padding: 6px 15px; }
.notice { display: flex; align-items: center; gap: 8px; }
.notice.warn-n { background: var(--warn-50); color: var(--warn); }
.coll-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--warn-50); color: var(--warn); margin-right: 8px; flex: none; vertical-align: middle; }
.coll-ic.lg { width: 36px; height: 36px; border-radius: 11px; }
.coll-card .bc-title { display: flex; align-items: center; }
.coll-n { font-size: 15px; } .coll-n b { font-size: 30px; font-variant-numeric: tabular-nums; }
.star-on { color: var(--warn) !important; }

.help-card { padding: 0; overflow: hidden; }
.help-card > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-weight: 700; cursor: pointer; color: var(--primary); background: var(--primary-50); }
.help-card > summary::-webkit-details-marker { display: none; }
.help-card > summary .icon:last-child { margin-left: auto; transition: .2s; } .help-card[open] > summary .icon:last-child { transform: rotate(180deg); }
.help-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.help-body h4 { margin: 0 0 6px; font-size: 14.5px; }
.help-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); } .help-body li b { color: var(--text); }
.help-example { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; align-items: start; }
.help-example pre, code { font-family: var(--mono); background: var(--surface-2); border-radius: 8px; }
.help-example pre { margin: 4px 0 0; padding: 10px 14px; font-size: 13.5px; line-height: 1.7; } code { padding: 1px 6px; font-size: 13px; }
.help-example p { margin: 4px 0 10px; color: var(--muted); }

/* 听写页：星号收藏 */
.star-group { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 12px; flex: none; }
.star-btn { border: 0; background: none; padding: 7px 4px 7px 9px; color: var(--muted); border-radius: 12px 0 0 12px; display: grid; place-items: center; transition: .15s; }
.star-btn:hover { color: var(--warn); } .star-btn.on { color: var(--warn); animation: pop-star .25s; }
.star-caret { border: 0; background: none; padding: 7px 7px 7px 2px; color: var(--muted); border-radius: 0 12px 12px 0; display: grid; place-items: center; }
.star-caret:hover { color: var(--primary); }
@keyframes pop-star { 50% { transform: scale(1.35); } }
.toast { display: flex; align-items: center; gap: 12px; }
.toast-act { border: 0; background: rgba(255,255,255,.2); color: #fff; border-radius: 8px; padding: 3px 11px; font-weight: 700; font-size: 13.5px; pointer-events: auto; }
#toasts { pointer-events: none; } .toast { pointer-events: auto; }

/* 选择单词本弹窗 */
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--border); cursor: pointer; }
.pick-row input { position: absolute; opacity: 0; pointer-events: none; } .pick-row.active { border-color: var(--primary); background: var(--primary-50); } .pick-row .icon { color: var(--warn); }

/* 管理后台 */
.seg-a { border: 0; background: none; padding: 7px 16px; border-radius: 8px; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg-a.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.admin-body { display: flex; flex-direction: column; gap: 16px; }
.table-wrap { overflow-x: auto; padding: 0; } .card.table-wrap { padding: 4px 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 12px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; } .table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: var(--surface-2); }
.sp { margin-left: 6px; }

@media (max-width: 640px) {
  .help-grid, .help-example { grid-template-columns: 1fr; }
  .dict-top { gap: 8px; }
}

/* ---------- 品牌 logo ---------- */
.logo-img { width: 36px; height: 36px; border-radius: 10px; display: block; flex: none; background: var(--fill); color: #fff; --logo-ink: var(--fill); }
.logo-img svg { display: block; }
.logo-img.lg { width: 72px; height: 72px; border-radius: 20px; }
.auth-logo { display: grid; place-items: center; margin-bottom: 4px; }

/* ---------- 管理后台（独立外壳）---------- */
.admin-shell .sidebar { background: var(--surface); }
.admin-shell .brand { font-size: 17px; }
.admin-shell .side-foot { display: flex; flex-direction: column; gap: 10px; }
.admin-tabs { display: none; }
.main-wide { max-width: 1240px; }
.admin-shell .main { max-width: 1240px; }
.pub-panel { display: flex; flex-direction: column; gap: 8px; }
.pub-panel .section-head { margin-bottom: 0; }

/* ---------- 公告 ---------- */
.ann-box { display: flex; flex-direction: column; gap: 10px; }
.ann-box:empty { display: none; }
.ann-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid transparent; line-height: 1.6; }
.ann-banner.info { background: var(--primary-50); color: var(--primary); border-color: var(--primary-50); }
.ann-banner.success { background: var(--success-50); color: var(--success); border-color: rgba(18, 165, 107, .22); }
.ann-banner.warn { background: var(--warn-50); color: var(--warn); border-color: rgba(217, 119, 6, .22); }
.ann-banner.danger { background: var(--danger-50); color: var(--danger); border-color: rgba(229, 72, 77, .22); }
.ann-banner.clickable { cursor: pointer; transition: .15s; } .ann-banner.clickable:hover { filter: brightness(.98); transform: translateY(-1px); }
.ann-content { flex: 1; min-width: 0; font-size: 14.5px; color: var(--text); } .ann-content a { color: inherit; text-decoration: underline; font-weight: 600; }
.ann-content p { margin: 0; } .ann-content img { max-width: 100%; border-radius: 8px; }
.ann-ic { flex: none; display: grid; }
.ann-more { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ann-popup { width: min(560px, 100%); }
.ann-body { line-height: 1.8; font-size: 15px; } .ann-body img { max-width: 100%; border-radius: 10px; } .ann-body a { font-weight: 600; }
.ann-body h1, .ann-body h2, .ann-body h3 { margin: 12px 0 6px; } .ann-body p { margin: 8px 0; } .ann-body ul, .ann-body ol { padding-left: 22px; }
.ann-section { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ann-section h4 { margin: 0; font-size: 15px; }
.ann-preview { padding: 4px 0; }
.ann-card { display: flex; flex-direction: column; gap: 10px; } .ann-card.paused { opacity: .65; }
.ann-card-preview { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 14px; max-height: 120px; overflow: hidden; }
.ann-card-preview img { max-width: 100%; max-height: 90px; }

/* ---------- 听写页：加载、星标位置、结果页排版 ---------- */
.dict-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 70dvh; }
.dl-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.dl-text { font-weight: 600; font-size: 16px; } .dl-bar { width: min(260px, 70vw); height: 6px; }
.dl-bar .bar { transition: width .25s ease; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.input-wrap { display: flex; align-items: center; gap: 10px; }
.input-wrap .dict-input { flex: 1; min-width: 0; }
.star-group { margin-bottom: 2px; }
.res-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dict-stage.result { gap: 20px; }
.res-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--danger); background: var(--danger-50); padding: 4px 12px; border-radius: 99px; }
.res-word-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; max-width: 100%; }
.res-word-row .star-group { transform: scale(1.1); }
.res-replay { margin: 2px 0 6px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.dict-stage.result .res-meaning { width: 100%; max-width: 520px; }
.dict-stage.result .btn-lg { margin-top: 4px; }
@media (max-width: 900px) {
  .admin-shell .sidebar { display: none; }
  .admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; -webkit-overflow-scrolling: touch; }
  .admin-tabs .nav-link { padding: 8px 12px; white-space: nowrap; gap: 6px; flex: none; font-size: 14px; }
  .admin-tabs .back-front { display: inline-flex; align-items: center; gap: 2px; flex: none; color: var(--muted); padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .admin-shell .main { padding-bottom: 40px; }
}
.badge.pin { background: var(--warn-50); color: var(--warn); }

/* 右上角日间 / 夜间切换 */
.theme-toggle { position: fixed; top: 12px; right: 14px; z-index: 60; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--muted); box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,.08)); cursor: pointer; }
.theme-toggle:hover { color: var(--primary); }

/* ---------- 落地页：单独的黑白配色，不用卡片边框 ---------- */
.landing { --bg: #fff; --surface: #f5f5f8; --surface-2: #e9e9f0; --border: rgba(20,20,40,.1); --text: #16161d; --muted: #66667a;
  --primary: #4f46e5; --primary-600: #4338ca; --primary-50: #eef0ff; --fill: #4f46e5; --fill-hover: #4338ca; --glow: rgba(79,70,229,.28);
  --lp-a: #4f46e5; --lp-b: #c026d3; --lp-aura: .55;
  min-height: 100vh; background: var(--bg); color: var(--text); position: relative; overflow: hidden; }
:root[data-theme="dark"] .landing { --bg: #111114; --surface: #1b1b20; --surface-2: #26262d; --border: rgba(255,255,255,.1); --text: #f2f2f5; --muted: #9c9cab;
    --primary: #a5a8ff; --primary-600: #c3c5ff; --primary-50: rgba(129,140,248,.14); --fill: #6366f1; --fill-hover: #7376f5; --glow: rgba(99,102,241,.4);
    --lp-a: #8b8ff9; --lp-b: #e879f9; --lp-aura: .4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .landing { --bg: #111114; --surface: #1b1b20; --surface-2: #26262d; --border: rgba(255,255,255,.1); --text: #f2f2f5; --muted: #9c9cab;
    --primary: #a5a8ff; --primary-600: #c3c5ff; --primary-50: rgba(129,140,248,.14); --fill: #6366f1; --fill-hover: #7376f5; --glow: rgba(99,102,241,.4);
    --lp-a: #8b8ff9; --lp-b: #e879f9; --lp-aura: .4; } }
.landing::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 820px; pointer-events: none; opacity: var(--lp-aura);
  background: radial-gradient(520px 340px at 12% 8%, rgba(99,102,241,.35), transparent 70%),
    radial-gradient(480px 320px at 88% 4%, rgba(236,72,153,.26), transparent 70%),
    radial-gradient(520px 300px at 62% 52%, rgba(251,146,60,.2), transparent 70%); filter: blur(10px); }
.landing > * { position: relative; }
.landing > * { max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.landing .btn-primary { color: #fff; box-shadow: 0 6px 18px -6px var(--glow); }
.landing .btn-primary:hover { transform: none; }

/* 排行榜快照页（打卡卡片二维码） */
.landing > .rs { max-width: 600px; padding-top: 48px; padding-bottom: 72px; }
.rs-hero { text-align: center; }
.rs-hero p { margin: 0; color: var(--muted); font-size: 16px; }
.rs-big { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.rs-big em { font-style: normal; font-size: 120px; line-height: 1; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(120deg, var(--lp-a), var(--lp-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rs-big span { font-size: 24px; font-weight: 700; }
.rs-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 15px; }
.rs-meta b { color: var(--text); font-weight: 700; }
.rs-board { margin-top: 56px; }
.rs-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.rs-head h2 { margin: 0; font-size: 20px; }
.rs-head span { color: var(--muted); font-size: 13px; }
.rs-list { list-style: none; margin: 0; padding: 0; }
.rs-list li { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 15px; }
.rs-list li.me { background: var(--primary-50); border-radius: 12px; border-bottom-color: transparent; }
.rs-list li.me .rs-name { color: var(--primary); font-weight: 700; }
.rs-n { width: 26px; text-align: center; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-list li:nth-child(-n+3) .rs-n { color: var(--lp-b); }
.rs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-xp { font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-list li.rs-gap { justify-content: center; color: var(--muted); padding: 4px; border-bottom: 0; letter-spacing: .2em; }
.rs-empty { color: var(--muted); text-align: center; padding: 32px 0; }
.rs-cta { margin-top: 56px; text-align: center; }
.rs-cta h2 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.02em; }
.rs-cta p { margin: 0 0 24px; color: var(--muted); }
.rs-btns { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.rs-login { margin-top: 16px; color: var(--muted); font-size: 14px; }
@media (max-width: 520px) { .rs-big em { font-size: 96px; } .landing > .rs { padding-top: 28px; } .rs-board { margin-top: 40px; } }

/* 听写页音量拉条 */
.vol-ctl { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.vol-ctl .vol-range { width: 90px; }
@media (max-width: 560px) { .vol-ctl .vol-range { width: 64px; } }

/* 最近听写列表：超出高度后在卡片内滚动，不再把页面撑长 */
.scroll-list { max-height: 360px; overflow-y: auto; padding-right: 4px; }
.grid-2.top-align { align-items: start; }

.grid-2 > * { min-width: 0; }
.heatmap { max-width: 100%; }
@media (max-width: 640px) {
  .heatmap { gap: 3px; }
  .hm-cell { width: 12px; height: 12px; border-radius: 3px; }
  .heatmap.wide .hm-cell { width: 12px; height: 12px; }
  .scroll-list { max-height: 280px; }
}

/* 单词附加信息：标签 / 词频星级 / 词形变化 */
.winfo { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.winfo:empty { display: none; }
.winfo-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.winfo.compact { align-items: flex-start; gap: 4px; } .winfo.compact .winfo-row { justify-content: flex-start; gap: 5px; }
.wtag { font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.wtag.t-a { background: #e4f7ee; color: #0b7a4f; }
.wtag.t-b { background: #e8f0ff; color: #2456c9; }
.wtag.t-c { background: #f1e9ff; color: #6d3fc4; }
.wtag.t-d { background: #fff4e0; color: #b45f06; }
.wtag.t-e { background: #fdecec; color: #c2343a; }
.wtag.t-f { background: var(--primary-50); color: var(--primary); }
:root[data-theme="dark"] .wtag.t-a { background: #12342a; color: #5fdcae; }
:root[data-theme="dark"] .wtag.t-b { background: #14294a; color: #8db4ff; }
:root[data-theme="dark"] .wtag.t-c { background: #0f3340; color: #6fd3e8; }
:root[data-theme="dark"] .wtag.t-d { background: #3a2d12; color: #fbbf24; }
:root[data-theme="dark"] .wtag.t-e { background: #3a1d27; color: #ff8a8f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wtag.t-a { background: #12342a; color: #5fdcae; }
  :root:not([data-theme="light"]) .wtag.t-b { background: #14294a; color: #8db4ff; }
  :root:not([data-theme="light"]) .wtag.t-c { background: #0f3340; color: #6fd3e8; }
  :root:not([data-theme="light"]) .wtag.t-d { background: #3a2d12; color: #fbbf24; }
  :root:not([data-theme="light"]) .wtag.t-e { background: #3a1d27; color: #ff8a8f; }
}
.freq { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.freq-s { color: #f5a623; letter-spacing: 1px; font-size: 13px; } .freq-s i { font-style: normal; color: var(--border); }
.wform { font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 3px 9px; color: var(--text); }
.wform em { font-style: normal; color: var(--muted); font-size: 12px; margin-right: 6px; }
.wform.lemma { background: var(--primary-50); }
.winfo.compact .freq { font-size: 11px; } .winfo.compact .freq-l { display: none; } .winfo.compact .wtag { font-size: 11px; padding: 3px 7px; }

.help-ai { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px; background: rgba(99,102,241,.1); }
.help-ai p { margin: 4px 0 0; }
.dest-row { align-items: center; } .dest-select { flex: 1; min-width: 200px; width: auto; }
.unit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .unit-row:empty { display: none; }
.unit-size { align-items: center; font-size: 14px; } .unit-size .input.num { width: 84px; }
.unit-select { width: auto; max-width: 240px; }
.unit-range { align-items: center; font-size: 14px; } .unit-range .select { width: auto; min-width: 110px; max-width: 46%; }
.unit-chips { max-height: 196px; overflow: auto; padding: 2px; } .unit-chips .chip-btn small { opacity: .65; }
.unit-empty { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); }

/* 禁止双指缩放（保留单指滚动） */
html, body { touch-action: pan-x pan-y; }

.res-note.good { color: var(--success, #16a34a); background: rgba(22,163,74,.12); }
.res-note.info { color: var(--muted, #667); background: rgba(100,110,130,.12); }
.res-note-btn { margin-left: 8px; padding: 3px 12px; border-radius: 99px; border: 1px solid var(--danger, #dc2626); background: var(--surface, #fff); color: var(--danger, #dc2626); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.res-note-btn:disabled { opacity: .5; }

.heatmap { display: block; overflow-x: auto; padding: 2px; }
.heatgrid { display: grid; grid-template-columns: auto; grid-auto-columns: max-content; grid-auto-rows: max-content; gap: 5px; width: max-content; }
.heatgrid .hg-day, .heatgrid .hg-month { font-size: 12px; color: var(--muted, #888); line-height: 1; white-space: nowrap; align-self: center; }
.heatgrid .hg-day { padding-right: 4px; }
.heatgrid .hg-month { margin-bottom: 2px; }
.hm-cell.today { outline: 2px solid var(--text, #111); outline-offset: 1px; }

/* 登录 / 注册：与首页同一套纸面墨蓝风格 */
.auth-wrap { --a-paper: #eaf0f8; --a-sheet: #fff; --a-rule: #b9c7e0; --a-ink: #16276b; --a-soft: #46537f; --a-red: #d4261c; --a-chalk: #ffd84d;
  background: var(--a-paper); color: var(--a-ink); position: relative; }
:root[data-scheme="dark"] .auth-wrap { --a-paper: #0b1230; --a-sheet: #141e45; --a-rule: #34457f; --a-ink: #dfe6ff; --a-soft: #a3afdb; --a-red: #ff6b5e; }
.auth-wrap::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 72px; transform: translateY(-50%); pointer-events: none; opacity: .22; background:
  linear-gradient(var(--a-rule), var(--a-rule)) 0 0 / 100% 1px no-repeat,
  linear-gradient(var(--a-rule), var(--a-rule)) 0 33.33% / 100% 1px no-repeat,
  linear-gradient(var(--a-red), var(--a-red)) 0 66.66% / 100% 1px no-repeat,
  linear-gradient(var(--a-rule), var(--a-rule)) 0 100% / 100% 1px no-repeat; }
.auth-card { position: relative; background: var(--a-sheet); border: 2px solid var(--a-ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--a-ink); padding: 36px 32px 28px; gap: 16px; color: var(--a-ink); }
.auth-card h1 { font-size: 28px; font-weight: 900; letter-spacing: -.01em; }
.auth-card .muted { color: var(--a-soft); font-size: 14px; }
.auth-card .input { height: 52px; border: 2px solid var(--a-ink); border-radius: 4px; background: var(--a-sheet); color: var(--a-ink); box-shadow: none; padding: 0 14px; font-size: 16px; }
.auth-card .input::placeholder { color: var(--a-soft); opacity: .7; }
.auth-card .input:focus { outline: none; box-shadow: 0 0 0 3px var(--a-chalk); }
.auth-card .btn-primary { min-height: 56px; border: 2px solid var(--a-ink); border-radius: 4px; background: var(--a-red); color: #fff; font-weight: 800; font-size: 18px; box-shadow: 2px 2px 0 var(--a-ink); transition: transform .12s, box-shadow .12s; }
.auth-card .btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--a-ink); }
.auth-card .btn-primary:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--a-ink); }
.auth-card .form-error { color: var(--a-red); font-weight: 700; }
.auth-switch { color: var(--a-soft); }
.auth-switch a { color: var(--a-ink); border-bottom: 2px solid var(--a-red); font-weight: 800; }
.auth-browse { color: var(--a-soft); font-weight: 700; }
.auth-browse:hover { color: var(--a-ink); }
@media (max-width: 480px) { .auth-card { padding: 28px 20px 22px; } }

.page-jump { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; }
.page-jump-input { width: 72px; height: 36px; padding: 0 8px; text-align: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; -moz-appearance: textfield; }
.page-jump-input::-webkit-outer-spin-button, .page-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.page-jump-input:focus { outline: none; border-color: var(--primary); }
.page-jump-go { width: auto; padding: 0 14px; font-size: 14px; }

/* 邮箱验证码 */
.ec-box { display: flex; flex-direction: column; gap: 12px; }
.ec-row { display: flex; gap: 10px; }
.ec-row .input { flex: 1; min-width: 0; }
.ec-row .ec-send { flex: none; white-space: nowrap; }
.ec-note { white-space: pre-line; line-height: 1.6; }
.auth-card .ec-send { height: 52px; border: 2px solid var(--a-ink); border-radius: 4px; background: var(--a-sheet); color: var(--a-ink); font-weight: 700; }
.auth-card .ec-note { color: var(--a-soft); }

/* 结果页：开启学习提醒的引导卡片 */
.remind-tip { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; margin: 4px auto 0; padding: 12px 12px 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; }
.remind-tip .rt-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.remind-tip .rt-ic.ok { background: var(--success-50); color: var(--success); }
.remind-tip .rt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.remind-tip .rt-x { flex: none; }
.rt-push { align-self: flex-start; }

/* 提示添加邮箱：小而居中的卡片 */
.modal.ea-modal { width: min(340px, 100%); align-items: center; text-align: center; padding: 28px 24px 18px; gap: 0; }
.ea-modal .ea-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 14px; }
.ea-modal h3 { margin: 0 0 8px; font-size: 18px; }
.ea-modal p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.ea-modal .btn-block { width: 100%; }
.ea-skip { margin-top: 8px; border: 0; background: none; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.ea-skip:hover { color: var(--text); }
.fb-bind { margin-left: 6px; vertical-align: middle; }
