/* ============================================================
   澄图 · 移动端首页
   设计语言：Apple iOS × Google Material 3 × 独立工具产品
   轻 净 可信 现代 精致  克制用色  无大渐变  无廉价玻璃
   ============================================================ */
:root {
  /* 文字 */
  --text-main: #19223A;
  --text-sub: #6F7991;
  --text-weak: #9AA3B5;
  --text-title: #17213B;
  /* 品牌（石墨黑 + 唯一低饱和蓝点缀） */
  --brand: #242B3A;
  --brand-strong: #1B2130;
  --brand-deep: #1B2130;
  --brand-soft: #EEF1F6;
  --hl-blue: #4B78E6;
  /* 表面 */
  --bg: #F8FAFD;
  --card: #FFFFFF;
  --border: #E8EBF2;
  --shadow: 0 6px 24px rgba(27,39,94,0.05);
  --shadow-soft: 0 2px 10px rgba(27,39,94,0.04);
  /* 功能色 */
  --green: #34B37E;
  --blue: #3F8CF0;
  --purple: #8D6BF0;
  --orange: #E8A23B;
  --cyan: #35B6C9;
  /* 圆角 */
  --r-card: 22px;
  --r-card-sm: 18px;
  --r-btn: 15px;
  --r-pill: 999px;
  /* 间距 */
  --pad: 20px;
  --gap: 16px;
  --gap-lg: 22px;
  --font: "PingFang SC","SF Pro Display","Noto Sans SC","Microsoft YaHei",Inter,-apple-system,Arial,sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* 滚动条统一细/低调：桌面端极细，移动端隐藏 */
* { scrollbar-width: thin; scrollbar-color: rgba(27,39,94,.16) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(27,39,94,.16); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27,39,94,.28); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
@media (hover: none) {
  ::-webkit-scrollbar { width: 0; height: 0; display: none; }
  * { scrollbar-width: none; -ms-overflow-style: none; }
}
html,body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* 极轻微冷蓝环境光晕，只增空间感，透明度极低 */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(91,120,255,.06), transparent 60%),
    radial-gradient(520px 380px at -10% 40%, rgba(120,160,240,.05), transparent 55%);
}

.wrap { max-width: 480px; margin: 0 auto; padding: var(--pad); padding-top: 12px; padding-bottom: 40px; }

.hidden { display: none !important; }

/* ============================================================
   顶部导航
   ============================================================ */
