/* ==========================================================================
   考研学习生活工作台 — 全局样式
   宝可梦主题令牌 + 三端响应式（xs <640 / md 640-1023 / lg >=1024）
   ========================================================================== */

/* ── 令牌 ────────────────────────────────────────────────────────────── */
:root {
  /* 宝可梦主题色 */
  --pk-red: #EE1515;
  --pk-red-dark: #C81010;
  --pk-blue: #3B4CCA;
  --pk-yellow: #FFCB05;
  --pk-ink: #2A2A2A;
  --pk-grass: #78C850;
  --pk-water: #6890F0;
  --pk-psychic: #F85888;
  --pk-electric: #F8D030;
  --pk-fairy: #B26BC8;
  --pk-ground: #B8926A;
  --pk-steel: #8A93A5;

  /* 语义色 */
  --c-bg: #F4F6FA;
  --c-surface: #FFFFFF;
  --c-surface-2: #F7F8FA;
  --c-border: #E6E9F0;
  --c-border-strong: #D3D8E4;
  --c-text: #2A2A2A;
  --c-text-2: #5C6478;
  --c-muted: #98A0B3;
  --c-primary: var(--pk-red);
  --c-accent: var(--pk-blue);
  --c-ok: #38A169;
  --c-warn: #DD8A0B;
  --c-danger: #E03131;

  /* 任务分类色 */
  --c-work: #6890F0;
  --c-study: #F8D030;
  --c-life: #78C850;
  --c-sport: #F85888;

  /* 尺寸 */
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 72px;
  --rail-w: 300px;
  --topbar-h: 56px;
  --tabbar-h: 58px;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --sh-2: 0 4px 12px rgba(16, 24, 40, .07);
  --sh-3: 0 12px 32px rgba(16, 24, 40, .14);

  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ── 基础 ────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { overscroll-behavior-y: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 .6em; }
a { color: var(--c-accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #CBD2E0; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #AEB7C9; }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--c-muted); }
.text-2 { color: var(--c-text-2); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════
   应用外壳
   ══════════════════════════════════════════════════════════════════════ */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w);
  min-height: 100vh;
}

/* ── 侧边栏 ─────────────────────────────────────────────────────────── */
.sidebar {
  grid-column: 1;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}

.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.sidebar__ball {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><ellipse cx='50' cy='58' rx='34' ry='30' fill='%23FFD93B'/><path d='M30 36 L20 7 L43 28 Z' fill='%23FFD93B'/><path d='M70 36 L80 7 L57 28 Z' fill='%23FFD93B'/><path d='M27 25 L22 11 L37 28 Z' fill='%232A2A2A'/><path d='M73 25 L78 11 L63 28 Z' fill='%232A2A2A'/><circle cx='38' cy='52' r='5' fill='%232A2A2A'/><circle cx='62' cy='52' r='5' fill='%232A2A2A'/><circle cx='28' cy='63' r='6.5' fill='%23FF4D4D'/><circle cx='72' cy='63' r='6.5' fill='%23FF4D4D'/><circle cx='50' cy='58' r='1.8' fill='%232A2A2A'/><path d='M44 65 Q50 71 56 65' stroke='%232A2A2A' stroke-width='2.4' fill='none' stroke-linecap='round'/><path d='M82 64 L95 49 L87 60 L97 56 L84 74 Z' fill='%23FFD93B' stroke='%232A2A2A' stroke-width='1.5' stroke-linejoin='round'/></svg>");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  filter: drop-shadow(0 3px 8px rgba(255, 180, 30, .3));
}
.sidebar__title { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.sidebar__sub { font-size: 11px; color: var(--c-muted); }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav-group { margin-bottom: 4px; }
.nav-group__label {
  font-size: 11px; font-weight: 700; color: var(--c-muted);
  padding: 12px 10px 6px; letter-spacing: .5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--c-text-2); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .14s, color .14s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--c-surface-2); color: var(--c-text); }
.nav-item.is-active {
  background: rgba(238, 21, 21, .07);
  color: var(--pk-red); font-weight: 700;
  border-left-color: var(--pk-red);
}
.nav-item__icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.nav-item__badge {
  margin-left: auto; background: var(--pk-red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.nav-item__soon {
  margin-left: auto; font-size: 10px; color: var(--c-muted);
  background: var(--c-surface-2); padding: 1px 6px; border-radius: 6px;
}

.sidebar__foot {
  padding: 10px 12px; border-top: 1px solid var(--c-border);
  font-size: 11px; color: var(--c-muted);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* ── 主区 ───────────────────────────────────────────────────────────── */
.main { grid-column: 2; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
}
.topbar__menu {
  display: none; width: 36px; height: 36px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; font-size: 18px;
}
.topbar__menu:hover { background: var(--c-surface-2); }
.topbar__title { font-size: 16px; font-weight: 700; }
.topbar__date { font-size: 12px; color: var(--c-muted); }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px; border: none; background: transparent;
  border-radius: 9px; cursor: pointer; font-size: 16px;
  display: grid; place-items: center; position: relative;
  transition: background .14s;
}
.icon-btn:hover { background: var(--c-surface-2); }
.icon-btn__dot {
  position: absolute; top: 5px; right: 5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--pk-red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  border-radius: 8px; border: 2px solid var(--c-surface);
}

.outlet { flex: 1; padding: 20px 22px 40px; min-width: 0; }

/* ── 右侧信息栏 ─────────────────────────────────────────────────────── */
.rail {
  grid-column: 3;
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  padding: 18px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rail__section { margin-bottom: 22px; }
.rail__title {
  font-size: 12px; font-weight: 700; color: var(--c-muted);
  margin-bottom: 10px; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ══════════════════════════════════════════════════════════════════════
   通用组件
   ══════════════════════════════════════════════════════════════════════ */

/* 页头 */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head__title { font-size: 21px; font-weight: 800; }
.page-head__desc { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 卡片 */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
}
.card__head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; border-bottom: 1px solid var(--c-border);
}
.card__title { font-size: 14px; font-weight: 700; }
.card__extra { margin-left: auto; font-size: 12px; color: var(--c-muted); }
.card__body { padding: 15px 16px; }
.card--pad { padding: 15px 16px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .14s, border-color .14s, transform .08s;
  white-space: nowrap;
}
.btn:hover { background: var(--c-surface-2); border-color: var(--c-muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary {
  background: var(--pk-red); color: #fff; border-color: var(--pk-red);
  box-shadow: 0 1px 3px rgba(238, 21, 21, .3);
}
.btn--primary:hover { background: var(--pk-red-dark); border-color: var(--pk-red-dark); }
.btn--accent { background: var(--pk-blue); color: #fff; border-color: var(--pk-blue); }
.btn--accent:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--c-text-2); }
.btn--ghost:hover { background: var(--c-surface-2); }
.btn--danger { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn--sm { height: 29px; padding: 0 10px; font-size: 12px; }
.btn--block { width: 100%; }

/* 表单 */
.field { margin-bottom: 13px; }
.field__label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--c-text-2); margin-bottom: 5px;
}
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--pk-blue);
  box-shadow: 0 0 0 3px rgba(59, 76, 202, .12);
}
.input::placeholder, .textarea::placeholder { color: var(--c-muted); }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; min-width: 0; }

/* 分段控件 */
.segmented {
  display: inline-flex; background: var(--c-surface-2);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
}
.segmented__item {
  padding: 5px 13px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: var(--c-text-2); cursor: pointer; border: none; background: transparent;
  transition: background .14s, color .14s; white-space: nowrap;
}
.segmented__item.is-active { background: var(--c-surface); color: var(--c-text); box-shadow: var(--sh-1); }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.tag--work { background: rgba(104, 144, 240, .14); color: #3B62C4; }
.tag--study { background: rgba(248, 208, 48, .2); color: #8A6A00; }
.tag--life { background: rgba(120, 200, 80, .16); color: #3E7A28; }
.tag--sport { background: rgba(248, 88, 136, .14); color: #C43466; }
.tag--high { background: rgba(224, 49, 49, .12); color: var(--c-danger); }
.tag--mid { background: rgba(221, 138, 11, .13); color: var(--c-warn); }
.tag--low { background: var(--c-surface-2); color: var(--c-muted); }
.tag--ok { background: rgba(56, 161, 105, .13); color: var(--c-ok); }
.tag--outline { background: transparent; border: 1px solid var(--c-border-strong); color: var(--c-text-2); }

/* 进度条 */
.progress { height: 7px; background: var(--c-surface-2); border-radius: 4px; overflow: hidden; }
.progress__bar {
  height: 100%; border-radius: 4px; background: var(--pk-blue);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* 空状态 */
.empty { text-align: center; padding: 44px 20px; color: var(--c-muted); }
.empty__icon { font-size: 40px; margin-bottom: 10px; opacity: .55; }
.empty__title { font-size: 14px; font-weight: 600; color: var(--c-text-2); margin-bottom: 4px; }
.empty__desc { font-size: 12.5px; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #EEF0F5 25%, #F6F7FA 50%, #EEF0F5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Toast */
.toast-box {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 9999;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: rgba(42, 42, 42, .94); color: #fff;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13.5px; box-shadow: var(--sh-3);
  opacity: 0; transform: translateY(12px);
  transition: opacity .26s, transform .26s;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast--ok { background: rgba(41, 121, 79, .95); }
.toast--warn { background: rgba(180, 111, 8, .95); }
.toast--err { background: rgba(190, 40, 40, .95); }

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 34, .45);
  display: grid; place-items: center; z-index: 900;
  opacity: 0; transition: opacity .2s; padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-mask.is-in { opacity: 1; }
.modal {
  background: var(--c-surface); border-radius: var(--radius-lg);
  width: min(640px, 100%); max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-3);
  transform: scale(.97); transition: transform .2s;
}
.modal-mask.is-in .modal { transform: scale(1); }
.modal--sm { width: min(480px, 100%); }
.modal__head {
  padding: 18px 24px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal__head h3 { font-size: 16px; }
.modal__body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal__foot {
  padding: 15px 24px; border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--c-surface-2);
}

/* 抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 34, .38);
  z-index: 800; opacity: 0; transition: opacity .24s;
}
.drawer-mask.is-in { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 88vw); background: var(--c-surface);
  box-shadow: var(--sh-3); z-index: 810;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.is-in { transform: translateX(0); }
.drawer--left { right: auto; left: 0; transform: translateX(-100%); width: min(272px, 82vw); }
.drawer--left.is-in { transform: translateX(0); }
.drawer__head {
  padding: 15px 18px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 16px; }

/* 网格 */
.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ══════════════════════════════════════════════════════════════════════
   开屏页
   ══════════════════════════════════════════════════════════════════════ */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 203, 5, .5), transparent 46%),
    radial-gradient(circle at 82% 18%, rgba(59, 76, 202, .42), transparent 44%),
    radial-gradient(circle at 50% 92%, rgba(120, 200, 80, .42), transparent 52%),
    linear-gradient(160deg, #FFF4D6 0%, #FFE9E9 44%, #E3ECFF 100%);
  padding: 24px; text-align: center;
  transition: opacity .5s, visibility .5s;
}
.splash.is-out { opacity: 0; visibility: hidden; }

.splash__ball {
  width: 88px; height: 88px; border-radius: 18px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><ellipse cx='50' cy='58' rx='34' ry='30' fill='%23FFD93B'/><path d='M30 36 L20 7 L43 28 Z' fill='%23FFD93B'/><path d='M70 36 L80 7 L57 28 Z' fill='%23FFD93B'/><path d='M27 25 L22 11 L37 28 Z' fill='%232A2A2A'/><path d='M73 25 L78 11 L63 28 Z' fill='%232A2A2A'/><circle cx='38' cy='52' r='5' fill='%232A2A2A'/><circle cx='62' cy='52' r='5' fill='%232A2A2A'/><circle cx='28' cy='63' r='6.5' fill='%23FF4D4D'/><circle cx='72' cy='63' r='6.5' fill='%23FF4D4D'/><circle cx='50' cy='58' r='1.8' fill='%232A2A2A'/><path d='M44 65 Q50 71 56 65' stroke='%232A2A2A' stroke-width='2.4' fill='none' stroke-linecap='round'/><path d='M82 64 L95 49 L87 60 L97 56 L84 74 Z' fill='%23FFD93B' stroke='%232A2A2A' stroke-width='1.5' stroke-linejoin='round'/></svg>");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  filter: drop-shadow(0 14px 30px rgba(255, 180, 30, .35));
  animation: ballIn .8s cubic-bezier(.34, 1.56, .64, 1), ballFloat 3.4s ease-in-out .8s infinite;
  margin-bottom: 22px;
}
@keyframes ballIn { from { transform: scale(.3) rotate(-140deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes ballFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* 页面切换动态过渡 */
@keyframes pageIn { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.outlet.is-page-in > :first-child { animation: pageIn .34s cubic-bezier(.22, .61, .36, 1); }

.splash__date { font-size: 15px; color: #5C6478; font-weight: 600; }
.splash__lunar { font-size: 12.5px; color: #8A92A6; margin-top: 2px; }

.splash__countdown {
  margin: 26px 0 20px;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px; padding: 22px 40px;
  box-shadow: 0 10px 34px rgba(42, 42, 42, .1);
  cursor: pointer; transition: transform .18s;
}
.splash__countdown:hover { transform: translateY(-2px); }
.splash__cd-label { font-size: 12.5px; color: #6B7488; font-weight: 600; letter-spacing: .5px; }
.splash__cd-num {
  font-size: 66px; font-weight: 900; line-height: 1.05;
  color: var(--pk-red); font-family: var(--mono);
  letter-spacing: -2px; margin: 2px 0;
}
.splash__cd-unit { font-size: 13px; color: #6B7488; }

.splash__quote {
  max-width: 520px; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 15.5px; color: #3E465C; line-height: 1.75;
  animation: quoteIn .7s ease .35s both;
}
.splash__quote-author { font-size: 12.5px; color: #8A92A6; margin-top: 6px; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.splash__enter {
  margin-top: 30px; height: 44px; padding: 0 34px;
  background: var(--pk-red); color: #fff; border: none;
  border-radius: 24px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 22px rgba(238, 21, 21, .34);
  transition: transform .16s, box-shadow .16s;
}
.splash__enter:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(238, 21, 21, .4); }
.splash__hint { margin-top: 12px; font-size: 11.5px; color: #98A0B3; }

/* ══════════════════════════════════════════════════════════════════════
   首页
   ══════════════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(120deg, #FFF7E0 0%, #FFECEC 50%, #E9F0FF 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero__main { flex: 1; min-width: 200px; }
.hero__greet { font-size: 19px; font-weight: 800; }
.hero__sub { font-size: 13px; color: var(--c-text-2); margin-top: 3px; }
.hero__cd { text-align: center; padding: 0 18px; }
.hero__cd-num { font-size: 40px; font-weight: 900; color: var(--pk-red); font-family: var(--mono); line-height: 1; }
.hero__cd-label { font-size: 11.5px; color: var(--c-text-2); margin-top: 4px; }
.hero__streak {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .74); border-radius: 14px;
  padding: 10px 16px; border: 1px solid rgba(255, 255, 255, .95);
}
.hero__flame { font-size: 26px; }
.hero__streak-num { font-size: 24px; font-weight: 900; color: var(--pk-red); line-height: 1; }
.hero__streak-label { font-size: 11px; color: var(--c-text-2); }

/* 统计卡 */
.stat-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 15px 16px;
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s; cursor: pointer;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent, var(--pk-blue));
}
.stat-card__head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.stat-card__icon { font-size: 15px; }
.stat-card__title { font-size: 12.5px; font-weight: 700; color: var(--c-text-2); }
.stat-card__check {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px;
  background: var(--c-surface-2); color: var(--c-muted);
}
.stat-card__check.is-done { background: rgba(56, 161, 105, .13); color: var(--c-ok); }
.stat-card__value {
  font-size: 26px; font-weight: 900; line-height: 1.15;
  font-family: var(--mono); letter-spacing: -.6px;
}
.stat-card__unit { font-size: 12px; font-weight: 600; color: var(--c-muted); margin-left: 3px; }
.stat-card__sub { font-size: 11.5px; color: var(--c-muted); margin-top: 3px; }
.stat-card__foot { margin-top: 10px; }

/* 热力图 */
.heatmap { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 3px; }
.heatmap__col { display: flex; flex-direction: column; gap: 3px; }
.heatmap__cell {
  width: 12px; height: 12px; border-radius: 3px;
  background: #EDF0F5; cursor: pointer; transition: transform .1s;
}
.heatmap__cell:hover { transform: scale(1.32); }
.heatmap__cell[data-level="1"] { background: #D6EFC4; }
.heatmap__cell[data-level="2"] { background: #A8DC88; }
.heatmap__cell[data-level="3"] { background: #78C850; }
.heatmap__cell[data-level="4"] { background: #4E9E2E; }
.heatmap__legend {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--c-muted); margin-top: 9px;
}

/* 今日课程卡 */
.course-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--c-border);
}
.course-item:last-child { border-bottom: none; }
.course-item__time {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--c-text-2); text-align: center; flex-shrink: 0; min-width: 46px;
}
.course-item__bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--pk-water); flex-shrink: 0; }
.course-item__name { font-size: 14px; font-weight: 600; }
.course-item__meta { font-size: 11.5px; color: var(--c-muted); }
.course-item.is-now { background: rgba(255, 203, 5, .1); border-radius: 8px; padding-left: 8px; padding-right: 8px; }

/* ══════════════════════════════════════════════════════════════════════
   每日计划页
   ══════════════════════════════════════════════════════════════════════ */
.quick-add {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 13px 15px; margin-bottom: 16px;
  box-shadow: var(--sh-1);
}
.quick-add__row { display: flex; gap: 9px; align-items: center; }
.quick-add__input {
  flex: 1; height: 40px; border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm); padding: 0 13px; font-size: 14.5px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.quick-add__input:focus { border-color: var(--pk-red); box-shadow: 0 0 0 3px rgba(238, 21, 21, .1); }
.quick-add__preview {
  margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--c-muted); min-height: 22px;
}
.quick-add__hint { font-size: 11.5px; color: var(--c-muted); margin-top: 7px; }
.quick-add__hint code {
  background: var(--c-surface-2); padding: 1px 5px; border-radius: 4px;
  font-family: var(--mono); font-size: 11px; color: var(--c-text-2);
}

.task-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }

.task-col__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 11px;
}
.task-col__title { font-size: 14.5px; font-weight: 700; }
.task-col__count {
  font-size: 11.5px; font-weight: 700; color: var(--c-muted);
  background: var(--c-surface-2); padding: 1px 8px; border-radius: 8px;
}

.task-item {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 12px 13px; margin-bottom: 9px;
  box-shadow: var(--sh-1); transition: box-shadow .14s, opacity .2s, transform .14s;
  position: relative; overflow: hidden;
}
.task-item:hover { box-shadow: var(--sh-2); }
.task-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cat-color, var(--c-border));
}
.task-item.is-done { opacity: .58; }
.task-item.is-done .task-item__title { text-decoration: line-through; color: var(--c-muted); }
.task-item.is-overdue { border-color: rgba(224, 49, 49, .4); background: rgba(224, 49, 49, .025); }

.task-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--c-border-strong); background: var(--c-surface);
  cursor: pointer; display: grid; place-items: center; margin-top: 1px;
  transition: background .14s, border-color .14s; padding: 0;
  font-size: 11px; color: transparent; line-height: 1;
}
.task-check:hover { border-color: var(--pk-grass); }
.task-check.is-done { background: var(--pk-grass); border-color: var(--pk-grass); color: #fff; }

.task-item__main { flex: 1; min-width: 0; }
.task-item__title { font-size: 14px; font-weight: 600; word-break: break-word; }
.task-item__note { font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.task-item__meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.task-item__time { font-size: 11.5px; color: var(--c-text-2); font-family: var(--mono); }
.task-item__ops { display: flex; gap: 2px; opacity: 0; transition: opacity .14s; }
.task-item:hover .task-item__ops { opacity: 1; }
.task-item__op {
  width: 26px; height: 26px; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--c-muted);
}
.task-item__op:hover { background: var(--c-surface-2); color: var(--c-text); }

/* 提醒中心 */
.reminder-item {
  display: flex; gap: 10px; padding: 11px 12px;
  border-radius: var(--radius-sm); margin-bottom: 7px;
  background: var(--c-surface-2); border: 1px solid transparent;
  cursor: pointer; transition: background .14s;
}
.reminder-item:hover { background: #EFF2F7; }
.reminder-item.is-unread { background: rgba(255, 203, 5, .11); border-color: rgba(255, 203, 5, .38); }
.reminder-item__icon { font-size: 15px; flex-shrink: 0; }
.reminder-item__title { font-size: 13px; font-weight: 600; }
.reminder-item__body { font-size: 12px; color: var(--c-text-2); margin-top: 1px; }
.reminder-item__time { font-size: 11px; color: var(--c-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════════════════
   运动健身页
   ══════════════════════════════════════════════════════════════════════ */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--c-border);
  margin-bottom: 16px; overflow-x: auto;
}
.tabs__item {
  padding: 9px 15px; font-size: 14px; font-weight: 600; color: var(--c-text-2);
  border: none; background: transparent; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.tabs__item:hover { color: var(--c-text); }
.tabs__item.is-active { color: var(--pk-red); border-bottom-color: var(--pk-red); }

.wk-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 9px;
  box-shadow: var(--sh-1);
}
.wk-item.is-done { background: rgba(120, 200, 80, .055); border-color: rgba(120, 200, 80, .35); }
.wk-item__icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 18px;
  background: var(--c-surface-2);
}
.wk-item__main { flex: 1; min-width: 0; }
.wk-item__name { font-size: 14px; font-weight: 600; }
.wk-item__meta { font-size: 11.5px; color: var(--c-muted); margin-top: 2px; }
.wk-item__ops { display: flex; gap: 6px; align-items: center; }

.wk-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.wk-cat {
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 13px 8px; text-align: center; cursor: pointer;
  background: var(--c-surface); transition: border-color .14s, transform .12s, background .14s;
}
.wk-cat:hover { border-color: var(--pk-grass); transform: translateY(-2px); background: rgba(120, 200, 80, .05); }
.wk-cat__icon { font-size: 23px; }
.wk-cat__name { font-size: 12.5px; font-weight: 600; margin-top: 5px; }
.wk-cat__hint { font-size: 10.5px; color: var(--c-muted); margin-top: 1px; }

.progress-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0; border-bottom: 1px dashed var(--c-border);
}
.progress-row:last-child { border-bottom: none; }
.progress-row__name { font-size: 13px; font-weight: 600; min-width: 76px; }
.progress-row__bar { flex: 1; }
.progress-row__num { font-size: 12px; font-family: var(--mono); color: var(--c-text-2); min-width: 48px; text-align: right; }

/* ══════════════════════════════════════════════════════════════════════
   复盘页
   ══════════════════════════════════════════════════════════════════════ */
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 11px; }
.snapshot-cell {
  background: var(--c-surface-2); border-radius: var(--radius-sm);
  padding: 11px 12px; border: 1px solid var(--c-border);
}
.snapshot-cell__label { font-size: 11px; color: var(--c-muted); }
.snapshot-cell__value {
  font-size: 19px; font-weight: 800; font-family: var(--mono);
  margin-top: 2px; letter-spacing: -.5px;
}
.snapshot-cell__unit { font-size: 11px; font-weight: 600; color: var(--c-muted); margin-left: 2px; }

