:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: #191919;
  --panel-2: #202020;
  --border: #303030;
  --text: #f5f1ea;
  --muted: #b8aa99;
  --accent: #d1a36d;
  --accent-2: #8f5e31;
  --danger: #ffb2a7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(209, 163, 109, 0.12), transparent 28%),
    linear-gradient(180deg, #101010 0%, #0d0d0d 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

.shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero,
.panel,
.result-card,
.notes {
  background: rgba(25, 25, 25, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
}

.hero,
.panel,
.notes {
  padding: 24px;
}

.hero h1,
.result-card h2,
.notes h2 {
  margin: 0 0 10px;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede,
.hint,
.placeholder,
.notes li,
.status {
  color: var(--muted);
}

.panel,
.results,
.notes {
  margin-top: 18px;
}

.grid,
.results {
  display: grid;
  gap: 18px;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results {
  grid-template-columns: 1.2fr 0.8fr;
}

.field {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.field label {
  display: block;
  margin-bottom: 10px;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #111111;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 150px;
}

.controls {
  margin-top: 18px;
}

.preview,
.result-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0c0c0c;
  object-fit: cover;
}

.preview {
  margin-top: 14px;
  aspect-ratio: 3 / 4;
}

.result-image {
  min-height: 320px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #101010;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 120, 100, 0.12);
  border: 1px solid rgba(255, 120, 100, 0.24);
  color: var(--danger);
}

.result-card {
  padding: 20px;
}

.logs {
  margin: 0;
  min-height: 320px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #101010;
  color: #d6c7b7;
  font-family: "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes {
  padding-left: 24px;
}

.notes ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 820px) {
  .grid,
  .results {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 1040px);
    padding-top: 20px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
