/* ============================================================
   舞力打卡 - 极简酷炫设计系统 v7.0
   Minimal & Cool · Lavender Purple Theme

   设计哲学:
   - 克制：少即是多，呼吸感比信息密度重要
   - 优雅：每个圆角、每处留白都经过推敲
   - 一致：统一的视觉语言贯穿全局
   - 愉悦：微交互让每次操作都有反馈

   品牌规范 v7.0:
   - 品牌渐变: #9955FF → #FF77BB
   - 通用卡片圆角: 18px
   - 页面左右外边距: 16px
   - 模块上下间距: 20px
   - 字体: 超大数字32号粗体 / 模块标题16号粗体 / 正文13号常规 / 标签小字11号
   ============================================================ */

/* ========== Design Tokens ========== */
:root {
  /* ====== Brand Gradient ====== */
  --brand-start: #9955FF;
  --brand-end: #FF77BB;
  --grad-brand: linear-gradient(135deg, #9955FF 0%, #FF77BB 100%);
  --grad-brand-diag: linear-gradient(135deg, #9955FF 0%, #cc66ee 40%, #FF77BB 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(153,85,255,.15) 0%, rgba(255,119,187,.15) 100%);

  /* ====== Color System ====== */
  /* Primary - 品牌紫 */
  --clr: #9955FF;
  --clr-rgb: 153,85,255;
  --clr-light: #b380ff;
  --clr-lighter: #e0d4ff;
  --clr-dark: #7c3aed;
  --clr-ghost: rgba(153,85,255,.06);
  --clr-ghost-md: rgba(153,85,255,.12);
  --clr-ghost-strong: rgba(153,85,255,.18);

  /* Accent - 品牌粉 */
  --accent: #FF77BB;
  --accent-rgb: 255,119,187;
  --accent-light: #ffadd4;
  --accent-ghost: rgba(255,119,187,.08);

  /* Gray */
  --gray-100: #f7f7f9;
  --gray-200: #ece9f3;
  --gray-300: #d4d0e0;
  --gray-400: #a8a2b8;
  --gray-500: #6e6887;
  --gray-600: #3d3857;
  --gray-700: #1a1333;

  /* Surface - 温暖浅底 */
  --bg1: #faf9ff;
  --bg2: #ffffff;
  --bgc: #ffffff;
  --bgc-hover: #f5f3ff;

  /* Text - 层次分明 */
  --t1: #1a1333;
  --t2: #6e6887;
  --t3: #a8a2b8;
  --t4: #d4d0e0;
  --t5: #ece9f3;

  /* Border */
  --bd: #ece9f3;
  --bd-light: #f5f3ff;
  --bd-hover: rgba(153,85,255,.2);

  /* Status */
  --green: #22c55e;
  --green-rgb: 34,197,94;
  --green-ghost: rgba(34,197,94,.08);
  --orange: #f59e0b;
  --orange-ghost: rgba(245,158,11,.08);
  --red: #ef4444;
  --red-ghost: rgba(239,68,68,.08);

  /* ====== Gradients ====== */
  --grad-main: var(--grad-brand);
  --grad-warm: linear-gradient(135deg, #cc66ee 0%, #FF77BB 100%);
  --grad-hero: var(--grad-brand-diag);
  --grad-shine: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.25) 45%, rgba(255,255,255,.25) 55%, transparent 60%);

  /* ====== Radius (按美化指令) ====== */
  --r: 12px;     /* 通用圆角 */
  --rl: 18px;    /* 卡片圆角 18dp */
  --rxl: 22px;   /* 大卡片圆角 */
  --rf: 999px;   /* 全圆角(胶囊) */

  /* ====== Shadow ====== */
  --sh-card: 0 1px 3px rgba(26,19,51,.04), 0 4px 12px rgba(153,85,255,.06);
  --sh-float: 0 4px 16px rgba(153,85,255,.1);
  --sh-modal: 0 24px 64px rgba(26,19,51,.16);
  --sh-fab: 0 6px 24px rgba(153,85,255,.35);

  /* ====== Layout (按美化指令) ====== */
  --th: 52px;              /* Header height */
  --tb: 68px;              /* Tab bar height 68dp */
  --sb: env(safe-area-inset-bottom, 0px);
  --page-pad: 16px;        /* 页面左右边距 16dp */
  --module-gap: 20px;       /* 模块上下间距 20dp */

  /* ====== Motion ====== */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-fast: .2s;
  --dur-normal: .35s;
  --dur-slow: .5s;

  /* ====== Font Scale (按美化指令) ====== */
  --fs-xl: 32px;   /* 超大统计数字 32号粗体 */
  --fs-lg: 18px;   /* 页面大标题 */
  --fs-md: 16px;   /* 模块标题 16号粗体 */
  --fs-base: 15px; /* 正文基准 */
  --fs-sm: 13px;    /* 正文辅助 13号 */
  --fs-xs: 11px;    /* 标签小字 11号 */
}

/* ========== Reset ========== */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { 
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg1);
  color: var(--t1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 15px;
}

input, textarea, select, button { font-family: inherit; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: calc(var(--tb) + var(--sb));
  background: var(--bg1);
}

/* ========== SVG Icon System ========== */
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.ico svg { width: 100%; height: 100%; }
.ico-sm { width: 18px; height: 18px; }
.ico-lg { width: 32px; height: 32px; }
.ico-xl { width: 48px; height: 48px; }

/* ========== Header ========== */
.hdr {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--th);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--page-pad);
  background: rgba(248,247,255,.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 100;
  border-bottom: 1px solid rgba(124,92,252,.04);
}
.hdr-t {
  font-size: 17px; font-weight: 700; color: var(--t1);
  letter-spacing: -.3px;
  display: flex; align-items: center; gap: 8px;
}
.hdr-logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad-main); display: flex; align-items: center; justify-content: center;
}
.hdr-logo svg { width: 18px; height: 18px; }
.hdr-back {
  background: none; border: none; color: var(--clr);
  font-size: 0; cursor: pointer; padding: 6px;
  border-radius: 10px; transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.hdr-back:active { background: var(--clr-ghost); }
.hdr-back svg { width: 20px; height: 20px; }

/* ========== Pages ========== */
.pg {
  display: none;
  padding: calc(var(--th) + 16px) var(--page-pad) var(--page-pad);
  animation: pageIn .4s var(--ease-out);
  min-height: 100vh;
}
.pg.on { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Tab Bar (按美化指令 v7.0) ========== */
.tb {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--tb);
  display: flex; align-items: stretch; justify-content: space-around;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(153,85,255,.08);
  z-index: 100;
  padding-bottom: var(--sb);
}
.tb-i {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: #999999; cursor: pointer; transition: all .3s var(--ease-out);
  position: relative; flex: 1; padding: 8px 0;
  -webkit-user-select: none; user-select: none;
}
.tb-i.on { color: var(--clr); }
.tb-ico {
  width: 24px; height: 24px;
  transition: transform .3s var(--ease-spring);
  display: flex; align-items: center; justify-content: center;
}
.tb-ico svg { width: 24px; height: 24px; }
.tb-i.on .tb-ico { transform: scale(1.05); }
.tb-lbl { font-size: var(--fs-xs); font-weight: 500; letter-spacing: .3px; }
.tb-i.on .tb-lbl { font-weight: 700; }

/* Active indicator - 顶部品牌紫线条 */
.tb-i.on::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2.5px; border-radius: 0 0 3px 3px;
  background: var(--clr);
  animation: tabIn .3s var(--ease-spring);
}
@keyframes tabIn {
  from { width: 0; opacity: 0; }
  to { width: 28px; opacity: 1; }
}

