/* ============================================================
   智简简历 (buildresume.site) — 设计系统
   温暖纸感 · 编辑排版 · 中文优化（反AI模板味 v2）
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  /* Brand */
  --primary: #07A87A;
  --primary-hover: #059669;
  --primary-light: #ECFDF5;

  /* Neutrals（暖调，无冷蓝灰） */
  --gray-900: #1A1917;
  --gray-700: #4D4C48;
  --gray-500: #87867F;
  --gray-300: #D9D7CF;
  --gray-100: #F0EEE6;
  --gray-50: #FAF9F5;

  /* Functional */
  --success: #52C41A;
  --warning: #FAAD14;
  --error: #FF4D4F;
  --info: #1677FF;

  /* Backgrounds */
  --page-bg: #FAF9F5;
  --card-bg: #FFFFFF;
  --elevated: #FFFFFF;
  --border: #E8E6DC;
  --sand: #E8E6DC;

  /* Typography */
  --font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', system-ui, -apple-system, sans-serif;
  --font-serif: 'Songti SC', 'STSong', 'STZhongsong', 'Noto Serif CJK SC', 'Source Han Serif SC', 'SimSun', serif;
  --font-mono: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;

  /* Font sizes (mobile-first, scaled up at breakpoints) */
  --fs-h1: 1.75rem;     /* 28px mobile, 36px desktop */
  --fs-h2: 1.375rem;    /* 22px mobile, 28px desktop */
  --fs-h3: 1.25rem;     /* 20px */
  --fs-h4: 1.125rem;    /* 18px */
  --fs-body-l: 1.0625rem;  /* 17px */
  --fs-body-m: 0.9375rem;  /* 15px */
  --fs-body-s: 0.875rem;   /* 14px */
  --fs-caption: 0.75rem;   /* 12px */
  --fs-button: 0.9375rem;

  /* Line heights */
  --lh-h1: 1.3;
  --lh-h2: 1.35;
  --lh-h3: 1.4;
  --lh-h4: 1.45;
  --lh-body-l: 1.6;    /* mobile: 1.6, desktop: 1.7 */
  --lh-body-m: 1.6;
  --lh-body-s: 1.5;
  --lh-caption: 1.4;

  /* Spacing (8px base) */
  --sp-4: 0.25rem;
  --sp-8: 0.5rem;
  --sp-12: 0.75rem;
  --sp-16: 1rem;
  --sp-20: 1.25rem;
  --sp-24: 1.5rem;
  --sp-32: 2rem;
  --sp-40: 2.5rem;
  --sp-48: 3rem;
  --sp-64: 4rem;
  --sp-80: 5rem;

  /* Border radius */
  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-lg: 16px;
  --radius-round: 9999px;
  --radius-modal: 16px;

  /* Shadows（ring-based，暖调描边代替投影） */
  --shadow-card: 0 0 0 1px var(--gray-100);
  --shadow-card-hover: 0 0 0 1px var(--gray-300);
  --shadow-modal: 0 0 0 1px var(--border), rgba(0,0,0,0.06) 0px 8px 24px;

  /* Layout */
  --max-width: 1200px;
  --content-narrow: 720px;
  --nav-height: 60px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body-m);
  line-height: var(--lh-body-m);
  color: var(--gray-900);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  color: var(--gray-900);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }

ul, ol { padding-left: 1.5em; }

/* ----- Utilities ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-16);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ----- Typography helpers ----- */
.text-center { text-align: center; }
.text-gray { color: var(--gray-500); }
.text-small { font-size: var(--fs-body-s); }
.text-caption { font-size: var(--fs-caption); color: var(--gray-500); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-12) var(--sp-24);
  font-family: var(--font-family);
  font-size: var(--fs-button);
  font-weight: 500;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
}
.btn:hover { text-decoration: none; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.btn-lg {
  padding: var(--sp-16) var(--sp-32);
  font-size: 1.0625rem;
}

/* ----- Cards ----- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--sp-24);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:hover {
  box-shadow: 0 0 0 1px var(--primary);
}

/* ----- Tags / Pills ----- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-12);
  font-size: var(--fs-caption);
  font-weight: 500;
  border-radius: var(--radius-round);
  background: var(--primary-light);
  color: var(--primary);
}

.tag-green { background: var(--primary-light); color: var(--primary); }
.tag-yellow { background: #FFFBE6; color: #D48806; }
.tag-red { background: #FFF1F0; color: #CF1322; }

/* ----- Dividers ----- */
.divider {
  border: none;
  border-top: 1px solid var(--gray-300);
  margin: var(--sp-24) 0;
}

/* ----- Skeleton ----- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.skeleton {
  background: var(--gray-100);
  border-radius: var(--radius-btn);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}
.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 0.75em;
}
.skeleton-card {
  height: 200px;
}

/* ----- Toast ----- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #2d3436;
  border: 1px solid #e8e6e1;
  border-radius: 12px;
  padding: 12px 20px 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 8px 30px rgba(45, 52, 54, .10), 0 2px 6px rgba(45, 52, 54, .06);
  z-index: 10000;
  animation: toast-in 0.35s cubic-bezier(.21, 1.02, .73, 1), toast-out 0.3s ease 2.7s forwards;
  max-width: 90vw;
}
.toast .toast-icon { font-size: 20px; flex-shrink: 0; color: #8a8f98; }
.toast-success .toast-icon { color: #07a87a; }
.toast-warning .toast-icon { color: #e6a23c; }
.toast-error .toast-icon { color: #e4716a; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ----- NavBar ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  height: var(--nav-height);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-size: var(--fs-h4);
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--gray-900);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.nav-links {
  display: none;
  list-style: none;
  padding: 0;
  gap: var(--sp-32);
}
.nav-links a {
  color: var(--gray-700);
  font-size: var(--fs-body-s);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
}

.nav-pro-badge {
  display: none;
  background: var(--primary);
  color: #fff;
  padding: 2px var(--sp-12);
  font-size: var(--fs-caption);
  font-weight: 600;
  border-radius: var(--radius-round);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-8);
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  padding: var(--sp-24) var(--sp-16);
  z-index: 999;
  overflow-y: auto;
}
.nav-drawer.open {
  display: block;
}
.nav-drawer ul {
  list-style: none;
  padding: 0;
}
.nav-drawer li {
  margin-bottom: var(--sp-4);
}
.nav-drawer a {
  display: block;
  padding: var(--sp-16);
  font-size: var(--fs-h4);
  font-weight: 500;
  color: var(--gray-900);
  border-radius: var(--radius-btn);
  text-decoration: none;
}
.nav-drawer a:hover,
.nav-drawer a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-drawer .nav-drawer-cta {
  margin-top: var(--sp-24);
}

/* Back link (sub-pages) */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--gray-500);
  font-size: var(--fs-body-s);
  padding: var(--sp-8) 0;
  text-decoration: none;
}
.back-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ----- Footer ----- */
.footer {
  background: var(--gray-100);
  padding: var(--sp-48) 0 var(--sp-32);
  margin-top: var(--sp-64);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-32);
}
.footer-brand {
  grid-column: 1 / -1;
}
.footer-brand .nav-brand {
  margin-bottom: var(--sp-8);
}
.footer-desc {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
  margin-top: var(--sp-8);
}
.footer-col h4 {
  font-size: var(--fs-body-s);
  margin-bottom: var(--sp-12);
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col li {
  margin-bottom: var(--sp-8);
}
.footer-col a {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
}
.footer-col a:hover {
  color: var(--primary);
}
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--gray-300);
  padding-top: var(--sp-24);
  margin-top: var(--sp-16);
  font-size: var(--fs-caption);
  color: var(--gray-500);
  text-align: center;
}

