@charset "UTF-8";
/* Compress page — aligned to /tools/crop (Lovable cream + charcoal) */
/* Brand tokens (match crop / theme / legal) */
/* ══ 动效关键帧 ══ */
@keyframes cv-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cv-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
/* ══ 整页基底 ══ */
body {
  background: #f7f4ed;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

.tool-page {
  background: #f7f4ed;
}
.tool-page ::selection {
  background: rgba(28, 28, 28, 0.12);
}

/* 左列/侧栏不再内部滚动，滚动条样式声明已移除 */
/* ══ 轻量页内标题块（重横幅已删，入口统一至 site-nav）══ */
.compress-intro {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tool-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: #1c1c1c;
  letter-spacing: -0.02em;
}

.cv-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.06);
  border: 1px solid rgba(28, 28, 28, 0.12);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(28, 28, 28, 0.8);
  white-space: nowrap;
}
.cv-live-badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1c1c1c;
  animation: cv-pulse 1.6s infinite;
}

.tool-page-sub {
  margin: 0;
  font-size: 12px;
  color: rgba(28, 28, 28, 0.62);
}

/* ══ 按钮基线：统一 8px 圆角、去除位移 ══ */
.tool-page .btn {
  border-radius: 8px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tool-page .btn:hover:not(:disabled) {
  transform: none;
}

/* ══ 主区：空态拖拽区居中，有文件后自上而下 ══ */
.tool-main {
  justify-content: flex-start;
  align-items: center;
  padding: 28px 32px 40px;
  gap: 20px;
}

.tool-main:has(.compress-grid:empty) {
  justify-content: center;
  padding-bottom: 28px;
}

/* ══ 拖拽投放区：Tier2 卡 + 环境光 ══ */
.drop-zone {
  width: 100%;
  max-width: 920px;
  min-height: 280px;
  padding: 48px 32px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f7f4ed;
  border: 1.5px dashed rgba(28, 28, 28, 0.2);
  border-radius: 16px;
  color: #5f5f5d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: center;
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.drop-zone::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 170px;
  background: radial-gradient(ellipse at center, rgba(232, 180, 160, 0.1), transparent 70%);
  pointer-events: none;
}
.drop-zone .drop-zone__icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: #f1eee6;
  border: 1px solid #dcd8cc;
  color: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.drop-zone .drop-zone__icon svg {
  width: 30px;
  height: 30px;
}
.drop-zone p {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1c1c1c;
  margin: 0;
}
.drop-zone .drop-hint {
  font-size: 12.5px;
  color: rgba(28, 28, 28, 0.62);
  max-width: 460px;
}
.drop-zone .drop-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid #dcd8cc;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  background: rgba(28, 28, 28, 0.05);
  color: #1c1c1c;
}
.drop-zone .drop-zone__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.drop-zone .drop-zone__pills span {
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1eee6;
  border: 1px solid #eceae4;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #5f5f5d;
}
.drop-zone .drop-zone__pills span.is-green {
  color: rgba(28, 28, 28, 0.8);
  background: rgba(28, 28, 28, 0.06);
  border-color: rgba(28, 28, 28, 0.15);
  font-weight: 500;
}
.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: rgba(28, 28, 28, 0.45);
  background: rgba(28, 28, 28, 0.05);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.12);
}
.drop-zone:hover .drop-zone__icon, .drop-zone.dragover .drop-zone__icon {
  transform: translateY(-3px);
  background: rgba(28, 28, 28, 0.06);
  border-color: rgba(28, 28, 28, 0.4);
}

/* ══ 队列卡：有文件时现身 ══ */
.compress-queue {
  display: none;
  width: 100%;
  max-width: 920px;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #f7f4ed;
  border: 1px solid #eceae4;
}

.tool-main:has(.compress-grid:not(:empty)) .compress-queue {
  display: flex;
}