/* ========== Cards ========== */
.card {
  background: var(--bgc);
  border-radius: var(--rxl);
  padding: 20px; margin-bottom: 14px;
  border: 1px solid var(--bd-light);
  box-shadow: var(--sh-card);
  transition: transform .2s var(--ease-out);
  position: relative;
}
.card:active { transform: scale(.985); }

/* ========== Hero Card - 顶部渐变卡 (品牌渐变 #9955FF→#FF77BB) ========== */
.card-hero {
  background: var(--grad-hero);
  color: #fff; border: none;
  border-radius: var(--rl);
  padding: 28px 22px;
  box-shadow: 0 8px 32px rgba(153,85,255,.25);
  position: relative; overflow: hidden;
  margin-bottom: var(--module-gap);
}
/* 装饰光斑 */
.card-hero::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
  pointer-events: none;
}
.card-hero::after {
  content: ''; position: absolute; bottom: -30%; left: -5%;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Warm Card - 温暖渐变 */
.card-warm {
  background: var(--grad-warm);
  color: #fff; border: none;
  border-radius: var(--rxl);
  padding: 24px;
  box-shadow: 0 6px 24px rgba(244,114,182,.15);
  position: relative; overflow: hidden;
}
.card-warm::before {
  content: ''; position: absolute; top: -20%; right: -10%;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

/* Glass Card - 毛玻璃 */
.card-glass {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 4px 16px rgba(124,92,252,.06);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: var(--rf);
  border: none; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .25s var(--ease-out); gap: 8px;
  letter-spacing: .2px;
  position: relative; overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.96); }

.btn-p {
  background: var(--clr); color: #fff;
  box-shadow: 0 4px 16px rgba(124,92,252,.28);
}
.btn-p:hover { box-shadow: 0 6px 20px rgba(124,92,252,.36); }

.btn-o {
  background: transparent; border: 1.5px solid var(--bd);
  color: var(--t1); box-shadow: none;
}
.btn-o:active { background: var(--clr-ghost); border-color: var(--clr-lighter); }

.btn-ghost {
  background: var(--clr-ghost); color: var(--clr);
  border: none;
}
.btn-ghost:active { background: var(--clr-ghost-md); }

.btn-danger {
  background: var(--red-ghost); color: var(--red);
  border: none;
}

.btn-b { width: 100%; }
.btn-sm { font-size: 12px; padding: 8px 16px; border-radius: var(--rf); }

/* 主按钮光泽扫过 */
.btn-p::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--grad-shine);
  transition: left .5s;
}
.btn-p:active::after { left: 100%; }

/* ========== Inputs ========== */
.inp {
  width: 100%; padding: 14px 16px; border-radius: var(--r);
  border: 1.5px solid var(--bd);
  background: var(--bg2); color: var(--t1);
  font-size: 15px; outline: none;
  transition: all .25s var(--ease-out);
}
.inp:focus {
  border-color: var(--clr-light);
  box-shadow: 0 0 0 4px var(--clr-ghost);
}
.inp::placeholder { color: var(--t4); }
.inp-g { margin-bottom: 16px; }
.inp-l {
  font-size: 13px; font-weight: 600; color: var(--t2);
  margin-bottom: 8px; display: block;
  letter-spacing: .3px;
}