/* ----- Hero（左对齐编辑版式 + 改写前后对照） ----- */
.hero {
  padding: var(--sp-48) 0 var(--sp-40);
  text-align: left;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-32);
  align-items: center;
}
.hero h1 {
  margin-bottom: var(--sp-16);
  font-weight: 600;
}
.hero .hero-subtitle {
  font-size: var(--fs-body-l);
  color: var(--gray-700);
  max-width: 520px;
  margin: 0 0 var(--sp-32);
  line-height: var(--lh-body-l);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-12);
  justify-content: flex-start;
}
.hero-eyebrow {
  font-size: var(--fs-caption);
  color: var(--primary);
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-12);
}
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1.02fr 0.98fr; gap: var(--sp-48); }
  .hero h1 { font-size: 2.5rem; }
}

/* 改写前后对照卡 */
.ba-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 1px var(--border), rgba(0,0,0,0.05) 0px 4px 24px;
  overflow: hidden;
}
.ba-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--sp-16);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-caption);
  color: var(--gray-500);
}
.ba-body { padding: var(--sp-20); }
.ba-label {
  font-size: var(--fs-caption);
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-8);
}
.ba-label.before { color: var(--gray-500); }
.ba-label.after { color: var(--primary); }
.ba-text {
  font-size: var(--fs-body-s);
  line-height: 1.7;
  color: var(--gray-700);
}
.ba-before {
  color: var(--gray-500);
  border-left: 3px solid var(--gray-300);
  padding-left: var(--sp-12);
  margin-bottom: var(--sp-16);
}
.ba-after {
  border-left: 3px solid var(--primary);
  padding-left: var(--sp-12);
}
.ba-after mark {
  background: var(--primary-light);
  color: var(--primary-hover);
  padding: 0 2px;
  border-radius: 2px;
}

/* ----- Section ----- */
.section {
  padding: var(--sp-48) 0;
}
.section-header {
  text-align: center;
  margin-bottom: var(--sp-40);
}
.section-header h2 {
  margin-bottom: var(--sp-12);
}
.section-header p {
  color: var(--gray-500);
  font-size: var(--fs-body-l);
  max-width: 560px;
  margin: 0 auto;
}

/* ----- Grid layouts ----- */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}

/* ----- Feature Card（编号 + 发丝线，去emoji去卡片感） ----- */
.feature-card {
  text-align: left;
  padding: var(--sp-24) var(--sp-16) var(--sp-24) 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-top: 2px solid var(--border);
  transition: border-color 0.2s ease;
}
.feature-card:hover {
  box-shadow: none;
  border-top-color: var(--primary);
}
.feature-card .feature-num {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--fs-caption);
  color: var(--primary);
  letter-spacing: 0.2em;
  margin-bottom: var(--sp-12);
}
.feature-card h3 {
  margin-bottom: var(--sp-8);
}
.feature-card p {
  color: var(--gray-500);
  font-size: var(--fs-body-s);
  margin-bottom: var(--sp-20);
}

/* ----- Why Us Card ----- */
.why-card {
  padding: var(--sp-24);
}
.why-card .why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--primary);
  margin-bottom: var(--sp-12);
}
.why-card h4 {
  margin-bottom: var(--sp-8);
}
.why-card p {
  color: var(--gray-500);
  font-size: var(--fs-body-s);
}

/* ----- Trust Bar ----- */
.trust-bar {
  background: var(--gray-100);
  padding: var(--sp-40) 0;
}
.trust-bar .grid-3 {
  gap: var(--sp-32);
}
.trust-item {
  text-align: center;
}
.trust-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.trust-label {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
  margin-top: var(--sp-4);
}

/* ----- Blog Preview ----- */
.blog-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.blog-preview-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  padding: var(--sp-20);
}
.blog-preview-card h3 {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-4);
}
.blog-preview-card p {
  color: var(--gray-500);
  font-size: var(--fs-body-s);
}
.blog-preview-meta {
  font-size: var(--fs-caption);
  color: var(--gray-500);
}
.section-footer {
  text-align: center;
  margin-top: var(--sp-32);
}

