/* MDtoDOCX — 基础组件类
 * 依赖 theme.css。SEO 站 HTML 直接用这些 class，App 与插件 import 同一份。
 * 不引 Tailwind CDN（拖慢 LCP 且无法 tree-shake）。
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% -8%, rgba(75,91,215,.08), transparent 30rem),
    radial-gradient(circle at 96% 8%, rgba(245,158,11,.08), transparent 26rem),
    var(--canvas);
  color: var(--ink-700);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0; }
h1 { font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0 0 var(--sp-4); max-width: var(--measure); }
a  { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--font-mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 3px; border-radius: var(--r-sm); }

.h-hero { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.lead   { font-size: 1.125rem; line-height: 1.6; color: var(--ink-700); max-width: 60ch; }
.small  { font-size: .875rem; line-height: 1.5; }
.muted  { color: var(--ink-500); }
.eyebrow {
  display: inline-flex; align-items: center; width: fit-content; gap: var(--sp-2);
  color: var(--brand-700); font-size: .8125rem; line-height: 1; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent-500); border-radius: var(--r-full); }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); color: var(--ink-500); font-size: .875rem; }
.trust-item { display: inline-flex; align-items: center; gap: var(--sp-2); }
.trust-item::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--ok-bg) center / 10px 10px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 6.2 2.2 2.2 5.3-5.3' fill='none' stroke='%230E9F6E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── 布局 ───────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }
.section { padding-block: var(--sp-7); }
@media (min-width: 768px) { .section { padding-block: var(--sp-9); } }
.section-alt { background: var(--surface-2); }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ── 按钮 ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: var(--sp-2) var(--sp-4);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: var(--font-body); font-size: .9375rem; font-weight: 600; line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn-sm { min-height: 36px; padding: 6px var(--sp-3); font-size: .875rem; }
.btn-lg { min-height: 48px; padding-inline: var(--sp-5); font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 主 CTA — 一屏一个 */
.btn-primary { background: var(--accent-500); color: var(--on-accent); box-shadow: var(--sh-accent); }
.btn-primary:hover { background: var(--accent-600); transform: translateY(-1px); }
.btn-primary:active { background: var(--accent-700); transform: translateY(0); }

.btn-brand { background: var(--brand-600); color: #fff; }
.btn-brand:hover { background: var(--brand-700); }

.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink-700); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }

.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--surface-2); }

/* Pro 被锁动作 — 永远可点，点了弹升级面板，不用 disabled */
.btn-pro { background: var(--surface); border-color: var(--pro-line); color: var(--pro-ink); }
.btn-pro:hover { background: #FFFBF0; }

/* ── 徽章与锁标 ─────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 3px var(--sp-2); border-radius: var(--r-full);
  font-size: .75rem; font-weight: 600; letter-spacing: .02em; line-height: 1;
}
.badge-pro     { background: var(--pro-bg); color: var(--pro-ink); border: 1px solid var(--pro-line); }
.badge-free    { background: var(--surface-2); color: var(--ink-500); }
.badge-ok      { background: var(--ok-bg); color: var(--ok-500); }
.badge-new     { background: var(--brand-50); color: var(--brand-700); }
.lock::after,
.privacy-icon,
.file-icon {
  content: ""; display: inline-block; width: 14px; height: 14px; flex: none;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.lock::after,
.privacy-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.file-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 12.5 14 7a3 3 0 0 1 4.2 4.2l-7.1 7.1a5 5 0 0 1-7.1-7.1l7.2-7.2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 12.5 14 7a3 3 0 0 1 4.2 4.2l-7.1 7.1a5 5 0 0 1-7.1-7.1l7.2-7.2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── 卡片 ───────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--sh-1);
}
.card-hover { transition: box-shadow var(--t-mid), transform var(--t-mid); }
.card-hover:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.card-featured { border: 2px solid var(--brand-600); box-shadow: var(--sh-2); }

/* ── 表单 ───────────────────────────────────── */
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--ink-900);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3); font-family: var(--font-body); font-size: .9375rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.select { height: 36px; padding-inline: var(--sp-3); cursor: pointer; }
.label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-700); margin-bottom: var(--sp-1); }

