:root {
  --rose: #c65b7c;
  --rose-dark: #9c3f5e;
  --gold: #c9a24b;
  --ink: #2b2320;
  --paper: #ffffff;
  --card: #fff8f4;
  --muted: #7a6f6a;
  --error: #d9364a;
  --success: #2fa860;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

#app {
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(198, 91, 124, 0.25);
  border-radius: 18px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ring-icon {
  font-size: 2.5rem;
  line-height: 1;
  align-self: center;
}

h1 {
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
  color: var(--rose-dark);
}

h2 {
  font-size: 1.15rem;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.5;
}

.category-label {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.round-instruction {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(198, 91, 124, 0.18);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--rose);
  transition: width 0.2s ease;
}

button {
  font: inherit;
  cursor: pointer;
}

.btn {
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--rose);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 20px;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:hover {
  background: var(--rose-dark);
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-btn {
  min-height: 48px;
  text-align: left;
  border: 2px solid rgba(198, 91, 124, 0.35);
  border-radius: 12px;
  background: white;
  padding: 12px 16px;
  font-size: 1rem;
}

.choice-btn:hover {
  border-color: var(--rose);
}

.choice-btn.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 75, 0.12);
}

.feedback {
  font-size: 0.95rem;
  min-height: 1.3em;
}

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

.reveal-title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--rose-dark);
}

.match-percent {
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  color: var(--rose-dark);
}

.breakdown-line {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.reveal-hint {
  background: white;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  padding: 18px;
  font-size: 1.1rem;
  text-align: center;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.reset-link {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .choice-btn, .bar-fill {
    transition: none;
  }
}
