/* 17NAS 实用工具 t2（图片压缩 / PDF 合并拆分）共用样式 — 全部作用域限制在 .t2-page；基础沿用 sub-calc 工具页设计 */
.t2-page {
    --t2-primary: #2563eb;
    --t2-primary-dark: #1d4ed8;
    --t2-primary-soft: #eef3fe;
    --t2-ink: #0f1c2e;
    --t2-muted: #5a6b80;
    --t2-line: #e4eaf2;
    --t2-bg: #f6f8fc;
    --t2-panel: #fbfcfe;
    --t2-warn: #8a5a12;
    --t2-warn-soft: #fdf3e2;
    --t2-danger: #b42318;
    --t2-wave-bg: #f8fafd;
    --t2-wave-muted: #c3cedd;
    --t2-sel: rgba(37, 99, 235, .10);
    --t2-remove: rgba(220, 38, 38, .12);
    --t2-playhead: #f97316;
    --t2-radius-card: 16px;
    --t2-radius-ctl: 12px;
    --t2-shadow: 0 10px 26px rgba(19, 44, 79, .05);

    color: var(--t2-ink);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #fff;
    margin: 0;
    padding: 0 0 88px;
    overflow-x: hidden;
    overflow-x: clip; /* clip 不会生成滚动容器，右栏 position: sticky 才能生效 */
}
.t2-page * { box-sizing: border-box; }
.t2-page button,
.t2-page input,
.t2-page select { color: inherit; font: inherit; }
.t2-page button { -webkit-tap-highlight-color: transparent; }
.t2-page [hidden] { display: none !important; }

.t2-page .page-shell {
    width: min(1128px, calc(100% - 64px));
    margin: 0 auto;
    padding: 36px 0 0;
}

/* 面包屑 */
.t2-page .t2-breadcrumb { margin: 0 0 18px; font-size: 13px; color: var(--t2-muted); }
.t2-page .t2-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.t2-page .t2-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.t2-page .t2-breadcrumb li:not(:last-child)::after { content: "/"; color: #b0b6bd; margin-left: 2px; }
.t2-page .t2-breadcrumb a { color: var(--t2-primary); text-decoration: none; }
.t2-page .t2-breadcrumb a:hover { text-decoration: underline; }
.t2-page .t2-breadcrumb [aria-current="page"] { color: var(--t2-ink); font-weight: 600; }

/* 页头 */
.t2-page .page-title { margin-bottom: 24px; }
.t2-page .page-title .eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    color: var(--t2-primary); background: var(--t2-primary-soft);
    border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.t2-page .page-title h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.01em; }
.t2-page .page-title p { margin: 0; color: var(--t2-muted); font-size: 15px; line-height: 1.7; max-width: 820px; }

/* 工具卡 */
.t2-page .t2-tool {
    border: 1px solid var(--t2-line);
    border-radius: var(--t2-radius-card);
    background: #fff;
    box-shadow: var(--t2-shadow);
    padding: 24px;
    margin-bottom: 18px;
}
.t2-page .t2-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.t2-page .t2-status { margin: 10px 0 0; font-size: 13px; color: var(--t2-muted); min-height: 0; }
.t2-page .t2-status:empty { display: none; }
.t2-page .t2-loading .t2-status::before {
    content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
    border: 2px solid var(--t2-line); border-top-color: var(--t2-primary); border-radius: 50%;
    animation: t2-spin .8s linear infinite;
}
@keyframes t2-spin { to { transform: rotate(360deg); } }

