/* ============================================================
 * 江苏初三记忆打卡系统 · 移动端样式
 * 设计基准：375px 宽（iPhone SE/13 mini），向上适配到 430px
 * 桌面打开时居中显示为 480px 手机形态
 * ============================================================ */

:root {
  --brand: #2D3D66;
  --brand-d: #1E2A4A;
  --brand-l: #DBE4F5;
  --grad: linear-gradient(150deg, #3D5285 0%, #2D3D66 55%, #1E2A4A 100%);

  --gold: #F59E0B;
  --gold-l: #FEF3C7;
  --gold-d: #B45309;

  --ok: #059669;
  --ok-l: #ECFDF5;
  --red: #DC2626;
  --red-l: #FEF2F2;
  --blue: #1D4ED8;
  --blue-l: #EFF6FF;

  --ink: #1A1F2E;
  --ink2: #4B5563;
  --ink3: #8A93A5;
  --ink4: #A3AAB8;

  --line: #E8EAEF;
  --bg: #F4F5F8;
  --card: #FFFFFF;

  --r: 16px;
  --r-lg: 20px;
  --r-sm: 10px;
  --sh: 0 1px 2px rgba(20, 28, 48, .04), 0 6px 18px rgba(20, 28, 48, .05);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabh: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  background: #E9EBF1;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* 桌面端：把页面收成手机形态 */
#app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

@media (min-width: 520px) {
  body { background: #DFE3EB; }
  #app {
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(20, 28, 48, .06), 0 24px 60px rgba(20, 28, 48, .12);
  }
}

/* ---------------- 页头 ---------------- */
.hd {
  background: var(--grad);
  color: #fff;
  padding: calc(16px + var(--safe-t)) 20px 24px;
  border-radius: 0 0 22px 22px;
  position: relative;
  overflow: hidden;
  flex: none;
}
.hd::after {
  content: "";
  position: absolute;
  right: -50px; top: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.hd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hd-back {
  position: absolute;
  left: 14px;
  top: calc(14px + var(--safe-t));
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.hd-back:active { background: rgba(255, 255, 255, .28); }
.hd-t { font-size: 13px; opacity: .72; letter-spacing: .3px; }
.hd-big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; }
.hd-big small { font-size: 14px; font-weight: 600; opacity: .8; margin-left: 4px; }
.hd-sub { font-size: 13px; opacity: .8; margin-top: 4px; }

/* ---------------- 容器 ---------------- */
.main {
  flex: 1 1 auto;
  padding: 14px 14px calc(var(--tabh) + var(--safe-b) + 18px);
  min-height: 0;
}
/* 页头贴着屏幕上沿 */
.main > .hd:first-child {
  margin: -14px -14px 14px;
  border-radius: 0 0 22px 22px;
}
.main.no-tab { padding-bottom: calc(18px + var(--safe-b)); }
.plain { flex: 1 1 auto; padding: 0; display: flex; flex-direction: column; min-height: 0; }

.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 16px;
  margin-bottom: 12px;
}
.card.tight { padding: 12px 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }

.sec-t {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 4px 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.sec-t .more { font-size: 12.5px; font-weight: 500; color: var(--ink3); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  background: #EEF1F6;
  color: var(--ink2);
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.btn:active { transform: scale(.975); }
.btn-block { display: flex; width: 100%; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(30, 42, 74, .22);
}
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(245, 158, 11, .28); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-lg { padding: 15px 20px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { background: #EEF1F6 !important; color: var(--ink4) !important; box-shadow: none !important; cursor: default; }
.btn[disabled]:active { transform: none; }

/* ---------------- 进度环 ---------------- */
.ring {
  --p: 0;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: conic-gradient(#F59E0B calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}
.ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.ring i {
  position: relative;
  font-style: normal;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.ring i small { font-size: 10px; font-weight: 600; opacity: .75; display: block; text-align: center; margin-top: 3px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.tag.S { background: var(--red-l); color: var(--red); }
.tag.A { background: var(--gold-l); color: var(--gold-d); }
.tag.B { background: #F1F3F8; color: var(--ink3); }
.tag.lock { background: var(--brand-l); color: var(--brand); }
.tag.ok { background: var(--ok-l); color: var(--ok); }
.tag.sub { font-weight: 600; }

/* ---------------- 任务行 ---------------- */
.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
.task:last-child { border-bottom: 0; }
.task:active { opacity: .6; }
.task .bar {
  width: 3px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--brand);
  flex: none;
  min-height: 34px;
}
.task.rev .bar { background: var(--gold); }
.task.done .bar { background: #D5DAE4; }
.task-body { flex: 1; min-width: 0; }
.task-t {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task.done .task-t { color: var(--ink4); text-decoration: line-through; }
.task-m { font-size: 12px; color: var(--ink3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.task .go {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-l);
  border-radius: 8px;
  padding: 6px 10px;
}
.task.done .go { background: #F1F3F8; color: var(--ink4); }

/* ---------------- 统计块 ---------------- */
.stats { display: flex; gap: 10px; }
.stat {
  flex: 1;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--sh);
}
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.stat span { font-size: 11.5px; color: var(--ink3); }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink3);
  font-size: 13.5px;
  line-height: 1.8;
}
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: var(--safe-b);
  transform: translateZ(0);
}
.tabbar a {
  flex: 1;
  text-align: center;
  padding: 8px 0 7px;
  font-size: 10.5px;
  color: var(--ink3);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.tabbar a i { font-style: normal; font-size: 19px; line-height: 1; filter: grayscale(1); opacity: .55; transition: transform .15s; }
.tabbar a.on { color: var(--brand); font-weight: 700; }
.tabbar a.on i { filter: none; opacity: 1; transform: translateY(-1px); }
.tabbar a:active i { transform: scale(.9); }

/* ---------------- 通用列表行 ---------------- */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
}
.row:last-child { border-bottom: 0; }
.row:active { opacity: .6; }
.row .r { font-size: 13px; color: var(--ink3); display: flex; align-items: center; gap: 4px; }
.row .ico { margin-right: 2px; }

/* ---------------- 弹层 ---------------- */
.zk-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 38, .5);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(18px + var(--safe-b));
  animation: up .24s cubic-bezier(.2, .9, .3, 1);
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet h3 { margin: 0 0 4px; font-size: 17px; }
.sheet .sub { font-size: 13px; color: var(--ink3); margin-bottom: 14px; }
.sheet-acts { display: flex; gap: 10px; margin-top: 16px; }
.sheet-acts .btn { flex: 1; }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabh) + var(--safe-b) + 26px);
  transform: translateX(-50%) translateY(8px);
  background: rgba(26, 31, 46, .94);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 20px;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: 82%;
  text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 登录页 ---------------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--grad);
  color: #fff;
  padding: calc(56px + var(--safe-t)) 24px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  right: -120px; top: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.login::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  left: -80px; bottom: 90px;
  border-radius: 50%;
  background: rgba(245, 158, 11, .1);
}
.login .brand { font-size: 12.5px; letter-spacing: 3px; opacity: .6; }
.login h1 { font-size: 27px; font-weight: 800; margin: 12px 0 8px; letter-spacing: -.6px; line-height: 1.3; position: relative; }
.login .lead { font-size: 13.5px; opacity: .72; line-height: 1.7; position: relative; }
.login .form { margin-top: auto; position: relative; }
.field {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  padding: 3px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 16px;
  padding: 12px 0;
  min-width: 0;
}
.field input::placeholder { color: rgba(255, 255, 255, .4); }
.field .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .18); }
.field .get {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0 8px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.field .get[disabled] { color: rgba(255, 255, 255, .35); }
.field select {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 16px;
  padding: 12px 0;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}
.field select option { color: var(--ink); background: #fff; }
.field .arrow { color: rgba(255, 255, 255, .45); font-size: 11px; }
.agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 14px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .62);
  line-height: 1.6;
}
.agree .box {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, .4);
  flex: none;
  margin-top: 1px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
}
.agree .box.on { background: var(--gold); border-color: var(--gold); }
.agree a { color: var(--gold); text-decoration: none; }
.login .alt {
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .55);
  margin-top: 14px;
}
.login .alt b { color: #fff; font-weight: 600; }

/* ---------------- 记忆卡（学习页） ---------------- */
/* 关键：.study 必须撑满且不能超出视口，否则内部的滚动区会失效、内容溢出到页面外 */
.study {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.study-hd {
  padding: calc(12px + var(--safe-t)) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  flex: none;
}
.study-hd .x {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #E7EAF1;
  border: 0;
  font-size: 17px;
  color: var(--ink2);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  line-height: 1;
}
.pbar { flex: 1; height: 6px; border-radius: 3px; background: #E2E6EE; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s ease; }
.study-hd .n { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; flex: none; }

.study-body { flex: 1; padding: 4px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.kp-card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 20px 18px;
  margin-bottom: 12px;
}
.kp-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.kp-title { font-size: 19px; font-weight: 800; line-height: 1.4; letter-spacing: -.3px; margin-bottom: 14px; }
.kp-content { font-size: 15.5px; line-height: 2; color: var(--ink); }
.kp-content b, .kp-content .hl { color: var(--red); font-weight: 700; }
.kp-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.7;
}
.kp-note .k { color: var(--ink2); font-weight: 600; }

.study-foot {
  flex: none;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--bg);
  display: flex;
  gap: 10px;
}
.study-foot .btn { flex: 1; }
.study-foot .col { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.study-foot .btn small { font-weight: 500; opacity: .8; font-size: 11px; margin-left: 4px; }

/* 自评三档 */
.grades { display: flex; gap: 8px; width: 100%; }
.grades .btn {
  flex: 1;
  flex-direction: column;
  gap: 1px;
  padding: 11px 4px;
  font-size: 14px;
  border-radius: 12px;
}
.grades .btn small { font-size: 10px; font-weight: 500; opacity: .65; margin: 0; }

/* 未展开时把红字遮住，逼学生先回想 */
.kp-content.redacted { -webkit-user-select: none; user-select: none; }
.kp-content.redacted b {
  color: transparent;
  background: #E4E8F0;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #E4E8F0;
}

/* ---------------- 题库 ---------------- */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink2);
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: .15s;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip:active { transform: scale(.96); }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  margin-bottom: 10px;
}
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px; /* iOS 小于 16px 会自动放大页面 */
  padding: 11px 0;
  min-width: 0;
}
.search .ico { color: var(--ink4); font-size: 15px; }