.review-section { margin-bottom: 15px; }
.review-section__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.review-section__label { font-size: 13.5px; font-weight: 700; }
.review-section__auto {
  font-size: 10.5px; color: var(--pk-blue); background: rgba(59, 76, 202, .09);
  padding: 1px 7px; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.review-section__auto:hover { background: rgba(59, 76, 202, .17); }

.archive-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
  background: var(--c-surface); cursor: pointer; transition: box-shadow .14s;
}
.archive-item:hover { box-shadow: var(--sh-2); }
.archive-item__key { font-family: var(--mono); font-weight: 800; font-size: 14px; }
.archive-item__range { font-size: 11.5px; color: var(--c-muted); }

/* ══════════════════════════════════════════════════════════════════════
   底部 Tab（移动端）
   ══════════════════════════════════════════════════════════════════════ */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--c-border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__inner { display: flex; height: var(--tabbar-h); }
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: transparent; cursor: pointer;
  color: var(--c-muted); font-size: 10.5px; font-weight: 600; position: relative;
}
.tabbar__item.is-active { color: var(--pk-red); }
.tabbar__icon { font-size: 19px; line-height: 1; }
.tabbar__badge {
  position: absolute; top: 5px; right: 50%; margin-right: -20px;
  min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--pk-red); color: #fff; font-size: 9px; line-height: 15px;
  border-radius: 8px; font-weight: 700;
}

