:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #8b5cf6;
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --card: #ffffff;
  --text: #1f2430;
  --text-soft: #5b6472;
  --text-mute: #9aa3b2;
  --border: #e7e9f0;
  /* 阴影分两层：贴边的细影负责"边界"，向下扩散的柔影负责"浮起"，
     比单层大模糊更立体，也不会在浅底上糊成一团灰 */
  --shadow: 0 1px 2px rgba(31, 36, 48, .04), 0 10px 24px -10px rgba(31, 36, 48, .14);
  --shadow-hover: 0 2px 4px rgba(31, 36, 48, .05), 0 22px 44px -14px rgba(99, 102, 241, .30);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #161922;
  --card: #1a1e29;
  --text: #e8eaf0;
  --text-soft: #aab2c2;
  --text-mute: #8a92a6;
  --border: #262b38;
  /* 与亮色主题同构的两层阴影：暗底上贴边影要更重，否则卡片会"飘" */
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -10px rgba(0, 0, 0, .55);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 22px 44px -14px rgba(99, 102, 241, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* 拉丁字形优先（德语站是主站，字形更贴合），中文字体放后面兜底：
     中文树里的中文仍会命中 PingFang / 雅黑，不会退化成别的字形 */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; }
.brand-logo {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px; color: #fff; font-size: 18px;
}
.brand-name { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.main-nav > a, .nav-dropdown > a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--text-soft);
  display: inline-flex; align-items: center; gap: 4px; transition: .2s;
}
.main-nav > a:hover, .nav-dropdown > a:hover { color: var(--primary); background: var(--bg-soft); }
.main-nav a.active { color: var(--primary); }
.caret { font-size: 10px; }

.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: .18s; z-index: 50;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text-soft); font-weight: 500; }
.dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary); }

