:root {
  --bg: #f2f0ea;
  --ink: #1b1d22;
  --accent: #0f766e;
  --card: #ffffff;
  --line: #d6d2c5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #d7e6df 0%, var(--bg) 40%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.shell {
  max-width: 1100px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.update-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.full {
  width: 100%;
}

.inline-check {
  margin-top: 6px;
}

label {
  display: block;
  font-size: 13px;
  margin: 8px 0;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid #c5c8cf;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  width: auto;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
}

.large {
  min-height: 44px;
}

textarea {
  resize: vertical;
}

button {
  width: auto;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

.ghost {
  background: #e8ecef;
  color: #1b1d22;
}

.warn {
  background: #b42318;
}

.actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggles {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#promptBox {
  background: #101219;
  color: #dce3f4;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
  max-height: 220px;
}

#imagePreview {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
  cursor: pointer;
}

.history-item .meta {
  font-size: 12px;
  opacity: 0.8;
}

.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .row {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .row {
    grid-template-columns: 1fr;
  }
  .update-row {
    grid-template-columns: 1fr;
  }
}