/* ══ 队列有文件：拖拽区收缩为单行“继续添加”条（空态保持现状）══
   compress/resize 用 .compress-grid；stitch 的 strip 常驻 hint 节点永不为空，
   改以真实缩略元素 .stitch-thumb 为判据；
   watermark/frame/palette 单图工具无列表，以预览画布现身（JS 加载成功后才去掉 hidden）为判据；
   cutout/mockup 同理以 .co-stage__canvas / .mk-stage__canvas 为判据 */
.tool-main:has(.compress-grid:not(:empty)) .drop-zone,
.tool-main:has(.stitch-thumb) .drop-zone,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-zone,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-zone,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-zone,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-zone,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-zone,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-zone {
  min-height: 0;
  padding: 13px 22px;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px;
  text-align: left;
  border-width: 1px;
}
.tool-main:has(.compress-grid:not(:empty)) .drop-zone::before,
.tool-main:has(.compress-grid:not(:empty)) .drop-zone__icon,
.tool-main:has(.compress-grid:not(:empty)) .drop-zone__pills,
.tool-main:has(.stitch-thumb) .drop-zone::before,
.tool-main:has(.stitch-thumb) .drop-zone__icon,
.tool-main:has(.stitch-thumb) .drop-zone__pills,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-zone__pills,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-zone__pills,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-zone__pills,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-zone__pills,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-zone__pills,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-zone::before,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-zone__icon,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-zone__pills {
  display: none;
}
.tool-main:has(.compress-grid:not(:empty)) .drop-zone p,
.tool-main:has(.stitch-thumb) .drop-zone p,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-zone p,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-zone p,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-zone p,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-zone p,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-zone p,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-zone p {
  font-size: 13.5px;
  white-space: nowrap;
}
.tool-main:has(.compress-grid:not(:empty)) .drop-hint,
.tool-main:has(.stitch-thumb) .drop-hint,
.tool-main:has(.wm-stage__canvas:not([hidden])) .drop-hint,
.tool-main:has(.fr-stage__canvas:not([hidden])) .drop-hint,
.tool-main:has(.pl-stage__canvas:not([hidden])) .drop-hint,
.tool-main:has(.ex-stage__canvas:not([hidden])) .drop-hint,
.tool-main:has(.co-stage__canvas:not([hidden])) .drop-hint,
.tool-main:has(.mk-stage__canvas:not([hidden])) .drop-hint {
  font-size: 11.5px;
  max-width: none;
}

/* ══ 信任信息双卡（引擎/隐私）：左列底部并排 ══ */
.compress-trust-row {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.compress-queue__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eceae4;
}

.compress-queue__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c1c1c;
  flex-shrink: 0;
}

.compress-queue__title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1c1c1c;
}

/* ══ 队列：单卡内扁平列表（hairline 分隔，不再行行套卡）══ */
.compress-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.compress-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  border-bottom: 1px solid #eceae4;
  transition: background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  animation: cv-card-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.compress-card:last-child {
  border-bottom: none;
}
.compress-card:hover {
  background: rgba(28, 28, 28, 0.03);
}
.compress-card.is-working {
  background: rgba(28, 28, 28, 0.04);
}
.compress-card.is-error {
  box-shadow: inset 2px 0 0 rgba(185, 28, 28, 0.55);
}
.compress-card.is-error .compress-card__state {
  color: #b91c1c;
}