.badge-hot { background: linear-gradient(135deg, #ff7a59, #ff4d6d); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 999px; margin-left: 2px; font-weight: 700; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; font-size: 17px; color: var(--text);
  display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.menu-btn { display: none; }

.mobile-menu {
  position: fixed; inset: 64px 0 0; background: var(--bg); z-index: 90;
  padding: 16px 20px; display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 14px; border-radius: 10px; font-weight: 600; color: var(--text-soft); }
.mobile-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.mobile-menu .sub { padding-left: 28px; font-weight: 500; }

/* ===== Hero ===== */
.hero {
  background: radial-gradient(1200px 400px at 50% -10%, rgba(99,102,241,.16), transparent 60%);
  padding: 64px 0 44px;
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
/* clamp：大标题随宽度平滑降级，不靠断点跳变；text-wrap:balance 让两行标题断得更匀称 */
.hero h1 { font-size: clamp(27px, 5vw, 40px); margin: 0 0 12px; line-height: 1.22; letter-spacing: -.02em; text-wrap: balance; }
.hero p { text-wrap: pretty; }
.hero h1 .grad { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: var(--text-soft); margin: 0 0 26px; }
.hero-search {
  display: flex; gap: 8px; max-width: 560px; margin: 0 auto 26px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px; box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
}
/* 聚焦时整条搜索框一起响应（而不是只给里面的 input 描边），看起来像一个整体控件 */
.hero-search:focus-within { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: var(--shadow-hover); }
.hero-search input:focus-visible { box-shadow: none; }
.hero-search input { flex: 1; border: 0; background: transparent; padding: 12px 14px; font-size: 16px; color: var(--text); outline: none; }
.hero-search button {
  border: 0; border-radius: 10px; padding: 0 22px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent)); font-size: 15px;
}
.hero-search button:hover { filter: brightness(1.05); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-tags a { font-size: 13px; color: var(--text-soft); background: var(--card); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; }
.hero-tags a:hover { color: var(--primary); border-color: var(--primary); }

.stats { display: flex; gap: 40px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-size: 30px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--text-mute); }

/* ===== Sections ===== */
.section { padding: 36px 0; }
/* .section 的上下留白会覆盖 .container 的左右内边距，这里补回来，窄屏才不会贴边 */
.section.container { padding: 36px 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.section-head h2 { font-size: 22px; margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.section-head h2 .bar { width: 4px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.section-head .more { font-size: 13px; color: var(--text-mute); }
.section-head .more:hover { color: var(--primary); }

.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
/* 栅格子项默认 min-width:auto，会被内部的 nowrap 文本顶宽：
   .card .meta h3 是 nowrap，于是 1fr 轨道的最小宽度=整条标题的宽度，
   390px 视口下轨道被撑到 390～471px，整页横向溢出（实测：首页、分类页、
   所有 PDF 工具页都中招）。置 0 让轨道能正常收缩，超长标题由
   .card .meta h3 自己的 overflow:hidden + ellipsis 收尾。 */
.grid > * { min-width: 0; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card .ic {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; background: var(--bg-soft); transition: background .22s, transform .22s;
}
/* 悬停时图标从灰底换成主色渐变块：一眼看出这一块可以点 */
.card:hover .ic {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 90%, #fff), color-mix(in srgb, var(--accent) 90%, #fff));
  transform: scale(1.04);
}
.card .meta h3 { margin: 0 0 4px; font-size: 15px; }
.card .meta p { margin: 0; font-size: 13px; color: var(--text-mute); line-height: 1.5; }
.card .go { margin-left: auto; color: var(--text-mute); align-self: center; }

.price-card .p-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }

/* category row on home：与其它 section 保持同一垂直节奏，不再额外加间距 */
.cat-block { margin-bottom: 0; }
.cat-block .grid { margin-top: 0; }

/* ===== Tool detail ===== */
.breadcrumb { font-size: 13px; color: var(--text-mute); margin: 18px 0 4px; }
.breadcrumb a:hover { color: var(--primary); }
.detail-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 14px 0 40px; }
.detail-side { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; height: fit-content; position: sticky; top: 84px; }
.detail-side .big-ic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; background: var(--bg-soft); margin-bottom: 14px; }
.detail-side h1 { font-size: 22px; margin: 0 0 6px; }
.detail-side .tag { display: inline-block; font-size: 12px; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.detail-side p { font-size: 14px; color: var(--text-soft); margin: 0 0 16px; }
.detail-side .side-list { border-top: 1px solid var(--border); padding-top: 14px; }
.detail-side .side-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--text-soft); font-size: 14px; }
.detail-side .side-list a:hover { background: var(--bg-soft); color: var(--primary); }
.detail-side .side-list .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--bg-soft); display: grid; place-items: center; font-size: 16px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 17px; margin: 0 0 14px; }
.drop-zone {
  border: 2px dashed var(--border); border-radius: 14px; padding: 34px; text-align: center;
  color: var(--text-mute); cursor: pointer; transition: .2s; background: var(--bg-soft);
}
.drop-zone:hover, .drop-zone.over { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--bg-soft)); }
.drop-zone b { color: var(--primary); }
.field { margin: 14px 0; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }
textarea, input[type=text], input[type=number], select {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  background: var(--bg); color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
textarea:focus, input:focus, select:focus { border-color: var(--primary); }
textarea { min-height: 130px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 0; border-radius: 10px; padding: 11px 22px; font-weight: 700; cursor: pointer; font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; transition: .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--bg-soft); color: var(--text); }
.btn.ghost:hover { color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.result { margin-top: 18px; }
.result pre { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-all; }
/* 工具产物的防溢出（窄屏整页横滚的根因常常在这里，而不是页面布局）：
   1) 长哈希 / BASE64 没有断点，会把 <code> 撑到几百 px
      —— 实测 crypto-sha256 87px、crypto-sha512 545px；
   2) 有些工具按固定尺寸画 SVG —— 实测 work-mindmap 的 720×326 流程图让页宽溢出 373px。
   注意 canvas 不在此列：CSS 缩放画布会破坏工具的坐标映射，真遇到画布溢出
   应当让容器横向滚动，而不是缩画布。 */
.result code, .note code, .tool-content code { word-break: break-all; overflow-wrap: anywhere; }
.result svg, .tool-content svg, .panel svg { max-width: 100%; height: auto; }
.note { font-size: 12px; color: var(--text-mute); margin-top: 8px; }
.out-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-top: 10px; }

