/* ===========================================================
   轻页 PDF —— 样式表
   =========================================================== */
:root {
  --brand: #e8453c;
  --brand-dark: #cf332b;
  --brand-soft: #fff2f0;
  --ink: #161d2b;
  --ink-2: #3b4453;
  --muted: #6b7280;
  --line: #e8eaee;
  --line-2: #f1f2f5;
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
  --green: #16a34a;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 6px 24px -8px rgba(16, 24, 40, .14);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .22);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; }
::selection { background: #ffd9d4; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 头部 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px -12px rgba(16,24,40,.3); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #ff6a5e, var(--brand));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px -6px rgba(232, 69, 60, .75);
  font-size: 15px; font-weight: 800; letter-spacing: -.04em;
}
.logo small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: -4px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  position: relative; padding: 8px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); }

.nav-drop { position: relative; }
.nav-link .nl-short { display: none; }
.nav-drop > .nav-link { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-drop .caret { transition: transform .2s; }
.nav-drop:hover .caret { transform: rotate(180deg); }
.drop-panel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: .18s;
  max-height: min(74vh, 560px); overflow: auto;
}
/* 工具多的专栏排成两列，别让下拉比屏幕还长 */
.drop-panel.wide {
  min-width: 470px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px;
  align-content: start;
}
.drop-panel.wide .drop-all { grid-column: 1 / -1; }
.nav-drop:hover .drop-panel { opacity: 1; visibility: visible; transform: none; }
.drop-panel a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.drop-panel a:hover { background: var(--bg-soft); color: var(--ink); }
.drop-panel a .ic { color: var(--brand); flex: none; }
.drop-panel .soon { margin-left: auto; font-size: 10px; color: var(--muted); background: var(--line-2); padding: 1px 6px; border-radius: 5px; }