.compress-card__thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f4ed;
  border: 1px solid #eceae4;
}
.compress-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compress-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compress-card__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.compress-card__name {
  flex: 1;
  min-width: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1c1c1c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compress-card__badge {
  flex-shrink: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(28, 28, 28, 0.8);
  background: rgba(28, 28, 28, 0.06);
  border-radius: 999px;
  padding: 2px 8px;
}

.compress-card__state {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(28, 28, 28, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compress-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.compress-card__actions .btn {
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(28, 28, 28, 0.62);
  transition: background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.compress-card__actions .btn:disabled {
  opacity: 0.35;
}
.compress-card__actions .btn:hover:not(:disabled) {
  background: rgba(28, 28, 28, 0.06);
  border: none;
  color: #1c1c1c;
  transform: none;
  box-shadow: none;
}
.compress-card__actions .compress-card__download:not(:disabled) {
  color: #1c1c1c;
  font-weight: 600;
}
.compress-card__actions .compress-card__remove {
  opacity: 0;
}
.compress-card__actions .compress-card__remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.compress-card:hover .compress-card__remove,
.compress-card:focus-within .compress-card__remove {
  opacity: 1;
}

@media (hover: none) {
  .compress-card__remove {
    opacity: 1;
  }
}
/* ══ 状态点 ══ */
.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #3A4150;
}
.status-dot.done {
  background: #1c1c1c;
}
.status-dot.working {
  background: #1c1c1c;
  animation: cv-pulse 1.5s infinite;
}

/* ══ 结果统计条（队列卡页脚）══ */
#compress-result-bar {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 2px;
  padding: 13px 2px 0;
  background: transparent;
  border: none;
  border-top: 1px solid #eceae4;
  border-radius: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(28, 28, 28, 0.62);
}
#compress-result-bar[hidden] {
  display: none;
}
#compress-result-bar strong,
#compress-result-bar .saved {
  color: rgba(28, 28, 28, 0.8);
  font-weight: 600;
}

/* ══ 侧栏 inspector：画布上浮起的参数面板 ══ */
.tool-sidebar {
  width: 380px;
  flex-shrink: 0;
  background: transparent;
  border-left: none;
  padding: 28px 28px 28px 0;
}

.cv-panel {
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #f7f4ed;
  border: 1px solid #eceae4;
}

.cv-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eceae4;
}

.cv-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1c1c1c;
}
.cv-panel__title svg {
  color: #1c1c1c;
  flex-shrink: 0;
}

.cv-panel__badge {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(28, 28, 28, 0.8);
  background: rgba(28, 28, 28, 0.05);
  border: 1px solid rgba(28, 28, 28, 0.15);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 控件组 */
.control-group {
  gap: 10px;
  /* 与 main.css 保持一致的 hidden 显隐保护：author display:flex 会盖掉 UA [hidden]{display:none}，
     此处再声明一次，使 convert 等复用 compress.css 的页面即便 main.css 陈旧也能正确隐藏 */
}
.control-group[hidden] {
  display: none;
}

.control-group.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.control-group.is-disabled .control-slider,
.control-group.is-disabled .control-label,
.control-group.is-disabled .cv-quality-badge {
  cursor: not-allowed;
}

.control-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.control-label {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1c1c1c;
}

.control-note {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 10.5px;
  color: rgba(28, 28, 28, 0.62);
  white-space: nowrap;
}

/* 参数下拉：替代原 cv-segment 纵向单选列表，节省侧栏空间 */
.cv-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 34px 9px 12px;
  border: 1px solid #dcd8cc;
  border-radius: 8px;
  background-color: #efece3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #1c1c1c;
  cursor: pointer;
  transition: border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-select:hover {
  border-color: rgba(28, 28, 28, 0.4);
}
.cv-select:focus-visible {
  outline: 2px solid rgba(28, 28, 28, 0.5);
  outline-offset: 1px;
}
.cv-select option {
  font-weight: 400;
  color: #1c1c1c;
}

/* 质量滑杆：4px 轨道 + 品牌填充 + 白芯拇指 */
.cv-quality-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1eee6;
  border: 1px solid #dcd8cc;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1c1c1c;
}
.cv-quality-badge #compress-quality-value {
  color: rgba(28, 28, 28, 0.8);
}
.cv-quality-badge em {
  font-style: normal;
  font-size: 10px;
  color: rgba(28, 28, 28, 0.62);
}

.control-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #1c1c1c 0%, #1c1c1c var(--fill, 80%), #e8e5dc var(--fill, 80%), #e8e5dc 100%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.control-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fcfbf8;
  border: 2px solid #1c1c1c;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.control-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}
.control-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fcfbf8;
  border: 2px solid #1c1c1c;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.control-slider::-moz-range-track {
  background: transparent;
}

.cv-slider-scale {
  display: flex;
  justify-content: space-between;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 10px;
  color: rgba(28, 28, 28, 0.62);
}
.cv-slider-scale .is-rec {
  color: rgba(28, 28, 28, 0.8);
  font-weight: 600;
}

