/* 极简工具页样式：参考百度首页的留白与聚焦感 */
.min-page {
  min-height: 100vh;
  background: var(--bg);
}

.min-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  width: min(100% - 48px, 960px);
  margin: 0 auto;
}
.min-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.min-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.min-brand span:last-child { font-size: 14px; font-weight: 600; letter-spacing: .3px; }

.icon-nav { display: flex; gap: 6px; }
.icon-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 58px; padding: 7px 0 6px;
  text-decoration: none; color: var(--text-soft);
  border-radius: 10px;
  transition: .15s;
}
.icon-nav a:hover { background: #fff; color: var(--accent); box-shadow: var(--shadow); }
.icon-nav svg { width: 20px; height: 20px; stroke-width: 1.6; }
.icon-nav span { font-size: 12px; }

/* 主体：窄列、居中、大留白 */
.min-main {
  width: min(100% - 40px, 620px);
  margin: 0 auto;
  padding: 34px 0 48px;
  text-align: center;
}

.min-title {
  font-size: clamp(23px, 3.4vw, 30px);
  font-weight: 650;
  letter-spacing: -.5px;
  margin: 0 0 6px;
}
.min-sub { color: var(--text-soft); font-size: 13px; margin: 0 0 24px; }

/* 上传区：像搜索框一样成为视觉中心 */
.min-drop {
  border: 1.5px dashed #cfdcd7;
  background: #fff;
  border-radius: 16px;
  min-height: 138px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: .18s;
  padding: 16px;
}
.min-drop:hover, .min-drop.drag { border-color: var(--accent); box-shadow: 0 10px 30px rgba(20,40,35,.08); }
.min-drop svg { width: 34px; height: 34px; stroke: #a9bcb5; stroke-width: 1.5; }
.min-drop .hint { color: var(--text-soft); font-size: 14px; }
.min-drop .fname { color: var(--text); font-size: 13.5px; word-break: break-all; margin-top: 2px; }
.min-drop.has-file svg { stroke: var(--accent); }

/* 两个大图标模式卡 */
.mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 0;
}
.mode-tile {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
  text-align: center;
  transition: .16s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mode-tile:hover { border-color: #b9d3c9; }
.mode-tile.active { border-color: var(--accent); background: var(--accent-soft); }
.mode-tile svg { width: 30px; height: 30px; stroke: var(--text-soft); stroke-width: 1.5; }
.mode-tile.active svg { stroke: var(--accent-strong); }
.mode-tile b { font-size: 14px; font-weight: 600; color: var(--text); }
.mode-tile small { font-size: 12px; color: var(--text-soft); line-height: 1.4; }

/* 更多设置：默认折叠 */
.more-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-soft); font-size: 12.5px; font-family: inherit;
  margin: 14px 0 0; padding: 4px 8px;
}
.more-toggle:hover { color: var(--accent); }
.more-panel {
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.more-panel[hidden] { display: none; }
.more-panel .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.more-panel label { font-size: 12.5px; color: var(--text-soft); white-space: nowrap; }
.more-panel select { width: auto; min-width: 128px; padding: 7px 10px; font-size: 13px; }
.more-panel input[type="range"] { flex: 1 1 120px; accent-color: var(--accent); }
.more-panel em { font-style: normal; font-size: 12.5px; color: var(--text); min-width: 24px; }

/* 主按钮 */
.min-action {
  width: 100%;
  margin-top: 18px;
  height: 48px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: .16s;
}
.min-action:hover:not(:disabled) { background: var(--accent-strong); }
.min-action:disabled { background: #c8d6d1; cursor: not-allowed; }

.min-note { font-size: 12.5px; color: var(--text-soft); margin: 12px 0 0; min-height: 18px; }
.min-note.err { color: #c0392b; }
.min-note.ok { color: var(--accent-strong); }

/* 进度 */
.min-progress { margin-top: 16px; text-align: left; }
.min-progress[hidden] { display: none; }
.min-progress .bar { height: 6px; background: #e9efec; border-radius: 999px; overflow: hidden; }
.min-progress .fill { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.min-progress .txt { font-size: 12px; color: var(--text-soft); margin-top: 6px; }

/* 结果 */
.min-result { margin-top: 22px; text-align: left; }
.min-result[hidden] { display: none; }
.min-result .kv { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.min-result .kv span { color: var(--text-soft); }
.min-result .preview-checker {
  margin: 12px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(45deg, #eef1f0 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f0 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f0 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  overflow: hidden;
  display: grid; place-items: center;
}
.min-result .preview-checker img { display: block; max-width: 100%; }
.min-result .dl {
  display: block; text-align: center; margin-top: 10px;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 11px; border-radius: 11px; font-size: 14px; font-weight: 600;
}
.min-result .dl:hover { background: var(--accent-strong); }

.min-foot { text-align: center; font-size: 12px; color: #9aa8a4; padding-bottom: 30px; }

@media (max-width: 480px) {
  .min-main { padding-top: 34px; }
  .icon-nav a { width: 48px; }
  .mode-row { grid-template-columns: 1fr; }
  .min-drop { min-height: 132px; }
}

/* ---------- 二级页工具卡 ---------- */
.min-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 24px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(20,40,35,.03);
}
.min-card .card-title { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--text); }

/* 使用说明：默认收起，只留一行 */
.min-help { margin: 18px auto 0; text-align: left; max-width: 100%; }
.min-help summary {
  cursor: pointer; list-style: none;
  font-size: 12.5px; color: #9aa8a4;
  padding: 6px 0; text-align: center;
}
.min-help summary::-webkit-details-marker { display: none; }
.min-help summary:hover { color: var(--accent); }
.min-help-body {
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.75;
}
.min-help-body h2 { font-size: 14px; color: var(--text); margin: 14px 0 6px; }
.min-help-body h3 { font-size: 13.5px; color: var(--text); margin: 12px 0 4px; }
.min-help-body p, .min-help-body li { margin: 4px 0; }
.min-help-body a { color: var(--accent); }

/* ---------- 首页：横版工具导航板 ---------- */
.home-hero { text-align: center; padding: 46px 0 26px; }
.home-title {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 700; letter-spacing: -1px; margin: 0 0 10px;
}
.home-tag { color: var(--text-soft); font-size: 14px; margin: 0 0 22px; }
.home-tag em { font-style: normal; color: var(--accent-strong); font-weight: 600; }

.home-search {
  width: min(100%, 480px); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 11px 18px;
  transition: .16s;
}
.home-search:focus-within { border-color: var(--accent); box-shadow: 0 8px 24px rgba(20,40,35,.07); }
.home-search svg { width: 17px; height: 17px; stroke: #a9bcb5; flex: 0 0 auto; }
.home-search input {
  border: none; outline: none; background: none; width: 100%;
  font-family: inherit; font-size: 14px; color: var(--text);
}
.home-search input::placeholder { color: #a9b6b1; }

.home-chips {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  width: min(100%, 860px); margin: 26px auto 0;
}
.chip {
  border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 7px 16px;
  font-size: 13px; color: var(--text-soft); cursor: pointer;
  font-family: inherit; transition: .14s;
}
.chip:hover { border-color: #b9d3c9; color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
  width: min(100% - 40px, 980px);
  margin: 30px auto 0;
  padding: 0 0 8px;
}
.tool-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  padding: 20px 18px 18px;
  text-decoration: none; color: inherit;
  transition: .16s;
}
.tool-tile:hover { border-color: #b9d3c9; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,40,35,.07); }
.tool-tile .ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); display: grid; place-items: center;
}
.tool-tile .ico svg { width: 22px; height: 22px; stroke: var(--accent-strong); stroke-width: 1.6; }
.tool-tile b { font-size: 15px; font-weight: 600; }
.tool-tile small { font-size: 12.5px; color: var(--text-soft); line-height: 1.5; }
.tool-tile.empty { display: none; }

.home-empty { text-align: center; color: #9aa8a4; font-size: 13px; padding: 30px 0; display: none; }

.home-note {
  text-align: center; font-size: 12.5px; color: #9aa8a4;
  width: min(100% - 40px, 980px); margin: 26px auto 0; line-height: 1.9;
}
.home-note em { font-style: normal; color: var(--accent-strong); }

@media (max-width: 520px) {
  .home-hero { padding: 30px 0 18px; }
  .home-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-tile { padding: 16px 14px; }
  .tool-tile small { display: none; }
}

/* 二级页内的小标题统一压小，避免工具页内出现大号标题 */
.min-card h1, .min-card h2 {
  font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--text);
  letter-spacing: 0;
}
.min-card h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.min-card p { color: var(--text-soft); font-size: 13.5px; }

/* 直链下载页信息行 */
.kv-row { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }
.kv-row .kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; }
.kv-row .kv span { color: var(--text-soft); flex: 0 0 auto; }
.kv-row .kv strong { font-weight: 600; color: var(--text); text-align: right; word-break: break-all; }

/* 图片转换页：网址输入行 */
.url-row { display: flex; gap: 8px; margin: 10px 0 0; }
.url-row input[type="text"] { flex: 1 1 auto; }
.url-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---------- 精简首页：一屏装完全部工具 ---------- */
.home-top { height: 56px; }
.home-count { font-size: 12.5px; color: #9aa8a4; }

.home-hero { padding: 26px 0 16px; }
.home-title { font-size: clamp(26px, 3.8vw, 36px); margin: 0 0 8px; }
.home-tag { font-size: 13px; margin: 0 0 16px; }
.home-search { width: min(100%, 420px); padding: 9px 16px; }
.home-search input { font-size: 13.5px; }

.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  width: min(100% - 36px, 900px);
  margin: 22px auto 0;
}
.tool-tile {
  align-items: center; text-align: center;
  padding: 14px 8px 12px; gap: 8px; border-radius: 13px;
}
.tool-tile .ico { width: 44px; height: 44px; border-radius: 12px; }
.tool-tile .ico svg { width: 22px; height: 22px; }
.tool-tile b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }

/* 底部：分享 / 联系 / 打赏 */
.home-actions {
  display: flex; justify-content: center; gap: 26px;
  margin: 22px auto 0; flex-wrap: wrap;
}
.act {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12.5px; color: #8d9c98;
  padding: 6px 8px; border-radius: 8px; transition: .15s;
}
.act:hover { color: var(--accent); background: rgba(18,135,111,.06); }
.act svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.6; }

.home-note { margin: 14px auto 0; font-size: 12px; }
.min-foot { padding: 14px 0 26px; }

/* 弹层 */
.dlg {
  position: fixed; inset: 0; background: rgba(16,28,24,.45);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.dlg[hidden] { display: none; }
.dlg-card {
  position: relative; background: #fff; border-radius: 16px;
  padding: 26px 24px 22px; width: min(100%, 340px);
  text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.dlg-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; font-size: 20px; line-height: 1;
  color: #b3bfbb; cursor: pointer; padding: 4px 8px;
}
.dlg-close:hover { color: var(--text); }
.dlg-card h3 { font-size: 16px; margin: 0 0 10px; color: var(--text); }
.dlg-card p { font-size: 13px; color: var(--text-soft); line-height: 1.7; margin: 6px 0; }
.dlg-card .code {
  display: block; margin: 10px 0 0; padding: 10px 12px;
  background: #f4f7f6; border-radius: 10px;
  font-size: 13px; color: var(--text); word-break: break-all;
  font-family: Consolas, monospace;
}
.dlg-card img { width: 190px; height: 190px; object-fit: contain; margin: 10px auto 0; display: block; }
.dlg-card .tip { font-size: 12px; color: #a9b6b1; margin-top: 10px; }
.dlg-card .btn { margin-top: 14px; }

@media (max-width: 520px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tool-tile { padding: 12px 6px 10px; }
  .tool-tile .ico { width: 38px; height: 38px; }
  .tool-tile b { font-size: 12.5px; }
  .home-actions { gap: 12px; }
}

/* ---------- 页脚合规链接 ---------- */
.min-foot { text-align: center; font-size: 12px; color: #9aa8a4; padding: 14px 0 26px; }
.foot-links { display: flex; justify-content: center; gap: 14px; margin: 0 0 8px; flex-wrap: wrap; }
.foot-links a { color: #8d9c98; text-decoration: none; font-size: 12px; }
.foot-links a:hover { color: var(--accent); }
.foot-copy { margin: 0; }
.foot-icp { margin: 6px 0 0; font-size: 11.5px; }
.foot-icp[hidden] { display: none; }

/* ---------- 合规文本页 ---------- */
.legal .min-main, .min-main.legal { width: min(100% - 40px, 720px); }
.legal-body { text-align: left; line-height: 1.9; font-size: 13.5px; padding: 26px 28px; }
.legal-body h2 { font-size: 14.5px; margin: 22px 0 8px; }
.legal-body h2:first-of-type { margin-top: 18px; }
.legal-body p { color: var(--text-soft); margin: 8px 0; }
.legal-body li { color: var(--text-soft); margin: 5px 0; }
.legal-body ul { padding-left: 18px; margin: 8px 0; }
.legal-body a { color: var(--accent); }
.legal-body strong { color: var(--text); font-weight: 600; }

/* ---------- 首次访问同意条 ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  backdrop-filter: blur(6px); box-shadow: 0 -6px 24px rgba(20,40,35,.06);
  transition: transform .22s, opacity .22s;
}
.consent.out { transform: translateY(100%); opacity: 0; }
.consent-inner {
  width: min(100% - 32px, 900px); margin: 0 auto; padding: 11px 0;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.consent p { margin: 0; flex: 1 1 260px; font-size: 12.5px; color: var(--text-soft); line-height: 1.6; }
.consent a { color: var(--accent); text-decoration: none; }
.consent a:hover { text-decoration: underline; }
.consent-ok {
  flex: 0 0 auto; padding: 7px 18px; border-radius: 9px;
  background: var(--accent); border: none; color: #fff;
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.consent-ok:hover { background: var(--accent-strong); }

/* 工具页底部相关工具（内链，一行文字链） */
.rel-line {
  margin: 22px 0 0; padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  justify-content: center;
  font-size: 12.5px; line-height: 1.8;
}
.rel-line span { color: #a2afa9; }
.rel-line a { color: var(--text-soft); text-decoration: none; }
.rel-line a:hover { color: var(--accent); }
