:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #66645f;
  --paper: #fbfaf7;
  --line: #d8d2c7;
  --accent: #0f6f63;
  --accent-dark: #0a4a42;
  --error: #9f2f2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 111, 99, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(158, 76, 47, 0.12), transparent 40%),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

.redeem-shell,
.tool-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.redeem-panel,
.tool-panel {
  width: min(100%, 720px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0 0 26px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input {
  min-height: 56px;
  padding: 0 16px;
  text-transform: uppercase;
}

textarea {
  display: block;
  min-height: 180px;
  resize: vertical;
  padding: 14px 16px;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 111, 99, 0.14);
}

button {
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

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

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

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--error);
  font-weight: 700;
}

.tool-form {
  display: grid;
  gap: 14px;
}

.tool-form button {
  justify-self: start;
}

.result {
  margin: 22px 0 0;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 4.2rem);
  }
}