select.inp {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a8a2b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea.inp { resize: vertical; min-height: 80px; line-height: 1.6; }

/* ========== Toast ========== */
.toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  z-index: 999; min-width: 200px;
  background: var(--bg2); color: var(--t1);
  padding: 12px 24px; border-radius: var(--rf);
  font-size: 14px; font-weight: 500; pointer-events: none;
  opacity: 0; transition: all .4s var(--ease-out);
  box-shadow: var(--sh-float);
  border: 1px solid var(--bd-light);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-err { background: var(--red); color: #fff; border: none; }
.toast-ok { background: var(--green); color: #fff; border: none; }

/* ========== Modal ========== */
.mdl {
  position: fixed; inset: 0;
  background: rgba(26,19,51,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
.mdl-box {
  background: var(--bg2); border-radius: var(--rxl);
  padding: 28px; width: min(320px, 85vw);
  box-shadow: var(--sh-modal);
}
.mdl-t { font-size: 17px; font-weight: 700; margin-bottom: 12px; color: var(--t1); }
.mdl-c { font-size: 14px; color: var(--t2); margin-bottom: 24px; line-height: 1.6; }
.mdl-a { display: flex; gap: 12px; justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========== Empty State ========== */
.empty {
  padding: 48px 20px; text-align: center;
}
.empty-ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--clr-ghost); color: var(--clr);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 28px;
}
.empty-t { font-size: 16px; font-weight: 600; color: var(--t1); margin-bottom: 6px; }
.empty-s { font-size: 13px; color: var(--t3); line-height: 1.5; }

/* ========== Chips ========== */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: var(--rf);
  border: 1.5px solid var(--bd); font-size: 13px; font-weight: 500;
  cursor: pointer; margin: 4px; transition: all .25s var(--ease-out);
  color: var(--t2); background: var(--bg2);
  -webkit-user-select: none; user-select: none;
}
.chip:active { transform: scale(.95); }
.chip.on {
  background: var(--clr); border-color: var(--clr); color: #fff;
  box-shadow: 0 2px 8px rgba(var(--clr-rgb),.25);
}

/* ========== Progress Bar ========== */
/* 进度条 (按美化指令: 8px圆角、浅紫底色、品牌粉填充) */
.prog-bar {
  height: 8px; background: var(--clr-lighter);
  border-radius: 8px; overflow: hidden;
}
.prog-fill {
  height: 100%; border-radius: 8px;
  transition: width .8s var(--ease-out);
  background: var(--accent); /* 品牌粉 */
}
/* Hero卡片内的进度条(深色背景上) */
.home-progress .prog-bar { background: rgba(255,255,255,.15); }
.home-progress .prog-fill { background: rgba(255,255,255,.85); }

/* ========== Badges ========== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--rf);
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
}
.badge-ok { background: var(--green-ghost); color: var(--green); }
.badge-warn { background: var(--orange-ghost); color: var(--orange); }
.badge-err { background: var(--red-ghost); color: var(--red); }
.badge-purple { background: var(--clr-ghost-md); color: var(--clr); }

/* ========== Auth Page ========== */
#pg-auth.pg.on {
  text-align: center; padding-top: 0 !important;
  background: var(--bg1);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.auth {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 40px var(--page-pad);
  padding-bottom: 100px;
}
.auth-logo-wrap {
  width: 88px; height: 88px; border-radius: 24px;
  background: var(--grad-main);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(var(--clr-rgb),.25);
  animation: float 4s ease-in-out infinite;
}
.auth-logo-wrap svg { width: 48px; height: 48px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-name {
  font-size: 28px; font-weight: 800; margin-bottom: 6px;
  background: var(--grad-main); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -.5px;
}
.auth-sub {
  font-size: 14px; color: var(--t3); margin-bottom: 40px;
  letter-spacing: .5px;
}
.auth-f { text-align: left; }
.auth-code { display: flex; gap: 10px; }
.auth-code .inp { flex: 1; }
.auth-send {
  padding: 14px 16px; border-radius: var(--r);
  border: 1.5px solid var(--clr); background: var(--clr-ghost);
  color: var(--clr); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .25s;
}
.auth-send:active { background: var(--clr); color: #fff; }
.auth-send:disabled { opacity: .4; cursor: not-allowed; }

.auth-wx-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; margin-top: 16px;
  border-radius: var(--r); border: 1.5px solid var(--bd);
  background: var(--bg2); color: var(--t2);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all .25s;
}
.auth-wx-btn:active { background: var(--bgc-hover); }

.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; color: var(--t4); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--bd);
}

/* ========== Home Dashboard ========== */
.dash-row { display: flex; gap: 8px; margin: 20px 0 16px; }
.dash-i { flex: 1; text-align: center; }
.dash-v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.dash-l { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; font-weight: 500; letter-spacing: .3px; }

/* Quick Actions - 首页快捷操作 */
/* 中部四大功能按钮 (按美化指令: 76dp正方形、14圆角、28dp图标、90%缩放) */
.act-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 16px 0 var(--module-gap);
}
.act-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
  width: 100%; aspect-ratio: 1; /* 正方形76dp */
  border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--bd-light);
  cursor: pointer; font-size: 11px; font-weight: 500;
  color: var(--t2); transition: all .25s var(--ease-out);
  box-shadow: var(--sh-card);
  -webkit-user-select: none; user-select: none;
}
.act-btn:active {
  transform: scale(.9); /* 缩小到90% */
}
.act-ico {
  width: 28px; height: 28px; /* 28dp图标 */
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.act-ico-purple { background: var(--clr-ghost-md); color: var(--clr); }
.act-ico-pink { background: var(--accent-ghost); color: var(--accent); }
.act-ico-green { background: var(--green-ghost); color: var(--green); }
.act-ico-orange { background: var(--orange-ghost); color: var(--orange); }

/* ========== Course Item (打卡列表课程条目) ========== */
.course {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; /* 16dp内边距 */
  margin: 6px 0;
  border-radius: var(--r); /* 12dp圆角 */
  background: var(--bg2); border: 1px solid var(--bd-light);
  transition: all .25s var(--ease-out);
  cursor: pointer;
}
.course:active { background: var(--clr-ghost); border-color: var(--clr-lighter); }
.course-time {
  font-size: var(--fs-xs); color: var(--clr);
  font-weight: 700; min-width: 80px;
  font-variant-numeric: tabular-nums;
}
.course-info { flex: 1; min-width: 0; }
.course-name { font-size: var(--fs-sm); font-weight: 600; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-meta { font-size: var(--fs-xs); color: var(--t3); margin-top: 2px; }
/* 打卡按钮 62dp宽 × 32dp高 */
.course-action {
  flex-shrink: 0;
  min-width: 62px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  font-size: var(--fs-xs); color: var(--clr); font-weight: 700;
  background: var(--clr-ghost); border: 1.5px solid var(--clr-lighter);
  transition: all .2s;
}
.course-action:active { background: var(--clr); color: #fff; }

/* ========== Calendar ========== */
.cal {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; text-align: center;
}
.cal-h { font-size: 11px; color: var(--t3); padding: 6px 2px; font-weight: 600; }
.cal-d {
  padding: 8px 2px; border-radius: 8px; font-size: 12px;
  cursor: default; transition: all .2s;
  font-weight: 500; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.cal-d.today {
  border: 2px solid var(--clr);
  color: var(--clr); font-weight: 700;
}
.cal-d.done {
  background: var(--green-ghost); color: var(--green); font-weight: 700;
}
.cal-d.absent {
  background: var(--red-ghost); color: var(--red); font-weight: 600;
}

/* ========== Achievements ========== */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach-card {
  padding: 16px 8px; border-radius: var(--rl); text-align: center;
  background: var(--bg2); border: 1px solid var(--bd-light);
  transition: all .3s var(--ease-out);
  box-shadow: var(--sh-card);
}
.ach-card.locked { opacity: .3; filter: grayscale(.8); }
.ach-ico { font-size: 28px; margin-bottom: 6px; }
.ach-name { font-size: 11px; font-weight: 700; color: var(--t1); }
.ach-desc { font-size: 10px; color: var(--t3); margin-top: 3px; line-height: 1.3; }

/* ========== Profile ========== */
.prof-top { text-align: center; padding: 24px 0 16px; }
.prof-av {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--grad-warm);
  margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
  font-size: 32px; box-shadow: 0 4px 16px rgba(var(--accent-rgb),.2);
}
.prof-nick { font-size: 20px; font-weight: 700; color: var(--t1); }
.prof-lv { margin-top: 6px; font-size: 13px; color: var(--t2); font-weight: 500; }
.prof-phone { margin-top: 8px; font-size: 13px; color: var(--t3); font-weight: 500; letter-spacing: .3px; }

.prof-mi {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--bd-light);
  cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--t1); transition: .2s;
}
.prof-mi:active { color: var(--clr); }
.prof-mi-ico { margin-right: 12px; font-size: 18px; }
.prof-mi-left { display: flex; align-items: center; }

/* 醒目退出登录按钮 */
.prof-logout-btn {
  display: block; width: 100%; margin-top: 20px;
  padding: 14px 0; border: 1.5px solid var(--clr);
  border-radius: 14px; background: transparent;
  color: var(--clr); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.prof-logout-btn:active { transform: scale(.97); background: color-mix(in srgb, var(--clr) 10%, transparent); }

/* 次要注销链接 */
.prof-out {
  text-align: center; padding: 14px; color: var(--t3);
  font-size: 12px; cursor: pointer; margin-top: 10px;
  font-weight: 500;
}
.prof-out:hover { color: var(--red); }

/* ========== 打卡记录日历 ========== */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-top: 8px;
}
.cal-head {
  text-align: center; font-size: 11px; color: var(--t3);
  font-weight: 600; padding: 4px 0;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--t1); background: var(--bg);
  cursor: pointer; transition: transform .08s ease;
}
.cal-cell:active { transform: scale(.92); }
.cal-empty { background: transparent; cursor: default; }
.cal-done { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); font-weight: 700; }
.cal-absent { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); font-weight: 700; }
.cal-miss { background: color-mix(in srgb, #ff8c1a 16%, transparent); color: #ff8c1a; font-weight: 700; }
.cal-today { box-shadow: 0 0 0 2px var(--clr); font-weight: 800; }
.cal-cnt { position: absolute; right: 3px; bottom: 2px; font-size: 9px; font-weight: 700; line-height: 1; opacity: .92; }

/* ========== 成就徽章 ========== */
.ach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 4px;
}
.ach-badge {
  border-radius: 14px; padding: 14px 8px; text-align: center;
  background: var(--bg); border: 1px solid var(--bd);
}
.ach-badge.earned { border-color: color-mix(in srgb, var(--orange) 50%, transparent); background: color-mix(in srgb, var(--orange) 8%, transparent); }
.ach-ico { font-size: 30px; line-height: 1; filter: grayscale(1); opacity: .4; }
.ach-badge.earned .ach-ico { filter: none; opacity: 1; }
.ach-name { font-size: 13px; font-weight: 700; margin-top: 8px; color: var(--t1); }
.ach-desc { font-size: 10px; color: var(--t3); margin-top: 4px; line-height: 1.3; }
.ach-state { font-size: 10px; margin-top: 6px; font-weight: 600; color: var(--t3); }
.ach-badge.earned .ach-state { color: var(--orange); }

/* ========== Share ========== */
.sh-page { padding: var(--page-pad); }
.sha-poster { text-align: center; margin: 12px 0; }
.sha-poster canvas {
  max-width: 100%; border-radius: var(--rl);
  box-shadow: var(--sh-float);
}
/* 底部三按钮 60dp等高 */
.sha-actions { display: flex; gap: 12px; justify-content: center; margin: 20px 0; }
.sha-act {
  flex: 1; max-width: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  height: 60px; border-radius: var(--r); cursor: pointer;
  transition: all .2s var(--ease-out);
}
.sha-act:active { transform: scale(.95); }
.sha-act-ico {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-float);
}
.sha-wechat { background: #07c160; }
.sha-moments { background: #576b95; }
.sha-save { background: var(--clr); }
.sha-act-lbl { font-size: 11px; color: var(--t3); font-weight: 600; }

/* ========== Photo Box ========== */
.photo-box {
  width: 100%; height: 180px; border-radius: var(--rl);
  border: 2px dashed var(--bd);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin: 12px 0; overflow: hidden;
  background: var(--clr-ghost);
  transition: all .3s;
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box.has { border-style: solid; border-color: var(--clr); box-shadow: var(--sh-float); }
.photo-place { color: var(--t3); font-size: 14px; font-weight: 500; }

/* ========== Stats ========== */
.stats-row { display: flex; gap: 8px; margin: 12px 0; position: relative; overflow: hidden; border-radius: var(--r); }
.kpop-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: var(--r); }
.kpop-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: .12; }
.stat-i {
  flex: 1; text-align: center; padding: 14px 8px;
  background: var(--grad-brand-soft); border-radius: var(--r);
  position: relative; z-index: 1;
  backdrop-filter: blur(4px);
}
.stat-n { font-size: 22px; font-weight: 800; color: var(--clr); }
.stat-l { font-size: 10px; color: var(--t3); margin-top: 3px; font-weight: 500; letter-spacing: .3px; }

/* ========== Spinner ========== */
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 2.5px solid var(--bd); border-top-color: var(--clr);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Section Titles ========== */
.sec-title {
  font-size: 16px; font-weight: 700; color: var(--t1);
  margin-bottom: 14px; letter-spacing: -.2px;
}
.sec-subtitle {
  font-size: 13px; color: var(--t3); margin-top: -10px; margin-bottom: 14px;
}

/* ========== Section Header (with action) ========== */
.sec-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sec-header-t { font-size: 16px; font-weight: 700; color: var(--t1); }

/* ========== Floating Action Button ========== */
.fab {
  position: fixed; bottom: calc(var(--tb) + 16px + var(--sb)); right: 20px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--clr); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer; border: none;
  box-shadow: var(--sh-fab);
  transition: transform .3s var(--ease-spring);
  z-index: 50;
}
.fab:active { transform: scale(.88); }

