:root {
  --bg: #f5f1e9;
  --panel: #fffaf1;
  --ink: #201b16;
  --muted: #685f55;
  --line: #ded2bf;
  --accent: #2d241d;
  --error: #9d1c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: radial-gradient(circle at top left, #fffaf1 0, var(--bg) 42%, #efe4d0 100%);
  color: var(--ink);
  min-height: 100vh;
}

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

.hero {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
}

.subtitle {
  max-width: 840px;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 22px;
  align-items: start;
}

.card {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(43, 34, 25, 0.09);
  padding: 22px;
}

label {
  display: block;
  font-weight: 700;
  margin: 12px 0 8px;
}

select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fffdf8;
  color: var(--ink);
  font: 1rem Arial, sans-serif;
}

textarea {
  min-height: 210px;
  resize: vertical;
  line-height: 1.45;
}

.mode-help {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
  margin: 10px 0 18px;
}

button {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font: 700 1rem Arial, sans-serif;
  background: var(--accent);
  color: #fffaf1;
  cursor: pointer;
}

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

.status {
  min-height: 22px;
  font: 0.94rem Arial, sans-serif;
  color: var(--muted);
}

.status.error { color: var(--error); font-weight: 700; }

.response-card { min-height: 520px; }

.response-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

h2 { margin: 0; font-size: 1.3rem; }

.badge {
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font: 0.82rem Arial, sans-serif;
  white-space: nowrap;
}

.response {
  white-space: pre-wrap;
  line-height: 1.68;
  font-size: 1.08rem;
  min-height: 420px;
}

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .response-card { min-height: 360px; }
}