/* 按钮 */
.t2-page .t2-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 15px; border: 1px solid var(--t2-line); border-radius: 999px;
    background: #fff; color: var(--t2-ink); font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
}
.t2-page .t2-btn:hover { border-color: #c9d6ea; background: #f8fbff; }
.t2-page .t2-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.t2-page .t2-btn:disabled { opacity: .45; cursor: not-allowed; }
.t2-page .t2-btn-primary { background: var(--t2-primary); border-color: var(--t2-primary); color: #fff; }
.t2-page .t2-btn-primary:hover { background: var(--t2-primary-dark); border-color: var(--t2-primary-dark); }
.t2-page .t2-btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* 标签页 */
.t2-page .t2-tabs {
    display: flex; gap: 6px; margin: 20px 0 0; padding: 4px;
    border: 1px solid var(--t2-line); border-radius: 999px; background: var(--t2-panel);
    overflow-x: auto; scrollbar-width: none;
}
.t2-page .t2-tabs::-webkit-scrollbar { display: none; }
.t2-page .t2-tab {
    flex: 1 0 auto; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent;
    font-size: 13.5px; font-weight: 700; color: var(--t2-muted); cursor: pointer; white-space: nowrap;
}
.t2-page .t2-tab:hover { color: var(--t2-primary); }
.t2-page .t2-tab[aria-selected="true"] { background: var(--t2-primary); color: #fff; }
.t2-page .t2-tab:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 1px; }
.t2-page .t2-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t2-page .t2-opt > span,
.t2-page .t2-opt-label { font-size: 12.5px; font-weight: 700; color: var(--t2-muted); }
.t2-page .t2-opt select,
.t2-page .t2-opt input[type="text"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--t2-line);
    border-radius: 10px; background: #fff; font-size: 14px;
}
.t2-page .t2-opt input[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.t2-page .t2-opt input.is-invalid { border-color: var(--t2-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.t2-page .t2-opt select:disabled,
.t2-page .t2-opt input:disabled { opacity: .5; }
.t2-page .t2-opt input[type="range"] { width: 100%; accent-color: var(--t2-primary); }
.t2-page .t2-val { font-weight: 700; color: var(--t2-ink); font-variant-numeric: tabular-nums; }
.t2-page .t2-radio { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.t2-page .t2-radio label,
.t2-page .t2-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.t2-page .t2-radio input,
.t2-page .t2-check input { width: 16px; height: 16px; accent-color: var(--t2-primary); }
.t2-page .t2-panel-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--t2-muted); line-height: 1.7; }
.t2-page .t2-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.t2-page .t2-error {
    margin: 14px 0 0; padding: 12px 14px; border-radius: var(--t2-radius-ctl);
    border: 1px solid #f3d6cf; background: #fdf6f5; color: var(--t2-danger);
    font-size: 13.5px; line-height: 1.7;
}

/* 隐私 */
.t2-page .t2-privacy {
    margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--t2-line);
    border-radius: var(--t2-radius-ctl); background: var(--t2-panel); color: var(--t2-muted); font-size: 13px; line-height: 1.7;
}

/* 说明区 */
.t2-page .info-section { margin: 36px 0 0; }
.t2-page .info-section > h2 { margin: 0 0 16px; font-size: 21px; line-height: 1.4; }
.t2-page .info-content { color: var(--t2-ink); font-size: 15px; line-height: 1.8; }
.t2-page .info-content p { margin: 0 0 12px; }
.t2-page .info-content ol,
.t2-page .info-content ul { margin: 0 0 12px; padding-left: 22px; }
.t2-page .info-content li { margin-bottom: 8px; }
.t2-page .t2-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; }
.t2-page .t2-table th,
.t2-page .t2-table td { padding: 10px 12px; border-bottom: 1px solid var(--t2-line); text-align: left; vertical-align: top; }
.t2-page .t2-table th { background: var(--t2-panel); font-weight: 700; }
.t2-page .t2-ok { color: #12804b; font-weight: 700; }
.t2-page .t2-no { color: var(--t2-warn); font-weight: 700; }

.t2-page .t2-faq-item { border: 1px solid var(--t2-line); border-radius: var(--t2-radius-ctl); margin-bottom: 10px; background: #fff; }
.t2-page .t2-faq-item > summary { padding: 13px 16px; cursor: pointer; font-weight: 700; font-size: 15px; }
.t2-page .t2-faq-item > summary::marker { color: var(--t2-primary); }
.t2-page .t2-faq-a { padding: 0 16px 14px; color: var(--t2-muted); font-size: 14px; line-height: 1.8; }
.t2-page .t2-faq-a p { margin: 0; }

.t2-page .t2-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.t2-page .t2-related a {
    display: block; padding: 16px; border: 1px solid var(--t2-line); border-radius: var(--t2-radius-ctl);
    background: #fff; text-decoration: none; color: inherit;
}
.t2-page .t2-related a:hover { border-color: #c9d6ea; background: #f8fbff; }
.t2-page .t2-related .rel-title { font-weight: 700; margin-bottom: 6px; }
.t2-page .t2-related .rel-desc { font-size: 13px; color: var(--t2-muted); line-height: 1.6; }

/* 答案优先摘要 + 关键信息 */
.t2-page .page-title .t2-answer { max-width: 860px; }
.t2-page .t2-facts-wrap > h2 { margin: 0 0 14px; font-size: 21px; line-height: 1.4; }
.t2-page .t2-facts {
    margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px;
    border: 1px solid var(--t2-line); border-radius: var(--t2-radius-card); background: #fff;
    padding: 6px 20px; box-shadow: var(--t2-shadow);
}
.t2-page .t2-fact { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--t2-line); }
.t2-page .t2-fact:nth-last-child(-n+2) { border-bottom: 0; }
.t2-page .t2-fact dt { margin: 0; font-size: 13px; font-weight: 700; color: var(--t2-primary); line-height: 1.6; }
.t2-page .t2-fact dd { margin: 0; font-size: 14px; color: var(--t2-ink); line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
   .t2-page .t2-facts { grid-template-columns: 1fr; padding: 4px 16px; }
   .t2-page .t2-fact:nth-last-child(2) { border-bottom: 1px dashed var(--t2-line); }
}
@media (max-width: 575.98px) {
   .t2-page .t2-fact { grid-template-columns: 1fr; gap: 2px; }
   .t2-page .t2-facts-wrap > h2 { font-size: 19px; }
}

/* 使用步骤卡片（4 列桌面 / 2 列平板 / 1 列手机，断点对齐 Bootstrap 4 lg/sm） */
.t2-page .t2-howto-head { margin: 0 0 18px; }
.t2-page .t2-howto-head > h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.4; }
.t2-page .t2-howto-lead { margin: 0; color: var(--t2-muted); font-size: 14.5px; line-height: 1.7; max-width: 820px; }
.t2-page .t2-steps {
    list-style: none; margin: 0; padding: 0; counter-reset: none;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.t2-page .t2-step {
    position: relative; display: flex; flex-direction: column; margin: 0;
    border: 1px solid var(--t2-line); border-radius: var(--t2-radius-card);
    background: #fff; box-shadow: var(--t2-shadow); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.t2-page .t2-step:hover { transform: translateY(-3px); border-color: #c9d6ea; box-shadow: 0 16px 34px rgba(19, 44, 79, .10); }
.t2-page .t2-step:target { border-color: var(--t2-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), var(--t2-shadow); }
.t2-page .t2-step-shot {
    position: relative; margin: 0; aspect-ratio: 16 / 10;
    background: var(--t2-wave-bg); border-bottom: 1px solid var(--t2-line); overflow: hidden;
}
.t2-page .t2-step-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t2-page .t2-step-num {
    position: absolute; top: 10px; left: 10px; width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--t2-primary); color: #fff;
    font-size: 15px; font-weight: 800; line-height: 1;
    box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(37, 99, 235, .35);
}
.t2-page .t2-step-body { padding: 14px 16px 16px; flex: 1 1 auto; }
.t2-page .t2-step-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.t2-page .t2-step-icon {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--t2-primary-soft); color: var(--t2-primary); font-size: 14px;
}
.t2-page .t2-step-kicker { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--t2-primary); }
.t2-page .t2-step-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--t2-ink); }
.t2-page .t2-step-text { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--t2-muted); }
.t2-page .t2-howto-cta { margin: 18px 0 0; text-align: center; }
.t2-page .t2-howto-cta .t2-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.t2-page .t2-howto-cta .t2-btn:hover { color: #fff; text-decoration: none; }
@media (max-width: 991.98px) {
   .t2-page .t2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 575.98px) {
   .t2-page .t2-steps { grid-template-columns: 1fr; gap: 14px; }
   .t2-page .t2-howto-head > h2 { font-size: 19px; }
   .t2-page .t2-step-title { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
   .t2-page .t2-step { transition: none; }
   .t2-page .t2-step:hover { transform: none; }
}

/* 响应式 */
@media (max-width: 900px) {
   .t2-page .page-shell { width: calc(100% - 40px); padding-top: 24px; }
   .t2-page .t2-related { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
   .t2-page { padding-bottom: 64px; }
   .t2-page .page-shell { width: calc(100% - 28px); padding-top: 18px; }
   .t2-page .page-title h1 { font-size: 24px; }
   .t2-page .page-title p { font-size: 14px; }
   .t2-page .t2-tool { padding: 16px; }
   .t2-page .t2-tabs { border-radius: 14px; flex-wrap: wrap; overflow: visible; }
   .t2-page .t2-tab { flex: 1 1 calc(33.333% - 6px); padding: 8px 6px; font-size: 13px; }
   .t2-page .info-section > h2 { font-size: 19px; }
}

/* 深色模式 */
html[data-theme="dark"] #t2-app { --t2-ink: #e8eef5 !important; --t2-muted: #b7c3d0 !important; --t2-line: rgba(255, 255, 255, 0.14) !important; --t2-bg: #141c28 !important; --t2-panel: #141c28 !important; --t2-primary-soft: #1a2a44 !important; --t2-wave-bg: #101722 !important; --t2-wave-muted: #3a4658 !important; --t2-sel: rgba(96, 165, 250, .14) !important; --t2-warn-soft: #2b2312 !important; --t2-warn: #f0c27a !important; background: transparent !important; }
html[data-theme="dark"] #t2-app .t2-tool,
html[data-theme="dark"] #t2-app .t2-btn,
html[data-theme="dark"] #t2-app .t2-faq-item,
html[data-theme="dark"] #t2-app .t2-related a,
html[data-theme="dark"] #t2-app .t2-opt select,
html[data-theme="dark"] #t2-app .t2-opt input[type="text"] { background-color: #182231 !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .t2-btn-primary,
html[data-theme="dark"] #t2-app .t2-tab[aria-selected="true"] { background: var(--t2-primary) !important; border-color: var(--t2-primary) !important; color: #fff !important; }
html[data-theme="dark"] #t2-app .t2-error { background: #2a1513 !important; border-color: #5c2a24 !important; color: #f3a99f !important; }
html[data-theme="dark"] #t2-app .t2-ok { color: #6ad49b !important; }
html[data-theme="dark"] #t2-app .t2-step { background: #182231 !important; border-color: rgba(255, 255, 255, 0.14) !important; box-shadow: none !important; }
html[data-theme="dark"] #t2-app .t2-step:hover { border-color: rgba(96, 165, 250, .45) !important; box-shadow: 0 12px 28px rgba(0, 0, 0, .35) !important; }
html[data-theme="dark"] #t2-app .t2-step-num { box-shadow: 0 0 0 3px #182231, 0 6px 14px rgba(0, 0, 0, .4) !important; }
html[data-theme="dark"] #t2-app .t2-step-icon { color: #93c5fd !important; }
html[data-theme="dark"] #t2-app .t2-step-kicker { color: #93c5fd !important; }
html[data-theme="dark"] #t2-app .t2-facts { background: #182231 !important; border-color: rgba(255, 255, 255, 0.14) !important; box-shadow: none !important; }
html[data-theme="dark"] #t2-app .t2-fact dt { color: #93c5fd !important; }

/* ================= 通用补充 ================= */
.t2-page .t2-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--t2-muted); line-height: 1.7; }
.t2-page .t2-btn-lg { padding: 12px 20px; font-size: 15px; }
.t2-page .t2-btn-icon { padding: 6px 9px; }
.t2-page .t2-btn-danger:hover:not(:disabled) { color: var(--t2-danger); border-color: #f3c7c0; background: #fdf6f5; }
.t2-page .t2-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t2-page .t2-nowrap { white-space: nowrap; }
.t2-page .t2-table code { font-size: 13px; white-space: nowrap; }
.t2-page .t2-table td.t2-ok,
.t2-page .t2-table td.t2-no { white-space: nowrap; }
.t2-page .t2-noscript { border-color: #f3d6cf; background: #fdf6f5; color: #b42318; }
.t2-page .t2-steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.t2-page .t2-cross { margin: 14px 0 0; font-size: 14px; }
.t2-page .t2-cross a, .t2-page .t2-card-tip a { color: var(--t2-primary); font-weight: 600; }
.t2-page .t2-status { overflow-wrap: anywhere; }

/* 移动端表格：尺寸表改为卡片行，避免文件名逐字换行 */
@media (max-width: 600px) {
  .t2-page .t2-table { font-size: 13px; }
  .t2-page .t2-table th,
  .t2-page .t2-table td { padding: 8px; }
  .t2-page .t2-size-table thead { display: none; }
  .t2-page .t2-size-table,
  .t2-page .t2-size-table tbody { display: block; }
  .t2-page .t2-size-table tr { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 12px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--t2-line); }
  .t2-page .t2-size-table td { padding: 0; border: 0; }
  .t2-page .t2-size-table td:nth-child(2) { font-weight: 600; }
  .t2-page .t2-size-table td:nth-child(3) { color: var(--t2-muted); }
  .t2-page .t2-size-table td:last-child { grid-column: 1 / -1; color: var(--t2-muted); line-height: 1.6; }
}

/* ================= t2 页面补充 ================= */
.t2-page .page-title { margin-bottom: 18px; }
.t2-page .t2-lead { font-size: 15px; }
.t2-page .t2-related.rel-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.t2-page .t2-privacy { margin-top: 14px; }
.t2-page .t2-privacy .fa-lock { color: var(--t2-primary); margin-right: 4px; }
.t2-page .t2-answer-card {
    border: 1px solid var(--t2-line); border-left: 4px solid var(--t2-primary);
    border-radius: var(--t2-radius-card); background: var(--t2-panel); padding: 18px 20px; margin-top: 22px;
}
.t2-page .t2-answer-card > h2 { margin: 0 0 8px; font-size: 18px; }
.t2-page .t2-answer { margin: 0; font-size: 15px; line-height: 1.85; color: var(--t2-ink); max-width: 920px; }
.t2-page .t2-fmt-table td:first-child { white-space: nowrap; }
.t2-page .t2-steps-4 .t2-step-shot img { object-fit: cover; object-position: top left; }

/* 表单基础 */
.t2-page .t2-field { margin: 0 0 16px; }
.t2-page .t2-field:last-child { margin-bottom: 0; }
.t2-page .t2-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--t2-muted); margin: 0 0 7px; }
.t2-page .t2-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.t2-page .t2-val { font-weight: 700; color: var(--t2-ink); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.t2-page .t2-field select,
.t2-page .t2-field input[type="number"],
.t2-page .t2-field input[type="text"] {
    width: 100%; padding: 8px 10px; border: 1px solid var(--t2-line); border-radius: 10px;
    background: #fff; font-size: 14px; min-width: 0;
}
.t2-page .t2-field input[type="number"] { font-variant-numeric: tabular-nums; }
.t2-page .t2-field input:disabled { opacity: .5; }
.t2-page input[type="range"] { width: 100%; accent-color: var(--t2-primary); margin: 2px 0; }
.t2-page .t2-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; line-height: 1.45; margin: 8px 0 0; }
.t2-page .t2-check input { width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 16px; accent-color: var(--t2-primary); }
.t2-page .t2-check-strong { font-weight: 700; margin-top: 0; }
.t2-page .t2-inline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.t2-page .t2-inline input[type="number"] { width: 120px; flex: 0 0 auto; }
.t2-page .t2-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.t2-page .t2-pair label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--t2-muted); min-width: 0; }
.t2-page #ic-pct-wrap { margin-top: 10px; }
.t2-page .t2-warn { color: var(--t2-warn); background: var(--t2-warn-soft); padding: 6px 10px; border-radius: 8px; }
.t2-page .t2-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--t2-line); border-radius: 12px; background: var(--t2-panel); }
.t2-page .t2-seg button {
    flex: 1 1 auto; min-width: 0; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent;
    font-size: 13px; font-weight: 700; color: var(--t2-muted); cursor: pointer; white-space: nowrap;
}
.t2-page .t2-seg button:hover:not(:disabled) { color: var(--t2-primary); }
.t2-page .t2-seg button[aria-pressed="true"] { background: var(--t2-primary); color: #fff; }
.t2-page .t2-seg button:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.t2-page .t2-seg button:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); }
.t2-page .t2-more { border-top: 1px dashed var(--t2-line); padding-top: 12px; margin-top: 4px; }
.t2-page .t2-more > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--t2-primary); }
.t2-page .t2-more[open] > summary { margin-bottom: 6px; }
.t2-page .t2-more .t2-btn { margin-top: 12px; }
.t2-page .t2-color input[type="color"] { width: 40px; height: 28px; padding: 0 2px; border: 1px solid var(--t2-line); border-radius: 6px; background: #fff; cursor: pointer; }
.t2-page .t2-btn-ghost { background: transparent; }
.t2-page .t2-status { padding: 8px 12px; border-radius: 10px; background: var(--t2-panel); border: 1px solid var(--t2-line); }

/* ================= 图片压缩工具 ================= */
.t2-page .ic-tool { padding: 18px; position: relative; }
.t2-page .ic-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.t2-page .ic-files { min-width: 0; }
.t2-page .ic-drop {
    position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 22px;
    border: 2px dashed #b9c9e3; border-radius: 14px; background: var(--t2-primary-soft); cursor: pointer;
    transition: border-color .15s, background .15s;
}
.t2-page .ic-drop:hover,
.t2-page .ic-drop:focus-visible,
.t2-page .ic-tool.is-drag .ic-drop { border-color: var(--t2-primary); background: #e3ecfd; outline: none; }
.t2-page .ic-drop-art { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--t2-primary); font-size: 24px; box-shadow: var(--t2-shadow); }
.t2-page .ic-drop-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.t2-page .ic-drop-title { font-size: 16.5px; color: var(--t2-ink); }
.t2-page .ic-drop-sub { font-size: 12.5px; color: var(--t2-muted); line-height: 1.55; }
.t2-page .ic-pick { flex: 0 0 auto; }
.t2-page .ic-tool.has-items .ic-drop { padding: 12px 16px; }
.t2-page .ic-tool.has-items .ic-drop-art { flex-basis: 40px; width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }
.t2-page .ic-tool.has-items .ic-drop-title { font-size: 14.5px; }

.t2-page .ic-summary { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--t2-line); border-radius: 12px; background: var(--t2-panel); }
.t2-page .ic-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.t2-page .ic-sum > div { min-width: 0; }
.t2-page .ic-sum dt { font-size: 12px; font-weight: 700; color: var(--t2-muted); margin: 0 0 2px; }
.t2-page .ic-sum dd { margin: 0; font-size: 17px; font-weight: 800; color: var(--t2-ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-page .ic-sum dd.is-good { color: #12804b; }
.t2-page .ic-sum dd.is-bad { color: var(--t2-danger); }
.t2-page .ic-progress { height: 4px; border-radius: 4px; background: var(--t2-line); overflow: hidden; margin: 10px 0 0; }
.t2-page .ic-progress > span { display: block; height: 100%; width: 0; background: var(--t2-primary); transition: width .2s; }
.t2-page .ic-sum-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.t2-page .ic-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; overscroll-behavior: contain; }
.t2-page .ic-list:empty { display: none; }
.t2-page .ic-item {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
    padding: 8px 10px; border: 1px solid var(--t2-line); border-radius: 12px; background: #fff;
}
.t2-page .ic-item.is-error { border-color: #f3d6cf; }
.t2-page .ic-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--t2-wave-bg) repeating-conic-gradient(#e9eef5 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.t2-page .ic-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t2-page .ic-item-main { min-width: 0; }
.t2-page .ic-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-page .ic-meta { font-size: 12px; color: var(--t2-muted); margin-top: 2px; overflow-wrap: anywhere; }
.t2-page .ic-notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.t2-page .ic-notes:empty { display: none; }
.t2-page .ic-tag { font-size: 11.5px; line-height: 1.4; padding: 2px 7px; border-radius: 999px; background: var(--t2-panel); border: 1px solid var(--t2-line); color: var(--t2-muted); }
.t2-page .ic-tag.is-good { color: #12804b; border-color: #bfe5cf; background: #effaf3; }
.t2-page .ic-tag.is-warn { color: var(--t2-warn); border-color: #f1d9ad; background: var(--t2-warn-soft); }
.t2-page .ic-tag.is-bad { color: var(--t2-danger); border-color: #f3d6cf; background: #fdf6f5; white-space: normal; border-radius: 8px; }
.t2-page .ic-size { text-align: right; font-size: 12.5px; color: var(--t2-muted); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.t2-page .ic-size b { color: var(--t2-ink); font-variant-numeric: tabular-nums; }
.t2-page .ic-badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--t2-panel); color: var(--t2-muted); font-variant-numeric: tabular-nums; }
.t2-page .ic-badge.is-good { background: #e6f6ed; color: #12804b; }
.t2-page .ic-badge.is-bad { background: #fdecea; color: var(--t2-danger); }
.t2-page .ic-err { color: var(--t2-danger); font-weight: 700; }
.t2-page .ic-item.is-working .ic-wait::before {
    content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px;
    border: 2px solid var(--t2-line); border-top-color: var(--t2-primary); border-radius: 50%; animation: t2-spin .8s linear infinite;
}
.t2-page .ic-acts { display: flex; gap: 4px; }
.t2-page .ic-icon-btn {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--t2-line); border-radius: 9px; background: #fff; color: var(--t2-ink); cursor: pointer; font-size: 14px; text-decoration: none;
}
.t2-page .ic-icon-btn:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--t2-primary); color: var(--t2-primary); text-decoration: none; }
.t2-page .ic-icon-btn:disabled,
.t2-page .ic-icon-btn[aria-disabled="true"] { opacity: .35; cursor: not-allowed; pointer-events: none; }
.t2-page .ic-dl-btn:not([aria-disabled="true"]) { background: var(--t2-primary); border-color: var(--t2-primary); color: #fff; }
.t2-page .ic-dl-btn:not([aria-disabled="true"]):hover { background: var(--t2-primary-dark); color: #fff !important; }
.t2-page .ic-rm-btn:hover { color: var(--t2-danger) !important; border-color: #f3c7c0 !important; }
.t2-page .ic-empty { margin: 12px 2px 0; font-size: 13px; color: var(--t2-muted); line-height: 1.7; }

.t2-page .ic-settings { border: 1px solid var(--t2-line); border-radius: 14px; background: var(--t2-panel); padding: 16px; position: sticky; top: 76px; }
.t2-page .ic-set-title { margin: 0 0 14px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.t2-page .ic-set-title i { color: var(--t2-primary); }
.t2-page .ic-settings .t2-seg button { flex: 1 1 calc(33% - 4px); }
.t2-page .ic-settings .t2-hint { margin-top: 6px; font-size: 12px; }

/* 对比弹窗（dialog 在 top layer，不受 .t2-page 继承影响，所以单独写颜色） */
.t2-page .ic-cmp {
    width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; margin: auto; inset: 0;
    border: 1px solid var(--t2-line); border-radius: 16px; background: #fff; color: var(--t2-ink);
    box-shadow: 0 30px 80px rgba(10, 20, 40, .35); overflow: hidden;
}
.t2-page .ic-cmp[open] { display: flex; flex-direction: column; }
.t2-page .ic-cmp::backdrop { background: rgba(8, 14, 26, .62); }
.t2-page .ic-cmp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--t2-line); }
.t2-page .ic-cmp-titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.t2-page .ic-cmp-titles strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-page .ic-cmp-titles span { font-size: 12.5px; color: var(--t2-muted); font-variant-numeric: tabular-nums; }
.t2-page .ic-cmp-modes { flex: 0 0 auto; }
.t2-page .ic-cmp-stage {
    --split: 50%;
    position: relative; flex: 1 1 auto; min-height: 200px; height: min(70vh, 720px);
    background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 16px 16px; overflow: hidden;
}
.t2-page .ic-cmp-stage figure { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; }
.t2-page .ic-cmp-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.t2-page .ic-cmp-stage figcaption {
    position: absolute; top: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: rgba(15, 28, 46, .78); color: #fff;
}
.t2-page .ic-cmp-b figcaption { left: 10px; }
.t2-page .ic-cmp-a figcaption { right: 10px; }
.t2-page .ic-cmp-a { clip-path: inset(0 0 0 var(--split)); }
.t2-page .ic-cmp-stage:not(.is-side)::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px;
    background: #fff; box-shadow: 0 0 0 1px rgba(15, 28, 46, .35); pointer-events: none;
}
.t2-page .ic-cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 2; }
.t2-page .ic-cmp-nob { display: none; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(15, 28, 46, .82); color: #fff; font-size: 12.5px; z-index: 3; max-width: 90%; text-align: center; }
.t2-page .ic-cmp-stage.no-before .ic-cmp-nob { display: block; }
.t2-page .ic-cmp-stage.no-before .ic-cmp-b,
.t2-page .ic-cmp-stage.no-before .ic-cmp-range,
.t2-page .ic-cmp-stage.no-before::after { display: none; }
.t2-page .ic-cmp-stage.no-before .ic-cmp-a { clip-path: none; }
.t2-page .ic-cmp-stage.is-side { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background-color: var(--t2-line); }
.t2-page .ic-cmp-stage.is-side figure { position: relative; inset: auto; min-height: 0; overflow: hidden; background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.t2-page .ic-cmp-stage.is-side .ic-cmp-a { clip-path: none; }
.t2-page .ic-cmp-stage.is-side .ic-cmp-range { display: none; }
.t2-page .ic-cmp-foot { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--t2-line); }
.t2-page .ic-cmp-foot .t2-btn:hover { color: #fff; text-decoration: none; }
html.ic-modal-open { overflow: hidden; }

@media (max-width: 991.98px) {
   .t2-page .ic-main { grid-template-columns: 1fr; }
   .t2-page .ic-settings { position: static; }
   .t2-page .t2-related.rel-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
   .t2-page .ic-tool { padding: 12px; }
   .t2-page .ic-drop { flex-wrap: wrap; padding: 16px 14px; gap: 10px 12px; }
   .t2-page .ic-drop-art { flex-basis: 44px; width: 44px; height: 44px; font-size: 20px; }
   .t2-page .ic-drop-title { font-size: 15px; }
   .t2-page .ic-pick { width: 100%; }
   .t2-page .ic-tool.has-items .ic-pick { display: none; }
   .t2-page .ic-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
   .t2-page .ic-sum dd { font-size: 15.5px; }
   .t2-page .ic-sum-actions .t2-btn { flex: 1 1 auto; }
   .t2-page .ic-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px; }
   .t2-page .ic-thumb { width: 48px; height: 48px; grid-row: span 2; }
   .t2-page .ic-size { grid-column: 3; grid-row: 1; }
   .t2-page .ic-item-main { grid-column: 2; grid-row: 1 / span 2; }
   .t2-page .ic-acts { grid-column: 3; grid-row: 2; justify-content: flex-end; }
   .t2-page .ic-icon-btn { width: 32px; height: 32px; }
   .t2-page .ic-list { max-height: none; }
   .t2-page .ic-cmp { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
   .t2-page .ic-cmp-head { flex-wrap: wrap; }
   .t2-page .ic-cmp-titles { flex-basis: calc(100% - 50px); }
   .t2-page .ic-cmp-modes { order: 3; flex: 1 1 100%; }
   .t2-page .ic-cmp-stage { height: auto; }
   .t2-page .ic-cmp-stage.is-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
   .t2-page .t2-related.rel-4 { grid-template-columns: 1fr; }
   .t2-page .t2-answer-card { padding: 14px 16px; }
   .t2-page .t2-answer { font-size: 14.5px; }
}

/* ================= 深色模式（只用 html[data-theme="dark"] #t2-app 作用域，覆盖站点通用暗色规则） ================= */
html[data-theme="dark"] #t2-app .t2-field select,
html[data-theme="dark"] #t2-app .t2-field input[type="number"],
html[data-theme="dark"] #t2-app .t2-field input[type="text"],
html[data-theme="dark"] #t2-app .t2-color input[type="color"],
html[data-theme="dark"] #t2-app .ic-item,
html[data-theme="dark"] #t2-app .ic-icon-btn,
html[data-theme="dark"] #t2-app .t2-table th,
html[data-theme="dark"] #t2-app .ic-drop-art { background-color: #182231 !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .t2-table td { background: transparent !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .t2-answer-card,
html[data-theme="dark"] #t2-app .t2-privacy,
html[data-theme="dark"] #t2-app .ic-summary,
html[data-theme="dark"] #t2-app .ic-settings,
html[data-theme="dark"] #t2-app .t2-seg,
html[data-theme="dark"] #t2-app .t2-status { background-color: #141c28 !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .t2-answer-card { border-left-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .t2-answer,
html[data-theme="dark"] #t2-app .ic-sum dd,
html[data-theme="dark"] #t2-app .ic-name,
html[data-theme="dark"] #t2-app .ic-size b,
html[data-theme="dark"] #t2-app .ic-drop-title,
html[data-theme="dark"] #t2-app .t2-val { color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app .ic-drop { background: #13213a !important; border-color: #34507e !important; }
html[data-theme="dark"] #t2-app .ic-drop:hover,
html[data-theme="dark"] #t2-app .ic-tool.is-drag .ic-drop { background: #172a4a !important; border-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .ic-drop-art,
html[data-theme="dark"] #t2-app .ic-set-title i,
html[data-theme="dark"] #t2-app .t2-privacy .fa-lock,
html[data-theme="dark"] #t2-app .t2-more > summary { color: #93c5fd !important; }
html[data-theme="dark"] #t2-app .t2-seg button { color: #b7c3d0 !important; background: transparent !important; }
html[data-theme="dark"] #t2-app .t2-seg button[aria-pressed="true"] { background: var(--t2-primary) !important; color: #fff !important; }
html[data-theme="dark"] #t2-app .ic-thumb { background: #101722 repeating-conic-gradient(#1c2636 0 25%, transparent 0 50%) 0 0 / 12px 12px !important; }
html[data-theme="dark"] #t2-app .ic-dl-btn:not([aria-disabled="true"]) { background: var(--t2-primary) !important; border-color: var(--t2-primary) !important; color: #fff !important; }
html[data-theme="dark"] #t2-app .ic-icon-btn:hover:not(:disabled):not([aria-disabled="true"]) { color: #93c5fd !important; border-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .ic-dl-btn:not([aria-disabled="true"]):hover { color: #fff !important; }
html[data-theme="dark"] #t2-app .ic-tag { background: #182231 !important; color: #b7c3d0 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .ic-tag.is-good,
html[data-theme="dark"] #t2-app .ic-badge.is-good { background: #12301f !important; color: #6ad49b !important; border-color: #1f5a39 !important; }
html[data-theme="dark"] #t2-app .ic-tag.is-warn { background: #2b2312 !important; color: #f0c27a !important; border-color: #5a4520 !important; }
html[data-theme="dark"] #t2-app .ic-tag.is-bad,
html[data-theme="dark"] #t2-app .ic-badge.is-bad { background: #2a1513 !important; color: #f3a99f !important; border-color: #5c2a24 !important; }
html[data-theme="dark"] #t2-app .ic-badge { background: #182231 !important; color: #b7c3d0 !important; }
html[data-theme="dark"] #t2-app .ic-sum dd.is-good { color: #6ad49b !important; }
html[data-theme="dark"] #t2-app .ic-sum dd.is-bad,
html[data-theme="dark"] #t2-app .ic-err { color: #f3a99f !important; }
html[data-theme="dark"] #t2-app .ic-item.is-error { border-color: #5c2a24 !important; }
html[data-theme="dark"] #t2-app .t2-warn { background: #2b2312 !important; color: #f0c27a !important; }
html[data-theme="dark"] #t2-app .t2-noscript { background: #2a1513 !important; border-color: #5c2a24 !important; color: #f3a99f !important; }
html[data-theme="dark"] #t2-app .ic-cmp { background: #141c28 !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .ic-cmp-titles strong { color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app .ic-cmp-stage,
html[data-theme="dark"] #t2-app .ic-cmp-stage.is-side figure { background: #0d131d repeating-conic-gradient(#1a2332 0 25%, #0d131d 0 50%) 0 0 / 16px 16px !important; }
html[data-theme="dark"] #t2-app .ic-cmp-stage figcaption,
html[data-theme="dark"] #t2-app .ic-cmp-nob { background: rgba(0, 0, 0, .72) !important; color: #fff !important; }
html[data-theme="dark"] #t2-app .t2-related a:hover,
html[data-theme="dark"] #t2-app .t2-btn:hover:not(:disabled):not(.t2-btn-primary) { background: #1e2b3d !important; }
html[data-theme="dark"] #t2-app .t2-related .rel-title,
html[data-theme="dark"] #t2-app .t2-faq-item > summary,
html[data-theme="dark"] #t2-app .t2-step-title { color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app .t2-btn-ghost { background: transparent !important; }

/* 空状态：桌面端拖放区放大成主视觉，避免左栏大片留白 */
@media (min-width: 576px) {
   .t2-page .ic-tool:not(.has-items) .ic-drop { flex-direction: column; justify-content: center; text-align: center; min-height: 300px; gap: 14px; padding: 32px 24px; }
   .t2-page .ic-tool:not(.has-items) .ic-drop-art { flex-basis: auto; width: 72px; height: 72px; font-size: 32px; border-radius: 20px; }
   .t2-page .ic-tool:not(.has-items) .ic-drop-text { flex: 0 0 auto; align-items: center; }
   .t2-page .ic-tool:not(.has-items) .ic-drop-title { font-size: 19px; }
   .t2-page .ic-tool:not(.has-items) .ic-pick { padding: 11px 22px; font-size: 15px; }
   .t2-page .ic-tool:not(.has-items) .ic-empty { text-align: center; }
}

/* 深色补充：压过 theme.css 的通用“-card/-tool/-drop/-item/section…一律 #10151c”规则 */
html[data-theme="dark"] #t2-app .t2-tool { background-color: #131a24 !important; border-color: rgba(255, 255, 255, 0.12) !important; box-shadow: none !important; }
html[data-theme="dark"] #t2-app .t2-answer-card { background-color: #141c28 !important; border-color: rgba(255, 255, 255, 0.14) !important; border-left-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .ic-summary,
html[data-theme="dark"] #t2-app .ic-settings { background-color: #182231 !important; }
html[data-theme="dark"] #t2-app .ic-item { background-color: #182231 !important; }
html[data-theme="dark"] #t2-app .t2-faq-item { background-color: #141c28 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .t2-faq-item > summary,
html[data-theme="dark"] #t2-app .t2-more > summary { background-color: transparent !important; background-image: none !important; }
html[data-theme="dark"] #t2-app .t2-faq-item > summary:hover,
html[data-theme="dark"] #t2-app .t2-more > summary:hover { background-color: rgba(255, 255, 255, 0.04) !important; }
html[data-theme="dark"] #t2-app .t2-more { background-color: transparent !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app :is(.info-section, .info-content, .t2-table-wrap, .t2-facts-wrap, .t2-howto, .t2-faq) { background-color: transparent !important; }
html[data-theme="dark"] #t2-app .t2-btn-ghost { background-color: transparent !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.18) !important; }
html[data-theme="dark"] #t2-app .t2-btn-ghost:hover:not(:disabled) { background-color: #1e2b3d !important; }
html[data-theme="dark"] #t2-app .ic-tag.is-bad { border-radius: 8px !important; }
html[data-theme="dark"] #t2-app .t2-hint.t2-warn { color: #f0c27a !important; }
html[data-theme="dark"] #t2-app .ic-cmp-stage { background-image: repeating-conic-gradient(#1a2332 0 25%, #0d131d 0 50%) !important; background-size: 16px 16px !important; }
html[data-theme="dark"] #t2-app .ic-cmp-nob,
html[data-theme="dark"] #t2-app .t2-status { color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app :is(.ic-drop-text, .ic-drop-title, .ic-drop-sub, .ic-item-main, .ic-notes, .ic-cmp-titles, .ic-sum-actions) { background-color: transparent !important; background-image: none !important; }

/* 手机：格式表、功能表改成卡片行 */
@media (max-width: 600px) {
  .t2-page .t2-fmt-table thead,
  .t2-page .t2-sup-table thead { display: none; }
  .t2-page .t2-fmt-table, .t2-page .t2-fmt-table tbody,
  .t2-page .t2-sup-table, .t2-page .t2-sup-table tbody { display: block; }
  .t2-page .t2-fmt-table tr,
  .t2-page .t2-sup-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--t2-line); }
  .t2-page .t2-fmt-table td,
  .t2-page .t2-sup-table td { padding: 0; border: 0; }
  .t2-page .t2-fmt-table td:nth-child(2),
  .t2-page .t2-fmt-table td.t2-fmt-note,
  .t2-page .t2-sup-table td:nth-child(3) { grid-column: 1 / -1; color: var(--t2-muted); line-height: 1.6; }
  .t2-page .t2-fmt-table td:nth-child(2) { color: var(--t2-ink); }
  .t2-page .t2-fmt-table td.t2-fmt-alpha { grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--t2-muted); white-space: nowrap; }
  .t2-page .t2-fmt-table td.t2-fmt-alpha::before { content: attr(data-label) " · "; }
  .t2-page .t2-sup-table td:first-child { font-weight: 700; }
  .t2-page .t2-sup-table td:nth-child(2) { white-space: nowrap; }
}

/* ================= PDF 合并 / 拆分 ================= */
.t2-page .pm-tool { padding: 18px; position: relative; }
.t2-page .pm-tool.pm-dragover { outline: 3px dashed var(--t2-primary); outline-offset: 4px; }
.t2-page .pm-drop {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px;
    border: 2px dashed #b9c9e3; border-radius: 14px; background: var(--t2-primary-soft); cursor: pointer;
    transition: border-color .15s, background .15s;
}
.t2-page .pm-drop:hover, .t2-page .pm-drop:focus-visible, .t2-page .pm-dragover .pm-drop { border-color: var(--t2-primary); background: #e3ecfd; outline: none; }
.t2-page .pm-drop-art { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #d93025; font-size: 21px; box-shadow: var(--t2-shadow); }
.t2-page .pm-drop-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t2-page .pm-drop-title { font-size: 15px; color: var(--t2-ink); }
.t2-page .pm-drop-sub { font-size: 12.5px; color: var(--t2-muted); line-height: 1.55; }
.t2-page .pm-pick { flex: 0 0 auto; }
.t2-page .pm-chips { display: none; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; gap: 8px; }
.t2-page .pm-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--t2-line); font-size: 12.5px; font-weight: 600; color: var(--t2-muted); }
.t2-page .pm-chips i { color: var(--t2-primary); }
.t2-page .pm-tool:not(.pm-has-files) .pm-chips { display: flex; flex: 1 1 100%; }
@media (min-width: 576px) {
   .t2-page .pm-tool:not(.pm-has-files) .pm-drop { flex-direction: column; justify-content: center; text-align: center; min-height: 300px; gap: 14px; padding: 32px 24px; flex-wrap: nowrap; }
   .t2-page .pm-tool:not(.pm-has-files) .pm-drop-art { flex-basis: auto; width: 72px; height: 72px; font-size: 32px; border-radius: 20px; }
   .t2-page .pm-tool:not(.pm-has-files) .pm-drop-text { flex: 0 0 auto; align-items: center; }
   .t2-page .pm-tool:not(.pm-has-files) .pm-drop-title { font-size: 19px; }
   .t2-page .pm-tool:not(.pm-has-files) .pm-pick { padding: 11px 22px; font-size: 15px; }
   .t2-page .pm-tool:not(.pm-has-files) .pm-chips { flex: 0 0 auto; }
}

.t2-page .pm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 14px 0 0; }
.t2-page .pm-sum { margin: 0; font-size: 14px; font-weight: 700; color: var(--t2-ink); font-variant-numeric: tabular-nums; }
.t2-page .pm-bar-actions { display: flex; gap: 8px; }
.t2-page .pm-tabs { display: flex; gap: 4px; padding: 4px; margin: 12px 0 0; border: 1px solid var(--t2-line); border-radius: 12px; background: var(--t2-panel); }
.t2-page .pm-tabs button {
    flex: 1 1 0; min-width: 0; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    font-size: 14px; font-weight: 700; color: var(--t2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t2-page .pm-tabs button:hover { color: var(--t2-primary); }
.t2-page .pm-tabs button[aria-selected="true"] { background: var(--t2-primary); color: #fff; }
.t2-page .pm-tabs button:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); }
.t2-page .pm-panel { margin-top: 12px; }
.t2-page .pm-panel-hint { margin: 0 0 12px; }

.t2-page .pm-ibtn {
    width: 32px; height: 32px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    border: 1px solid var(--t2-line); border-radius: 9px; background: #fff; color: var(--t2-ink); cursor: pointer; font-size: 13px;
}
.t2-page .pm-ibtn:hover:not(:disabled) { border-color: var(--t2-primary); color: var(--t2-primary); }
.t2-page .pm-ibtn:disabled { opacity: .3; cursor: not-allowed; }
.t2-page .pm-ibtn:focus-visible { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 1px; }
.t2-page .pm-ibtn[data-act="remove"]:hover, .t2-page .pm-ibtn[data-act="del"]:hover { color: var(--t2-danger); border-color: #f3c7c0; }
.t2-page [data-act="drag"] { cursor: grab; touch-action: none; }
.t2-page .is-sorting, .t2-page .is-sorting * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* 文件列表 */
.t2-page .pm-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.t2-page .pm-file {
    display: grid; grid-template-columns: 32px 48px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 8px 10px; border: 1px solid var(--t2-line); border-radius: 12px; background: #fff;
}
.t2-page .pm-file.pm-st-error, .t2-page .pm-file.pm-st-locked { border-color: #f1d9ad; }
.t2-page .pm-handle { border-color: transparent; background: transparent; color: var(--t2-muted); }
.t2-page .pm-fthumb {
    position: relative; width: 48px; height: 60px; border-radius: 6px; border: 1px solid var(--t2-line); background: #fff;
    display: flex; align-items: center; justify-content: center; color: var(--t2-muted); font-size: 16px;
}
.t2-page .pm-fthumb img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 5px; }
.t2-page .pm-letter {
    position: absolute; left: -6px; top: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--t2-primary); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
}
.t2-page .pm-fmain { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.t2-page .pm-fname { max-width: 100%; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t2-ink); }
.t2-page .pm-fmeta { font-size: 12px; color: var(--t2-muted); font-variant-numeric: tabular-nums; }
.t2-page .pm-badge { font-size: 11.5px; line-height: 1.4; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--t2-line); }
.t2-page .pm-badge-warn { color: var(--t2-warn); border-color: #f1d9ad; background: var(--t2-warn-soft); }
.t2-page .pm-ferr { font-size: 12.5px; color: var(--t2-danger); font-weight: 600; line-height: 1.5; }
.t2-page .pm-unlock { display: flex; gap: 6px; width: 100%; max-width: 360px; margin-top: 2px; }
.t2-page .pm-unlock input { flex: 1 1 auto; min-width: 0; padding: 6px 9px; border: 1px solid var(--t2-line); border-radius: 9px; font-size: 13px; background: #fff; color: inherit; }
.t2-page .pm-facts { display: flex; gap: 4px; }
.t2-page .pm-file.is-dragging, .t2-page .pm-page.is-dragging { opacity: .55; outline: 2px dashed var(--t2-primary); outline-offset: 2px; }
.t2-page .pm-img-opts { margin-top: 14px; }
.t2-page .pm-img-opts select { width: 100%; padding: 7px 9px; border: 1px solid var(--t2-line); border-radius: 9px; background: #fff; font-size: 14px; }
.t2-page .pm-img-opts .t2-pair { max-width: 420px; }

/* 页面网格 */
.t2-page .pm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.t2-page .pm-sel-count { margin-left: auto; font-size: 12.5px; color: var(--t2-muted); font-variant-numeric: tabular-nums; }
.t2-page .pm-grid {
    list-style: none; margin: 0; padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
    max-height: 760px; overflow-y: auto; overscroll-behavior: contain;
}
.t2-page .pm-page {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 0;
    border: 1px solid var(--t2-line); border-radius: 12px; background: #fff; cursor: pointer; user-select: none; -webkit-user-select: none;
}
@media (hover: hover) and (pointer: fine) { .t2-page .pm-page { cursor: grab; } }
.t2-page .pm-page:hover { border-color: #c9d6ea; }
.t2-page .pm-page.is-sel { border-color: var(--t2-primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, .22); background: var(--t2-primary-soft); }
.t2-page .pm-pthumb {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden;
    border-radius: 8px; background: var(--t2-panel);
}
.t2-page .pm-pthumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; background: #fff; box-shadow: 0 1px 4px rgba(15, 28, 46, .18); transition: transform .18s; }
.t2-page .pm-pthumb img:not([src]) { width: 70%; height: 90%; }
.t2-page .pm-pcheck { position: absolute; top: 12px; left: 12px; width: 18px; height: 18px; margin: 0; accent-color: var(--t2-primary); cursor: pointer; }
.t2-page .pm-pcap { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 12.5px; }
.t2-page .pm-pnum { font-weight: 800; color: var(--t2-ink); font-variant-numeric: tabular-nums; }
.t2-page .pm-psrc { color: var(--t2-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-page .pm-pacts { display: flex; justify-content: space-between; gap: 4px; }
.t2-page .pm-pacts .pm-ibtn { width: 28px; height: 28px; font-size: 12px; }

/* 拆分 */
.t2-page .pm-modes { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.t2-page .pm-modes legend { padding: 0; }
.t2-page .pm-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.t2-page .pm-modes legend { grid-column: 1 / -1; float: left; width: 100%; }
.t2-page .pm-mode {
    display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--t2-line); border-radius: 12px;
    background: #fff; cursor: pointer; min-width: 0;
}
.t2-page .pm-mode input { margin: 3px 0 0; accent-color: var(--t2-primary); flex: 0 0 auto; }
.t2-page .pm-mode span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t2-page .pm-mode strong { font-size: 14px; color: var(--t2-ink); }
.t2-page .pm-mode small { font-size: 12px; color: var(--t2-muted); line-height: 1.45; }
.t2-page .pm-mode:has(input:checked) { border-color: var(--t2-primary); background: var(--t2-primary-soft); }
.t2-page #pm-ranges { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-width: 420px; }
.t2-page #pm-every { max-width: 140px; }
.t2-page .pm-split-preview { margin: 4px 0 0; font-size: 13.5px; font-weight: 600; color: var(--t2-ink); }
.t2-page .pm-split-preview:empty { display: none; }

.t2-page .pm-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.t2-page .pm-progress { margin-top: 14px; }
.t2-page .pm-busy .pm-panel { opacity: .7; pointer-events: none; }

/* 结果 */
.t2-page .pm-results { margin-top: 14px; padding: 14px; border: 1px solid #bfe5cf; border-radius: 14px; background: #f3fbf6; }
.t2-page .pm-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.t2-page .pm-results-head h3 { margin: 0; font-size: 15.5px; color: var(--t2-ink); }
.t2-page .pm-out { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.t2-page .pm-out-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--t2-line); }
.t2-page .pm-out-ic { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #fdecea; color: #d93025; font-size: 16px; }
.t2-page .pm-out-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.t2-page .pm-out-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--t2-ink); }
.t2-page .pm-out-meta { font-size: 12px; color: var(--t2-muted); font-variant-numeric: tabular-nums; }
.t2-page .pm-out-item .t2-btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.t2-page .pm-out-item .t2-btn-primary:hover { color: #fff; }
.t2-page .pm-out-note { margin-top: 10px; }
.t2-page .pm-split-table code { font-size: 13px; }

@media (max-width: 767.98px) {
   .t2-page .pm-modes { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
   .t2-page .pm-tool { padding: 12px; }
   .t2-page .pm-drop { padding: 16px 14px; gap: 10px 12px; }
   .t2-page .pm-pick { width: 100%; }
   .t2-page .pm-has-files .pm-pick { display: none; }
   .t2-page .pm-has-files .pm-drop { padding: 10px 12px; }
   .t2-page .pm-has-files .pm-drop-art { flex-basis: 36px; width: 36px; height: 36px; font-size: 17px; }
   .t2-page .pm-chips li { font-size: 12px; padding: 4px 9px; }
   .t2-page .pm-tabs button { font-size: 13px; padding: 8px 4px; }
   .t2-page .pm-file { grid-template-columns: 26px 40px minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 8px; padding: 8px; }
   .t2-page .pm-handle { grid-row: 1 / span 2; width: 26px; }
   .t2-page .pm-fthumb { grid-row: 1 / span 2; width: 40px; height: 50px; }
   .t2-page .pm-facts { grid-column: 3; justify-content: flex-end; }
   .t2-page .pm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: none; }
   .t2-page .pm-toolbar .t2-btn { padding: 6px 9px; }
   .t2-page .pm-sel-count { flex: 1 1 100%; margin-left: 0; }
   .t2-page .pm-go .t2-btn { flex: 1 1 100%; justify-content: center; }
   .t2-page .pm-out-item { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
   .t2-page .pm-out-ic { width: 30px; height: 30px; font-size: 14px; }
}

/* PDF 工具深色模式 */
html[data-theme="dark"] #t2-app .pm-drop { background: #13213a !important; border-color: #34507e !important; }
html[data-theme="dark"] #t2-app .pm-drop:hover,
html[data-theme="dark"] #t2-app .pm-dragover .pm-drop { background: #172a4a !important; border-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app :is(.pm-drop-text, .pm-drop-title, .pm-drop-sub, .pm-fmain, .pm-pcap, .pm-pacts, .pm-facts, .pm-bar, .pm-bar-actions, .pm-toolbar, .pm-go, .pm-panel, .pm-modes, .pm-out-main, .pm-results-head, .pm-unlock, .pm-chips, .pm-work) { background-color: transparent !important; background-image: none !important; }
html[data-theme="dark"] #t2-app .pm-drop-art,
html[data-theme="dark"] #t2-app .pm-chips li,
html[data-theme="dark"] #t2-app .pm-ibtn,
html[data-theme="dark"] #t2-app .pm-file,
html[data-theme="dark"] #t2-app .pm-page,
html[data-theme="dark"] #t2-app .pm-mode,
html[data-theme="dark"] #t2-app .pm-out-item,
html[data-theme="dark"] #t2-app .pm-unlock input,
html[data-theme="dark"] #t2-app .pm-img-opts select { background-color: #182231 !important; color: #e8eef5 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .pm-drop-art { color: #ff8a80 !important; }
html[data-theme="dark"] #t2-app .pm-chips i { color: #93c5fd !important; }
html[data-theme="dark"] #t2-app .pm-handle { background-color: transparent !important; border-color: transparent !important; color: #b7c3d0 !important; }
html[data-theme="dark"] #t2-app .pm-ibtn:hover:not(:disabled) { color: #93c5fd !important; border-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .pm-tabs { background-color: #141c28 !important; border-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] #t2-app .pm-tabs button { background: transparent !important; color: #b7c3d0 !important; }
html[data-theme="dark"] #t2-app .pm-tabs button[aria-selected="true"] { background: var(--t2-primary) !important; color: #fff !important; }
html[data-theme="dark"] #t2-app .pm-fthumb { background-color: #0f1621 !important; border-color: rgba(255, 255, 255, 0.14) !important; color: #b7c3d0 !important; }
html[data-theme="dark"] #t2-app .pm-pthumb { background-color: #0f1621 !important; }
html[data-theme="dark"] #t2-app .pm-page.is-sel,
html[data-theme="dark"] #t2-app .pm-mode:has(input:checked) { background-color: #172a4a !important; border-color: #60a5fa !important; }
html[data-theme="dark"] #t2-app .pm-file.pm-st-error,
html[data-theme="dark"] #t2-app .pm-file.pm-st-locked { border-color: #5a4520 !important; }
html[data-theme="dark"] #t2-app :is(.pm-sum, .pm-fname, .pm-pnum, .pm-mode strong, .pm-out-name, .pm-results-head h3, .pm-split-preview) { color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app :is(.pm-fmeta, .pm-psrc, .pm-mode small, .pm-out-meta, .pm-sel-count) { color: #b7c3d0 !important; }
html[data-theme="dark"] #t2-app .pm-ferr { color: #f3a99f !important; }
html[data-theme="dark"] #t2-app .pm-badge-warn { background: #2b2312 !important; color: #f0c27a !important; border-color: #5a4520 !important; }
html[data-theme="dark"] #t2-app .pm-results { background-color: #11251a !important; border-color: #1f5a39 !important; }
html[data-theme="dark"] #t2-app .pm-out-ic { background: #2a1513 !important; color: #ff8a80 !important; }
html[data-theme="dark"] #t2-app .pm-split-table code { background: #182231 !important; color: #e8eef5 !important; }
html[data-theme="dark"] #t2-app :is(.pm-panel-hint, .pm-split-preview, .pm-sel-count, .pm-sum, .pm-fname, .pm-fmeta, .pm-ferr, .pm-pnum, .pm-psrc, .pm-pthumb-cap, .pm-mode span, .pm-mode strong, .pm-mode small, .pm-out, .pm-files, .pm-grid, .pm-out-name, .pm-out-meta, .pm-results-head h3, .pm-img-opts .t2-pair, .pm-img-opts label) { background-color: transparent !important; background-image: none !important; }
html[data-theme="dark"] #t2-app .t2-faq-a { background-color: transparent !important; }
