/* ============================================================
   投研学会 · 样式表 v2
   设计语言：明亮蓝白 · 金黄点缀 · 嫩绿辅助（专业、清爽、不压抑）
   配色参考：蓝白主调 + 琥珀金强调 + 清新绿辅助
   行情色：遵循 A 股惯例 红涨绿跌
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  /* ---- 蓝色主色系 ---- */
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-deep: #1e3a8a;
  --brand-soft: #e8f0fe;

  /* ---- 金黄强调（CTA / 高亮） ---- */
  --gold: #f59e0b;
  --gold-strong: #d97706;
  --gold-soft: #fef3c7;
  --gold-ink: #92400e;

  /* ---- 清新绿（辅助 / 成功 / 跌） ---- */
  --green: #10b981;
  --green-strong: #059669;
  --green-soft: #d1fae5;

  /* ---- 中性 ---- */
  --bg: #f4f7fc;
  --bg-soft: #eaf1fa;
  --card: #ffffff;
  --border: #e3e9f2;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #8fa0b8;
  --ink-4: #b6c2d4;

  /* ---- 行情色（A 股惯例：红涨绿跌） ---- */
  --up: #e11d48;
  --up-soft: #ffe4e6;
  --down: #10b981;
  --down-soft: #d1fae5;

  /* ---- 阴影 / 圆角 ---- */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
  --shadow: 0 4px 18px rgba(15,23,42,.08);
  --shadow-lg: 0 14px 38px rgba(21,52,110,.14);
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --grad-brand: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --grad-hero: linear-gradient(160deg, #1e3a8a 0%, #2563eb 48%, #3b82f6 100%);
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: 76px; /* 给底部导航留位 */
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ========== 顶部品牌栏 ========== */
.navbar {
  position: sticky; top: 0; z-index: 120;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  color: #fff; font-size: 17px; font-weight: 800;
  letter-spacing: -.5px;
  box-shadow: 0 4px 12px rgba(37,99,235,.32);
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 28% 22%, rgba(255,255,255,.45), transparent 60%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16.5px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--ink-3); letter-spacing: .5px; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.quota-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 700;
  border: 1px solid #d3e2fd;
}
.quota-chip.low { background: var(--gold-soft); color: var(--gold-ink); border-color: #fde68a; }
.quota-chip.out { background: var(--up-soft); color: #be123c; border-color: #fecdd3; }
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #f1f5f9; color: var(--ink-2); font-size: 12.5px; font-weight: 600;
}

/* ========== Hero ========== */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-hero);
  color: #fff;
  padding: 34px 22px 30px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero::before {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,.30), transparent 68%);
  top: -140px; right: -100px;
}
.hero::after {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.22), transparent 70%);
  bottom: -150px; left: -70px;
}
.hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24);
  padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: .4px; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(23px, 6vw, 34px);
  font-weight: 900; line-height: 1.3; letter-spacing: -.4px; margin-bottom: 10px;
}
.hero h1 .hl {
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  position: relative;
}
.hero-sub { font-size: 14.5px; color: rgba(255,255,255,.9); max-width: 620px; margin-bottom: 18px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-tag {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}

/* 搜索条 */
.search-bar {
  display: flex; gap: 0; max-width: 640px;
  background: #fff; border-radius: 999px; padding: 5px 5px 5px 8px;
  box-shadow: 0 10px 30px rgba(6,20,60,.28);
}
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 11px 14px; font-size: 15px; color: var(--ink);
}
.search-bar input::placeholder { color: var(--ink-4); }
.search-bar button {
  border: none; border-radius: 999px;
  background: var(--grad-gold); color: #4a2c00;
  font-weight: 800; font-size: 14.5px; padding: 0 22px;
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
  transition: transform .15s;
}
.search-bar button:active { transform: scale(.97); }
.search-hints { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.search-hint {
  font-size: 12px; color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.search-hint:active { background: rgba(255,255,255,.24); }

/* ========== 通用区块 ========== */
.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 18px 8px; }
.section { margin-bottom: 26px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 18px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
  content: ''; width: 4px; height: 17px; border-radius: 3px;
  background: var(--grad-gold);
}
.section-head .hint { font-size: 12.5px; color: var(--ink-3); }
.section-head .more { font-size: 12.5px; color: var(--brand); font-weight: 600; cursor: pointer; }

/* ========== 卡片网格（模块） ========== */
.grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 17px; box-shadow: var(--shadow-xs);
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.card:active { transform: translateY(-1px); }
.card .accent-line {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 0 4px 4px 0;
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  margin-bottom: 11px;
}
.card h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 5px; color: var(--ink); }
.card p { font-size: 12.8px; color: var(--ink-2); line-height: 1.6; margin-bottom: 11px; }
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3);
}
.card-badge {
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
}

