:root {
  --bg: #f8f4e6;
  --paper: #fff9ea;
  --text: #1f2937;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b91c1c;
  --border: #e5dcc1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, #fffdf5 0%, transparent 35%),
    radial-gradient(circle at 85% 80%, #f2ebd2 0%, transparent 30%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
}

.app {
  width: min(100%, 480px);
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(55, 40, 18, 0.08);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0 0 20px;
  color: #4b5563;
}

form {
  display: grid;
  gap: 8px;
}

#wish-form {
  margin-top: 14px;
}

label {
  font-weight: 700;
  margin-top: 8px;
}

select,
input,
textarea,
button {
  font: inherit;
}

select,
input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 12px;
}

textarea {
  resize: vertical;
}

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

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

#claim-btn,
#reveal-btn {
  margin-top: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

#claim-btn:hover:enabled,
#reveal-btn:hover:enabled {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

#claim-btn:disabled,
#reveal-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ghost {
  background: #ece5cb;
  color: #374151;
}

.status {
  margin: 16px 0 4px;
  color: #374151;
  font-size: 0.95rem;
}

.result {
  min-height: 1.5em;
  margin: 6px 0 10px;
  font-weight: 700;
}

.error {
  color: var(--danger);
}

.hidden {
  display: none;
}
