/* =============================================================================
 *  style.css —— 现代简约风格网页简历
 *  衬线中文正文 + 蓝色主色 + 玻璃拟态卡片 + 时间线
 *  纯静态：无任何外部字体 / CDN 请求
 * ========================================================================== */

/* ------------------------------------------------------------------ 设计令牌 */
:root {
  --primary: #0071E3;
  --primary-rgb: 0, 113, 227;
  --secondary: #1D1D1F;
  --secondary-rgb: 29, 29, 31;

  --text: #1D1D1F;
  --text-strong: #1D1D1F;
  --text-soft: #2C2C2E;
  --text-muted: #86868B;

  --bg: #F5F5F7;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.16);
  --particle-line: rgba(0, 113, 227, 0.22);
  --particle-dot: rgba(0, 113, 227, 0.55);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", "Source Han Serif SC",
                "PingFang SC", "Microsoft YaHei", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-code: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas,
               "Courier New", monospace;

  --max-width: 1000px;
  --radius: 20px;
  --radius-sm: 12px;
  --speed: 0.4s;
}

html[data-theme="dark"] {
  --secondary: #F5F5F7;
  --secondary-rgb: 245, 245, 247;

  --text: #E8E8ED;
  --text-strong: #F5F5F7;
  --text-soft: #DADAE0;
  --text-muted: #9A9AA2;

  --bg: #0B0B0D;
  --bg-elevated: #16161A;
  --surface: #17171C;
  --surface-glass: rgba(28, 28, 33, 0.72);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --particle-line: rgba(80, 160, 255, 0.28);
  --particle-dot: rgba(120, 185, 255, 0.7);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* 全局兜底：hidden 属性必须真的隐藏（否则会和 display:grid/flex 打架） */
[hidden] { display: none !important; }

/* -------------------------------------------------------------------- 基础 */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  font-feature-settings: "palt";
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--speed) ease, color var(--speed) ease;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: var(--primary); text-decoration: none; transition: color var(--speed) ease, opacity var(--speed) ease; }
a:hover { color: var(--secondary); opacity: 0.85; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(var(--primary-rgb), 0.2); }

/* ------------------------------------------------------------------ Hero */
#hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0 20px;
}

/* 头像 + 姓名的容器。屏幕上竖排居中；
   打印时 print.css 会把它改成横排（头像与姓名并排省高度）。
   注意：这里必须显式设成 flex，不能省。
   如果只是让它保持默认的 display:block，它作为 flex column 的子元素会被
   align-items: center 撑到满宽，里面宽度由内容决定的 .avatar-ring 就会被甩到左边
   —— 表现就是「头像相对下面的姓名偏左」。 */
#hero .hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.avatar-ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin-bottom: 26px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(140deg, rgba(var(--primary-rgb), 0.9), rgba(var(--primary-rgb), 0.1));
  animation: float 6s ease-in-out infinite;
}

.avatar-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  animation: glow 4s ease-in-out infinite;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  /* 取景已经在上传时就裁进图片本身了（见 helpers.cropRectFor），
     所以这里不再需要偏移。以前这里写死 50% 8%，
     等于把某一张照片的构图硬编码进 CSS，换张照片就歪。 */
  object-position: 50% 50%;
  background-color: var(--bg-elevated);
  display: block;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0;
}

#hero .name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.1;
  letter-spacing: -0.03em;
  animation: float 6s ease-in-out infinite;
}

#hero .name .last-name { color: var(--primary); }

#hero .headline {
  margin: 14px 0 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--text-muted);
  font-weight: 400;
  max-width: 44em;
}

#hero .intent {
  margin: 18px 0 0;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: 500;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  padding: 8px 18px;
  border-radius: 999px;
  animation: float 6s ease-in-out infinite;
  animation-delay: 0.2s;
}

#hero .contact-info {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  color: var(--text-muted);
}

#hero .contact-info .contact-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
}

#hero .contact-info .contact-item svg { width: 1.05em; height: 1.05em; color: var(--primary); flex: none; }

/* --------------------------------------------------------------- 分数条 */
.scores {
  width: 100%;
  max-width: 720px;
  margin: 32px auto 0;
  padding: 18px 22px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: float 6s ease-in-out infinite;
  animation-delay: 0.35s;
}

.scores-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--font-sans);
}

