:root {
  color-scheme: light;
  --bg: oklch(96% 0.012 250);
  --panel: oklch(100% 0 0);
  --ink: oklch(19% 0.025 255);
  --muted: oklch(43% 0.035 255);
  --line: oklch(88% 0.018 255);
  --accent: oklch(48% 0.19 260);
  --accent-strong: oklch(40% 0.2 260);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, oklch(88% 0.08 260), transparent 34rem),
    var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(720px, 100%);
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid color-mix(in oklch, var(--line), white 28%);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 24px 80px oklch(24% 0.05 255 / 16%);
}

.intro { max-width: 58ch; margin-bottom: 24px; }
.badge { margin: 0 0 10px; color: var(--accent-strong); font-weight: 700; }
h1 { margin: 0; font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.lede { margin: 16px 0 0; color: var(--muted); font-size: 1.05rem; text-wrap: pretty; }

label { display: block; margin-bottom: 8px; font-weight: 700; }
textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: oklch(98.5% 0.006 255);
  color: var(--ink);
  font: 1rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
textarea:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px oklch(48% 0.19 260 / 14%);
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px oklch(48% 0.19 260 / 28%);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
button:hover { background: var(--accent-strong); transform: translateY(-1px); }
button:active { transform: translateY(0); box-shadow: 0 6px 16px oklch(48% 0.19 260 / 22%); }
button:focus-visible { outline: 3px solid oklch(70% 0.14 260); outline-offset: 3px; }

#error { margin: 14px 0 0; min-height: 1.5em; color: oklch(42% 0.19 27); font-weight: 700; }

@media (max-width: 560px) {
  .shell { align-items: start; padding: 14px; }
  .panel { border-radius: 20px; }
  h1 { font-size: 2.25rem; }
  textarea { min-height: 260px; font-size: 0.95rem; }
  .actions { align-items: stretch; flex-direction: column; }
  button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
