/*
Theme Name: AI 智习室 V3
Theme URI: https://aizxs.com
Author: AI 智习室
Author URI: https://aizxs.com
Description: AI 智习室 V3.0 — 高端简约 WordPress 主题，适合 AI 资讯、工具库、课程和会员平台。V3.0 全面升级：登录页重构、底部菜单、SEO/i18n/安全/CSRF/性能/可访问性全面优化。
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aizxs
Tags: one-column, two-columns, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, translation-ready

AI 智习室 WordPress Theme V3 — Modern minimal, warm & premium.
*/

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --bg:      #FAF8F5;
  --surface: #FFFDF9;
  --fg:      #2D2A26;
  --muted:   #8B7355;
  --border:  #E8E2D9;
  --accent:  #C4956A;
  --accent2: #7B9E87;
  --font-display: 'Newsreader', 'Noto Serif SC', Georgia, serif;
  --font-body:    'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow:  0 2px 20px rgba(45,42,38,0.06);
  --shadow-sm: 0 1px 4px rgba(45,42,38,0.06);
  --shadow-md: 0 4px 16px rgba(45,42,38,0.10);
  --nav-height: 64px;
  --bg-dark: #2D2A26;
  --accent-hover: #b8855a;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit; font-size: inherit;
}

/* Selection */
::selection { background: rgba(196,149,106,0.2); color: var(--fg); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─────────────────────────────────────────────
   NAVIGATION — Card Style (温暖亲和)
───────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,245,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex; align-items: center; gap: 20px;
}

/* Logo Card */
.nav-logo-card {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
  flex-shrink: 0; padding: 8px 12px;
  border-radius: 14px; transition: all 0.25s;
}
.nav-logo-card:hover {
  background: rgba(45,42,38,0.06);
  transform: translateY(-1px);
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: var(--fg); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--bg);
  transition: transform 0.25s;
}
.nav-logo-card:hover .nav-logo-icon { transform: rotate(8deg) scale(1.06); }
.nav-logo-info { display: flex; flex-direction: column; }
.nav-logo-name {
  font-size: 15px; font-weight: 700; letter-spacing: 0.3px; line-height: 1.2;
}
.nav-logo-tagline {
  font-size: 11px; color: var(--muted); line-height: 1.2; margin-top: 2px;
}

/* Menu Cards */
.nav-menu-cards { flex: 1; display: flex; align-items: center; justify-content: center; }
.nav-cards-list {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-cards-list li { position: relative; }
.nav-card-item {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 10px;
  text-decoration: none; color: var(--muted);
  font-size: 14px; font-weight: 500;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}
.nav-card-item:hover {
  color: var(--accent);
  background: rgba(196,149,106,0.10);
  border-color: rgba(196,149,106,0.3);
}
.nav-cards-list .current-menu-item > .nav-card-item,
.nav-cards-list .current-menu-parent > .nav-card-item {
  color: var(--accent);
  background: rgba(196,149,106,0.12);
  border-color: rgba(196,149,106,0.35);
  font-weight: 600;
}

/* Dropdown */
.sub-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(45,42,38,0.12);
  z-index: 200;
}
/* Top arrow */
.sub-menu::before {
  content: '';
  position: absolute; top: -9px; left: 20px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--border);
}
.sub-menu::after {
  content: '';
  position: absolute; top: -7px; left: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--surface);
}
.nav-cards-list li:hover > .sub-menu { display: block; }
.sub-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); transition: all 0.15s;
}
.sub-menu a::after {
  content: '';
  width: 0; height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--border);
  transition: border-left-color 0.15s;
}
.sub-menu a:hover { color: var(--accent); background: rgba(196,149,106,0.08); padding-left: 18px; }
.sub-menu a:hover::after { border-left-color: var(--accent); }

/* Auth Card */
.nav-auth-card { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-auth-btn {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13.5px; font-weight: 600;
  padding: 8px 16px; border-radius: 12px;
  transition: all 0.2s ease;
}
.nav-auth-login {
  color: var(--muted); border: 1.5px solid var(--border);
}
.nav-auth-login:hover {
  color: var(--fg); border-color: var(--accent);
  background: rgba(196,149,106,0.06);
}
.nav-auth-start {
  color: var(--bg); background: var(--fg);
  box-shadow: 0 2px 12px rgba(45,42,38,0.15);
}
.nav-auth-start:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,149,106,0.3);
}

/* User Card */
.nav-user-dropdown { position: relative; }
.nav-user-card {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--muted);
  padding: 6px 14px 6px 6px;
  border-radius: 20px; border: 1.5px solid var(--border);
  transition: all 0.2s ease; cursor: pointer;
}
.nav-user-card:hover { border-color: var(--accent); }
.nav-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.nav-user-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-user-name { font-size: 13px; font-weight: 600; }
.nav-dropdown-arrow { transition: transform 0.2s; color: var(--muted); }
.nav-user-dropdown.open .nav-dropdown-arrow { transform: rotate(180deg); }

/* User Dropdown Menu */
.nav-user-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(45,42,38,0.12);
  z-index: 200;
}
/* Top arrow */
.nav-user-menu::before {
  content: '';
  position: absolute; top: -9px; right: 20px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--border);
}
.nav-user-menu::after {
  content: '';
  position: absolute; top: -7px; right: 20px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--surface);
}
.nav-user-dropdown.open .nav-user-menu { display: block; }
.nav-user-menu li { margin: 0; }
.nav-user-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); text-decoration: none;
  transition: all 0.15s;
}
.nav-user-menu a:hover { color: var(--accent); background: rgba(196,149,106,0.08); }

/* Mobile Nav Bar */
.nav-mobile-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(250,248,245,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 58px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}
.nav-mobile-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0;
  padding: 8px 12px; border-radius: 14px;
}
.nav-mobile-logo:hover { background: rgba(45,42,38,0.06); transform: translateY(-1px); }
.nav-mobile-logo-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.nav-mobile-logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.nav-mobile-logo-icon span { font-size: 16px; font-weight: 700; color: var(--fg); }
.nav-mobile-logo-text { display: flex; flex-direction: column; gap: 2px; }
.nav-mobile-logo-name { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; line-height: 1.2; }
.nav-mobile-logo-tagline { font-size: 11px; color: var(--muted); line-height: 1.2; margin-top: 2px; }
.nav-mobile-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-mobile-btn {
  height: 32px; padding: 0 12px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none; border: none;
}
.nav-mobile-btn.btn-login {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(196,149,106,0.3);
}
.nav-mobile-btn.btn-login:hover { background: var(--accent-hover); }
.nav-mobile-btn.btn-member {
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border);
}
.nav-mobile-btn.btn-admin {
  background: #fef2f2; color: #e53e3e;
  border: 1px solid #fecaca;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--fg); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; border-radius: 1px; }
.nav-mobile-toggle {
  display: flex;
  width: 34px; height: 34px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0; transition: background 0.15s; flex-shrink: 0;
}
.nav-mobile-toggle:hover { background: var(--border); }
.nav-mobile-toggle span { display: block; width: 16px; height: 2px; background: var(--fg); border-radius: 1px; }

/* Mobile Nav Drawer */
.mobile-nav-list { list-style: none; padding: 0; margin: 0; }
.mobile-nav-item {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-item:last-child { border-bottom: none; }
.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0 14px 20px; text-decoration: none; color: var(--fg);
  transition: background 0.15s; flex: 1;
}
.mobile-nav-link:hover { background: rgba(45,42,38,0.05); }
.mobile-nav-parent { cursor: pointer; }
.mobile-nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.mobile-nav-title { font-size: 15px; font-weight: 500; flex: 1; }
.mobile-nav-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--muted); display: flex; align-items: center;
  transition: transform 0.2s; flex-shrink: 0; margin-left: auto;
}
.mobile-nav-toggle svg { transition: transform 0.2s; }
.mobile-nav-item.sub-open { background: rgba(45,42,38,0.03); }
.mobile-sub-menu { list-style: none; padding: 0; margin: 0; background: var(--bg); }
.mobile-sub-link { display: block; padding: 12px 20px 12px 56px; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); transition: color 0.15s; }
.mobile-sub-link:hover { color: var(--accent); }

/* ─────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────── */
.container { max-width: 1250px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 32px; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
}
.section-sm {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
}

/* Hero section wrapper */
.hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─────────────────────────────────────────────
   HERO COPILOT — Editorial + AI Terminal
───────────────────────────────────────────── */
.hero-copilot {
  position: relative;
  padding: 130px 0 110px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, #1c1812 0%, #0c0a08 60%, #07060a 100%);
  color: #f5f1e8;
  isolation: isolate;
}

/* ── Background layers ── */
.hero-bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(196,149,106,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.7;
}
.hero-orb-a {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(196,149,106,0.32), transparent 70%);
  top: -180px; right: -100px;
  animation: orbDrift 18s ease-in-out infinite;
}
.hero-orb-b {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(123,158,135,0.22), transparent 70%);
  bottom: -120px; left: -80px;
  animation: orbDrift 22s ease-in-out infinite reverse;
}
.hero-orb-c {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(180,120,90,0.18), transparent 70%);
  top: 40%; left: 45%;
  animation: orbDrift 26s ease-in-out infinite;
}
/* .hero-noise 已移除：之前用 feTurbulence 生成的噪点叠加层颗粒感过重，取消以获得更干净的渐变背景 */

/* ── Container / Grid ── */
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 80px; align-items: center;
}

/* ═══════════════════════════════════════════════
   LEFT — Editorial copy
═══════════════════════════════════════════════ */
.hero-editorial { display: flex; flex-direction: column; }

/* Eyebrow */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  padding: 7px 14px 7px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  animation: heroFadeUp 0.8s 0.05s ease both;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196,149,106,0.15);
  animation: pulseDot 2s ease-in-out infinite;
}
.eyebrow-ver {
  padding-left: 8px; margin-left: 2px;
  border-left: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.4); font-size: 11px;
}

/* Headline */
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 32px 0;
  text-wrap: balance;
  animation: heroFadeUp 0.8s 0.15s ease both;
}
.head-row {
  display: block;
  white-space: nowrap;     /* 每行强制不换行，避免中文在字间断行 */
}

/* 「为你」— 金属铜渐变 + 衬线斜体 + 柔光高亮 */
.head-italic {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(135deg, #F0CFA8 0%, #D8A876 35%, #B8835A 65%, #8B6240 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  padding: 0 4px;
}
.head-italic::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  height: 12px;
  background: linear-gradient(90deg, rgba(229, 185, 136, 0.55), rgba(229, 185, 136, 0));
  border-radius: 6px;
  z-index: -1;
  filter: blur(1.5px);
}

/* 「而不是围观它工作。」— 独立成行 + 实色 + 缩小字号 */
.head-outline {
  color: rgba(255, 255, 255, 0.62);
  font-style: italic;
  font-weight: 500;
  font-size: 0.68em;
  letter-spacing: -0.02em;
  padding-top: 4px;
}

/* Lead */
.hero-lead {
  font-size: 16px; line-height: 1.85;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 0 32px 0;
  animation: heroFadeUp 0.8s 0.25s ease both;
}

/* Values list */
.hero-values {
  display: flex; flex-direction: column; gap: 10px;
  margin: 0 0 36px 0;
  animation: heroFadeUp 0.8s 0.32s ease both;
}
.hv-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: all 0.25s;
}
.hv-item:hover { color: rgba(255,255,255,0.95); padding-left: 6px; }
.hv-item:last-child { border-bottom: none; }
.hv-mark {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  width: 28px;
}
.hv-text b { color: #fff; font-weight: 600; margin-right: 2px; }

/* CTA */
.hero-cta {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 40px;
  animation: heroFadeUp 0.8s 0.4s ease both;
}
.cta-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px;
  background: var(--accent);
  color: #fff;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 8px 24px rgba(196,149,106,0.35);
  transition: all 0.25s ease;
  position: relative; overflow: hidden;
}
.cta-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.cta-primary:hover {
  background: #d4a578;
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 12px 32px rgba(196,149,106,0.5);
}
.cta-primary:hover::before { transform: translateX(100%); }
.cta-line {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s;
}
.cta-line::after {
  content: ""; position: absolute;
  left: 0; bottom: 4px; right: 0; height: 1px;
  background: currentColor;
  transform: scaleX(0.4); transform-origin: left;
  transition: transform 0.3s ease;
}
.cta-line:hover { color: #fff; }
.cta-line:hover::after { transform: scaleX(1); }
.cta-line svg { transition: transform 0.25s; }
.cta-line:hover svg { transform: translateX(3px); }

/* Trust */
.hero-trust {
  display: flex; align-items: center; gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: heroFadeUp 0.8s 0.48s ease both;
}
.trust-num { display: flex; align-items: baseline; gap: 4px; }
.trust-val {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: #fff;
  line-height: 1;
}
.trust-key {
  font-size: 12px; color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
}
.trust-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.12);
}
.trust-pulse {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.pulse-dot {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: #6FCF97;
}
.pulse-dot::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  background: #6FCF97;
  opacity: 0.35;
  animation: pulseRing 1.8s ease-out infinite;
}