.header-search {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 10px; height: 36px; width: 180px;
  transition: .18s;
}
.header-search:focus-within { background: #fff; border-color: #d7dbe2; width: 220px; box-shadow: var(--shadow-sm); }
.header-search input { border: 0; background: none; outline: none; font-size: 13.5px; width: 100%; color: var(--ink); font-family: inherit; }
.header-search .ic { color: #9aa1ad; flex: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s, color .15s;
  background: var(--bg-soft); color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(232,69,60,.9); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #cfd4dc; background: #fff; color: var(--ink); }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-block { width: 100%; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.danger:hover { background: #fdeceb; color: var(--brand); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% -140px, #ffe9e5 0%, rgba(255,233,229,0) 70%),
    linear-gradient(#fff, #fdfcfc);
  padding: 64px 0 54px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#e9ebef 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(700px 320px at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(700px 320px at 50% 0%, #000 0%, transparent 75%);
  opacity: .7;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 4.4vw, 50px); line-height: 1.14; letter-spacing: -.035em;
  margin: 0 0 18px; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub {
  font-size: clamp(15px, 1.6vw, 17.5px); color: var(--muted);
  max-width: 660px; margin: 0 auto 30px; line-height: 1.75;
}
.hero-badges { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.hero-badge { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.hero-badge .ic { color: var(--green); }

/* 上传卡 */
.drop-card {
  max-width: 720px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: 22px;
  padding: 44px 32px 38px; box-shadow: var(--shadow-lg);
  position: relative;
}
.drop-card .dz-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
}
.drop-card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.drop-card p { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.drop-card .hint { margin: 16px 0 0; font-size: 12px; color: #9aa1ad; }
.drop-card.dragover { border-color: var(--brand); background: #fffaf9; }

/* ---------------- 工具网格 ---------------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { margin: 0 0 6px; font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.025em; font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }
.section-head .more { font-size: 14px; font-weight: 650; color: var(--brand); display: flex; align-items: center; gap: 4px; }
.section-head .more:hover { gap: 8px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-grid.filtered { grid-template-columns: repeat(3, 1fr); }

.tool-card {
  position: relative; display: block; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px 18px; cursor: pointer; overflow: hidden;
  transition: transform .16s, box-shadow .18s, border-color .18s;
}
.tool-card:hover { transform: translateY(-3px); border-color: #f2c9c4; box-shadow: var(--shadow); }
.tool-card .chip {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 14px; transition: transform .2s;
}
.tool-card:hover .chip { transform: scale(1.06) rotate(-3deg); }
.tool-card h3 { margin: 0 0 5px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.tool-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* 专栏工具少时补一张「进入专栏」卡，凑齐一行不显空 */
.tool-card.cta {
  background: var(--bg-soft); border-style: dashed; border-color: #dcdde2;
  display: flex; flex-direction: column; justify-content: center;
}
.tool-card.cta:hover { border-color: #f2c9c4; background: #fff; }
.tool-card.cta .chip { width: 38px; height: 38px; border-radius: 11px; }
.tool-card.cta h3 { color: var(--brand); display: flex; align-items: center; gap: 6px; }
.tool-card.cta p { color: var(--muted); }
.tool-card .tag {
  position: absolute; top: 14px; right: 14px; font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; letter-spacing: .02em;
}
.tag-hot { background: var(--brand-soft); color: var(--brand); }
.tag-soon { background: var(--line-2); color: #9aa1ad; }
.tool-card.disabled { cursor: default; }
.tool-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tool-card.disabled .chip { filter: grayscale(.7); opacity: .6; }
.tool-card.disabled h3 { color: var(--ink-2); }

/* ---------------- 特性区 ---------------- */
.feature-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  padding: 34px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.feature { display: flex; gap: 14px; }
.feature .fic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--bg-soft); color: var(--ink-2);
}
.feature h4 { margin: 2px 0 4px; font-size: 14.5px; font-weight: 700; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---------------- 深色横幅 ---------------- */
.promo {
  background: linear-gradient(120deg, #1b2230 0%, #2a1b1a 55%, #3a201d 100%);
  color: #fff; border-radius: 24px; padding: 46px 48px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.promo::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(232,69,60,.55), transparent 62%);
}
.promo h3 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.025em; }
.promo p { margin: 0; color: #c3c8d2; font-size: 14.5px; max-width: 520px; }
.promo .btn { position: relative; z-index: 1; }
.promo .promo-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; letter-spacing: .02em;
}

/* ---------------- 页脚 ---------------- */
.site-footer { background: #131926; color: #a8afbd; margin-top: 64px; padding: 54px 0 28px; font-size: 13.5px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.site-footer .logo small { color: #6f7a8c; }
.footer-about { max-width: 300px; line-height: 1.75; color: #8d95a4; margin: 0 0 16px; }
.footer-col h5 { color: #fff; font-size: 13px; font-weight: 700; margin: 4px 0 14px; letter-spacing: .02em; }
.footer-col a { display: block; padding: 5px 0; color: #8d95a4; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.09);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #6f7a8c; font-size: 12.5px;
}
.footer-bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a:hover { color: #fff; }
.footer-note { color: #5c6677; font-size: 12px; margin-top: 10px; }

/* ---------------- 工具页 ---------------- */
.tool-page { padding: 30px 0 60px; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { color: #c6cbd3; }

.tool-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.tool-head .chip { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; flex: none; }
.tool-head h1 { margin: 0 0 6px; font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -.03em; }
.tool-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 620px; }

.workspace {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden;
}
.ws-body { padding: 26px; }

/* 上传区 */
.dropzone {
  border: 2px dashed #dfe3ea; border-radius: 16px; background: var(--bg-soft);
  padding: 52px 24px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.dropzone:hover { border-color: #c9ced8; background: #f5f6f9; }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  background: #fff; border: 1px solid var(--line); color: var(--brand);
  display: grid; place-items: center;
}
.dropzone h3 { margin: 0 0 6px; font-size: 16px; }
.dropzone p { margin: 0; font-size: 13px; color: var(--muted); }
.dropzone .or { display: block; margin-top: 12px; font-size: 12px; color: #9aa1ad; }

/* 文件列表 */
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.file-row:hover { border-color: #dfe3ea; box-shadow: var(--shadow-sm); }
.file-row.dragging { opacity: .5; border-color: var(--brand); }
.file-row .grip { color: #c6cbd3; cursor: grab; flex: none; }
.file-row .grip:active { cursor: grabbing; }
.file-row .fi {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 800;
}
.file-row .fmeta { flex: 1; min-width: 0; }
.file-row .fname { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .fsub { font-size: 11.5px; color: var(--muted); }
.file-row .fops { display: flex; gap: 2px; }

/* 选项面板 */
.options { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.options-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa1ad; margin-bottom: 14px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.field .hintline { font-size: 11.5px; color: #9aa1ad; margin-top: 5px; }
.input, .select {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13.5px; font-family: inherit;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: #f0a49d; box-shadow: 0 0 0 3px rgba(232,69,60,.12); }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 6px 13px; border-radius: 7px; font-size: 12.5px;
  font-weight: 650; color: var(--muted); cursor: pointer; transition: .15s;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.switch { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #dfe3ea; position: relative; transition: .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* 底部操作条 */
.ws-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px; background: var(--bg-soft); border-top: 1px solid var(--line);
}
.ws-foot .summary { font-size: 12.5px; color: var(--muted); }
.ws-foot .summary b { color: var(--ink); font-weight: 700; }

/* 结果 */
.result-card { text-align: center; padding: 34px 20px 26px; }
.result-card .ok {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: #e9f9ef; color: var(--green); display: grid; place-items: center;
}
.result-card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.result-card .stat { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.result-card .stat b { color: var(--ink); }
.result-card .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 进度 */
.progress-wrap { padding: 46px 26px; text-align: center; }
.progress-wrap h3 { margin: 0 0 6px; font-size: 17px; }
.progress-wrap p { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 0 auto; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ff7b6d, var(--brand)); transition: width .25s; }

/* 缩略图（排列页面） */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.thumb {
  position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #fff; cursor: grab; transition: .16s;
}
.thumb:hover { border-color: #f0a49d; box-shadow: var(--shadow); }
.thumb.dragging { opacity: .45; }
.thumb img { width: 100%; display: block; background: #fff; }
.thumb .no {
  position: absolute; left: 6px; top: 6px; z-index: 3; background: rgba(22,29,43,.78); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
}
.thumb .tops { position: absolute; right: 6px; top: 6px; z-index: 3; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.thumb:hover .tops { opacity: 1; }
.thumb .tops button {
  width: 24px; height: 24px; border-radius: 6px; border: 0; background: rgba(255,255,255,.94);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.thumb .tops button:hover { color: var(--brand); }
.thumb .del { color: var(--brand) !important; }

/* 提示 */
.toast-box { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(22,29,43,.95); color: #fff; font-size: 13.5px; padding: 10px 18px;
  border-radius: 10px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px);
  transition: .24s; max-width: 84vw;
}
.toast.in { opacity: 1; transform: none; }
.toast-error { background: #c0342b; }
.toast-ok { background: #14803c; }

/* 通用三栏（可响应） */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* 开关需要压过 .field label 的 display:block */
.field label.switch, .switch {
  display: flex; align-items: center; gap: 9px;
  font-weight: 500; color: var(--ink-2); margin-bottom: 0; cursor: pointer;
}
.field input[type=color] { width: 100%; max-width: 132px; padding: 4px; height: 40px; cursor: pointer; }

/* 空状态 / 加载 */
.loading-screen { display: grid; place-items: center; min-height: 60vh; color: var(--muted); font-size: 14px; }
.spinner {
  width: 26px; height: 26px; border: 2.5px solid var(--line); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn .32s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .tool-grid, .tool-grid.filtered { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { max-width: none; }
}
@media (max-width: 860px) {
  .main-nav {
    display: flex; flex: 1; min-width: 0; gap: 2px;
    overflow-x: auto; scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav .nav-drop { display: block; flex: none; }
  .main-nav .drop-panel { display: none; }
  .main-nav .nav-link { padding: 8px 7px; font-size: 14px; white-space: nowrap; }
  .nav-link .nl-full, .main-nav .caret { display: none; }
  .nav-link .nl-short { display: inline; }
  .header-inner { gap: 14px; }
  .header-actions .btn-ghost { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .header-inner { justify-content: space-between; }
  .tool-grid, .tool-grid.filtered { grid-template-columns: repeat(2, 1fr); }
  .feature-strip { grid-template-columns: 1fr; gap: 22px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .promo { padding: 32px 26px; }
  .promo h3 { font-size: 22px; }
  .hero { padding: 40px 0 36px; }
  .drop-card { padding: 30px 20px; }
  .ws-body { padding: 18px; }
  .ws-foot { flex-direction: column; align-items: stretch; }
  .tool-head { flex-direction: column; gap: 12px; }
}
@media (max-width: 560px) {
  .header-actions .btn-primary { display: none; }
  .wrap { padding: 0 16px; }
  .tool-grid, .tool-grid.filtered { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .section { padding-top: 38px; padding-bottom: 38px; }
  .btn-lg { width: 100%; }
  .opt-grid { grid-template-columns: 1fr; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  /* 首页首屏在窄屏留白更从容一些 */
  .hero h1 { font-size: 26px; line-height: 1.26; letter-spacing: -.02em; text-wrap: balance; }
  .hero-sub { font-size: 14.5px; line-height: 1.7; }
  .hero { padding: 32px 0 30px; }
  .logo { font-size: 17px; gap: 8px; }
  .logo-mark { width: 32px; height: 32px; border-radius: 9px; }
  .logo small { font-size: 9px; letter-spacing: .12em; }
  .main-nav .nav-link { font-size: 13.5px; padding: 8px 5px; }
  .header-actions .btn { padding: 9px 14px; font-size: 13.5px; }
  .hero-badges { gap: 10px 16px; }
}


/* ===========================================================
   三专栏 / 参数表单 / 签名板（新增）
   =========================================================== */
.logo-mark svg { color: #fff; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 5px 12px; border-radius: 999px;
  margin-bottom: 16px;
}

/* 专栏切换 */
.cat-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2); transition: .15s;
}
.cat-tab b {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--line-2); padding: 1px 6px; border-radius: 6px;
}
.cat-tab:hover { border-color: #dfe3ea; color: var(--ink); }
.cat-tab.on { border-color: #f4c6c1; background: var(--brand-soft); color: var(--brand); }
.cat-tab.on b { background: #fff; color: var(--brand); }
.cat-tab .ct-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; }

/* 专栏头 */
.cat-hero {
  padding: 22px 0 21px;
  background: radial-gradient(720px 240px at 18% -60px, hsl(var(--cat-hue) 92% 97%), #fff 74%);
  border-bottom: 1px solid var(--line-2);
}
.cat-head { display: flex; align-items: flex-start; gap: 16px; margin: 14px 0 20px; }
.cat-icon { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; flex: none; }
.cat-head h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.cat-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 680px; }

.group-block { margin-bottom: 36px; }
.group-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; }
.group-head .g-ic.sm { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; margin-top: 2px; }
.group-head .gh-txt { flex: 1; min-width: 0; }
.group-head h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.01em; }
.group-head h3 a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.group-head h3 a:hover { color: var(--brand); }
.group-head p { margin: 0; color: var(--muted); font-size: 13px; }
.group-head .gh-more {
  flex: none; display: inline-flex; align-items: center; gap: 3px; padding-top: 3px;
  font-size: 12px; font-weight: 650; color: var(--muted); white-space: nowrap; transition: .15s;
}
.group-head .gh-more:hover { color: var(--brand); }

/* ---------- 两级栏目：大栏目（用途）→ 小栏目（文件类型） ---------- */
.gblock { margin-bottom: 44px; }
.gblock:last-child { margin-bottom: 8px; }
.gblock-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 4px; padding-bottom: 13px; border-bottom: 1px solid var(--line);
}
.gblock-head .g-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.gblock-head .g-txt { flex: 1; min-width: 0; }
.gblock-head h2 { margin: 0 0 3px; font-size: 20px; letter-spacing: -.02em; line-height: 1.3; }
.gblock-head h2 a { color: var(--ink); }
.gblock-head h2 a:hover { color: var(--brand); }
.gblock-head p { margin: 0; font-size: 13px; color: var(--muted); }
.gblock-head .g-more {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; transition: .15s;
}
.gblock-head .g-more:hover { border-color: #f2c9c4; color: var(--brand); background: var(--brand-soft); }

.subcat { position: relative; margin: 18px 0 0 20px; padding-left: 26px; }
.subcat::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--line), var(--line-2));
}
.subcat:last-child::before { bottom: auto; height: 24px; }
.sub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.sub-head .sub-badge { width: 21px; height: 21px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.sub-head h3 { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .07em; color: var(--ink-2); }
.sub-head .sub-n {
  min-width: 17px; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--line-2); border-radius: 6px; padding: 0 5px; line-height: 17px;
}
.sub-head .sub-more {
  margin-left: auto; display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 650; color: var(--muted); transition: .15s;
}
.sub-head .sub-more:hover { color: var(--brand); }

/* 大栏目页顶部概览条 */
.g-brief {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 15px; font-size: 13px; color: var(--ink-2); margin-bottom: 24px;
}
.g-brief b { color: var(--ink); }
.g-brief a { color: var(--brand); font-weight: 650; }
.g-brief i { color: var(--muted); font-style: normal; padding: 0 1px; }

/* 首页「按用途找」入口卡 */
.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.use-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, hsl(var(--g-hue) 92% 98.6%), #fff 58%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; transition: transform .16s, box-shadow .18s, border-color .18s;
}
.use-card:hover { transform: translateY(-3px); border-color: hsl(var(--g-hue) 52% 86%); box-shadow: var(--shadow); }
.uc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.uc-top .chip { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.uc-top h3 { margin: 0; font-size: 16.5px; letter-spacing: -.01em; flex: 1; }
.uc-top b {
  font-size: 12px; font-weight: 700; color: hsl(var(--g-hue) 70% 40%);
  background: #fff; border: 1px solid hsl(var(--g-hue) 70% 89%); border-radius: 7px; padding: 1px 7px;
}
.use-card > p { margin: 0 0 12px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.uc-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.uc-cats span {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
}
.uc-go {
  margin-top: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 700; color: hsl(var(--g-hue) 70% 40%);
}

/* 下拉面板里的工具数量 */
.drop-panel a em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--line-2); border-radius: 6px; padding: 1px 6px;
}

.cat-tip {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
}
.cat-tip .fic { color: var(--brand); flex: none; margin-top: 1px; }
.cat-tip.cross { background: #fff; margin-top: 10px; }
.cat-tip.cross .fic { color: var(--muted); }
.cat-tip.cross a { color: var(--brand); font-weight: 600; border-bottom: 1px solid rgba(232, 69, 60, .3); }
.cat-tip.cross a:hover { border-bottom-color: var(--brand); }

/* 参数表单补充 */
.field.wide { grid-column: 1 / -1; }
.field[hidden] { display: none !important; }
.field-switch { align-self: end; padding-bottom: 2px; }
.field.note {
  grid-column: 1 / -1; display: flex; gap: 9px; align-items: flex-start;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 11px;
  padding: 12px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.65;
}
.field.note .ic { flex: none; margin-top: 2px; color: #9aa1ad; }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; }
.range-val {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  min-width: 48px; text-align: right; font-variant-numeric: tabular-nums;
}

/* 签名板 */
.pad-wrap { border: 1.5px dashed #dfe3ea; border-radius: 14px; background: #fcfcfd; padding: 8px; }
.pad {
  width: 100%; height: 170px; display: block; border-radius: 10px;
  background: #fff; cursor: crosshair; touch-action: none;
}
.pad-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 4px 2px; font-size: 12px; color: #9aa1ad;
}

/* 图片选择 */
.img-pick { display: flex; align-items: center; gap: 12px; }
.img-prev {
  width: 72px; height: 52px; border-radius: 9px; border: 1px dashed var(--line);
  display: grid; place-items: center; font-size: 11px; color: #9aa1ad;
  overflow: hidden; background: var(--bg-soft); flex: none;
}
.img-prev.has { border-style: solid; border-color: #dfe3ea; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }

/* 文件类型角标 */
.file-row .fi { font-size: 9.5px; letter-spacing: .02em; }
.file-row .fi-pdf { background: var(--brand-soft); color: var(--brand); }
.file-row .fi-docx, .file-row .fi-doc { background: hsl(213 92% 96%); color: hsl(213 74% 44%); }
.file-row .fi-xlsx { background: hsl(146 62% 95%); color: hsl(146 60% 32%); }
.file-row .fi-csv { background: hsl(168 62% 95%); color: hsl(168 58% 30%); }
.file-row .fi-image, .file-row .fi-img { background: hsl(330 88% 96%); color: hsl(330 68% 45%); }
.file-row .fi-pptx { background: hsl(26 92% 95%); color: hsl(26 74% 40%); }
.file-row .fi-txt { background: hsl(220 16% 95%); color: hsl(220 12% 38%); }

/* 工具页头部的「支持哪几种格式」徽标 */
.fmt-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fmt-tags span {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
}
.fmt-tags i {
  font-style: normal; font-size: 12px; color: #9aa1ad; margin-left: 2px;
}

/* 卡片上的「进 → 出」小标 */
.tool-card .io {
  display: flex; align-items: center; gap: 5px; margin-top: 11px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #9aa1ad;
}
.tool-card .io b { font-weight: 700; color: #8d95a3; }
.tool-card .io b.out { color: hsl(8 74% 48%); }
.tool-card .io span { display: flex; opacity: .55; }
.tool-card.cta .io { display: none; }

/* 上传后的文件预览卡 */
.preview-slot { margin-top: 16px; }
.pv-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fcfcfd;
}
.pv-thumb {
  flex: 0 0 96px; width: 96px; height: 124px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 8px -4px rgba(16,24,40,.25);
}
.pv-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-body { flex: 1; min-width: 0; }
.pv-line1 { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pv-line2 { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.pv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.pv-chips > span { font-size: 11.5px; color: #9aa1ad; font-weight: 600; }
.pv-chip {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: .16s;
}
.pv-chip:hover { border-color: #f2c9c4; color: var(--brand); background: var(--brand-soft); }

/* 结果卡里的预览区 */
.result-card.wide { text-align: left; }
.result-card.wide .ok, .result-card.wide h3, .result-card.wide .stat { text-align: center; }
.result-card.wide .actions { justify-content: center; }
.result-preview {
  margin: 4px 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: #fcfcfd; max-height: 460px; overflow: auto; text-align: left;
}

/* 文档对比 */
.cmp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cmp-head b { font-size: 15px; }
.cmp-head span { font-size: 11.5px; color: #9aa1ad; }
.cmp-pair { margin-bottom: 16px; }
.cmp-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cmp-arrow { color: var(--brand); margin: 0 4px; }
.cmp-stat { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.cmp-line {
  font-size: 12.5px; line-height: 1.7; padding: 3px 0 3px 22px; position: relative;
  border-radius: 6px; word-break: break-word;
}
.cmp-line .cmp-tag {
  position: absolute; left: 2px; top: 3px; width: 16px; text-align: center;
  font-weight: 800; font-size: 11px; color: #b6bcc7;
}
.cmp-line.eq { color: #9aa1ad; }
.cmp-line.del { color: #c0281c; background: #fdf2f1; text-decoration: line-through; text-decoration-color: #f0b4ae; }
.cmp-line.del .cmp-tag { color: #c0281c; }
.cmp-line.ins { color: #1f7a3d; background: #f1faf3; }
.cmp-line.ins .cmp-tag { color: #1f7a3d; }
.cmp-line.mod { color: var(--ink-2); background: #f8f9fb; }
.cmp-line.mod del { background: #fde4e1; color: #c0281c; text-decoration: line-through; border-radius: 3px; padding: 0 1px; }
.cmp-line.mod ins { background: #d9f2e0; color: #1f7a3d; text-decoration: none; border-radius: 3px; padding: 0 1px; }
.cmp-line.fmt { color: #8a6d1f; background: #fdf9ec; }
.cmp-line.fmt i { font-style: normal; color: #a98a2f; font-size: 11.5px; margin-left: 6px; }

/* 智能摘要 */
.sum-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sum-points { margin: 0 0 12px; padding-left: 20px; }
.sum-points li { font-size: 13px; line-height: 1.75; color: var(--ink-2); margin-bottom: 6px; }
.sum-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-keys span {
  font-size: 11.5px; padding: 3px 8px; border-radius: 999px;
  background: hsl(265 90% 96%); color: hsl(265 60% 44%);
}

/* 译文对照 */
.tr-list { display: flex; flex-direction: column; gap: 8px; }
.tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 12.5px; line-height: 1.65; }
.tr-row .tr-a { color: #9aa1ad; }
.tr-row .tr-b { color: var(--ink-2); font-weight: 500; }
.tr-note { font-size: 11.5px; color: #9aa1ad; margin: 12px 0 0; line-height: 1.6; }
@media (max-width: 560px) {
  .tr-row { grid-template-columns: 1fr; gap: 2px; }
  .pv-card { flex-direction: column; }
  .pv-thumb { width: 100%; height: 140px; flex: none; }
}

.result-file { font-size: 12px; color: #9aa1ad; margin: 18px 0 0; }
.result-card .ok.bad { background: #fdeceb; color: var(--brand); }
.foot-actions { display: flex; gap: 10px; }

.drop-panel .drop-all {
  margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 700; color: var(--brand);
}
/* ---------------- 专栏页：怎么用 + 常见问题 ---------------- */
.cat-guide { margin-top: 44px; display: grid; gap: 30px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-step { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; }
.gs-no {
  width: 26px; height: 26px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--brand);
  margin-bottom: 10px;
}
.guide-step h4 { margin: 0 0 6px; font-size: 15px; font-weight: 650; }
.guide-step p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.faq-block { border-top: 1px solid var(--line); padding-top: 24px; }
.faq-block h3 { margin: 0 0 4px; font-size: 17px; }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 14px; padding: 12px 0; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 19px; line-height: 1; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }

.drop-panel .drop-all:hover { background: var(--brand-soft); }

@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .cat-head { flex-direction: column; gap: 12px; }
  .cat-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 26px; }
  .cat-tip { font-size: 13px; }
  .guide-steps { grid-template-columns: 1fr; gap: 12px; }
  .cat-guide { margin-top: 30px; gap: 24px; }
  .gblock-head { flex-wrap: wrap; }
  .gblock-head .g-more { margin-left: 50px; }
  .subcat { margin-left: 8px; padding-left: 18px; }
  .group-head .gh-more { display: none; }
  .use-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-switch { padding-bottom: 0; }
  .cat-tab { height: 36px; font-size: 12.5px; padding: 0 11px; }
  .pad { height: 140px; }
  .foot-actions { width: 100%; }
  .foot-actions .btn { flex: 1; }
  .subcat { margin-left: 0; padding-left: 0; }
  .subcat::before { display: none; }
  .gblock-head .g-more { margin-left: 0; width: 100%; justify-content: center; }
  .gblock-head h2 { font-size: 18px; }
  .g-brief { font-size: 12.5px; }
}

/* ---------------- 语言切换 ---------------- */
.lang-pick { position: relative; flex: none; }
.btn-lang {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn-lang:hover { border-color: #d7dbe2; color: var(--ink); background: var(--bg-soft); }
.btn-lang .lang-short { display: none; letter-spacing: .02em; }
.btn-lang .ic:first-child { color: var(--muted); }
.btn-lang .ic:last-child { transition: transform .18s; color: var(--muted); }
.lang-pick.open .btn-lang { border-color: #d7dbe2; background: var(--bg-soft); }
.lang-pick.open .btn-lang .ic:last-child { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 172px; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s;
}
.lang-pick.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; white-space: nowrap;
}
.lang-menu button:hover { background: var(--bg-soft); color: var(--ink); }
.lang-menu button.on { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.lang-menu button.on::after {
  content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
}

/* ---------------- 各语言的字体与断行 ----------------
   印地语用天城文，Windows 上是 Nirmala UI / Mangal，其他平台走 Noto。
   拉丁语系文字比中文长，按钮与选项允许换行，别把字撑出格子。 */
html[data-lang="hi"] {
  --font: "Nirmala UI", "Noto Sans Devanagari", "Mangal", "Segoe UI",
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
html[data-lang="hi"] body,
html[data-lang="hi"] button,
html[data-lang="hi"] input,
html[data-lang="hi"] select { font-family: var(--font); }

html[data-lang="en"] .seg button,
html[data-lang="hi"] .seg button,
html[data-lang="fil"] .seg button {
  white-space: normal; line-height: 1.25; padding-top: 6px; padding-bottom: 6px;
}
html[data-lang="en"] .cat-tab,
html[data-lang="hi"] .cat-tab,
html[data-lang="fil"] .cat-tab { white-space: nowrap; }
html[data-lang="en"] .use-card .uc-go,
html[data-lang="hi"] .use-card .uc-go,
html[data-lang="fil"] .use-card .uc-go { white-space: nowrap; }
html[data-lang="hi"] .nav-link { letter-spacing: 0; }
html[data-lang="hi"] .hero h1 { line-height: 1.35; }
html[data-lang="hi"] .btn { letter-spacing: 0; }

/* 1080 以下 header 放不下：菲律宾语的「Mag-sign in」「Magsimula」比中文长，
   1024 断点实测把 .header-actions 挤出视口 131px。这里收窄间距、语言退短码、去掉登录按钮。 */
@media (max-width: 1080px) {
  .header-inner { gap: 16px; }
  .header-actions .btn-ghost { display: none; }
  .btn-lang [data-lang-now] { display: none; }
  .btn-lang .lang-short { display: inline; }
  .btn-lang { padding: 0 9px; }
}

@media (max-width: 860px) {
  .btn-lang { padding: 0 9px; }
}