/* ----- Pricing CTA Bar（纯色，不用渐变） ----- */
.pricing-cta-bar {
  background: var(--gray-900);
  color: var(--gray-50);
  text-align: center;
  padding: var(--sp-40) var(--sp-16);
  border-radius: var(--radius-card);
  margin: var(--sp-16);
}
.pricing-cta-bar h2 {
  color: var(--gray-50);
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-8);
}
.pricing-cta-bar p {
  opacity: 0.9;
  margin-bottom: var(--sp-24);
  font-size: var(--fs-body-l);
}
.pricing-cta-bar .btn {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.pricing-cta-bar .btn:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}
.pricing-cta-link {
  color: rgba(255,255,255,0.8);
  font-size: var(--fs-body-s);
  margin-left: var(--sp-16);
}
.pricing-cta-link:hover { color: #fff; }

/* ----- Pricing Cards ----- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
  align-items: start;
}
.pricing-card {
  position: relative;
  border: 2px solid var(--gray-100);
  padding: var(--sp-32) var(--sp-24);
  text-align: center;
}
.pricing-card-highlight {
  border-color: var(--primary);
  box-shadow: var(--shadow-card-hover);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 2px var(--sp-16);
  border-radius: var(--radius-round);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.pricing-name {
  font-size: var(--fs-h4);
  font-weight: 600;
  margin-bottom: var(--sp-8);
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--sp-4);
}
.pricing-price span {
  font-size: var(--fs-body-s);
  font-weight: 400;
  color: var(--gray-500);
}
.pricing-period {
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-bottom: var(--sp-24);
}
.pricing-features {
  list-style: none;
  padding: 0;
  text-align: left;
  margin-bottom: var(--sp-32);
}
.pricing-features li {
  padding: var(--sp-8) 0;
  font-size: var(--fs-body-s);
  color: var(--gray-700);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-8);
}
.pricing-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.pricing-features li.disabled {
  color: var(--gray-300);
}
.pricing-features li.disabled::before {
  content: '✗';
  color: var(--gray-300);
}

/* ----- FAQ Accordion ----- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--gray-100);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--sp-20) 0;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: var(--fs-body-l);
  font-weight: 500;
  color: var(--gray-900);
  cursor: pointer;
  text-align: left;
  gap: var(--sp-16);
}
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: var(--sp-20);
}
.faq-answer p {
  color: var(--gray-700);
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-l);
}

/* ----- Chat ----- */
.chat-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-height: 400px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-16);
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}
.chat-bubble {
  max-width: 85%;
  padding: var(--sp-12) var(--sp-16);
  border-radius: var(--radius-card);
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-m);
  word-wrap: break-word;
}
.chat-bubble.user {
  position: relative;
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--gray-900);
  border-bottom-left-radius: 4px;
}
.chat-bubble.system {
  align-self: center;
  background: #FFFBE6;
  color: #D48806;
  text-align: center;
  font-size: var(--fs-caption);
  max-width: 90%;
  border-radius: var(--radius-btn);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: var(--sp-12) var(--sp-16);
  align-self: flex-start;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--gray-300);
  border-radius: 50%;
  animation: typing-bounce 1.4s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

.chat-input-area {
  border-top: 1px solid var(--gray-100);
  padding: var(--sp-12) var(--sp-16);
  display: flex;
  gap: var(--sp-8);
  align-items: flex-end;
}
.chat-input-area textarea {
  flex: 1;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-btn);
  padding: var(--sp-12);
  font-family: var(--font-family);
  font-size: var(--fs-body-s);
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
}
.chat-input-area textarea:focus {
  border-color: var(--primary);
}
.chat-input-area .btn {
  flex-shrink: 0;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  text-align: center;
  padding: var(--sp-32);
}
.chat-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-16);
}

/* Resume Preview Panel */
.preview-panel {
  display: none;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--sp-24);
  min-height: 400px;
}
.preview-panel.visible {
  display: block;
}
.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  color: var(--gray-500);
  text-align: center;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-card);
  padding: var(--sp-32);
}
.preview-content {
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-l);
}
.preview-content h3 {
  font-size: var(--fs-h4);
  margin: var(--sp-16) 0 var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--gray-100);
}

/* 结构化简历渲染（rs-*，resume-render.js 输出） */
.rs-doc { color: var(--gray-900); }
.rs-name {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--sp-4);
}
.rs-contact {
  text-align: center;
  color: var(--gray-500);
  font-size: var(--fs-caption);
  margin-bottom: var(--sp-12);
}
.rs-target {
  text-align: center;
  font-size: var(--fs-body-s);
  color: var(--primary);
  margin-bottom: var(--sp-16);
}
.rs-target b { font-weight: 600; }
.rs-section { margin-bottom: var(--sp-20); }
.rs-sec-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h4);
  font-weight: 700;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-12);
  border-bottom: 2px solid var(--gray-900);
}
.rs-item { margin-bottom: var(--sp-12); }
.rs-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-12);
  flex-wrap: wrap;
}
.rs-item-title { font-weight: 600; font-size: var(--fs-body-s); min-width: 0; }
.rs-item-sub {
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-top: 2px;
}
.rs-item-date {
  font-size: var(--fs-caption);
  color: var(--gray-500);
  white-space: nowrap;
  margin-left: auto;
}
.rs-line {
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-l);
  color: var(--gray-700);
  margin: var(--sp-4) 0;
}
.rs-skill-label { font-weight: 600; color: var(--gray-900); }
.rs-legacy { font-size: var(--fs-body-s); line-height: var(--lh-body-l); }

/* ── layout_config 变体（预览侧；打印侧在 resume-render.js 内联） ── */
.rs-doc .rs-sec-title { border-bottom-color: var(--rs-theme, var(--gray-900)); }
.rs-align-left .rs-name,
.rs-align-left .rs-contact,
.rs-align-left .rs-target { text-align: left; }
.rs-head-sans .rs-name,
.rs-head-sans .rs-sec-title { font-family: var(--font-family); letter-spacing: 0; }
.rs-sec-background .rs-sec-title {
  background: var(--rs-theme, var(--gray-900));
  color: #fff;
  border-bottom: none;
  padding: 4px 10px;
}
.rs-sec-plain .rs-sec-title {
  border-bottom: none;
  color: var(--rs-theme, var(--gray-900));
  padding-bottom: 0;
}
.rs-contact-form .rs-contact { text-align: left; }
.rs-ct-cell { display: inline-block; width: 49%; margin-bottom: 4px; }
.rs-ct-label { color: var(--gray-500); margin-right: 8px; }
.rs-ct-value { font-weight: 600; color: var(--gray-900); }

