/* Hog Convert — shared styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #17140f;
  --bg2: #201c15;
  --card: #26211a;
  --line: #3a3327;
  --text: #f0e9dc;
  --muted: #a89a83;
  --accent: #e8842c;
  --accent2: #f5a54f;
  --ok: #6fbf73;
  --err: #e06552;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 20px 20px 40px; }

/* header / footer */
header.site, footer.site {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 0;
}
header.site { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
footer.site { border-top: 1px solid var(--line); margin-top: 48px; font-size: 0.92rem; color: var(--muted); }
footer.site nav { display: flex; gap: 16px; }

.brand {
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  text-decoration: none; letter-spacing: 0.02em;
}
.brand .snout { margin-right: 6px; }
.backlink { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.backlink:hover { color: var(--accent2); }

a { color: var(--accent2); }
a:hover { color: var(--accent); }

/* hero */
.hero { padding: 18px 0 8px; }
.badge {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent2);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; margin-bottom: 10px; }
.sub { color: var(--muted); font-size: 1.08rem; max-width: 46em; }
.sub b { color: var(--text); }

/* hub grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 26px 0 10px;
}
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card .ico { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.card p { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* tool panel */
.tool {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
}
.notice {
  border: 1px solid var(--accent);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(232, 132, 44, 0.06); color: var(--text); }
.dropzone .big { font-size: 2.2rem; margin-bottom: 8px; }

.filelist { list-style: none; margin-top: 14px; }
.filelist li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 0.92rem;
}
.filelist li b { font-weight: 600; overflow-wrap: anywhere; }
.filelist li span { color: var(--muted); white-space: nowrap; }
.filelist li .mv, .filelist li .rm {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); cursor: pointer; padding: 2px 8px; font-size: 0.85rem;
}
.filelist li .mv:hover, .filelist li .rm:hover { border-color: var(--accent); color: var(--accent2); }

.opts {
  display: flex; align-items: end; gap: 16px; flex-wrap: wrap;
  margin-top: 18px;
}
.opts label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.88rem; color: var(--muted);
}
.opts select, .opts input[type="number"], .opts input[type="text"] {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 0.95rem;
  min-width: 150px;
}
.brushrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.brushrow label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); }

button.run, button.ghost {
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s ease;
}
button.run {
  background: var(--accent);
  border: none;
  color: #1a120a;
}
button.run:hover:not(:disabled) { filter: brightness(1.1); }
button.run:disabled { opacity: 0.4; cursor: not-allowed; }
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
button.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent2); }
button.ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* progress + status */
.progress-wrap { display: none; margin-top: 18px; }
.progress-wrap.on { display: block; }
.bar {
  height: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.25s ease;
}
.status-line { margin-top: 8px; font-size: 0.92rem; color: var(--muted); min-height: 1.4em; }
.status-line.ok { color: var(--ok); }
.status-line.err { color: var(--err); }

/* result */
.result { display: none; margin-top: 18px; }
.result.on { display: block; }
.dl {
  display: inline-block;
  background: var(--ok);
  color: #10230f;
  font-weight: 800;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 24px;
}
.dl:hover { filter: brightness(1.08); color: #10230f; }
.meta { display: block; margin-top: 8px; color: var(--muted); font-size: 0.9rem; }

/* prose */
.prose { margin-top: 36px; max-width: 46em; }
.prose h2 { font-size: 1.25rem; margin: 26px 0 8px; }
.prose p { color: var(--muted); margin-bottom: 10px; }
.prose p b, .prose p a { color: var(--accent2); }

/* stage (watermark remover canvases) */
.stage { position: relative; line-height: 0; max-width: 100%; margin-top: 16px; }
#baseCv { max-width: 100%; height: auto; display: block; border-radius: 12px; }
#paintCv { position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

@media (max-width: 560px) {
  .wrap { padding: 14px 14px 30px; }
  .tool { padding: 16px; }
  .opts select { min-width: 120px; }
}
