/* ==========================================================================
   学习签签 · 主题样式（明亮玻璃拟态）
   背景沿用暮色插画：天空蓝紫 + 落日暖橙，界面走半透明白玻璃，避免压暗画面
   ========================================================================== */

:root {
  --bg: #f7f3ee;
  --ink: #1e2744;
  --ink-soft: #3a4560;
  --muted: #6b7691;
  --muted-2: #8b94ab;
  --line: rgba(74, 92, 145, 0.14);
  --line-strong: rgba(74, 92, 145, 0.24);
  --card: rgba(255, 255, 255, 0.76);
  --card-2: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --brand-1: #5b52e8;
  --brand-2: #f07a45;
  --brand-grad: linear-gradient(135deg, #5b52e8 0%, #8a5cf6 62%, #f07a45 155%);
  --cyan: #0f8f9e;
  --ok: #12855f;
  --warn: #b8730a;
  --danger: #d84a63;
  --ok-bg: rgba(18, 133, 95, 0.1);
  --warn-bg: rgba(184, 115, 10, 0.1);
  --danger-bg: rgba(216, 74, 99, 0.09);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 16px 38px rgba(46, 56, 100, 0.12);
  --shadow-lg: 0 28px 70px rgba(40, 48, 90, 0.2);
  --glow: 0 10px 26px rgba(91, 82, 232, 0.26);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景：固定层，避免 iOS 上 background-attachment:fixed 的抖动 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("assets/bg-desktop.jpg");
  background-position: center 34%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.04);
}

/* 白色雾化层：上方留出插画，向下逐渐变亮，保证正文可读 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 380px at 76% 8%, rgba(255, 226, 196, 0.34), transparent 62%),
    radial-gradient(900px 520px at 6% 96%, rgba(198, 212, 255, 0.42), transparent 68%),
    linear-gradient(180deg,
      rgba(250, 247, 244, 0.44) 0%,
      rgba(250, 247, 244, 0.72) 24%,
      rgba(250, 248, 245, 0.9) 48%,
      rgba(251, 249, 246, 0.96) 72%,
      #fbf9f6 100%);
}

@media (max-width: 900px) {
  body::before {
    background-image: url("assets/bg-mobile.jpg");
    background-position: center top;
  }
  body::after {
    background:
      radial-gradient(520px 300px at 80% 6%, rgba(255, 226, 196, 0.26), transparent 62%),
      linear-gradient(180deg,
        rgba(250, 247, 244, 0.38) 0%,
        rgba(250, 248, 245, 0.78) 34%,
        rgba(251, 249, 246, 0.94) 62%,
        #fbf9f6 100%);
  }
}

img { max-width: 100%; }
a { color: #4b46d6; text-decoration: none; }
a:hover { color: #6f5cf0; }
p { margin: 0 0 10px; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 650; }
code { font-family: var(--mono); font-size: 0.92em; background: rgba(74, 92, 145, 0.08); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.01em; font-weight: 680; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

:focus-visible {
  outline: 2px solid #6f63f0;
  outline-offset: 2px;
  border-radius: 6px;
}

.page {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 64px;
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(74, 92, 145, 0.1);
  box-shadow: 0 2px 18px rgba(46, 56, 100, 0.06);
}

.topbar-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); min-width: 0; flex: 0 0 auto; }

/* 品牌图标 = 站点图标（动漫插画），不再是图形五角星 */
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(52, 62, 110, 0.2);
  flex: 0 0 auto;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted-2); font-size: 11.5px; letter-spacing: 0.06em; }