.kp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
.kp-item:last-child { border-bottom: 0; }
.kp-item:active { opacity: .6; }
.kp-item .b {
  width: 3px;
  border-radius: 3px;
  align-self: stretch;
  flex: none;
  min-height: 30px;
}
.kp-item .txt { flex: 1; min-width: 0; }
.kp-item .t { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.kp-item .m { font-size: 11.5px; color: var(--ink3); margin-top: 4px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.kp-item .st { flex: none; font-size: 11px; color: var(--ink4); text-align: right; padding-top: 2px; }
.kp-item.locked .t { color: var(--ink3); }

/* ---------------- 自测 ---------------- */
.q-card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 18px; margin-bottom: 12px; }
.q-stem { font-size: 16.5px; font-weight: 600; line-height: 1.65; margin: 10px 0 16px; }
.q-stem .blank { color: var(--brand); font-weight: 800; }

.opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  background: #fff;
  transition: .15s;
  touch-action: manipulation;
}
.opt:active { transform: scale(.99); }
.opt .k {
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1.5px solid #D6DBE5;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink3);
  margin-top: 1px;
}
.opt.on { border-color: var(--brand); background: #F7F9FD; }
.opt.on .k { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-l); }
.opt.right .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-l); }
.opt.wrong .k { background: var(--red); border-color: var(--red); color: #fff; }
.opt.dim { opacity: .5; }

.answer-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  outline: 0;
  background: #fff;
  transition: border-color .15s;
}
.answer-input:focus { border-color: var(--brand); }

