/* ===================================================================
   老猫资料网 · 设计系统
   =================================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-flex: "Roboto Flex", "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
}

body[data-theme="day"] {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-elev: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --border: rgba(0, 0, 0, 0.08);
  --border-soft: rgba(0, 0, 0, 0.05);
  --accent: #5a5bd6;
  --accent-soft: rgba(90, 91, 214, 0.1);
  --ink: #111113;
  --ink-text: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.12);
  --ok: #2f9e63;
  --warn: #d97706;
  --bad: #d94f4f;
}

body[data-theme="night"] {
  --bg: #0a0a0c;
  --bg-soft: #131316;
  --bg-elev: #17171b;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.06);
  --accent: #8a8bff;
  --accent-soft: rgba(138, 139, 255, 0.14);
  --ink: #f5f5f7;
  --ink-text: #111113;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --ok: #3ecf8e;
  --warn: #f0a13c;
  --bad: #f06b6b;
}

body[data-theme="sepia"] {
  --bg: #f4eddd;
  --bg-soft: #ece3cf;
  --bg-elev: #f9f4e7;
  --text: #4a4233;
  --text-2: #7a6f58;
  --text-3: #a3967c;
  --border: rgba(90, 70, 40, 0.14);
  --border-soft: rgba(90, 70, 40, 0.08);
  --accent: #a06a2c;
  --accent-soft: rgba(160, 106, 44, 0.14);
  --ink: #3d3424;
  --ink-text: #f4eddd;
  --shadow: 0 2px 12px rgba(90, 70, 40, 0.08);
  --shadow-lg: 0 18px 48px rgba(90, 70, 40, 0.2);
  --ok: #3e7a4f;
  --warn: #b5721e;
  --bad: #b54a3a;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }

.is-hidden { display: none !important; }

/* ===================================================================
   落地页（第一页）
   =================================================================== */
.landing {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 50;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.landing.leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.landing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -8vh;
  padding: 0 24px;
}

/* 标题 —— Variable Proximity 特效 */
.title {
  font-family: var(--font-flex);
  font-size: clamp(44px, 9vw, 108px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: #111113;
  margin: 0;
  user-select: none;
  white-space: nowrap;
}
.variable-proximity span,
.variable-proximity-en span {
  display: inline-block;
  will-change: font-variation-settings, opacity, transform, filter;
  transition: font-variation-settings 0.08s linear, opacity 0.15s linear,
    filter 0.15s linear, transform 0.15s linear;
}

/* 英文副标题 —— 完整展示可变字重特效 */
.title-en {
  font-family: var(--font-flex);
  font-size: clamp(13px, 1.8vw, 20px);
  font-weight: 400;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: #9a9a9f;
  margin: 22px 0 0;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

/* 胶囊按钮 —— 灵动岛 */
.pill {
  position: relative;
  margin-top: clamp(48px, 8vh, 84px);
  height: 56px;
  padding: 0 30px 0 32px;
  border: none;
  border-radius: 999px;
  background: #111113;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.5s var(--ease-out), height 0.5s var(--ease-out),
    padding 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    background 0.4s ease;
  overflow: hidden;
  outline: none;
}
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 30% 0%, rgba(255, 255, 255, 0.28), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}
.pill:hover::after { opacity: 1; }
.pill:hover {
  transform: translateY(-2px);
  height: 62px;
  padding: 0 38px 0 40px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}
.pill:active { transform: translateY(0) scale(0.98); }
.pill .pill-arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-out);
}
.pill:hover .pill-arrow { transform: translateX(4px); }
.pill.is-zooming {
  transform: scale(24);
  border-radius: 50%;
  opacity: 0;
  transition: transform 0.55s var(--ease-io), border-radius 0.55s var(--ease-io),
    opacity 0.4s ease 0.12s;
}

/* ===================================================================
   主应用（第二页）
   =================================================================== */
.app {
  min-height: 100vh;
  opacity: 1;
  transition: opacity 0.5s var(--ease-out);
}
.app.entering { animation: appIn 0.7s var(--ease-out); }
@keyframes appIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 导航栏 */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 60px;
  padding: 0 28px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-left { min-width: 48px; }
.nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-item {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 10px;
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-item:hover { color: var(--text); background: var(--bg-soft); }
.nav-item.is-active { color: var(--text); font-weight: 700; }
.nav-item.is-active::after { opacity: 0; }
.nav-right {
  display: flex;
  justify-content: flex-end;
  min-width: 48px;
}
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  padding: 0;
}
.nav-avatar:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow);
}
.avatar-dot {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 主内容 */
.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 32px 120px;
}
.view { display: none; }
.view.is-active { display: block; animation: fadeUp 0.5s var(--ease-out); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   首页 · 正文排版
   =================================================================== */
.prose { max-width: 820px; }

/* 首页两栏：左侧正文 + 右侧照片 */
#home-prose { max-width: 1140px; }
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 44px;
  align-items: start;
}
.home-text { max-width: 820px; }
.home-photo { display: flex; flex-direction: column; gap: 20px; }
.home-photo-fig { margin: 0; }
.home-photo-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-photo { max-width: 320px; }
}
.prose .prose-lead {
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
.prose h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.prose .prose-sub {
  color: var(--text-2);
  font-size: 16px;
  margin: 0 0 48px;
}
.prose h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 52px 0 16px;
  padding-top: 4px;
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.prose h2 .num {
  font-family: var(--font-flex);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.prose h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 26px 0 10px;
}
.prose p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--text);
}
.prose p.en {
  color: var(--text-2);
  font-size: 15px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}
.prose strong { font-weight: 700; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 10px; font-size: 16px; }
.prose .divider {
  height: 1px;
  background: var(--border-soft);
  margin: 40px 0;
}

/* ===================================================================
   通用面板 / 卡片 / 题库
   =================================================================== */
.panel-wrap { max-width: 820px; }
.page-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.page-sub { color: var(--text-2); margin: 0 0 40px; font-size: 16px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-head .cnt {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

/* 分类标签 */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cat-tab {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.25s ease;
}
.cat-tab:hover { color: var(--text); border-color: var(--text-3); }
.cat-tab.is-active {
  background: var(--ink);
  color: var(--ink-text);
  border-color: var(--ink);
}

/* 题目卡片 */
.q-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s ease;
}
.q-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-3);
}
.q-card .q-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}
.q-card .q-title {
  font-size: 16.5px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.5;
}
.q-card .q-meta {
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  gap: 14px;
  align-items: center;
}
.q-card .q-meta .done { color: var(--ok); font-weight: 600; }