/* ========== Utility ========== */
.text-center { text-align: center; }
.text-purple { color: var(--clr); }
.text-muted { color: var(--t3); }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }

/* ========== Responsive ========== */
@media (min-width: 480px) {
  #app {
    border-left: 1px solid var(--bd);
    border-right: 1px solid var(--bd);
    box-shadow: var(--sh-modal);
  }
}

/* ========== Toggle Switch v5.2 ========== */
.toggle-wrap { display: inline-block; cursor: pointer; }
.toggle-track {
  width: 44px; height: 24px; border-radius: 12px;
  transition: background .3s ease; position: relative;
}
.toggle-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  position: absolute; top: 2px; transition: transform .3s ease;
}
.toggle-status { font-size: 13px; font-weight: 600; }
.toggle-status.on { color: var(--clr); }
.toggle-status.off { color: var(--t3); }

/* ========== Home v5.5 紧凑版 ========== */
/* ========== 首页主卡 (按美化指令: 内边距上下28、左右22) ========== */
.home-hero {
  background: var(--grad-hero);
  border-radius: var(--rl);
  padding: 28px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--module-gap);
  box-shadow: 0 8px 32px rgba(153,85,255,.22);
}
.home-hero::before {
  content:''; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08); top: -60px; right: -40px;
}
.home-hero::after {
  content:''; position: absolute; width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.05); bottom: -30px; left: -20px;
}
.home-hero-warm {
  background: var(--grad-hero);
  text-align: center; padding: 28px 22px;
  border-radius: var(--rl);
}
.home-hero-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.2); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.home-hero-title { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 4px; }
.home-hero-btn {
  background: rgba(255,255,255,.2) !important; color: #fff !important;
  box-shadow: none !important; border: 1.5px solid rgba(255,255,255,.3) !important; margin-top: 14px;
}
.home-card-label { font-size: var(--fs-xs); opacity: .65; font-weight: 500; margin-bottom: 2px; position: relative; z-index: 1; }
.home-card-name { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 4px; position: relative; z-index: 1; }
.home-card-price { font-size: var(--fs-sm); opacity: .75; position: relative; z-index: 1; }
.home-hero-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.home-hero-quote { font-size: var(--fs-sm); opacity: .7; font-weight: 500; margin-bottom: 4px; }
.home-hero-days { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -1px; line-height: 1; }
.home-hero-days span { font-size: 16px; font-weight: 400; opacity: .6; margin-left: 2px; }
.home-hero-sub { font-size: var(--fs-xs); opacity: .5; margin-top: 2px; }
.home-hero-lv { text-align: center; font-size: 28px; }
.home-hero-lv span { display: block; font-size: 10px; font-weight: 600; opacity: .6; margin-top: 2px; }
.home-hero-stats { display: flex; margin: 14px 0 10px; position: relative; z-index: 1; }
.home-stat { flex: 1; text-align: center; }
.home-stat:nth-child(2) { border-left: 1px solid rgba(255,255,255,.12); border-right: 1px solid rgba(255,255,255,.12); }
.home-stat-n { font-size: var(--fs-xl); font-weight: 800; line-height: 1; } /* 32号粗体 */
.home-stat-l { font-size: var(--fs-xs); opacity: .55; margin-top: 2px; }
.home-progress { position: relative; z-index: 1; }
.home-progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: var(--fs-xs); opacity: .5; }
.home-progress-label span:last-child { opacity: .8; font-weight: 700; }