/* ========== 统计条 ========== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.stat-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 10px; text-align: center; box-shadow: var(--shadow-xs);
}
.stat-box .v { font-size: 20px; font-weight: 900; color: var(--brand-dark); line-height: 1.2; }
.stat-box .v.gold { color: var(--gold-strong); }
.stat-box .v.green { color: var(--green-strong); }
.stat-box .k { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* ========== 学习路径（时间轴） ========== */
.stage-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.stage-tab {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
}
.stage-tab.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(37,99,235,.28); }

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--blue-300), var(--gold), var(--green));
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot {
  position: absolute; left: -30px; top: 16px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--blue-500);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: var(--blue-700);
  z-index: 2;
}
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tl-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow-xs); cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.tl-card:hover { transform: translateX(3px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.tl-card h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 4px; }
.tl-card .desc { font-size: 12.8px; color: var(--ink-2); margin-bottom: 9px; }
.tl-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); }
.stage-pill {
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
}
.stage-pill.入门 { background: var(--green-soft); color: var(--green-strong); }
.stage-pill.进阶 { background: var(--gold-soft); color: var(--gold-ink); }
.stage-pill.实战 { background: var(--blue-100); color: var(--blue-800); }

/* ========== 列表项（文章 / 术语） ========== */
.list { display: grid; gap: 10px; }
.list-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.list-item:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.list-item h4 { font-size: 14.8px; font-weight: 700; margin-bottom: 5px; color: var(--ink); }
.list-item .summary { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 8px; }
.list-item .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--ink-3); }
.tag {
  background: #f1f5f9; color: var(--ink-2); padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}
.tag.blue { background: var(--brand-soft); color: var(--brand-dark); }

/* 术语词典 */
.glossary-grid { display: grid; gap: 9px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gloss-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; border-left: 3px solid var(--blue-400);
}
.gloss-item .t { font-size: 14.5px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gloss-item .en { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.gloss-item .cat {
  font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-ink);
}
.gloss-item .def { font-size: 12.8px; color: var(--ink-2); margin-top: 6px; line-height: 1.65; }
.cat-filter { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-chip {
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
}
.cat-chip.active { background: var(--brand); color: #fff; border-color: transparent; }

/* ========== 自测 ========== */
.quiz-intro {
  background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
  border: 1px solid #dbeafe; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
}
.quiz-intro h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 6px; color: var(--brand-deep); }
.quiz-intro p { font-size: 13px; color: var(--ink-2); }
.quiz-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-xs); margin-bottom: 14px;
}
.quiz-q { font-size: 15.5px; font-weight: 800; margin-bottom: 14px; color: var(--ink); display: flex; gap: 9px; }
.quiz-q .no {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px;
  background: var(--grad-brand); color: #fff; font-size: 12.5px;
  display: grid; place-items: center; font-weight: 800;
}
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #fff; font-size: 13.8px; color: var(--ink);
  cursor: pointer; transition: all .15s; text-align: left; width: 100%;
}
.quiz-opt:hover { border-color: var(--blue-300); background: var(--blue-50); }
.quiz-opt .k {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: #f1f5f9; color: var(--ink-2); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.quiz-opt.right { border-color: var(--green); background: var(--green-soft); }
.quiz-opt.right .k { background: var(--green); color: #fff; }
.quiz-opt.wrong { border-color: var(--up); background: var(--up-soft); }
.quiz-opt.wrong .k { background: var(--up); color: #fff; }
.quiz-explain {
  margin-top: 11px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: #f8fafc; border-left: 3px solid var(--brand); font-size: 13px; color: var(--ink-2);
}
.quiz-explain b { color: var(--brand-dark); }
.quiz-score {
  background: var(--grad-hero); color: #fff; border-radius: var(--radius);
  padding: 22px; text-align: center; margin-bottom: 16px;
}
.quiz-score .big { font-size: 40px; font-weight: 900; line-height: 1; }
.quiz-score .big .hl { color: #fbbf24; }
.quiz-score .lbl { font-size: 13.5px; opacity: .9; margin-top: 6px; }

/* ========== 文章详情 ========== */
.article-view {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow-sm); max-width: 780px; margin: 0 auto;
}
.article-view h2 { font-size: 21px; font-weight: 900; line-height: 1.4; margin-bottom: 10px; color: var(--ink); }
.article-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.article-body { font-size: 15px; line-height: 1.9; color: #24303f; }
.article-body p { margin-bottom: 15px; }
.article-body strong { color: var(--brand-dark); font-weight: 700; }
.article-body em { color: var(--gold-strong); font-style: normal; font-weight: 600; }

/* 面包屑 / 返回 */
.crumb-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
}
.back-btn:hover { border-color: var(--blue-300); color: var(--brand); }
.crumb-path { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 资讯 ========== */
.news-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 18px; box-shadow: var(--shadow-xs); }
.news-row { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; }
.news-row:last-child { border-bottom: none; }
.news-row .time { font-family: ui-monospace, "SF Mono", Consolas, monospace; color: var(--ink-3); font-size: 12px; flex-shrink: 0; }
.news-row .cat { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.news-row .txt { flex: 1; color: var(--ink); }
.news-row .src { font-size: 11.5px; color: var(--ink-4); flex-shrink: 0; }
.cat-宏观 { background: #dbeafe; color: #1e40af; }
.cat-政策 { background: #ede9fe; color: #6d28d9; }
.cat-资金 { background: #d1fae5; color: #047857; }
.cat-板块 { background: #fef3c7; color: #b45309; }
.cat-公司 { background: #ffe4e6; color: #be123c; }
.cat-盘面 { background: #f1f5f9; color: #475569; }
.cat-制度 { background: #e0e7ff; color: #4338ca; }
.cat-数据 { background: #cffafe; color: #0e7490; }
.cat-风险 { background: #fee2e2; color: #b91c1c; }

/* 每日更新的提示标签 */
.section-head .hint.live {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand-dark); background: var(--brand-soft);
  padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 11.5px;
}
.section-head .hint.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,.06); }
}
.news-note {
  margin-top: 10px; font-size: 11.5px; color: var(--ink-4);
  line-height: 1.6; padding-left: 2px;
}
.news-empty { padding: 22px 0; text-align: center; color: var(--ink-4); font-size: 13px; }

/* ========== 底部导航 ========== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
  display: flex; justify-content: space-around; align-items: stretch;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(15,23,42,.06);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0; border: none; background: none;
  color: var(--ink-3); font-size: 11px; font-weight: 600;
  border-radius: var(--radius-sm); transition: color .15s;
}
.tab .ic { font-size: 19px; line-height: 1; }
.tab.active { color: var(--brand-dark); }
.tab.active .ic { transform: translateY(-1px); }
.tab.active::after {
  content: ''; position: absolute; bottom: 4px; width: 18px; height: 3px;
  border-radius: 2px; background: var(--grad-gold);
}
.tab { position: relative; }

/* ========== 弹窗 ========== */
.mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.5); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.mask.active { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 400px;
  padding: 26px 22px; box-shadow: var(--shadow-lg);
  animation: popIn .26s cubic-bezier(.2,.9,.3,1.2);
  max-height: 92vh; overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97) } to { opacity: 1; transform: none } }
.modal h3 { font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.modal .desc { font-size: 13.2px; color: var(--ink-2); margin-bottom: 20px; line-height: 1.65; }
.modal label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field {
  width: 100%; padding: 12px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #f8fafc;
  font-size: 15.5px; color: var(--ink); outline: none; transition: border-color .15s, background .15s;
  letter-spacing: .5px;
}
.field:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field::placeholder { color: var(--ink-4); letter-spacing: normal; }
.code-row { display: flex; gap: 9px; }
.code-row .field { flex: 1; }
.code-btn {
  flex-shrink: 0; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand); background: var(--brand-soft); color: var(--brand-dark);
  font-size: 13.5px; font-weight: 800; white-space: nowrap;
}
.code-btn:disabled { border-color: var(--border); background: #f1f5f9; color: var(--ink-4); cursor: not-allowed; }
.btn {
  width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 800; transition: transform .14s, box-shadow .14s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,.32); }
.btn-gold { background: var(--grad-gold); color: #4a2c00; box-shadow: 0 6px 18px rgba(245,158,11,.32); }
.btn-ghost { background: #f1f5f9; color: var(--ink-2); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.tip { font-size: 12px; color: var(--ink-3); margin-top: 14px; line-height: 1.6; }
.link-inline { color: var(--brand); font-weight: 700; cursor: pointer; background: none; border: none; font-size: inherit; padding: 0; }

/* 分享引导（非阻塞） */
.share-steps { display: grid; gap: 10px; margin: 14px 0; }
.share-step {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--blue-50); border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.share-step .n {
  flex-shrink: 0; width: 23px; height: 23px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 800;
  display: grid; place-items: center;
}
.share-step p { font-size: 13.2px; color: var(--ink-2); line-height: 1.6; }
.share-link-box {
  background: #f8fafc; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 11px 14px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  color: var(--brand-dark); word-break: break-all; user-select: all; margin: 12px 0; text-align: center;
}

/* QR */
.qr-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: inline-block; margin: 6px auto 12px;
  box-shadow: var(--shadow-sm);
}

/* ========== Toast ========== */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 3000; max-width: min(88vw, 400px);
  background: rgba(15,23,42,.94); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastIn .26s ease;
  display: flex; align-items: center; gap: 8px; text-align: center;
}
.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error { background: linear-gradient(135deg, #be123c, #e11d48); }
.toast.gold { background: linear-gradient(135deg, #d97706, #f59e0b); color: #3a2000; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) } to { opacity: 1; transform: translate(-50%, 0) } }

/* ========== 空状态 ========== */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty .ic { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.empty .t { font-size: 14.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.empty .d { font-size: 13px; }

/* ========== 页脚 ========== */
.foot {
  text-align: center; padding: 26px 20px 34px; color: var(--ink-3); font-size: 12.5px;
  line-height: 1.8;
}
.foot .disc { margin-bottom: 8px; }
.foot a { color: var(--ink-3); }
.foot .badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.foot .badge {
  font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); color: var(--ink-2);
}

/* ========== 后台管理 ========== */
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-head h1 { font-size: 21px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 13px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 17px; box-shadow: var(--shadow-xs);
}
.stat-card .label { font-size: 12.5px; color: var(--ink-3); margin-bottom: 7px; }
.stat-card .value { font-size: 26px; font-weight: 900; color: var(--brand-dark); }
.stat-card .value.up { color: var(--up); }
.stat-card .value.gold { color: var(--gold-strong); }
.stat-card .value.green { color: var(--green-strong); }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-xs); }
.panel h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 11px 12px; font-size: 12px; font-weight: 700; color: var(--ink-3); border-bottom: 1.5px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; color: var(--ink-2); }
tr:hover td { background: #f8fafc; }
.table-scroll { overflow-x: auto; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar { width: 100%; max-width: 42px; border-radius: 6px 6px 0 0; background: var(--grad-brand); transition: height .4s; min-height: 3px; }
.bar-lbl { font-size: 10.5px; color: var(--ink-3); }
.kw-list { display: grid; gap: 8px; }
.kw-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.kw-row .name { min-width: 96px; color: var(--ink-2); font-weight: 600; }
.kw-row .bar-bg { flex: 1; height: 9px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.kw-row .bar-fill { height: 100%; border-radius: 999px; background: var(--grad-gold); }
.kw-row .cnt { font-size: 12px; color: var(--ink-3); min-width: 34px; text-align: right; }

/* ========== 响应式 ========== */
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .navbar { padding: 10px 14px; }
  .brand-name { font-size: 15.5px; }
  .hero { padding: 26px 16px 24px; }
  .wrap { padding: 16px 14px 6px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 14px; }
  .card-icon { width: 38px; height: 38px; font-size: 18px; margin-bottom: 9px; }
  .card h3 { font-size: 14.2px; }
  .card p { font-size: 11.8px; }
  .stats-row { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .stat-box { padding: 10px 5px; }
  .stat-box .v { font-size: 16px; }
  .stat-box .k { font-size: 10px; }
  .article-view { padding: 18px 15px; }
  .article-view h2 { font-size: 18.5px; }
  .glossary-grid { grid-template-columns: 1fr; }
  .quota-chip, .user-chip { padding: 5px 10px; font-size: 11.5px; }
  .quiz-score .big { font-size: 34px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
