:root {
  --bg: #f5f3ef;
  --bg-accent: radial-gradient(circle at 18% 12%, #fff8ee 0%, transparent 42%), radial-gradient(circle at 90% 18%, #ebf2ff 0%, transparent 34%), linear-gradient(180deg, #f8f6f2 0%, #f2efe9 100%);
  --card: #fff;
  --ink: #1c2a2d;
  --muted: #647179;
  --line: #d8ddd8;
  --accent: #1f6f5f;
  --accent-2: #cf8d4a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg-accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 44px;
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf5f3;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}
.hero h1 { margin: 8px 0 10px; font-size: clamp(1.7rem, 3.8vw, 2.7rem); }
.subtitle { color: var(--muted); max-width: 760px; }

.panel, .task-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(20, 30, 35, 0.05);
}

label { display: block; margin-bottom: 8px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
}
.row { margin-bottom: 12px; }
.split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 12px 0;
}

.actions { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }
small { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f8f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}
.chip button {
  padding: 2px 8px;
  background: #7f8e96;
  font-size: 12px;
}

.style-list { display: grid; gap: 8px; }
.style-item-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fafcfc;
}
.style-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.style-head button { padding: 4px 8px; background: #7f8e96; }

.results { display: grid; gap: 12px; }
.task-card header { display: flex; justify-content: space-between; align-items: baseline; }
.task-card h3, .task-card h4 { margin: 0 0 6px; }
.task-status { color: var(--muted); margin: 0; }

.images-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.img-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fcfcfb;
}
img {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f1f1;
  object-fit: cover;
}

.refine {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  gap: 8px;
  margin-top: 10px;
}
.refine-run { background: var(--accent-2); }
.refine-output img { margin-top: 10px; max-width: 300px; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login-panel { max-width: 420px; width: 100%; }
.login-panel h1 { margin-top: 0; }
.login-panel button { margin-top: 10px; width: 100%; }

@media (max-width: 1024px) {
  .images-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .split-2 { grid-template-columns: 1fr; }
  .images-grid-4 { grid-template-columns: 1fr; }
  .refine { grid-template-columns: 1fr; }
}