.scores-head .scores-title { font-size: 0.85rem; letter-spacing: 0.14em; color: var(--text-muted); }
.scores-head .scores-total { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.scores-head .scores-total span { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); margin-right: 6px; }

.scores-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.score-chip {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-soft);
  background: rgba(var(--secondary-rgb), 0.05);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.score-chip b { color: var(--primary); font-weight: 600; margin-left: 6px; }

/* ---------------------------------------------------------------- 导航锚点 */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.nav-pill {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.nav-pill:hover, .nav-pill.is-active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.18);
  opacity: 1;
}

/* ------------------------------------------------------------------ 区块 */
.resume-section {
  padding: 44px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 70px;
}

.resume-section:last-of-type { border-bottom: none; }

.section-title {
  position: relative;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  padding-bottom: 14px;
  margin-bottom: 34px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.resume-section:hover .section-title::after { width: 108px; }

/* --------------------------------------------------------------- 时间线 */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item { position: relative; margin-bottom: 26px; }

.timeline-icon {
  position: absolute;
  left: -45px;
  top: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: glow 3.4s ease-in-out infinite;
}

.timeline-icon svg { width: 15px; height: 15px; }
.timeline-icon img { width: 100%; height: 100%; object-fit: cover; }

.timeline-content {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateX(8px);
  box-shadow: var(--glass-shadow), 0 0 20px rgba(var(--primary-rgb), 0.12);
}

.timeline-content h3 { font-size: 1.28rem; color: var(--text-strong); margin-bottom: 6px; }

.timeline-date {
  float: right;
  font-family: var(--font-code);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--text-muted);
  background: rgba(var(--secondary-rgb), 0.06);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.timeline-content .degree { font-size: 1.06rem; color: var(--primary); margin-bottom: 4px; }
.timeline-content .location { font-size: 0.88rem; color: var(--text-muted); }

/* ------------------------------------------------------------------ 卡片 */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 30px 32px;
  margin-bottom: 26px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }

.card-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
}

.card-icon svg { width: 19px; height: 19px; }
.card-icon img { width: 100%; height: 100%; object-fit: cover; }

.card-head-text { flex: 1 1 auto; min-width: 0; }

.card-header h3 {
  font-size: 1.3rem;
  color: var(--text-strong);
  line-height: 1.45;
  margin-bottom: 4px;
}

.card .job-title { display: block; font-family: var(--font-sans); font-size: 0.98rem; font-weight: 500; color: var(--primary); margin-top: 4px; }
.card .job-date, .card .job-location { font-family: var(--font-code); font-size: 0.8rem; letter-spacing: 0; color: var(--text-muted); }
.card .job-date { flex: none; background: rgba(var(--secondary-rgb), 0.06); border: 1px solid var(--border); padding: 2px 9px; border-radius: 6px; white-space: nowrap; }

.blocks { list-style: none; padding: 0; margin: 0; }

.blocks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.blocks li:last-child { margin-bottom: 0; }

.blocks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.blocks li .block-label {
  display: block;
  font-weight: 600;
  color: var(--text-strong);
  font-size: 1.06rem;
  margin-bottom: 4px;
  position: relative;
}

.blocks li .block-label::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 4px;
  border-radius: 1px;
  background: var(--primary);
  opacity: 0.35;
}

.blocks li .block-text { display: block; }

/* ------------------------------------------------------- 技能标签 / 列表 */
.skills-grid { display: flex; flex-direction: column; gap: 24px; }

.skills-group-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tag-container { display: flex; flex-wrap: wrap; gap: 10px 12px; }

.skill-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  color: var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.18); }

.skill-tag.main-skill {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.22);
}

.skill-tag.aux-skill {
  background: rgba(var(--secondary-rgb), 0.05);
  border-color: var(--border);
  color: var(--text-muted);
}

.skill-tag.aux-skill:hover { box-shadow: var(--shadow-sm); }

.list-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }

.list-items li {
  position: relative;
  padding-left: 22px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.list-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.list-items .item-title { font-weight: 600; color: var(--text-strong); margin-right: 8px; }
.list-items .item-title::after { content: "｜"; color: var(--primary); opacity: 0.6; }

/* 区块进入动画：由 render.js 在元素真正滚入视口时临时挂上 .reveal 播放，播完摘掉。
   默认状态一定是可见的（没有这个类 = 没有任何透明度/位移），
   所以 JS 失效、打印、锚点跳转等情况下都不会出现「内容空白」。 */
.reveal {
  animation: reveal-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ 页脚 */
#page-footer {
  flex: none;
  margin-top: 40px;
  padding: 34px 15px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

#page-footer p { margin: 0 0 5px; }

/* ------------------------------------------------------------- 悬浮入口 */
.fab-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

.fab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.42); }
.fab:active { transform: translateY(0) scale(0.98); }
.fab-icon { width: 20px; height: 20px; stroke: currentColor; }
.fab-icon .accent { opacity: 0.85; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.icon-btn:hover { transform: translateY(-2px); color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; }

#theme-toggle .i-moon { display: none; }
html[data-theme="dark"] #theme-toggle .i-sun { display: none; }
html[data-theme="dark"] #theme-toggle .i-moon { display: block; }

/* --------------------------------------------------------------- 抽屉 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.overlay.is-open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(1180px, 94vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.22);
  font-family: var(--font-sans);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer.is-open { transform: none; }

.drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 { font-size: 1.15rem; color: var(--text-strong); }
.drawer-head-actions { display: flex; align-items: center; gap: 12px; }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: rgba(var(--secondary-rgb), 0.06); border: 1px solid var(--border); border-radius: 999px; }

.seg-btn {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.seg-btn.is-active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(320px, 1.25fr) minmax(230px, 0.8fr);
  gap: 0;
  overflow: hidden;
}

.drawer-body[data-panel="settings"] {
  display: block;
  overflow-y: auto;
  padding: 22px;
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
  gap: 14px;
  overflow: hidden;
}

.pane + .pane { border-left: 1px solid var(--border); }

.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; flex-wrap: wrap; }
.pane-head h3 { font-size: 0.95rem; color: var(--text-strong); }
.pane-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hint { flex: none; margin: 0; font-size: 0.82rem; line-height: 1.65; color: var(--text-muted); }
.hint code, .setting-group code {
  font-family: var(--font-code);
  font-size: 0.85em;
  background: rgba(var(--secondary-rgb), 0.07);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--primary);
}

.link-btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--primary);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.link-btn:hover { border-bottom-color: currentColor; }

#raw-input {
  flex: 1 1 auto;
  min-height: 180px;
  width: 100%;
  resize: none;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.75;
  letter-spacing: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#raw-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14); }

.pane-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

/* 结果多的时候按钮被挤出可视区，这里让操作区背景实心、始终贴在面板底部 */
.pane-review .pane-foot {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  z-index: 2;
}

/* 给末尾留一点空隙，避免最后一个分组被吸底操作区压住 */
.pane-review .review-list { padding-bottom: 6px; }

.parse-status, .apply-status { font-size: 0.8rem; color: var(--text-muted); min-height: 1.2em; line-height: 1.5; }
.parse-status[data-state="ok"] { color: var(--primary); }
.parse-status[data-state="warn"] { color: #B26A00; }
html[data-theme="dark"] .parse-status[data-state="warn"] { color: #E0A458; }
.parse-status[data-state="err"], .apply-status.is-err { color: #C7362F; }
html[data-theme="dark"] .parse-status[data-state="err"], html[data-theme="dark"] .apply-status.is-err { color: #FF7A72; }
.apply-status.is-ok { color: var(--primary); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-icon { width: 17px; height: 17px; }

.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 3px 12px rgba(var(--primary-rgb), 0.28); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.36); }

.btn.ghost { background: transparent; color: var(--text-soft); border-color: var(--border-strong); }
.btn.ghost:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); background: rgba(var(--primary-rgb), 0.06); }

.btn.danger { background: transparent; color: #C7362F; border-color: rgba(199, 54, 47, 0.4); }
html[data-theme="dark"] .btn.danger { color: #FF7A72; border-color: rgba(255, 122, 114, 0.4); }
.btn.danger:hover:not(:disabled) { background: rgba(199, 54, 47, 0.08); }

/* --------------------------------------------------------- 识别结果列表 */
.review-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 30px 20px;
}

.empty-state svg { width: 40px; height: 40px; color: var(--primary); opacity: 0.4; margin-bottom: 10px; }
.empty-state p { margin: 0; }

/* 分组卡片：头部只放「勾选框 + 标题/摘要 + 折叠箭头」，
   标题独占一行宽度，不会再被计数文字挤成竖排 */
.review-group {
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.review-group:not(.is-collapsed) {
  border-color: rgba(var(--primary-rgb), 0.28);
  box-shadow: 0 1px 8px rgba(var(--primary-rgb), 0.07);
}

.review-group.is-unchecked { opacity: 0.62; }

/* 现有模块（本次没识别到）：左侧一道浅色标记，和识别结果区分开 */
.pane-review .review-group.is-existing { border-left: 3px solid rgba(var(--secondary-rgb), 0.22); }
.pane-review .review-group.is-existing .group-title { color: var(--text-muted); }

.review-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.review-note b { color: var(--text-strong); font-weight: 600; }

.review-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: rgba(var(--primary-rgb), 0.045);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.18s ease;
}

.review-group-head:hover { background: rgba(var(--primary-rgb), 0.08); }

.group-head-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-group-head .group-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.review-group-head .group-summary {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.review-group.is-fully-checked .group-summary { color: var(--primary); }
.review-group.is-unchecked .group-summary { color: #B26A00; }
html[data-theme="dark"] .review-group.is-unchecked .group-summary { color: #E0A458; }

.group-toggle {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.18s ease, color 0.18s ease;
}

.group-toggle:hover { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
.group-toggle svg { width: 16px; height: 16px; }
.review-group.is-collapsed .group-toggle { transform: rotate(-90deg); }

/* 折叠：只留头部 */
.review-group.is-collapsed .review-fields { display: none; }

.review-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

/* 单个字段：第一行勾选框+字段名+状态，第二行输入框铺满整行 */
.review-field { display: block; min-width: 0; }

.review-field + .review-field {
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.field-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.field-head .check { margin: 0; }

.field-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-badge {
  flex: none;
  font-size: 0.68rem;
  line-height: 1.6;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.16);
}

.review-field.is-missing .field-badge {
  color: #C7362F;
  background: rgba(199, 54, 47, 0.09);
  border-color: rgba(199, 54, 47, 0.22);
}

html[data-theme="dark"] .review-field.is-missing .field-badge { color: #FF7A72; }

.field-input,
.review-field textarea,
.review-field input[type="text"],
.review-field select {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 4.2em;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-input:focus,
.review-field textarea:focus,
.review-field input:focus,
.review-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.review-field.is-missing .field-input,
.review-field.is-missing textarea {
  border-color: rgba(199, 54, 47, 0.5);
  background: rgba(199, 54, 47, 0.045);
}

.field-hint {
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.field-warn { font-size: 0.72rem; color: #C7362F; }
html[data-theme="dark"] .field-warn { color: #FF7A72; }

.check {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 17px;
  height: 17px;
  margin: 8px 0 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.check:checked { background: var(--primary); border-color: var(--primary); }

.check:checked::after {
  content: "";
  position: absolute;
  left: 4.6px;
  top: 1.4px;
  width: 4.5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check:indeterminate { background: var(--primary); border-color: var(--primary); }
.check:indeterminate::after {
  content: "";
  position: absolute;
  left: 3.4px;
  top: 7px;
  width: 8px;
  height: 0;
  border: solid #fff;
  border-width: 0 0 2px 0;
  transform: none;
}

/* ---------------------------------------------------------- 实时迷你预览 */
.pane-mini { background: rgba(var(--secondary-rgb), 0.035); }

.mini-badge {
  font-size: 0.72rem;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  padding: 2px 9px;
  border-radius: 999px;
}

.mini-badge.is-dirty { color: #B26A00; background: rgba(178, 106, 0, 0.1); border-color: rgba(178, 106, 0, 0.24); }

.mini-frame {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 12px;
  overscroll-behavior: contain;
}

/* 缩略预览：内层固定 720px 宽，再由 render.js 用 CSS zoom 等比缩小。
   这里不要用 transform: scale() —— 缩放后的元素在布局上仍占原尺寸，
   浏览器会认为它「不可见」而直接不绘制，面板会变成空白。 */
.mini-scale {
  transform-origin: top left;
}

#mini-preview .mini-inner { width: 720px; }
#mini-preview .container { width: 100%; max-width: none; padding: 0 18px; }
#mini-preview #hero { min-height: auto; padding: 22px 0 6px; }
#mini-preview .avatar-ring { width: 62px; height: 62px; margin-bottom: 12px; }
#mini-preview .avatar-fallback { font-size: 1.3rem; }
#mini-preview #hero .name { font-size: 1.9rem; animation: none; }
#mini-preview #hero .headline { font-size: 0.78rem; margin-top: 8px; }
#mini-preview #hero .intent { font-size: 0.72rem; padding: 4px 12px; margin-top: 10px; }
#mini-preview #hero .contact-info { font-size: 0.72rem; gap: 6px 14px; margin-top: 12px; }
#mini-preview .scores { padding: 10px 14px; margin-top: 14px; animation: none; }
#mini-preview .scores-head { margin-bottom: 8px; }
#mini-preview .scores-head .scores-total { font-size: 1.1rem; }
#mini-preview .score-chip { font-size: 0.7rem; padding: 3px 9px; }
#mini-preview .section-nav { position: static; padding: 6px 0; }
#mini-preview .nav-pill { font-size: 0.68rem; padding: 3px 9px; }
#mini-preview .resume-section { padding: 16px 0; }
#mini-preview .section-title { font-size: 1.05rem; padding-bottom: 8px; margin-bottom: 14px; }
#mini-preview .section-title::after { width: 30px; height: 2px; }
#mini-preview .timeline { padding-left: 18px; }
#mini-preview .timeline-icon { left: -30px; width: 20px; height: 20px; border-width: 1.5px; animation: none; }
#mini-preview .timeline-icon svg { width: 11px; height: 11px; }
#mini-preview .timeline-content { padding: 12px 14px; border-radius: 12px; }
#mini-preview .timeline-content h3 { font-size: 0.88rem; }
#mini-preview .timeline-date, #mini-preview .card .job-date { font-size: 0.62rem; padding: 1px 6px; }
#mini-preview .timeline-content .degree { font-size: 0.76rem; }
#mini-preview .timeline-content .location, #mini-preview .card .job-location { font-size: 0.66rem; }
#mini-preview .card { padding: 14px 16px; margin-bottom: 12px; border-radius: 12px; }
#mini-preview .card-icon { width: 24px; height: 24px; font-size: 0.7rem; }
#mini-preview .card-icon svg { width: 13px; height: 13px; }
#mini-preview .card-header h3 { font-size: 0.9rem; }
#mini-preview .card .job-title { font-size: 0.74rem; }
#mini-preview .blocks li, #mini-preview .list-items li { font-size: 0.76rem; line-height: 1.65; margin-bottom: 8px; padding-left: 14px; }
#mini-preview .blocks li::before, #mini-preview .list-items li::before { width: 5px; height: 5px; top: 7px; }
#mini-preview .blocks li .block-label { font-size: 0.78rem; }
#mini-preview .skills-grid { gap: 12px; }
#mini-preview .skills-group-title { font-size: 0.68rem; margin-bottom: 6px; }
#mini-preview .skill-tag { font-size: 0.68rem; padding: 4px 10px; }
#mini-preview .tag-container { gap: 6px; }
#mini-preview #page-footer { padding: 14px; font-size: 0.66rem; margin-top: 14px; }
#mini-preview .reveal { animation: none; }

/* ---------------------------------------------------------------- 设置页 */
.setting-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.setting-group:last-child { border-bottom: none; }
.setting-group h3 { font-size: 1rem; color: var(--text-strong); margin-bottom: 10px; }
.setting-group .hint { margin-bottom: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; flex: 1 1 220px; }
.field label { font-size: 0.78rem; color: var(--text-muted); }

.field input, .field select {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.13); }

.field-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------------------------------------------- 头像上传 */
.avatar-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.avatar-preview {
  flex: none;
  width: 96px;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(var(--secondary-rgb), 0.05) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-preview img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
.avatar-preview .avatar-preview-empty {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
}

.avatar-actions { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* -------------------------------------------------------- 模块管理 */
.new-module-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.new-module-row .field { margin-bottom: 0; }
.new-module-row .btn { flex: none; margin-bottom: 1px; }

.module-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.module-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.module-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(var(--secondary-rgb), 0.035);
  cursor: pointer;
  user-select: none;
}

.module-card-head:hover { background: rgba(var(--primary-rgb), 0.06); }

.module-order {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.module-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-tag {
  flex: none;
  font-size: 0.68rem;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(var(--secondary-rgb), 0.07);
  border: 1px solid var(--border);
}

.module-tools { flex: none; display: flex; gap: 2px; }

.module-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.module-btn:hover { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.module-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.module-btn svg { width: 15px; height: 15px; }
.module-btn.is-danger:hover { background: rgba(199, 54, 47, 0.12); color: #C7362F; }

.module-body { padding: 14px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.module-card.is-collapsed .module-body { display: none; }
.module-card.is-collapsed .module-caret { transform: rotate(-90deg); }

.module-caret { width: 15px; height: 15px; transition: transform 0.2s ease; color: var(--text-muted); }

.module-field { display: flex; flex-direction: column; gap: 6px; }
.module-field > label { font-size: 0.76rem; color: var(--text-muted); }

.module-field input[type="text"],
.module-field textarea,
.module-field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 10px;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.module-field textarea { min-height: 5em; }

.module-field input:focus, .module-field textarea:focus, .module-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.module-field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.module-field-row .module-field { flex: 1 1 140px; }

/* 模块内容编辑器：每个条目一张小卡 */
.module-editor { display: flex; flex-direction: column; gap: 10px; }

.module-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.module-item-index {
  flex: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 5px;
  padding: 1px 6px;
}

.module-item-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-add-btn { align-self: flex-start; }

/* 模块管理的元素每次重建后，折叠状态由 is-collapsed 控制 */
.module-card.is-collapsed .module-body { display: none; }

.module-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* 页面上的「删除这个模块」小按钮：只在鼠标经过该区块时出现，打印时隐藏 */
.section-remove {
  position: absolute;
  top: 10px;
  right: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.resume-section:hover .section-remove { opacity: 1; }
.section-remove:hover { color: #C7362F; border-color: rgba(199, 54, 47, 0.4); }
.section-remove svg { width: 15px; height: 15px; }
.resume-section { position: relative; }

/* ------------------------------------------------- 背景效果选择卡片 */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.effect-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.effect-card:hover { transform: translateY(-2px); border-color: rgba(var(--primary-rgb), 0.4); }

.effect-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.13);
}

/* 小预览缩略图：用纯 CSS 画，不额外加载图片 */
.effect-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(var(--primary-rgb), 0.07);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  position: relative;
  overflow: hidden;
}

.effect-thumb i {
  position: absolute;
  display: block;
  background: var(--primary);
}

/* 粒子连线：几个点 + 一条斜线 */
.effect-thumb.t-network i:nth-child(1) { width: 5px; height: 5px; border-radius: 50%; left: 7px; top: 9px; opacity: 0.85; }
.effect-thumb.t-network i:nth-child(2) { width: 4px; height: 4px; border-radius: 50%; right: 8px; top: 22px; opacity: 0.6; }
.effect-thumb.t-network i:nth-child(3) { width: 3px; height: 3px; border-radius: 50%; left: 16px; bottom: 8px; opacity: 0.5; }
.effect-thumb.t-network i:nth-child(4) { width: 30px; height: 1px; left: 8px; top: 17px; transform: rotate(-28deg); opacity: 0.35; }
.effect-thumb.t-network i:nth-child(5) { width: 22px; height: 1px; left: 14px; top: 27px; transform: rotate(22deg); opacity: 0.3; }

/* 气泡上浮：三个空心圆 */
.effect-thumb.t-bubbles i { border-radius: 50%; background: none; border: 1.5px solid var(--primary); }
.effect-thumb.t-bubbles i:nth-child(1) { width: 13px; height: 13px; left: 8px; top: 20px; opacity: 0.7; }
.effect-thumb.t-bubbles i:nth-child(2) { width: 9px; height: 9px; right: 8px; top: 9px; opacity: 0.55; }
.effect-thumb.t-bubbles i:nth-child(3) { width: 6px; height: 6px; right: 16px; bottom: 7px; opacity: 0.4; }

/* 星空：大小不一的实心点 */
.effect-thumb.t-starfield i { border-radius: 50%; }
.effect-thumb.t-starfield i:nth-child(1) { width: 3px; height: 3px; left: 8px; top: 8px; }
.effect-thumb.t-starfield i:nth-child(2) { width: 2px; height: 2px; left: 22px; top: 14px; opacity: 0.7; }
.effect-thumb.t-starfield i:nth-child(3) { width: 4px; height: 4px; right: 9px; top: 7px; opacity: 0.9; }
.effect-thumb.t-starfield i:nth-child(4) { width: 2px; height: 2px; left: 12px; bottom: 12px; opacity: 0.6; }
.effect-thumb.t-starfield i:nth-child(5) { width: 3px; height: 3px; right: 13px; bottom: 9px; opacity: 0.8; }
.effect-thumb.t-starfield i:nth-child(6) { width: 2px; height: 2px; left: 26px; bottom: 20px; opacity: 0.5; }

/* 声波：三条波浪线 */
.effect-thumb.t-waves i {
  height: 2px; left: 5px; right: 5px; background: none;
  border-top: 2px solid var(--primary); border-radius: 50%;
}
.effect-thumb.t-waves i:nth-child(1) { top: 12px; opacity: 0.75; }
.effect-thumb.t-waves i:nth-child(2) { top: 20px; opacity: 0.5; }
.effect-thumb.t-waves i:nth-child(3) { top: 28px; opacity: 0.3; }

/* 流星拖尾：两条渐隐斜线 */
.effect-thumb.t-comets i { height: 2px; border-radius: 2px; transform: rotate(-30deg); }
.effect-thumb.t-comets i:nth-child(1) { width: 24px; left: 6px; top: 24px; opacity: 0.85; }
.effect-thumb.t-comets i:nth-child(2) { width: 16px; right: 7px; top: 12px; opacity: 0.5; }
.effect-thumb.t-comets i:nth-child(3) { width: 10px; left: 14px; bottom: 9px; opacity: 0.3; }

/* 关闭：一个斜杠 */
.effect-thumb.t-off i:nth-child(1) { width: 26px; height: 1.5px; left: 7px; top: 19px; transform: rotate(-45deg); opacity: 0.45; }
.effect-thumb.t-off i:nth-child(2) { width: 5px; height: 5px; border-radius: 50%; left: 9px; top: 9px; opacity: 0.3; }

.effect-card-text { min-width: 0; }
.effect-card-text strong { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-strong); margin-bottom: 3px; }
.effect-card-text span { display: block; font-size: 0.74rem; line-height: 1.5; color: var(--text-muted); }

/* 密度滑块 */
.field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.field input[type="range"]:focus { box-shadow: none; }

.field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(var(--secondary-rgb), 0.16);
}

.field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.35);
}

.field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(var(--secondary-rgb), 0.16);
}

.field input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-elevated);
}

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 18px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-track {
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(var(--secondary-rgb), 0.18);
  padding: 3px;
  transition: background-color 0.22s ease;
}

.switch-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 3px; }
.switch-label { font-size: 0.88rem; color: var(--text-soft); }

/* ---------------------------------------------------------------- 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 90;
  transform: translate(-50%, 16px);
  opacity: 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: #fff;
  background: rgba(29, 29, 31, 0.94);
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.26s ease, transform 0.26s ease;
  max-width: 82vw;
  text-align: center;
}

.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="dark"] .toast { background: rgba(245, 245, 247, 0.95); color: #1D1D1F; }

/* ---------------------------------------------------------------- 动效 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.2); }
  50% { box-shadow: 0 0 22px rgba(var(--primary-rgb), 0.34); }
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .drawer { width: 100vw; }
  .drawer-body { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .pane-mini { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }

  .drawer-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .pane + .pane { border-left: none; border-top: 1px solid var(--border); }
  .pane { padding: 14px; gap: 10px; }
  #raw-input { min-height: 130px; }

  /* 手机端空间紧张：字段头部更紧凑，徽标省略 */
  .review-fields { padding: 12px 10px; gap: 12px; }
  .review-field + .review-field { padding-top: 12px; }
  .field-badge { display: none; }
  .pane-head { gap: 8px; }
  .pane-head-actions { gap: 8px; }

  .fab-wrap { right: 14px; bottom: 14px; }
  .fab { padding: 12px 16px; }
  .fab .fab-text { display: none; }

  .section-nav { gap: 6px; overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; scrollbar-width: none; }
  .section-nav::-webkit-scrollbar { display: none; }
  .nav-pill { flex: none; }

  .timeline { padding-left: 24px; }
  .timeline-icon { left: -36px; width: 24px; height: 24px; border-width: 1.5px; }
  .timeline-icon svg { width: 12px; height: 12px; }
  .timeline-content { padding: 16px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  .timeline-content:hover { transform: none; }
  .timeline-date { float: none; display: inline-block; margin-bottom: 6px; }

  .card { padding: 20px 18px; }
  .card:hover { transform: none; }
  .card-header { flex-wrap: wrap; }
  .card .job-date { order: 3; }

  .blocks li, .list-items li { font-size: 1rem; }
  .scores { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { animation: none; }
}