/* 指标双卡 (按美化指令: 12dp间距、18dp内边距) */
.home-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: var(--module-gap); }
.home-metric-card {
  background: var(--bgc);
  border-radius: var(--rl);
  padding: 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--sh-card);
}
.home-metric-icon { font-size: 28px; flex-shrink: 0; }
.home-metric-body { flex: 1; min-width: 0; }
.home-metric-num { font-size: var(--fs-xl); font-weight: 800; color: var(--t1); line-height: 1; } /* 32号 */
.home-metric-num span { font-size: var(--fs-sm); font-weight: 400; color: var(--t3); }
.home-metric-sub { font-size: var(--fs-xs); color: var(--t3); margin-top: 2px; }

/* 通用卡片 */
.home-card {
  background: var(--bgc);
  border-radius: var(--rl);
  padding: 16px;
  margin-bottom: var(--module-gap);
  box-shadow: var(--sh-card);
}
.home-card-accent {
  background: linear-gradient(135deg, rgba(153,85,255,.04), rgba(255,119,187,.04));
}
.home-card-header {
  font-size: var(--fs-md); font-weight: 700; color: var(--t1);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.home-card-badge { font-size: var(--fs-xs); font-weight: 400; color: var(--t3); }
.home-card-empty {
  font-size: var(--fs-sm); color: var(--t3);
  text-align: center; padding: 24px 10px; line-height: 1.6;
}

/* 分布统计 - 空状态插画 */
.home-dist-top {
  display: flex; gap: 8px; align-items: flex-end;
  height: 80px; margin-bottom: 12px; padding-top: 8px;
}
.home-dist-bar {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; min-width: 0;
}
.home-dist-bar-fill {
  width: 100%; border-radius: 6px 6px 0 0; min-height: 4px; transition: height .3s;
}
.home-dist-bar-label { font-size: 10px; color: var(--t3); text-align: center; margin-top: 4px; }
.home-dist-bar-label span { display: block; font-weight: 700; color: var(--t1); font-size: 12px; }
.home-dist-list { font-size: var(--fs-xs); }
.home-dist-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 0; cursor: pointer; border-radius: 8px; transition: background .15s;
}
.home-dist-item:hover { background: var(--bg); }
.home-dist-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.home-dist-name { color: var(--t1); flex: 1; }
.home-dist-count { font-weight: 700; color: var(--clr); }
.home-dist-arrow { font-size: 10px; color: var(--t4); }

/* 弱项分析 - 空状态 */
.home-weak-focus { font-size: var(--fs-md); font-weight: 700; color: var(--t1); margin-bottom: 10px; }
.home-weak-key { margin: 0 2px; }
.home-weak-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.home-weak-tag {
  font-size: var(--fs-xs); padding: 4px 10px;
  border-radius: 10px; background: rgba(245,158,11,.1); color: var(--orange);
}

/* 今日课表 */
.home-today {
  background: var(--bgc); border-radius: var(--rl);
  padding: 16px; margin-bottom: var(--module-gap);
  box-shadow: var(--sh-card);
}
.home-today-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: var(--fs-md); font-weight: 700; color: var(--t1);
}
.home-today-header .btn-xs { font-size: var(--fs-xs); padding: 4px 10px; }
.home-today-empty { text-align: center; padding: 16px; color: var(--t3); font-size: var(--fs-sm); }
.home-today-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r); background: var(--bg);
  margin-bottom: 4px; cursor: pointer; transition: all .15s;
}
.home-today-item:hover { background: var(--clr-ghost); }
.home-today-time { font-size: var(--fs-xs); color: var(--t3); font-weight: 600; min-width: 60px; }
.home-today-name {
  font-size: var(--fs-sm); font-weight: 600; color: var(--t1);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-today-type {
  font-size: var(--fs-xs); color: var(--clr); font-weight: 500;
  padding: 2px 8px; border-radius: 6px; background: var(--clr-ghost);
}
.home-today-arrow { font-size: var(--fs-xs); color: var(--clr); font-weight: 600; white-space: nowrap; }

/* ========== Home v8.0 重构版 ========== */
/* 顶部行 */
.hh-top-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; position:relative; z-index:1; }
.hh-brand { font-size:15px; font-weight:700; letter-spacing:.5px; opacity:.8; }
.hh-icon-btn { width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,.15); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; margin-left:6px; color:#fff; transition:all .2s; }
.hh-icon-btn:hover { background:rgba(255,255,255,.25); }

/* 双环形进度 */
.hh-rings { display:flex; gap:16px; align-items:center; justify-content:center; margin-bottom:14px; position:relative; z-index:1; }
.hh-ring-big { position:relative; width:120px; height:120px; flex-shrink:0; }
.hh-ring-big svg { width:100%; height:100%; }
.hh-ring-big-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.hh-ring-big-num { font-size:30px; font-weight:800; line-height:1; }
.hh-ring-big-sub { font-size:12px; opacity:.5; margin-top:2px; }
.hh-ring-small { position:relative; width:90px; height:90px; flex-shrink:0; }
.hh-ring-small svg { width:100%; height:100%; }
.hh-ring-small-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.hh-ring-small-num { font-size:22px; font-weight:800; line-height:1; color:var(--orange); }
.hh-ring-small-sub { font-size:10px; opacity:.5; margin-top:1px; }

