/* ImgPress — 无外部依赖、无 web font、无阻塞渲染资源 */
:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1c232c;
  --line: #2a3340;
  --text: #e6edf3;
  --muted: #93a1b1;
  --accent: #6ee7b7;
  --accent-ink: #062a1e;
  --warn: #f0b429;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 10;
}

.wrap {
  width: min(940px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ---------- header ---------- */
header.site {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  width: min(940px, calc(100% - 2.5rem));
  margin-inline: auto;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

header nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

header nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

/* ---------- hero / tool ---------- */
.hero {
  padding: 2rem 0 1rem;
}

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.drop {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--muted);
}

.drop:hover,
.drop:focus-visible,
.drop.over {
  border-color: var(--accent);
  background: var(--panel-2);
  outline: none;
}

.drop p { margin: 0.35rem 0; }
.drop strong { color: var(--text); }
.drop .link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.drop .hint { font-size: 0.85rem; }

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field span { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }

.field input,
.field select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.chip {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

.chip:hover { color: var(--accent); border-color: var(--accent); }

.status {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.status[data-kind="done"] { color: var(--accent); }
.status[data-kind="warn"] { color: var(--warn); }

.results { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
  flex: none;
}

.meta { min-width: 0; flex: 1; }
.name {
  margin: 0;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--muted); }

.actions { display: flex; gap: 0.5rem; margin-top: 0.9rem; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}
.btn.primary:hover { filter: brightness(1.05); color: var(--accent-ink); }

.btn.small { padding: 0.35rem 0.65rem; font-size: 0.8rem; flex: none; }

/* ---------- prose ---------- */
.prose { padding: 2.25rem 0 1rem; }
.prose h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
.prose h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.prose p { color: #c9d4df; margin: 0.7rem 0; max-width: 68ch; }
.lede { color: var(--muted); font-size: 1.02rem; max-width: 60ch; }

.steps { padding-left: 1.1rem; color: #c9d4df; }
.steps li { margin: 0.4rem 0; max-width: 66ch; }

.faq { display: grid; gap: 0.5rem; }
.qa {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}
.qa summary { cursor: pointer; font-weight: 600; font-size: 0.94rem; }
.qa p { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.92rem; }

.related, .cards { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.6rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.related li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  background: var(--panel);
  flex-wrap: wrap;
}

.related a { color: var(--accent); text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related span { color: var(--muted); font-size: 0.85rem; }

.card a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  height: 100%;
}
.card a:hover { border-color: var(--accent); }
.card strong { display: block; margin-bottom: 0.25rem; }
.card span { color: var(--muted); font-size: 0.86rem; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site p { margin: 0.2rem 0; }
footer .muted { opacity: 0.65; }

@media (max-width: 560px) {
  .row { flex-wrap: wrap; }
  .thumb { width: 36px; height: 36px; }
  .btn.small { width: 100%; }
}
