/* ============================================
   小多成长记 · base.css
   设计令牌 / Reset / 排版 / 基础交互
   参考设计：米白底 · 深绿主色 · 薄荷绿胶囊
   ============================================ */

:root {
  /* 色板 */
  --bg: #F8F7F3;              /* 页面米白底 */
  --card: #FFFFFF;            /* 卡片白 */
  --ink: #1F2321;             /* 主文字 */
  --ink-2: #6B7370;           /* 次级文字 */
  --ink-3: #A6ADAA;           /* 弱化文字 */
  --line: #ECEAE4;            /* 分隔线 */
  --line-2: #F1EFEA;

  --green: #0F6E5C;           /* 主绿 */
  --green-dark: #0A5748;      /* 深绿(按压/渐变) */
  --green-ink: #0E5A4B;       /* 绿色文字 */
  --green-soft: #E4F1EC;      /* 浅绿胶囊底 */
  --green-soft-2: #EFF7F3;    /* 更浅绿 */
  --green-line: #CFE4DB;      /* 绿色描边 */

  --red: #DC4C4C;             /* 逾期/危险 */
  --red-ink: #C03838;
  --red-soft: #FDECEC;
  --red-line: #F6D0D0;

  --orange: #E8930C;          /* 复习提醒 */
  --orange-ink: #C97F07;
  --orange-soft: #FDF3E3;
  --orange-line: #F5E2BF;

  --blue: #3B82F6;
  --blue-soft: #EAF2FE;
  --purple: #8B5CF6;
  --purple-soft: #F1EBFE;

  /* 圆角 */
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-1: 0 1px 2px rgba(31,35,33,.04), 0 4px 12px rgba(31,35,33,.04);
  --shadow-2: 0 2px 6px rgba(31,35,33,.06), 0 10px 28px rgba(31,35,33,.07);

  /* 布局 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h: 56px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
input, select, textarea { -webkit-appearance: none; appearance: none; border-radius: 0; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- 排版工具 ---------- */
.h1 { font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.h2 { font-size: 17px; font-weight: 700; }
.h3 { font-size: 15px; font-weight: 600; }
.sub { font-size: 13px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 滚动条（PC） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8D6CF; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 页面容器 ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* 通用卡片 */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line-2);
}

/* 点击反馈 */
.btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }

/* 隐藏 */
.hidden { display: none !important; }