/* 单价区 */
.hh-price-box { background:rgba(255,255,255,.12); border-radius:12px; padding:10px 14px; position:relative; z-index:1; text-align:center; }
.hh-price-row { font-size:13px; opacity:.65; display:flex; justify-content:center; gap:8px; align-items:center; }
.hh-price-row strong { font-size:20px; font-weight:800; opacity:1; }
.hh-price-next { font-size:12px; opacity:.55; margin-top:4px; }
.hh-price-next span { font-weight:700; opacity:.9; }
.hh-price-saved { font-size:11px; opacity:.4; margin-top:3px; }
.hh-price-saved span { font-weight:700; opacity:.8; }

/* v8 指标卡 */
.v8-metrics { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:var(--module-gap); }
.v8-mc { background:var(--bgc); border-radius:var(--rl); padding:14px; box-shadow:var(--sh-card); }
.v8-mc-top { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--t3); margin-bottom:8px; }
.v8-mc-top strong { font-size:var(--fs-md); color:var(--t1); }
.v8-mc-top strong small { font-size:11px; font-weight:400; color:var(--t3); }

/* 进度条 */
.v8-prog { height:6px; background:var(--bd-light); border-radius:6px; overflow:hidden; position:relative; }
.v8-prog-fill { height:100%; border-radius:6px; background:var(--grad-brand); transition:width .8s var(--ease-out); }
.v8-prog-large { height:10px; margin-top:8px; }
.v8-prog-label { position:absolute; right:0; top:-18px; font-size:10px; color:var(--t3); }

/* 距离目标 */
.v8-remain { background:var(--bgc); border-radius:var(--rl); padding:16px; margin-bottom:var(--module-gap); box-shadow:var(--sh-card); }
.v8-remain-top { display:flex; justify-content:space-between; font-size:13px; color:var(--t2); margin-bottom:6px; }
.v8-remain-sub { font-size:11px; color:var(--t3); }

/* 空状态行动 */
.v8-empty-acts { background:var(--bgc); border-radius:var(--rl); padding:16px; margin-bottom:var(--module-gap); box-shadow:var(--sh-card); }
.v8-empty-row { display:flex; align-items:center; gap:10px; padding:4px 0; }
.v8-empty-icon { font-size:24px; flex-shrink:0; }
.v8-empty-row strong { font-size:var(--fs-sm); color:var(--t1); }
.v8-empty-sub { font-size:11px; color:var(--t3); margin-top:2px; }
.v8-empty-row .btn { flex-shrink:0; }
.v8-empty-divider { border-top:1px solid var(--bd-light); margin:8px 0; }

