/* مراقبت از خود — Premium Warm Garden Theme */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #10160f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef3ea;
  --muted: rgba(238, 243, 234, 0.62);
  --accent: #3d8b63;
  --accent-soft: #6daf8a;
  --accent-glow: rgba(61, 139, 99, 0.38);
  --sage-dark: #2d6b4a;
  --cream: #f7f4ec;
  --amber: #c9952f;
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Vazirmatn', system-ui, sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 1.02rem;
  line-height: 1.65;
}

body[data-mode="landing"] {
  background: linear-gradient(165deg, #10160f 0%, #141c12 45%, #121a10 100%);
}
body[data-mode="quiz"],
body[data-mode="analyzing"],
body[data-mode="results"] {
  background: linear-gradient(165deg, #10160f, #161e14);
}

/* Background orbs — warm olive / sage / amber */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  animation: orbFloat 22s ease-in-out infinite;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: #3d8b63;
  top: -12%;
  right: -8%;
}
.orb-2 {
  width: 380px;
  height: 380px;
  background: #c9952f;
  bottom: -6%;
  left: -6%;
  animation-delay: -8s;
  opacity: 0.22;
}
.orb-3 {
  width: 320px;
  height: 320px;
  background: #5a7a4a;
  top: 42%;
  left: 28%;
  animation-delay: -15s;
  opacity: 0.18;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.04); }
  66% { transform: translate(-16px, 22px) scale(0.97); }
}

#app { position: relative; z-index: 1; min-height: 100dvh; }

.screen {
  display: none;
  min-height: 100dvh;
  animation: fadeIn 0.5s ease;
}
.screen.active { display: flex; flex-direction: column; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 32px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  min-height: 52px;
}

.btn-primary {
  background: linear-gradient(135deg, #3d8b63, #2d6b4a);
  color: #fff;
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(61, 139, 99, 0.48); }

.btn-glow { animation: btnGlow 3.2s ease-in-out infinite; }
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 8px 32px var(--accent-glow); }
  50% { box-shadow: 0 8px 48px rgba(61, 139, 99, 0.55); }
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 12px;
}
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-card-hover); }

/* ===== LANDING ===== */
#screen-landing {
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.landing-content {
  text-align: center;
  max-width: 560px;
  width: 100%;
  z-index: 2;
}

.logo-ring {
  width: 108px;
  height: 108px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(61, 139, 99, 0.28), rgba(201, 149, 47, 0.08));
  border: 2px solid rgba(109, 175, 138, 0.42);
  display: grid;
  place-items: center;
  color: var(--accent-soft);
  animation: logoPulse 4s ease-in-out infinite;
}

.leaf-svg { width: 54px; height: 54px; }

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 28px rgba(61, 139, 99, 0.22); transform: scale(1); }
  50% { box-shadow: 0 0 56px rgba(61, 139, 99, 0.42); transform: scale(1.03); }
}