/* ===================================================================
   刷题弹层
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.25s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 22px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px 34px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--ease-out);
  position: relative;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  transition: all 0.25s ease;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal .m-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.modal .m-title { font-size: 19px; font-weight: 800; margin: 0 0 18px; line-height: 1.5; }
.modal .passage {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 20px 22px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2);
  margin-bottom: 22px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.modal .q-text { font-size: 16px; font-weight: 600; margin-bottom: 18px; line-height: 1.7; white-space: pre-wrap; }
.modal .audio-player {
  width: 100%;
  margin-bottom: 18px;
  border-radius: 10px;
  outline: none;
}
.modal .audio-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: -10px 0 16px;
  letter-spacing: 0.02em;
}
.modal .audio-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal .audio-ref:hover { background: var(--accent); color: #fff; }

/* 听力真题：题目 PDF 入口 + 显示答案 + 答案图 */
.modal .ls-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.modal .ls-actions .audio-ref { margin-bottom: 0; }
.modal .ls-answer {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-elev);
  margin-top: 4px;
}
.modal .ls-answer .ex-label { font-weight: 700; color: var(--accent); display: block; margin-bottom: 10px; }
.modal .ls-answer-img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-elev);
}
.option:hover { border-color: var(--text-3); background: var(--bg-soft); }
.option .opt-key {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  transition: all 0.2s ease;
}
.option .opt-text { font-size: 15px; line-height: 1.6; }
.option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.option.is-selected .opt-key { background: var(--accent); border-color: var(--accent); color: #fff; }
.option.is-correct { border-color: var(--ok); background: rgba(47, 158, 99, 0.09); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.option.is-correct .opt-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.option.is-wrong { border-color: var(--bad); background: rgba(217, 79, 79, 0.09); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.option.is-wrong .opt-key { background: var(--bad); border-color: var(--bad); color: #fff; }
.option.is-locked { pointer-events: none; }

.practice-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background 0.25s ease, opacity 0.25s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--ink); color: var(--ink-text); }
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-accent { background: var(--accent); color: #fff; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 10px; }

.explain {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  font-size: 15px;
  line-height: 1.75;
}
.explain .ex-label { font-weight: 700; color: var(--accent); display: block; margin-bottom: 6px; }
.model-text {
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--bg-soft);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.model-text .ex-label { font-weight: 700; color: var(--accent); display: block; margin-bottom: 8px; }

/* 通知卡 */
.notice-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 14px;
}
.notice-card .n-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.notice-card h3 { margin: 8px 0 8px; font-size: 17px; font-weight: 700; }
.notice-card p { margin: 0; color: var(--text-2); font-size: 15px; }

/* ===================================================================
   主题页
   =================================================================== */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  transition: all 0.3s var(--ease-out);
  text-align: left;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.theme-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-swatch {
  width: 100%;
  height: 70px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.swatch-day { background: linear-gradient(160deg, #fff, #eef0f3); }
.swatch-night { background: linear-gradient(160deg, #0b0b0e, #1c1c22); }
.swatch-sepia { background: linear-gradient(160deg, #f7f0e0, #e8d9bd); }
.theme-name { font-size: 16px; font-weight: 700; }
.theme-desc { font-size: 13px; color: var(--text-3); }

/* ===================================================================
   个人中心
   =================================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .profile-grid { grid-template-columns: 1fr; }
  .pc-card { height: 70svh !important; max-height: 460px !important; }
}
.auth-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
}
.auth-panel h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.auth-panel .auth-sub { color: var(--text-2); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.auth-switch { text-align: center; margin-top: 8px; font-size: 14px; color: var(--text-2); }
.auth-switch button {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  padding: 0;
}
.link-mini {
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  padding: 0;
  margin-top: 12px;
  text-decoration: underline;
}
.link-mini:hover { color: var(--accent); }

/* 图形点击人机验证 */
.captcha-wrap { margin-top: 4px; }
.captcha-shape {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-soft);
}
.captcha-shape-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cap-hint-label { font-size: 13px; color: var(--text-2); }
.cap-seq { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cap-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.cap-seq .cap-arrow { color: var(--text-2); font-size: 13px; }
.captcha-shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cap-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 8px;
}
.cap-cell svg { width: 64%; height: 64%; pointer-events: none; }
.cap-cell svg * { fill: currentColor; }
.cap-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
.cap-cell.is-picked { background: var(--accent); color: #fff; border-color: var(--accent); }
.captcha-shape-status { margin-top: 12px; font-size: 13px; color: var(--text-2); text-align: center; }
.captcha-shape-status.is-ok { color: var(--ok); font-weight: 700; }
.captcha-shape.is-ok { border-color: var(--ok); }
.captcha-shape.is-error { border-color: var(--bad); animation: cap-shake 0.4s; }
@keyframes cap-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ===================================================================
   个人资料卡（Holo Card · 逢考必过）
   以下代码基于桌面「个人资料卡css代码」适配
   =================================================================== */
.pc-card-root {
  --pointer-x: 50%;
  --pointer-y: 50%;
  --pointer-from-center: 0;
  --pointer-from-top: 0.5;
  --pointer-from-left: 0.5;
  --card-opacity: 0;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --background-x: 50%;
  --background-y: 50%;
  --grain: none;
  --icon: none;
  --behind-gradient: none;
  --behind-glow-color: rgba(125, 190, 255, 0.67);
  --behind-glow-size: 50%;
  --inner-gradient: linear-gradient(145deg, rgba(96, 73, 110, 0.55) 0%, rgba(113, 196, 255, 0.27) 100%);
  --sunpillar-1: hsl(2, 100%, 73%);
  --sunpillar-2: hsl(53, 100%, 69%);
  --sunpillar-3: hsl(93, 100%, 69%);
  --sunpillar-4: hsl(176, 100%, 76%);
  --sunpillar-5: hsl(228, 100%, 74%);
  --sunpillar-6: hsl(283, 100%, 73%);
  --sunpillar-clr-1: var(--sunpillar-1);
  --sunpillar-clr-2: var(--sunpillar-2);
  --sunpillar-clr-3: var(--sunpillar-3);
  --sunpillar-clr-4: var(--sunpillar-4);
  --sunpillar-clr-5: var(--sunpillar-5);
  --sunpillar-clr-6: var(--sunpillar-6);
  --card-radius: 30px;
  width: 100%;
}
.pc-card-wrapper {
  perspective: 500px;
  transform: translate3d(0, 0, 0.1px);
  position: relative;
  touch-action: none;
}
.pc-behind {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--pointer-x) var(--pointer-y),
    var(--behind-glow-color) 0%,
    transparent var(--behind-glow-size)
  );
  filter: blur(50px) saturate(1.1);
  opacity: calc(0.8 * var(--card-opacity));
  transition: opacity 200ms ease;
}
.pc-card-wrapper:hover,
.pc-card-wrapper.active { --card-opacity: 1; }
.pc-card {
  height: 80svh;
  max-height: 540px;
  display: grid;
  aspect-ratio: 0.718;
  border-radius: var(--card-radius);
  position: relative;
  background-blend-mode: color-dodge, normal, normal, normal;
  animation: pc-glow-bg 12s linear infinite;
  box-shadow: rgba(0, 0, 0, 0.8) calc((var(--pointer-from-left) * 10px) - 3px)
    calc((var(--pointer-from-top) * 20px) - 6px) 20px -5px;
  transition: transform 1s ease;
  transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  background: rgba(0, 0, 0, 0.9);
  backface-visibility: hidden;
  overflow: hidden;
  margin: 0 auto;
}
.pc-card:hover,
.pc-card.active {
  transition: none;
  transform: translateZ(0) rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
}
.pc-card-shell { position: relative; z-index: 1; }
.pc-card-shell.entering .pc-card { transition: transform 180ms ease-out; }
.pc-inside {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--card-radius);
  background-color: rgba(0, 0, 0, 0.88);
  background-image: var(--inner-gradient);
  pointer-events: none;
}
/* 大面积整体反光：一道随鼠标移动的大片柔光 + 贯穿整卡的斜向高光 */
.pc-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(120% 90% at var(--pointer-x) var(--pointer-y),
      rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08) 45%, transparent 62%),
    linear-gradient(115deg,
      transparent 26%, rgba(255, 255, 255, 0.12) 44%,
      rgba(255, 255, 255, 0.24) 50%, rgba(255, 255, 255, 0.10) 56%, transparent 74%);
}
/* 大面积虹彩反光：整卡铺开的彩虹渐层 */
.pc-glare {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  background: linear-gradient(135deg,
    hsla(2, 100%, 73%, 0.22), hsla(53, 100%, 69%, 0.16), hsla(93, 100%, 69%, 0.14),
    hsla(176, 100%, 76%, 0.16), hsla(228, 100%, 74%, 0.24), hsla(283, 100%, 73%, 0.24));
}
.pc-motto {
  position: absolute;
  display: block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translate3d(0, 0, 2px);
  z-index: 6;
  pointer-events: none;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background-image: linear-gradient(to bottom, #fff, #8f8fd8);
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.pc-user-info {
  position: absolute;
  --ui-inset: 20px;
  --ui-radius-bias: 6px;
  bottom: var(--ui-inset);
  left: var(--ui-inset);
  right: var(--ui-inset);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(max(0px, var(--card-radius) - var(--ui-inset) + var(--ui-radius-bias)));
  padding: 12px 14px;
  pointer-events: auto;
}
.pc-user-details { display: flex; align-items: center; gap: 12px; }
.pc-mini-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(160deg, #5a5bd6, #a86bd6);
}
.pc-user-text { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; }
.pc-handle { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.95); line-height: 1; }
.pc-status { font-size: 13px; color: rgba(255, 255, 255, 0.7); line-height: 1.2; }
.pc-contact-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  background: transparent;
}
.pc-contact-btn:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-1px); }
@keyframes pc-glow-bg { 0% { --bgrotate: 0deg; } 100% { --bgrotate: 360deg; } }
@keyframes pc-holo-bg {
  0% { background-position: 0 var(--background-y), 0 0, center; }
  100% { background-position: 0 var(--background-y), 90% 90%, center; }
}

/* 资料列表（个人中心） */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.stat {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.stat .v { font-size: 22px; font-weight: 800; font-family: var(--font-flex); }
.stat .k { font-size: 12px; color: var(--text-2); margin-top: 4px; letter-spacing: 0.04em; }

.info-list { margin-top: 18px; }
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14.5px;
}
.info-row .k { color: var(--text-2); }
.info-row .v { font-weight: 600; text-align: right; }

/* 后台上传 */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: var(--ink-text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.upload-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  min-height: 90px;
  outline: none;
}
.upload-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt-editor { display: flex; flex-direction: column; gap: 8px; }
.opt-editor input { flex: 1; }

/* Toast */
.toast-root {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.toast {
  background: var(--ink);
  color: var(--ink-text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--ease-out);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty .e-icon { font-size: 40px; display: block; margin-bottom: 14px; }

/* 响应式 */
@media (max-width: 640px) {
  .nav { padding: 0 14px; }
  .nav-item { padding: 8px 10px; font-size: 13.5px; }
  .main { padding: 32px 18px 100px; }
  .modal { padding: 24px 20px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

/* ===================================================================
   客服悬浮窗 / 悬浮球
   =================================================================== */
.cs-ball {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  background: radial-gradient(circle at 32% 28%, #f6b052 0%, #e07b3a 58%, #cf6a2c 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(190, 100, 40, 0.34), inset 0 -2px 4px rgba(0, 0, 0, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  z-index: 70;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
  touch-action: none;
}
.cs-ball:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(190, 100, 40, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.45); }
.cs-ball:active { transform: translateY(0) scale(0.97); }
.cs-ball svg { width: 30px; height: 30px; display: block; }
.cs-ball .cs-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(255, 77, 79, 0.5);
}

.cs-window {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 340px;
  max-width: calc(100vw - 24px);
  height: 470px;
  max-height: calc(100vh - 40px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: csIn 0.35s var(--ease-out);
}
@keyframes csIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #f3a251 0%, #e07b3a 60%, #d9702f 100%);
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cs-header .cs-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.cs-header .cs-name {
  flex: 1;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-header .cs-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  display: block;
}
.cs-iconbtn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.cs-iconbtn:hover { background: rgba(0, 0, 0, 0.18); }
.cs-iconbtn svg { width: 17px; height: 17px; }
.cs-close { font-size: 18px; line-height: 1; }

.cs-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-soft);
}
.cs-msg {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  animation: csMsgIn 0.3s var(--ease-out);
}
@keyframes csMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cs-msg.teacher {
  align-self: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  color: var(--text);
}
.cs-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #ec9552, #d9702f);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.cs-msg .cs-hl {
  color: #e53e3e;
  font-weight: 700;
}
.cs-msg.user .cs-hl { color: #fff2f0; }

.cs-typing {
  align-self: flex-start;
  padding: 8px 13px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 5px;
  font-size: 12.5px;
  color: var(--text-3);
  animation: csMsgIn 0.3s var(--ease-out);
}

.cs-input {
  display: flex;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.cs-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.2s ease;
}
.cs-input input:focus { border-color: var(--accent); }
.cs-send {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #ec9552, #d9702f);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}
.cs-send:hover { transform: translateY(-1px); }
.cs-send:active { transform: scale(0.96); }

@media (max-width: 640px) {
  .cs-window { right: 12px; bottom: 12px; }
  .cs-ball { right: 12px; bottom: 12px; }
}

/* ===================================================================
   努力值 / 签到 / 兑换中心 / 核销
   =================================================================== */
.effort-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f6b052, #e07b3a);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(190, 100, 40, 0.28);
}
.effort-pill b { font-size: 18px; font-weight: 800; }

.checkin-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.ck-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--text-2);
  cursor: default;
}
.ck-day .ck-w { font-size: 11px; color: var(--text-3); }
.ck-day .ck-label { font-weight: 700; color: var(--text); }
.ck-day .ck-mark { font-size: 12px; font-weight: 700; }
.ck-day.is-done { background: var(--accent-soft); border-color: var(--accent); }
.ck-day.is-done .ck-mark { color: var(--accent); }
.ck-day.is-today { border-color: var(--accent); background: var(--bg-elev); }
.ck-day.is-today .ck-mark { color: var(--accent); }
button.ck-day.is-makeup {
  cursor: pointer;
  border-color: var(--accent);
  background: var(--bg-elev);
  transition: transform 0.15s var(--ease-out), background 0.15s ease;
}
button.ck-day.is-makeup:hover { background: var(--accent-soft); transform: translateY(-1px); }
button.ck-day.is-makeup .ck-mark { color: var(--accent); }

.ex-gift {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.ex-gift-img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.ex-gift-body h2 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.ex-gift-desc { color: var(--text-2); font-size: 14px; margin: 0 0 16px; line-height: 1.7; }
.ex-gift-cost { font-size: 15px; color: var(--text-2); margin-bottom: 14px; }
.ex-gift-cost b { color: #e07b3a; font-size: 20px; }
.ex-code {
  font-family: var(--font-flex), monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 12px 16px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  word-break: break-all;
  margin-top: 6px;
}
.ex-record {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
  margin-bottom: 12px;
}
.ex-record .ex-code { margin: 0 0 12px; font-size: 15px; }
.ex-record-actions { display: flex; gap: 10px; }
.empty-mini { font-size: 13px; color: var(--text-3); padding: 8px 0; }

.hexiao-box {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.hexiao-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 14px;
  border: 1px solid var(--border);
}

@media (max-width: 720px) {
  .ex-gift { grid-template-columns: 1fr; }
  .checkin-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ===================================================================
   手机端自适应（底部标签栏 / 抽屉弹窗 / 触控优化）
   追加在文件末尾，保证优先级高于前面的桌面样式
   =================================================================== */
@media (max-width: 720px) {
  /* 顶部导航 → 固定底部标签栏 */
  .nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: auto;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-soft);
    border-bottom: none;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
  }
  .nav-left { display: none; }
  .nav-center {
    flex: 1;
    gap: 2px;
    justify-content: space-around;
  }
  .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 50px;
    padding: 6px 2px;
    font-size: 11.5px;
    letter-spacing: 0;
    line-height: 1.1;
    white-space: nowrap;
    border-radius: 10px;
  }
  .nav-item::before { font-size: 20px; line-height: 1; }
  .nav-item[data-view="home"]::before { content: "🏠"; }
  .nav-item[data-view="toefl"]::before { content: "📘"; }
  .nav-item[data-view="ielts"]::before { content: "📗"; }
  .nav-item[data-view="exchange"]::before { content: "🎁"; }
  .nav-item[data-view="theme"]::before { content: "🎨"; }
  .nav-right {
    min-width: auto;
    margin-left: 6px;
    align-self: center;
  }
  .nav-avatar { width: 42px; height: 42px; }
  .avatar-dot { font-size: 14px; }

  /* 主内容给底部栏留位 */
  .main { padding-bottom: 108px; }

  /* 客服悬浮球 / 悬浮窗上移，避开底部栏 */
  .cs-ball { right: 12px; bottom: 86px; }
  .cs-window { right: 12px; bottom: 86px; }

  /* 弹窗 → 底部抽屉 */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }
  .modal-close { top: 14px; right: 14px; }

  /* 触控目标加大 */
  .btn { min-height: 46px; }
  .option { padding: 14px; }
  .option .opt-key { width: 26px; height: 26px; }

  /* 长英文 / 长文本防溢出 */
  .modal .passage,
  .modal .q-text,
  .model-text,
  .explain { overflow-wrap: break-word; word-break: break-word; }
}

@media (max-width: 480px) {
  .main { padding: 24px 14px 108px; }
  .theme-grid { grid-template-columns: 1fr; }
  .modal .passage { max-height: 240px; }
  .prose h1 { font-size: 26px; }
}