/* 最长边：3×2 按钮矩阵 */
.cv-edge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cv-edge {
  position: relative;
  cursor: pointer;
}
.cv-edge input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.cv-edge span {
  display: block;
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  background: #efece3;
  border: 1px solid #eceae4;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #5f5f5d;
  transition: background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-edge:hover span {
  background: #f1eee6;
  color: #1c1c1c;
}
.cv-edge:has(input:checked) span {
  background: #f1eee6;
  border-color: rgba(28, 28, 28, 0.4);
  color: #1c1c1c;
  font-weight: 600;
}
.cv-edge:has(input:focus-visible) span {
  outline: 2px solid rgba(28, 28, 28, 0.5);
  outline-offset: 1px;
}

/* Actions: primary CTA matches crop (charcoal, Lovable inset) */
.compress-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid #eceae4;
}
.compress-actions[hidden] {
  display: none;
}
.compress-actions #btn-compress-start {
  background: #1c1c1c;
  border: 1px solid #1c1c1c;
  color: #fcfbf8;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 13px 16px;
  box-shadow: var(--shadow-inset-btn);
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.compress-actions #btn-compress-start:hover:not(:disabled) {
  background: #1c1c1c;
  border-color: #1c1c1c;
  color: #fcfbf8;
  filter: none;
  box-shadow: var(--shadow-inset-btn), var(--shadow-focus);
}
.compress-actions #btn-compress-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.compress-actions .cv-btn-secondary {
  background: #f7f4ed;
  border: 1px solid #dcd8cc;
  color: #1c1c1c;
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 14px;
}
.compress-actions .cv-btn-secondary:disabled {
  opacity: 0.4;
}
.compress-actions .cv-btn-secondary:hover:not(:disabled) {
  background: #f1eee6;
  border-color: #dcd8cc;
  color: #1c1c1c;
}
.compress-actions .cv-btn-quiet {
  background: transparent;
  border: 1px solid #eceae4;
  color: rgba(28, 28, 28, 0.62);
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 14px;
}
.compress-actions .cv-btn-quiet:disabled {
  opacity: 0.4;
}
.compress-actions .cv-btn-quiet:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.05);
  border-color: rgba(185, 28, 28, 0.25);
  color: #b91c1c;
}

.cv-start-note {
  margin: -2px 0 0;
  text-align: center;
  font-size: 10.5px;
  color: rgba(28, 28, 28, 0.62);
  line-height: 1.5;
}

/* ══ 引擎说明 + 隐私承诺 ══ */
.cv-engine-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #efece3;
  border: 1px solid #eceae4;
}
.cv-engine-card__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #1c1c1c;
}
.cv-engine-card__title svg {
  color: rgba(28, 28, 28, 0.8);
  flex-shrink: 0;
}
.cv-engine-card p {
  margin: 0;
  font-size: 11.5px;
  color: rgba(28, 28, 28, 0.62);
  line-height: 1.65;
}

.compress-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(28, 28, 28, 0.04);
  border: 1px solid #dcd8cc;
}
.compress-privacy-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: rgba(28, 28, 28, 0.8);
}
.compress-privacy-note strong {
  display: block;
  font-size: 12px;
  color: #1c1c1c;
  margin-bottom: 2px;
}
.compress-privacy-note p {
  margin: 0;
  font-size: 11.5px;
  color: #5f5f5d;
  line-height: 1.6;
}

/* Bottom SEO: styles from legal.css (shared with crop Bento) */
.tool-page-main {
  background: transparent;
}