/* 简历文档预览：A4 定宽 + transform 缩放（高度由 JS 适配） */
.rs-doc { transform-origin: top left; }
#resume-preview-content { overflow: hidden; width: 100%; }
/* 证件照：头部左右布局 */
.rs-head-wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.rs-head-text { flex: 1; min-width: 0; }
.rs-head-wrap .rs-name,
.rs-head-wrap .rs-contact,
.rs-head-wrap .rs-target { word-wrap: break-word; overflow-wrap: break-word; }
.rs-photo { width: 84px; height: 114px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
/* 弹层内证件照卡片 */
.photo-row { display: flex; align-items: center; gap: 12px; }
.photo-thumb { width: 56px; height: 76px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; }
.photo-btns { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.photo-btns button { width: 100%; }

/* 输入区证件照条（Stitch 第三帧） */
.photo-strip {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; padding: 8px 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
}
.photo-slot {
  position: relative; width: 48px; height: 62px; flex-shrink: 0;
  border: 1.5px dashed var(--gray-400, #9d9d99); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400, #9d9d99); cursor: pointer;
  transition: border-color .15s;
}
.photo-slot:hover { border-color: var(--primary); color: var(--primary); }
.photo-slot .material-symbols-outlined { font-size: 20px; }
.photo-slot img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 5px;
  position: absolute; inset: 0;
}
.photo-slot-remove {
  position: absolute; top: -7px; right: -7px; z-index: 2;
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: var(--gray-900, #1b1c1a); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer;
}
.photo-strip-info { flex: 1; min-width: 0; }
.photo-strip-title { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.photo-strip-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* 消息工具行 + 批量条 */
.chat-tools { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.chat-tools button {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--gray-500); padding: 2px 4px;
}
.chat-tools button:hover { color: var(--primary); }
.msg-batch-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; padding: 6px 10px;
  font-size: 12px; color: var(--gray-500);
  background: var(--surface-container, #f5f4f0);
  border: 1px solid var(--border); border-radius: 8px;
}
.msg-batch-bar button {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--primary); padding: 0;
}
.msg-batch-bar .batch-del { color: #dc2626; font-weight: 600; }
.msg-batch-bar .batch-del:disabled { color: var(--gray-400); cursor: default; }
/* 批量管理模式：气泡出现勾选框 */
#chat-messages.msg-batch-mode .chat-bubble.user,
#chat-messages.msg-batch-mode .chat-bubble.ai {
  position: relative; cursor: pointer;
}
#chat-messages .msg-check {
  display: none; position: absolute; left: -24px; top: 6px;
  width: 15px; height: 15px; cursor: pointer;
}
#chat-messages.msg-batch-mode .msg-check { display: block; }
#chat-messages.msg-batch-mode .msg-del-btn { display: none !important; }
#chat-messages.msg-batch-mode .chat-bubble.msg-selected { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 悬浮「预览简历」按钮 */
.preview-fab {
  position: fixed; right: 28px; bottom: 120px; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px; border: none; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: var(--fs-body, 14px); font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.preview-fab .material-symbols-outlined { font-size: 20px; }
.preview-fab-dot {
  position: absolute; top: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
}

/* 简历预览弹层 */
.preview-modal { position: fixed; inset: 0; z-index: 80; }
.preview-modal-mask { position: absolute; inset: 0; background: rgba(27,28,26,.45); }
.preview-modal-card {
  position: relative; margin: 4vh auto; width: min(1080px, 94vw);
  height: 92vh; background: #fff; border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.24);
}
.preview-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.preview-modal-close {
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 22px; line-height: 1; color: var(--gray-500);
  cursor: pointer; border-radius: 50%;
}
.preview-modal-close:hover { background: var(--surface-container, #f3f3f3); color: var(--gray-900); }
.preview-modal-body { flex: 1; display: flex; min-height: 0; }
.preview-modal-doc {
  flex: 1.6; overflow-y: auto; padding: 24px;
  background: var(--surface-container, #f5f4f0);
}
.preview-modal-doc #resume-preview-content {
  background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08);
  margin: 0 auto; max-width: 794px;
}
.preview-modal-side {
  flex: 1; min-width: 300px; overflow-y: auto;
  padding: 20px; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.preview-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.pm-divider { height: 1px; background: var(--border); }
@media (max-width: 860px) {
  .preview-modal-body { flex-direction: column; }
  .preview-modal-side { border-left: none; border-top: 1px solid var(--border); min-width: 0; }
}

/* 通用确认弹窗 */
.ui-confirm-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(27,28,26,.45);
  display: flex; align-items: center; justify-content: center;
}
/* 生成进度弹窗 */
.gen-progress-card { min-width: 320px; }
.gen-steps { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.gen-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-400);
}
.gen-step .gen-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-300, #d8d7d2); flex-shrink: 0;
}
.gen-step.active { color: var(--gray-900); font-weight: 500; }
.gen-step.active .gen-dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(7,168,122,.18); }
.gen-step.done { color: var(--gray-500); }
.gen-step.done .gen-dot { background: var(--primary); }
.ui-confirm-card {
  width: min(360px, 90vw); background: #fff; border-radius: 12px;
  padding: 20px; box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.ui-confirm-title { font-size: 15px; font-weight: 600; color: var(--gray-900); margin-bottom: 8px; }
.ui-confirm-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 18px; line-height: 1.5; }
.ui-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; }
.ui-confirm-cancel {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--gray-900); cursor: pointer; font-size: 13px;
}
.ui-confirm-ok {
  padding: 8px 16px; border: none; border-radius: 8px;
  background: #dc2626; color: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
}

