:root {
  --rm-deep-purple: #3b2648;
  --rm-deep-purple-dark: #291732;
  --rm-soft-beige: #f5efe7;
  --rm-warm-white: #fdfaf7;
  --rm-gold: #d7b56a;
  --rm-gold-soft: #f3e2bf;
  --rm-text: #2a2320;
  --rm-muted: #7a6a62;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #fffaf3 0, #f7f1ea 40%, #f1e6d9 100%);
  color: var(--rm-text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: radial-gradient(circle at top left, #523166 0, #3b2648 40%, #291732 100%);
  color: #fff;
  padding: 2.7rem 1.5rem 2.2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.18) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(215,181,106,0.22) 0, transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.crown {
  font-size: 2.6rem;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw + 1.2rem, 2.7rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subtitle {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.4rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 226, 191, 0.9);
  background: linear-gradient(
    135deg,
    rgba(239, 222, 188, 0.25),
    rgba(255, 255, 255, 0.1)
  );
  font-size: 0.8rem;
}

.badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--rm-gold);
}

.main {
  flex: 1;
  padding: 2.1rem 1.5rem 3rem;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: rgba(253, 250, 247, 0.98);
  border-radius: 1.4rem;
  border: 1px solid rgba(215, 181, 106, 0.45);
  box-shadow: 0 22px 60px rgba(43, 24, 79, 0.12);
  padding: 1.85rem 1.6rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 10% 0%, rgba(246, 225, 189, 0.35) 0, transparent 60%),
    radial-gradient(circle at 100% 75%, rgba(180, 144, 201, 0.35) 0, transparent 60%);
  pointer-events: none;
  opacity: 0.6;
}

.card-inner {
  position: relative;
  z-index: 1;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 1.8rem;
  align-items: center;
}

.intro-text h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: var(--rm-deep-purple-dark);
}

.intro-text p {
  margin: 0.25rem 0;
  font-size: 0.94rem;
  line-height: 1.6;
}

.intro-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.86rem;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.meta-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid rgba(59, 35, 90, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #ffffff;
}

.meta-sub {
  font-size: 0.8rem;
  opacity: 0.8;
  color: var(--rm-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 35, 90, 0.18);
  background: #ffffff;
  color: var(--rm-muted);
}

.btn {
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rm-gold), #f6d88c);
  color: #2c1d10;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(171, 130, 16, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(171, 130, 16, 0.55);
}

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(39, 22, 59, 0.2);
  color: var(--rm-text);
}

.start-btn {
  margin-top: 1.3rem;
}
.quiz.hidden,
.result.hidden {
  display: none;
}

.quiz {
  margin-top: 2rem;
}

.progress-bar {
  width: 100%;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(39, 22, 59, 0.08);
  overflow: hidden;
  margin-bottom: 1.05rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rm-gold), #f6d88c);
  transition: width 0.3s ease;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quiz-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--rm-deep-purple-dark);
}

.quiz-header small {
  font-size: 0.82rem;
  color: var(--rm-muted);
}

.question-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.3rem 1.25rem 1rem;
  border: 1px solid rgba(39, 22, 59, 0.08);
  box-shadow: 0 14px 28px rgba(31, 18, 53, 0.06);
}

.question-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(39, 22, 59, 0.7);
  margin-bottom: 0.35rem;
}

.question-text {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
  opacity: 0.85;
  color: var(--rm-muted);
}

.scale-options {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
}

.scale-options label {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  cursor: pointer;
}

.scale-options input[type="radio"] {
  appearance: none;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  border: 1px solid rgba(39, 22, 59, 0.25);
  background: #fdfbff;
  margin-bottom: 0.23rem;
  display: inline-block;
  position: relative;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.scale-options input[type="radio"]:checked {
  border-color: var(--rm-gold);
  box-shadow: 0 0 0 3px rgba(215, 181, 106, 0.4);
  background: radial-gradient(circle at 30% 30%, #ffffff 0, #f6d88c 60%);
}

.helper-text {
  font-size: 0.8rem;
  margin-top: 0.55rem;
  opacity: 0.85;
  color: var(--rm-muted);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.15rem;
  gap: 0.75rem;
}

.result {
  margin-top: 2.1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 1.8rem;
}

.result-card {
  background: #ffffff;
  border-radius: 1.1rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(39, 22, 59, 0.1);
  box-shadow: 0 16px 32px rgba(39, 22, 59, 0.08);
}

.result-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  color: var(--rm-deep-purple-dark);
}

.result-card p {
  font-size: 0.9rem;
  margin-top: 0.2rem;
  margin-bottom: 0.45rem;
}

.gift-list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.gift-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.gift-name {
  font-weight: 600;
  color: var(--rm-deep-purple-dark);
}

.gift-bar {
  flex: 1;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(39, 22, 59, 0.08);
  overflow: hidden;
  margin: 0 0.3rem;
}

.gift-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rm-gold), #f6d88c);
  width: 0;
  transition: width 0.5s ease;
}

.actions-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.email-input {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(39, 22, 59, 0.25);
  font-size: 0.85rem;
  min-width: 0;
  flex: 1 1 180px;
}

.status-message {
  font-size: 0.8rem;
  margin-top: 0.45rem;
  min-height: 1em;
}

.mail-footnote {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.95rem;
  color: var(--rm-muted);
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  padding: 1.6rem 1rem 1.8rem;
  color: rgba(39, 22, 59, 0.7);
}

@media (max-width: 800px) {
  .intro,
  .result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    padding-inline: 1rem;
  }

  .card {
    padding-inline: 1.25rem;
  }
}