/* ═══════════════════════════════════════════════
   RIGHT — AI Terminal
═══════════════════════════════════════════════ */
.hero-terminal-wrap {
  position: relative;
  animation: heroFadeUp 0.9s 0.3s ease both;
}

/* Floating notes */
.float-note {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(20, 18, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.note-1 {
  top: 6%; left: -8%;
  animation: floatY 5s ease-in-out infinite;
}
.note-2 {
  bottom: 8%; right: -6%;
  animation: floatY 5s 1.5s ease-in-out infinite;
}
.note-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.dot-r { background: #EB5757; box-shadow: 0 0 8px #EB5757; }
.dot-g { background: #6FCF97; box-shadow: 0 0 8px #6FCF97; }

/* Terminal box */
.terminal {
  position: relative;
  background: linear-gradient(180deg, #1a1612 0%, #14110d 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(196,149,106,0.08);
  transform: perspective(2000px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.terminal:hover { transform: perspective(2000px) rotateY(0) rotateX(0); }

/* Glow behind terminal */
.terminal::before {
  content: ""; position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, rgba(196,149,106,0.18), transparent 60%);
  z-index: -1;
  filter: blur(40px);
}

/* Title bar */
.term-bar {
  display: flex; align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.term-dots { display: flex; gap: 7px; }
.td {
  width: 11px; height: 11px; border-radius: 50%;
  display: block;
}
.td-r { background: #ff5f57; }
.td-y { background: #febc2e; }
.td-g { background: #28c840; }
.term-title {
  flex: 1; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}
.term-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px;
  color: rgba(111,207,151,0.85);
  font-family: 'SF Mono', 'Monaco', monospace;
}
.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6FCF97;
  box-shadow: 0 0 6px #6FCF97;
  animation: pulseDot 2s ease-in-out infinite;
}

/* Body */
.term-body {
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 18px;
  font-size: 13.5px; line-height: 1.65;
  color: rgba(255,255,255,0.85);
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  min-height: 360px;
}

/* Messages */
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }
.msg-avatar {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.av-u {
  background: linear-gradient(135deg, var(--muted), #5a4a3a);
}
.av-ai {
  background: linear-gradient(135deg, var(--accent), #a87b4f);
  color: #fff;
}

.msg-bubble {
  max-width: calc(100% - 50px);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 14px;
  position: relative;
}
.msg-user .msg-bubble {
  background: rgba(196,149,106,0.12);
  border-color: rgba(196,149,106,0.2);
}
.msg-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-body);
}
.msg-user .msg-name { color: rgba(255,255,255,0.55); }
.msg-text { color: rgba(255,255,255,0.88); }
.msg-text b { color: var(--accent); font-weight: 600; }

/* Inline recommendation card */
.rec-card {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(196,149,106,0.08);
  border: 1px solid rgba(196,149,106,0.18);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: all 0.25s;
}
.rec-card:hover {
  background: rgba(196,149,106,0.15);
  border-color: rgba(196,149,106,0.35);
  transform: translateX(2px);
}
.rec-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.rec-body { flex: 1; min-width: 0; }
.rec-tag {
  font-size: 9px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 2px;
  font-family: var(--font-body);
}
.rec-title {
  font-size: 12.5px; font-weight: 500;
  color: #fff;
  line-height: 1.4;
  font-family: var(--font-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-arrow {
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s;
}
.rec-card:hover .rec-arrow { transform: translateX(3px); }

/* Input bar (fake) */
.term-input {
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  font-family: var(--font-body);
}
.input-prompt {
  color: var(--accent);
  font-weight: 700;
  font-family: 'SF Mono', 'Monaco', monospace;
}
.input-text { flex: 1; }
.input-cursor {
  width: 7px; height: 14px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}

/* Scroll hint */
.hero-scrollhint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: heroFadeUp 1s 0.8s ease both;
}
.sh-line {
  width: 1px; height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}

/* ── Animations ── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes typingCursor {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent); }
}

/* Typing effect */
.typing-target {
  display: inline;
  border-right: 1.5px solid var(--accent);
  padding-right: 2px;
  animation: typingCursor 1s step-end infinite;
}
.typing-target.done { border-right-color: transparent; animation: none; }
.typing-hl { font-weight: 700; color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; padding: 0 36px; }
  .hero-copilot { padding: 110px 0 90px; }
  .hero-terminal-wrap { max-width: 560px; margin: 0 auto; width: 100%; }
  .terminal { transform: none; }
}
@media (max-width: 720px) {
  .hero-copilot { padding: 96px 0 64px; }
  .hero-inner { padding: 0 22px; gap: 44px; }
  .hero-eyebrow { font-size: 11px; padding: 6px 12px; margin-bottom: 28px; letter-spacing: 1.2px; }
  .hero-headline { font-size: clamp(34px, 9vw, 46px); margin-bottom: 22px; line-height: 1.08; letter-spacing: -0.025em; }
  .head-row { white-space: normal; }   /* 小屏允许换行避免溢出 */
  /* 合并前两行："让 AI 真正" + "为你工作," 同一行 */
  .hero-headline .head-row:nth-child(1),
  .hero-headline .head-row:nth-child(2) { display: inline; }
  .hero-headline .head-row:nth-child(3) {
    display: block;
    font-size: 0.62em;
    font-weight: 500;
    margin-top: 0.3em;
  }
  .head-outline { font-size: 0.62em; }
  .hero-lead { font-size: 15px; line-height: 1.75; margin-bottom: 24px; }
  .hero-values { gap: 4px; margin-bottom: 28px; }
  .hv-item { padding: 8px 0; font-size: 13.5px; }
  .hv-mark { width: 24px; font-size: 11px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 32px; }
  .cta-primary { justify-content: center; padding: 14px 24px; }
  .cta-line { justify-content: center; }
  .hero-trust {
    flex-wrap: wrap; gap: 14px 18px;
    padding-top: 20px;
  }
  .trust-sep { display: none; }
  .trust-pulse { margin-left: 0; width: 100%; justify-content: flex-start; }
  .float-note { display: none; }
  .term-body { padding: 18px 16px 14px; font-size: 12.5px; min-height: 300px; }
  .rec-title { font-size: 11.5px; }
  .hero-scrollhint { display: none; }
}
@media (max-width: 420px) {
  .hero-headline { font-size: 34px; line-height: 1.08; }
  .head-outline { font-size: 0.58em; }
  .term-bar { padding: 10px 12px; }
  .term-title span { display: none; }
  .term-title::after { content: "copilot"; }
}

/* ─────────────────────────────────────────────
   Responsive: 480px 以下(主流手机竖屏)
───────────────────────────────────────────── */
@media (max-width: 480px) {
  /* 顶部导航:小屏正常显示 LOGO(品牌名+副标题)+ 登录按钮 + 汉堡 */
  .nav-mobile-bar { padding: 0 12px; height: 52px; }
  .nav-mobile-btn { padding: 0 10px; font-size: 12px; }

  /* Hero 区 */
  .hero-copilot { padding: 76px 0 48px; }
  .hero-inner { padding: 0 14px; gap: 32px; }
  .hero-eyebrow { font-size: 10px; padding: 4px 10px; margin-bottom: 18px; }
  .hero-headline { font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
  .hero-lead { font-size: 13.5px; line-height: 1.65; word-break: break-word; }

  /* CTA 按钮 */
  .hero-cta { gap: 10px; margin-bottom: 24px; }
  .cta-primary, .cta-line { padding: 12px 18px; font-size: 14px; }

  /* Trust 数据 */
  .hero-trust { gap: 8px 14px; padding-top: 16px; }
  .trust-num { font-size: 17px; }
  .trust-key { font-size: 11px; }

  /* 终端容器(关键修复:不再强制 560px) */
  .hero-terminal-wrap { max-width: 100%; width: 100%; }
  .terminal { transform: none !important; }
  .term-body { padding: 14px 12px 12px; font-size: 11.5px; min-height: 280px; gap: 14px; }
  .msg-bubble { max-width: calc(100% - 42px); }
  .msg-avatar { width: 28px; height: 28px; font-size: 11px; }
  .msg-text { word-break: break-word; overflow-wrap: anywhere; }
  .rec-title { font-size: 11px; white-space: normal; line-height: 1.35; }
  .rec-tag { font-size: 8.5px; }
  .term-bar { padding: 10px 12px; }
  .term-title { font-size: 11px; }
  .term-input { padding: 8px 12px; font-size: 11px; }
  .float-note { display: none; }
}

@media (max-width: 360px) {
  .hero-headline { font-size: 24px; }
  .hero-lead { font-size: 12.5px; }
  .hero-copilot { padding: 64px 0 40px; }
  .hero-inner { padding: 0 12px; }
}

/* ─────────────────────────────────────────────
   BUTTONS (keep existing)
───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  background: var(--fg); color: var(--bg);
  font-size: 15px; font-weight: 600;
  padding: 13px 28px; border-radius: 10px;
  transition: all 0.2s ease;
}
.btn-primary:hover { background: var(--accent); color: #fff; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  border: 1.5px solid var(--border); color: var(--fg);
  font-size: 15px; font-weight: 500;
  padding: 12px 28px; border-radius: 10px;
  transition: all 0.2s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   CARD (keep for hero card stack - unused but preserve)
───────────────────────────────────────────── */
.card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; line-height: 1.3; margin-bottom: 6px;
}
.card-meta { font-size: 12px; color: var(--muted); }
.card-tag {
  display: inline-block; margin-top: 10px;
  font-size: 11px; font-weight: 600;
  background: rgba(196,149,106,0.12); color: var(--accent);
  padding: 3px 10px; border-radius: 20px;
}

/* ─────────────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────────────── */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; letter-spacing: -0.5px;
}
.section-more {
  display: flex; align-items: center; gap: 4px;
  text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 500; transition: color 0.2s;
}
.section-more:hover { color: var(--accent); }

/* ─────────────────────────────────────────────
   CATEGORY TABS
───────────────────────────────────────────── */
.cat-tabs {
  display: flex; gap: 6px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0; flex-wrap: wrap;
}
.cat-tab {
  text-decoration: none; color: var(--muted);
  font-size: 14px; font-weight: 500;
  padding: 8px 15px; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all 0.2s;
}
.cat-tab:hover { color: var(--fg); }
.cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-tab {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500;
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface);
  transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filter-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-block; margin-top: 9px; }

.cat-filters { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }

/* ─────────────────────────────────────────────
   CARD GRID
───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* Section Display Styles */

/* Featured (left big, right small) */
.card-featured {
  display: flex; gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.featured-main {
  flex: 2; min-width: 0;
  position: relative; display: block;
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  transition: all 0.3s ease;
}
.featured-main:hover { box-shadow: var(--shadow); transform: scale(1.01); }
.featured-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.featured-main:hover .featured-thumb img { transform: scale(1.05); }
.featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%);
  padding: 60px 24px 24px;
}
.featured-info h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: #fff; margin-bottom: 12px; line-height: 1.3;
}
.featured-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: rgba(255,255,255,0.75);
}
.featured-meta span { display: flex; align-items: center; gap: 4px; }
.featured-meta svg { opacity: 0.7; }

.featured-side {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.featured-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; color: var(--fg); transition: all 0.2s;
  cursor: pointer;
}
.featured-item:hover { border-color: var(--accent); }
.featured-item.active { border-color: var(--accent); background: var(--bg); }
.featured-item-thumb { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.featured-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-item-info { flex: 1; min-width: 0; }
.featured-item-info .item-title {
  font-size: 13px; font-weight: 500; display: block;
  word-wrap: break-word; line-height: 1.4;
}

/* Scroll Style */
.card-scroll {
  display: flex; gap: 20px;
  overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.card-scroll::-webkit-scrollbar { display: none; }
.card-scroll .article-card { flex: 0 0 280px; scroll-snap-align: start; }

/* Course Scroll */
.course-scroll {
  display: flex; gap: 20px;
  overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.course-scroll::-webkit-scrollbar { display: none; }
.course-scroll .course-card { flex: 0 0 300px; scroll-snap-align: start; }

/* List Style */
.card-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.list-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--fg); transition: all 0.2s;
}
.list-item:hover { border-color: var(--accent); transform: translateX(4px); }
.list-thumb { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-info { flex: 1; }
.list-info h4 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.list-date { font-size: 12px; color: var(--muted); }

/* Alternate Style (left-right) */
.card-alternate { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.alt-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px;
  padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--fg); transition: all 0.2s;
}
.alt-item:hover { box-shadow: var(--shadow); }
.alt-item.right { grid-template-columns: 1fr 200px; }
.alt-item.right .alt-thumb { order: 2; }
.alt-item.right .alt-body { order: 1; text-align: right; }
.alt-thumb { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.alt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.alt-body h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.alt-body p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
  display: flex; flex-direction: column;
  min-width: 0;
}
.article-card:hover {
  box-shadow: 0 8px 32px rgba(45,42,38,0.10);
  transform: translateY(-2px);
}
.card-thumb {
  aspect-ratio: 3/2;
  background: var(--border);
  overflow: hidden; position: relative;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.article-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(45,42,38,0.3));
}
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-category {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-category a.cat-tag,
.cat-tag {
  color: var(--accent);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(196,149,106,0.35);
  background: rgba(196,149,106,0.08);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  max-width: 100%;
}
.card-cat-btn {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(196,149,106,0.35);
  background: rgba(196,149,106,0.08);
  transition: all 0.2s;
  white-space: nowrap;
}
.card-cat-btn:hover {
  background: rgba(196,149,106,0.15);
  border-color: var(--accent);
}
.card-title-sm {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600; line-height: 1.4;
  margin-bottom: 8px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-date { font-size: 11.5px; color: var(--muted); }
.card-read-time { font-size: 11.5px; color: var(--muted); margin-left: 10px; }
.card-meta-right { display: flex; align-items: center; gap: 10px; }
.card-views { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.card-likes {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; padding: 4px 8px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

/* Featured article — full width horizontal */
.feat-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  transition: box-shadow 0.25s ease;
}
.feat-article:hover {
  box-shadow: 0 8px 32px rgba(45,42,38,0.10);
}
.feat-thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
}
.feat-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.feat-article:hover .feat-thumb img { transform: scale(1.04); }
.feat-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%);
  opacity: 0.6;
}
.feat-body {
  padding: 40px 44px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0;
}
.feat-cat {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.feat-cat:hover { color: var(--accent-hover); }
.feat-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.feat-cat-btn {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(196,149,106,0.35);
  background: rgba(196,149,106,0.08);
  transition: all 0.2s;
  white-space: nowrap;
}
.feat-cat-btn:hover {
  background: rgba(196,149,106,0.15);
  border-color: var(--accent);
}
.feat-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700; line-height: 1.3;
  letter-spacing: -0.3px; margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feat-title a {
  text-decoration: none; color: var(--fg);
  transition: color 0.2s;
}
.feat-title a:hover { color: var(--accent); }
.feat-excerpt {
  font-size: 15px; color: var(--muted);
  line-height: 1.8; margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.feat-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap;
}
.feat-read-more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto;
  text-decoration: none; color: var(--accent);
  font-weight: 600; font-size: 13px;
  transition: color 0.2s;
}
.feat-read-more:hover { color: var(--accent-hover); }

/* Featured row */
.featured-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.featured-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
  display: grid; grid-template-columns: 120px 1fr;
}
.featured-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.featured-thumb { height: 100%; min-height: 100px; background: var(--border); overflow: hidden; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.featured-body .card-title-sm { font-size: 14px; }
.featured-body .card-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.featured-body .card-date { font-size: 11.5px; color: var(--muted); }

/* ─────────────────────────────────────────────
   TOPIC SCROLL
───────────────────────────────────────────── */
.topic-scroll {
  display: flex; gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.topic-scroll::-webkit-scrollbar { display: none; }
.topic-card {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
}
.topic-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.topic-thumb { height: 140px; background: var(--border); overflow: hidden; }
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover .topic-thumb img { transform: scale(1.04); }
.topic-body { padding: 16px; }
.topic-days {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.topic-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.35; }

/* ─────────────────────────────────────────────
   COURSE CARDS
───────────────────────────────────────────── */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--fg);
  transition: all 0.25s ease;
}
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.course-thumb { height: 0; padding-bottom: 56.25%; background: var(--border); overflow: hidden; position: relative; }
.course-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.course-card:hover .course-thumb img { transform: scale(1.04); }
.course-level {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 12px; letter-spacing: 0.5px;
}
.course-progress-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(0,0,0,0.2);
}
.course-progress-bar { height: 100%; background: var(--accent); }
.course-body { padding: 18px; }
.course-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.course-meta .meta-item { display: flex; align-items: center; gap: 5px; }
.course-meta .meta-item svg { opacity: 0.6; }
.course-lessons-preview { display: flex; gap: 6px; margin-bottom: 10px; }
.lesson-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: var(--muted);
}
.lesson-dot.completed { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.lesson-dot.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.lesson-more { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--muted); }
.course-progress-label { font-size: 11.5px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.progress-bar-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-bar-track.small { height: 3px; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ─────────────────────────────────────────────
   PAGE HERO (Inner pages - different from homepage)
───────────────────────────────────────────── */
.page-hero-section-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #1a1815 0%, #0f0e0c 100%);
  z-index: -1;
}

.page-hero-section {
  background: transparent;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(196,149,106,0.20);
  z-index: 0;
}
.page-hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(196,149,106,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,149,106,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero-section::after {
  content: '';
  position: absolute; top: -150px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(196,149,106,0.12) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

/* Floating orbs - more visible */
.hero-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(40px);
}
.hero-orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(196,149,106,0.20) 0%, transparent 70%);
  top: -120px; left: 5%;
  animation: floatOrb1 6s ease-in-out infinite;
}
.hero-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(123,158,135,0.18) 0%, transparent 70%);
  bottom: -80px; right: 10%;
  animation: floatOrb2 8s ease-in-out infinite;
}
.hero-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(196,149,106,0.15) 0%, transparent 70%);
  top: 30%; left: 60%;
  animation: floatOrb3 5s ease-in-out infinite;
}
@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(30px, 20px) scale(1.1); opacity: 1; }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(-20px, -30px) scale(1.15); opacity: 1; }
}
@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(15px, -25px) scale(1.1); opacity: 0.9; }
}