/* FAB */
.fab {
  display: none;
  position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + 18px);
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--pk-red); color: #fff; border: none;
  font-size: 25px; cursor: pointer; z-index: 60;
  box-shadow: 0 6px 20px rgba(238, 21, 21, .42);
}

/* ══════════════════════════════════════════════════════════════════════
   学习页组件（英语 / 高数 / 专业课 / 阅读 / 新闻）
   ══════════════════════════════════════════════════════════════════════ */

/* 页头简写（与 .page-head__title/__desc 视觉一致） */
.page-title { font-size: 21px; font-weight: 800; line-height: 1.3; }
.page-sub { font-size: 13px; color: var(--c-muted); margin-top: 2px; }

/* 分段标签（与 .tabs 视觉一致） */
.seg { display: flex; gap: 2px; border-bottom: 1px solid var(--c-border); margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seg__btn {
  padding: 9px 15px; font-size: 14px; font-weight: 600; color: var(--c-text-2);
  border: none; background: transparent; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.seg__btn:hover { color: var(--c-text); }
.seg__btn.is-active { color: var(--pk-red); border-bottom-color: var(--pk-red); }
.tab-body { padding-top: 4px; }

/* KPI 指标条 */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--sh-1); }
.kpi__value { font-size: 22px; font-weight: 800; line-height: 1.1; font-family: var(--mono); }
.kpi__label { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.kpi__sub { font-size: 11px; color: var(--c-text-2); margin-top: 2px; }

/* 危险幽灵按钮 */
.btn--danger-soft { background: rgba(224, 49, 49, .1); color: var(--c-danger); border-color: rgba(224, 49, 49, .28); }
.btn--danger-soft:hover { background: rgba(224, 49, 49, .16); border-color: rgba(224, 49, 49, .4); }

/* 宽弹窗 */
.modal--wide { width: min(880px, 100%); }

/* 表单行（同 .field-row） */
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; min-width: 0; }

