:root {
  color-scheme: light;
  --bg: #f4ecde;
  --panel: #fff7ea;
  --ink: #1d150d;
  --muted: #6f5939;
  --line: #dbc7a2;
  --accent: #8f4e00;
  --accent-strong: #6d3600;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 40%),
    linear-gradient(180deg, #f6f0e8 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

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

.hero {
  margin-bottom: 24px;
}

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

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.lede {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(29, 21, 13, 0.06);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 1rem;
}

button {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff9ef;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  margin-top: 6px;
}

button:hover {
  background: var(--accent-strong);
}

button.secondary {
  width: auto;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}

.output-panel {
  min-height: 300px;
}

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

pre {
  margin: 16px 0 0;
  padding: 16px;
  min-height: 220px;
  border-radius: 16px;
  background: #1f180f;
  color: #f8e8c3;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", Consolas, monospace;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .layout {
    width: min(100vw - 20px, 1100px);
    padding-top: 20px;
  }
}