/* Shimmer line */
.hero-shimmer {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(196,149,106,0.08) 50%, transparent 100%);
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Grid lines overlay */
.hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(196,149,106,0.03) 1px, transparent 1px),
    linear-gradient(rgba(196,149,106,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.hero-section-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
}
.hero-section-content {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px;
}
.hero-section-left {}
.hero-section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.hero-section-eyebrow svg { width: 14px; height: 14px; }
.hero-section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px); font-weight: 700;
  color: #fff; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 12px;
}
.hero-section-desc, p.hero-section-desc {
  font-size: 15px; color: rgba(255,255,255,0.75);
  max-width: 480px; line-height: 1.7;
}
.hero-section-stats {
  display: flex; gap: 16px; flex-shrink: 0;
}
.hero-section-stat {
  text-align: center; padding: 16px 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.hero-section-stat-num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; color: #fff;
}
.hero-section-stat-label {
  font-size: 11px; color: rgba(255,255,255,0.45);
  margin-top: 4px; letter-spacing: 0.5px;
}

/* Hero bottom fade to content */
.content-after-hero {
  padding-top: 32px !important;
}

/* Responsive */
@media (max-width: 768px) {
  .page-hero-section { padding: 72px 0 72px; }
  .content-after-hero { padding-top: 24px !important; }
  .hero-section-content { flex-direction: column; align-items: flex-start; }
  .hero-section-stats { width: 100%; gap: 12px; flex-wrap: wrap; }
  .hero-section-stat { flex: 1; min-width: calc(50% - 6px); padding: 12px 16px; }
}

/* ─────────────────────────────────────────────
   PAGE HEADER (Archive pages)
───────────────────────────────────────────── */
.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}
.page-breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.page-breadcrumb a { color: var(--muted); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb span { margin: 0 8px; }
.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.5px;
}
.page-desc { font-size: 15px; color: var(--muted); max-width: 560px; margin-top: 12px; line-height: 1.7; }
.page-stats { display: flex; gap: 32px; align-items: center; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────────────────────────
   ARTICLE DETAIL
───────────────────────────────────────────── */
article {
  min-width: 0;
  width: 100%;
}
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 60px;
  max-width: 1200px; margin: 0 auto; padding: 48px 32px 64px;
}
.article-header { padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.article-breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.article-breadcrumb a { color: var(--muted); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb span { margin: 0 8px; }
.article-category {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px; display: inline-block;
  text-decoration: none;
}
.article-category:hover { color: var(--accent-hover); }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  line-height: 1.18; letter-spacing: -0.5px; margin-bottom: 18px;
}
.article-deck { font-size: 18px; color: var(--muted); line-height: 1.7; margin-bottom: 24px; }
.article-meta {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0; flex-wrap: wrap;
}
.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.author-name { font-size: 14px; font-weight: 600; }
.author-role { font-size: 11.5px; color: var(--muted); }
.meta-sep { width: 1px; height: 20px; background: var(--border); }
.meta-item { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.article-hero {
  width: 100%;
  margin: 0 0 12px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--border);
}
.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: center center;
}
.article-caption { font-size: 12px; color: var(--muted); margin-bottom: 40px; text-align: center; }

/* Reading progress */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--accent); width: 0%; z-index: 9999;
  transition: width 0.1s linear;
}

/* Article body */
.article-body {
  font-size: 16.5px; line-height: 1.85;
  overflow-x: auto;
  max-width: 100%;
}
.article-body img { max-width: 100%; height: auto; display: block; margin: 1.5em auto; border-radius: 10px; }

/* Article Breadcrumb */
.article-breadcrumb-single {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.article-breadcrumb-single a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb-single a:hover {
  color: var(--accent);
}
.article-breadcrumb-single svg {
  color: var(--border);
  flex-shrink: 0;
}
.article-breadcrumb-single span {
  color: var(--fg);
  font-weight: 500;
}
.article-body table {
  width: 100%; max-width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  white-space: nowrap;
}
.article-body table::-webkit-scrollbar { height: 4px; }
.article-body table::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.article-body table th,
.article-body table td {
  padding: 10px 14px; border: 1px solid var(--border);
  text-align: left; font-size: 14px;
}
.article-body table th { background: var(--bg); font-weight: 600; }
.article-body table tr:nth-child(even) td { background: rgba(250,248,245,0.5); }
.article-body h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  margin: 2em 0 0.8em; letter-spacing: -0.3px;
}
.article-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 1.6em 0 0.6em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent-hover); }
.article-body ul, .article-body ol { margin: 1.2em 0 1.5em 1.5em; }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote {
  margin: 1.5em 0; padding: 16px 20px;
  background: var(--surface); border-radius: 10px;
  border: 1px solid var(--border); font-style: italic; color: var(--muted);
}
.article-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em; background: rgba(45,42,38,0.06); padding: 2px 6px; border-radius: 4px;
}

/* Pull quote */
.pull-quote {
  margin: 2em 0; padding: 24px 28px;
  border-inline-start: 3px solid var(--accent);
  background: rgba(196,149,106,0.06); border-radius: 0 12px 12px 0;
}
.pull-quote p {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  font-style: italic; line-height: 1.6; margin-bottom: 0;
}
.pull-quote cite { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); font-style: normal; }

/* Figure */
.article-figure { margin: 2em 0; border-radius: 12px; overflow: visible; }
.article-figure img { max-width: 100%; width: 100%; border-radius: 12px; }
.article-figure figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 8px; }

/* Article tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-tags span { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.tag-item {
  text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 500;
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); transition: all 0.2s;
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* Article Actions */
.article-actions {
  display: flex; gap: 8px; margin-top: 32px; padding-top: 28px;
  border-top: 1px solid var(--border); position: relative; flex-wrap: wrap;
}
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.action-btn.liked, .action-btn.favorited { color: #e74c3c; border-color: #e74c3c; background: #fdf0ef; }
.action-btn svg { flex-shrink: 0; }
.action-count { min-width: 20px; text-align: center; }

/* Share dropdown */
.share-dropdown {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 10; min-width: 140px;
}
.share-dropdown.show { display: block; }
.share-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px;
  border: none; background: none; color: var(--fg); font-size: 13.5px; cursor: pointer;
  border-radius: 8px; transition: background 0.15s;
}
.share-item:hover { background: var(--hover); }

/* WeChat QR Modal */
.wechat-qr-modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 9999; align-items: center; justify-content: center;
}
.wechat-qr-modal.show { display: flex; }
.wechat-qr-box {
  background: var(--surface); border-radius: 16px; padding: 32px; text-align: center;
  max-width: 320px; position: relative; animation: fadeUp 0.3s ease;
}
.wechat-qr-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px; line-height: 1;
}
.wechat-qr-close:hover { color: var(--fg); }
.wechat-qr-box h3 { font-size: 18px; margin-bottom: 8px; }
.wechat-qr-box > p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.wechat-qr-box img { width: 200px; height: 200px; border-radius: 8px; }
.wechat-tip { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* Author box */
.author-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  display: flex; gap: 20px; margin-top: 40px; align-items: flex-start;
}
.author-box-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.author-box-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.author-box-info h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.author-box-info p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.author-box-social { display: flex; gap: 10px; }
.author-box-social a {
  font-size: 12px; color: var(--muted); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 20px; transition: all 0.2s;
}
.author-box-social a:hover { border-color: var(--accent); color: var(--accent); }