/* ── 转换器 ─────────────────────────────────── */
.converter {
  position: relative; isolation: isolate; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); box-shadow: 0 20px 55px rgba(20,22,26,.10), 0 2px 7px rgba(20,22,26,.05); overflow: hidden;
}
.converter::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; z-index: 2; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); }
.converter-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.converter-body { display: grid; grid-template-columns: 1fr; min-height: 380px; }
@media (min-width: 900px) { .converter-body { grid-template-columns: 1fr 1fr; } }
.converter-input {
  border: 0; resize: none; padding: var(--sp-4);
  font-family: var(--font-mono); font-size: .875rem; line-height: 1.7;
  color: var(--ink-900); background: var(--surface); outline: none; min-height: 380px;
}
.converter-preview {
  background: var(--surface-2); padding: var(--sp-4);
  border-top: 1px solid var(--line); overflow: auto; max-height: 560px;
}
@media (min-width: 900px) { .converter-preview { border-top: 0; border-left: 1px solid var(--line); } }
/* 预览纸面 — 让用户在网页上就看到 Word 的样子 */
.doc-paper {
  background: var(--doc-paper); color: var(--doc-ink);
  font-family: var(--font-doc); font-size: 15px; line-height: 1.5;
  padding: 40px 44px; border-radius: 2px; box-shadow: var(--doc-shadow);
  max-width: 680px; margin-inline: auto;
}
.doc-paper h1 { font-family: var(--font-doc); font-size: 24px; font-weight: 700; margin: 0 0 12px; color: var(--doc-ink); letter-spacing: 0; }
.doc-paper .doc-title { font-family: var(--font-doc); font-size: 24px; line-height: 1.15; font-weight: 700; margin: 0 0 12px; color: var(--doc-ink); letter-spacing: 0; }
.doc-paper h2 { font-family: var(--font-doc); font-size: 19px; font-weight: 700; margin: 20px 0 8px; color: var(--doc-ink); letter-spacing: 0; }
.doc-paper h3 { font-family: var(--font-doc); font-size: 16px; font-weight: 700; margin: 16px 0 6px; color: var(--doc-ink); }
.doc-paper p  { margin: 0 0 10px; max-width: none; }
.doc-paper table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.doc-paper th, .doc-paper td { border: 1px solid #BFBFBF; padding: 6px 9px; text-align: left; }
.doc-paper th { background: #D9D9D9; font-weight: 700; }
.doc-paper pre { background: #F2F2F2; padding: 10px 12px; font-family: var(--font-mono); font-size: 12.5px; overflow-x: auto; margin: 10px 0; }
.doc-paper blockquote { border-left: 3px solid #BFBFBF; margin: 10px 0; padding-left: 14px; color: #444; }

.converter-options {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); background: var(--surface-2);
}
.converter-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4); border-top: 1px solid var(--line);
}
.privacy-note { margin-left: auto; font-size: .8125rem; color: var(--ink-500); display: flex; align-items: center; gap: 6px; }
@media (max-width: 767px) {
  .converter-actions {
    position: sticky; bottom: 0; z-index: var(--z-sticky);
    background: var(--surface); box-shadow: 0 -4px 16px rgba(20,22,26,.08);
  }
  .privacy-note { margin-left: 0; width: 100%; }
}

/* ── 表格 ───────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { padding: var(--sp-3); text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-weight: 600; color: var(--ink-900); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 767px) {
  .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

/* ── FAQ ────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) 0; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; color: var(--ink-900); text-align: left;
}
.faq-a { padding-bottom: var(--sp-4); color: var(--ink-700); }

/* ── 头尾 ───────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(252,251,248,.9); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: var(--sp-5); min-height: 68px; }
.brand { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; color: var(--ink-900); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, var(--brand-500), var(--brand-700)); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; box-shadow: 0 5px 12px rgba(59,73,190,.25); }
.nav { display: none; gap: var(--sp-4); margin-left: var(--sp-4); }
@media (min-width: 1040px) { .nav { display: flex; } }
.nav a { color: var(--ink-700); font-size: .9375rem; font-weight: 500; }
.nav a:hover { color: var(--brand-600); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand-700); font-weight: 700; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.mobile-nav { position: relative; display: block; }
.mobile-nav > summary {
  display: grid; place-items: center; width: 44px; height: 44px; list-style: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-900);
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { width: 18px; height: 2px; border-radius: 2px; background: currentColor; display: block; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
.mobile-nav[open] .menu-icon { background: transparent; }
.mobile-nav[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.mobile-nav[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.mobile-nav-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px));
  display: grid; padding: var(--sp-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
}
.mobile-nav-panel a { min-height: 44px; display: flex; align-items: center; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); color: var(--ink-700); font-weight: 600; }
.mobile-nav-panel a:hover { background: var(--surface-2); text-decoration: none; }
@media (min-width: 1040px) { .mobile-nav { display: none; } }
@media (max-width: 680px) { .header-extension { display: none; } }
.site-footer { background: linear-gradient(180deg, var(--surface-2), #EEEAE1); border-top: 1px solid var(--line); padding-block: var(--sp-8) var(--sp-5); font-size: .875rem; }
.footer-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-5); padding-bottom: var(--sp-6); margin-bottom: var(--sp-6); border-bottom: 1px solid var(--line-strong); }
.footer-intro p { margin: var(--sp-2) 0 0; }
.site-footer h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); margin-bottom: var(--sp-3); }
.site-footer a { color: var(--ink-700); display: block; padding-block: 5px; }
.site-footer a:hover { color: var(--brand-600); }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-6); margin-top: var(--sp-6); border-top: 1px solid var(--line-strong); }
.footer-bottom p { margin: 0; }
@media (max-width: 680px) { .footer-intro, .footer-bottom { flex-direction: column; } }

/* ── 弹窗 ───────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-modal); display: grid; place-items: center; padding: var(--sp-4); }
.modal {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: var(--sp-6);
  animation: modal-in var(--t-panel) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 提示条 ─────────────────────────────────── */
.notice { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); font-size: .9375rem; border: 1px solid transparent; }
.notice-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-900); }
.notice-ok   { background: var(--ok-bg);   color: #0A6B4B; }
.notice-warn { background: var(--warn-bg); color: #8A4B04; }
.notice-err  { background: var(--err-bg);  color: #8F1919; }

/* ── 工具页网格 ─────────────────────────────── */
.tool-tile {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4); color: var(--ink-900);
  transition: border-color var(--t-fast), box-shadow var(--t-mid), transform var(--t-mid);
}
.tool-tile:hover { border-color: var(--brand-200); box-shadow: var(--sh-2); transform: translateY(-2px); text-decoration: none; }
.tool-tile .t { font-family: var(--font-display); font-weight: 600; font-size: .9375rem; margin-bottom: 2px; }
.tool-tile .d { font-size: .8125rem; color: var(--ink-500); }

/* ── 步骤 ───────────────────────────────────── */
.step-num { width: 30px; height: 30px; border-radius: var(--r-full); background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-weight: 700; font-size: .875rem; flex: none; }
.step-card { align-items: flex-start; padding: var(--sp-4); border-radius: var(--r-lg); border: 1px solid transparent; }
.step-card:hover { background: var(--surface); border-color: var(--line); box-shadow: var(--sh-1); }

.skip-link { position: fixed; left: var(--sp-4); top: var(--sp-4); z-index: calc(var(--z-toast) + 1); transform: translateY(-160%); background: var(--ink-900); color: #fff; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { transform: none; }

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

/* ── 转换器：React 岛补充 ─────────────────────── */
.converter-input-wrap { display: flex; flex-direction: column; min-height: 380px; }
.converter-input-wrap .converter-input { flex: 1; width: 100%; }
.converter-input-foot { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-top: 1px dashed var(--line); }
.file-chip { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--brand-50); color: var(--brand-900); border-bottom: 1px solid var(--line); }
.ref-doc { gap: var(--sp-2); flex-wrap: wrap; }
.ref-doc-chip { gap: var(--sp-2); padding: 2px var(--sp-2) 2px var(--sp-3); background: var(--brand-50); color: var(--brand-900); border: 1px solid var(--brand-100); border-radius: var(--r-md); }
.ref-doc-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-doc-error { padding: 2px var(--sp-2); }
.preview-note { margin: 0 auto var(--sp-3); max-width: 680px; }
.doc-paper.doc-code pre { background: none; padding: 0; margin: 0; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.preview-warnings { margin: var(--sp-3) auto 0; max-width: 680px; padding-left: 1.2em; }
.btn-pro.is-on { background: #FFF6DB; border-color: var(--accent-400); }
.btn.is-busy { opacity: .85; }
.dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: dot-pulse 900ms ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 150ms; } .dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes dot-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.converter-flash { margin: 0 var(--sp-4) var(--sp-3); }
.converter-nudge { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0 var(--sp-4) var(--sp-4); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); color: var(--ink-700); }

/* ── 登录挂件 ───────────────────────────────── */
.auth-widget { position: relative; }
.auth-trigger { gap: var(--sp-2); }
.auth-avatar { width: 24px; height: 24px; border-radius: var(--r-full); background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.auth-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; z-index: var(--z-dropdown);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); padding: var(--sp-4); animation: modal-in var(--t-mid) both; text-align: left;
}
.auth-pop .btn { width: 100%; }
.auth-pop-head { padding-bottom: var(--sp-3); margin-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.auth-email { font-weight: 600; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-item { display: block; width: 100%; text-align: left; padding: var(--sp-2) var(--sp-2); border: 0; background: none; border-radius: var(--r-sm); color: var(--ink-700); font: inherit; font-size: .9375rem; cursor: pointer; }
.auth-item:hover { background: var(--surface-2); text-decoration: none; }
.auth-or { display: flex; align-items: center; gap: var(--sp-2); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-code { font-family: var(--font-mono); font-size: 1.25rem; letter-spacing: .3em; text-align: center; }

@media (pointer: coarse) {
  .btn-sm, .select, .auth-item { min-height: 44px; }
}

@media (max-width: 767px) {
  .converter-body { min-height: 0; }
  .converter-input-wrap, .converter-input-wrap .converter-input, .converter-input { min-height: 240px; }
  .converter-preview { max-height: 360px; padding: var(--sp-3); }
  .doc-paper { padding: 28px 24px; }
  .converter-options { gap: var(--sp-2); }
  .converter-actions > .btn-primary { width: 100%; }
}

/* ── 升级面板 ───────────────────────────────── */
.upgrade { position: relative; max-width: 640px; }
.upgrade-close { position: absolute; top: var(--sp-3); right: var(--sp-3); font-size: 1.25rem; }
.upgrade h2 { margin-bottom: var(--sp-2); padding-right: var(--sp-7); }
.upgrade-compare { margin: var(--sp-4) 0 var(--sp-5); font-size: .875rem; }
.upgrade-compare th:first-child { width: 55%; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
@media (max-width: 560px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4);
  cursor: pointer; font: inherit; color: var(--ink-700); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.price-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.price-card.is-selected { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.price-card.card-featured { border-width: 2px; }
.price-badge { position: absolute; top: -10px; left: var(--sp-3); }
.price-name { font-weight: 600; color: var(--ink-900); }
.price-amount { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--ink-900); letter-spacing: -.02em; }
.price-amount small { font-size: .8125rem; font-weight: 500; color: var(--ink-500); letter-spacing: 0; }
.upgrade-lifetime { margin: var(--sp-3) 0 var(--sp-4); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-600); font: inherit; cursor: pointer; text-decoration: underline; }
.link-btn.is-selected { font-weight: 600; }
.upgrade-cta { width: 100%; }
.upgrade-guarantee { margin: var(--sp-3) 0 0; text-align: center; }

/* ── 批量转换面板（Pro，走 worker） ─────────────── */
.batch-panel { max-width: 900px; }
.batch-drop {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2);
}
.batch-drop.is-full { border-style: solid; }
.batch-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.batch-item {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); background: var(--surface);
}
.batch-item:last-child { border-bottom: 0; }
.batch-item.is-done { background: var(--ok-bg); }
.batch-item.is-failed { background: var(--err-bg); }
.batch-item-name { flex: 1; min-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-900); }
.batch-item-status { color: var(--ink-500); min-width: 9ch; }
.batch-item-failed { color: #8F1919; font-weight: 600; }
.batch-item-error { width: 100%; margin: 0; color: #8F1919; }
.batch-controls { flex-wrap: wrap; gap: var(--sp-4); }
.batch-actions { flex-wrap: wrap; }
@media (max-width: 700px) {
  .batch-item { gap: var(--sp-2); }
  .batch-item-name { min-width: 8ch; }
}
.remote-toggle { gap: var(--sp-2); color: var(--ink-700); }
.privacy-note.is-remote { color: #8A4B04; }
