:root {
  --bg: #fafafa;
  --card: #fff;
  --text: #111;
  --muted: #777;
  --line: #eee;
  --accent: #e63946;
  --ok: #2a9d5c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 32px 16px 64px; }

h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1.5px; margin: 4px 0 12px; }
h2 { font-size: 24px; letter-spacing: -0.6px; margin: 32px 0 12px; }
h3 { font-size: 17px; margin: 0; letter-spacing: -0.2px; }

.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.lead { font-size: 17px; color: #555; margin: 0 0 20px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.reveal { font-size: 48px; font-weight: 700; letter-spacing: -2px; line-height: 1.1; margin: 0 0 16px; }
.wish { white-space: pre-wrap; margin: 0; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input, .row > select { flex: 1; min-width: 0; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

input, select, textarea {
  font: inherit;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

button, a.link, .primary {
  font: inherit;
  min-height: 44px;
  cursor: pointer;
}

button {
  border: 1px solid #ddd;
  background: #fff;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 14px;
  font-weight: 600;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary.big { width: 100%; padding: 14px; font-size: 17px; }
button:active { transform: scale(0.98); }

button.link, a.link {
  background: none;
  border: none;
  padding: 0 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
button.danger { color: var(--muted); }

.list { list-style: none; padding: 6px 16px; }
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: none; }
.list .name { font-weight: 500; }
.actions { display: flex; gap: 4px; align-items: center; }
.actions form { margin: 0; }

.badge {
  display: inline-block;
  background: #fdecee;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}

.status { color: var(--muted); font-size: 13px; font-weight: 400; }
.status.seen { color: var(--ok); }

.token {
  display: block;
  word-break: break-all;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.error {
  background: #fdecee;
  color: #b3202c;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}
.card .error { margin: 0; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --card: #1c1c1e;
    --text: #f5f5f5;
    --muted: #9a9a9f;
    --line: #2a2a2d;
    --shadow: none;
  }
  .lead { color: #bbb; }
  input, select, textarea, button { background: #232326; border-color: #3a3a3d; color: var(--text); }
  button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  button.link, a.link { background: none; border: none; }
  .badge, .error { background: #3a1a1e; }
  .error { color: #ff8a93; }
}