/* Related */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); margin-top: 48px; }
.related-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--fg);
  transition: all 0.2s;
}
.related-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.related-thumb { height: 100px; background: var(--border); overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-body { padding: 12px; }
.related-body .card-title-sm { font-size: 13.5px; margin-bottom: 0; }
.related-body .card-date { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--nav-height) + 24px); height: fit-content; min-width: 0; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.sidebar-widget h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* TOC */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 10px; }
.toc-list a {
  text-decoration: none; color: var(--muted); font-size: 13.5px; line-height: 1.5;
  display: block; padding: 4px 0; padding-inline-start: 12px;
  border-inline-start: 2px solid transparent; transition: all 0.2s;
}
.toc-list a:hover, .toc-list a.active { color: var(--accent); border-inline-start-color: var(--accent); }
.toc-list .toc-h3 { font-size: 13px; padding-inline-start: 0; }

/* Popular list */
.popular-list { list-style: none; }
.popular-list li { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.popular-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--border); line-height: 1; min-width: 28px; }
.popular-list a { text-decoration: none; color: var(--fg); font-size: 13.5px; line-height: 1.5; font-weight: 500; }
.popular-list a:hover { color: var(--accent); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Course CTA widget */
.sidebar-course { background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%) !important; color: var(--bg); border: none !important; }
.sidebar-course h3 { color: var(--bg); border-bottom-color: rgba(250,248,245,0.15); }
.sidebar-course p { font-size: 13px; color: rgba(250,248,245,0.65); margin-bottom: 16px; line-height: 1.6; }
.sidebar-course .btn-course {
  display: block; text-align: center; background: var(--accent); color: #fff;
  text-decoration: none; padding: 11px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background 0.2s;
}
.sidebar-course .btn-course:hover { background: var(--accent-hover); }

/* ─────────────────────────────────────────────
   COURSE SYSTEM STYLES
───────────────────────────────────────────── */

/* Course Video Player */
.course-video-player {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}
.course-video-player video,
.course-video-player iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.course-video-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.video-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  transition: all 0.2s;
}
.video-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.video-nav-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.video-nav-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

/* Course Lesson Content (图文课程) */
.course-lesson-content {
  margin-bottom: 40px;
}
.course-lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.course-lesson-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}
.course-lesson-duration {
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 13px;
  color: var(--muted);
}
.course-lesson-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--fg);
}
.course-lesson-body p { margin-bottom: 16px; }
.course-lesson-body h2, .course-lesson-body h3 {
  font-family: var(--font-display);
  margin: 32px 0 16px;
}
.course-lesson-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 16px 0;
}
.course-lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.lesson-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  transition: all 0.2s;
  max-width: 45%;
}
.lesson-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lesson-nav-btn.next {
  margin-left: auto;
}
.course-no-content {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* Course Lesson List */
.course-lesson-list {
  margin: 40px 0;
}
.lesson-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.lesson-list-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.lesson-list-count {
  font-size: 13px;
  color: var(--muted);
}
.lesson-list-items {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: background 0.2s;
}
.lesson-item:last-child { border-bottom: none; }
.lesson-item:hover { background: var(--surface); }
.lesson-item.current {
  background: rgba(196,149,106,0.08);
  border-left: 3px solid var(--accent);
}
.lesson-item.completed { opacity: 0.7; }
.lesson-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.lesson-item-num {
  width: 28px;
  height: 28px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.lesson-item.completed .lesson-item-num {
  background: var(--accent2);
  color: #fff;
}
.lesson-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.lesson-item-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-item-duration {
  font-size: 12px;
  color: var(--muted);
}
.lesson-item-right { flex-shrink: 0; }
.lesson-item-status {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg);
}
.lesson-item-status.completed {
  color: var(--accent2);
  background: rgba(123,158,135,0.15);
}
.lesson-item-status.current {
  color: var(--accent);
  background: rgba(196,149,106,0.15);
}

/* Course Progress Section */
.course-progress-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0;
}
.course-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.course-progress-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.course-progress-text {
  font-size: 13px;
  color: var(--muted);
}
.course-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.course-progress-percentage {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  margin-bottom: 16px;
}
.course-progress-actions { margin-top: 16px; }
.btn-complete-lesson {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-complete-lesson:hover { background: var(--accent-hover); }
.btn-complete-lesson.completed {
  background: var(--accent2);
}
.btn-complete-lesson.completed:hover { background: #6a8d76; }
.course-progress-section.login-prompt {
  text-align: center;
}
.course-progress-section.login-prompt p {
  color: var(--muted);
  margin-bottom: 16px;
}

/* Sidebar Course Outline */
.sidebar-course-outline h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.outline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}
.outline-list li {
  border-bottom: 1px solid var(--border);
}
.outline-list li:last-child { border-bottom: none; }
.outline-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.outline-list li a:hover { color: var(--accent); }
.outline-list li.current a { color: var(--accent); font-weight: 600; }
.outline-list li.completed { opacity: 0.6; }
.outline-num {
  width: 22px;
  height: 22px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.outline-list li.completed .outline-num {
  background: var(--accent2);
  color: #fff;
}
.outline-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outline-list li svg {
  flex-shrink: 0;
}

/* Course Type Badge */
.course-type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fce4ec;
  color: #c62828;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.course-type-badge.graphic {
  background: #e3f2fd;
  color: #1565c0;
}
.course-type-badge svg {
  width: 10px;
  height: 10px;
}

/* Course Detail Page Layout */
.course-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 48px;
  max-width: 1200px; margin: 0 auto; padding: 40px 32px 64px;
}
.course-main { min-width: 0; }
.course-sidebar {
  display: flex; flex-direction: column; gap: 24px;
}

/* Course Hero */
.course-hero { position: relative; }
.course-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.15; z-index: 0;
}
.hero-section-right { margin-left: auto; flex-shrink: 0; }
.course-hero-thumb {
  width: 280px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.course-hero-thumb img { width: 100%; display: block; }
.hero-section-content { display: flex; align-items: flex-start; gap: 40px; }
.hero-course-author {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
}
.hero-course-author img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.hero-course-author span { font-size: 14px; color: rgba(255,255,255,0.75); }

/* Course Hero Enhancements */
.hero-level-badge {
  background: rgba(123,158,135,0.2); color: var(--accent2);
  padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
  margin-left: 8px;
}
.hero-section-stat.highlight .hero-section-stat-num { color: var(--accent2); }

/* Course Lesson Content */
.course-lesson-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; margin-bottom: 32px;
}
.course-lesson-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.course-lesson-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lesson-badge {
  background: var(--accent); color: #fff; padding: 4px 10px;
  border-radius: 12px; font-size: 11px; font-weight: 600;
}
.lesson-duration { font-size: 12px; color: var(--muted); }
.course-lesson-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 0; }
.course-lesson-body { font-size: 15px; line-height: 1.8; }
.course-lesson-body p { margin-bottom: 16px; }
.course-lesson-body h2 { font-family: var(--font-display); font-size: 22px; margin: 28px 0 16px; }
.course-lesson-body h3 { font-family: var(--font-display); font-size: 18px; margin: 24px 0 12px; }
.course-lesson-body img { max-width: 100%; border-radius: 10px; margin: 20px 0; }
.course-lesson-body ul, .course-lesson-body ol { margin: 16px 0; padding-left: 24px; }
.course-lesson-body li { margin-bottom: 8px; }
.course-no-content {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.course-no-content svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.5; }
.course-no-content p { font-size: 15px; }

/* Course Lesson Navigation */
.course-lesson-nav {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.lesson-nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  color: var(--fg); text-decoration: none; transition: all 0.2s; flex: 1; max-width: 280px;
}
.lesson-nav-btn:hover { border-color: var(--accent); transform: translateX(-2px); }
.lesson-nav-btn.next:hover { transform: translateX(2px); }
.lesson-nav-btn.next { margin-left: auto; justify-content: flex-end; }
.lesson-nav-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.lesson-nav-info { display: flex; flex-direction: column; gap: 2px; }
.lesson-nav-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lesson-nav-title { font-size: 14px; font-weight: 600; }
.lesson-nav-btn svg { flex-shrink: 0; color: var(--muted); }

/* Course Progress Section */
.course-progress-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; margin-bottom: 32px;
}
.progress-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.progress-info h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.progress-text { font-size: 13px; color: var(--muted); }
.progress-percentage { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--accent); }
.progress-bar-wrapper { margin-bottom: 20px; }
.progress-bar-track {
  height: 10px; background: var(--border); border-radius: 5px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 5px; transition: width 0.4s ease;
}
.progress-actions { margin-top: 16px; }
.btn-complete-lesson {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: var(--fg); color: #fff;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-complete-lesson:hover { background: var(--accent); transform: translateY(-1px); }
.btn-complete-lesson.completed { background: var(--accent2); }
.btn-complete-lesson.completed:hover { background: #6a8d76; }

/* Login Prompt */
.course-progress-section.login-prompt {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}
.login-prompt-content { text-align: center; padding: 20px; }
.login-prompt-content svg { color: var(--accent); margin-bottom: 12px; }
.login-prompt-content p { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.login-prompt-content .btn-primary {
  display: inline-block; padding: 12px 32px; background: var(--fg);
  color: #fff; border-radius: 12px; text-decoration: none; font-weight: 600;
}
.login-prompt-content .btn-primary:hover { background: var(--accent); }

/* Tags */
.article-tags {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 24px 0; border-top: 1px solid var(--border); margin-bottom: 32px;
}
.article-tags svg { color: var(--muted); flex-shrink: 0; }
.article-tags span { font-size: 12px; color: var(--muted); }
.tag-item {
  padding: 6px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; font-size: 12.5px; color: var(--muted); text-decoration: none;
  transition: all 0.2s;
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); }

/* Author Box Enhanced */
.author-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; margin-bottom: 40px;
  display: flex; gap: 20px; align-items: flex-start;
}
.author-avatar { flex-shrink: 0; width: auto; height: auto; }
.author-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-info { flex: 1; display: block; }
.author-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.author-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.author-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.author-bio { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 0; }

/* Related Section */
.related-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.related-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 0; }
.related-more { font-size: 13px; color: var(--accent); text-decoration: none; }
.related-more:hover { text-decoration: underline; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
}
.sidebar-widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sidebar-widget-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 0; }
.outline-count { font-size: 12px; color: var(--muted); }

/* Progress Card Widget */
.sidebar-progress-card { background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%); color: #fff; }
.progress-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.progress-card-title { font-size: 14px; opacity: 0.8; }
.progress-card-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.progress-card-bar { height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.progress-card-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s ease; }
.progress-card-info { font-size: 12px; opacity: 0.7; }