/* 今日课表 */
.v8-today-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:var(--r); background:var(--bg); margin-bottom:4px; cursor:pointer; transition:all .15s; }
.v8-today-item:hover { background:var(--clr-ghost); }
.v8-today-time { font-size:11px; color:var(--t3); font-weight:600; min-width:60px; }
.v8-today-name { font-size:13px; font-weight:600; color:var(--t1); flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v8-today-type { font-size:10px; color:var(--clr); font-weight:500; padding:2px 8px; border-radius:6px; background:var(--clr-ghost); }
.v8-today-go { font-size:11px; color:var(--clr); font-weight:600; white-space:nowrap; }

/* 激励 */
.v8-motivate { background:var(--bgc); border-radius:var(--rl); padding:14px; margin-bottom:var(--module-gap); box-shadow:var(--sh-card); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.v8-badge-preview { font-size:10px; color:var(--t4); background:var(--clr-ghost); padding:4px 10px; border-radius:10px; }

/* 分享战报浮窗 */
.v8-share-float { display:flex; align-items:center; gap:6px; padding:10px 18px; border-radius:var(--rf); background:var(--grad-hero); color:#fff; font-size:13px; font-weight:600; cursor:pointer; box-shadow:var(--sh-fab); justify-content:center; margin-bottom:20px; animation:v8SharePulse 2s infinite; }
@keyframes v8SharePulse { 0%,100%{box-shadow:0 6px 24px rgba(153,85,255,.35)} 50%{box-shadow:0 8px 32px rgba(153,85,255,.55)} }

/* 推荐课程 */
.v8-recommend { background:var(--bgc); border-radius:var(--rl); padding:16px; margin-bottom:var(--module-gap); box-shadow:var(--sh-card); }
.v8-rec-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:var(--r); background:var(--bg); margin-bottom:4px; cursor:pointer; transition:all .15s; font-size:12px; color:var(--t2); }
.v8-rec-item:hover { background:var(--clr-ghost); }
.v8-rec-item div:first-child { min-width:64px; font-size:11px; color:var(--t3); font-weight:600; }
.v8-rec-name { flex:1; font-weight:600; color:var(--t1); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.v8-rec-tag { font-size:10px; color:var(--clr); font-weight:500; background:var(--clr-ghost); padding:2px 8px; border-radius:6px; }

/* ========== Schedule v7.0 精致设计 ========== */

/* ===== Tab 切换栏 ===== */
.sched-tabs {
  display: flex; gap: 0;
  background: var(--clr-ghost-strong); border-radius: var(--rl); padding: 3px;
  margin-bottom: 16px;
}
.sched-tab {
  flex: 1; text-align: center; padding: 10px 8px;
  border-radius: 15px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.65); cursor: pointer;
  transition: all .25s var(--ease-out);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.sched-tab.on {
  background: #fff; color: var(--clr);
  box-shadow: var(--sh-card);
}

/* ===== 工作室课表 (st- 前缀) ===== */
.st-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.st-header-left { display: flex; flex-direction: column; }
.st-title { font-size: 17px; font-weight: 800; color: var(--t1); letter-spacing: -.3px; }
.st-sub { font-size: 12px; color: var(--t3); margin-top: 2px; }
.st-update-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 14px; border-radius: var(--rf);
  border: 1.5px solid var(--bd); background: transparent;
  color: var(--t2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.st-update-btn:hover { border-color: var(--clr); color: var(--clr); background: var(--clr-ghost); }

/* 网格容器 - 带圆角和内边距 */
.st-grid-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--rl); background: var(--bgc);
  box-shadow: var(--sh-card); border: 1px solid var(--bd-light);
  margin-bottom: 12px; padding: 8px;
}
.st-grid {
  display: grid; grid-template-columns: 60px repeat(7, 1fr);
  gap: 4px; /* 4dp间距 */
  min-width: 680px;
}

/* 表头 */
.st-corner {
  background: var(--bg); padding: 10px 4px; text-align: center;
  font-size: 10px; font-weight: 600; color: var(--t4);
  border-bottom: 1px solid var(--bd-light); border-right: 1px solid var(--bd-light);
}
.st-day-hdr {
  background: var(--bg); padding: 10px 4px; text-align: center;
  border-bottom: 1px solid var(--bd-light); border-right: 1px solid var(--bd-light);
}
.st-day-hdr:last-child { border-right: none; }
.st-day-name { display: block; font-size: 12px; font-weight: 700; color: var(--t2); }
.st-day-today { background: var(--clr-ghost); }
.st-day-today .st-day-name { color: var(--clr); font-weight: 800; }
.st-today-badge {
  display: inline-block; font-size: 9px; font-weight: 700;
  color: #fff; background: var(--clr); padding: 1px 6px;
  border-radius: var(--rf); margin-top: 3px;
}

/* 时间列 */
.st-time {
  background: var(--bg); padding: 8px 4px; text-align: center;
  border-bottom: 1px solid var(--bd-light); border-right: 1px solid var(--bd-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.st-time .ts-s { font-size: 11px; font-weight: 700; color: var(--t2); line-height: 1.3; }
.st-time .ts-d { font-size: 8px; color: var(--t4); }
.st-time .ts-e { font-size: 10px; color: var(--t3); line-height: 1.3; }

/* 课程单元格 */
.st-cell {
  background: var(--bgc); padding: 3px 2px; min-height: 48px;
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid var(--bd-light); border-right: 1px solid var(--bd-light);
}
.st-cell:last-child { border-right: none; }
.st-cell-today { background: rgba(124,92,252,.03); }
.st-empty { background: transparent; }

/* 公休 */
.st-rest-cell {
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 8px,
    rgba(124,92,252,.02) 8px, rgba(124,92,252,.02) 16px
  );
  justify-content: center; align-items: center;
}
.st-rest-inner { text-align: center; }
.st-rest-icon { font-size: 20px; margin-bottom: 4px; opacity: .5; }
.st-rest-text { font-size: 10px; color: var(--t4); font-weight: 600; letter-spacing: 1px; }

/* 课程卡片 - 渐变色条设计 */
.st-course {
  border-radius: 8px; padding: 0; margin-bottom: 2px;
  display: flex; overflow: hidden; cursor: pointer;
  transition: all .2s var(--ease-out);
  background: var(--course-light);
}
.st-course:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.st-course-bar {
  width: 3px; flex-shrink: 0;
  background: var(--course-gradient);
  border-radius: 8px 0 0 8px;
}
.st-course-body {
  flex: 1; padding: 4px 6px; min-width: 0;
}
.st-course-name {
  font-weight: 700; color: var(--t1); font-size: 10px;
  line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-course-meta {
  display: flex; gap: 3px; align-items: center; margin-top: 1px; flex-wrap: wrap;
}
.st-course-type {
  font-size: 9px; font-weight: 600; color: var(--course-tag);
}
.st-course-level {
  font-size: 8px; color: var(--t3); background: rgba(0,0,0,.04);
  padding: 0px 4px; border-radius: 3px;
}

/* 图例 */
.st-legend {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 4px;
  margin-bottom: 8px;
}
.st-legend-item {
  font-size: 11px; color: var(--t3); display: flex; align-items: center; gap: 5px;
  font-weight: 500;
}
.st-legend-dot {
  width: 12px; height: 4px; border-radius: 2px;
}

/* ===== 个人课表 (ps- 前缀) ===== */

/* 空闲时间入口 */
.ps-avail-entrance {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--r); /* 12dp圆角 */
  background: var(--bgc); border: 1.5px solid var(--bd-light);
  box-shadow: var(--sh-card); margin-bottom: 12px;
  cursor: pointer; transition: all .2s;
}
.ps-avail-entrance:hover { border-color: var(--clr-lighter); background: var(--clr-ghost); }
.ps-avail-entrance-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--t1);
}
.ps-avail-icon { font-size: 18px; }

/* 空闲时间面板 */
.ps-avail-panel {
  background: var(--bgc); border-radius: var(--rl);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--bd-light); box-shadow: var(--sh-card);
}
.ps-avail-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ps-avail-title { font-size: 15px; font-weight: 700; color: var(--t1); }
.ps-avail-desc { font-size: 12px; color: var(--t3); margin-bottom: 14px; line-height: 1.5; }

/* 空闲时间网格 */
.ps-avail-grid { margin-bottom: 14px; }
.ps-avail-row { display: flex; gap: 0; }
.ps-avail-dh {
  width: 44px; padding: 10px 4px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--t3);
  flex-shrink: 0;
}
.ps-avail-ph {
  flex: 1; padding: 8px 4px; text-align: center;
  font-size: 10px; font-weight: 600; color: var(--t4);
}
.ps-avail-cell {
  flex: 1; margin: 2px; height: 40px;
  border-radius: 8px; border: 1.5px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
  font-size: 14px; color: var(--clr); font-weight: 700;
  background: var(--bg);
}
.ps-avail-cell.on {
  background: var(--clr-ghost-md); border-color: var(--clr);
  color: var(--clr);
}
.ps-avail-cell:hover { border-color: var(--clr-light); }

.ps-avail-actions { display: flex; gap: 8px; }

/* 月导航 */
.ps-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-bottom: 10px;
}
.ps-nav-btn {
  background: none; border: 1.5px solid var(--bd); border-radius: var(--r);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--t2); font-size: 18px; font-weight: 300;
  transition: all .2s;
}
.ps-nav-btn:hover { border-color: var(--clr); color: var(--clr); background: var(--clr-ghost); }
.ps-nav-title { font-size: 17px; font-weight: 800; color: var(--t1); letter-spacing: .5px; }

/* 周标签 */
.ps-week-tabs { display: flex; gap: 5px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.ps-week-tab {
  padding: 7px 12px; border-radius: var(--rf);
  font-size: 12px; color: var(--t3); background: transparent;
  border: 1.5px solid var(--bd); cursor: pointer;
  transition: all .25s; font-weight: 500;
}
.ps-week-tab small { font-size: 10px; color: var(--t4); }
.ps-week-tab:hover { border-color: var(--clr); color: var(--clr); }
.ps-week-tab.on {
  background: var(--clr); color: #fff; border-color: var(--clr);
  box-shadow: 0 4px 12px rgba(124,92,252,.3);
}
.ps-week-tab.on small { color: rgba(255,255,255,.75); }

/* 表格 - 时间列固定 */
.ps-table-wrap {
  border-radius: var(--rl); background: var(--bgc);
  box-shadow: var(--sh-card); border: 1px solid var(--bd-light);
  position: relative; overflow: hidden;
}
.ps-table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.ps-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 12px; min-width: 640px;
}
.ps-table thead { position: sticky; top: 0; z-index: 2; }
.ps-th {
  padding: 12px 6px; text-align: center; font-weight: 600;
  background: var(--bg); border-bottom: 2px solid var(--bd-light);
}
.ps-th-time { width: 64px; color: var(--t3); font-size: 10px; }
/* 时间列 sticky 固定 */
.ps-td-time, .ps-th-time {
  position: sticky; left: 0; z-index: 3;
  background: var(--bg) !important;
  box-shadow: 1px 0 0 var(--bd-light);
}
.ps-th-day { min-width: 72px; }
.ps-th-today { background: linear-gradient(180deg, var(--clr-ghost), transparent); }
.ps-day-name { display: block; font-size: 11px; color: var(--t2); margin-bottom: 2px; font-weight: 600; }
.ps-day-date { display: block; font-size: 14px; color: var(--t1); font-weight: 700; }
.ps-th-today .ps-day-name { color: var(--clr); font-weight: 700; }
.ps-th-today .ps-day-date { color: var(--clr); font-weight: 800; }

