:root {
  color-scheme: light;
  --bg: #f2efe8;
  --panel: rgba(255, 252, 246, 0.88);
  --line: #d3c7b8;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #b45309;
  --accent-strong: #92400e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.18), transparent 28%),
    linear-gradient(135deg, #efe7da 0%, var(--bg) 55%, #e8ddd0 100%);
}

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

.hero {
  margin-bottom: 24px;
}

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

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 0.96;
}

.lede {
  max-width: 42rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(8px);
}

.panel + .panel {
  margin-top: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  font: inherit;
}

input,
textarea {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.75);
}

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

button {
  margin-top: 14px;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  border: 0;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

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

.actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.actions button {
  width: auto;
  min-width: 220px;
  margin-top: 14px;
}

#status {
  color: var(--muted);
  font-size: 0.95rem;
}

.output-panel pre {
  margin: 16px 0 0;
  padding: 18px;
  min-height: 220px;
  white-space: pre-wrap;
  background: #1c1917;
  color: #fef7ed;
  border-radius: 18px;
  overflow-x: auto;
}

.output-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.output-header small {
  color: var(--muted);
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 880px);
    padding-top: 28px;
  }

  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .actions button {
    width: 100%;
  }
}