/* Course Outline Widget */
.outline-list { list-style: none; padding: 0; margin: 0; }
.outline-list li { margin-bottom: 4px; }
.outline-list li a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; text-decoration: none; color: var(--fg);
  transition: all 0.2s; position: relative;
}
.outline-list li a:hover { background: var(--bg); }
.outline-list li.current a { background: var(--accent); color: #fff; }
.outline-list li.current .outline-num { background: #fff; color: var(--accent); }
.outline-list li.completed .outline-title { color: var(--muted); text-decoration: line-through; }
.outline-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.outline-title { flex: 1; font-size: 14px; font-weight: 500; }
.outline-duration { font-size: 11px; color: var(--muted); }
.outline-check { color: var(--accent2); flex-shrink: 0; }

/* Course Info Widget */
.sidebar-course-info h3 { margin-bottom: 20px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--muted); }
.info-value { font-size: 13px; font-weight: 600; }

/* Share */
.article-share {
  position: fixed; left: max(32px, calc((100vw - 1200px)/2 - 80px));
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 50;
}
.share-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: var(--muted); font-size: 14px;
  text-decoration: none;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   MEMBER / USER PROFILE
───────────────────────────────────────────── */
.member-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto; padding: 40px 32px 64px;
}
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px;
  text-align: center; position: sticky; top: calc(var(--nav-height) + 24px);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto 14px;
  font-family: var(--font-display);
}
.profile-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-role { font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 16px 0; }
.profile-stat { padding: 12px 8px; border-right: 1px solid var(--border); }
.profile-stat:last-child { border-right: none; }
.profile-stat-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.profile-stat-label { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.profile-bio { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; text-align: left; }
.profile-edit-btn {
  display: block; width: 100%; text-align: center; padding: 9px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.profile-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Member tabs */
.member-tabs {
  display: flex; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; margin-bottom: 32px; flex-wrap: wrap;
}
.member-tab {
  flex: 1; text-align: center; padding: 10px 16px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border: none; background: none; transition: all 0.2s; text-decoration: none;
  font-family: var(--font-body); white-space: nowrap;
}
.member-tab:hover { color: var(--fg); }
.member-tab.active { background: var(--fg); color: var(--bg); }

/* VIP Banner */
.vip-banner {
  background: linear-gradient(135deg, var(--fg) 0%, #3d3a36 100%);
  border-radius: 16px; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; color: var(--bg);
}
.vip-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.vip-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.vip-desc { font-size: 13px; color: rgba(250,248,245,0.6); }
.vip-btn {
  padding: 12px 28px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background 0.2s; font-family: var(--font-body);
}
.vip-btn:hover { background: var(--accent-hover); }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-icon-1 { background: rgba(196,149,106,0.12); }
.stat-icon-2 { background: rgba(123,158,135,0.12); }
.stat-icon-3 { background: rgba(45,42,38,0.08); }
.stat-icon-4 { background: rgba(196,149,106,0.08); }
.stat-info {}
.stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.stat-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Learning list */
.learning-list { display: flex; flex-direction: column; gap: 16px; }
.learning-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: center; transition: all 0.2s; }
.learning-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.learning-thumb { height: 60px; background: var(--border); border-radius: 8px; overflow: hidden; }
.learning-thumb img { width: 100%; height: 100%; object-fit: cover; }
.learning-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.learning-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }
.learning-action {
  text-decoration: none; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; background: var(--fg); color: var(--bg);
  transition: all 0.2s; white-space: nowrap;
}
.learning-action:hover { background: var(--accent); }

/* Bookmark grid */
.bookmark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bookmark-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--fg); transition: all 0.2s; display: flex; flex-direction: column; }
.bookmark-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bookmark-thumb { height: 120px; background: var(--border); overflow: hidden; }
.bookmark-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bookmark-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.bookmark-category { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.bookmark-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; line-height: 1.4; flex: 1; margin-bottom: 10px; }
.bookmark-footer { display: flex; justify-content: space-between; align-items: center; }
.bookmark-date { font-size: 11px; color: var(--muted); }
.bookmark-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; border-radius: 4px; }
.bookmark-remove:hover { color: #e55; }

/* Profile form */
.profile-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; box-sizing: border-box; }
.form-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.form-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.form-section-title { font-size: 15px; font-weight: 700; margin-bottom: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted); }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.form-section { margin-bottom: 28px; }
.form-section:last-of-type { margin-bottom: 24px; }
.form-section-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--fg); }
.btn-save {
  padding: 12px 32px; background: var(--fg); color: var(--bg); border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; font-family: var(--font-body);
}
.btn-save:hover { background: var(--accent); }

/* ─────────────────────────────────────────────
   NEWSLETTER
───────────────────────────────────────────── */
.home-newsletter-wrap {
  padding: 40px 0;
}
.newsletter {
  background: var(--fg); color: var(--bg);
  border-radius: 20px; padding: 60px 64px;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
}
.newsletter h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.newsletter p { color: rgba(250,248,245,0.6); font-size: 15px; }
.newsletter-form { display: flex; gap: 10px; align-items: stretch; }
.newsletter-form input {
  min-width: 220px; flex: 1; padding: 12px 18px;
  background: rgba(250,248,245,0.1);
  border: 1px solid rgba(250,248,245,0.2); border-radius: 10px; color: var(--bg);
  font-size: 14px; font-family: var(--font-body); outline: none;
}
.newsletter-form input::placeholder { color: rgba(250,248,245,0.4); }
.newsletter-form button {
  padding: 12px 24px; background: var(--accent); color: #fff; border: none;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.newsletter-form button:hover { background: var(--accent-hover); }

/* Load more */
.load-more { text-align: center; padding: 32px 0 64px; }
.btn-load {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 36px;
  background: var(--surface); color: var(--fg); border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.btn-load:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────────────────────────
   FOOTER — Card Grid Style (卡片网格型)
───────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-main { padding: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

/* Brand Column */
.footer-brand-col { display: flex; flex-direction: column; }
.footer-brand-logo {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
  margin-bottom: 16px;
}
.footer-logo-mark {
  width: 42px; height: 42px;
  background: var(--fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--bg);
}
.footer-logo-text {
  font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--fg);
}
.footer-brand-desc {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  margin-bottom: 20px; max-width: 260px;
}

/* QR Buttons */
.footer-qr-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.footer-qr-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
  transition: all 0.2s; font-family: var(--font-body);
}
.footer-qr-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.footer-qr-btn svg { flex-shrink: 0; }

/* Social Icons */
.footer-social-icons { display: flex; gap: 8px; }
.footer-social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg); color: var(--muted);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.footer-social-icon:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-2px);
}

/* Link Columns */
.footer-link-col h4 {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--fg); margin-bottom: 16px;
}
.footer-link-col ul { list-style: none; }
.footer-link-col li { margin-bottom: 10px; }
.footer-link-col a {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; transition: color 0.2s;
}
.footer-link-col a:hover { color: var(--accent); }

/* Footer Menu */
.footer-menu-col .footer-menu-list { list-style: none; }
.footer-menu-col .footer-menu-list li { margin-bottom: 10px; }
.footer-menu-col .footer-menu-list a {
  text-decoration: none; color: var(--muted);
  font-size: 13.5px; transition: color 0.2s;
}
.footer-menu-col .footer-menu-list a:hover { color: var(--accent); }

/* QR Code Column */
.footer-qr-col { display: flex; flex-direction: row; gap: 16px; align-items: flex-start; }
.footer-qr-item { display: flex; flex-direction: column; align-items: center; }

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.footer-bottom-inner p { font-size: 12.5px; color: var(--muted); }
.footer-bottom-inner a {
  font-size: 12.5px; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.footer-bottom-inner a:hover { color: var(--accent); }

/* 公安备案 */
.gongan-beian {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gongan-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.back-to-top {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
  padding: 7px 14px; border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: all 0.2s; cursor: pointer;
  background: none; font-family: var(--font-body);
}
.back-to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════
   MOBILE TAB BAR — 移动端底部 5 tab(优化清单 P1-2)
═══════════════════════════════════════════════ */
.mobile-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 199;
  background: rgba(250,248,245,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
  align-items: stretch;
  justify-content: space-around;
}
.mtab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 4px;
  color: var(--muted); text-decoration: none;
  font-size: 11px; font-weight: 500; line-height: 1.2;
  transition: color 0.2s;
  position: relative;
}
.mtab:hover, .mtab.active { color: var(--accent); }
.mtab.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px;
}
.mtab svg { width: 22px; height: 22px; }

/* QR Modal */
.qr-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(45,42,38,0.55); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999; align-items: center; justify-content: center;
}
.qr-modal.show { display: flex; }
.qr-modal-box {
  background: var(--surface); border-radius: 20px; padding: 40px;
  text-align: center; max-width: 300px; position: relative;
  box-shadow: 0 24px 80px rgba(45,42,38,0.2);
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.qr-modal-box h3 {
  font-family: var(--font-display); font-size: 18px;
  font-weight: 700; margin-bottom: 20px;
}
.qr-modal-box img {
  width: 200px; height: 200px; border-radius: 12px;
  display: block; margin: 0 auto;
}
.qr-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--muted); padding: 4px;
  border-radius: 6px; transition: color 0.2s;
}
.qr-modal-close:hover { color: var(--fg); }

/* ─────────────────────────────────────────────
   LOGIN MODAL
───────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(45,42,38,0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--surface); border-radius: 20px; padding: 48px; width: 420px; max-width: 90vw; position: relative; box-shadow: 0 24px 80px rgba(45,42,38,0.18); }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 20px; padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--fg); }
.modal-box h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.modal-box p { color: #6B5B4F; font-size: 14px; margin-bottom: 28px; }
.modal-tabs { display: flex; gap: 0; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.modal-tab { flex: 1; text-align: center; padding: 9px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border: none; background: none; transition: all 0.2s; font-family: var(--font-body); }
.modal-tab.active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 6px rgba(45,42,38,0.08); }

/* Login form inputs */
#loginform p { margin-bottom: 0; }
.login-username, .login-password { margin-bottom: 16px; }
.login-username label, .login-password label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--fg);
}
.login-username input, .login-password input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.login-username input:focus, .login-password input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}
.login-username input::placeholder, .login-password input::placeholder { color: var(--muted); }
.login-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.login-remember label { font-size: 13px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.login-remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.login-submit { margin-top: 0; }
#wp-submit {
  width: 100%; padding: 13px; background: var(--fg); color: var(--bg); border: none;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; font-family: var(--font-body);
}
#wp-submit:hover { background: var(--accent); }

/* Social login buttons */
.btn-social-row {
  display: flex; gap: 12px; margin-top: 4px;
}
.btn-social-item {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--fg); background: var(--surface);
  transition: all 0.2s; text-decoration: none;
}
.btn-social-item:hover {
  border-color: var(--accent); background: rgba(196,149,106,0.05);
}
.btn-social-item img { flex-shrink: 0; }

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.form-row label { font-size: 12.5px; color: var(--muted); font-weight: 400; display: flex; align-items: center; gap: 6px; }
.form-row a { font-size: 12.5px; color: var(--accent); text-decoration: none; }
.btn-full { width: 100%; padding: 13px; background: var(--fg); color: var(--bg); border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: var(--font-body); }
.btn-full:hover { background: var(--accent); }
.modal-divider { text-align: center; position: relative; margin: 20px 0; color: var(--muted); font-size: 12px; }
.modal-divider::before, .modal-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; background: var(--border); }
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

/* ─────────────────────────────────────────────
   WORDPRESS SPECIFIC
───────────────────────────────────────────── */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; }

/* Posts nav */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 32px 0; border-top: 1px solid var(--border); }
.post-nav-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--fg); transition: all 0.2s; }
.post-nav-link:hover { border-color: var(--accent); }
.post-nav-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; display: block; }
.post-nav-title { font-size: 14px; font-weight: 600; line-height: 1.4; }