/* 时间列 */
.ps-td-time {
  padding: 10px 4px; text-align: center; font-weight: 600;
  border-bottom: 1px solid var(--bd-light);
  white-space: nowrap;
}
.ps-td-time .ts-s { font-size: 11px; font-weight: 700; color: var(--t2); }
.ps-td-time .ts-d { font-size: 8px; color: var(--t4); }
.ps-td-time .ts-e { font-size: 10px; color: var(--t3); }

/* 课程卡片单元格 */
.ps-td-cell {
  padding: 4px 3px; vertical-align: top;
  border-bottom: 1px solid var(--bd-light); border-right: 1px solid var(--bd-light);
}
.ps-td-cell:last-child { border-right: none; }
.ps-td-today { background: rgba(124,92,252,.03); }

/* 课程卡片 - 渐变色条 */
.ps-card {
  border-radius: 10px; padding: 0; margin-bottom: 3px;
  display: flex; overflow: hidden; cursor: pointer;
  transition: all .2s var(--ease-out);
  background: var(--course-light);
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.ps-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.ps-card-bar {
  width: 3px; flex-shrink: 0;
  background: var(--course-gradient);
}
.ps-card-body {
  flex: 1; padding: 5px 6px; min-width: 0;
}
.ps-card-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px;
}
.ps-card-icon { font-size: 12px; }
.ps-card-status { font-size: 12px; }
.ps-card-name {
  font-weight: 700; color: var(--t1); font-size: 11px;
  line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-card-meta {
  display: flex; gap: 3px; align-items: center; margin-top: 2px;
}
.ps-card-type { font-size: 9px; font-weight: 600; color: var(--course-tag); }
.ps-card-level { font-size: 8px; color: var(--t3); }
.ps-card-stars { font-size: 10px; color: var(--orange); margin-top: 1px; letter-spacing: 1px; }

/* 打卡状态 */
.ps-card-done .ps-card-bar { background: var(--green) !important; }
.ps-card-absent .ps-card-bar { background: var(--red) !important; }

/* 空单元格 */
.ps-td-empty { background: transparent; }
.ps-add-btn {
  cursor: pointer; border-radius: 8px; min-height: 56px;
  border: 1.5px dashed var(--bd); color: var(--t4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 300; transition: all .2s;
}
.ps-add-btn:hover { border-color: var(--clr); color: var(--clr); background: var(--clr-ghost); }

/* 公休 */
.ps-rest {
  text-align: center; padding: 16px 4px;
  font-size: 12px; color: var(--t4); font-weight: 500;
}

/* 空状态 */
.sched-empty { text-align: center; padding: 50px 20px; }
.sched-empty-icon { font-size: 64px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }
.sched-empty-title { font-size: 17px; font-weight: 700; color: var(--t1); margin-bottom: 6px; }
.sched-empty-desc { font-size: 13px; color: var(--t3); line-height: 1.6; }

/* 添加按钮 */
.ps-add-course-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 16px auto 0; padding: 10px 28px; border-radius: var(--rf);
  border: 1.5px dashed var(--bd); background: transparent;
  color: var(--t2); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.ps-add-course-btn:hover { border-color: var(--clr); color: var(--clr); background: var(--clr-ghost); }
.ps-add-form { display: none; margin-top: 16px; }

/* 导入弹窗 */
.import-zone {
  border: 2px dashed var(--bd); border-radius: var(--rl);
  padding: 32px 16px; cursor: pointer; transition: all .2s;
  background: var(--bg);
}
.import-zone:hover { border-color: var(--clr); background: var(--clr-ghost); }
.import-zone-icon { font-size: 40px; margin-bottom: 8px; }
.import-zone-text { font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 4px; }
.import-zone-hint { font-size: 11px; color: var(--t4); }

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========== 新登录页样式 v8.4 ========== */
.auth-hint {
  font-size: 12px;
  color: var(--t3);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

.auth-code-display {
  background: var(--bgc);
  border-radius: var(--rl);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 20px;
  border: 1.5px solid var(--clr-lighter);
}

.auth-code-label {
  font-size: 13px;
  color: var(--t3);
  margin-bottom: 12px;
  font-weight: 500;
}

.auth-code-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--clr);
  letter-spacing: 8px;
  font-family: 'Courier New', monospace;
  margin: 16px 0;
  text-shadow: 0 2px 8px rgba(153,85,255,.2);
}

.auth-code-hint {
  font-size: 12px;
  color: var(--orange);
  margin-top: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.auth-forget {
  font-size: 13px;
  color: var(--clr);
  text-align: center;
  margin-top: 16px;
  cursor: pointer;
  font-weight: 500;
}

.auth-forget:hover {
  text-decoration: underline;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.auth-link {
  font-size: 14px;
  color: var(--clr);
  cursor: pointer;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link-sub {
  font-size: 13px;
  color: var(--t3);
  font-weight: 500;
}

.auth-forget-tip {
  text-align: center;
  padding: 40px 24px;
  background: var(--bgc);
  border-radius: var(--rl);
  margin-bottom: 20px;
}

.auth-forget-tip div:first-child {
  font-size: 48px;
  margin-bottom: 16px;
}

.auth-forget-tip div:nth-child(2) {
  font-size: 18px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 8px;
}

.auth-forget-tip div:nth-child(3) {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.6;
}

/* ========== Dark Mode (预留) ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: #0c0a1a;
    --bg2: #15122a;
    --bgc: #1a1636;
    --bgc-hover: #201b42;
    --t1: #f0edff;
    --t2: rgba(240,237,255,.6);
    --t3: rgba(240,237,255,.35);
    --t4: rgba(240,237,255,.2);
    --bd: rgba(124,92,252,.15);
    --bd-light: rgba(124,92,252,.08);
  }
}
