:root {
  --bg: #fdf6ec;
  --bg-card: #ffffff;
  --text: #3a2e2c;
  --text-muted: #8a7a72;
  --accent: #e8827c;
  --accent-dark: #c9564f;
  --border: #eadfce;
  --shadow: 0 10px 30px rgba(58, 46, 44, 0.08);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #201a18;
  --bg-card: #2b2321;
  --text: #f3e9df;
  --text-muted: #b8a99e;
  --border: #3d332f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #201a18;
    --bg-card: #2b2321;
    --text: #f3e9df;
    --text-muted: #b8a99e;
    --border: #3d332f;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
  width: 0%;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.field .optional-tag {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 6px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.emoji-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.emoji-btn {
  font-size: 24px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  cursor: pointer;
}

.emoji-btn.selected {
  border-color: var(--accent);
  background: rgba(232, 130, 124, 0.12);
}

.field-error {
  color: var(--accent-dark);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--accent-dark); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.status-banner {
  background: rgba(232, 130, 124, 0.12);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.status-banner.show { display: block; }

.footer-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 28px;
}

.success-emoji {
  font-size: 56px;
  text-align: center;
  margin-bottom: 8px;
}

.confetti {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.9;
  animation: fall linear forwards;
  pointer-events: none;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.3;
  }
}

@media (max-width: 480px) {
  .card { padding: 20px; }
  h1 { font-size: 24px; }
}