/* 胶囊筛选 */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px;
  border-radius: 999px; background: var(--c-surface-2); border: 1px solid var(--c-border);
  font-size: 12.5px; font-weight: 600; color: var(--c-text-2); cursor: pointer;
  transition: background .14s, border-color .14s, color .14s; white-space: nowrap;
}
.chip:hover { border-color: var(--c-border-strong); }
.chip.is-active { background: rgba(59, 76, 202, .1); border-color: rgba(59, 76, 202, .4); color: var(--c-accent); }
.chip .x { margin-left: 2px; color: var(--c-muted); font-weight: 700; }

/* 横向排布 */
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 勾选行 */
.check-line {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface); cursor: pointer; font-size: 13.5px;
  transition: border-color .14s, background .14s;
}
.check-line:hover { border-color: var(--c-border-strong); }
.check-line.is-on { border-color: rgba(120, 200, 80, .5); background: rgba(120, 200, 80, .06); }
.check-line__box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--c-border-strong);
  display: grid; place-items: center; flex-shrink: 0; font-size: 12px; color: #fff;
}
.check-line.is-on .check-line__box { background: var(--c-ok); border-color: var(--c-ok); }

/* 单词本 */
.word-list { display: flex; flex-direction: column; gap: 8px; }
.word-row {
  display: flex; align-items: center; gap: 12px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 11px 13px; box-shadow: var(--sh-1);
}
.word-row__main { flex: 1; min-width: 0; }
.word-row__word { font-size: 15px; font-weight: 700; }
.word-row__mean { font-size: 12.5px; color: var(--c-text-2); margin-top: 1px; }
.word-row__meta { font-size: 11px; color: var(--c-muted); margin-top: 2px; }
.word-row__ph { font-size: 11px; color: var(--c-muted); font-family: var(--mono); }
.word-row__act { display: flex; gap: 6px; align-items: center; }