.landing-title {
  font-size: clamp(2.1rem, 7vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 25%, #a8d4b8 75%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  color: var(--accent-soft);
  margin: 8px 0 18px;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.landing-desc {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 1rem;
  line-height: 1.85;
}

.landing-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 1.75rem; font-weight: 800; color: var(--accent-soft); }
.stat-label { font-size: 0.88rem; color: var(--muted); }

.landing-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== QUIZ ===== */
.quiz-header {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 22, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.quiz-progress-wrap { flex: 1; min-width: 0; }

.phase-progress { display: flex; gap: 4px; margin-bottom: 10px; }
.phase-seg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
}
.phase-seg-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3d8b63, #6daf8a);
  transition: width 0.4s ease;
}
.phase-seg[data-factor="spiritual"] .phase-seg-fill { background: linear-gradient(90deg, #3d8b63, #6daf8a); }
.phase-seg[data-factor="social"] .phase-seg-fill { background: linear-gradient(90deg, #4a9468, #7ab892); }
.phase-seg[data-factor="physical"] .phase-seg-fill { background: linear-gradient(90deg, #357a55, #5aa87d); }
.phase-seg[data-factor="illness"] .phase-seg-fill { background: linear-gradient(90deg, #2d6b4a, #4a9468); }
.phase-seg.phase-pulse { animation: segPulse 0.5s ease; }
@keyframes segPulse { 50% { box-shadow: 0 0 12px rgba(61, 139, 99, 0.5); } }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  gap: 12px;
}
.phase-label { font-weight: 600; }
.progress-text { color: var(--muted); }

.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px 40px;
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
}

.question-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  backdrop-filter: blur(8px);
  transition: opacity 0.28s, transform 0.28s;
}
.question-card.slide-out { opacity: 0; transform: translateX(-20px); }

.question-dim {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(61, 139, 99, 0.12);
  color: var(--accent-soft);
  margin-bottom: 14px;
}

.question-text {
  font-size: clamp(1.15rem, 3.8vw, 1.38rem);
  font-weight: 600;
  line-height: 1.85;
  margin-bottom: 14px;
}

.likert-hint {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 18px;
}

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

.likert-btn {
  --opt-color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  border-right: 4px solid var(--opt-color);
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  text-align: right;
  transition: var(--transition);
}
.likert-btn:hover {
  background: color-mix(in srgb, var(--opt-color) 10%, transparent);
  border-color: color-mix(in srgb, var(--opt-color) 42%, transparent);
}
.likert-btn.selected {
  background: color-mix(in srgb, var(--opt-color) 16%, transparent);
  border-color: var(--opt-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--opt-color) 18%, transparent);
}

.likert-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  background: color-mix(in srgb, var(--opt-color) 18%, transparent);
  color: var(--opt-color);
  flex-shrink: 0;
}
.likert-btn.selected .likert-num {
  background: var(--opt-color);
  color: #10160f;
}

.likert-label {
  flex: 1;
  font-size: 0.98rem;
  line-height: 1.6;
}

.keyboard-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
.keyboard-hint kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
  font-family: inherit;
  font-size: 0.78rem;
}

/* ===== ANALYZING ===== */
#screen-analyzing { align-items: center; justify-content: center; }

.analyzing-content {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

.leaf-pulse {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  color: var(--accent-soft);
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulseRing 2s ease-out infinite;
}
.pulse-ring.delay-1 { animation-delay: 0.6s; }

@keyframes pulseRing {
  0% { transform: scale(0.82); opacity: 0.75; }
  100% { transform: scale(1.7); opacity: 0; }
}

.pulse-leaf { width: 48px; height: 48px; z-index: 1; }

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESULTS ===== */
.results-container {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 32px) clamp(16px, 4vw, 24px) 60px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s, transform 0.6s;
}
.results-container.results-reveal { opacity: 1; transform: translateY(0); }

.results-hero {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(61, 139, 99, 0.16), rgba(201, 149, 47, 0.06));
  border: 1px solid rgba(109, 175, 138, 0.24);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent) 0%, transparent 62%);
  opacity: 0.12;
  pointer-events: none;
}

.results-brand {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
  position: relative;
}

.level-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
}