/* Comments */
.comments-area { padding: 40px 0; border-top: none !important; }
.comments-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 24px; border-bottom: none !important; }
.comment-list { list-style: none; }
.comment { display: flex; gap: 16px; margin-bottom: 24px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.comment-date { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.comment-content { font-size: 14px; line-height: 1.7; }

/* Comment form */
.comment-form { margin-top: 32px; }
.comment-reply-title { display: none; }
.comment-form-col { display: flex; flex-direction: column; }
.comment-form-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.comment-form-group { margin-bottom: 0; }
.comment-form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--fg); }
.comment-form-group input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form-group input::placeholder { color: var(--muted); }
.comment-form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12); }
.comment-form-textarea { margin-bottom: 16px; }
.comment-form-textarea textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--fg);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical; min-height: 120px; line-height: 1.6;
}
.comment-form-textarea textarea::placeholder { color: var(--muted); }
.comment-form-textarea textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12); }
.comment-toolbar { display: flex; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.comment-toolbar button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.comment-toolbar button:hover { border-color: var(--accent); background: rgba(196,149,106,0.05); }
#commentform .btn-full { margin-top: 8px; }
#commentform .btn-full:hover { background: var(--accent); }

@media (max-width: 640px) {
  .comment-form-fields { grid-template-columns: 1fr; }
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 32px 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 600; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; transition: all 0.2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* 404 */
.error-404 { text-align: center; padding: 80px 32px; }
.error-404 h1 { font-family: var(--font-display); font-size: 120px; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 16px; }
.error-404 h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 28px; }

/* ─────────────────────────────────────────────
   ARCHIVE / CATEGORY GRID (wider spacing)
───────────────────────────────────────────── */
.archive.category .card-grid,
.archive.category .featured-row {
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.archive.category .article-card .card-thumb {
  aspect-ratio: 16/9;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 60px 0; }
  .hero-visual { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-row { grid-template-columns: 1fr 1fr; }
  .card-featured { flex-direction: column; }
  .featured-main, .featured-side { flex: none; width: 100%; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-share { display: none; }
  .sidebar { display: none; }
  .member-layout { grid-template-columns: 1fr; }
  .course-layout { grid-template-columns: 1fr; gap: 24px; }
  .course-sidebar { display: none; }
  .course-hero-thumb { width: 200px; }
  .hero-section-content { flex-direction: column; }
  .hero-section-right { margin-left: 0; order: -1; }
  .hero-section-stats { width: 100%; }
  .profile-card { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .newsletter { grid-template-columns: 1fr; padding: 40px 32px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
  .page-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .feat-article { grid-template-columns: 1fr; }
  .feat-thumb { aspect-ratio: 16/9; }
  .feat-body { padding: 28px 28px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .bookmark-grid { grid-template-columns: repeat(2, 1fr); }
  .learning-item { grid-template-columns: 80px 1fr; }
  .learning-action { grid-column: 2; }
  .form-row-2 { grid-template-columns: 1fr; }
  .vip-banner { flex-direction: column; gap: 16px; text-align: center; }
  .cat-content-grid { grid-template-columns: 1fr !important; }
  .feat-article { margin-bottom: 28px; }
  .feat-title { font-size: 22px; }
  .nav-mobile-bar { display: flex !important; }
  .avatar-upload-section { flex-direction: column; text-align: center; width: 100%; }
}

@media (max-width: 640px) {
  .nav-menu-cards, .nav-auth-card, .site-nav { display: none; }
  .nav-mobile-bar { display: flex !important; }
  .nav-mobile-toggle { display: flex !important; }
  .container, .container-narrow { padding: 0 10px; }
  .mobile-tabbar { display: flex; }
  body { padding-top: 52px; padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .mobile-tabbar { display: flex; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .section, .section-sm { padding: 20px 20px; }
  .article-layout { padding: 24px 20px 48px; gap: 0; }
  .article-header { padding-bottom: 20px; margin-bottom: 24px; }
  .article-hero { border-radius: 12px; overflow: hidden; }
  .article-hero img { max-height: 360px; }
  .card-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .featured-row { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 80px 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .topic-scroll { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
  .topic-card { flex: 0 0 100% !important; min-width: 0 !important; }
  .footer-main { padding: 40px 0 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-brand-logo { margin-bottom: 12px; }
  .footer-brand-desc { font-size: 13px; max-width: 280px; margin: 0 auto 16px; }
  .footer-social-icons { justify-content: center; }
  .footer-link-col {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 16px;
}
.footer-link-col h4 {
    font-size: 14px; font-weight: 700; color: var(--fg);
    margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.footer-link-col h4::before {
    content: ''; display: inline-block;
    width: 4px; height: 4px;
    background: var(--accent); border-radius: 50%;
}
.footer-link-col ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding: 0; margin: 0; }
.footer-link-col li { margin-bottom: 0; list-style: none; }
.footer-link-col li a {
    font-size: 13px; color: var(--muted);
    text-decoration: none; padding: 5px 0;
    transition: color 0.15s;
}
.footer-link-col li a:hover { color: var(--accent); }
  .footer-qr-col { display: flex; gap: 24px; justify-content: center; }
  .footer-qr-item { text-align: center; }
  .footer-qr-item img { width: 100px; height: 100px; }
  .footer-bottom-inner { flex-direction: column; align-items: center; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .bookmark-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
  .article-body { font-size: 15.5px; padding: 0; }
  .course-layout { padding: 24px 20px 48px; }
  .course-layout .course-main { order: 1; }
  .course-layout .course-sidebar { order: 2; display: none; }
  .course-lesson-content { padding: 20px; }
  .course-lesson-title { font-size: 22px; }
  .course-progress-section { padding: 20px; }
  .progress-percentage { font-size: 24px; }
  .course-lesson-nav { flex-direction: column; }
  .lesson-nav-btn { max-width: 100%; }
  .lesson-nav-btn.next { margin-left: 0; margin-top: 12px; }
  .pagination { flex-wrap: wrap; }
  .post-navigation { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   SEARCH FORM (sidebar)
───────────────────────────────────────────── */
.wp-block-search,
.search-form,
.search-form-inner,
.widget_search .search-form,
.widget_search .search-form-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.wp-block-search__inside-wrapper {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flexbox !important;
  display: flex !important;
  -webkit-flex-direction: row !important;
  -ms-flex-direction: row !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  background: var(--surface) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.wp-block-search {
  display: block !important;
  width: 100% !important;
}

.wp-block-search__input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--fg) !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  height: 44px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.wp-block-search__button {
  display: flex !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.wp-block-search__button svg {
  color: #fff !important;
  width: 18px !important;
  height: 18px !important;
}

/* 强制覆盖 WordPress 核心样式 */
.wp-block-search__button {
  width: auto !important;
  min-width: 44px !important;
  max-width: none !important;
  height: 44px !important;
}

.sidebar-widget .search-form:focus-within,
.sidebar-widget .search-form-inner:focus-within,
.widget_search .search-form:focus-within,
.widget_search .search-form-inner:focus-within,
.widget_search form:focus-within,
.sidebar-widget form[role="search"]:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}

.sidebar-widget .search-input,
.sidebar-widget .search-form-inner input,
.widget_search .search-input,
.widget_search .search-form-inner input,
.sidebar-widget #s,
.widget_search input[name="s"],
.wp-block-search__input,
.widget_search input[type="search"],
.sidebar-widget input[type="search"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--fg) !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
  height: 100%;
}

.sidebar-widget .search-input::placeholder,
.widget_search .search-input::placeholder,
.wp-block-search__input::placeholder,
.widget_search input[type="search"]::placeholder,
.sidebar-widget input[type="search"]::placeholder,
.sidebar-widget input[type="search"]::placeholder {
  color: var(--muted) !important;
  opacity: 1 !important;
}

.sidebar-widget .search-input::-webkit-input-placeholder,
.widget_search .search-input::-webkit-input-placeholder,
.wp-block-search__input::-webkit-input-placeholder {
  color: var(--muted) !important;
  opacity: 1 !important;
}

.sidebar-widget .search-btn,
.sidebar-widget .search-form-inner button,
.sidebar-widget .search-form-inner input[type="submit"],
.widget_search .search-submit,
.widget_search .search-form-inner button,
.widget_search .search-form-inner input[type="submit"],
.sidebar-widget #searchsubmit,
.widget_search button[type="submit"],
.wp-block-search__button,
.widget_search input[type="submit"],
.sidebar-widget input[type="submit"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  border: none !important;
  background: var(--accent) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0 !important;
  border-radius: 0 8px 8px 0 !important;
  margin: 0 !important;
  align-self: stretch !important;
}

.sidebar-widget .search-btn:hover,
.widget_search .search-submit:hover,
.wp-block-search__button:hover,
.widget_search input[type="submit"]:hover,
.sidebar-widget input[type="submit"]:hover {
  background: #b3855d !important;
}

.sidebar-widget .search-btn svg,
.widget_search .search-submit svg,
.wp-block-search__button svg {
  color: #fff;
  width: 18px;
  height: 18px;
}

/* 最强制覆盖 WordPress 搜索按钮样式 */
div.wp-block-search .wp-block-search__button {
  width: auto !important;
  min-width: 44px !important;
  max-width: none !important;
  height: 44px !important;
  flex-shrink: 0 !important;
}

/* ─────────────────────────────────────────────
   USER AVATAR SYSTEM
───────────────────────────────────────────── */
.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}
.profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}
.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.avatar-edit-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* Avatar Upload Section */
.avatar-upload-section {
  display: flex;
  gap: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 28px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.member-content {
  width: 100%;
  min-width: 0;
}
.member-section {
  width: 100%;
}
.avatar-upload-preview {
  position: relative;
  flex-shrink: 0;
}
.avatar-preview-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}
.avatar-edit-overlay span {
  font-size: 12px;
  margin-top: 4px;
}
.avatar-upload-preview:hover .avatar-edit-overlay {
  opacity: 1;
}
.avatar-upload-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.avatar-upload-info p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.avatar-upload-info .btn-secondary {
  margin-right: 12px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   智点系统样式
───────────────────────────────────────────── */

/* 下拉菜单智点显示 */
.nav-user-menu .nav-points-li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 4px 8px 8px;
  background: linear-gradient(135deg, rgba(196,149,106,0.15) 0%, rgba(123,158,135,0.15) 100%);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: default;
}
.nav-user-menu .nav-points-li svg { flex-shrink: 0; }

/* 智点提示 Toast */
.points-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  text-align: center;
}
.points-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.points-toast .toast-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 4px;
}
.points-toast .toast-msg {
  font-weight: 700;
  font-size: 15px;
}
.points-toast.error .toast-title { color: #e57373; }

/* 课程解锁区域 */
.course-unlock-area {
  padding: 32px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  margin: 24px 0;
}
.course-unlock-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.course-unlock-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.course-unlock-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.course-unlock-points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  border-radius: 24px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}
.course-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.course-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,42,38,0.2);
}
.course-unlock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.course-unlocked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(123,158,135,0.1);
  border: 1px solid var(--accent2);
  border-radius: 12px;
  color: var(--accent2);
  font-weight: 600;
}

/* 会员中心智点卡片 */
.points-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 24px;
}
.points-card-num {
  font-size: 42px;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.points-card-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}
.points-card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.signin-btn {
  padding: 10px 24px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.signin-btn:hover { background: rgba(255,255,255,0.3); }
.signin-btn.signed { opacity: 0.6; cursor: not-allowed; }
.invite-btn {
  padding: 10px 24px;
  background: #fff;
  border: none;
  border-radius: 24px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.invite-btn:hover { transform: scale(1.05); }

/* 智点获取规则 */
.points-rules {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.points-rules-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.points-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.points-rule-item:last-child { border-bottom: none; }
.points-rule-name { font-size: 14px; }
.points-rule-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.points-rule-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
}

/* 智点日志 */
.points-log {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
.points-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.points-log-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}
.points-log-more {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.points-log-more:hover { text-decoration: underline; }
.points-log-list {
  max-height: 400px;
  overflow-y: auto;
}
.points-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.points-log-item:last-child { border-bottom: none; }
.points-log-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.points-log-reason { font-weight: 500; }
.points-log-time { font-size: 12px; color: var(--muted); }
.points-log-points { font-weight: 700; font-size: 15px; }
.points-log-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
}

/* 邀请码 */
.invite-code-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}
.invite-code-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.invite-code-value {
  font-family: monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.invite-code-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.invite-code-copy {
  flex: 1;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.invite-code-copy:hover {
  opacity: 0.85;
}
.invite-code-poster {
  flex: 1;
  padding: 10px 20px;
  background: var(--accent2);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.invite-code-poster:hover {
  opacity: 0.85;
}

/* Points Log Modal */
.modal-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  position: relative;
  box-shadow: 0 24px 80px rgba(45,42,38,0.18);
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 24px;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-body {
  min-height: 100px;
}
.modal-close:hover { color: var(--fg); }
#points-log-modal-body .points-log-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}
#points-log-modal-body .points-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
#points-log-modal-body .points-log-item:last-child { border-bottom: none; }
#points-log-modal-body .points-log-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#points-log-modal-body .points-log-reason {
  font-size: 14px;
  color: var(--fg);
}
#points-log-modal-body .points-log-time {
  font-size: 12px;
  color: var(--muted);
}
#points-log-modal-body .points-log-points {
  font-size: 16px;
  font-weight: 700;
}

/* Invite Poster Modal: scroll body if poster taller than viewport */
#invite-poster-modal .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;        /* 给滚动条留位置，避免覆盖内容 */
  scrollbar-width: thin;
  scrollbar-color: rgba(45,42,38,0.25) transparent;
}
#invite-poster-modal .modal-body::-webkit-scrollbar { width: 6px; }
#invite-poster-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(45,42,38,0.25);
  border-radius: 3px;
}
#invite-poster-modal .modal-body::-webkit-scrollbar-track { background: transparent; }

/* Invite Poster Modal */
.invite-poster {
  position: relative;
  width: 380px;
  min-height: 580px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-dark) 0%, #1a1816 40%, #3D3530 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* 背景装饰 */
.poster-bg-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.poster-circle {
  position: absolute;
  border-radius: 50%;
}
.poster-circle-1 {
  width: 200px; height: 200px;
  top: -60px; right: -60px;
  background: radial-gradient(circle, rgba(196,149,106,0.25) 0%, transparent 70%);
}
.poster-circle-2 {
  width: 160px; height: 160px;
  bottom: -40px; left: -40px;
  background: radial-gradient(circle, rgba(196,149,106,0.15) 0%, transparent 70%);
}
.poster-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(196,149,106,0.08) 100%);
}

/* 内容区域 */
.poster-inner {
  position: relative;
  z-index: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 品牌区 */
.poster-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  align-self: flex-start;
}
.poster-brand-logo {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.poster-brand-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.poster-brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.poster-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.poster-brand-slogan {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Hero 区域 */
.poster-hero {
  margin-bottom: 28px;
  width: 100%;
}
.poster-hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.poster-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(255,107,53,0.25) 0%, rgba(255,71,87,0.25) 100%);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #FF6B35;
  animation: poster-badge-pulse 2s ease-in-out infinite;
}
@keyframes poster-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}
.poster-hero h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.4;
}
.poster-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, #E5B988 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.poster-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 16px;
}
.poster-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}
.poster-perk-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 二维码卡片 */
.poster-qr-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 240px;
}
.poster-qr-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 10px;
}
.poster-qr-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.poster-qr-tip {
  font-size: 11.5px;
  color: #666;
  text-align: center;
  margin-top: 2px;
}