/* ══ 动效降级 ══ */
@media (prefers-reduced-motion: reduce) {
  .compress-card {
    animation: none;
  }
  .drop-zone,
  .drop-zone .drop-zone__icon,
  .cv-live-badge__dot,
  .status-dot.working {
    animation: none;
    transition: none;
  }
}
/* ══ 响应式 ══ */
@media (max-width: 1080px) {
  .tool-page-body {
    flex-direction: column;
  }
  .tool-main {
    padding: 24px 24px 8px;
  }
  .tool-sidebar {
    width: 100%;
    padding: 8px 24px 28px;
  }
  .cv-panel {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 720px) {
  .tool-page-title {
    font-size: 19px;
  }
  .compress-trust-row {
    grid-template-columns: 1fr;
  }
  .tool-page-sub {
    font-size: 11px;
  }
  .tool-main {
    padding: 18px 16px 4px;
  }
  .tool-sidebar {
    padding: 8px 16px 24px;
  }
  .drop-zone {
    min-height: 230px;
    padding: 36px 20px;
  }
  .cv-segment__hint {
    display: none;
  }
  /* Narrow: actions under file info */
  .compress-card {
    flex-wrap: wrap;
  }
  .compress-card .compress-card__actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 2px;
  }
}
/* ══ 目标体积 / 快捷预设 / 元数据徽章 / 前后对比弹窗 ══ */
/* 预设 chips */
.cv-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-preset {
  padding: 7px 12px;
  border: 1px solid #dcd8cc;
  border-radius: 999px;
  background: #efece3;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #5f5f5d;
  cursor: pointer;
  transition: background 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-preset:hover {
  background: #f7f4ed;
  border-color: rgba(28, 28, 28, 0.4);
  color: #1c1c1c;
}

/* 压缩方式二段（质量优先 / 指定体积） */
.cv-mode-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #efece3;
}

.cv-mode {
  position: relative;
  cursor: pointer;
}
.cv-mode input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.cv-mode span {
  display: block;
  text-align: center;
  padding: 7px 4px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #5f5f5d;
  transition: background 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-mode.is-on span {
  background: #f7f4ed;
  color: #1c1c1c;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(28, 28, 28, 0.08);
}
.cv-mode:focus-within span {
  outline: 2px solid rgba(28, 28, 28, 0.4);
  outline-offset: 1px;
}

/* 目标体积输入行 */
.cv-target-row {
  display: flex;
  gap: 8px;
}

.cv-target-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #dcd8cc;
  border-radius: 8px;
  background: #efece3;
  font-family: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1c1c1c;
  transition: border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-target-input:focus {
  outline: none;
  border-color: rgba(28, 28, 28, 0.4);
}

.cv-select--unit {
  flex: 0 0 76px;
  width: 76px;
}

.cv-target-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(28, 28, 28, 0.62);
}

/* 必达模式开关 */
.cv-ensure {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  cursor: pointer;
}
.cv-ensure input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: #1c1c1c;
  cursor: pointer;
}
.cv-ensure span {
  font-size: 12px;
  line-height: 1.5;
  color: #5f5f5d;
}
.cv-ensure:hover span {
  color: #1c1c1c;
}

/* 全局压缩进度条（result-bar 内） */
.result-bar {
  flex-wrap: wrap;
}

.cv-progress {
  flex: 1 0 100%;
  height: 3px;
  border-radius: 999px;
  background: #e8e5dc;
  overflow: hidden;
}
.cv-progress[hidden] {
  display: none;
}
.cv-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #1c1c1c;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.compress-card__thumb {
  position: relative;
}
.compress-card__thumb[data-state=result]::after {
  content: "压后";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 500;
  color: #fdfaf4;
  background: rgba(28, 28, 28, 0.78);
  border-radius: 999px;
}

/* 卡片像素尺寸行 */
.compress-card__dims {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(28, 28, 28, 0.62);
}
.compress-card__dims[hidden] {
  display: none;
}

/* 体积对比可视化条：轨道=原图，填充=结果占比 */
.cv-sizebar {
  height: 4px;
  margin-top: 5px;
  border-radius: 999px;
  background: #e8e5dc;
  overflow: hidden;
}
.cv-sizebar[hidden] {
  display: none;
}
.cv-sizebar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #1c1c1c;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cv-sizebar i.is-up {
  background: #b91c1c;
}

/* 输入校验红字行（目标体积 / 自定义最长边共用） */
.cv-field-err {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #b91c1c;
}
.cv-field-err[hidden] {
  display: none;
}