.topbar {
  display: flex; align-items: center; gap: 0; height: 52px;
  padding-top: 8px; /* 预留状态栏视觉空间 */
}
.brand { font-size: 36px; font-weight: 800; letter-spacing: .5px; color: #18213A; line-height: 1; }
.brand span { color: var(--brand); }
.spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-sub); cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.icon-btn + .icon-btn { margin-left: 10px; }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
svg { display: block; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: 42px; }
.safe-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.7); border: 1px solid var(--border);
  color: #4B78E6; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-soft);
}
.safe-tag svg { width: 15px; height: 15px; }
.hero h1 {
  margin-top: 20px; font-size: 34px; font-weight: 800; line-height: 1.2;
  color: var(--text-title); /* 唯一强调 */
}
.hero h1 .hl { color: #4B78E6; font-weight: 800; }
.hero .lead { margin-top: 14px; font-size: 16px; line-height: 1.6; color: #6E7893; }

/* 顶部「全部工具」入口 */
.all-tools {
  height: 44px; padding: 0 15px; margin-right: 8px; border: none; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: #1B2130; color: #fff; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-soft);
  transition: transform .08s ease;
}
.all-tools svg { width: 16px; height: 16px; }
.all-tools:active { transform: scale(.96); }

/* 首页：信任横幅 + Hero CTA（石墨黑主按钮） */
.trust-banner {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  padding: 8px 14px; border-radius: var(--r-pill); width: auto;
  background: var(--card); border: 1px solid var(--border);
  color: #40506E; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-soft);
}
.trust-banner svg { width: 16px; height: 16px; }
.hp-hero { padding-top: 24px; }
.hp-hero h1 { margin-top: 18px; }
.hp-hero .lead { max-width: 460px; }
.cta-main {
  margin-top: 22px; width: 100%; height: 76px; border: none; border-radius: 20px;
  background: linear-gradient(180deg, #2A2F3A, #1B2130);
  color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  cursor: pointer; font-family: inherit; text-align: left;
  box-shadow: 0 16px 32px -12px rgba(20,28,50,.42);
  transition: transform .08s ease;
}
.cta-main:active { transform: scale(.985); }
.cta-plus {
  width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.12);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cta-plus svg { width: 22px; height: 22px; }
.cta-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; line-height: 1.25; }
.cta-txt b { font-size: 17px; font-weight: 700; }
.cta-txt i { font-style: normal; font-size: 12.5px; opacity: .74; }
.cta-arrow { width: 22px; height: 22px; opacity: .85; flex-shrink: 0; }

/* ============================================================
   首页 · 还原设计稿排版（黑色主题）
   ============================================================ */
.hp-hero { padding-top: 24px; }
.hp-hero .lead { max-width: 460px; }
/* Hero 标题 + 右侧叠卡插画 */
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero-copy { min-width: 0; flex: 1; }
.hero-copy h1 { margin-top: 0; font-size: 31px; line-height: 1.24; }
.hero-copy .hl { color: #4B78E6; font-weight: 800; }
.hlstar { width: 15px; height: 15px; color: #4B78E6; margin-left: 5px; display: inline-block; vertical-align: -1px; }
.hero-illus { position: relative; width: 124px; height: 124px; flex-shrink: 0; }
.hero-wave {
  width: 100%; height: 100%; object-fit: cover; border-radius: 18px;
  border: 1px solid rgba(23,33,59,.08); box-shadow: 0 14px 28px -12px rgba(27,39,94,.4);
  display: block;
  position: relative; z-index: 1;
}
.hero-wave-bg {
  position: absolute; z-index: 0; border-radius: 18px; overflow: hidden;
  top: -10px; left: -10px; width: 88%; height: 88%;
  opacity: .42; filter: brightness(.92) saturate(.92);
  box-shadow: 0 20px 36px -18px rgba(27,39,94,.5);
}
.hero-lock {
  position: absolute; right: 10px; bottom: 10px; width: 26px; height: 26px; padding: 5px;
  background: #1B2130; color: #fff; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.28); z-index: 2;
}
.hero-lock svg { width: 16px; height: 16px; }

/* 特色压缩卡 */
.feat-card {
  margin-top: 26px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-soft);
  cursor: pointer; transition: transform .08s ease;
}
.feat-card:active { transform: scale(.985); }
.fc-main { display: flex; align-items: flex-start; gap: 13px; }
.fc-ico {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: #1B2130; color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.fc-ico svg { width: 23px; height: 23px; }
.fc-txt { flex: 1; min-width: 0; }
.fc-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--text-title); }
.fc-title em {
  font-style: normal; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px;
  background: #EEF1F6; color: #4B78E6; font-weight: 600;
}
.fc-txt p { margin-top: 5px; font-size: 13px; color: #6E7893; }
.fc-go { display: inline-flex; align-items: center; gap: 3px; margin-top: 9px; font-size: 13px; font-weight: 600; color: #4B78E6; }
.fc-go svg { width: 15px; height: 15px; }
.fc-demo { margin-top: 15px; }
.demo-cmp {
  position: relative; width: 100%; height: 168px; overflow: hidden; border-radius: 14px;
  touch-action: none; user-select: none; -webkit-user-select: none; background: #0B101C; cursor: ew-resize;
}
.demo-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-cmp .demo-a { clip-path: inset(0 0 0 var(--p, 50%)); }
.demo-div {
  position: absolute; top: 0; bottom: 0; left: var(--p, 50%);
  width: 0; border-left: 2px solid #fff; box-shadow: 0 0 6px rgba(0,0,0,.5);
}
.demo-div span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 30px; height: 30px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
}
.demo-div span::before, .demo-div span::after {
  content: ""; position: absolute; width: 2px; height: 7px; border-radius: 2px; background: #1B2130;
}
.demo-div span::before { left: 11px; }
.demo-div span::after { right: 11px; }
.demo-labels { display: flex; justify-content: space-between; margin-top: 9px; font-size: 12.5px; color: #6E7893; font-weight: 600; }
.demo-labels span:last-child { color: #4B78E6; }
.demo-save {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(27,33,48,.82); box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

/* 功能网格 2×3 */
.feat-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fcell {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card-sm);
  padding: 16px 16px 15px; box-shadow: var(--shadow-soft);
  transition: transform .08s ease;
}
.fcell:active { transform: scale(.97); }
.fg-ico { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background-color: rgba(93,108,150,.09); }
.fg-ico svg { width: 22px; height: 22px; }
.fcell b { font-size: 15.5px; font-weight: 700; color: var(--text-title); margin-top: 2px; }
.fcell i { font-style: normal; font-size: 12px; color: #8A93A8; line-height: 1.3; }
.c-blue { color: #3F8CF0; }
.c-blue2 { color: #6C7BEA; }
.c-green { color: #34B37E; }
.c-purple { color: #8D6BF0; }
.c-orange { color: #E8A23B; }
.c-cyan { color: #35B6C9; }

/* 底部信任背书 三点 */
.trust-foot {
  margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.trust-foot > div { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.tf-ico { width: 34px; height: 34px; border-radius: 50%; background: #EEF1F6; color: #4B78E6; display: inline-flex; align-items: center; justify-content: center; }
.tf-ico svg { width: 18px; height: 18px; }
.trust-foot b { font-size: 13px; font-weight: 700; color: var(--text-main); }
.trust-foot i { font-style: normal; font-size: 11px; color: #9AA3B5; line-height: 1.3; }

/* 全部工具总览 */
.hub-grid {
  max-width: 640px; margin: 16px auto 0; padding: 0 20px; box-sizing: border-box;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.hub-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 18px 16px 16px; box-shadow: var(--shadow-soft);
  text-align: left; cursor: pointer; transition: transform .08s ease;
}
.hub-card:active { transform: scale(.97); }
.hub-ico {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--brand); position: relative;
}
.hub-ico.c-purple { background: #F1EDFE; color: var(--purple); }
.hub-ico.c-cyan { background: #E6F6FA; color: var(--cyan); }
.hub-ico.c-orange { background: #FBF0E1; color: var(--orange); }
.hub-ico svg { width: 22px; height: 22px; }
.hc-main { background: #EAF0FA; }
.hc-main span {
  position: absolute; top: -6px; right: -8px; font-size: 9.5px; font-weight: 700; color: #fff;
  background: var(--brand); border-radius: 999px; padding: 2px 7px;
}
.hub-card b { margin-top: 12px; font-size: 16px; font-weight: 700; color: #1D2742; display: block; }
.hub-card p { margin-top: 3px; font-size: 12.5px; color: #727D96; }
.hub-go { position: absolute; right: 12px; bottom: 14px; color: #A0AABC; }
.hub-go svg { width: 18px; height: 18px; }

/* 压缩工作台（cTool 内子元素居中收窄） */
#cTool > .dropzone-card,
#cTool > .grid,
#cTool > .dl-all {
  max-width: 640px; margin-left: auto; margin-right: auto;
  padding-left: 20px; padding-right: 20px; box-sizing: border-box;
}
#cTool > .dropzone-card { margin-top: 16px; }

/* ============================================================
   四个隐私价值标签
   ============================================================ */
.trust-row { display: flex; gap: 10px; margin-top: 24px; }
.t-chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-soft);
  font-size: 13.5px; font-weight: 500; color: #3A4461; white-space: nowrap;
  overflow: hidden; min-width: 0;
}
.t-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-chip svg { width: 17px; height: 17px; flex-shrink: 0; }
.c-green { color: var(--green); }
.c-blue { color: var(--blue); }
.c-purple { color: var(--purple); }
.c-orange { color: var(--orange); }
.c-cyan { color: var(--cyan); }

/* ============================================================
   核心功能大卡：图片压缩
   ============================================================ */
.core-card {
  display: flex; margin-top: 26px; position: relative; overflow: hidden;
  min-height: 200px; border-radius: 23px;
  background: #F2F7FF;
  box-shadow: var(--shadow);
  cursor: pointer;
  /* 极柔和径向蓝光晕 */
  background-image: radial-gradient(220px 220px at 120% 20%, rgba(120,165,255,.18), rgba(120,165,255,0) 70%);
  border: 1px solid #E3EEFF;
}
.core-left { flex: 1 1 58%; padding: 22px 6px 22px 24px; display: flex; flex-direction: column; align-items: flex-start; z-index: 1; }
.core-title { display: flex; align-items: center; gap: 9px; }
.core-ico {
  width: 38px; height: 38px; border-radius: 11px; background: rgba(36,43,58,.06);
  display: inline-flex; align-items: center; justify-content: center; color: var(--brand);
}
.core-ico svg { width: 21px; height: 21px; }
.core-title h2 { font-size: 22px; font-weight: 700; color: #1A2540; line-height: 1; }
.core-flag {
  font-size: 11px; font-weight: 600; color: #4B78E6; background: #E7EEFB;
  border-radius: var(--r-pill); padding: 3px 9px; white-space: nowrap;
}
.core-desc { margin-top: 12px; font-size: 14px; line-height: 1.5; color: #68748F; }
.core-btn {
  margin-top: 18px; height: 52px; padding: 0 26px; border: none; border-radius: 16px;
  background: linear-gradient(180deg, #2A2F3A, #1B2130);
  color: #fff; font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 22px -8px rgba(20,28,50,.28);
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; font-family: inherit; transition: transform .08s ease;
}
.core-btn:active { transform: scale(.97); }
.btn-arrow { width: 18px; height: 18px; }

/* 右侧：压缩前后图片视觉 */
.core-right {
  flex: 0 0 42%; padding: 22px 14px 22px 4px; display: flex; align-items: flex-end; justify-content: center;
}
.photo-pair { position: relative; width: 100%; height: 100%; min-height: 150px; }
.photo { position: absolute; border: 2px solid #fff; box-shadow: 0 6px 16px rgba(27,39,94,.16); border-radius: 12px; overflow: hidden; }
.photo .photo-img { width: 100%; height: 100%; }
.photo .ptag {
  position: absolute; left: 5px; bottom: 5px; font-size: 10.5px; font-weight: 600; color: #fff;
  background: rgba(20,28,50,.5); padding: 1px 7px; border-radius: 7px; backdrop-filter: blur(2px);
}
.photo.big { width: 96px; height: 124px; top: 6px; right: 30px; transform: rotate(-5deg); z-index: 2; }
.photo.small { width: 74px; height: 92px; right: 2px; bottom: 4px; transform: rotate(4deg); z-index: 3; }
.p1 { background: linear-gradient(160deg,#B8D8F2 0%,#F2F7FB 55%,#9FC3E8 100%); position: relative; }
.p1::before { content:""; position:absolute; width: 120%; height: 24px; background:#fff; border-radius:50%; left:-12%; top:38%; opacity:.85; }
.p1::after { content:""; position:absolute; left:0; bottom:0; width:120%; height:46%; background: linear-gradient(180deg,#A9C7EA,#7FA8D6); clip-path: polygon(0 30%, 25% 15%, 45% 34%, 65% 20%, 100% 38%, 100% 100%, 0 100%); }
.p2 { background: linear-gradient(165deg,#DDEBFA 0%,#F4F9FF 50%,#C8E2F3 100%); position: relative; }
.p2::before { content:""; position:absolute; width: 110%; height: 20px; background:#fff; border-radius:50%; left:-8%; top:42%; opacity:.9; }
.p2::after { content:""; position:absolute; left:0; bottom:0; width:110%; height:44%; background: linear-gradient(180deg,#BBD4EE,#93B8DD); clip-path: polygon(0 34%, 20% 18%, 40% 36%, 60% 22%, 100% 40%, 100% 100%, 0 100%); }
.arc { position: absolute; right: 30px; bottom: 34px; z-index: 1; opacity: .9; }

/* ============================================================
   三个次级工具卡片
   ============================================================ */
.tool-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.tool-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card-sm);
  padding: 15px 12px 13px; display: flex; flex-direction: column; text-align: left;
  cursor: pointer; min-height: 152px; transition: transform .08s ease;
}
.tool-card:active { transform: scale(.97); }
.tool-ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tool-ico.c-purple { background: #F1EDFE; }
.tool-ico.c-cyan { background: #E6F6FA; }
.tool-ico.c-orange { background: #FBF0E1; }
.tool-ico svg { width: 21px; height: 21px; }
.tool-card h3 { margin-top: 9px; font-size: 16px; font-weight: 650; color: #1D2742; line-height: 1.2; }
.tool-card p {
  margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: #727D96;
  flex: 1; min-height: 34px;
}
.soon-flag {
  margin-top: 9px; align-self: flex-start; font-size: 11px; font-weight: 500; color: #858DA1;
  background: #F0F2F6; border-radius: var(--r-pill); padding: 2px 9px;
}

/* ============================================================
   工作台：上传 + 配置 + 结果
   ============================================================ */
.workspace { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }

.dropzone-card {
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-soft);
  padding: 12px; cursor: pointer;
}
.dropzone-card.drag { box-shadow: 0 0 0 2px var(--brand); }
.dropzone-card > * { border-radius: 16px; }
.dropzone-card > .add-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 190px; border: 1.5px dashed #9EBBFF; background: transparent;
  cursor: pointer; font-family: inherit; padding: 20px; gap: 6px;
}
.dropzone-card.drag > .add-btn { border-style: solid; background: #F5FAFF; }
.add-btn .dz-plus {
  width: 50px; height: 50px; border-radius: 50%; background: var(--card);
  box-shadow: 0 4px 14px rgba(20,28,50,.16);
  display: inline-flex; align-items: center; justify-content: center; color: var(--brand);
}
.add-btn svg { width: 24px; height: 24px; }
.dz-main { font-size: 17px; font-weight: 650; color: #202A43; }
.dz-sub { font-size: 12.5px; color: #78839C; }
.dz-safe { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #9AA2B3; margin-top: 8px; }
.dz-safe svg { width: 13px; height: 13px; }
.c-green { color: var(--green); }

.config { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-soft); }
.panel-head { font-size: 14px; font-weight: 700; color: var(--text-sub); letter-spacing: .3px; }
.mode-tabs { display: flex; gap: 8px; margin: 12px 0 14px; }
.tab {
  flex: 1; text-align: center; font-size: 13.5px; padding: 9px 0;
  border-radius: 12px; background: #F3F5F9; color: var(--text-sub); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab.active { background: var(--brand-strong); color: #fff; font-weight: 600; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.label-row label { font-size: 13px; font-weight: 600; color: #3A4461; }
.label-row output { font-size: 13px; color: var(--brand); font-weight: 700; }
input[type=range] { width: 100%; accent-color: var(--brand); }
input[type=number] {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; font-size: 14px; color: var(--text-main);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { display: block; margin-top: 6px; font-size: 11px; color: var(--text-weak); }
.btn-main {
  width: 100%; height: 52px; border: none; border-radius: var(--r-btn);
  background: linear-gradient(180deg, #2A2F3A, #1B2130); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 22px -8px rgba(20,28,50,.30);
}
.btn-main:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.list-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  font-size: 13px; color: var(--text-sub); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-card-sm); box-shadow: var(--shadow-soft);
}
.list-head b { color: var(--text-main); }
.ghost { flex: 1; }
.tool {
  border: 1px solid var(--border); background: #fff; color: var(--text-sub);
  border-radius: 10px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.tool:disabled { opacity: .45; cursor: not-allowed; }
.tool.danger { color: #D9413E; border-color: #F0D7D6; }
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.thumb {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  background: #F3F5F9; aspect-ratio: 1/1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .idx, .thumb .sz {
  position: absolute; font-size: 11px; color: #fff; background: rgba(20,28,50,.5);
  border-radius: 7px; padding: 1px 7px; backdrop-filter: blur(2px);
}
.thumb .idx { left: 6px; bottom: 6px; }
.thumb .sz { right: 6px; top: 6px; }
.thumb input[type=checkbox] {
  position: absolute; right: 6px; bottom: 6px; width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer;
}

.result { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow-soft); }
.progress { margin-bottom: 14px; }
.bar { height: 8px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,var(--brand),#4B78E6); transition: width .2s ease; }
.progress p { font-size: 12px; color: var(--text-sub); margin-top: 7px; }
.r-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.r-head b { font-size: 15px; color: var(--text-main); }
.r-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.r-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-soft); }
.r-img { position: relative; cursor: zoom-in; }
.r-img img { width: 100%; height: 190px; object-fit: contain; background: #1B2436; display: block; }
.r-img::after {
  content: '点按对比原图 · 左右拖动'; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  font-size: 11px; color: #fff; background: rgba(0,0,0,.55); border-radius: 8px; padding: 2px 9px; opacity: .8; white-space: nowrap;
}
.r-img.comparing::after { display: none; }
/* 滑块对比 */
.cmp { position: absolute; inset: 0; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; z-index: 4; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1B2436; }
.cmp .cmp-a { z-index: 1; }
.cmp .cmp-b { z-index: 2; clip-path: inset(0 calc(100% - var(--p, 50%)) 0 0); }
.cmp-div { position: absolute; top: 0; bottom: 0; left: var(--p, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); z-index: 3; }
.cmp-div i { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.28); }
.cmp-div i::before, .cmp-div i::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 5px solid transparent; }
.cmp-div i::before { right: 12px; border-right-color: #24304A; transform: translateY(-50%); }
.cmp-div i::after { left: 12px; border-left-color: #24304A; transform: translateY(-50%); }
.cmp-tag { position: absolute; top: 9px; z-index: 3; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(15,20,32,.6); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
.cmp-tag.t-o { left: 10px; }
.cmp-tag.t-c { right: 10px; }
.r-meta { padding: 11px 12px; }
.r-meta .vals { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-sub); gap: 8px; flex-wrap: wrap; }
.r-size { font-variant-numeric: tabular-nums; }
.r-delta { font-size: 12px; font-weight: 600; }
.r-delta.up { color: #D97706; }
.r-delta.down { color: var(--green); }
.r-meta .act { display: flex; gap: 8px; margin-top: 10px; }
.r-meta .act button {
  flex: 1; padding: 10px; border: 1px solid var(--border); background: #fff; color: var(--text-main);
  border-radius: 12px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.dl-all {
  width: 100%; margin-top: 14px; height: 52px; border: none; border-radius: var(--r-btn);
  background: linear-gradient(180deg,#2A2F3A,#1B2130); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.dl-all svg { width: 18px; height: 18px; }

/* ============================================================
   底部品牌
   ============================================================ */
footer { margin-top: 48px; text-align: center; padding-bottom: 16px; }
footer .f1 { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #7B859B; }
footer .f1 .f-ico { width: 14px; height: 14px; color: #9AA8C0; }
footer .f2 { margin-top: 8px; font-size: 11.5px; color: #9AA2B3; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: rgba(25,34,58,.94); color: #fff; font-size: 13px;
  padding: 11px 18px; border-radius: var(--r-pill); z-index: 99; max-width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

/* ============================================================
   响应式与排版优化
   ============================================================ */

/* 超高窄屏 / iPhone SE 等：收紧间距与字号 */
@media (max-width: 359px) {
  :root { --pad: 16px; --gap: 12px; }
  .wrap { padding-top: 10px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 30px; }
  .hero .lead { font-size: 15px; }
  .trust-row { gap: 7px; }
  .t-chip { font-size: 12.5px; padding: 0 4px; }
  .core-left { padding-left: 18px; }
  .core-btn { height: 48px; font-size: 15px; padding: 0 20px; }
  .core-right { flex-basis: 40%; }
  .photo.big { width: 84px; height: 112px; }
  .photo.small { width: 64px; height: 82px; }
  .tool-card { padding: 13px 10px; min-height: 144px; }
  .tool-card h3 { font-size: 15px; }
  .hero-illus { width: 88px; height: 88px; }
  .hero-copy h1 { font-size: 26px; }
  .demo-cmp { height: 140px; }
}

/* 窄屏：Hero 插图收窄，标题不拥挤 */
@media (max-width: 420px) {
  .hero-illus { width: 100px; height: 100px; }
  .hero-copy h1 { font-size: 28px; }
  .hero-row { gap: 10px; }
  .demo-cmp { height: 150px; }
}

/* 平板 / 桌面 & 横屏：内容加宽，次级卡与结果卡多列排布 */
@media (min-width: 640px) {
  .wrap { max-width: 720px; padding: 16px 28px 48px; }
  .topbar { height: 56px; }
  .brand { font-size: 40px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 40px; }
  .hero .lead { font-size: 17px; max-width: 440px; }

  /* 核心大卡：横排内容更舒展 */
  .core-card { min-height: 216px; }
  .core-left { padding: 26px 10px 26px 30px; }
  .core-title h2 { font-size: 24px; }
  .core-desc { font-size: 15px; }
  .core-btn { height: 56px; font-size: 17px; }
  .photo.big { width: 108px; height: 138px; }
  .photo.small { width: 84px; height: 102px; }

  /* 次级卡：缓和三列约束，卡片更高 */
  .tool-card { min-height: 168px; padding: 18px 15px 15px; }
  .tool-card h3 { font-size: 17px; }
  .tool-card p { font-size: 13px; }

  /* 结果卡：两列网格，充分利用宽度 */
  .r-grid { grid-template-columns: repeat(2, 1fr); }
  .r-img img { height: 240px; }

  /* 已选缩略图：更密更顺的网格 */
  .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* 大桌面：进一步放宽，但内容区不拉满避免过于空旷 */
@media (min-width: 900px) {
  .wrap { max-width: 820px; }
  .hero h1 { font-size: 42px; }
  .tool-row { gap: 14px; }
  .grid { grid-template-columns: repeat(6, 1fr); }
}

/* 减少动效偏好的用户体验 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   全屏功能工作区（批量加水印）
   ============================================================ */
.toolview {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* 顶栏：返回 + 标题 + 隐私标签 */
.tv-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  height: 62px; padding: 8px 20px 8px 14px; box-sizing: border-box;
  background: rgba(248,250,253,.85); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.tv-back {
  width: 42px; height: 42px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-main); cursor: pointer; box-shadow: var(--shadow-soft); flex-shrink: 0;
}
.tv-back svg { width: 20px; height: 20px; }
.tv-top-title { display: flex; flex-direction: column; gap: 1px; }
.tv-top-title h2 { font-size: 17px; font-weight: 700; color: var(--text-title); line-height: 1.25; }
.tv-top-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--brand); font-weight: 500; }
.tv-top-tag svg { width: 11px; height: 11px; }
.tv-spacer { flex: 1; }

/* 上传区容器统一内边距 */
.toolview > section, .toolview .tv-body, .toolview .tv-footer { padding-left: 20px; padding-right: 20px; max-width: 640px; margin-left: auto; margin-right: auto; box-sizing: border-box; }

/* 初始大拖拽区 */
.tv-drop {
  margin-top: 20px; padding: 44px 20px; border-radius: var(--r-card);
  border: 1.5px dashed #9EBBFF; background: var(--card);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; box-shadow: var(--shadow-soft);
}
.tv-drop.drag { background: var(--brand-soft); border-color: var(--brand); }
.tv-drop-ico { width: 32px; height: 32px; }
.tv-drop-main { font-size: 16px; font-weight: 650; color: #202A43; }
.tv-drop-sub { font-size: 12.5px; color: #78839C; }

/* 横向缩略图条 */
.tv-strip { margin-top: 16px; display: flex; align-items: center; gap: 10px; }
.strip-track { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1; }
.strip-track::-webkit-scrollbar { display: none; }
.strip-item {
  position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  flex-shrink: 0; border: 2px solid transparent; cursor: pointer; background: #E8ECF4;
}
.strip-item.current { border-color: var(--brand); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-item .idx { position: absolute; left: 4px; bottom: 3px; font-size: 10px; color: #fff; background: rgba(0,0,0,.45); padding: 0 4px; border-radius: 6px; }
.strip-item .del {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.strip-item .del svg { width: 10px; height: 10px; }
.strip-more {
  width: 64px; height: 64px; border-radius: 12px; border: 1.5px dashed #B9C6E4; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--brand); cursor: pointer; background: #FBFCFF; font-size: 10px;
}
.strip-more .plus { font-size: 22px; font-weight: 300; line-height: 1; }
.strip-count { flex-shrink: 0; font-size: 12px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.strip-clear {
  flex-shrink: 0; font-size: 12px; color: var(--text-weak); border: 1px solid var(--border);
  background: var(--card); border-radius: 9px; padding: 5px 9px; cursor: pointer;
}
.strip-clear:hover { color: #D9534F; border-color: #F3C4C2; }

/* 主体壳 */
.tv-body { margin-top: 16px; }

/* 紧凑预览 */
.tv-preview { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-soft); }
.pv-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: 13.5px; font-weight: 700; color: var(--text-main);
  border-bottom: 1px solid var(--border);
}
.pv-cur { font-size: 12px; color: var(--brand); font-weight: 600; }
.pv-frame { padding: 12px; display: flex; align-items: center; justify-content: center; background: #0E1420; }
#pvCanvas { max-width: 100%; max-height: 240px; border-radius: 8px; display: block; }

/* 设置面板 */
.tv-panel { margin-top: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow-soft); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ph-title { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text-title); }
.ph-title svg { width: 17px; height: 17px; color: var(--brand); }
.ph-reset { font-size: 13px; color: var(--text-weak); background: none; border: none; cursor: pointer; }
.ph-reset:hover { color: var(--brand); }

.wm-type { display: flex; gap: 8px; margin-bottom: 14px; }
.wm-tab { flex: 1; padding: 9px 0; text-align: center; font-size: 13.5px; border-radius: 12px; background: #F3F5F9; color: var(--text-sub); border: 1px solid transparent; cursor: pointer; transition: all .18s ease; }
.wm-tab.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; border-color: #D5E2FF; }
.wm-field { margin-bottom: 14px; }
.wm-field:last-child { margin-bottom: 0; }
.wm-field > label, .wm-field .label-row label { display: block; font-size: 13px; font-weight: 600; color: #3A4461; margin-bottom: 8px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row output { font-size: 12px; color: var(--brand); font-weight: 700; }
.wm-input-wrap { position: relative; }
.wm-field input[type=text] {
  width: 100%; padding: 11px 34px 11px 12px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; color: var(--text-main); box-sizing: border-box;
}
.wm-field input[type=text]:focus { outline: none; border-color: var(--brand); }
.wm-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: none; background: #EEF1F7;
  color: var(--text-weak); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.wm-clear svg { width: 11px; height: 11px; }
.wm-font { display: flex; gap: 6px; margin-top: 8px; }
.wm-font button { flex: 1; padding: 7px 0; font-size: 12.5px; background: #F7F9FC; border: 1px solid var(--border); border-radius: 9px; color: var(--text-sub); cursor: pointer; }
.wm-font button.active { background: var(--brand-soft); color: var(--brand); border-color: #D5E2FF; font-weight: 600; }
.wm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wm-row input[type=range] { width: 100%; }
.wm-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wm-pos button {
  padding: 8px 0; font-size: 12px; background: #F7F9FC; border: 1px solid var(--border);
  border-radius: 9px; color: var(--text-sub); cursor: pointer; transition: all .15s ease;
}
.wm-pos button.active { background: var(--brand-soft); color: var(--brand); border-color: #D5E2FF; font-weight: 600; }
.wm-toggle-row { display: flex; align-items: center; justify-content: space-between; }
.wm-toggle-row label { margin-bottom: 0 !important; }
.wm-switch {
  width: 48px; height: 28px; border-radius: 999px; background: #E4E7EF; border: none;
  position: relative; cursor: pointer; transition: background .2s ease;
}
.wm-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease; }
.wm-switch[data-on="1"] { background: var(--brand); }
.wm-switch[data-on="1"] i { transform: translateX(20px); }
.wm-upload-img {
  width: 100%; padding: 12px; border-radius: 12px; background: #F7F9FC; border: 1px dashed #B9C6E4;
  color: var(--text-sub); font-size: 13px; cursor: pointer;
}
.wm-upload-img:hover { border-color: var(--brand); color: var(--brand); }
#wmImagePreview { width: 56px; height: 56px; object-fit: contain; margin-top: 8px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; }
.wm-scope { display: flex; gap: 8px; }
.wm-scope button { flex: 1; padding: 8px 0; font-size: 13px; background: #F7F9FC; border: 1px solid var(--border); border-radius: 10px; color: var(--text-sub); cursor: pointer; }
.wm-scope button.active { background: var(--brand-soft); color: var(--brand); border-color: #D5E2FF; font-weight: 600; }

/* ============================================================
   尺寸预设工作区
   ============================================================ */
.rs-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-scene {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 14px; border-radius: 14px; background: #F7F9FC;
  border: 1.5px solid var(--border); cursor: pointer; text-align: left;
  transition: all .18s ease; font-family: inherit;
}
.rs-scene b { font-size: 13.5px; color: var(--text-main); font-weight: 700; }
.rs-scene span { font-size: 11px; color: var(--text-weak); }
.rs-scene.active { border-color: var(--brand); background: var(--brand-soft); }
.rs-scene.active b { color: var(--brand); }
.rs-settings { margin-top: 14px; }
.rs-mode { display: flex; gap: 8px; margin-bottom: 16px; }
.rs-mode button {
  flex: 1; padding: 9px 0; font-size: 12.5px; background: #F7F9FC;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text-sub); cursor: pointer;
  transition: all .15s ease; font-family: inherit;
}
.rs-mode button.active { background: var(--brand-soft); color: var(--brand); border-color: #D5E2FF; font-weight: 600; }
.rs-focus > label { display: block; font-size: 13px; font-weight: 600; color: #3A4461; margin-bottom: 8px; }
.rs-focus-tip { font-size: 12px; color: var(--text-weak); margin: -2px 0 10px; line-height: 1.5; }
.rs-focus-row { display: flex; gap: 8px; margin-bottom: 10px; }
.rs-focus-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #F0F5FF; border: 1px solid #C9D8F7; color: var(--brand); border-radius: 10px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.rs-focus-btn svg { width: 15px; height: 15px; }
.rs-focus-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.rs-focus-clear { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text-weak); font-size: 13px; cursor: pointer; }
.rs-focus-stage {
  position: relative; width: 100%; border-radius: 12px; overflow: hidden;
  background: #ECF0F7; border: 1px solid var(--border); cursor: crosshair;
}
#rsFocusCanvas { display: block; width: 100%; height: auto; background: #fff; }
.rs-focus-dot {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand), 0 2px 6px rgba(0,0,0,.3);
  background: rgba(63,120,255,.4); pointer-events: none;
}
.rs-focus-dot::before, .rs-focus-dot::after {
  content: ''; position: absolute; background: #fff;
}
.rs-focus-dot::before { left: 50%; top: -7px; bottom: -7px; width: 2px; transform: translateX(-50%); }
.rs-focus-dot::after { top: 50%; left: -7px; right: -7px; height: 2px; transform: translateY(-50%); }
.rs-focus-tag {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: #fff; background: rgba(43,110,255,.88); border-radius: 8px; padding: 3px 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18); pointer-events: none; white-space: nowrap;
}
.rs-focus-current { margin-top: 8px; font-size: 12px; color: var(--text-sub); }

.rs-out { margin-top: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; box-shadow: var(--shadow-soft); }
.rs-out .panel-head { margin-bottom: 2px; }
.rs-out-n { font-size: 12px; color: var(--brand); font-weight: 700; cursor: pointer; }
.rs-out-hint {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 10px;
  background: #F1F5FF; border: 1px solid #DCE7FF; border-radius: 10px;
  font-size: 11.5px; color: #4A6BD6; line-height: 1.45;
}
.rs-out-hint b { color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-out-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rs-out-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; background: #F7F9FC; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 12.5px; color: var(--text-sub); cursor: pointer; transition: all .15s ease; user-select: none;
}
.rs-out-item.can { padding: 9px 8px 9px 5px; }
.rs-out-item .ck {
  width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid #C2CBDD; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: all .15s ease;
}
.rs-out-item .ck svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.rs-out-item.on { border-color: #CFE1FF; background: var(--brand-soft); }
.rs-out-item.on .ck { background: var(--brand); border-color: var(--brand); }
.rs-out-item.on .ck svg { opacity: 1; }
.rs-out-item b { color: var(--text-main); font-size: 13px; flex: 1; }
.rs-out-item .sz { font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 600; }
.rs-out-thumb {
  height: 42px; width: auto; object-fit: contain; border-radius: 7px;
  border: 1px solid var(--border); background: #ECF0F7; flex: 0 0 auto;
  box-shadow: var(--shadow-soft); cursor: zoom-in;
}
.rs-out-thumb:hover { border-color: var(--brand); }
.rs-out-toggle {
  width: 100%; margin-top: 10px; padding: 9px 0; background: #F7F9FC; border: 1px dashed #C2CBDD;
  border-radius: 10px; color: var(--text-weak); font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.rs-out-toggle:hover { color: var(--brand); border-color: var(--brand); }

/* ===== 自由裁剪编辑器 ===== */
.rs-free { padding: 0 20px; max-width: 760px; margin: 0 auto; box-sizing: border-box; }
.rs-free .tv-panel { margin-top: 14px; }
.rs-free-act { display: inline-flex; gap: 6px; }
.rs-crop-stage { position: relative; margin-top: 10px; border-radius: 14px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair;
  background: #0B101C; line-height: 0;
}
.rs-crop-stage canvas { display: block; width: 100%; border-radius: 0; }
.rs-crop-bg { position: absolute; box-shadow: 0 0 0 9999px rgba(4,8,18,.55); pointer-events: none; }
.rs-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 14px rgba(0,0,0,.28);
  cursor: move; box-sizing: border-box; }
.rs-crop-box .hd { position: absolute; width: 18px; height: 18px; pointer-events: auto; }
.rs-crop-stage .h-tl { left: -9px; top: -9px; cursor: nwse-resize; }
.rs-crop-stage .h-tr { right: -9px; top: -9px; cursor: nesw-resize; }
.rs-crop-stage .h-bl { left: -9px; bottom: -9px; cursor: nesw-resize; }
.rs-crop-stage .h-br { right: -9px; bottom: -9px; cursor: nwse-resize; }
.rs-crop-stage .h-t { left: 50%; top: -9px; margin-left: -9px; cursor: ns-resize; }
.rs-crop-stage .h-b { left: 50%; bottom: -9px; margin-left: -9px; cursor: ns-resize; }
.rs-crop-stage .h-l { top: 50%; left: -9px; margin-top: -9px; cursor: ew-resize; }
.rs-crop-stage .h-r { top: 50%; right: -9px; margin-top: -9px; cursor: ew-resize; }
.rs-crop-tag { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: rgba(6,12,26,.78); color: #fff; font-size: 12px; padding: 5px 11px; border-radius: 999px;
  pointer-events: none; font-variant-numeric: tabular-nums; z-index: 2; line-height: 1.4; }

/* 结果按图分组横排 */
.rs-group { margin-top: 16px; }
.rs-group-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rs-group-h .g-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.rs-group-h .g-t { font-size: 13px; font-weight: 700; color: var(--text-main); }
.rs-group-h .g-s { font-size: 11px; color: var(--text-weak); }
.rs-group-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs-mini {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-soft); cursor: zoom-in;
}
.rs-mini .m-img { position: relative; }
.rs-mini .m-img img { width: 100%; height: 96px; object-fit: contain; background: #F1F4FA; display: block; }
.rs-mini .m-img .m-sz {
  position: absolute; right: 4px; bottom: 4px; font-size: 9.5px; color: #fff; background: rgba(20,28,48,.62);
  padding: 2px 5px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.rs-mini .m-t { padding: 7px 8px; }
.rs-mini .m-t .m-name { font-size: 11.5px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-mini .m-t .m-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rs-mini .m-t .m-size { font-size: 11px; color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-mini .m-dl {
  width: 26px; height: 26px; border: none; background: var(--brand-soft); color: var(--brand); border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.rs-mini .m-dl svg { width: 14px; height: 14px; }

/* 大图放大查看 lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox-mask { position: absolute; inset: 0; background: rgba(18,24,40,.72); }
.lightbox-card {
  position: relative; background: #fff; border-radius: 18px; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; z-index: 2; border: none;
  background: rgba(20,28,48,.6); color: #fff; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-body { display: flex; flex-direction: column; align-items: center; padding: 18px 18px 0; overflow: auto; }
.lightbox-body img { max-width: 100%; max-height: 66vh; object-fit: contain; border-radius: 10px; }
.lightbox-meta { margin-top: 10px; font-size: 13px; color: var(--text-sub); text-align: center; }
.lightbox-btn { padding: 14px 18px 18px; }
.lightbox-btn .dl {
  width: 100%; height: 46px; border: none; border-radius: 12px; background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.lightbox-btn .lb-note {
  display: block; text-align: center; padding: 12px 4px; font-size: 12.5px;
  color: var(--text-sub); line-height: 1.5;
}

/* 快速预设 */
.tv-presets { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 12px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); cursor: pointer; text-align: center; transition: all .18s ease;
}
.preset-card:hover { border-color: #C9D8F7; }
.preset-card svg { width: 20px; height: 20px; color: var(--brand); margin-bottom: 2px; }
.preset-card b { font-size: 12.5px; color: var(--text-main); }
.preset-card span { font-size: 10px; color: var(--text-weak); }

/* 数量提示条 */
.tv-limit { margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: #FFF7E9; color: #B26A00; font-size: 12px; text-align: center; }

/* 底部操作 */
.tv-footer { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.wm-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-sub); padding-left: 2px; }
.wm-auto input { accent-color: var(--brand); width: 15px; height: 15px; }

/* 结果 */
.tv-result { margin-top: 4px; }
.tv-actions { margin-top: 14px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 10px; }
.btn-secondary {
  height: 50px; border-radius: var(--r-btn); background: var(--card);
  border: 1px solid var(--border); color: var(--text-sub); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* 进度完成态文字 */
.progress.done p { color: var(--green); font-weight: 600; }

/* 主按钮在工具内给 .btn-main 统一样式，避免污染结果区 */
.toolview .btn-main:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   格式转换工作区
   ============================================================ */
.cv-fmt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.cv-fmt-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 4px 12px; border-radius: 14px; background: #F7F9FC;
  border: 1.5px solid var(--border); cursor: pointer; text-align: center;
  transition: all .18s ease; font-family: inherit;
}
.cv-fmt-item b { font-size: 17px; font-weight: 800; color: var(--text-main); letter-spacing: .5px; }
.cv-fmt-item span { font-size: 10.5px; color: var(--text-weak); }
.cv-fmt-item.active { border-color: var(--brand); background: var(--brand-soft); }
.cv-fmt-item.active b { color: var(--brand); }
.cv-fmt-item.active span { color: #5E7EC2; }
.cv-badge {
  position: absolute; right: 8px; top: 8px; font-size: 10px; font-weight: 700;
  color: #fff; background: #4B78E6; padding: 2px 8px; border-radius: 7px;
  letter-spacing: .5px;
}

/* ============================================================
   处理记录页 + 设置面板（toolview 内）
   ============================================================ */
.his-count {
  margin: 4px 2px 12px; font-size: 12.5px; color: var(--text-sub);
  padding: 0 4px;
}
.his-empty { text-align: center; padding: 56px 20px 30px; color: var(--text-sub); }
.his-empty-ico {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
  background: var(--brand-soft); color: var(--hl-blue);
  display: flex; align-items: center; justify-content: center;
}
.his-empty-ico svg { width: 30px; height: 30px; }
.his-empty p { font-size: 16px; font-weight: 650; color: var(--text-main); }
.his-empty span { display: inline-block; margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--text-weak); }

.his-list { display: flex; flex-direction: column; gap: 10px; }
.his-item {
  display: flex; gap: 12px; align-items: center; padding: 11px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-soft);
}
.his-thumb {
  width: 56px; height: 56px; flex: 0 0 auto; border-radius: 10px; overflow: hidden;
  background: #ECF0F7; border: 1px solid var(--border); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.his-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.his-thumb .noimg { width: 22px; height: 22px; color: var(--text-weak); }
.his-mid { flex: 1 1 auto; min-width: 0; }
.his-mid .top { display: flex; align-items: center; gap: 6px; }
.his-badge {
  font-size: 9.5px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
  padding: 1px 7px; border-radius: 6px; letter-spacing: .4px; flex: 0 0 auto;
}
.his-name { font-size: 13px; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.his-sub { margin-top: 3px; font-size: 11.5px; color: var(--text-weak); font-variant-numeric: tabular-nums; }
.his-save { color: var(--green); font-weight: 600; }
.his-save.up { color: var(--orange); }
.his-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.his-btns button {
  width: 34px; height: 34px; border: 1px solid var(--border); background: #fff;
  border-radius: 10px; color: var(--text-sub); cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.his-btns button svg { width: 17px; height: 17px; }
.his-btns button:active { transform: scale(.93); }
.his-btns .dl { color: var(--hl-blue); }
.his-actions { margin-top: 16px; }
.his-actions .btn-secondary { width: 100%; }

/* 设置面板 */
.st-panel { padding: 20px; gap: 14px; display: flex; flex-direction: column; }
.st-group {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card-sm);
  box-shadow: var(--shadow-soft); padding: 16px;
}
.st-group .panel-head { margin-bottom: 6px; }
.st-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 2px; border-top: 1px solid var(--border);
}
.st-row-txt { display: flex; flex-direction: column; gap: 2px; }
.st-row-txt b { font-size: 14.5px; font-weight: 650; color: var(--text-main); }
.st-row-txt span { font-size: 11.5px; color: var(--text-weak); line-height: 1.4; }
.st-btn {
  display: flex; align-items: center; width: 100%; padding: 13px 14px; margin-top: 6px;
  border: 1px solid var(--border); background: #fff; border-radius: 13px;
  font-size: 14px; color: var(--text-main); cursor: pointer; font-family: inherit;
  gap: 8px; transition: all .15s ease;
}
.st-btn:hover { border-color: var(--brand); }
.st-btn svg { width: 17px; height: 17px; color: var(--text-sub); }
.st-btn:active { background: var(--brand-soft); }
.st-hint { margin-top: 9px; font-size: 11.5px; line-height: 1.5; color: var(--text-weak); }