/* 邀请信息 */
.poster-invite-info {
  width: 100%;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.poster-invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.poster-invite-row + .poster-invite-row {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.poster-invite-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.poster-invite-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}
.poster-invite-user {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* 链接输入框 */
.poster-link-box {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 20px;
}
.poster-link-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 11px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  outline: none;
}
.poster-link-box input:focus {
  border-color: var(--accent);
}
.poster-link-box button {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.poster-link-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,149,106,0.4);
}

/* 底部按钮 */
.poster-bottom-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.poster-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.poster-action-download {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
}
.poster-action-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,149,106,0.4);
}
.poster-action-copy {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.poster-action-copy:hover {
  background: rgba(255,255,255,0.12);
}

/* front-page.php 迁移的内联样式 */
.section-empty {
  color: var(--muted);
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
}

.featured-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .featured-layout {
    grid-template-columns: 1fr;
  }
}

.featured-main {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
}

.featured-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.courses-empty {
  color: var(--muted);
  text-align: center;
  padding: 40px;
}

/* ============================================================
 *  P2-6 · Lesson Notes (课时页)
 * ============================================================ */

.lesson-notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 32px 0;
}

.lesson-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.lesson-notes-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.lesson-notes-head h3 svg { color: var(--accent); }

.lesson-notes-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
}

.lesson-notes-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.lesson-notes-tab:hover { color: var(--fg); }
.lesson-notes-tab.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.lesson-notes-count {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.lesson-notes-editor { display: flex; flex-direction: column; gap: 12px; }

.lesson-notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.lesson-notes-colors { display: flex; gap: 6px; }

.lesson-note-color {
  width: 26px;
  height: 26px;
  border: 2px solid var(--nc-bd, #F0C674);
  background: var(--nc-bg, #FFF8DC);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  position: relative;
}

.lesson-note-color:hover { transform: scale(1.1); }
.lesson-note-color.active {
  box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0,0,0,0.12);
  transform: scale(1.05);
}
.lesson-note-color.active::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 6px; height: 6px;
  background: var(--nc-bd, #F0C674);
  border-radius: 50%;
}

/* Toggle 公开/私密 */
.lesson-notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.lesson-notes-toggle input { display: none; }
.lesson-notes-toggle-slider {
  position: relative;
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 10px;
  transition: background 0.2s;
}
.lesson-notes-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lesson-notes-toggle input:checked + .lesson-notes-toggle-slider { background: var(--accent); }
.lesson-notes-toggle input:checked + .lesson-notes-toggle-slider::before { transform: translateX(16px); }
.lesson-notes-toggle input:checked ~ .lesson-notes-toggle-label { color: var(--accent); font-weight: 600; }

/* Textarea */
.lesson-note-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--nc-bg, #FFF8DC);
  border-color: var(--nc-bd, #F0C674);
  color: var(--fg);
  font-size: 14.5px;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
  box-sizing: border-box;
}
.lesson-note-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
}
.lesson-note-textarea::placeholder { color: var(--muted); }

/* Footer */
.lesson-notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.lesson-notes-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.lesson-notes-status.is-ok { color: #10B981; }
.lesson-notes-status.is-err { color: #DC2626; }
.lesson-notes-status.is-pending { color: var(--accent); }
.lesson-notes-status-hint { color: var(--muted); font-size: 12.5px; }

.lesson-notes-counter {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lesson-notes-actions { display: flex; gap: 8px; }

.lesson-note-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.lesson-note-btn:hover { border-color: var(--accent); color: var(--accent); }

.lesson-note-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.lesson-note-btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.lesson-note-btn-danger {
  background: transparent;
  border-color: #FCA5A5;
  color: #DC2626;
}
.lesson-note-btn-danger:hover {
  background: #FEE2E2;
  border-color: #DC2626;
  color: #B91C1C;
}

.lesson-note-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.lesson-note-btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* 公开笔记列表 */
.lesson-notes-public-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.public-note {
  background: var(--nc-bg, #FFF8DC);
  border: 1px solid var(--nc-bd, #F0C674);
  border-left: 3px solid var(--nc-bd, #F0C674);
  border-radius: 10px;
  padding: 16px 18px;
  transition: all 0.2s;
}
.public-note:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.public-note-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.public-note-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--surface);
  object-fit: cover;
}

.public-note-author {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.public-note-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.2;
}
.public-note-time { font-size: 11.5px; color: var(--muted); }

.public-note-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--nc-bd, #F0C674);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.public-note-like:hover {
  background: #fff;
  color: #DC2626;
  border-color: #DC2626;
}
.public-note-like.liked {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #DC2626;
}
.public-note-like.liked svg { fill: currentColor; }
.public-note-like:disabled { opacity: 0.5; cursor: not-allowed; }
.public-note-likes { font-variant-numeric: tabular-nums; min-width: 8px; text-align: center; }

.public-note-body {
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg);
}
.public-note-body p { margin: 0 0 8px; }
.public-note-body p:last-child { margin-bottom: 0; }
.public-note-body code {
  font-family: monospace;
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

.lesson-notes-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.lesson-notes-empty svg { opacity: 0.5; margin-bottom: 8px; }
.lesson-notes-empty p { font-size: 14px; margin: 0; }

.lesson-notes-public-foot {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.lesson-notes-locked {
  text-align: center;
  padding: 40px 28px;
}
.lesson-notes-locked-content { max-width: 360px; margin: 0 auto; }
.lesson-notes-locked-content svg { color: var(--muted); margin-bottom: 12px; }
.lesson-notes-locked-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 8px;
}
.lesson-notes-locked-content p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ============================================================
 *  P2-6 · Study Calendar Heatmap (会员中心)
 * ============================================================ */

.calendar-header { margin-bottom: 20px; padding: 0 4px; }
.calendar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--fg);
}
.calendar-title svg { color: var(--accent); }
.calendar-hint { color: var(--muted); font-size: 13px; margin: 0; }

.calendar-heatmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#study-heatmap-root { min-height: 200px; position: relative; }

.heatmap-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.heatmap-loading svg { animation: heatmap-spin 1.4s linear infinite; }
@keyframes heatmap-spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
.heatmap-loading p { font-size: 14px; margin: 8px 0 0; }

.heatmap-error {
  text-align: center;
  padding: 40px 20px;
  color: #DC2626;
}
.heatmap-error svg { margin-bottom: 8px; }
.heatmap-error p { font-size: 14px; margin: 0; }

.heatmap-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--border);
}

.heatmap-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s;
}
.heatmap-stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.heatmap-stat.highlight {
  background: linear-gradient(135deg, var(--accent-soft) 0%, #FFF8DC 100%);
  border-color: var(--accent);
}
.heatmap-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.heatmap-stat.highlight .heatmap-stat-num { color: var(--accent-deep); }
.heatmap-stat-unit { font-size: 14px; color: var(--muted); margin-left: 1px; }
.heatmap-stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }

.study-heatmap-svg { display: block; max-width: 100%; height: auto; }
.heatmap-cell {
  cursor: pointer;
  transition: opacity 0.1s;
  outline: none;
}
.heatmap-cell:hover { opacity: 0.7; stroke: var(--accent); stroke-width: 1; }
.heatmap-cell.is-future { opacity: 0.4; }
.heatmap-cell.has-activity { stroke-width: 0; }

.heatmap-weekday, .heatmap-month {
  font-size: 10px;
  fill: var(--muted);
  font-family: inherit;
}
.heatmap-month { font-weight: 600; }
.heatmap-legend-cell { stroke: var(--border); stroke-width: 0.5; }
.heatmap-legend-label {
  font-size: 10px;
  fill: var(--muted);
  font-family: inherit;
}

.heatmap-tooltip {
  position: fixed;
  background: rgba(45, 42, 38, 0.96);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  max-width: 240px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap;
}
.heatmap-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.heatmap-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #fff;
}
.heatmap-tooltip .ht-future { color: #F0C674; }
.heatmap-tooltip .ht-none { color: #9CA3AF; }
.heatmap-tooltip .ht-level { color: #7BC96F; display: inline-block; margin-top: 2px; }

.heatmap-year-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.heatmap-year-switcher svg { color: var(--muted); }
.heatmap-year-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}
.heatmap-year-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.heatmap-year-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.heatmap-year-label { min-width: 60px; text-align: center; font-weight: 600; color: var(--fg); }

.calendar-tips {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 20px;
}
.calendar-tips h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 10px;
}
.calendar-tips h4 svg { color: var(--accent); }
.calendar-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.calendar-tips ul li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  padding-left: 16px;
}
.calendar-tips ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  top: -2px;
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
}
.calendar-tips ul li strong { color: var(--fg); font-weight: 600; }

/* P2-6 移动端适配 */
@media (max-width: 768px) {
  .lesson-notes { padding: 18px 16px; }
  .lesson-notes-head h3 { font-size: 15px; }
  .lesson-notes-tab { padding: 6px 10px; font-size: 12.5px; }
  .lesson-notes-toolbar { flex-direction: column; align-items: stretch; }
  .lesson-notes-actions { width: 100%; }
  .lesson-notes-actions .lesson-note-btn { flex: 1; justify-content: center; }
  .lesson-note-textarea { padding: 12px 14px; font-size: 14px; }

  .heatmap-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .heatmap-stat { padding: 12px 8px; }
  .heatmap-stat-num { font-size: 20px; }
  .calendar-heatmap-card { padding: 20px 12px; }
  .calendar-tips ul { grid-template-columns: 1fr; gap: 6px; }
}

/* ============================================================
 *  Static Page (P2-5) - 关于 / 联系 / 帮助 / 条款
 * ============================================================ */

.static-page {
  background: var(--bg);
  padding: 56px 0 96px;
}

.static-page-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.static-section {
  margin-bottom: 80px;
  scroll-margin-top: 80px;
}
.static-section:last-child { margin-bottom: 0; }

.static-section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.static-section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 20px;
  line-height: 1.3;
}

.static-section-lead {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.static-prose {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--fg);
}
.static-prose p { margin-bottom: 18px; }
.static-prose p:last-child { margin-bottom: 0; }
.static-prose strong { color: var(--fg); font-weight: 700; }
.static-prose a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); transition: all 0.15s; }
.static-prose a:hover { color: var(--accent-deep); border-bottom-style: solid; }

.static-req { color: #DC2626; font-weight: 700; }

/* 数字网格 */
.static-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.static-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 22px;
  text-align: center;
  transition: all 0.25s;
}
.static-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 149, 106, 0.1);
}
.static-stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.static-stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}
.static-stat-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* 价值卡 */
.static-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.static-value-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.25s;
}
.static-value-item:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}
.static-value-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.static-value-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.static-value-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* 时间线 */
.static-timeline {
  position: relative;
  padding-left: 32px;
}
.static-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--accent-soft) 100%);
}
.static-timeline-item {
  position: relative;
  padding-bottom: 32px;
}
.static-timeline-item:last-child { padding-bottom: 0; }
.static-timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent);
}
.static-timeline-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.static-timeline-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
}
.static-timeline-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* CTA */
.static-cta {
  background: linear-gradient(135deg, #2D2A26 0%, #1A1816 100%);
  border-radius: 18px;
  padding: 48px 36px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.static-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(196, 149, 106, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.static-cta h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  position: relative;
}
.static-cta p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  position: relative;
}
.static-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.static-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.static-cta-btn-primary {
  background: var(--accent);
  color: #fff;
}
.static-cta-btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(196, 149, 106, 0.35);
}
.static-cta-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.static-cta-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
 *  Contact Page (page-contact.php)
 * ============================================================ */

.contact-channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.contact-channel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 18px;
  transition: all 0.25s;
}
.contact-channel:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}
.contact-channel-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-channel-body { flex: 1; min-width: 0; }
.contact-channel-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}
.contact-channel-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}
.contact-channel-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.contact-channel-link:hover {
  background: var(--accent);
  color: #fff;
}
.contact-wechat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-copy-btn {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.contact-copy-btn:hover { background: var(--accent); color: #fff; }
.contact-copy-btn.copied { background: #10B981; color: #fff; }

/* 留言表单 */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.contact-form-group { margin-bottom: 16px; position: relative; }
.contact-form-row .contact-form-group { margin-bottom: 0; }
.contact-form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}
.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s;
  box-sizing: border-box;
}
.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
}
.contact-form-group textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.contact-form-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 0 4px;
  pointer-events: none;
}
.contact-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.contact-form-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: 8px;
}
.contact-form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #D1FAE5;
  color: #065F46;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid #6EE7B7;
}
.contact-form-success svg { flex-shrink: 0; }

