
  :root {
    --brand: #11a8a8;
    --brand-dark: #0c8484;
    --brand-light: #e6f7f7;
    --ink: #1f2933;
    --ink-soft: #52606d;
    --ink-faint: #9aa5b1;
    --line: #e4e7eb;
    --bg: #ffffff;
    --bg-soft: #f7f9fb;
    --good: #2f9e44;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(17, 168, 168, .08), 0 2px 8px rgba(0,0,0,.04);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--brand); text-decoration: none; }
  .wraps { margin: 0 auto;}
  .hero-split {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      position: relative;
      justify-content: space-between;
      margin: auto;
      width: 1375px;
  }

  button {
    height: 42px !important;
    width: 87px !important;
    cursor: pointer;
}
  /* Full-height vertical divider between hero and side (from header bottom to footer top) */
/*  .hero-split::before {
    content: '';
    position: fixed;
    left: 50%; top: 64px; bottom: 55px;
    width: 1px; background: var(--line);
    z-index: 1; pointer-events: none;
  }*/

  /* Header */
  header {
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(8px);
  }
  .nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
  .logo { font-weight: 800; font-size: 20px; letter-spacing: -.5px; display: flex; align-items: center; gap: 8px; }
  .logo .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
  .nav .tag { font-size: 12px; color: var(--brand-dark); background: var(--brand-light); padding: 4px 10px; border-radius: 999px; font-weight: 600; }

@media screen and (max-width: 1441px) {
    .hero-split {
        width: 1253px;
    }
}
@media screen and (max-width: 1370px) {
    .hero-split {
        width: 1161px;
    }
}
@media screen and (max-width: 1300px) {
    .hero-split {
        width: 1075px;
    }
}
@media screen and (max-width: 1250px) {
    .hero-split {
        width: 85% !important;
    }
}
@media screen and (max-width: 950px) {
    .side {
        display: block !important;
        opacity: 1 !important;
    }
}

  /* Hero */
  .hero {     
    min-width: 0;
    text-align: center;
    flex: 0 0 calc(50% - 10px);
    padding: 30px;
    border-radius: var(--radius);
    transition: box-shadow .3s ease, border-color .3s ease;
    background: linear-gradient(157.87deg, hsl(0deg 0% 100% / 78%), hsl(0deg 0% 100% / 64%));
    box-shadow: 0 0 5px rgb(0 0 0 / 4%) !important;
    border: 1px solid #ffffffeb !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -1px; }
  .hero h1 .hl { color: var(--brand); }
  .hero p.sub { font-size: 17px; color: var(--ink-soft); margin: 0 auto; max-width: 560px; }

  /* Dropzone */
  .dropzone {
    margin: 32px auto 0; max-width: 640px;
    border: 2px dashed var(--brand);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--brand-light), #fff);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .dropzone:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
  .dropzone.drag { background: var(--brand-light); border-color: var(--brand-dark); box-shadow: var(--shadow); }
  .dropzone .ic {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
    background: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
  }
  .dropzone .ic svg { width: 30px; height: 30px; stroke: var(--brand); }
  .dropzone .big { font-size: 18px; font-weight: 600; }
  .dropzone .small { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
  .hidden { display: none !important; }

  /* Quality */
  .quality {     margin: 28px auto 0;
    border-radius: var(--radius); }
  .quality .row { display: flex; align-items: center; gap: 14px; }
  .quality label { font-size: 14px; font-weight: 600; white-space: nowraps; }
  .quality input[type=range] { flex: 1; accent-color: var(--brand); }
  .quality .val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand-dark); min-width: 46px; text-align: right; }

  /* Results — compact list rows */
  .results { margin: 0; display: grid; gap: 12px; }
  .row {
    display: flex; align-items: center; gap: 16px;
    border: 1px solid var(--line); border-radius: 14px; background: #fff;
    padding: 14px 16px; box-shadow: var(--shadow);
  }
  .row .thumb {
    width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
    background: var(--bg-soft); border: 1px solid var(--line); flex: none;
  }
  .row .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  .row .name { font-weight: 600; font-size: 15px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowraps; }
  .row .reduction { color: var(--good); font-weight: 600; font-size: 14px; white-space: nowraps; }
  .row .stats { display: flex; gap: 10px; flex: none; margin-left: auto; }
  .stat-box {
    background: #f3f5f7; border-radius: 10px; padding: 8px 14px; text-align: center; min-width: 108px;
  }
  .stat-box .k { font-size: 11px; color: var(--ink-faint); }
  .stat-box .v { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
  /* Shared pill button: 行内「下载 webp」与工具栏「全部下载」复用 */
  .download-link {
    color: #fff; background: var(--brand); font-weight: 600; font-size: 14px;
    cursor: pointer; white-space: nowraps; border: none; border-radius: 10px; padding: 9px 16px; font-family: inherit;
    transition: background .15s ease;
  }
  .download-link:hover { background: var(--brand-dark); }
  /* Red variant: 清空 */
  .download-link.danger { background: var(--danger); }
  .download-link.danger:hover { background: #dc2626; }

  .toolbar { margin: 0 0 16px; display: flex; gap: 10px; flex-wraps: wraps; align-items: center; justify-content: space-between; }
  .toolbar .count { color: var(--ink-soft); font-size: 14px; }

  /* Content sections */
  section.block { padding: 40px 0; border-top: 1px solid var(--line); margin-top: 24px; }
  section.block h2 { font-size: 26px; margin: 0 0 14px; letter-spacing: -.5px; }
  section.block p { color: var(--ink-soft); }

  /* Right side panel: WebP 介绍 <-> 转换结果 */
  .block.side {
    flex: 0 0 calc(50% - 24px);
    width: auto;
    max-width: none;
    min-width: 0;
    align-self: stretch;
    border-top: none;
    margin-top: 0;
    padding: 40px 0 40px 36px;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 148px);
    overflow-y: auto;
    overscroll-behavior: contain;
    min-width: 0;
    flex: 0 0 calc(50% - 10px);
    padding: 30px;
    border-radius: var(--radius);
    transition: box-shadow .3s ease, border-color .3s ease;
    background: linear-gradient(157.87deg, hsl(0deg 0% 100% / 78%), hsl(0deg 0% 100% / 64%));
    box-shadow: 0 0 5px rgb(0 0 0 / 4%) !important;
    border: 1px solid #ffffffeb !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .block.side .results { grid-template-columns: minmax(0, 1fr); }
  .block.side h2 { font-size: 22px; margin: 0 0 12px; letter-spacing: -.5px; }
  .block.side h2:first-child { margin-top: 0; }
  .block.side p { color: var(--ink-soft); margin: 0 0 14px; font-size: 14.5px; }
  .block.side .steps { margin-top: 4px; gap: 12px; }
  .block.side .step { gap: 10px; }
  .block.side .step .n { width: 24px; height: 24px; font-size: 12px; }
  .block.side .step div { color: var(--ink-soft); font-size: 14px; }
  .block.side .faq { margin-top: 8px; gap: 12px; }
  .block.side .faq .q { font-size: 14px; }
  .block.side .faq .a { font-size: 13px; }
  /* Result row inside the (now 50% wide) side panel */
  .block.side .row { flex-wraps: wraps; padding: 12px 14px; gap: 10px 12px; min-width: 0; }
  .block.side .row .meta { min-width: 0; }
  .block.side .stat-box { min-width: 84px; padding: 6px 8px; }
  .block.side .stat-box .v { font-size: 14px; }
  .block.side .row .download-link { padding: 6px 12px; font-size: 13px;    height: 50px; }
  /* 工具栏按钮复用同一尺寸（含用户手调的 height:50px），并整体靠右 */
  .block.side .toolbar .download-link { padding: 6px 12px; font-size: 13px; height: 50px; }
  .block.side .toolbar #downloadAll { margin-left: auto; }
  .steps { display: grid; gap: 16px; margin-top: 8px; }
  .step { display: flex; gap: 14px; align-items: flex-start; }
  .step .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); font-weight: 800; display: grid; place-items: center; }
  .step b { color: var(--ink); }
  .faq { display: grid; gap: 14px; }
  .faq .q { font-weight: 700; margin-bottom: 4px; }
  .faq .a { color: var(--ink-soft); }

  footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; border-top: 1px solid var(--line); padding: 10px 32px; color: var(--ink-faint); font-size: 13px; text-align: center; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); }
  .badge-local { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-light); color: var(--brand-dark); font-weight: 600; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
  .badge-local .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }

  @media (max-width: 860px) {
    /* 手机端改为上下堆叠，中间那根竖线不再需要，隐藏 */
    .hero-split::before { display: none; }
    .hero-split { flex-direction: column; gap: 0; }
    .hero { flex: 0 0 auto; width: 100%; padding: 30px; margin-bottom: 20px; }
    .block.side {
      flex: 0 0 auto; width: 100%; max-width: none; border-left: none; border-top: 1px solid var(--line);
      padding: 32px 0 0; position: static; max-height: none; overflow: visible;        padding: 12px;
    }
    .wraps { padding: 0 20px; }
  }


  @media (max-width: 600px) {
        .hero-split {
        width: 98% !important;
    }
    /* 压缩 hero/dropzone/quality 给结果行让位，避免初始视口被 footer 遮 */
    .hero { padding: 30px; }
    .hero h1 { font-size: 28px; margin: 0 0 8px; }
    .hero p.sub { font-size: 14px; }
    .dropzone { margin-top: 16px; padding: 28px 16px; }
    .dropzone .ic { width: 48px; height: 48px; margin: 0 auto 10px; }
    .dropzone .ic svg { width: 24px; height: 24px; }
    .dropzone .big { font-size: 16px; }
    .dropzone .small { font-size: 12px; margin-top: 4px; }
    .quality { margin-top: 12px;         padding: 13px 0px; }
    .hero h1 { font-size: 28px; }
    /* 工具栏：覆盖用户桌面手调的 height:50px，按钮和计数都缩小 */
    .block.side .toolbar .download-link { height: auto; padding: 6px 10px; font-size: 12px; }
    .toolbar { gap: 8px; }
    .toolbar .count { font-size: 12px; }
    /* 结果行 grid 两行布局（用 .block.side 限定，只影响结果行不影响 quality row）：
       行1 = 缩略图(40) | 图片名(占满)
       行2 = 缩略图(同一格 grid-row 1/span 2 跨行) | 减少X% | 原图大小 | WEBP 大小 | 下载 webp
       .meta 用 display:contents 把 name/reduction 释放为 grid 子项 */
    .block.side .row {
      display: grid;
      grid-template-columns: 67px auto 1fr auto;
      column-gap: 10px;
      row-gap: 6px;
      padding: 10px 12px;
      align-items: center;
    }
    .block.side .row .thumb {
      grid-column: 1; grid-row: 1 / span 2;
      width: 67px; height: 67px;
      align-self: start;
    }
    .block.side .row .meta { display: contents; }
    .block.side .row .name {
      grid-column: 2 / -1; grid-row: 1;
      width: auto; min-width: 0; font-size: 13px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowraps;
    }
    /* 减少 X% 叠在缩略图底部（与 thumb 同跨 1/span 2，align-self:end 压在图底） */
    .block.side .row .reduction {
      grid-column: 1; grid-row: 1 / span 2; align-self: end; justify-self: stretch;
              font-size: 10px;
        color: #fff;
        background: rgb(11 198 54 / 84%);
      text-align: center; padding: 2px 0; border-radius: 0 0 10px 10px;
      white-space: nowraps; overflow: hidden; text-overflow: ellipsis;
    }
    /* 原图大小 / WEBP 大小 横排（还原之前布局），占第 2 列起两列，留足宽度给两个 stat-box */
    .block.side .row .stats { grid-column: 2 / span 2; grid-row: 2; display: flex; flex-direction: row; gap: 6px; min-width: 0; }
    .block.side .row .download-link {
      grid-column: 4; grid-row: 2; justify-self: end;
      height: 40px; padding: 5px 10px; font-size: 12px;
    }
    /* stat-box 横排：给个能装下「94.9 KB」的最小宽度 */
    .stat-box { min-width: 64px; flex: none; padding: 3px 6px; }
    .stat-box .k { font-size: 10px; }
    .stat-box .v { font-size: 12px; }
    .block.side .stat-box { min-width: 64px; flex: none; padding: 3px 6px; }
    .block.side .stat-box .v { font-size: 12px; }
    /* 避免固定 footer 遮住最后一行结果：只给 main.wraps 加，footer 也带 .wraps 不能误伤 */
    main.wraps { padding-bottom: 0px; }
  }