/* 闪卡复习 */
.flashcard {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--sh-2); text-align: center;
}
.flashcard__word { font-size: 28px; font-weight: 800; }
.flashcard__ph { font-size: 13px; color: var(--c-muted); font-family: var(--mono); margin-top: 4px; }
.flashcard__mean { font-size: 18px; font-weight: 600; margin-top: 14px; }
.flashcard__eg { font-size: 13px; color: var(--c-text-2); margin-top: 10px; line-height: 1.7; }
.flashcard__hint { font-size: 12px; color: var(--c-muted); margin-top: 12px; }
.flashcard__back { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--c-border); text-align: left; }
.review-done { text-align: center; padding: 36px 20px; color: var(--c-muted); }
.review-done__icon { font-size: 46px; margin-bottom: 10px; }
.review-done__title { font-size: 16px; font-weight: 700; color: var(--c-ok); }

/* 阅读练习记录 */
.rd-list { display: flex; flex-direction: column; gap: 8px; }
.rd-row {
  display: flex; align-items: center; gap: 12px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 11px 13px; box-shadow: var(--sh-1);
}
.rd-row__date { font-size: 12px; font-family: var(--mono); color: var(--c-muted); min-width: 84px; }
.rd-row__main { flex: 1; min-width: 0; }
.rd-row__rate { font-size: 12px; color: var(--c-text-2); font-family: var(--mono); }