/* ===== Ranking / list pages ===== */
.page-head { padding: 28px 0 6px; }
.page-head h1 { font-size: 28px; margin: 0 0 6px; }
.page-head p { color: var(--text-soft); margin: 0; }
.tabs { display: flex; gap: 8px; margin: 16px 0 20px; flex-wrap: wrap; }
.tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-soft); font-weight: 600; cursor: pointer; }
.tab.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }

/* ===== Simple content pages ===== */
.prose { max-width: 820px; margin: 10px auto 50px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 36px; box-shadow: var(--shadow); }
.prose h1 { font-size: 27px; letter-spacing: -.02em; text-wrap: balance; }
.prose h2 { font-size: 20px; margin-top: 30px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--text-soft); text-wrap: pretty; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.price-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--card); text-align: center; }
.price-card.feature { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.price-card .p-name { font-weight: 700; font-size: 17px; }
.price-card .p-price { font-size: 32px; font-weight: 800; margin: 10px 0; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 18px; text-align: left; }
.price-card li { padding: 6px 0; color: var(--text-soft); font-size: 14px; }
.price-card li::before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 48px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px 24px; }
.footer-col h4 { font-size: 15px; margin: 0 0 12px; letter-spacing: -.01em; }
.footer-col a { display: block; color: var(--text-soft); font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-desc { color: var(--text-mute); font-size: 14px; max-width: 280px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 26px; padding-top: 18px; color: var(--text-mute); font-size: 13px; }

.empty { text-align: center; color: var(--text-mute); padding: 40px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .detail-wrap { display: flex; flex-direction: column; }
  .panel { order: 1; }
  .detail-side { order: 2; position: static; }
  .price-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 28px; }
  .stats { gap: 24px; }
}
@media (max-width: 460px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== 排版精修 ===== */
:root { --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
*:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: .2px; }
p { margin: 0 0 8px; }

/* 选中色：浏览器默认的蓝与主色不搭，换成主色淡底 */
::selection { background: color-mix(in srgb, var(--primary) 24%, transparent); }
/* 正文按"尽量避免孤字"断行；不支持该属性的浏览器忽略即可，不影响布局 */
p, li { text-wrap: pretty; }
/* 系统开启「减少动态效果」时，连悬浮位移也一并关掉，只保留阴影与颜色变化 */
@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
  .btn:active { transform: none; }
  .card:hover .ic { transform: none; }
}

/* 表单控件统一 */
input[type="range"] { accent-color: var(--primary); width: 100%; height: 22px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
input[type="color"] { cursor: pointer; }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
.row > label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-soft); padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); cursor: pointer; }
.row > label:hover { border-color: var(--primary); color: var(--primary); }
.field:last-child { margin-bottom: 0; }
.tool-body > .field:first-child { margin-top: 0; }
.tool-body { display: flex; flex-direction: column; }

/* 卡片排版 */
.card { align-items: center; min-height: 82px; }
.card .meta { min-width: 0; }
.card .meta h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 结果区 */
.result > * + * { margin-top: 12px; }
.result pre { margin: 0; font-size: 13.5px; line-height: 1.75; }

/* 按钮 */
.btn { min-height: 42px; white-space: nowrap; }
.icon-btn { min-width: 40px; }

/* 详情页 */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-side .side-list a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.detail-side .side-list .ic { flex: none; }
.detail-side .note { word-break: break-all; background: var(--bg-soft); padding: 8px 10px; border-radius: 8px; }
.detail-side p { line-height: 1.75; }