/* 服务时间 */
.contact-hours {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 0;
}
.contact-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.contact-hours-row:last-child { border-bottom: none; }
.contact-hours-row span { color: var(--muted); }
.contact-hours-row strong { color: var(--fg); font-weight: 700; }

/* ============================================================
 *  Help Center (page-help.php)
 * ============================================================ */

.help-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 18px;
  transition: all 0.2s;
}
.help-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}
.help-search svg { color: var(--muted); flex-shrink: 0; }
.help-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 18px 14px;
  font-size: 15px;
  color: var(--fg);
  outline: none;
  font-family: inherit;
}
.help-search input::placeholder { color: var(--muted); }
.help-search-hint {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.help-cats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.help-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
  transition: all 0.15s;
}
.help-cat:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.help-cat.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.help-cat-count {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
}
.help-cat.active .help-cat-count { background: rgba(255,255,255,0.25); color: #fff; }

.help-category { margin-bottom: 40px; }
.help-category-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.help-category-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-category-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--fg);
  flex: 1;
  letter-spacing: -0.01em;
}
.help-category-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
}

.help-faq-list { display: flex; flex-direction: column; gap: 10px; }
.help-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}
.help-faq-item[open] { border-color: var(--accent); }
.help-faq-item:hover { border-color: var(--accent); }
.help-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all 0.15s;
}
.help-faq-q::-webkit-details-marker { display: none; }
.help-faq-q::marker { display: none; content: ''; }
.help-faq-q-text { flex: 1; line-height: 1.5; }
.help-faq-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.25s;
}
.help-faq-item[open] .help-faq-arrow { transform: rotate(180deg); color: var(--accent); }
.help-faq-a {
  padding: 0 22px 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  margin-top: -4px;
}

.help-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.help-empty-icon { font-size: 48px; margin-bottom: 12px; }
.help-empty h3 { font-size: 18px; color: var(--fg); margin-bottom: 6px; }
.help-empty p { font-size: 14px; }
.help-empty a { color: var(--accent); text-decoration: none; font-weight: 600; }
.help-empty a:hover { text-decoration: underline; }

/* ============================================================
 *  Terms Page (page-terms.php)
 * ============================================================ */

.terms-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
}
.terms-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  flex: 1;
  justify-content: center;
  min-width: 140px;
}
.terms-tab:hover {
  color: var(--accent);
  background: var(--bg);
}
.terms-tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.terms-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 56px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--fg);
}
.terms-doc-meta {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 5px 14px;
  border-radius: 16px;
  margin-bottom: 32px;
}
.terms-doc h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: -0.01em;
}
.terms-doc h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.terms-doc p { margin-bottom: 14px; }
.terms-doc p:last-child { margin-bottom: 0; }
.terms-doc ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.terms-doc ul li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14.5px;
  color: var(--fg);
  line-height: 1.7;
}
.terms-doc ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.terms-doc strong { color: var(--fg); font-weight: 700; }
.terms-doc a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: all 0.15s;
}
.terms-doc a:hover { color: var(--accent-deep); border-bottom-style: solid; }
.terms-doc-foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.terms-doc-foot a { color: var(--accent); border-bottom: 1px dashed var(--accent); }

/* ============================================================
 *  Static Page Responsive
 * ============================================================ */

@media (max-width: 768px) {
  .static-page { padding: 32px 0 64px; }
  .static-section { margin-bottom: 56px; }
  .static-section-title { font-size: 24px; }
  .static-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .static-stat-card { padding: 20px 16px; }
  .static-stat-num { font-size: 28px; }
  .static-values { grid-template-columns: 1fr; }
  .static-cta { padding: 36px 24px; }
  .static-cta h2 { font-size: 22px; }
  .static-cta-actions { flex-direction: column; }
  .static-cta-btn { width: 100%; }

  .contact-channels { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .contact-form-row { grid-template-columns: 1fr; gap: 16px; }

  .help-cats { gap: 6px; }
  .help-cat { padding: 7px 12px; font-size: 12.5px; }
  .help-q { padding: 16px 18px; font-size: 14.5px; }

  .terms-doc { padding: 32px 24px; font-size: 14.5px; }
  .terms-doc h2 { font-size: 22px; }
  .terms-doc h3 { font-size: 16px; }
  .terms-tab { min-width: 100%; padding: 9px 14px; font-size: 13px; }
}
}

/* ═══════════════════════════════════════════════════════
   P2-7: 搜索增强 - 关键词高亮 + 文章卡摘要 + 建议下拉
   ═══════════════════════════════════════════════════════ */

/* 搜索关键词高亮 mark 元素 */
.search-highlight,
mark.search-highlight {
    background: linear-gradient(180deg, transparent 60%, rgba(196, 149, 106, 0.32) 60%);
    color: var(--accent-deep, #8B6914);
    font-weight: 700;
    padding: 0 1px;
    border-radius: 2px;
    transition: background 0.2s;
}

.search-highlight:hover {
    background: linear-gradient(180deg, transparent 50%, rgba(196, 149, 106, 0.45) 50%);
}

/* 搜索结果文章卡 - 摘要样式 */
.article-card-search .card-body {
    padding: 14px 16px 12px;
}

.article-card-search .card-excerpt {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 6px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 38px;
}

.article-card-search .card-excerpt .search-highlight {
    font-size: 12.5px;
}

/* 文章类型徽标 */
.card-post-type {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background: rgba(45, 42, 38, 0.78);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

/* 搜索页 - 建议下拉（防止与内联样式冲突，做公共化处理） */
.aizxs-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(45, 42, 38, 0.12);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
    animation: aizxsSuggestFade 0.18s ease-out;
}

@keyframes aizxsSuggestFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aizxs-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--fg);
}

.aizxs-suggest-item:last-child { border-bottom: none; }

.aizxs-suggest-item:hover,
.aizxs-suggest-item.active {
    background: var(--accent-soft, #F0E5D2);
}

.aizxs-suggest-item .suggest-type {
    flex-shrink: 0;
    padding: 2px 8px;
    background: var(--accent-soft, #F0E5D2);
    color: var(--accent-deep, #8B6914);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aizxs-suggest-item .suggest-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aizxs-suggest-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* 搜索结果分页（公共化） */
.search-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination-nav { width: 100%; }
.pagination-list {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item a,
.pagination-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--fg);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
}

.pagination-item a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft, #F0E5D2);
}

.pagination-item.is-current span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    cursor: default;
}

.pagination-item .dots {
    border: none;
    background: transparent;
}

/* 搜索结果计数高亮 */
.search-count strong {
    color: var(--accent);
    font-weight: 700;
}

/* 移动端建议下拉优化 */
@media (max-width: 640px) {
    .aizxs-suggest {
        border-radius: 8px;
        max-height: 280px;
    }
    .aizxs-suggest-item {
        padding: 10px 14px;
    }
    .aizxs-suggest-item .suggest-title {
        font-size: 13px;
    }
    .article-card-search .card-excerpt {
        -webkit-line-clamp: 2;
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════
   AIZXS 统一弹窗组件 (dialog.js)
   - 模态弹窗: aizxsAlert / aizxsConfirm
   - 顶部 Toast: aizxsToast
   ═══════════════════════════════════════════════════════ */

/* 锁定背景滚动 */
html.aizxs-modal-open,
html.aizxs-modal-open body { overflow: hidden; }

/* ── 模态弹窗容器 ─────────────────────────── */
.aizxs-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.aizxs-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.aizxs-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(45, 42, 38, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.aizxs-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface, #FFFDF9);
  border: 1px solid var(--border, #E8E2D9);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(45, 42, 38, 0.20), 0 4px 16px rgba(45, 42, 38, 0.10);
  padding: 28px 28px 20px;
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.aizxs-modal-card.enter {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.aizxs-modal-card.leave {
  transform: scale(0.96) translateY(4px);
  opacity: 0;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

/* 关闭按钮 */
.aizxs-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted, #8B7355);
  font-size: 20px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.aizxs-modal-close:hover {
  background: var(--bg, #FAF8F5);
  color: var(--fg, #2D2A26);
}

/* 主体内容 */
.aizxs-modal-body {
  text-align: center;
  padding: 4px 0 18px;
}

.aizxs-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px;
  color: #fff;
  flex-shrink: 0;
}
.aizxs-modal-icon svg { width: 30px; height: 30px; display: block; }
.aizxs-modal-icon[data-type="info"]    { background: linear-gradient(135deg, #7B9E87, #5E8068); }
.aizxs-modal-icon[data-type="success"] { background: linear-gradient(135deg, #7B9E87, #5E8068); }
.aizxs-modal-icon[data-type="warn"]    { background: linear-gradient(135deg, #C4956A, #a87b4f); }
.aizxs-modal-icon[data-type="error"]   { background: linear-gradient(135deg, #C85A4A, #a8473a); }

.aizxs-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg, #2D2A26);
  margin-bottom: 8px;
  line-height: 1.4;
  font-family: inherit;
}

.aizxs-modal-message {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--fg, #2D2A26);
  word-break: break-word;
  white-space: pre-wrap;
}

/* 按钮区 */
.aizxs-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.aizxs-modal-actions .aizxs-btn {
  flex: 1;
  min-width: 0;
}

.aizxs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  user-select: none;
  -webkit-user-select: none;
}
.aizxs-btn:focus { outline: 2px solid rgba(196, 149, 106, 0.35); outline-offset: 2px; }
.aizxs-btn:active { transform: translateY(1px); }

.aizxs-btn-primary {
  background: var(--accent, #C4956A);
  color: #fff;
  border-color: var(--accent, #C4956A);
  box-shadow: 0 2px 8px rgba(196, 149, 106, 0.25);
}
.aizxs-btn-primary:hover {
  background: var(--accent-hover, #b8855a);
  border-color: var(--accent-hover, #b8855a);
  box-shadow: 0 4px 12px rgba(196, 149, 106, 0.35);
}

.aizxs-btn-ghost {
  background: transparent;
  color: var(--fg, #2D2A26);
  border-color: var(--border, #E8E2D9);
}
.aizxs-btn-ghost:hover {
  background: var(--bg, #FAF8F5);
  border-color: var(--accent, #C4956A);
  color: var(--accent, #C4956A);
}

/* ── Toast 顶部提示 ─────────────────────────── */
.aizxs-toast-box {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.aizxs-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: var(--surface, #FFFDF9);
  border: 1px solid var(--border, #E8E2D9);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(45, 42, 38, 0.14), 0 2px 6px rgba(45, 42, 38, 0.06);
  font-size: 14px;
  color: var(--fg, #2D2A26);
  line-height: 1.4;
  min-width: 200px;
  max-width: 480px;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.aizxs-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.aizxs-toast.leave {
  opacity: 0;
  transform: translateY(-8px);
}

.aizxs-toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aizxs-toast-icon svg { width: 18px; height: 18px; display: block; }

.aizxs-toast-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.aizxs-toast-info    { border-left: 3px solid #7B9E87; }
.aizxs-toast-info    .aizxs-toast-icon { color: #7B9E87; }
.aizxs-toast-success { border-left: 3px solid #5E8068; }
.aizxs-toast-success .aizxs-toast-icon { color: #5E8068; }
.aizxs-toast-warn    { border-left: 3px solid #C4956A; }
.aizxs-toast-warn    .aizxs-toast-icon { color: #C4956A; }
.aizxs-toast-error   { border-left: 3px solid #C85A4A; }
.aizxs-toast-error   .aizxs-toast-icon { color: #C85A4A; }

/* ── 响应式 ─────────────────────────── */
@media (max-width: 480px) {
  .aizxs-modal { padding: 12px; }
  .aizxs-modal-card { padding: 24px 20px 16px; border-radius: 14px; }
  .aizxs-modal-title { font-size: 16px; }
  .aizxs-modal-message { font-size: 14px; }
  .aizxs-toast-box { top: 12px; }
  .aizxs-toast { font-size: 13.5px; padding: 10px 14px; min-width: 0; }
}

/* ── 暗色模式预留（跟随系统）─────────────────────────── */
@media (prefers-color-scheme: dark) {
  .aizxs-modal-card {
    background: #2D2A26;
    border-color: #3d3a36;
  }
  .aizxs-modal-title,
  .aizxs-modal-message { color: #FAF8F5; }
  .aizxs-modal-close { color: #B8A89A; }
  .aizxs-modal-close:hover { background: #3d3a36; color: #FAF8F5; }
  .aizxs-btn-ghost { color: #FAF8F5; border-color: #3d3a36; }
  .aizxs-btn-ghost:hover { background: #3d3a36; }
  .aizxs-toast { background: #2D2A26; border-color: #3d3a36; color: #FAF8F5; }
}
