:root {
  --bg: #09090f;
  --bg2: #0e0e18;
  --surface: rgba(18, 18, 30, 0.85);
  --surface2: rgba(25, 25, 42, 0.7);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(192, 132, 252, 0.3);
  --text: #e2e8f0;
  --text-secondary: rgba(255, 255, 255, 0.4);
  --accent: #c084fc;
  --accent-hover: #a855f7;
  --accent-dim: rgba(192, 132, 252, 0.08);
  --accent-glow: rgba(192, 132, 252, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.08);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.08);
  --gold: #fbbf24;
  --blue: #60a5fa;
  --radius: 16px;
  --radius-sm: 10px;
  --glass: backdrop-filter: blur(12px);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient background glows ── */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(120, 60, 200, 0.12), transparent 70%);
}
.bg-glow-2 {
  width: 500px; height: 500px;
  bottom: -150px; left: -100px;
  background: radial-gradient(circle, rgba(60, 20, 120, 0.1), transparent 70%);
}

.app {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* ── Header ── */
header {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.logo-mark {
  font-size: 2rem;
  background: linear-gradient(135deg, #c084fc, #f0abfc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e2e8f0, #c084fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.4rem;
  letter-spacing: 0.15em;
  font-weight: 300;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.tab {
  flex: 1;
  padding: 0.65rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
.tab-icon { font-size: 0.7rem; }
.tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab.active {
  background: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(129,140,248,0.08));
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(192,132,252,0.08);
}

/* ── Section hero ── */
.section-hero {
  padding: 1.5rem 0 1rem;
}
.section-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-hero-sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(255,255,255,0.1); }
.card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.2rem 0 0.5rem;
  color: var(--text);
}
.hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select, input, textarea {
  background: rgba(15, 15, 28, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(192,132,252,0.1);
}
textarea { resize: vertical; }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 0.5rem;
  box-shadow: 0 4px 24px rgba(124,58,237,0.25);
  letter-spacing: 0.02em;
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(124,58,237,0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary.loading::after {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: 8px;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-sm {
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-sm:hover { border-color: var(--border-hover); color: var(--accent); }
.btn-accent {
  border-color: rgba(192,132,252,0.2);
  color: var(--accent);
  background: rgba(192,132,252,0.06);
}
.btn-accent:hover {
  background: rgba(192,132,252,0.12);
  border-color: rgba(192,132,252,0.35);
}

/* ══ Zodiac ══ */
.zodiac-hero {
  background: linear-gradient(135deg, rgba(30, 15, 60, 0.6), rgba(15, 10, 40, 0.4));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
}
.zodiac-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.zodiac-greeting {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.4rem;
}

.zodiac-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.zodiac-sign-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  color: var(--text);
  font-size: 0.85rem;
}
.zodiac-sign-btn:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.zodiac-sign-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 24px rgba(192,132,252,0.1);
}
.zodiac-sign-emoji { font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }
.zodiac-sign-name { font-size: 0.82rem; font-weight: 500; }

/* Fortune card */
.fortune-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}
.fortune-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.fortune-emoji { font-size: 2.5rem; }
.fortune-title-area { flex: 1; }
.fortune-title-area h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.2rem; }
.fortune-overall {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-checkin {
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-checkin:hover { box-shadow: 0 4px 16px rgba(124,58,237,0.3); }
.btn-checkin.done {
  background: rgba(74,222,128,0.15);
  color: var(--green);
  cursor: default;
}

.fortune-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.score-item {
  text-align: center;
  padding: 0.8rem 0.5rem;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.score-label { font-size: 0.75rem; color: var(--text-secondary); display: block; margin-bottom: 0.3rem; }
.score-bar-wrap { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin: 0.4rem 0; }
.score-bar { height: 100%; border-radius: 2px; transition: width 0.8s ease; }
.score-value { font-size: 1rem; font-weight: 700; }

.fortune-section { margin-bottom: 1.2rem; }
.fortune-section h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: rgba(255,255,255,0.7); }
.fortune-section p { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.7; }
.fortune-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fortune-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
}
.fortune-do .fortune-tag { background: var(--green-dim); color: var(--green); border: 1px solid rgba(74,222,128,0.15); }
.fortune-dont .fortune-tag { background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,0.15); }

.fortune-lucky {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.lucky-item {
  padding: 0.4rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.lucky-item span { color: var(--gold); font-weight: 600; }

/* Match */
.match-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
}
.match-select {
  flex: 1;
  background: rgba(15,15,28,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  color: var(--text);
  font-size: 0.85rem;
}
.match-vs {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

#match-result {
  margin-top: 1rem;
  padding: 1.2rem;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
#match-result .match-score-big {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}
#match-result p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ── Stage selector ── */
.stage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
}
.stage-card {
  background: rgba(15,15,28,0.6);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.25s;
}
.stage-card:hover { border-color: var(--border-hover); }
.stage-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(192,132,252,0.08);
}
.stage-card .stage-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.stage-card .stage-desc { font-size: 0.75rem; color: var(--text-secondary); }

/* ── Practice grid ── */
.practice-grid { display: flex; flex-direction: column; gap: 1rem; }
.practice-category {
  background: rgba(15,15,28,0.5);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}
.practice-category h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.practice-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.practice-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
  color: var(--text);
}
.practice-chip:hover { border-color: var(--border-hover); }
.practice-chip.selected {
  background: var(--accent-dim);
  border-color: rgba(192,132,252,0.4);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(192,132,252,0.08);
}
.practice-chip .risk {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 600;
}
.risk-1 { background: rgba(74,222,128,0.15); color: #4ade80; }
.risk-2 { background: rgba(96,165,250,0.15); color: #60a5fa; }
.risk-3 { background: rgba(251,191,36,0.15); color: #fbbf24; }
.risk-4 { background: rgba(251,146,60,0.15); color: #fb923c; }
.risk-5 { background: rgba(248,113,113,0.15); color: #f87171; }

/* ── Chat ── */
.chat-input-pair {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.chat-input-pair .form-group { flex: 1; }
.arrow {
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 1.2rem;
  opacity: 0.5;
}

.session-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}
.session-bar-left { display: flex; gap: 0.5rem; align-items: center; }
.badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 12px;
  font-weight: 500;
}
.badge-dim { opacity: 0.5; }

.session-list { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.session-item {
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.session-item:hover { border-color: var(--border-hover); }
.session-item.active { border-color: var(--accent); background: var(--accent-dim); }
.session-name { font-weight: 600; color: var(--text); }
.session-meta { font-size: 0.7rem; color: var(--text-secondary); }
.session-empty { color: var(--text-secondary); font-size: 0.8rem; padding: 0.5rem 0; }

.chat-timeline {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.timeline-empty {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 0;
}
.timeline-turn {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.timeline-turn:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.turn-header {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.turn-bubble {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}
.turn-label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.1rem;
}
.turn-user .turn-label { background: var(--accent-dim); color: var(--accent); }
.turn-partner .turn-label { background: rgba(96,165,250,0.1); color: #60a5fa; }
.turn-chosen .turn-label { background: var(--green-dim); color: var(--green); }
.turn-text { color: var(--text); line-height: 1.5; }

.chosen-reply-bar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  align-items: center;
}
.chosen-reply-bar input { flex: 1; }

/* ── Result area ── */
.result-area {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.result-header h2 { font-size: 1rem; font-weight: 600; }

.markdown-body {
  padding: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.85;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin: 1.5rem 0 0.8rem;
  font-weight: 600;
}
.markdown-body h1 { font-size: 1.3rem; }
.markdown-body h2 { font-size: 1.1rem; color: var(--accent); }
.markdown-body h3 { font-size: 1rem; }
.markdown-body p { margin-bottom: 0.8rem; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }
.markdown-body li { margin-bottom: 0.3rem; }
.markdown-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 0.8rem 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.markdown-body code {
  background: rgba(192,132,252,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}
.markdown-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  text-align: left;
  font-size: 0.85rem;
}
.markdown-body th { background: rgba(255,255,255,0.03); font-weight: 600; }

/* ── Quiz ── */
.quiz-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.quiz-category h3 {
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.quiz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.25s;
}
.quiz-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.quiz-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; }
.quiz-card-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.6rem; line-height: 1.4; }
.quiz-card-meta { font-size: 0.7rem; color: var(--accent); }

.quiz-header { margin-bottom: 1.5rem; }
.quiz-header h2 { margin: 0.8rem 0; font-size: 1.1rem; }
.quiz-progress-wrap { display: flex; align-items: center; gap: 0.8rem; }
.quiz-question { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.quiz-q-number { font-size: 0.75rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.quiz-q-text { font-size: 1.05rem; font-weight: 500; margin-bottom: 1.2rem; line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option {
  padding: 0.8rem 1rem;
  background: rgba(15,15,28,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  color: var(--text);
}
.quiz-option:hover { border-color: var(--border-hover); background: var(--accent-dim); }
.quiz-option:active { transform: scale(0.99); }

/* Quiz results */
.result-chart { margin-bottom: 1.5rem; }
.result-dim { margin-bottom: 0.8rem; }
.dim-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.3rem; }
.dim-score { color: var(--text-secondary); font-size: 0.8rem; }
.dim-bar-wrap { height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.dim-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f0abfc);
  border-radius: 3px;
  transition: width 0.8s ease;
}
.result-primary, .result-secondary {
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.result-primary h3 { color: var(--accent); font-size: 1rem; margin-bottom: 0.5rem; }
.result-secondary h3 { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.5rem; }
.result-advice { color: var(--gold); font-size: 0.85rem; margin-top: 0.5rem; }

.scale-result { text-align: center; padding: 1rem 0; }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.scale-bar {
  position: relative; height: 10px;
  background: linear-gradient(90deg, #8b5cf6, #a855f7, #f97316, #ef4444);
  border-radius: 5px;
  margin-bottom: 1.5rem;
}
.scale-marker { position: absolute; top: -8px; transform: translateX(-50%); }
.marker-score {
  display: block; background: #fff; color: #000; font-weight: 700;
  font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.scale-verdict { margin-top: 1rem; }
.scale-verdict h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.sas-result { text-align: center; padding: 1rem 0; }
.sas-score { margin-bottom: 1rem; }
.sas-number { font-size: 3rem; font-weight: 700; }
.sas-label { display: block; font-size: 0.8rem; color: var(--text-secondary); }
.sas-verdict {
  border-left: 4px solid; padding: 1rem; text-align: left;
  background: rgba(255,255,255,0.02); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}
.sas-verdict h3 { margin-bottom: 0.5rem; }
.sas-note { font-size: 0.8rem; color: var(--gold); }

/* ── Checklist ── */
.checklist { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.checklist-item {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.8rem; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s; border: 1px solid transparent;
}
.checklist-item:hover { border-color: var(--border); }
.checklist-item.done { opacity: 0.6; border-color: rgba(74,222,128,0.2); }
.check-box {
  width: 22px; height: 22px; min-width: 22px;
  border: 2px solid rgba(255,255,255,0.15); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--green); font-weight: 700; margin-top: 0.1rem;
}
.checklist-item.done .check-box { border-color: var(--green); background: var(--green-dim); }
.check-topic { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.check-question { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.checklist-progress { display: flex; align-items: center; gap: 0.8rem; }
.progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.progress-text { font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }

/* ── Equipment ── */
.equipment-grid { display: flex; flex-direction: column; gap: 1rem; }
.equipment-section h4 { font-size: 0.82rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; }
.equipment-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.8rem; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); margin-bottom: 0.3rem; font-size: 0.85rem;
  border: 1px solid var(--border);
}
.equipment-item.essential { border-left: 3px solid var(--red); }
.eq-name { font-weight: 500; }
.eq-for { font-size: 0.75rem; color: var(--text-secondary); }
.equipment-total { text-align: right; font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.5rem; }

/* ── Relationship timeline ── */
.stage-progress { display: flex; align-items: center; padding: 1rem 0; }
.stage-dot { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.stage-dot .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
}
.stage-dot.active .dot {
  background: var(--dot-color, var(--accent));
  border-color: var(--dot-color, var(--accent));
  box-shadow: 0 0 8px var(--dot-color, var(--accent));
}
.stage-label { font-size: 0.65rem; color: var(--text-secondary); text-align: center; max-width: 60px; }
.stage-dot.active .stage-label { color: var(--text); font-weight: 500; }
.stage-line {
  flex: 1; height: 2px; background: rgba(255,255,255,0.06);
  margin: 0 0.3rem; margin-bottom: 1.5rem; transition: background 0.3s;
}
.stage-line.active { background: var(--accent); }

.milestones { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.milestone {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.5rem 0.8rem; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem;
}
.ms-date { font-size: 0.75rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.ms-text { flex: 1; }
.ms-delete { color: var(--text-secondary); cursor: pointer; font-size: 1.1rem; padding: 0 0.3rem; }
.ms-delete:hover { color: var(--red); }
.milestone-input { display: flex; gap: 0.5rem; align-items: center; }
.milestone-input input[type="date"] { width: 140px; }
.milestone-input input[type="text"] { flex: 1; }

/* ── Conflict warnings ── */
.conflict-warnings { margin-top: 0.8rem; border-radius: var(--radius-sm); overflow: hidden; }
.conflict-item {
  padding: 0.6rem 1rem;
  background: rgba(251,191,36,0.05);
  border-left: 3px solid var(--gold);
  color: var(--gold);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 2px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .app { padding: 1rem 1rem 4rem; }
  header h1 { font-size: 1.6rem; }
  .tabs { flex-wrap: wrap; }
  .tab { font-size: 0.75rem; padding: 0.5rem 0.3rem; }
  .tab-icon { display: none; }
  .chat-input-pair { flex-direction: column; }
  .arrow { transform: rotate(90deg); margin: 0; }
  .zodiac-sign-grid { grid-template-columns: repeat(4, 1fr); }
}