/* 长难句卡片 */
.sent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sent-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 13px 14px; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 6px;
}
.sent-card__en { font-size: 14px; font-weight: 600; line-height: 1.6; }
.sent-card__cn { font-size: 12.5px; color: var(--c-text-2); }
.sent-card__st { font-size: 11.5px; color: var(--c-muted); font-style: italic; }
.sent-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }

/* 刷题入口 */
.quiz-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quiz-entry__box {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); background: var(--c-surface); cursor: pointer;
  box-shadow: var(--sh-1); transition: border-color .14s, transform .12s; text-align: left;
}
.quiz-entry__box:hover { border-color: var(--pk-blue); transform: translateY(-2px); }
.quiz-entry__t { font-size: 14px; font-weight: 700; }
.quiz-entry__d { font-size: 11.5px; color: var(--c-muted); }

/* 模式行 / 题目题干选项 */
.mode-list { display: flex; flex-direction: column; gap: 8px; }
.mode-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); }
.quiz-stem { font-size: 15px; font-weight: 600; line-height: 1.7; margin-bottom: 14px; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface); cursor: pointer; font-size: 13.5px;
  transition: border-color .14s, background .14s; text-align: left; width: 100%;
}
.quiz-opt:hover { border-color: var(--c-border-strong); }
.quiz-opt.is-picked { border-color: var(--pk-blue); background: rgba(59, 76, 202, .06); }
.quiz-answer {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--c-surface-2); border: 1px solid var(--c-border); font-size: 13px; line-height: 1.7;
}