#level-title {
  font-size: clamp(1.45rem, 4.5vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
  background: linear-gradient(135deg, #fff 20%, #a8d4b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#level-summary {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 18px;
  position: relative;
}

.spectrum-wrap { max-width: 420px; margin: 0 auto; position: relative; }
.spectrum-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.spectrum-track {
  position: relative;
  height: 10px;
  background: linear-gradient(90deg, #c9952f, #3d8b63, #2d6b4a);
  border-radius: 10px;
}
.spectrum-fill {
  position: absolute;
  inset: 0;
  right: 0;
  left: auto;
  width: 100%;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 10px;
  transition: width 1s;
}
.spectrum-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
  transform: translate(50%, -50%);
  transition: right 1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.score-detail-text {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.factors-section, .quadrant-section, .bars-section { margin-bottom: 22px; }

.quadrant-svg { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.quadrant-label { font-size: 10px; font-family: var(--font); font-weight: 600; }
.quadrant-data { animation: quadReveal 1s ease forwards; transform-origin: center; }
@keyframes quadReveal {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.factor-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.factor-card {
  --fc: #3d8b63;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.factor-card--strong { border-color: rgba(109, 175, 138, 0.45); }
.factor-card--focus { border-color: rgba(201, 149, 47, 0.42); }

.ftag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.58rem;
  padding: 2px 6px;
  border-radius: 6px;
}
.ftag.strong { background: rgba(61, 139, 99, 0.18); color: var(--accent-soft); }
.ftag.focus { background: rgba(201, 149, 47, 0.18); color: #e8c06a; }

.factor-icon { font-size: 1.3rem; display: block; margin-bottom: 6px; }
.factor-card h4 { font-size: 0.72rem; line-height: 1.4; margin-bottom: 8px; }
.factor-dots { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }
.fdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.fdot.on { background: var(--fc, var(--accent)); }
.factor-lvl { font-size: 0.68rem; color: var(--muted); }

.factor-bars { display: flex; flex-direction: column; gap: 14px; }

.factor-bar-row {
  --fc: #3d8b63;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  border-right: 3px solid var(--fc);
}
.factor-bar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.factor-bar-icon { font-size: 1.15rem; }
.factor-bar-name { flex: 1; font-size: 0.95rem; font-weight: 600; }
.factor-bar-lvl { font-size: 0.82rem; color: var(--fc); font-weight: 600; }
.factor-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.factor-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fc), color-mix(in srgb, var(--fc) 55%, white));
  border-radius: 8px;
  transition: width 1s ease;
}
.factor-bar-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }

.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.hl-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.hl-block h4 { font-size: 0.95rem; margin-bottom: 10px; }
.hl-block ul { list-style: none; font-size: 0.92rem; color: var(--muted); }
.hl-block li { padding: 5px 0; }
.hl-block--grow { border-color: rgba(201, 149, 47, 0.32); }

.insight-text {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--muted);
  padding: 18px;
  background: var(--bg-card);
  border-radius: 14px;
  border-right: 3px solid var(--accent);
  margin-bottom: 18px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  border-right: 3px solid var(--accent-soft);
}
.action-card h3 { font-size: 1rem; margin-bottom: 10px; }
.action-sub { font-size: 0.92rem; color: var(--muted); margin-bottom: 12px; }
.action-card ul { list-style: none; font-size: 0.92rem; color: var(--muted); }
.action-card li { padding: 5px 0 5px 14px; position: relative; }
.action-card li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.disclaimer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer-sub {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(238, 243, 234, 0.38);
  margin-top: 8px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: #161e14;
  border: 1px solid rgba(109, 175, 138, 0.28);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  animation: modalIn 0.4s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-card h2 {
  font-size: 1.35rem;
  margin-bottom: 18px;
  text-align: center;
}
.modal-card ul {
  list-style: none;
  margin-bottom: 22px;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.8;
}
.modal-card li {
  padding: 7px 16px 7px 0;
  position: relative;
}
.modal-card li::before {
  content: '•';
  position: absolute;
  right: 0;
  color: var(--accent-soft);
}
.modal-card .btn-primary { width: 100%; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 30, 20, 0.96);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.95rem;
  z-index: 200;
  backdrop-filter: blur(12px);
}
.toast.hidden { display: none; }

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 100;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color .25s, background .25s, border-color .25s, transform .25s;
}
.theme-toggle:hover { transform: translateY(-2px); background: var(--bg-card-hover); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent-glow); outline-offset: 3px; }

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .25s, transform .35s;
}
.theme-icon--moon { opacity: 0; transform: rotate(-30deg) scale(.65); }
[data-theme="light"] .theme-icon--sun { opacity: 0; transform: rotate(45deg) scale(.65); }
[data-theme="light"] .theme-icon--moon { opacity: 1; transform: rotate(0) scale(1); }

body[data-mode="quiz"] .quiz-header { padding-left: 76px; }

/* Results stagger */
.results-container > * {
  animation: resultFade 0.6s ease backwards;
}
.results-hero { animation-delay: 0.08s; }
.quadrant-section { animation-delay: 0.14s; }
.factors-section { animation-delay: 0.2s; }
.bars-section { animation-delay: 0.26s; }
.highlights { animation-delay: 0.32s; }
.insight-text { animation-delay: 0.38s; }
.action-card { animation-delay: 0.44s; }
.results-actions { animation-delay: 0.5s; }

@keyframes resultFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (min-width: 640px) {
  .likert-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
  .likert-btn {
    flex-direction: column;
    text-align: center;
    min-height: 120px;
    padding: 16px 10px;
    border-right: 2px solid var(--border);
    border-top: 4px solid var(--opt-color);
  }
  .results-actions { flex-direction: row; justify-content: center; }
  .btn-primary, .btn-secondary { min-width: 200px; }
}

