:root {
  --bg: #f6f5f1; --card: #ffffff; --ink: #1f2a26; --muted: #66706b; --line: #e3e1da;
  --brand: #2f6f5e; --brand-ink: #ffffff; --brand-soft: #e5f0ec;
  --ok: #217a4b; --ok-soft: #e3f3e9; --bad: #b3372b; --bad-soft: #fbe7e4; --warn: #9a6400; --warn-soft: #fdf1d8;
  --radius: 12px;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
a { color: var(--brand); }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }
.top { position: sticky; top: 0; z-index: 10; background: var(--brand); color: var(--brand-ink);
  display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: 2px; }
.topnav a { color: #d8ebe4; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.topnav a.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.wrap { max-width: 860px; margin: 0 auto; padding: 14px 16px 80px; }
h1 { font-size: 22px; margin: 6px 0 12px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 12px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.card.soft { background: var(--brand-soft); border-color: #cfe3db; }
.card.warn { background: var(--warn-soft); border-color: #f0dcae; }
.card.bad { background: var(--bad-soft); border-color: #f2c7c0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.big-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
@media (min-width: 560px) { .big-actions { grid-template-columns: repeat(3, 1fr); } }
.big { display: block; text-decoration: none; background: var(--brand); color: #fff; border-radius: 14px; padding: 18px 16px; }
.big b { display: block; font-size: 20px; }
.big span { font-size: 13px; opacity: .85; }
.big.alt { background: #fff; color: var(--ink); border: 2px solid var(--brand); }
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .links { grid-template-columns: repeat(3, 1fr); } }
.links a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--ink); }
.links a small { display: block; color: var(--muted); font-size: 12px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px;
  padding: 8px 14px; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
button.primary, .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
button.danger { color: var(--bad); border-color: #e9b7b0; }
button:disabled { opacity: .5; cursor: default; }
button.sm, .btn.sm { min-height: 32px; padding: 4px 10px; font-size: 14px; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); max-width: 100%; }
textarea { width: 100%; min-height: 120px; }
input[type=checkbox] { width: 20px; height: 20px; vertical-align: middle; }
label.chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.field > span { font-size: 13px; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #eef0ee; color: var(--muted); white-space: nowrap; }
.tag.new { background: var(--brand-soft); color: var(--brand); }
.tag.retest { background: var(--bad-soft); color: var(--bad); }
.tag.cross { background: #e8ecfb; color: #3b4fa0; }
.tag.defer { background: var(--warn-soft); color: var(--warn); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.word { font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.word u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ck.c0 { color: #1c5fc4; } .ck.c1 { color: #1b8a4a; } .ck.c2 { color: #8a3fbf; }
u.tricky, .word u.tricky { color: #d62828; text-decoration-thickness: 2.5px; text-underline-offset: 3px; }
.word .sep { color: #aaa; font-weight: 400; margin: 0 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); padding: 10px 0; }
.list > li:first-child { border-top: 0; }
.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; -webkit-overflow-scrolling: touch; }
.daystrip a { flex: 0 0 auto; min-width: 58px; text-align: center; text-decoration: none; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; font-size: 13px; line-height: 1.3; }
.daystrip a.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.daystrip a.today b { color: var(--brand); }
.daystrip a .n { display: block; color: var(--muted); font-size: 11px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-height: 40px; padding: 6px 12px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on.ok { background: var(--ok); color: #fff; }
.seg button.on.bad { background: var(--bad); color: #fff; }
.seg button.on.na { background: #8a8f8c; color: #fff; }
.rec { border-top: 1px solid var(--line); padding: 12px 0; }
.rec .q { font-size: 15px; }
.rec.locked { opacity: .95; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; justify-content: center; font-size: 20px; }
.stepper b { min-width: 28px; text-align: center; font-size: 20px; }
.metric { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .metric { grid-template-columns: repeat(3, 1fr); } }
.metric .m { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.metric .m b { font-size: 22px; display: block; }
.metric .m .lab { font-size: 13px; color: var(--muted); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.scroll-x { overflow-x: auto; }
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: #22302b; color: #fff;
  padding: 10px 16px; border-radius: 10px; max-width: calc(100vw - 32px); z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); }
.issue { font-size: 13px; color: var(--warn); }
.issue.block { color: var(--bad); }
.crop { max-width: 100%; max-height: 70px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.item { border-top: 1px solid var(--line); padding: 10px 0; }
.item.done { opacity: .55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid2 input, .grid2 select { width: 100%; }
.login { max-width: 360px; margin: 12vh auto; padding: 16px; }
.login input { width: 100%; margin: 6px 0; min-height: 44px; }
.login button { width: 100%; margin-top: 8px; min-height: 46px; }
details summary { cursor: pointer; padding: 6px 0; }
.pill-ok { color: var(--ok); font-weight: 600; }
.pill-bad { color: var(--bad); font-weight: 600; }
.nowrap { white-space: nowrap; }

/* 周历：周一到周日做列标题 */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font-size: 15px; text-align: center; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); padding: 4px 0; background: var(--brand-soft); border-radius: 6px; }
.cal-dow.we { color: var(--bad); background: #fbeeec; }
.cal-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 76px; padding: 6px 2px 4px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.cal-cell.past { background: #fafaf8; }
.cal-cell.empty .cal-date { color: var(--muted); }
.cal-cell.rest { background: repeating-linear-gradient(135deg, #f6f3ee 0 6px, #fff 6px 12px); }
.cal-n.rest { color: var(--muted); }
.cal-cell.on { border: 2px solid var(--brand); padding: 5px 1px 3px; background: var(--brand-soft); }
.cal-date { font-size: 17px; font-weight: 700; line-height: 1.2; }
.cal-cell.today .cal-date { background: var(--brand); color: #fff; border-radius: 999px; min-width: 28px; text-align: center; padding: 0 4px; }
.cal-n { font-size: 11.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; }
.cal-mark { font-size: 11px; color: var(--ok); font-weight: 700; }
.cal-mark.warn { color: var(--warn); font-weight: 600; }
.cal-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.cal-dot.stale { background: var(--bad); }
.cal-dot.inline { position: static; display: inline-block; vertical-align: middle; }
.cal-legend { margin-top: 6px; }
@media (min-width: 560px) { .cal-cell { min-height: 88px; } .cal-n { font-size: 13px; } .cal-date { font-size: 19px; } }

/* 当天测试 */
.dz-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.dz-row:last-of-type { border-bottom: 0; }
.dz-row > b { min-width: 84px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 36px; padding: 4px 12px; }
.seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.dz-big { width: 100%; min-height: 54px; font-size: 18px; margin-top: 10px; justify-content: center; }
.dz-play { text-align: center; padding: 22px 14px; }
.dz-num { font-size: 20px; } .dz-num b { font-size: 54px; color: var(--brand); margin: 0 4px; }
.dz-phase { font-size: 18px; color: var(--muted); min-height: 30px; margin: 6px 0 10px; }
.dz-left { display: inline-block; min-width: 34px; margin-left: 8px; font-weight: 700; color: var(--brand); }
.dz-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.dz-bar i { display: block; height: 100%; background: var(--brand); }
.dz-ctl { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dz-ctl button { min-height: 46px; padding: 6px 14px; }
.dz-peek { margin-top: 6px; font-size: 18px; }
.dz-ans { margin: 8px 0 12px 22px; line-height: 1.9; }
.day-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.day-actions .btn { justify-content: center; text-align: center; min-height: 48px; font-size: 15px; padding: 6px 8px; }

/* 点读 + 单词真题 */
button.say { min-height: 30px; min-width: 34px; padding: 0 6px; font-size: 16px; line-height: 1; border-radius: 999px; vertical-align: middle; background: var(--brand-soft, #eef4ff); border-color: transparent; }
button.say:active { transform: scale(.92); }
.ztd { margin-top: 6px; }
.ztd summary { cursor: pointer; color: var(--brand); }
ol.zt { margin: 6px 0 0; padding-left: 22px; }
ol.zt li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
ol.zt li:last-child { border-bottom: 0; }
.zst { font-family: Georgia, "Times New Roman", serif; }
.zop { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 2px 0; }
.zop b { color: var(--muted); }
.zhi { color: #8a5a00; }
.zans { margin-left: 8px; }
.zt-opt { margin: 4px 0 6px 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.zt-opt .seg button { min-height: 28px; padding: 0 10px; margin: 0 1px; }
.zt-opt .seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 今天怎么背 小卡 */
.howto h3 { margin: 0 0 4px; }
.howto-steps { margin: 8px 0; padding-left: 22px; }
.howto-steps li { margin: 6px 0; }
.howto-rules { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.howto-rules ul { margin: 4px 0 0; padding-left: 18px; }
.howto-rules li { margin: 3px 0; }
