:root {
  color-scheme: dark;
  --canvas: #080d1d;
  --canvas-soft: #101936;
  --surface: rgba(20, 30, 62, 0.76);
  --surface-strong: #17244b;
  --line: rgba(185, 205, 255, 0.17);
  --text: #f4f7ff;
  --muted: #a9b8de;
  --primary: #79b7ff;
  --primary-strong: #4f8dff;
  --accent: #b794ff;
  --success: #69e4b1;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.background-glow { position: fixed; z-index: -1; width: 46rem; height: 46rem; border-radius: 50%; filter: blur(40px); opacity: .25; pointer-events: none; }
.glow-one { top: -20rem; left: -16rem; background: #426cff; }
.glow-two { right: -21rem; top: 15rem; background: #a754ff; }

.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #071022; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.site-nav { display: flex; gap: 8px; color: var(--muted); }
.site-nav a { padding: 8px 11px; border-radius: 8px; }
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .08); }

.hero { padding: 68px 0 48px; text-align: center; }
.eyebrow { margin: 0 0 15px; color: var(--primary); font-size: .9rem; font-weight: 700; letter-spacing: .1em; }
h1 { max-width: 780px; margin: 0 auto; font-size: clamp(2.55rem, 8vw, 5.3rem); line-height: 1.08; letter-spacing: -.065em; }
.gradient-text { background: linear-gradient(100deg, #e5f2ff, #8fc2ff 44%, #d5b4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { max-width: 630px; margin: 22px auto 31px; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.button-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 0 19px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #061126; background: linear-gradient(135deg, #a4d1ff, #8ca9ff); box-shadow: 0 9px 28px rgba(103, 151, 255, .28); }
.button-secondary { border-color: var(--line); background: rgba(255, 255, 255, .06); }

.section { padding: 52px 0; }
.section-title { margin: 0; font-size: clamp(1.7rem, 4vw, 2.25rem); letter-spacing: -.045em; }
.section-intro { margin: 12px 0 28px; color: var(--muted); line-height: 1.7; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 16px 45px rgba(0, 0, 0, .15); transition: transform .2s, border-color .2s, background .2s; }
.card:hover { transform: translateY(-5px); border-color: rgba(152, 191, 255, .52); background: var(--surface-strong); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 25px; border-radius: 15px; font-size: 1.55rem; background: rgba(129, 180, 255, .14); }
.card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); line-height: 1.65; }
.card-link { margin-top: auto; padding-top: 24px; color: var(--primary); font-size: .95rem; font-weight: 700; }
.badge { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 12px; padding: 4px 9px; border-radius: 99px; color: var(--success); background: rgba(105, 228, 177, .1); font-size: .75rem; font-weight: 800; }

.feature-strip { display: grid; grid-template-columns: 1.1fr .9fr; gap: 25px; align-items: center; padding: 31px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(120deg, rgba(79, 141, 255, .17), rgba(183, 145, 255, .08)); }
.feature-strip h2 { margin: 0 0 10px; font-size: 1.8rem; }
.feature-strip p { margin: 0; color: var(--muted); line-height: 1.7; }
.feature-actions { display: flex; justify-content: flex-end; }
.site-footer { padding: 38px 0 45px; color: var(--muted); font-size: .9rem; text-align: center; }

/* 语言切换按钮 */
.lang-switch {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.lang-switch:hover { border-color: rgba(152, 191, 255, .52); background: rgba(255, 255, 255, .12); }
.lang-switch-floating { box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }

.tool-page { padding-bottom: 55px; }
.tool-hero { padding: 53px 0 34px; text-align: center; }
.tool-hero h1 { max-width: 850px; font-size: clamp(2.3rem, 7vw, 4.4rem); }
.tool-hero p { max-width: 640px; margin: 18px auto 0; color: var(--muted); line-height: 1.7; }
.compressor { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .8fr); gap: 20px; }
.panel { padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.drop-zone { display: grid; min-height: 330px; place-items: center; padding: 32px; border: 2px dashed rgba(146, 188, 255, .45); border-radius: 15px; text-align: center; background: rgba(77, 135, 255, .04); transition: .2s; }
.drop-zone.is-dragging { border-color: var(--primary); background: rgba(113, 181, 255, .12); }
.drop-zone h2 { margin: 12px 0 9px; font-size: 1.35rem; }
.drop-zone p { margin: 0 0 20px; color: var(--muted); }
.upload-icon { font-size: 3rem; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.preview { display: none; grid-template-columns: 1fr; gap: 15px; }
.preview.is-visible { display: grid; }
.preview img { display: block; width: 100%; max-height: 430px; object-fit: contain; border-radius: 12px; background: #070b17; }
.file-name { overflow: hidden; color: var(--muted); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.controls h2 { margin: 0 0 21px; font-size: 1.2rem; }
.field { display: grid; gap: 9px; margin-bottom: 20px; color: var(--muted); font-size: .93rem; }
.field label { display: flex; justify-content: space-between; gap: 10px; }
.field output { color: var(--text); font-weight: 700; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: rgba(0, 0, 0, .18); }
.field input:focus, .field select:focus { border-color: var(--primary); }
.field input[type="range"] { padding: 0; accent-color: var(--primary); }
.action-button { width: 100%; margin-top: 4px; }
.result { display: none; margin-top: 20px; padding: 15px; border-radius: 12px; background: rgba(105, 228, 177, .09); }
.result.is-visible { display: block; }
.result strong { display: block; margin-bottom: 5px; color: var(--success); }
.result p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.result a { display: inline-flex; margin-top: 13px; color: var(--primary); font-weight: 700; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; color: var(--muted); font-size: .85rem; line-height: 1.55; }

/* 通用工作台布局：左侧内容，右侧设置 */
.workbench { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .85fr); gap: 20px; align-items: start; }
.text-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 20px; align-items: start; }

/* 分段选择器 */
.segmented { display: flex; gap: 6px; margin-bottom: 20px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0, 0, 0, .18); }
.segmented-item { flex: 1; min-height: 38px; padding: 0 10px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: .93rem; font-weight: 700; transition: .2s; }
.segmented-item:hover { color: var(--text); }
.segmented-item.is-active { color: #061126; background: linear-gradient(135deg, #a4d1ff, #8ca9ff); }

/* 表单补充 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.field-caption { display: block; margin-bottom: 9px; color: var(--muted); font-size: .93rem; }
.field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: rgba(0, 0, 0, .18); font-family: inherit; line-height: 1.65; resize: vertical; }
.field textarea:focus { border-color: var(--primary); }
.field input[type="color"] { height: 42px; padding: 4px; cursor: pointer; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; color: var(--muted); font-size: .9rem; cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }

/* 二维码页面 */
.qr-side h2 { margin: 0 0 18px; font-size: 1.2rem; }
.qr-preview { display: grid; place-items: center; min-height: 320px; padding: 18px; border-radius: 15px; background: rgba(0, 0, 0, .22); }
.qr-preview canvas { display: block; border-radius: 8px; }
.qr-preview-empty { margin: 0; max-width: 240px; color: var(--muted); font-size: .88rem; line-height: 1.6; text-align: center; }
.qr-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.qr-meta:empty { display: none; }
.qr-meta span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .78rem; }
.qr-meta b { margin-right: 5px; color: var(--text); }
.swatch-row { display: flex; gap: 9px; }
.swatch { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; transition: transform .2s; }
.swatch:hover { transform: translateY(-2px); }
.swatch-classic { background: linear-gradient(135deg, #0b1220 50%, #ffffff 50%); }
.swatch-ocean { background: linear-gradient(135deg, #0b3d91 50%, #eaf2ff 50%); }
.swatch-forest { background: linear-gradient(135deg, #14532d 50%, #f1fbf4 50%); }
.swatch-sunset { background: linear-gradient(135deg, #7c2d12 50%, #fff7ed 50%); }

/* 文本整理页面 */
.text-editor { min-height: 300px; font-size: .95rem; }
.toolbar-block { margin-top: 22px; }
.toolbar-block h3 { margin: 0 0 11px; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); background: rgba(255, 255, 255, .05); font-size: .88rem; font-weight: 600; transition: .2s; }
.chip:hover { border-color: rgba(152, 191, 255, .52); background: rgba(129, 180, 255, .16); transform: translateY(-1px); }
.text-side h2 { margin: 0 0 18px; font-size: 1.2rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0, 0, 0, .18); }
.stat b { display: block; font-size: 1.4rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .8rem; }

/* 状态提示 */
.status { margin: 13px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.status:empty { display: none; }
.status.is-error { color: #ffb4a8; }
.status-estimate { color: #bfe0ff; font-weight: 600; font-size: .92rem; }
.button-row-tight { justify-content: flex-start; margin-top: 20px; gap: 10px; }

/* 常见问题 */
.faq { display: grid; gap: 11px; }
.faq details { padding: 16px 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq summary::marker { color: var(--primary); }
.faq p { margin: 11px 0 0; color: var(--muted); line-height: 1.7; }

/* 时间戳页：两列等宽 */
.ts-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ts-layout .field output { word-break: break-all; }

/* 密码生成器 */
.pwd-output { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .02em; }
.pwd-options { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 6px; }
.strength { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.strength-track { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.strength-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--success)); transition: width .25s; }
.strength-label { color: var(--text); font-weight: 700; font-size: .9rem; min-width: 3.2em; }
.strength-entropy { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* 哈希 / 颜色结果行 */
.hash-rows { display: grid; gap: 10px; margin-top: 14px; }
.hash-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .18); }
.hash-algo { flex: 0 0 72px; color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .03em; }
.hash-value { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.hash-row .chip { flex: 0 0 auto; }
.color-swatch { height: 72px; border: 1px solid var(--line); border-radius: 12px; background: #79b7ff; }

/* 正则测试 */
.re-highlight { min-height: 56px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, .18); white-space: pre-wrap; word-break: break-word; line-height: 1.7; font-size: .95rem; }
.re-highlight:empty { display: none; }
.re-highlight mark { padding: 1px 3px; border-radius: 4px; color: #061126; background: var(--primary); }
.re-match-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.re-match-list:empty { display: none; }
.re-match-list li { padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .16); font-size: .9rem; line-height: 1.6; }
.re-match-list .re-groups { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }

/* 拼音 */
.py-line { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, .18); line-height: 1.8; font-size: 1.05rem; word-break: break-word; }

/* 结果一键复制按钮（通用） */
.copy-btn {
  margin-top: 12px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: var(--text, #f4f7ff);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.copy-btn:hover { border-color: rgba(152, 191, 255, .52); background: rgba(129, 180, 255, .16); }
.py-line:empty { display: none; }
.py-chars { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.py-chars:empty { display: none; }
.py-char { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .16); }
.py-char .py-top { color: var(--primary); font-size: .82rem; }
.py-char span:last-child { font-size: 1.25rem; }

/* 图片格式转换 */
.ic-queue { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ic-queue:empty { display: none; }
.ic-queue li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .16); font-size: .9rem; }
.ic-remove { padding: 3px 10px; line-height: 1; }
.ic-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.ic-results:empty { display: none; }
.ic-card { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .16); }
.ic-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 9px; background: #070b17; }
.ic-meta { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }

/* 图片裁剪 */
.crop-stage { display: flex; justify-content: center; padding: 16px 0 4px; overflow: auto; }
.crop-frame { position: relative; overflow: hidden; border-radius: 10px; line-height: 0; box-shadow: 0 0 0 1px var(--line); touch-action: none; }
.crop-frame img { display: block; user-select: none; pointer-events: none; -webkit-user-drag: none; }
.crop-box { position: absolute; border: 1.5px solid var(--primary); box-shadow: 0 0 0 9999px rgba(4, 8, 20, .62); cursor: move; touch-action: none; }
.crop-handle { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid #061126; box-sizing: border-box; }
.crop-handle[data-crop-handle="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-handle[data-crop-handle="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-handle[data-crop-handle="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-handle[data-crop-handle="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-hint { text-align: center; margin-top: 8px; }

/* 图片打码 */
.mo-stage { display: flex; justify-content: center; padding: 12px 0; overflow: auto; }
.mo-canvas { max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); cursor: crosshair; touch-action: none; }

/* 结果卡片（计算器通用） */
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.result-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .16); }
.result-card.result-primary { border-color: var(--primary); background: rgba(121, 183, 255, .08); }
.result-label { color: var(--muted); font-size: .85rem; }
.result-value { font-size: 1.5rem; font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.result-value small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.cat-under { color: #7ec8ff; }
.cat-normal { color: #6fe0a8; }
.cat-over { color: #ffd479; }
.cat-obese { color: #ff8f7a; }

/* 进度条（视频等耗时操作） */
.progress { height: 9px; margin-top: 15px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(135deg, #a4d1ff, #8ca9ff); transition: width .25s ease; }
.progress.is-indeterminate .progress-fill { width: 38%; animation: progress-slide 1.15s ease-in-out infinite; }
@keyframes progress-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }

/* 紧凑拖放区（视频选择） */
.drop-zone-compact { min-height: 0; padding: 26px 22px; }
.drop-zone-compact h2 { margin: 0 0 7px; font-size: 1.12rem; }
.drop-zone-compact p { margin: 0 0 16px; }
.vt-file-caption { margin: 14px 0 0; font-weight: 600; color: var(--text); word-break: break-all; }
.vt-file-caption:empty { display: none; }
.button[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1120px); }
  .site-header { padding: 17px 0; }
  .site-nav a:not(:last-child) { display: none; }
  .hero { padding: 48px 0 29px; }
  .section { padding: 36px 0; }
  .card-grid, .compressor, .feature-strip, .workbench, .text-layout, .ts-layout { grid-template-columns: 1fr; }
  .feature-actions { justify-content: flex-start; }
  .field-row { grid-template-columns: 1fr; }
  .segmented { flex-wrap: wrap; }
  .segmented-item { flex: 1 1 44%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .card { min-height: 210px; }
  .drop-zone { min-height: 265px; }
}

/* 暗/亮主题切换：浅色主题（默认仍为深色，仅在用户切换时生效） */
html[data-theme="light"] {
  color-scheme: light;
  --canvas: #f3f6fc;
  --canvas-soft: #e7eefb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --line: rgba(22, 42, 92, 0.16);
  --text: #0c1730;
  --muted: #54607e;
  --primary: #2f6fe0;
  --primary-strong: #2563eb;
  --accent: #7c3aed;
  --success: #0f9d6b;
}

html[data-theme="light"] body { background: var(--canvas); color: var(--text); }

html[data-theme="light"] .button-secondary,
html[data-theme="light"] .lang-switch,
html[data-theme="light"] .copy-btn { background: #eef2fb; color: var(--text); }
html[data-theme="light"] .lang-switch:hover,
html[data-theme="light"] .copy-btn:hover { background: #e3eaf8; }

html[data-theme="light"] .site-nav a:hover { background: rgba(12, 23, 48, .06); }
html[data-theme="light"] .chip { background: #eef2fb; }
html[data-theme="light"] .chip:hover { background: rgba(47, 111, 224, .12); }
html[data-theme="light"] .strength-track,
html[data-theme="light"] .progress { background: rgba(12, 23, 48, .1); }

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea { background: #ffffff; color: var(--text); }

html[data-theme="light"] .segmented { background: #eef2fb; }
html[data-theme="light"] .segmented-item { color: var(--muted); }
html[data-theme="light"] .segmented-item:hover { color: var(--text); }

html[data-theme="light"] .stat,
html[data-theme="light"] .hash-row,
html[data-theme="light"] .result-card,
html[data-theme="light"] .re-highlight,
html[data-theme="light"] .re-match-list li,
html[data-theme="light"] .py-line,
html[data-theme="light"] .ic-queue li,
html[data-theme="light"] .ic-card,
html[data-theme="light"] .py-char,
html[data-theme="light"] .qr-preview { background: #eef2fb; }

html[data-theme="light"] .result-card.result-primary { background: rgba(47, 111, 224, .1); border-color: var(--primary); }
html[data-theme="light"] .gradient-text { background: linear-gradient(100deg, #1b4fff, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .cat-under { color: #1f7ae0; }
html[data-theme="light"] .cat-normal { color: #0f9d6b; }
html[data-theme="light"] .cat-over { color: #b8791a; }
html[data-theme="light"] .cat-obese { color: #d24b3a; }
html[data-theme="light"] .status.is-error { color: #d24b3a; }

/* 批量文件列表（图片压缩 / 格式转换等复用） */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb-grid:empty { display: none; }
.thumb { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .2); }
.thumb img { display: block; width: 100%; height: 92px; object-fit: cover; }
.thumb-name { padding: 6px 8px; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; line-height: 1; }
.thumb.is-pending { opacity: .6; }
.thumb.is-pending img { background: rgba(255, 255, 255, .08); }

/* 前后对比滑块（左侧原图 / 右侧结果） */
.cmp { position: relative; overflow: hidden; border-radius: 10px; line-height: 0; cursor: ew-resize; touch-action: none; user-select: none; }
.cmp img { display: block; width: 100%; height: auto; transform-origin: 0 0; }
.cmp.is-zoom { height: 340px; cursor: grab; }
.cmp.is-zoom:active { cursor: grabbing; }
.cmp-tools { display: flex; gap: 6px; margin-top: 10px; }
.cmp-tools .chip.is-active { color: #061126; background: linear-gradient(135deg, #a4d1ff, #8ca9ff); }
.cmp-overlay { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .5); }
.cmp-handle::after { content: '⇔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #061126; font-size: 13px; line-height: 30px; text-align: center; }
.cmp-badge { position: absolute; top: 8px; padding: 3px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; line-height: 1.5; }
.cmp-badge-left { left: 8px; }
.cmp-badge-right { right: 8px; }

/* PDF 文件条目（可拖拽排序 + 缩略图） */
.pdf-item { display: flex; align-items: center; gap: 10px; }
.pdf-item.is-dragging { opacity: .45; }
.pdf-item.is-over { outline: 2px dashed var(--primary); outline-offset: 2px; }
.pdf-grip { flex: none; color: var(--muted); cursor: grab; letter-spacing: -2px; }
.pdf-thumb { flex: none; width: 44px; height: 56px; object-fit: cover; border-radius: 6px; background: #fff; }
.pdf-item-main { flex: 1; min-width: 0; }
.pdf-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-item-meta { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.pdf-item-ops { flex: none; display: flex; gap: 4px; }

/* PDF 拆分：页面缩略图点选 */
.pdf-pages-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pdf-pages-actions { display: flex; gap: 6px; }
.pdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-top: 10px; }
.pdf-page { position: relative; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: rgba(0, 0, 0, .2); }
.pdf-page img { display: block; width: 100%; height: auto; background: #fff; }
.pdf-page span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: .72rem; text-align: center; }
.pdf-page.is-sel { border-color: var(--primary); }
.pdf-page:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* PDF 整理：页面卡片网格（拖拽排序 + 旋转/删除） */
.pdf-organize { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 12px; }
.pdf-organize:empty { display: none; }
.pdf-org-cell { position: relative; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .2); padding: 6px; }
.pdf-org-cell.is-dragging { opacity: .45; }
.pdf-org-cell.is-over { outline: 2px dashed var(--primary); outline-offset: 2px; }
.pdf-org-cell img { display: block; width: 100%; height: auto; background: #fff; border-radius: 4px; transition: transform .2s; }
.pdf-org-num { position: absolute; left: 8px; top: 8px; padding: 1px 7px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .72rem; border-radius: 999px; }
.pdf-org-bar { display: flex; gap: 4px; margin-top: 6px; }
.pdf-org-bar .chip { flex: 1; padding: 4px 0; font-size: .8rem; }
.checkbox-line { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }

/* 带对比的结果卡片 */
.cmp-card { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.cmp-card + .cmp-card { margin-top: 12px; }
.cmp-meta { margin: 10px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.cmp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cmp-actions .button { min-height: 38px; padding: 0 14px; font-size: .88rem; }