.verdict {
  border-radius: 12px;
  padding: 13px 14px;
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  animation: fade .2s ease;
}
.verdict.ok { background: var(--ok-l); color: #065F46; border-left: 3px solid var(--ok); }
.verdict.bad { background: var(--red-l); color: #991B1B; border-left: 3px solid var(--red); }
.verdict.self { background: var(--blue-l); color: #1E40AF; border-left: 3px solid var(--blue); }
.verdict b { font-size: 14.5px; }
.verdict .ana { margin-top: 8px; color: var(--ink2); font-size: 13px; line-height: 1.75; }
.verdict .ana em { font-style: normal; font-weight: 700; color: var(--ink); }

.q-acts { margin-top: 14px; }
.q-acts .btn { width: 100%; }

/* 自测结果页 */
.score-big {
  text-align: center;
  padding: 26px 20px 20px;
  background: var(--grad);
  border-radius: var(--r-lg);
  color: #fff;
  margin-bottom: 12px;
}
.score-big b { font-size: 46px; font-weight: 800; letter-spacing: -2px; display: block; line-height: 1; }
.score-big b small { font-size: 16px; font-weight: 600; opacity: .7; }
.score-big span { font-size: 13px; opacity: .78; display: block; margin-top: 8px; }

/* ---------------- 打卡日历 ---------------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .wd { text-align: center; font-size: 11px; color: var(--ink4); padding-bottom: 4px; }
.cal .d {
  aspect-ratio: 1;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--ink2);
  background: #F6F7FA;
  position: relative;
}
.cal .d.out { background: transparent; color: transparent; }
.cal .d.done { background: var(--brand); color: #fff; font-weight: 700; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold-d); font-weight: 800; background: var(--gold-l); }
.cal .d.done.today {
  background: var(--brand);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.cal .d .dot { position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.cal .d.done .dot { background: #fff; }

.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge {
  text-align: center;
  padding: 10px 4px;
  border-radius: 12px;
  background: #F7F8FB;
}
.badge.got { background: var(--gold-l); }
.badge .i { font-size: 24px; line-height: 1.2; filter: grayscale(1); opacity: .45; }
.badge.got .i { filter: none; opacity: 1; }
.badge .n { font-size: 10.5px; color: var(--ink3); margin-top: 4px; line-height: 1.3; }
.badge.got .n { color: var(--gold-d); font-weight: 600; }

/* ---------------- 我的 ---------------- */
.me-hd { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  flex: none;
  border: 1.5px solid rgba(255, 255, 255, .28);
}
.me-name { font-size: 18px; font-weight: 700; }
.me-sub { font-size: 12.5px; opacity: .7; margin-top: 3px; }

.vip-card {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  border-radius: var(--r);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(245, 158, 11, .25);
}
.vip-card .t { font-size: 15px; font-weight: 700; }
.vip-card .s { font-size: 12px; opacity: .88; margin-top: 3px; }
.vip-card .go { background: rgba(255, 255, 255, .22); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; flex: none; }

/* ---------------- 会员页 ---------------- */
.plan {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 15px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: #fff;
  transition: .15s;
  touch-action: manipulation;
}
.plan.on { border-color: var(--brand); background: #F7F9FD; box-shadow: 0 0 0 3px rgba(45, 61, 102, .07); }
.plan .l { flex: 1; }
.plan .t { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.plan .d { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.plan .p { text-align: right; flex: none; }
.plan .p b { font-size: 21px; font-weight: 800; letter-spacing: -.5px; color: var(--brand); }
.plan .p b small { font-size: 12px; font-weight: 600; }
.plan .p span { display: block; font-size: 11px; color: var(--ink4); text-decoration: line-through; }
.plan .hot {
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
}
/* 内测期：套餐只作展示，不可点，整卡降饱和 */
.plan-off { cursor: default; opacity: .72; }
.plan-off .p b { color: var(--ink3); }
.plan .hot-grey { background: #E4E7EF; color: #6B7385; }

.compare { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare th, .compare td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th { font-size: 11.5px; color: var(--ink3); font-weight: 600; }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--ink2); }
.compare .y { color: var(--ok); font-weight: 700; }
.compare .n { color: var(--ink4); }

/* ---------------- 文档页 ---------------- */
.doc { padding: 18px 18px calc(24px + var(--safe-b)); background: #fff; }
.doc h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.4px; }
.doc .upd { font-size: 12px; color: var(--ink4); margin-bottom: 18px; }
.doc h2 { font-size: 15px; margin: 22px 0 8px; color: var(--brand-d); }
.doc p { font-size: 14px; line-height: 1.85; color: var(--ink2); margin: 0 0 10px; }
.doc .li { display: flex; gap: 8px; font-size: 14px; line-height: 1.8; color: var(--ink2); margin-bottom: 8px; }
.doc .li::before { content: "·"; color: var(--brand); font-weight: 800; flex: none; }
.doc strong { color: var(--ink); }

/* ---------------- 工具类 ---------------- */
.muted { color: var(--ink3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-c { align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.grow { flex: 1; }
.hidden { display: none !important; }