/* 其它 */
.tabs { overflow-x: auto; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { height: 0; }
.mobile-menu { overflow-y: auto; }
.drop-zone { font-size: 14px; line-height: 1.7; }
.drop-zone b { text-decoration: underline; }
.empty { line-height: 1.9; }
.note { line-height: 1.7; }
.grid { align-items: stretch; }
.hero-search input { min-width: 0; }
.stat b { line-height: 1.1; }
.section-head h2 { line-height: 1.3; }
.panel h2 { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.out-img { display: block; }
@media (max-width: 720px) {
  .hero-search { flex-direction: column; }
  .hero-search button { padding: 12px; }
  .detail-wrap { gap: 16px; }
}

/* ===== SEO 内容区（工具页正文 / FAQ） ===== */
.tool-content { max-width: 860px; margin: 10px auto 60px; }
.tool-content h2 { font-size: 20px; margin: 30px 0 10px; }
.tool-content h3 { font-size: 16px; margin: 18px 0 8px; }
.tool-content p, .tool-content li { color: var(--text-soft); line-height: 1.95; }
.tool-content ul, .tool-content ol { padding-left: 22px; margin: 8px 0; }
.tool-content li { margin: 4px 0; }
.tool-content a { color: var(--primary); }
.tool-content a:hover { text-decoration: underline; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: var(--card); }
.faq-item h3 { margin: 0 0 6px; color: var(--text); }
.faq-item p { margin: 0; }
.breadcrumb { margin: 18px 0 6px; overflow: hidden; }
.breadcrumb .sep { color: var(--text-mute); }
#searchResults { margin-top: 4px; }
@media (max-width: 720px) { .tool-content { margin-bottom: 40px; } }

/* ===== 类 Excel 数据网格（图表数据源） ===== */
.xl-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: auto; background: var(--card); }
.xl-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.xl-btn { border: 1px solid var(--border); background: var(--card); color: var(--text-soft); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.xl-btn:hover { color: var(--primary); border-color: var(--primary); }
.xl-btn.xl-danger:hover { color: #ef4444; border-color: #ef4444; }
.xl-btn.xl-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; font-weight: 600; }
.xl-table { border-collapse: collapse; width: max-content; min-width: 100%; }
.xl-table th.xl-corner, .xl-table th.xl-ch, .xl-table th.xl-rh { background: var(--bg-soft); color: var(--text-mute); font-weight: 600; font-size: 11.5px; text-align: center; padding: 3px 6px; border: 1px solid var(--border); }
.xl-table th.xl-ch { position: sticky; top: 0; z-index: 2; }
.xl-table th.xl-rh { position: sticky; left: 0; z-index: 1; width: 34px; min-width: 34px; }
.xl-table th.xl-corner { position: sticky; left: 0; top: 0; z-index: 3; }
.xl-table td { border: 1px solid var(--border); padding: 0; }
.xl-cell { width: 96px; border: 0; border-radius: 0; background: transparent; padding: 6px 8px; font-size: 13px; color: var(--text); outline: none; }
.xl-cell:focus { box-shadow: inset 0 0 0 2px var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.xl-cell.is-active { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.xl-cell.xl-head { font-weight: 700; }
.xl-cell.xl-first { color: var(--text-soft); }
.xl-import { border-top: 1px solid var(--border); padding: 8px 10px; background: var(--bg); }
.xl-import summary { cursor: pointer; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.xl-import textarea { margin-top: 8px; min-height: 90px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.xl-import .row { margin-top: 8px; align-items: center; }
.xl-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.xl-status { font-size: 12.5px; color: var(--text-mute); padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--bg); }
.xl-status:empty { display: none; }
@media (max-width: 720px) { .xl-cell { width: 78px; } }

/* ===== PWA：离线状态条 / 使用记录 / 最近使用 ===== */
.offline-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 20px; font-size: 13px; color: #92400e;
  background: color-mix(in srgb, #f59e0b 16%, var(--card));
  border-bottom: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border));
}
.offline-bar[hidden] { display: none; }
.offline-bar a { color: #b45309; font-weight: 700; }
.offline-bar a:hover { text-decoration: underline; }
.offline-ico { font-size: 15px; }
[data-theme="dark"] .offline-bar { color: #fcd34d; background: color-mix(in srgb, #f59e0b 12%, var(--card)); }
[data-theme="dark"] .offline-bar a { color: #fcd34d; }

/* 工具页：使用记录行（无记录时保持 hidden，不占位） */
.usage-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-mute);
}
.usage-line[hidden] { display: none; }
.usage-line b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.usage-dot { color: var(--text-mute); }
.usage-more { color: var(--primary); font-weight: 600; }
.usage-more:hover { text-decoration: underline; }
.badge-off {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600;
  color: #047857; background: color-mix(in srgb, #10b981 14%, transparent);
  border: 1px solid color-mix(in srgb, #10b981 35%, transparent);
  padding: 1px 8px; border-radius: 999px;
}
[data-theme="dark"] .badge-off { color: #6ee7b7; }
.muted-cell { color: var(--text-mute); }

/* 概览胶囊与操作区 */
.recent-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.recent-chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--text-mute); box-shadow: var(--shadow);
}
.recent-chip b {
  font-size: 15px; font-weight: 800; margin-right: 5px; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.recent-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.recent-actions .note { margin-top: 0; }
.btn.sm { min-height: 34px; padding: 7px 14px; font-size: 13px; }
.use-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.off-tag {
  flex: none; font-size: 10.5px; font-weight: 700; color: #047857;
  background: color-mix(in srgb, #10b981 16%, transparent);
  border-radius: 999px; padding: 2px 8px;
}
[data-theme="dark"] .off-tag { color: #6ee7b7; }

/* 使用记录表格 */
.usage-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; background: var(--card); box-shadow: var(--shadow); }
.usage-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.usage-table th, .usage-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.usage-table th { font-size: 12.5px; color: var(--text-mute); font-weight: 700; background: var(--bg-soft); position: sticky; top: 0; z-index: 1; }
.usage-table tbody tr:last-child td { border-bottom: 0; }
.usage-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.usage-table .col-name { white-space: normal; min-width: 150px; }
.usage-table .col-name a { color: var(--primary); font-weight: 600; }
.usage-table .num { font-variant-numeric: tabular-nums; }
.usage-json {
  margin-top: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; max-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.75;
}
.install-btn { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.install-btn:hover { color: #fff; filter: brightness(1.06); }

/* 淡入上移：只用于客户端填充的区块；系统开启「减少动态效果」时关闭 */
.recent-fade { animation: utpFade .18s ease-out both; }
@keyframes utpFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .recent-fade { animation: none; } }
@media (max-width: 720px) {
  .usage-table th, .usage-table td { padding: 9px 10px; font-size: 13px; }
  .offline-bar { font-size: 12.5px; padding: 8px 14px; }
  .recent-stats { gap: 8px; }
  .usage-line { gap: 8px; }
}

/* ===== 隐私优先声明（全站声明条 + 工具页面板内说明） ===== */
.trust-strip {
  background: linear-gradient(90deg, color-mix(in srgb, #10b981 10%, var(--card)), color-mix(in srgb, var(--primary) 9%, var(--card)));
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-soft);
}
.trust-strip .container { display: flex; align-items: center; gap: 8px; padding: 8px 20px; }
.trust-strip b { color: var(--text); font-weight: 700; }
.ts-ic, .pn-ic { font-size: 13px; flex: none; }
.privacy-note {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--text-soft);
  background: color-mix(in srgb, #10b981 9%, var(--bg-soft));
  border: 1px solid color-mix(in srgb, #10b981 22%, var(--border));
}
.privacy-note b { color: var(--text); font-weight: 700; }
@media (max-width: 720px) {
  .trust-strip .container { padding: 7px 14px; }
  .trust-strip, .privacy-note { font-size: 12px; }
}