.topnav { display: flex; gap: 4px; margin-left: 10px; }
.topnav a {
  padding: 8px 14px; border-radius: 10px; color: var(--muted); font-size: 14px;
  transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.topnav a:hover { color: var(--ink); background: rgba(74, 92, 145, 0.07); }
.topnav a.on { color: #3b33c9; background: rgba(91, 82, 232, 0.12); box-shadow: inset 0 0 0 1px rgba(91, 82, 232, 0.18); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* 下载 App：顶部常驻入口，橙色渐变胶囊 */
.app-dl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px;
  background: linear-gradient(135deg, #ff9a5e, #ee6a4d);
  color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(238, 106, 77, 0.26);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}
.app-dl:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(238, 106, 77, 0.34); filter: brightness(1.03); }
.app-dl:active { transform: translateY(0); }
.app-dl .ic { width: 15px; height: 15px; stroke-width: 2; }

.balance-pill {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(240, 122, 69, 0.1);
  border: 1px solid rgba(240, 122, 69, 0.26);
  color: #cf5f2c; font-size: 12px; white-space: nowrap;
  transition: background 0.18s;
}
.balance-pill:hover { background: rgba(240, 122, 69, 0.17); color: #b94e20; }
.balance-pill strong { color: #a53f14; font-size: 15px; font-variant-numeric: tabular-nums; }

.who { color: var(--muted); font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 图标基础尺寸：未单独指定时统一 16px，避免 SVG 撑满容器 */
.ic { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- 通用卡片 */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.card-pad { padding: 24px; }
.card + .card { margin-top: 18px; }

.section {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-top: 18px;
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  scroll-margin-top: 90px;
}

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 18px; display: flex; align-items: center; gap: 9px; }
.section-head h2 .ic { width: 18px; height: 18px; color: var(--brand-1); }
.section-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.section-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #b06a3c; margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #f0a869, #f07a45); }

/* ---------------------------------------------------------------- 仪表盘 */
.dash {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-top: 4px;
}
.dash-main { padding: 26px; }
.dash-main h1 { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.28; margin-bottom: 8px; }
.dash-main .lede { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.dash-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.meta-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft);
}
.meta-chip .ic { width: 14px; height: 14px; color: var(--brand-1); }
.meta-chip b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }

.balance-card { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.balance-card .label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.08em; }
.balance-card .amount {
  font-size: 38px; font-weight: 720; letter-spacing: -0.02em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; margin: 4px 0 2px;
}
.balance-card .amount small { font-size: 17px; font-weight: 500; color: var(--brand-2); margin-right: 3px; }
.balance-card .sub { font-size: 12.5px; color: var(--muted); }
.balance-card .row { display: flex; gap: 8px; margin-top: 14px; }
.balance-card .row .btn { flex: 1; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  --btn-bg: rgba(255, 255, 255, 0.72);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 560;
  cursor: pointer;
  transition: transform 0.12s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn .ic { width: 16px; height: 16px; }
.btn:hover { background: #fff; border-color: rgba(91, 82, 232, 0.36); color: #2b2a8c; box-shadow: 0 6px 18px rgba(46, 56, 100, 0.1); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover { background: linear-gradient(135deg, #665cf0 0%, #9468fa 62%, #f2854f 155%); color: #fff; box-shadow: 0 14px 32px rgba(91, 82, 232, 0.32); }

.btn-ghost { background: rgba(255, 255, 255, 0.55); color: var(--ink-soft); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: rgba(74, 92, 145, 0.07); color: var(--ink); box-shadow: none; }
.btn-danger { background: rgba(216, 74, 99, 0.08); border-color: rgba(216, 74, 99, 0.28); color: #b93a52; }
.btn-danger:hover { background: rgba(216, 74, 99, 0.14); border-color: rgba(216, 74, 99, 0.45); color: #a32e45; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- 标签页 */
.tabs {
  display: flex; gap: 6px; padding: 5px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 18px 0 0;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 9px 18px; border-radius: 10px; font-size: 14px; color: var(--muted);
  white-space: nowrap; transition: background 0.18s, color 0.18s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: #fff; color: #3b33c9; box-shadow: 0 2px 10px rgba(46, 56, 100, 0.1), inset 0 0 0 1px rgba(91, 82, 232, 0.16); }
/* 桌面端顶栏已有同名导航，内容区的切换条只在手机端（顶栏导航隐藏时）显示 */
@media (min-width: 981px) { .page-tabs { display: none; } }

/* ---------------------------------------------------------------- 公告 / 提示 */
.announce {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 18px; padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(240, 160, 60, 0.32);
  background: linear-gradient(180deg, rgba(255, 240, 214, 0.92), rgba(255, 246, 231, 0.86));
  position: relative;
}
.announce .ic { width: 17px; height: 17px; color: #c2761b; flex: 0 0 auto; margin-top: 3px; }
.announce-body { color: #7a5119; font-size: 13.5px; line-height: 1.7; word-break: break-word; }
.announce-body strong { color: #5f3d0e; }
.announce .flash-x { color: rgba(122, 81, 25, 0.6); }

.flash {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  box-shadow: 0 8px 22px rgba(46, 56, 100, 0.08);
  font-size: 14px;
  animation: flash-in 0.32s ease-out;
}
.flash p { margin: 0; color: var(--ink); flex: 1; word-break: break-word; }
.flash .ic { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }
.flash-ok { border-color: rgba(18, 133, 95, 0.28); background: #eefaf4; }
.flash-ok .ic { color: var(--ok); }
.flash-err { border-color: rgba(216, 74, 99, 0.28); background: #fdf1f3; }
.flash-err .ic { color: var(--danger); }
.flash-warn { border-color: rgba(184, 115, 10, 0.28); background: #fff8e9; }
.flash-warn .ic { color: var(--warn); }

.flash-x {
  background: none; border: 0; padding: 2px; cursor: pointer;
  color: var(--muted); display: grid; place-items: center; border-radius: 8px;
}
.flash-x:hover { color: var(--ink); background: rgba(74, 92, 145, 0.09); }
.flash-x .ic { width: 16px; height: 16px; }

@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 空状态 */
.empty {
  text-align: center; padding: 38px 16px; color: var(--muted); font-size: 14px;
  border: 1px dashed rgba(74, 92, 145, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.empty .ic { width: 30px; height: 30px; color: rgba(120, 136, 180, 0.55); display: block; margin: 0 auto 10px; }
.empty strong { display: block; color: var(--ink-soft); margin-bottom: 4px; font-weight: 620; }

/* ---------------------------------------------------------------- 课程折叠列表 */
.cfold-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.cfold {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.cfold:hover { border-color: rgba(91, 82, 232, 0.24); }
.cfold[open] {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(91, 82, 232, 0.26);
  box-shadow: 0 12px 30px rgba(46, 56, 100, 0.1);
}

.cfold-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.cfold-head::-webkit-details-marker { display: none; }
.cfold-head::marker { content: ""; }

.cfold-head .ico-letter {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 14px; font-weight: 680;
  background: rgba(91, 82, 232, 0.1); color: #4b43cf;
  border: 1px solid rgba(91, 82, 232, 0.18);
}
.cfold[open] .ico-letter { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(91, 82, 232, 0.28); }

.cfold-head .name { font-size: 15px; font-weight: 640; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfold-head .c-meta { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.cfold-head .c-cnt {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted);
}

.caret {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: var(--muted-2);
  transition: transform 0.2s;
}
.caret .ic, .caret svg { width: 15px; height: 15px; }
.cfold[open] .caret { transform: rotate(90deg); color: var(--brand-1); }

.cfold-body {
  padding: 0 14px 14px;
  background: linear-gradient(180deg, rgba(248, 244, 238, 0.9), rgba(252, 250, 247, 0.5));
  border-top: 1px solid rgba(74, 92, 145, 0.08);
}
.cfold-body .acts { display: flex; flex-direction: column; gap: 8px; }

.cfold-loading, .cfold-empty, .cfold-err {
  padding: 16px 14px; font-size: 13px; color: var(--muted);
  background: rgba(255, 255, 255, 0.6); border-radius: 12px; text-align: center;
}
.cfold-err { color: var(--danger); }
.cfold-loading .spin { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px; border: 2px solid rgba(91, 82, 232, 0.24); border-top-color: var(--brand-1); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 账号切换 / 活动 */
.accounts { display: flex; flex-wrap: wrap; gap: 8px; }
.account {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); color: var(--muted);
}
.account:hover { color: var(--ink); border-color: var(--line-strong); background: #fff; }
.account.on { background: rgba(91, 82, 232, 0.12); border-color: rgba(91, 82, 232, 0.34); color: #3b33c9; box-shadow: inset 0 0 0 1px rgba(91, 82, 232, 0.1); }

/* 账号卡片列表：替代横向滚动表格，手机上始终能看到账号名 */
.acc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.acc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.74);
}
.acc-row.is-off { background: rgba(255, 255, 255, 0.5); border-style: dashed; }
.acc-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.acc-name { font-size: 14.5px; font-weight: 620; color: var(--ink); letter-spacing: 0.01em; }
.acc-row.is-off .acc-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.acc-ops { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.acc-ops form { margin: 0; }
.acc-note {
  flex-basis: 100%; font-size: 12.5px; line-height: 1.55; color: var(--muted);
  background: rgba(74, 92, 145, 0.06); border-radius: 8px; padding: 5px 9px; margin-top: 2px;
}

.acc-warn {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px;
  padding: 11px 14px; border-radius: 12px;
  background: var(--danger-bg); border: 1px solid rgba(216, 74, 99, 0.22);
  color: #b93a52; font-size: 13px; line-height: 1.6;
}
.acc-warn .ic { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }

/* 课程搜索 */
.cs-bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.cs-field { position: relative; flex: 1; display: flex; align-items: center; }
.cs-ico { position: absolute; left: 13px; display: grid; place-items: center; color: var(--muted-2); pointer-events: none; }
.cs-ico .ic { width: 17px; height: 17px; }
.cs-field input[type="search"] {
  width: 100%; padding: 12px 42px 12px 40px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.84);
  font-size: 14px; color: var(--ink); appearance: none;
}
.cs-field input[type="search"]::placeholder { color: var(--muted-2); }
.cs-field input[type="search"]:focus {
  outline: none; background: #fff;
  border-color: rgba(91, 82, 232, 0.45); box-shadow: 0 0 0 3px rgba(91, 82, 232, 0.1);
}
.cs-field input[type="search"]::-webkit-search-cancel-button { display: none; }
.cs-clear {
  position: absolute; right: 8px; width: 26px; height: 26px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(74, 92, 145, 0.08); color: var(--muted); cursor: pointer;
}
.cs-clear .ic { width: 13px; height: 13px; }
.cs-clear:hover { background: rgba(74, 92, 145, 0.16); color: var(--ink); }
.cs-hint { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; flex: 0 0 auto; }
.cs-hint.is-hit { color: var(--brand-1); font-weight: 600; }
.cs-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px 0; font-size: 13.5px; color: var(--muted); }
.cs-empty .ic { width: 18px; height: 18px; }
.cs-empty[hidden] { display: none; }
details.cfold[hidden] { display: none; }

.cfold-err { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.cfold-retry {
  border: 1px solid rgba(216, 74, 99, 0.3); background: #fff; color: var(--danger);
  border-radius: 999px; padding: 4px 13px; font-size: 12.5px; cursor: pointer;
}
.cfold-retry:hover { background: var(--danger-bg); }

@media (max-width: 560px) {
  .acc-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .acc-ops { justify-content: flex-end; }
  .acc-ops .btn { flex: 1; justify-content: center; }
  .cs-bar { flex-direction: column; align-items: stretch; gap: 6px; }
  .cs-hint { text-align: right; }
}

.activities { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.activity {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.18s, background 0.18s;
}
/* 折叠面板内的活动条目：左侧引导线，形成「课程 → 签到」的层级感 */
.cfold-body .activity {
  border-left: 3px solid rgba(240, 122, 69, 0.45);
  background: #fff;
  padding: 12px 14px;
}
.cfold-body .activity.is-done { border-left-color: rgba(18, 133, 95, 0.5); }
.cfold-body .activity.is-ended { border-left-color: rgba(74, 92, 145, 0.22); background: rgba(255, 255, 255, 0.7); }
.activity:hover { border-color: rgba(91, 82, 232, 0.28); background: #fff; }
.activity .a-main { min-width: 0; }
.activity .a-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 5px; }
.activity .a-title strong { font-size: 14.5px; }
.activity .a-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.activity .a-meta .k { color: var(--muted-2); }
.activity form { flex: 0 0 auto; }
.activity .a-end { color: var(--muted-2); font-size: 12.5px; white-space: nowrap; }
.countdown { color: var(--brand-2); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.countdown.soon { color: var(--danger); }

/* ---------------------------------------------------------------- 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; line-height: 1.6; font-weight: 560;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.success { color: #0d7350; background: var(--ok-bg); border-color: rgba(18, 133, 95, 0.22); }
.badge.failed { color: #b93a52; background: var(--danger-bg); border-color: rgba(216, 74, 99, 0.22); }
.badge.pending { color: #94600a; background: var(--warn-bg); border-color: rgba(184, 115, 10, 0.22); }
.badge.info { color: #423bbd; background: rgba(91, 82, 232, 0.1); border-color: rgba(91, 82, 232, 0.22); }
.badge.muted { color: var(--muted); background: rgba(74, 92, 145, 0.07); border-color: var(--line); }

/* ---------------------------------------------------------------- 表格 */
.table-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
th {
  text-align: left; font-weight: 560; font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); text-transform: uppercase;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: rgba(74, 92, 145, 0.05); white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid rgba(74, 92, 145, 0.08); color: var(--ink-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(91, 82, 232, 0.035); }
td .mono, .mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
/* 订单号等长串不换行，交给 .table-wrap 横向滚动，避免行高被撑开 */
td .mono { white-space: nowrap; }
td .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 手机端：签到记录表格改为卡片式，避免横向滚动 */
@media (max-width: 640px) {
  .table-wrap.stack { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .table-wrap.stack table { min-width: 0; }
  .table-wrap.stack table,
  .table-wrap.stack tbody,
  .table-wrap.stack tr,
  .table-wrap.stack td { display: block; width: 100%; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack tbody tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    margin-bottom: 10px;
    padding: 6px 0;
    box-shadow: 0 4px 14px rgba(74, 92, 145, 0.05);
  }
  .table-wrap.stack tbody tr:hover td { background: transparent; }
  .table-wrap.stack td {
    border: 0;
    padding: 7px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    word-break: break-word;
  }
  .table-wrap.stack td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 44px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
  }
  .table-wrap.stack td[data-label] > .row-actions { flex: 1 1 auto; }
  .table-wrap.stack td.empty-cell { display: block; padding: 0; border: 0; }
  .table-wrap.stack td.empty-cell::before { display: none; }
  .table-wrap.stack td.empty-cell > .empty { width: 100%; box-sizing: border-box; }
  /* 空状态行不再套一层卡片边框，只保留内部虚线框 */
  .table-wrap.stack tbody tr:has(td.empty-cell) {
    border: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
  }
}

/* ---------------------------------------------------------------- 表单 */
.field { display: block; margin-bottom: 16px; }
.field > span.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field .hint { display: block; font-size: 12px; color: var(--muted-2); margin-top: 6px; line-height: 1.6; }

input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="email"], input[type="tel"], input:not([type]), select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(74, 92, 145, 0.2);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7691' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
input::placeholder, textarea::placeholder { color: rgba(107, 118, 145, 0.72); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(91, 82, 232, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 82, 232, 0.12);
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: #5b52e8; }

.input-row { display: flex; gap: 10px; }
.input-row > .field { flex: 1; margin-bottom: 0; }
.input-row .btn { flex: 0 0 auto; }

.check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
}
.check input { margin: 0; width: 15px; height: 15px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px; background: rgba(74, 92, 145, 0.16);
  border: 1px solid var(--line-strong); position: relative; transition: background 0.2s;
  flex: 0 0 auto;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(46, 56, 100, 0.25);
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .track { background: rgba(91, 82, 232, 0.62); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid #6f63f0; outline-offset: 2px; }

/* ---------------------------------------------------------------- 金额快选 */
.amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 9px; margin: 12px 0 16px; }
.amount-opt {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 13px 8px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer; text-align: center;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.amount-opt input { position: absolute; opacity: 0; pointer-events: none; }
.amount-opt b { font-size: 19px; font-weight: 680; color: var(--ink); font-variant-numeric: tabular-nums; }
.amount-opt small { font-size: 11px; color: var(--brand-2); margin-top: 2px; min-height: 14px; font-weight: 600; }
.amount-opt:hover { border-color: rgba(91, 82, 232, 0.32); background: #fff; }
.amount-opt:has(input:checked) {
  border-color: rgba(91, 82, 232, 0.55);
  background: rgba(91, 82, 232, 0.09);
  box-shadow: inset 0 0 0 1px rgba(91, 82, 232, 0.18);
}
.amount-opt:has(input:checked) b { color: #342dc0; }

/* ---------------------------------------------------------------- 支付渠道 */
.channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 18px; }
.channels.single { grid-template-columns: 1fr; }
.channel {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.channel input { position: absolute; opacity: 0; pointer-events: none; }
.channel .ch-badge {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #fff;
}
.ch-badge.alipay { background: #1677ff; }
.ch-badge.wechat { background: #07c160; }
.ch-badge.xhp { background: linear-gradient(135deg, #ff9a3d, #ef4b2f); }
.ch-badge.mix { background: linear-gradient(135deg, #07c160, #1677ff); }
.channel .ch-body { min-width: 0; }
.channel .ch-body b { display: block; font-size: 14px; color: var(--ink); font-weight: 620; }
.channel .ch-body small { font-size: 11.5px; color: var(--muted-2); }
.channel:hover { border-color: rgba(91, 82, 232, 0.32); background: #fff; }
.channel:has(input:checked) {
  border-color: rgba(91, 82, 232, 0.5);
  background: rgba(91, 82, 232, 0.08);
  box-shadow: inset 0 0 0 1px rgba(91, 82, 232, 0.2);
}
.channel:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------------------------------------------- 支付订单 */
.pay-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; }
.qr-panel { text-align: center; padding: 22px; }
.qr-box {
  width: 232px; height: 232px; margin: 4px auto 14px;
  border-radius: 18px; background: #fff; padding: 10px;
  display: grid; place-items: center;
  box-shadow: 0 14px 34px rgba(46, 56, 100, 0.16), inset 0 0 0 1px rgba(74, 92, 145, 0.1);
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; display: block; }
.qr-box .qr-fallback { color: #4a5678; font-size: 13px; padding: 10px; }
.pay-amount { font-size: 30px; font-weight: 720; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pay-amount small { font-size: 15px; color: var(--brand-2); font-weight: 600; }
.pay-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pay-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(184, 115, 10, 0.14); animation: pulse 1.6s ease-in-out infinite; }
.pay-status.ok .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 133, 95, 0.14); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* 手机浏览器（非微信）隐藏 PC 二维码，改用「在微信里打开」引导 */
body.in-mobile:not(.in-wechat) .qr-panel.hide-on-mobile-nonwx { display: none; }
body.in-mobile:not(.in-wechat) .pay-grid { grid-template-columns: 1fr; }

/* 支付引导：微信内 / 手机浏览器两套文案 */
.pay-hero {
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(7, 193, 96, 0.1), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(7, 193, 96, 0.24);
  text-align: center;
}
.pay-hero h3 { font-size: 16px; margin-bottom: 6px; }
.pay-hero p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.pay-hero .btn-wx {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px; border-radius: 14px; border: 0;
  background: linear-gradient(135deg, #2fd07c, #07b45a);
  color: #fff; font-size: 15.5px; font-weight: 650;
  box-shadow: 0 12px 26px rgba(7, 180, 90, 0.3);
  cursor: pointer;
}
.pay-hero .btn-wx:hover { background: linear-gradient(135deg, #38dd88, #07a552); color: #fff; }
.pay-hero .btn-wx .ic { width: 19px; height: 19px; }

.pay-guide { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.pay-guide li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13px; color: var(--ink-soft); line-height: 1.6;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.pay-guide .n {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(240, 122, 69, 0.14); color: #c2571f;
  font-size: 11.5px; font-weight: 700;
}

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.kv:first-of-type { border-top: 0; }
.kv .k { color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.kv .v { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; word-break: break-word; flex: 1 1 auto; }
.kv .v.bonus { color: var(--ok); }

/* 待支付：单卡片（金额 + 打开微信支付 + 三步引导） */
.pay-wrap { max-width: 470px; margin: 0 auto; }
.pay-main { text-align: center; }
.pay-label { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; margin: 0; }
.pay-main .pay-amount { font-size: 40px; line-height: 1.15; margin-top: 2px; }
.pay-main .pay-amount small { font-size: 19px; margin-right: 7px; }
.pay-orderno { font-size: 12.8px; color: var(--muted-2); margin: 6px 0 0; word-break: break-all; }
.pay-bonus { font-size: 12.8px; color: var(--ok); margin: 8px 0 0; }
.pay-hint { font-size: 12.5px; color: var(--muted-2); margin: 10px 0 0; }
.qr-box.qr-compact { width: 196px; height: 196px; margin: 16px auto 0; }

.btn-wx {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px; margin-top: 18px;
  border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #2fd07c, #07b45a);
  color: #fff; font-size: 16px; font-weight: 650;
  box-shadow: 0 12px 26px rgba(7, 180, 90, 0.3);
  cursor: pointer; text-decoration: none;
}
.btn-wx:hover { color: #fff; background: linear-gradient(135deg, #38dd88, #07a552); }
.btn-wx .ic { width: 19px; height: 19px; }
.pay-main .pay-guide { text-align: left; margin-top: 18px; }
.pay-main .pay-status { display: flex; justify-content: center; margin-top: 18px; }
.pay-main .btn-block { margin-top: 12px; }
.pay-cancel {
  background: none; border: 0; padding: 6px 4px;
  color: var(--muted-2); font-size: 12.5px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pay-cancel:hover { color: var(--danger); }

/* 待支付面板：单列（微信内）与二维码折叠 */
.pay-grid.pay-single { grid-template-columns: 1fr; max-width: 470px; }
.pay-main { text-align: center; }
.pay-hero.warm {
  background: linear-gradient(160deg, rgba(240, 122, 69, 0.13), rgba(255, 255, 255, 0.72));
  border-color: rgba(240, 122, 69, 0.28);
}
.btn-copy { background: linear-gradient(135deg, #f4a164, #ee6a4d) !important; box-shadow: 0 12px 26px rgba(238, 106, 77, 0.28) !important; }

.qr-fold {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 0 14px;
  text-align: left;
}
.qr-fold summary { cursor: pointer; list-style: none; padding: 12px 0; font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.qr-fold summary::-webkit-details-marker { display: none; }
.qr-fold summary::after { content: "+"; font-size: 16px; }
.qr-fold[open] summary::after { content: "−"; }
.qr-box-inline { margin: 4px auto 16px; }
.qr-box svg { width: 100%; height: auto; display: block; border-radius: 8px; }

/* 支付中转页（paygo.php） */
.paygo-page { max-width: 440px; margin: 0 auto; padding: 7vh 16px 48px; }
.paygo-card { text-align: center; padding: 26px 22px; }
.paygo-card h1 { font-size: 21px; margin-bottom: 6px; }
.paygo-card .kv { text-align: left; }
.paygo-label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 2px; }
.paygo-amount { font-size: 38px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.2; }
.paygo-amount small { font-size: 18px; color: var(--brand-2); margin-right: 3px; }
.paygo-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 12px; }
.paygo-ico.ok { background: rgba(18, 133, 95, 0.12); color: var(--ok); }
.paygo-ico.err { background: var(--danger-bg); color: var(--danger); }
.paygo-ico .ic { width: 26px; height: 26px; }
.paygo-hint { font-size: 12.5px; color: var(--muted-2); margin: 10px 0 0; }
.paygo-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 18px; }
.paygo-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(184, 115, 10, 0.14); animation: pulse 1.6s ease-in-out infinite; }
.paygo-status.ok .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 133, 95, 0.14); animation: none; }
.paygo-card .btn-wx { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 18px; border-radius: 14px; border: 0; background: linear-gradient(135deg, #2fd07c, #07b45a); color: #fff; font-size: 15.5px; font-weight: 650; box-shadow: 0 12px 26px rgba(7, 180, 90, 0.3); }
.paygo-card .btn-wx:hover { color: #fff; background: linear-gradient(135deg, #38dd88, #07a552); }
.paygo-card .pay-guide { text-align: left; }

/* ---------------------------------------------------------------- 登录页 */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.auth-hero .brand-lg { margin-bottom: 16px; }
.brand-lg .brand-mark { width: 50px; height: 50px; border-radius: 15px; }
.brand-lg .brand-text strong { font-size: 19px; }
.auth-hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.24; letter-spacing: -0.02em; margin-bottom: 14px; text-shadow: 0 2px 18px rgba(255, 255, 255, 0.7); }
.auth-hero h1 em {
  font-style: normal;
  background: linear-gradient(115deg, #4d43d8, #9c5cf0 45%, #f0763c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-hero .lede { color: #3f4a68; font-size: 15px; max-width: 30em; margin-bottom: 20px; text-shadow: 0 1px 12px rgba(255, 255, 255, 0.75); }
.auth-panel .card { padding: 28px; background: rgba(255, 255, 255, 0.9); }
.auth-panel h2 { font-size: 20px; margin-bottom: 6px; }
.auth-panel .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--muted-2); text-align: center; line-height: 1.7; }
.pw-wrap { display: block; position: relative; }
.pw-wrap input { padding-right: 62px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font-size: 12px;
  padding: 6px 8px; cursor: pointer; border-radius: 8px;
}
.pw-toggle:hover { color: var(--ink); background: rgba(74, 92, 145, 0.08); }

/* ---------------------------------------------------------------- 流程 / 特性 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; }
.steps li {
  display: flex; gap: 11px; padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}
.steps .step-no {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(91, 82, 232, 0.12); color: #4b43cf;
  font-size: 12px; font-weight: 700;
}
.steps strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.steps p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.55; }

/* 登录页左栏压在明亮插画上，用更实的白色玻璃保证可读性 */
.auth-hero .steps li,
.auth-hero .feature {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(46, 56, 100, 0.1);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
.auth-hero .steps p { color: #5a6580; }
.auth-hero .feature p { color: #5a6580; }
.auth-hero .steps strong,
.auth-hero .feature strong { color: #1e2744; }
.auth-hero .features { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.auth-hero .feature {
  display: grid; grid-template-columns: 34px 1fr; column-gap: 13px; align-items: start;
  padding: 13px 15px;
}
.auth-hero .feature .f-ico { grid-row: span 2; margin-bottom: 0; }
.auth-hero .feature strong { margin-bottom: 1px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.feature {
  padding: 16px; border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}
.feature .f-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(91, 82, 232, 0.1); color: #4b43cf; margin-bottom: 10px;
}
.feature .f-ico .ic { width: 17px; height: 17px; }
.feature strong { display: block; font-size: 14px; margin-bottom: 4px; }
.feature p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.6; }

.faq { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.58); padding: 0 16px;
}
.faq summary {
  cursor: pointer; padding: 13px 0; font-size: 14px; color: var(--ink-soft);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 16px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { font-size: 13px; color: var(--muted); padding-bottom: 13px; margin: 0; line-height: 1.7; }

/* ---------------------------------------------------------------- 弹窗 */
dialog.modal {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
}
dialog.modal::backdrop { background: rgba(28, 34, 60, 0.42); backdrop-filter: blur(4px); }
.modal-in { padding: 22px; }
.modal-in h3 { font-size: 17px; margin-bottom: 6px; }
.modal-in p { font-size: 13.5px; color: var(--muted); }
.modal-detail {
  margin: 14px 0 18px; padding: 12px 14px; border-radius: 12px;
  background: rgba(74, 92, 145, 0.05); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; font-size: 13px;
}
.modal-detail div { display: flex; justify-content: space-between; gap: 12px; }
.modal-detail span { color: var(--muted); }
.modal-detail b { color: var(--ink); font-weight: 620; text-align: right; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ---------------------------------------------------------------- 后台 */
.admin-shell { display: grid; grid-template-columns: 208px 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.admin-nav {
  position: sticky; top: 88px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; gap: 2px;
}
.admin-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--muted); font-size: 13.5px;
}
.admin-nav a .ic { width: 16px; height: 16px; }
.admin-nav a:hover { background: rgba(74, 92, 145, 0.06); color: var(--ink); }
.admin-nav a.on { background: rgba(91, 82, 232, 0.12); color: #3b33c9; box-shadow: inset 0 0 0 1px rgba(91, 82, 232, 0.16); }
.admin-body { min-width: 0; }
.admin-body > .section:first-child, .admin-body > form.section:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  padding: 16px; border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.stat .s-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .s-label .ic { width: 14px; height: 14px; color: var(--brand-1); }
.stat .s-val { font-size: 24px; font-weight: 720; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 4px; }
.stat .s-val small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat .s-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

.user-row {
  padding: 15px 16px; border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  margin-bottom: 10px;
}
.user-row .u-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.user-row .u-name { font-weight: 620; color: var(--ink); font-size: 14.5px; }
.user-row .u-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.user-row .u-meta b { color: var(--ink); font-weight: 620; font-variant-numeric: tabular-nums; }
.u-forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.u-forms form { display: flex; gap: 8px; align-items: center; margin: 0; }
.u-forms input[type="text"], .u-forms input:not([type]) { width: 132px; padding: 8px 11px; font-size: 13px; border-radius: 10px; }
.u-forms .btn { padding: 8px 12px; font-size: 13px; }
.u-del { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(216, 74, 99, 0.22); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
details.u-del > summary { cursor: pointer; font-size: 12.5px; color: #b93a52; list-style: none; }
details.u-del > summary::-webkit-details-marker { display: none; }

.paycfg { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer { margin-top: 44px; }
.auth-page > .site-footer { grid-column: 1 / -1; margin-top: 8px; }
.footer-in { border-top: 1px solid rgba(74, 92, 145, 0.12); padding-top: 20px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink-soft); font-size: 13.5px; }
.footer-brand .mark { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.footer-note { color: var(--muted-2); font-size: 12.5px; margin: 8px 0 4px; }
.footer-meta { color: rgba(139, 148, 171, 0.9); font-size: 11.5px; margin: 10px 0 0; text-align: center; }

/* ---------------------------------------------------------------- 工具类 */
summary.btn { display: inline-flex; list-style: none; cursor: pointer; }
summary.btn::-webkit-details-marker { display: none; }
summary.btn::marker { content: ""; }
details > summary { cursor: pointer; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.tag-note { font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.66); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.65; }

/* ---------------------------------------------------------------- 实时签到雷达 */
.live-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 133, 95, 0.15);
}
.live-dot.busy { background: var(--brand-1); box-shadow: 0 0 0 4px rgba(91, 82, 232, 0.16); animation: pulse 1.2s ease-in-out infinite; }
.live-dot.err { background: var(--danger); box-shadow: 0 0 0 4px rgba(216, 74, 99, 0.14); }
#live-text { min-width: 0; }
.live-progress { font-size: 12.5px; color: var(--muted-2); }
.live-progress b { color: var(--ink); font-variant-numeric: tabular-nums; }
.live-auto { margin-left: auto; }
.live-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.live-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(240, 122, 69, 0.55);
  background: #fff;
  box-shadow: 0 6px 18px rgba(46, 56, 100, 0.07);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.live-card:hover { border-color: rgba(91, 82, 232, 0.3); box-shadow: 0 10px 26px rgba(46, 56, 100, 0.1); }
.live-card.is-done { border-left-color: rgba(18, 133, 95, 0.5); background: rgba(255, 255, 255, 0.78); }
.live-card.is-done:hover { border-color: var(--line); }
/* 新出现的签到：左侧强调色 + 轻微呼吸高亮，第一眼就能看到 */
.live-card.is-new {
  border-left-color: var(--brand-2);
  border-color: rgba(240, 122, 69, 0.35);
  background: linear-gradient(100deg, rgba(255, 242, 232, 0.95), #fff 55%);
  box-shadow: 0 10px 26px rgba(240, 122, 69, 0.16);
  animation: new-in 0.45s ease-out;
}
.lv-new {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff9457, #ee6a4d);
  color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 10px rgba(238, 106, 77, 0.32);
}
@keyframes new-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lv-main { min-width: 0; }
.lv-course {
  font-size: 12px; color: var(--muted-2); margin-bottom: 3px;
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lv-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-title strong { font-size: 15px; }
.lv-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.lv-meta .k { color: var(--muted-2); }
.live-card form { flex: 0 0 auto; margin: 0; }
.live-empty {
  margin-top: 14px;
  text-align: center; padding: 34px 16px; color: var(--muted); font-size: 14px;
  border: 1px dashed rgba(74, 92, 145, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}
.live-empty .ic { width: 30px; height: 30px; color: rgba(120, 136, 180, 0.55); display: block; margin: 0 auto 10px; }
.live-empty strong { display: block; color: var(--ink-soft); margin-bottom: 4px; font-weight: 620; }

/* ---------------------------------------------------------------- 轻提示 toast */
.toast-box {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%);
  z-index: 120;
  display: flex; flex-direction: column; gap: 8px;
  width: min(430px, calc(100vw - 28px));
  pointer-events: none;
}
.toast {
  pointer-events: auto; cursor: pointer;
  padding: 12px 16px; border-radius: 13px;
  background: rgba(30, 39, 68, 0.95); color: #fff;
  font-size: 13.5px; line-height: 1.55; word-break: break-word;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: rgba(18, 133, 95, 0.96); }
.toast-err { background: rgba(198, 52, 78, 0.97); }
.toast-warn { background: rgba(160, 105, 15, 0.97); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .admin-nav a { white-space: nowrap; padding: 8px 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pay-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; gap: 20px; padding-top: 26px; padding-bottom: 34px; }
  .auth-hero .brand-lg { margin-bottom: 14px; }
  .auth-hero h1 { font-size: 25px; margin-bottom: 8px; }
  .auth-hero .lede { font-size: 13.5px; margin-bottom: 0; }
  /* 移动端优先展示登录表单，隐藏营销内容 */
  .auth-hero .steps, .auth-hero .features { display: none; }
  .auth-page > .site-footer { margin-top: 4px; }
}

@media (max-width: 720px) {
  .page { padding: 18px 14px 48px; }
  .topbar-in { padding: 11px 14px; gap: 10px; }
  .topbar-actions { gap: 8px; }
  /* 手机端空间紧张：下载入口收成圆形图标按钮 */
  .app-dl { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .app-dl span { display: none; }
  .app-dl .ic { width: 17px; height: 17px; }
  .topnav { display: none; }
  .who { display: none; }
  .brand-text small { display: none; }
  .topbar-actions .btn-primary { display: none; }
  .cfold-head .c-cnt { font-size: 11.5px; }
  .section { padding: 18px 16px; border-radius: 18px; }
  .dash-main { padding: 18px 16px; }
  /* 手机端首屏要塞进余额和选课，压缩营销文案 */
  .dash-main h1 { font-size: 20px; margin-bottom: 6px; }
  .dash-main .lede { display: none; }
  .dash-meta { gap: 6px; margin-top: 12px; }
  .meta-chip { padding: 6px 9px; font-size: 12px; }
  .balance-card { padding: 18px; }
  .balance-card .amount { font-size: 32px; }
  .cfold-head { padding: 12px 13px; gap: 10px; }
  .cfold-head .name { font-size: 14px; }
  .cfold-body { padding: 0 10px 10px; }
  .activity { flex-direction: column; align-items: stretch; gap: 10px; }
  .activity form .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .qr-box { width: 208px; height: 208px; }
  .auth-panel .card { padding: 20px; }
  .paycfg { grid-template-columns: 1fr; }
  table { min-width: 520px; }
  th, td { padding: 11px 12px; }
  .u-forms { gap: 6px; }
  .topbar-actions .btn-sm { padding: 6px 10px; }
  .live-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .live-card form .btn { width: 100%; }
  .live-auto { margin-left: 0; }
  .live-status { font-size: 12.5px; padding: 10px 12px; }
  .page { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 420px) {
  .amounts { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; }
  .balance-pill span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