/* 题库列表 */
.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-row {
  display: flex; align-items: flex-start; gap: 12px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--sh-1);
}
.q-row__main { flex: 1; min-width: 0; }
.q-row__stem { font-size: 14px; font-weight: 600; line-height: 1.6; }
.q-row__meta { font-size: 11.5px; color: var(--c-muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.q-row__act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* 书架 */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.bk-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 8px;
}
.bk-card__title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.bk-card__author { font-size: 12px; color: var(--c-muted); }
.bk-card__bar { height: 6px; background: var(--c-surface-2); border-radius: 4px; overflow: hidden; }
.bk-card__bar > i { display: block; height: 100%; background: var(--pk-grass); border-radius: 4px; }
.bk-card__body { font-size: 12.5px; color: var(--c-text-2); }
.bk-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; font-size: 11.5px; color: var(--c-muted); }
.bk-card__cover { width: 100%; height: 96px; object-fit: cover; background: var(--c-surface-2); border-radius: 8px; display: block; }

/* 加书窗口增强 */
.cover-row { display: flex; gap: 8px; align-items: center; }
.cover-row .input { flex: 1; min-width: 0; }
.cover-prev { width: 48px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--c-surface-2); border: 1px solid var(--c-border); flex: none; }
.progress-preview { margin: -4px 0 6px; }
.progress-preview .progress { height: 6px; margin-bottom: 3px; }
.form-warn { color: var(--pk-red); font-size: 11.5px; line-height: 1.4; margin: -2px 0 6px; }

/* 阅读计时 */
.timer-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: 14px;
}
.timer-row__time { font-size: 30px; font-weight: 800; font-family: var(--mono); color: var(--pk-red); letter-spacing: .5px; }
.timer-row__label { font-size: 12px; color: var(--c-muted); }
.timer-row__ops { margin-left: auto; display: flex; gap: 8px; }

/* 新闻列表 */
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news-row {
  display: flex; align-items: flex-start; gap: 12px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--sh-1);
}
.news-row__rank {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; background: var(--c-surface-2);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--c-text-2); font-family: var(--mono);
}
.news-row.is-read { opacity: .6; }
.news-row__main { flex: 1; min-width: 0; }
.news-row__title { font-size: 14px; font-weight: 600; line-height: 1.6; }
.news-row__act { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.src-badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px;
  background: var(--c-surface-2); color: var(--c-text-2); font-weight: 600; white-space: nowrap;
}
.src-badge.is-official { background: #EE15151a; color: var(--pk-red); }
.news-cover { padding: 12px 16px 0; }
.news-cover img { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius); display: block; }

/* 公式卡 */
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fm-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  padding: 13px 14px; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 6px;
}
.fm-card__name { font-size: 14px; font-weight: 700; }
.fm-card__expr { font-size: 13.5px; font-family: var(--mono); color: var(--pk-blue); line-height: 1.6; word-break: break-word; }
.fm-card__note { font-size: 12px; color: var(--c-text-2); }
.fm-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; font-size: 11px; color: var(--c-muted); }