@media (max-width: 640px) {
  .factor-cards { grid-template-columns: repeat(2, 1fr); }
  .highlights { grid-template-columns: 1fr; }
  .btn-primary, .btn-secondary { width: 100%; }
  .landing-stats { gap: 22px; }
  .question-card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .logo-ring, .orb {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== LIGHT THEME (primary — elderly-friendly) ===== */
[data-theme="light"] {
  --bg: #f7f4ec;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --border: rgba(45, 80, 55, 0.16);
  --text: #1a2e1f;
  --muted: rgba(26, 46, 31, 0.72);
  --accent: #3d8b63;
  --accent-soft: #2d6b4a;
  --accent-glow: rgba(61, 139, 99, 0.22);
  --chart-grid: rgba(45, 80, 55, 0.14);
}

[data-theme="light"] body {
  background: linear-gradient(165deg, #f7f4ec 0%, #f3efe4 52%, #ebe6d8 100%);
  color: var(--text);
}
[data-theme="light"] body[data-mode="landing"] {
  background: linear-gradient(165deg, #f7f4ec 0%, #f3efe4 48%, #ebe6d8 100%);
}
[data-theme="light"] body[data-mode="quiz"],
[data-theme="light"] body[data-mode="analyzing"],
[data-theme="light"] body[data-mode="results"] {
  background: linear-gradient(165deg, #f7f4ec, #f3efe4);
}

[data-theme="light"] .orb {
  filter: blur(120px);
  opacity: 0.1;
}
[data-theme="light"] .orb-1 { background: #3d8b63; }
[data-theme="light"] .orb-2 { background: #d4a853; opacity: 0.08; }
[data-theme="light"] .orb-3 { background: #8aab72; opacity: 0.07; }

[data-theme="light"] .logo-ring {
  background: linear-gradient(135deg, rgba(61, 139, 99, 0.14), rgba(212, 168, 83, 0.08));
  border-color: rgba(61, 139, 99, 0.35);
  color: #2d6b4a;
  box-shadow: 0 12px 40px rgba(61, 139, 99, 0.12);
}

[data-theme="light"] .landing-title {
  background: linear-gradient(135deg, #1a2e1f 15%, #2d6b4a 55%, #3d8b63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .landing-sub,
[data-theme="light"] .stat-num { color: #2d6b4a; }

[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.92);
  color: #1a2e1f;
  box-shadow: 0 8px 28px rgba(45, 80, 55, 0.1);
}

[data-theme="light"] .quiz-header {
  background: rgba(247, 244, 236, 0.92);
  box-shadow: 0 1px 0 rgba(45, 80, 55, 0.06);
}
[data-theme="light"] .phase-seg { background: rgba(45, 80, 55, 0.1); }
[data-theme="light"] .question-dim {
  background: rgba(61, 139, 99, 0.1);
  color: #2d6b4a;
}

[data-theme="light"] .question-card,
[data-theme="light"] .results-hero,
[data-theme="light"] .factor-card,
[data-theme="light"] .factor-bar-row,
[data-theme="light"] .hl-block,
[data-theme="light"] .insight-text,
[data-theme="light"] .action-card {
  box-shadow: 0 12px 36px rgba(45, 80, 55, 0.07);
}

[data-theme="light"] .likert-btn {
  background: rgba(255, 255, 255, 0.75);
  color: #1a2e1f;
}
[data-theme="light"] .likert-btn.selected .likert-num { color: #fff; }

[data-theme="light"] .fdot { background: rgba(45, 80, 55, 0.15); }

[data-theme="light"] .results-hero {
  background: linear-gradient(135deg, rgba(61, 139, 99, 0.1), rgba(212, 168, 83, 0.06));
  border-color: rgba(61, 139, 99, 0.22);
}
[data-theme="light"] #level-title {
  background: linear-gradient(135deg, #1a2e1f, #2d6b4a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .spectrum-fill { background: rgba(255, 255, 255, 0.58); }
[data-theme="light"] .ftag.strong { color: #2d6b4a; }
[data-theme="light"] .ftag.focus { color: #9a6b12; }

[data-theme="light"] .modal-backdrop { background: rgba(26, 46, 31, 0.4); }
[data-theme="light"] .modal-card,
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(45, 80, 55, 0.16);
}
[data-theme="light"] .disclaimer-sub { color: rgba(26, 46, 31, 0.5); }