/* 自定义最长边输入行（与 cv-target-row 同构，独立命名避免样式耦合） */
.cv-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cv-field-row[hidden] {
  display: none;
}

.cv-field-unit {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: #5f5f5d;
}

/* 质量试压预览行 */
.cv-preview {
  margin: 8px 0 0;
  padding: 6px 9px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5f5f5d;
  background: rgba(28, 28, 28, 0.04);
  border-radius: 6px;
}
.cv-preview[hidden] {
  display: none;
}

/* 压缩历史统计（纯本地） */
.cv-stats {
  margin: 10px 0 0;
  font-size: 11.5px;
  text-align: center;
  color: rgba(28, 28, 28, 0.62);
}
.cv-stats[hidden] {
  display: none;
}

/* 全页拖拽遮罩：默认不显示，body.cv-dragging 时浮现，点击穿透 */
.cv-drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(250, 247, 240, 0.72);
  outline: 3px dashed rgba(28, 28, 28, 0.45);
  outline-offset: -14px;
}
.cv-drag-overlay span {
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 500;
  color: #fdfaf4;
  background: rgba(28, 28, 28, 0.88);
  border-radius: 999px;
}

body.cv-dragging .cv-drag-overlay {
  display: flex;
}

/* 卡片元数据隐私徽章 */
.cv-meta-badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border: 1px solid #dcd8cc;
  border-radius: 999px;
  background: #f1eee6;
  font-size: 10px;
  font-weight: 500;
  color: rgba(28, 28, 28, 0.62);
  white-space: nowrap;
  cursor: help;
}

/* 幽灵按钮守卫：.btn 的 display:inline-flex 优先级高于 UA [hidden]{display:none}，
   必须显式压回，否则 hidden 的「对比/下载」仍可见可点（v2.15.0 验收实测） */
.compress-card__actions .btn[hidden] {
  display: none;
}

/* 前后对比弹窗 */
.cv-cmp {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cv-cmp[hidden] {
  display: none;
}

body.cv-cmp-open {
  overflow: hidden;
}

.cv-cmp__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 28, 0.55);
  backdrop-filter: blur(3px);
}

.cv-cmp__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1060px, 100%);
  max-height: 100%;
  border: 1px solid #eceae4;
  border-radius: 16px;
  background: #f7f4ed;
  box-shadow: 0 24px 64px -16px rgba(28, 28, 28, 0.4);
  overflow: hidden;
}

.cv-cmp__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eceae4;
}

.cv-cmp__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #1c1c1c;
}

.cv-cmp__sizes {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #5f5f5d;
}

.cv-cmp__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #5f5f5d;
  cursor: pointer;
}
.cv-cmp__close:hover {
  background: #efece3;
  color: #1c1c1c;
}

.cv-cmp__stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
  background: repeating-conic-gradient(#f1eee6 0% 25%, #f7f4ed 0% 50%) 0 0/22px 22px;
  cursor: crosshair;
  touch-action: none;
}

/* 两图与分割线同层缩放，% 坐标体系自洽 */
.cv-cmp__canvas {
  position: absolute;
  inset: 0;
  transform-origin: center;
  will-change: transform;
}

.cv-cmp__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.cv-cmp__img--after {
  clip-path: inset(0 0 0 50%);
}

.cv-cmp__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 6px rgba(28, 28, 28, 0.45);
  pointer-events: none;
}

.cv-cmp__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 28, 28, 0.35);
}
.cv-cmp__grip::after {
  content: "⇔";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #5f5f5d;
}

.cv-cmp__tag {
  position: absolute;
  top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.62);
  font-size: 11px;
  color: #fcfbf8;
  pointer-events: none;
}
.cv-cmp__tag--l {
  left: 10px;
}
.cv-cmp__tag--r {
  right: 10px;
}

.cv-cmp__foot {
  padding: 9px 16px;
  border-top: 1px solid #eceae4;
  font-size: 11px;
  color: rgba(28, 28, 28, 0.62);
  text-align: center;
}

/*# sourceMappingURL=compress.css.map */