/* ============================================================
   以下为「站点导航局部修正 + 深色模式」（不动引入的 css/js）
   ============================================================ */
/* ===== 导航局部修正（不动引入的 css/js） ===== */
  /* 页面自带裸 header 规则会误伤站点导航，中和其副作用（组件把占位 div 整体替换为 <header>，结构为 #header > header） */
  #header > header {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
  }

  /* 正文下推，避免被固定导航遮挡（PC 导航 120px / 手机端 .top 60px） */
  main.wraps { padding-top: 121px !important; width: 100%; }
/*  .hero-split::before { top: 121px !important; }*/
  .block.side {     -webkit-transform: scale(1);}
  @media screen and (max-width: 950px) {
    main.wraps { padding-top: 60px !important; }
    .hero-split::before { top: 60px !important; }
    .block.side { top: auto !important; }
  }

  /* ===== 站点底部 .copyrights_wz 固定贴底（桌面端；移动端由站点 css 隐藏，保持原行为） ===== */
  @media screen and (min-width: 951px) {
    .copyrights_wz {
      position: fixed !important;
      left: 0; right: 0; bottom: 0;
      z-index: 40;
      width: 100% !important;
      float: none !important;
      margin: 0 !important;
      padding: 10px 16px;
      text-align: center;
    }
    /* 正文预留底部空间，避免最后一行被固定底部遮住 */
    main.wraps { padding-bottom: 64px !important; }
    /* 右侧结果面板同步让出底部高度，避免贴到固定底部下方 */
    .block.side { max-height: calc(100vh - 148px - 64px) !important; }
  }

  /* ===== 深色模式：重映射设计变量 + 覆盖写死浅色（与站点 data-theme 同机制） ===== */
  :root[data-theme="dark"] {
    --brand: #11a8a8;
    --brand-dark: #2fd6d6;
    --brand-light: #0f2e2e;
    --ink: #e6edf3;
    --ink-soft: #9aa5b1;
    --ink-faint: #6b7785;
    --line: #2a313c;
    --bg: #0d1117;
    --bg-soft: #161b22;
    --good: #3fb950;
    --danger: #f85149;
    --shadow: 0 10px 30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  }
  [data-theme="dark"] body { background: var(--bg); color: var(--ink); }
  [data-theme="dark"] .dropzone {
 background: linear-gradient(180deg, var(--brand-light), #0d1117);
    border-color: #2c2c2c;
    border: 2px dashed #31414a;
  }
  [data-theme="dark"] .dropzone .ic { background: #161b22; box-shadow: var(--shadow); }
  /* 写死的半透明白玻璃背景：深色下改为暗色玻璃（渐变属于 backgroundImage，原扫描会漏） */
  [data-theme="dark"] .hero,
  [data-theme="dark"] .block.side {
    color: #afafaf !important;
    background: linear-gradient(157.87deg, rgb(22 27 34 / 45%), #0d111778) !important;
    border: 1px solid #3e4f6845 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .35) !important;
  }
  [data-theme="dark"] .quality { background: var(--bg-soft); border-color: var(--line); }
  [data-theme="dark"] .row { background: #161b22; border-color: var(--line); }
  [data-theme="dark"] .stat-box { background: #1c222b; }
  [data-theme="dark"] .step .n { background: var(--brand-light); color: var(--brand-dark); }
  [data-theme="dark"] .badge-local { background: var(--brand-light); color: var(--brand-dark); }
  [data-theme="dark"] footer,
  [data-theme="dark"] .copyrights_wz { margin: auto !important;    width: 100% !important;}

  .copyrights_wz { margin: auto !important;    width: 100% !important;}