/* 对话记录：批量管理模式 */
.history-sidebar .history-manage {
  font-size: var(--fs-caption); color: var(--primary);
  background: none; border: none; cursor: pointer; padding: 0;
}
.history-batch-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; font-size: var(--fs-caption); color: var(--gray-500);
  border-bottom: 1px solid var(--border);
}
.history-batch-bar button {
  background: none; border: none; cursor: pointer;
  font-size: var(--fs-caption); color: var(--primary); padding: 0;
}
.history-batch-bar .batch-del { color: #dc2626; font-weight: 600; }
.history-batch-bar .batch-del:disabled { color: var(--gray-400); cursor: default; }
.history-item { position: relative; }
.history-item .history-check {
  display: none; position: absolute; left: 6px; top: 50%;
  transform: translateY(-50%); width: 16px; height: 16px;
}
.history-sidebar.batch-mode .history-check { display: block; }
.history-sidebar.batch-mode .history-item { padding-left: 28px; }
.history-sidebar.batch-mode .history-item-delete { display: none; }

/* 排版调整卡片 */
.la-card {
  width: 100%; margin-top: var(--sp-12); padding: 14px;
  background: var(--card-bg, #fff); border: 1px solid var(--border);
  border-radius: var(--radius-card, 12px);
  display: flex; flex-direction: column; gap: 10px;
}
.la-title {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-body, 14px); font-weight: 600; color: var(--gray-900);
}
.la-title .material-symbols-outlined { font-size: 18px; color: var(--primary); }
.la-title-hint { margin-left: auto; font-size: var(--fs-caption); font-weight: 400; color: var(--gray-500); }
#layout-adjust-input {
  width: 100%; min-height: 56px; padding: 10px 12px;
  font-size: var(--fs-body, 14px); line-height: 1.5; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  background: var(--bg, #fff); color: var(--gray-900);
  font-family: inherit;
}
#layout-adjust-input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.la-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.la-chip {
  padding: 5px 10px; font-size: var(--fs-caption);
  background: var(--surface-container, #f3f3f3); color: var(--gray-900);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.la-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.la-submit {
  width: 100%; padding: 10px; font-size: var(--fs-body, 14px); font-weight: 600;
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-btn); cursor: pointer;
}
.la-submit:disabled { opacity: .5; cursor: default; }
.la-hint { font-size: var(--fs-caption); color: var(--gray-500); }

.la-section { display: flex; flex-direction: column; gap: 8px; }
.la-section-title { font-size: var(--fs-caption); font-weight: 600; color: var(--gray-700); }
.la-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 10px;
}
.la-field {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-caption); color: var(--gray-700);
}
.la-field span { font-weight: 500; }
.la-field select,
#la-custom-controls select {
  width: 100%; padding: 6px 8px; font-size: var(--fs-caption);
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  background: var(--bg, #fff); color: var(--gray-900);
  font-family: inherit; cursor: pointer;
}
.la-field select:focus,
#la-custom-controls select:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

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

/* 消息删除按钮 */
.msg-del-btn {
  position: absolute; top: 4px; right: 8px;
  width: 18px; height: 18px; line-height: 16px; font-size: 11px;
  border: none; background: transparent; color: var(--gray-400);
  cursor: pointer; border-radius: 50%; display: block; /* 常驻可见，删除入口不藏 */
}
.msg-del-btn:hover { background: var(--gray-100); color: var(--gray-700); }

/* 生成简历按钮 */
.btn-gen-resume {
  padding: 6px 16px; font-size: var(--fs-caption); font-weight: 600;
  border: 1px solid var(--primary); border-radius: var(--radius-btn);
  background: transparent; color: var(--primary); cursor: pointer;
  white-space: nowrap;
}
.btn-gen-resume:disabled {
  opacity: .35; cursor: default; border-color: var(--gray-300); color: var(--gray-400);
}

/* diff 高亮（优化前后对比） */
.diff-del {
  background: #fdeceb; color: #c0392b;
  text-decoration: line-through; text-decoration-color: rgba(192,57,43,.5);
  border-radius: 2px; padding: 0 1px;
}
.diff-ins {
  background: #e8f7f0; color: #0e7a55;
  text-decoration: none;
  border-radius: 2px; padding: 0 1px;
  border-bottom: 1px solid rgba(14,122,85,.35);
}

/* 历史记录列表（优化/体检页左栏） */
.records-box { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 14px; }
.records-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.records-title { font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-body-m); }
.records-count { font-size: var(--fs-caption); color: var(--gray-500); }
.record-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-btn); background: var(--card-bg); margin-bottom: 6px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.record-item:hover { border-color: var(--primary); }
.record-item.active { border-color: var(--primary); background: var(--primary-light); }
.record-title { font-size: var(--fs-body-s); color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-time { font-size: var(--fs-caption); color: var(--gray-500); flex-shrink: 0; }
.preview-watermark {
  position: relative;
}
.preview-watermark::after {
  content: '智简简历 · 预览版';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 2rem;
  color: rgba(0,0,0,0.06);
  pointer-events: none;
  white-space: nowrap;
}

/* Progress indicator */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  padding: var(--sp-16) 0;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-size: var(--fs-caption);
  color: var(--gray-500);
}
.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
}
.progress-step.active .progress-dot {
  background: var(--primary);
}
.progress-step.done .progress-dot {
  background: var(--success);
}
.progress-line {
  width: 24px;
  height: 1px;
  background: var(--gray-300);
}
.progress-step.done + .progress-line {
  background: var(--success);
}

/* ----- Upload Zone ----- */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-card);
  padding: var(--sp-40) var(--sp-24);
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  background: var(--card-bg);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone.has-file {
  border-style: solid;
  border-color: var(--primary);
  background: var(--primary-light);
  padding: var(--sp-20);
}
.upload-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-12);
}
.upload-text {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
  margin-bottom: var(--sp-4);
}
.upload-hint {
  font-size: var(--fs-caption);
  color: var(--gray-300);
}
.upload-file-info {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-size: var(--fs-body-s);
  color: var(--gray-700);
}

/* ----- Textarea ----- */
.textarea-field {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-btn);
  padding: var(--sp-12);
  font-family: var(--font-family);
  font-size: var(--fs-body-s);
  resize: vertical;
  min-height: 120px;
  outline: none;
}
.textarea-field:focus {
  border-color: var(--primary);
}

/* ----- Audience Selector ----- */
.audience-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
}
.audience-btn {
  padding: var(--sp-8) var(--sp-16);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-round);
  background: #fff;
  font-family: var(--font-family);
  font-size: var(--fs-body-s);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-700);
}
.audience-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.audience-btn.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

/* ----- Optimize layout ----- */
.optimize-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}

/* ----- Audit Page ----- */
.audit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.score-card {
  text-align: center;
  padding: var(--sp-32);
}
.score-number {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--sp-8);
}
.score-number.high { color: var(--success); }
.score-number.mid { color: var(--warning); }
.score-number.low { color: var(--error); }
.score-label {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
}
.radar-container {
  padding: var(--sp-16);
}
.radar-container canvas {
  max-width: 100%;
  height: auto;
}
.dimension-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
  padding: var(--sp-16) 0;
}
.dim-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.dim-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-body-s);
}
.dim-label span:last-child {
  font-weight: 600;
}
.dim-bar-bg {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Suggestions */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}
.suggestion-item {
  display: flex;
  gap: var(--sp-12);
  padding: var(--sp-16);
  background: var(--card-bg);
  border-radius: var(--radius-card);
}
.suggestion-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-body-s);
  flex-shrink: 0;
}
.suggestion-body h4 {
  font-size: var(--fs-body-s);
  margin-bottom: var(--sp-4);
}
.suggestion-body p {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
}

