/* ============================================================
   ResizeImageShrink.top
   色调：沙色纸底 + 钴蓝（区别于常见的暗色压缩器界面）
   布局：左对齐标题，照片对照卡，而不是左右工具栏
   ============================================================ */

:root {
  --bg: #f4f0e8;
  --ink: #1c1915;
  --muted: #6b6258;
  --faint: #94897c;
  --line: #e4d9cc;
  --card: #fffdf8;
  --accent: #1e4d8c;
  --accent-dark: #163a6b;
  --accent-soft: #e4eef8;
  --sand: #c4a574;
  --saved: #1f7a4d;
  --saved-bg: #e5f6ec;
  --larger: #9a4d16;
  --larger-bg: #f8ead8;
  --danger: #8f2d2d;
  --shadow: 0 12px 32px rgba(28, 25, 21, .06);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans", sans-serif;
  background:
    radial-gradient(1200px 400px at 10% -10%, #efe4d2 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
img { max-width: 100%; }
button, input, select { font: inherit; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -.03em;
  font-size: 15px;
  white-space: nowrap;
}
.brand em { font-style: normal; color: var(--accent); font-weight: 650; }
.site-nav { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-nav a:hover { color: var(--accent); }
.lang-select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 16px;
}

/* ---------- 首屏：左对齐，不是居中大标题 ---------- */
.hero { padding: 36px 0 8px; }
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr);
  gap: 28px;
  align-items: end;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 650;
}
h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -.03em; margin: 12px 0 10px; }
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 62ch; }
.trust {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.trust strong { display: block; font-size: 13px; }

/* ---------- 工具卡 ---------- */
.studio {
  margin: 22px 0 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 1.5px dashed #b7c3d6;
  border-radius: 14px;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, #f7faff 0%, #fffdf8 100%);
  cursor: pointer;
}
.dropzone.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.is-compact { padding: 12px 16px; }
.dropzone.is-compact .drop-title { font-size: 15px; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.drop-title { font-weight: 720; font-size: 18px; }
.drop-sub, .hint { color: var(--muted); font-size: 14px; margin: 0; }
.form-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.workspace { margin-top: 16px; }
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #faf6ef;
  border-bottom: 1px solid var(--line);
}
.shot img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
  background-color: #fffdf8;
  background-image:
    linear-gradient(45deg, #efe6d8 25%, transparent 25%),
    linear-gradient(-45deg, #efe6d8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #efe6d8 75%),
    linear-gradient(-45deg, transparent 75%, #efe6d8 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.shot .meta { margin: 0; padding: 8px 12px 12px; color: var(--muted); font-size: 13px; }
.delta {
  align-self: center;
  min-width: 92px;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
  border-radius: 999px;
  padding: 8px 10px;
  background: #f3eee6;
  color: var(--muted);
}
.delta.is-saved { background: var(--saved-bg); color: var(--saved); }
.delta.is-larger { background: var(--larger-bg); color: var(--larger); }

.controls {
  display: grid;
  grid-template-columns: 1.4fr .8fr auto auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 650; }
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
.formats { display: flex; gap: 8px; flex-wrap: wrap; }
.formats label {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.formats input { margin-right: 6px; }
.download, .text-btn {
  border: 0;
  cursor: pointer;
}
.download {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 720;
}
.download:hover { background: var(--accent-dark); }
.download:disabled { opacity: .45; cursor: not-allowed; }
.text-btn {
  background: transparent;
  color: var(--accent);
  padding: 8px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.png-note, .live-status { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ---------- 说明与 FAQ ---------- */
.panel { padding: 28px 0; }
.panel h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.steps strong { display: block; margin-bottom: 4px; }
.guide p { color: var(--muted); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 22px 0 36px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-nav a { color: var(--accent-dark); }
.disclaimer { margin: 0; max-width: 80ch; }

/* ---------- 合规页 ---------- */
.legal { padding: 28px 0 10px; max-width: 78ch; }
.legal h1 { font-size: 36px; }
.legal h2 { font-size: 22px; margin-top: 28px; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--accent-dark); }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; color: var(--ink); }

@media (max-width: 860px) {
  .hero-row, .steps, .controls, .compare { grid-template-columns: 1fr; }
  .delta { justify-self: start; }
  .shot img { height: 240px; }
  .download { width: 100%; }
  h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
