:root {
  --bg: #faf7f2;
  --ink: #22201c;
  --accent: #ff5d8f;
  --card: #ffffff;
  --line: #e8e0d5;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
header, main, footer { max-width: 960px; margin: 0 auto; padding: 0 20px; }
header { padding-top: 36px; }
h1 { font-size: 2.4rem; margin: 0; }
.tagline { font-size: 1.15rem; margin: 4px 0 12px; }
.privacy {
  background: #eaf7ee;
  border: 1px solid #bfe6c8;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.95rem;
}

#drop-zone {
  margin: 28px 0;
  padding: 48px 24px;
  text-align: center;
  border: 2px dashed #c9bda9;
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}
#drop-zone.drag { border-color: var(--accent); background: #fff5f8; }
#drop-zone .big { font-size: 1.2rem; margin: 0 0 14px; }
.upload-btn, button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.upload-btn:hover, button:hover { filter: brightness(0.94); }
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hint { color: #6d675e; font-size: 0.9rem; }
.or { color: #6d675e; font-size: 0.9rem; margin: 18px 0 8px; }
.url-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: stretch; }
.url-row textarea {
  width: min(420px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

#model-progress {
  margin: 20px 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
#model-progress-label { font-weight: 600; margin-bottom: 8px; }
#model-progress progress { width: 100%; height: 12px; }
#model-progress-text { font-size: 0.9rem; color: #6d675e; }

#jobs { display: flex; flex-direction: column; gap: 18px; margin: 20px 0; }
.job {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px 16px;
}
.job-head { margin: 8px 0 10px; }
.job-name { font-weight: 700; word-break: break-all; }
.job-status { font-size: 0.9rem; color: #6d675e; }
.job-thumb { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); }
.job-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
    linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
.job-stickers:empty { display: none; }

.sticker { text-align: center; width: 140px; }
.sticker img { max-width: 100%; display: block; margin: 0 auto 6px; }
.sticker label { font-size: 0.85rem; display: block; }
.sticker .dl { font-size: 0.85rem; color: var(--accent); text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0; }
.sticker.off { opacity: 0.35; }

#status { margin: 12px 0; font-size: 0.95rem; color: #6d675e; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px 20px;
  margin: 16px 0;
}
.controls legend { font-weight: 700; padding: 0 6px; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.controls label.check { flex-direction: row; align-items: center; gap: 6px; }
.controls input[type="range"] { width: 150px; }
.controls input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.controls input[type="color"] { width: 56px; height: 34px; padding: 2px; }
.controls select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 28px; }

.how { margin-bottom: 32px; }
.how h2 { margin-bottom: 6px; }
.how code { background: #f0e9dd; padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
button:disabled { opacity: 0.5; cursor: default; }
.note { color: #6d675e; font-size: 0.92rem; }
footer { padding-bottom: 32px; color: #6d675e; font-size: 0.88rem; }
footer a { color: inherit; }

.props {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px 20px;
  margin: 16px 0;
}
.props legend { font-weight: 700; padding: 0 6px; }
.props-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.prop-btn {
  width: 46px; height: 46px;
  font-size: 26px; line-height: 1;
  padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.prop-btn:hover { border-color: #999; }
.prop-btn.on { border-color: #111; box-shadow: 0 0 0 2px #ffd60a; background: #fffbe6; }
.prop-btn.loading { opacity: 0.5; }
.prop-btn .p-img { width: 36px; height: 36px; }
#props-wrap.disabled { opacity: 0.45; }
#props-wrap.disabled .prop-btn { pointer-events: none; }
.props-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.iconify-search { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.iconify-search input[type="search"] {
  flex: 1; min-width: 200px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  font: inherit; background: #fff;
}
.iconify-search select { padding: 8px; border-radius: 8px; border: 1px solid var(--line); font: inherit; background: #fff; }
.iconify-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; color: #6d675e; }
.iconify-results .p-img { width: 36px; height: 36px; }