/* ----- Paywall ----- */
.paywall-overlay {
  position: relative;
}
.paywall-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, rgba(255,255,255,0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--sp-32) var(--sp-16);
  text-align: center;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.paywall-mask .lock-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-8);
}
.paywall-mask p {
  color: var(--gray-700);
  font-size: var(--fs-body-s);
  margin-bottom: var(--sp-16);
}

/* ----- Modal ----- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: var(--sp-16);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--elevated);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  padding: var(--sp-32) var(--sp-24);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: var(--sp-12);
  right: var(--sp-12);
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--gray-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--gray-100);
}
.modal h3 {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.modal-desc {
  text-align: center;
  color: var(--gray-500);
  font-size: var(--fs-body-s);
  margin-bottom: var(--sp-24);
}

/* Payment QR */
.payment-qr-tabs {
  display: flex;
  gap: var(--sp-8);
  justify-content: center;
  margin-bottom: var(--sp-16);
}
.payment-qr-tab {
  padding: var(--sp-8) var(--sp-16);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-round);
  background: #fff;
  font-size: var(--fs-body-s);
  cursor: pointer;
}
.payment-qr-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.payment-qr-img {
  display: block;
  max-width: 240px;
  margin: 0 auto var(--sp-16);
  border-radius: var(--radius-card);
}
.payment-hint {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-bottom: var(--sp-24);
}

/* Activation input */
.activation-toggle {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--primary);
  font-size: var(--fs-body-s);
  cursor: pointer;
  padding: var(--sp-8);
}
.activation-form {
  display: none;
  gap: var(--sp-8);
  margin-top: var(--sp-12);
}
.activation-form.open {
  display: flex;
}
.activation-input {
  flex: 1;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-btn);
  padding: var(--sp-12);
  font-family: var(--font-mono);
  font-size: var(--fs-body-s);
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.activation-input:focus {
  border-color: var(--primary);
  outline: none;
}
.activation-input.error {
  border-color: var(--error);
}
.activation-error {
  font-size: var(--fs-caption);
  color: var(--error);
  margin-top: var(--sp-4);
  display: none;
}

/* ----- Filters / Pills Row ----- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-bottom: var(--sp-24);
}
.filter-pill {
  padding: var(--sp-8) var(--sp-16);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-round);
  background: #fff;
  font-family: var(--font-family);
  font-size: var(--fs-body-s);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-700);
}
.filter-pill:hover,
.filter-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

/* ----- Template Card ----- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
}
.template-card {
  overflow: hidden;
  padding: 0;
}
.template-preview {
  width: 100%;
  aspect-ratio: 210/297;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
  font-size: 3rem;
}
.template-info {
  padding: var(--sp-16);
}
.template-info h4 {
  margin-bottom: var(--sp-4);
}
.template-info p {
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-bottom: var(--sp-12);
}

/* ----- Blog Page ----- */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.blog-list-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-20);
}
.blog-card-meta {
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-bottom: var(--sp-8);
}
.blog-card-title {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-8);
  color: var(--gray-900);
  text-decoration: none;
}
.blog-card-title:hover {
  color: var(--primary);
}
.blog-card-excerpt {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
  margin-bottom: var(--sp-12);
}
.blog-card-link {
  font-size: var(--fs-body-s);
  font-weight: 500;
}

/* Article */
.article {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--sp-32) 0;
}
.article-header {
  margin-bottom: var(--sp-32);
}
.article-meta {
  font-size: var(--fs-body-s);
  color: var(--gray-500);
  margin-bottom: var(--sp-12);
}
.article h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-16);
}
.article-body {
  font-size: var(--fs-body-l);
  line-height: var(--lh-body-l);
}
.article-body h2 {
  font-size: var(--fs-h3);
  margin: var(--sp-32) 0 var(--sp-16);
}
.article-body h3 {
  font-size: var(--fs-h4);
  margin: var(--sp-24) 0 var(--sp-12);
}
.article-body p {
  margin-bottom: var(--sp-16);
}
.article-body ul, .article-body ol {
  margin-bottom: var(--sp-16);
}
.article-body li {
  margin-bottom: var(--sp-8);
}
.article-body strong {
  color: var(--gray-900);
}
.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding-left: var(--sp-16);
  margin: var(--sp-16) 0;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: var(--sp-16);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
}
.article-body code {
  font-family: var(--font-mono);
  font-size: var(--fs-body-s);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-footer {
  margin-top: var(--sp-48);
  padding-top: var(--sp-24);
  border-top: 1px solid var(--gray-100);
}
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-24);
}
.article-nav a {
  font-size: var(--fs-body-s);
}
.article-cta {
  background: var(--primary-light);
  padding: var(--sp-24);
  border-radius: var(--radius-card);
  text-align: center;
}
.article-cta p {
  margin-bottom: var(--sp-12);
  font-size: var(--fs-body-s);
}

/* ----- Static content pages (privacy, terms) ----- */
.static-content {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--sp-32) 0;
}
.static-content h1 {
  margin-bottom: var(--sp-32);
}
.static-content h2 {
  font-size: var(--fs-h3);
  margin: var(--sp-32) 0 var(--sp-16);
}
.static-content p {
  margin-bottom: var(--sp-16);
  font-size: var(--fs-body-l);
  line-height: var(--lh-body-l);
}
.static-content ul, .static-content ol {
  margin-bottom: var(--sp-16);
}
.static-content li {
  margin-bottom: var(--sp-8);
  font-size: var(--fs-body-l);
  line-height: var(--lh-body-l);
}

/* ----- 404 Page ----- */
.page-404 {
  text-align: center;
  padding: var(--sp-80) var(--sp-16);
}
.page-404 .code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--sp-16);
}
.page-404 h2 {
  margin-bottom: var(--sp-12);
}
.page-404 p {
  color: var(--gray-500);
  margin-bottom: var(--sp-32);
}