/* 系统荐书 */
.rec-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rec-meta { font-size: 12px; color: var(--c-muted); }
.rec-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--sh-1); display: flex; flex-direction: column;
}
.rec-card__cover { width: 100%; height: 150px; object-fit: cover; background: var(--c-surface-2); display: block; }
.rec-card__body { padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.rec-card__title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.rec-card__author { font-size: 12px; color: var(--c-muted); }
.rec-card__reason { font-size: 12px; color: var(--c-text-2); line-height: 1.6; }
.rec-card__foot { display: flex; gap: 8px; margin-top: 4px; }
.rec-card__foot .btn { flex: 1; }

/* 书架搜索 + 筛选 */
.shelf-tools { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.shelf-tools .input { width: 100%; }

/* 在线阅读器 */
.reader-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-bottom: 1px solid var(--c-border); background: var(--c-surface-2);
  flex-wrap: wrap;
}
.reader-body {
  padding: 18px 22px; overflow-y: auto; flex: 1; line-height: 1.9;
  max-height: calc(90vh - 120px); background: var(--c-surface);
}
.reader-text { max-width: 70ch; margin: 0 auto; color: var(--c-text); }
.reader-text p { margin: 0 0 14px; text-align: justify; }
.reader-fallback { text-align: center; padding: 40px 16px; }

/* ══════════════════════════════════════════════════════════════════════
   响应式：平板 640–1023
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1279px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .rail { display: none; }
}

@media (max-width: 1023px) {
  .shell { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
  .sidebar { width: var(--sidebar-w-collapsed); align-items: center; }
  .sidebar__brand { padding: 15px 0; justify-content: center; }
  .sidebar__brand-text, .nav-group__label, .nav-item__soon, .sidebar__foot span { display: none; }
  .sidebar__nav { padding: 8px 6px; width: 100%; }
  .nav-item { justify-content: center; padding: 11px 0; border-left: none; border-radius: 10px; }
  .nav-item.is-active { border-left: none; }
  .nav-item__label { display: none; }
  .nav-item__icon { width: auto; font-size: 18px; }
  .nav-item__badge { position: absolute; margin-left: 22px; margin-top: -14px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outlet { padding: 16px 16px 34px; }
}

/* ══════════════════════════════════════════════════════════════════════
   响应式：手机 <640（侧边栏自动折叠为抽屉 + 底部 Tab）
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 639px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: min(268px, 82vw); align-items: stretch;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--sh-3); z-index: 810;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar__brand { padding: 16px 18px; justify-content: flex-start; }
  .sidebar__brand-text, .nav-group__label, .nav-item__label, .nav-item__soon { display: block; }
  .sidebar__nav { padding: 10px 10px 20px; }
  .nav-item { justify-content: flex-start; padding: 11px 12px; }
  .nav-item__badge { position: static; margin: 0 0 0 auto; }
  .sidebar__foot span { display: inline; }

  .topbar__menu { display: grid; place-items: center; }
  .outlet { padding: 14px 13px 82px; }

  .tabbar { display: block; }
  .fab { display: grid; place-items: center; }

  .grid--4, .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .task-columns { grid-template-columns: minmax(0, 1fr); }

  .hero { padding: 16px; gap: 14px; }
  .hero__cd { padding: 0; }
  .hero__cd-num { font-size: 32px; }
  .page-head__title { font-size: 18px; }

  .splash__cd-num { font-size: 52px; }
  .splash__countdown { padding: 18px 28px; }
  .splash__ball { width: 70px; height: 70px; }

  .modal { border-radius: 18px 18px 0 0; align-self: flex-end; max-height: 92vh; }
  .modal-mask { padding: 0; place-items: end center; }

  .snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .sent-list { grid-template-columns: minmax(0, 1fr); }
  .timer-row { flex-wrap: wrap; }
  .timer-row__ops { margin-left: 0; width: 100%; }
  .timer-row__ops .btn { flex: 1; }
  .word-row { flex-wrap: wrap; }
  .news-row__act { flex-direction: column; }
}

/* 移动端抽屉遮罩 */
.sidebar-mask {
  display: none; position: fixed; inset: 0;
  background: rgba(20, 24, 34, .4); z-index: 800;
  opacity: 0; transition: opacity .24s;
}
.sidebar-mask.is-show { display: block; }
.sidebar-mask.is-in { opacity: 1; }

@media print {
  .sidebar, .topbar, .rail, .tabbar, .fab { display: none !important; }
  .shell { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   宝可梦装饰
   ════════════════════════════════════════════════════════ */

/* 全局漂浮精灵：固定右下角，轻轻浮动 */
#pk-decor {
  position: fixed; right: 14px; bottom: 14px; z-index: 700;
  display: flex; align-items: flex-end; gap: 6px;
  pointer-events: none;
}
.pk-sprite {
  width: 64px; height: 64px; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18));
  animation: pk-float 3.6s ease-in-out infinite;
  user-select: none; -webkit-user-drag: none;
}
.pk-sprite:last-child { width: 52px; height: 52px; opacity: .92; }

@keyframes pk-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

/* 首页 hero 角标精灵 */
.hero__pk {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 92px; height: 92px; pointer-events: none;
  opacity: .9; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .22));
}
.hero__pk img, .hero__pk svg { width: 100%; height: 100%; object-fit: contain; animation: pk-float 3.6s ease-in-out infinite; }
@media (max-width: 720px) {
  .hero__pk { width: 64px; height: 64px; right: 8px; }
}

.hero__checkin {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #FFD93B, #FFB02E);
  color: #2A2A2A; font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 180, 30, .42);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hero__checkin:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 180, 30, .5); }
.hero__checkin:active { transform: translateY(0) scale(.97); }
.checkin-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--c-border); background: var(--c-bg, #fff);
  transition: all .15s ease; margin-bottom: 8px;
}
.checkin-opt.is-on { border-color: #FFB02E; background: rgba(255, 180, 30, .12); }
.checkin-opt__icon { font-size: 18px; }
.checkin-opt input { width: 18px; height: 18px; accent-color: #FFB02E; }

/* 章节页头精灵 */
.page-pk {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; vertical-align: middle; margin-left: 6px;
}
.page-pk img { width: 100%; height: 100%; object-fit: contain; }