/* ----- Responsive: Tablet (≥768px) ----- */
@media (min-width: 768px) {
  :root {
    --fs-h1: 2.25rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.375rem;
    --lh-h1: 1.3;
    --lh-h2: 1.35;
    --lh-body-l: 1.7;
  }

  /* Nav */
  .nav-links { display: flex; }
  .hamburger { display: none; }
  .nav-drawer { display: none !important; }

  /* Grids */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero {
    padding: var(--sp-80) 0;
  }

  /* Section */
  .section {
    padding: var(--sp-64) 0;
  }

  /* Trust bar */
  .trust-bar .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Blog preview */
  .blog-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Templates */
  .template-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Blog list */
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Chat */
  .chat-container {
    grid-template-columns: 3fr 2fr;
  }
  .preview-panel {
    display: block;
  }

  /* Optimize */
  .optimize-layout {
    grid-template-columns: 2fr 1fr 3fr;
  }

  /* Audit */
  .audit-layout {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: auto;
  }
  .footer-bottom {
    grid-column: 1 / -1;
  }

  /* Pricing CTA */
  .pricing-cta-bar {
    margin: var(--sp-48) 0;
  }
}

/* ----- Responsive: Desktop (≥1024px) ----- */
@media (min-width: 1024px) {
  .container {
    padding: 0 var(--sp-32);
  }
}

/* ── Auth Modal ── */
.auth-modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.auth-modal.active { display: flex; align-items: center; justify-content: center; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.auth-card {
  position: relative; background: var(--card-bg); border-radius: var(--radius-lg);
  padding: var(--sp-32); width: 90%; max-width: 400px;
  box-shadow: var(--shadow-modal);
}
.auth-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 24px; color: var(--gray-500); cursor: pointer; line-height: 1;
}
.auth-title { margin-bottom: var(--sp-4); }
.auth-subtitle { color: var(--gray-500); font-size: var(--fs-body-s); margin-bottom: var(--sp-24); }
.auth-field { margin-bottom: var(--sp-12); }
.auth-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-btn); font-size: var(--fs-body-m);
  background: var(--card-bg); color: var(--gray-900);
  font-family: var(--font-family);
}
.auth-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.auth-error { color: var(--error); font-size: var(--fs-caption); min-height: 18px; margin-bottom: var(--sp-8); }
.auth-submit { width: 100%; }
.auth-switch { text-align: center; margin-top: var(--sp-16); font-size: var(--fs-body-s); color: var(--gray-500); }
.auth-switch a { color: var(--primary); text-decoration: none; }

/* ── Nav User Dropdown ── */
.nav-user-dropdown { position: relative; }
.nav-user-btn {
  background: none; border: none; font-size: var(--fs-body-s); color: var(--gray-900);
  cursor: pointer; padding: 6px 12px; font-family: var(--font-family);
}
.nav-user-menu {
  display: none; position: absolute; top: 100%; right: 0; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius-btn);
  box-shadow: var(--shadow-modal); min-width: 140px; z-index: 100;
}
.nav-user-dropdown.open .nav-user-menu { display: block; }
.nav-user-menu a {
  display: block; padding: 10px 16px; font-size: var(--fs-body-s); color: var(--gray-700);
  text-decoration: none; border-bottom: 1px solid var(--gray-100);
}
.nav-user-menu a:last-child { border-bottom: none; }
.nav-user-menu a:hover { background: var(--gray-50); color: var(--primary); }

/* ── Suggestion Chips ── */
.suggestion-chips {
  display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-bottom: var(--sp-12);
}
.suggestion-chip {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-round);
  font-size: var(--fs-caption); color: var(--gray-700); background: var(--card-bg);
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-family);
}
.suggestion-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ── AI Loading ── */
.ai-loading {
  display: flex; justify-content: center; padding: var(--sp-24) var(--sp-16);
  font-family: var(--font-serif); font-size: var(--fs-body-s); color: var(--gray-500);
}
.ai-loading-card {
  width: 100%; max-width: 420px; background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant); border-radius: var(--radius-card);
  padding: var(--sp-24); box-shadow: var(--shadow-sm);
}
.ai-loading-skeleton { margin-bottom: var(--sp-16); }
.skeleton-line {
  height: 12px; background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; border-radius: var(--radius-btn);
  animation: skeleton-shimmer 1.5s infinite;
  margin-bottom: var(--sp-8);
}
.skeleton-title { height: 18px; width: 60%; margin-bottom: var(--sp-12); }
.skeleton-w-90 { width: 90%; }
.skeleton-w-80 { width: 80%; }
.skeleton-w-95 { width: 95%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ai-loading-meta { display: flex; align-items: center; gap: var(--sp-8); flex-wrap: wrap; }
.ai-loading-dots { display: flex; gap: 4px; }
.ai-loading-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  animation: ai-pulse 1.2s ease-in-out infinite;
}
.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}
.ai-loading-text { transition: opacity 0.2s; font-weight: 600; color: var(--gray-700); }
.ai-loading-tip { width: 100%; margin-top: var(--sp-4); font-size: var(--fs-caption); color: var(--gray-500); transition: opacity 0.3s; }

/* Button spinner */
.btn-spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%; animation: btn-spin 0.8s linear infinite;
  margin-right: 6px; vertical-align: middle;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Error bubble */
.error-bubble {
  border-left: 3px solid #dc2626; background: #fef2f2;
}
.error-bubble p { margin: 0 0 4px; color: #991b1b; }

/* Optimize error card */
.optimize-error-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-card);
  padding: var(--sp-24); margin-top: var(--sp-16);
}
.optimize-error-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: #dc2626; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.optimize-error-title { font-weight: 700; color: #991b1b; margin: 0 0 4px; }
.optimize-error-text { color: #7f1d1d; margin: 0 0 12px; font-size: var(--fs-body-s); }
.optimize-error-actions { display: flex; gap: 8px; }
.optimize-error-actions .btn { padding: 6px 16px; font-size: 12px; }

/* Optimize result */
.opt-analysis { margin-bottom: 16px; color: var(--gray-700); font-size: var(--fs-body-s); line-height: 1.6; }
.opt-resume-wrap { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.opt-resume-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--gray-50); border-bottom: 1px solid var(--border); }
.opt-resume-header h4 { margin: 0; font-size: var(--fs-body-s); }
.opt-resume-actions { display: flex; gap: 8px; }
.opt-resume-card { padding: 20px 24px 24px; background: #fff; }
.opt-resume-card.opt-resume-pdf { padding: 0; }
.opt-pdf-loading { padding: 40px 24px; text-align: center; color: var(--text-secondary, #6b6a66); font-size: var(--fs-body-s); }
.opt-pdf-frame { display: block; width: 100%; height: 78vh; min-height: 480px; border: 0; background: #fff; }
.opt-resume-card h3 { font-family: var(--font-display); color: var(--primary); font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin: 16px 0 8px; }
.opt-resume-card h3:first-child { margin-top: 0; }
.opt-resume-card p { font-size: var(--fs-body-s); line-height: 1.6; margin: 0 0 4px; }

.opt-diff-card { border: 1px solid var(--border); border-radius: var(--radius-btn); margin-bottom: 8px; }
.opt-diff-card summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; cursor: pointer; background: var(--gray-50); font-size: var(--fs-body-s); }
.opt-diff-card summary::-webkit-details-marker { display: none; }
.opt-diff-tag { font-weight: 600; }
.opt-diff-hint { font-size: var(--fs-caption); color: var(--gray-500); }
.opt-diff-card[open] .opt-diff-hint { display: none; }
.opt-diff-body { padding: 0 16px 16px; }
.opt-diff-block { margin-top: 12px; }
.opt-diff-label { display: inline-block; font-size: var(--fs-caption); font-weight: 600; color: var(--gray-500); padding: 2px 8px; background: var(--gray-100); border-radius: 4px; margin-bottom: 6px; }
.opt-after .opt-diff-label { color: var(--primary); background: var(--primary-light); }
.opt-diff-block p { color: var(--gray-800); font-size: var(--fs-body-s); line-height: 1.6; margin: 0; }
.opt-rationale { font-size: var(--fs-caption); color: var(--gray-500); font-style: italic; margin-top: 8px; }

.opt-final-audit { margin-top: 16px; font-size: var(--fs-body-s); color: var(--gray-700); text-align: center; }
.opt-final-audit strong { color: var(--primary); font-size: 1.2em; }

.paywall-title { font-weight: 700; font-size: var(--fs-body-m); margin: 12px 0 4px; }
.paywall-desc { font-size: var(--fs-caption); color: var(--gray-500); margin: 0 0 12px; }

/* ── History Sidebar ── */
.history-sidebar {
  width: 260px; border-right: 1px solid var(--border); padding: var(--sp-16);
  overflow-y: auto; background: var(--gray-50); display: none;
}
.history-sidebar.visible { display: block; }
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-16);
}
.history-header h3 { font-size: var(--fs-body-s); margin: 0; }
.history-clear {
  background: none; border: none; font-size: var(--fs-caption); color: var(--gray-500);
  cursor: pointer; font-family: var(--font-family);
}
.history-clear:hover { color: var(--error); }
.history-item {
  padding: var(--sp-12); border-radius: var(--radius-btn); cursor: pointer;
  margin-bottom: var(--sp-8); transition: background 0.2s;
  border: 1px solid transparent;
}
.history-item:hover { background: var(--card-bg); border-color: var(--border); }
.history-item.active { background: var(--card-bg); border-color: var(--primary); }
.history-item-title {
  font-size: var(--fs-body-s); color: var(--gray-900); margin-bottom: var(--sp-4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-item-date { font-size: var(--fs-caption); color: var(--gray-500); }
.history-item-delete {
  float: right; background: none; border: none; color: var(--gray-300);
  cursor: pointer; font-size: 14px; padding: 0 4px;
}
.history-item-delete:hover { color: var(--error); }

@media (max-width: 768px) {
  .history-sidebar { position: fixed; left: 0; top: var(--nav-height); bottom: 0; z-index: 50; }
}

/* ── Input Tabs (optimize page) ── */
.input-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-16);
}
.input-tab {
  padding: var(--sp-12) var(--sp-20); background: none; border: none;
  font-size: var(--fs-body-s); color: var(--gray-500); cursor: pointer;
  font-family: var(--font-family); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.2s, border-color 0.2s;
}
.input-tab:hover { color: var(--gray-700); }
.input-tab.active {
  color: var(--primary); border-bottom-color: var(--primary); font-weight: 500;
}

/* ── Option Row ── */
.option-row {
  display: flex; align-items: flex-start; gap: var(--sp-12);
}
.option-label {
  font-size: var(--fs-body-s); color: var(--gray-700); font-weight: 500;
  padding-top: 6px; min-width: 64px; flex-shrink: 0;
}

/* ── JD Toggle ── */
.jd-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: var(--sp-12) var(--sp-16);
  background: var(--gray-50); border: 1px dashed var(--border);
  border-radius: var(--radius-btn); cursor: pointer;
  font-family: var(--font-family); font-size: var(--fs-body-s);
  color: var(--gray-500); transition: border-color 0.2s, color 0.2s;
}
.jd-toggle:hover { border-color: var(--primary); color: var(--primary); }
.jd-toggle-icon { font-size: 18px; font-weight: 300; margin-left: var(--sp-8); }

/* ── Tool Layout (two-column) ── */
.tool-layout {
  display: grid; grid-template-columns: 380px 1fr; gap: var(--sp-24);
  align-items: start;
}
.tool-input { min-width: 0; }
.tool-result {
  min-width: 0; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: var(--sp-24);
  min-height: 400px;
}
.result-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; min-height: 350px;
  color: var(--gray-500); font-size: var(--fs-body-s);
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-result { min-height: 200px; }
  .result-empty { min-height: 150px; }
}

/* ----- Support modal (联系客服) ----- */
.support-wxid-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  margin-bottom: var(--sp-16);
  font-size: var(--fs-body-s);
}
.support-copy-btn {
  padding: var(--sp-4) var(--sp-12);
  border: 1px solid var(--primary);
  border-radius: var(--radius-round);
  background: none;
  color: var(--primary);
  font-size: var(--fs-caption);
  cursor: pointer;
}
.support-copy-btn:hover {
  background: var(--primary);
  color: #fff;
}
.payment-support-line {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--gray-500);
  margin-top: var(--sp-8);
}
.payment-support-line a {
  color: var(--primary);
}
.payment-hint a {
  color: var(--primary);
}
