/*
 * 思慕星语 — Premium Cosmic Design
 */

:root {
  --bg: #0c0c1d;
  --card: rgba(18, 18, 42, 0.75);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-hover: rgba(255, 255, 255, 0.1);
  --input: rgba(12, 12, 30, 0.8);
  --text: #c8cad0;
  --text-dim: rgba(255, 255, 255, 0.35);
  --text-bright: #eef0f4;
  --accent: #a78bfa;
  --accent2: #818cf8;
  --purple: #c084fc;
  --warm: #e0a84c;
  --green: #6ee7b7;
  --red: #fca5a5;
  --rose: #f9a8d4;
  --blue: #93c5fd;
  --gold: #fcd34d;
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
@media (hover: none) and (pointer: coarse) {
  select, input, textarea { font-size: 16px !important; }
}

/* ═══ Cosmic background ═══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 500px at 15% 15%, rgba(100, 60, 200, 0.1), transparent),
    radial-gradient(ellipse 500px 400px at 85% 75%, rgba(80, 40, 180, 0.07), transparent),
    radial-gradient(ellipse 400px 350px at 50% 50%, rgba(60, 30, 140, 0.04), transparent),
    linear-gradient(180deg, #0c0c1d 0%, #100f28 50%, #0c0c1d 100%);
  z-index: 0;
  pointer-events: none;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.stars span {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 4s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%   { opacity: 0.1; transform: scale(0.8); }
  100% { opacity: 0.7; transform: scale(1.2); }
}

.bg-glow { display: none; }

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

/* ═══ Header ═══ */
header {
  text-align: center;
  padding: 4rem 0 2.5rem;
}
.logo-mark {
  display: inline-block;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logo-glow 4s ease-in-out infinite;
}
@keyframes logo-glow {
  0%, 100% { opacity: 0.5; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
}
header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 0.6rem;
  letter-spacing: 0.2em;
  font-weight: 300;
}

/* ═══ Tabs ═══ */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(15, 15, 35, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(20px);
}
.tab {
  flex: 1;
  padding: 0.65rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: rgba(255, 255, 255, 0.6); }
.tab-locked { position: relative; }
.tab-locked .lock-icon { font-size: 0.6em; margin-left: 2px; opacity: 0.6; }
.tab.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(129, 140, 248, 0.1));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.1), inset 0 0 0 1px rgba(167, 139, 250, 0.12);
}
.tab-icon { display: none; }

/* ═══ Animations ═══ */
.tab-content { animation: fadeUp 0.5s var(--ease); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ Section hero ═══ */
.section-hero {
  margin-bottom: 2rem;
  padding: 2rem 2.5rem;
  background: linear-gradient(135deg, rgba(25, 15, 55, 0.4), rgba(12, 10, 30, 0.2));
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.section-hero::before {
  content: '✦';
  position: absolute;
  top: 20%;
  right: 10%;
  font-size: 0.9rem;
  color: rgba(167, 139, 250, 0.12);
  animation: logo-glow 5s ease-in-out infinite;
}
.section-hero-title {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-hero-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

/* ═══ Cards ═══ */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 2rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(20px);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover {
  border-color: var(--card-hover);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
}
.card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.5rem 0 0.7rem;
  color: var(--text);
}
.hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

/* ═══ Forms ═══ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

select, input, textarea {
  background: var(--input);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 0.72rem 1rem;
  color: var(--text-bright);
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.3s var(--ease);
}
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.2rem;
  cursor: pointer;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.06);
}
select option {
  background: #1a1a3e;
  color: var(--text-bright);
}
input[type="date"] {
  color-scheme: dark;
}
.bc-date-selects,
.bc-time-selects {
  display: flex;
  gap: 0.4rem;
}
.bc-date-selects select,
.bc-time-selects select {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  padding: 0.5rem 1.6rem 0.5rem 0.5rem;
  background-position: right 6px center;
}
textarea { resize: vertical; }

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

.btn-sm {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 50px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn-sm:hover { border-color: rgba(255, 255, 255, 0.15); color: var(--text); }
.btn-accent {
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--accent);
}
.btn-accent:hover { border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.05); }

/* ═══════════ ZODIAC ═══════════ */
.zodiac-hero {
  text-align: center;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(30, 15, 60, 0.4), rgba(15, 10, 35, 0.2));
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.zodiac-hero::before {
  content: '✦';
  position: absolute;
  top: 25%;
  left: 12%;
  font-size: 1rem;
  color: rgba(167, 139, 250, 0.1);
  animation: logo-glow 4s ease-in-out infinite;
}
.zodiac-hero::after {
  content: '✦';
  position: absolute;
  bottom: 20%;
  right: 10%;
  font-size: 0.7rem;
  color: rgba(129, 140, 248, 0.08);
  animation: logo-glow 3s ease-in-out 1s infinite;
}
.zodiac-date {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.18em;
}
.zodiac-greeting {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

.zodiac-sign-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.zodiac-sign-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.zodiac-sign-btn:hover {
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.zodiac-sign-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(129, 140, 248, 0.06));
  box-shadow: 0 0 25px rgba(167, 139, 250, 0.1);
}
.zodiac-sign-emoji { font-size: 1.6rem; display: block; margin-bottom: 0.35rem; }
.zodiac-sign-name { font-size: 0.78rem; font-weight: 600; }

/* Fortune */
.fortune-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  animation: fadeUp 0.4s var(--ease);
}
.fortune-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-bottom: 1.8rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--card-border);
}
.fortune-emoji { font-size: 2.8rem; }
.fortune-title-area { flex: 1; }
.fortune-title-area h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--text-bright);
}
.fortune-overall {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warm), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-checkin {
  padding: 0.55rem 1.3rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.2);
}
.btn-checkin:hover { box-shadow: 0 5px 20px rgba(124, 58, 237, 0.3); transform: translateY(-1px); }
.btn-checkin.done { background: rgba(110, 231, 183, 0.1); color: var(--green); box-shadow: none; cursor: default; }

.fortune-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.score-item {
  text-align: center;
  padding: 1rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
}
.score-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}
.score-bar-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  margin: 0.5rem 0;
  overflow: hidden;
}
.score-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 1s var(--ease);
}
.score-value {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fortune-body { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.fortune-section {}
.fortune-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}
.fortune-section p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.8;
}
.fortune-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fortune-tag {
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}
.fortune-do .fortune-tag {
  background: rgba(110, 231, 183, 0.06);
  color: var(--green);
  border: 1px solid rgba(110, 231, 183, 0.12);
}
.fortune-dont .fortune-tag {
  background: rgba(252, 165, 165, 0.06);
  color: var(--red);
  border: 1px solid rgba(252, 165, 165, 0.12);
}
.fortune-lucky { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lucky-item {
  padding: 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}
.lucky-item span { color: var(--warm); font-weight: 600; }

/* Match - premium design */
.match-card {
  background: linear-gradient(135deg, rgba(30, 15, 60, 0.5), rgba(18, 12, 45, 0.7));
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.match-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(249, 168, 212, 0.04), transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(167, 139, 250, 0.04), transparent 50%);
  pointer-events: none;
}
.match-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}
.match-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.3rem;
}
.match-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
}
.match-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
}
.match-side {
  flex: 1;
  text-align: center;
}
.match-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}
.match-select-fancy {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(15, 12, 35, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 12px;
  color: var(--text-bright);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(167,139,250,0.5)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2rem;
}
.match-select-fancy:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.08);
}
.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}
.match-heart {
  font-size: 2rem;
  color: var(--rose);
  animation: heart-pulse 2s ease-in-out infinite;
}
@keyframes heart-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}
.match-btn {
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, rgba(249, 168, 212, 0.15), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(249, 168, 212, 0.2);
  border-radius: 50px;
  color: var(--rose);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.match-btn:hover {
  background: linear-gradient(135deg, rgba(249, 168, 212, 0.2), rgba(167, 139, 250, 0.2));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(249, 168, 212, 0.12);
}

#match-result {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  animation: fadeUp 0.5s var(--ease);
  position: relative;
}
#match-result .match-score-big {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #f9a8d4, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}
#match-result p { font-size: 0.88rem; color: rgba(255, 255, 255, 0.55); line-height: 1.8; margin-bottom: 0.6rem; }
.match-result-header {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 2rem;
}
.match-score-unit {
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.5;
}
.match-score-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  margin: 0.8rem 0;
  overflow: hidden;
}
.match-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.2s var(--ease);
}
.match-score-label {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}
.match-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.match-detail-item {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  text-align: center;
}
.match-detail-icon { font-size: 1.2rem; margin-bottom: 0.5rem; }
.match-detail-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.match-detail-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}
.match-advice {
  padding: 1.2rem;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.04), rgba(249, 168, 212, 0.04));
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent);
}
.match-advice p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  margin: 0;
}
.match-ai-analysis {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  font-size: 0.88rem; line-height: 1.8; color: var(--text);
}
.match-ai-analysis h2 { font-size: 1.05rem; color: var(--text-bright); margin: 1.2rem 0 0.5rem; font-weight: 700; }
.match-ai-analysis h2:first-child { margin-top: 0; }
.match-ai-analysis h3 { font-size: 0.95rem; color: var(--accent-light); margin: 1rem 0 0.4rem; }
.match-ai-analysis p { margin: 0.4rem 0; }
.match-ai-analysis ul, .match-ai-analysis ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.match-ai-analysis li { margin-bottom: 0.3rem; }
.match-ai-analysis strong { color: var(--text-bright); }

/* ═══════════ STAGES ═══════════ */
.stage-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.7rem; }
.stage-card {
  background: rgba(10, 10, 28, 0.4);
  border: 2px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.stage-card:hover { border-color: rgba(167, 139, 250, 0.2); transform: translateY(-2px); }
.stage-card.selected {
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.05);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.06);
}
.stage-card .stage-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; color: var(--text-bright); }
.stage-card .stage-desc { font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; }

/* ═══════════ PRACTICE ═══════════ */
.practice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .practice-grid { grid-template-columns: 1fr; } }
.practice-category {
  background: rgba(10, 10, 28, 0.35);
  border-radius: var(--r-sm);
  padding: 1.2rem;
  border: 1px solid var(--card-border);
}
.practice-category h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.practice-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.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(--card-border);
  border-radius: 50px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  user-select: none;
  color: var(--text);
}
.practice-chip:hover { border-color: rgba(167, 139, 250, 0.2); }
.practice-chip.selected {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--accent);
}
.practice-chip .risk { font-size: 0.58rem; padding: 0.1rem 0.25rem; border-radius: 3px; font-weight: 600; }
.risk-1 { background: rgba(110, 231, 183, 0.1); color: var(--green); }
.risk-2 { background: rgba(147, 197, 253, 0.1); color: var(--blue); }
.risk-3 { background: rgba(252, 211, 77, 0.1); color: var(--gold); }
.risk-4 { background: rgba(251, 146, 60, 0.1); color: #fb923c; }
.risk-5 { background: rgba(252, 165, 165, 0.1); color: var(--red); }

/* ═══════════ CHAT ═══════════ */
.chat-input-pair { display: flex; align-items: stretch; gap: 1rem; margin-top: 1rem; }
.chat-input-pair .form-group { flex: 1; }
.arrow { font-size: 1.3rem; color: var(--accent); margin-top: 2rem; opacity: 0.35; }

.session-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.session-bar-left { display: flex; gap: 0.5rem; align-items: center; }
.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(167, 139, 250, 0.06);
  color: var(--accent);
  border-radius: 50px;
  font-weight: 500;
}
.badge-dim { opacity: 0.5; }

.session-list { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.session-item {
  padding: 0.5rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  position: relative;
}
.session-item:hover { border-color: rgba(255, 255, 255, 0.12); }
.session-item.active { border-color: var(--accent); background: rgba(167, 139, 250, 0.05); }
.session-name { font-weight: 600; color: var(--text-bright); }
.session-meta { font-size: 0.68rem; color: var(--text-dim); }
.session-del {
  position: absolute; top: 4px; right: 6px;
  font-size: 0.7rem; color: var(--text-dim); cursor: pointer;
  opacity: 0; transition: opacity 0.2s, color 0.2s;
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.session-item:hover .session-del { opacity: 1; }
.session-del:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.session-empty { color: var(--text-dim); font-size: 0.82rem; padding: 0.5rem 0; }

.chat-timeline {
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 1.2rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  backdrop-filter: blur(12px);
}
.timeline-empty { color: var(--text-dim); font-size: 0.85rem; text-align: center; padding: 2.5rem 0; }
.timeline-turn { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--card-border); }
.timeline-turn:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.turn-header { font-size: 0.68rem; color: var(--text-dim); margin-bottom: 0.6rem; text-align: center; letter-spacing: 0.08em; }
.bubble-row { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.bubble-left { justify-content: flex-start; }
.bubble-right { justify-content: flex-end; }
.bubble-avatar {
  width: 2rem; height: 2rem; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.04); display: flex; align-items: center;
  justify-content: center; font-size: 0.95rem;
}
.bubble {
  max-width: 72%; padding: 0.6rem 0.85rem; border-radius: 0.8rem;
  font-size: 0.85rem; line-height: 1.65;
}
.bubble-partner {
  background: rgba(147, 197, 253, 0.06); border: 1px solid rgba(147, 197, 253, 0.12);
  border-top-left-radius: 4px;
}
.bubble-mine {
  background: rgba(167, 139, 250, 0.06); border: 1px solid rgba(167, 139, 250, 0.12);
  border-top-right-radius: 4px;
}
.bubble-chosen {
  background: rgba(110, 231, 183, 0.06); border: 1px solid rgba(110, 231, 183, 0.12);
  border-top-right-radius: 4px;
}
.bubble-name { font-size: 0.68rem; color: var(--text-dim); display: block; margin-bottom: 0.2rem; }
.bubble-text { color: var(--text); display: block; }

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

/* ═══════════ RESULT ═══════════ */
.result-area {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  overflow: hidden;
  backdrop-filter: blur(12px);
  animation: fadeUp 0.5s var(--ease);
}
.result-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.8rem; border-bottom: 1px solid var(--card-border);
}
.result-header h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0; }

.markdown-body { padding: 1.8rem; 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.2rem; color: var(--text-bright); }
.markdown-body h2 { font-size: 1.05rem; color: var(--accent); }
.markdown-body h3 { font-size: 0.95rem; color: var(--text-bright); }
.markdown-body p { margin-bottom: 0.8rem; color: rgba(255, 255, 255, 0.65); }
.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.6rem 1.2rem; margin: 0.8rem 0;
  background: rgba(167, 139, 250, 0.03); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.markdown-body code {
  background: rgba(167, 139, 250, 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(--card-border); padding: 0.55rem 0.9rem; text-align: left; font-size: 0.82rem; }
.markdown-body th { background: rgba(255, 255, 255, 0.02); 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.7rem; font-weight: 600; }
.quiz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem; }
.quiz-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--r); padding: 1.5rem; cursor: pointer; transition: all 0.3s var(--ease);
}
.quiz-card:hover { border-color: rgba(167, 139, 250, 0.2); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); }
.quiz-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 0.4rem; color: var(--text-bright); }
.quiz-card-desc { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.7rem; line-height: 1.5; }
.quiz-card-meta { font-size: 0.72rem; 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: fadeUp 0.3s var(--ease); }
.quiz-q-number { font-size: 0.72rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.quiz-q-text { font-size: 1.05rem; font-weight: 500; margin-bottom: 1.5rem; line-height: 1.6; color: var(--text-bright); }
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; }
.quiz-option {
  padding: 0.85rem 1.2rem; background: rgba(10, 10, 28, 0.4);
  border: 1px solid var(--card-border); border-radius: var(--r-sm);
  cursor: pointer; font-size: 0.88rem; transition: all 0.2s var(--ease); color: var(--text);
}
.quiz-option:hover { border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.04); }

/* Quiz Results */
.result-chart { margin-bottom: 1.5rem; }
.result-dim { margin-bottom: 1rem; }
.dim-label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.4rem; }
.dim-score { color: var(--text-dim); font-size: 0.78rem; }
.dim-bar-wrap { height: 5px; background: rgba(255, 255, 255, 0.04); border-radius: 3px; overflow: hidden; }
.dim-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--rose)); border-radius: 3px; transition: width 1s var(--ease); }
.result-primary, .result-secondary {
  padding: 1.2rem; background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border); border-radius: var(--r-sm); margin-bottom: 1rem;
}
.result-primary h3 { color: var(--accent); font-size: 0.95rem; margin-bottom: 0.5rem; }
.result-secondary h3 { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 0.5rem; }
.result-advice { color: var(--warm); font-size: 0.82rem; margin-top: 0.5rem; }
.scale-result { text-align: center; padding: 1rem 0; }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.scale-bar { position: relative; height: 8px; background: linear-gradient(90deg, #8b5cf6, #a855f7, #f97316, #ef4444); border-radius: 4px; 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.78rem; padding: 0.15rem 0.4rem; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
.scale-verdict { margin-top: 1rem; }
.scale-verdict h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.sas-result { text-align: center; padding: 1rem 0; }
.sas-score { margin-bottom: 1rem; }
.sas-number { font-size: 3.5rem; font-weight: 700; }
.sas-label { display: block; font-size: 0.78rem; color: var(--text-dim); }
.sas-verdict { border-left: 3px solid; padding: 1.2rem; text-align: left; background: rgba(255, 255, 255, 0.02); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 1rem; }
.sas-verdict h3 { margin-bottom: 0.5rem; }
.sas-note { font-size: 0.78rem; color: var(--warm); }

/* ═══════════ TOOLKIT ═══════════ */
.checklist { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.checklist-item {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.8rem; border-radius: var(--r-sm); cursor: pointer;
  transition: all 0.2s var(--ease); border: 1px solid transparent;
}
.checklist-item:hover { border-color: var(--card-border); }
.checklist-item.done { opacity: 0.45; border-color: rgba(110, 231, 183, 0.12); }
.check-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--green); font-weight: 700; margin-top: 0.1rem;
}
.checklist-item.done .check-box { border-color: var(--green); background: rgba(110, 231, 183, 0.06); }
.check-topic { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.15rem; }
.check-question { font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; }
.checklist-progress { display: flex; align-items: center; gap: 0.8rem; }
.progress-bar { flex: 1; height: 3px; 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 var(--ease); }
.progress-text { font-size: 0.7rem; color: var(--text-dim); white-space: nowrap; }

.equipment-grid { display: flex; flex-direction: column; gap: 1rem; }
.equipment-section h4 { font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; }
.equipment-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.8rem; background: rgba(255, 255, 255, 0.02);
  border-radius: var(--r-sm); margin-bottom: 0.25rem; font-size: 0.82rem; border: 1px solid var(--card-border);
}
.equipment-item.essential { border-left: 3px solid var(--red); }
.eq-name { font-weight: 500; }
.eq-for { font-size: 0.72rem; color: var(--text-dim); }
.equipment-total { text-align: right; font-size: 0.78rem; color: var(--text-dim); 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: 12px; height: 12px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.04); border: 2px solid rgba(255, 255, 255, 0.08); transition: all 0.3s var(--ease);
}
.stage-dot.active .dot {
  background: var(--dot-color, var(--accent)); border-color: var(--dot-color, var(--accent));
  box-shadow: 0 0 10px var(--dot-color, var(--accent));
}
.stage-label { font-size: 0.62rem; color: var(--text-dim); text-align: center; max-width: 56px; }
.stage-dot.active .stage-label { color: var(--text); font-weight: 500; }
.stage-line { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.05); 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.55rem 0.9rem; border: 1px solid var(--card-border); border-radius: var(--r-sm); font-size: 0.82rem;
}
.ms-date { font-size: 0.72rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.ms-text { flex: 1; }
.ms-delete { color: var(--text-dim); cursor: pointer; font-size: 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 { margin-top: 0.8rem; border-radius: var(--r-sm); overflow: hidden; }
.conflict-item {
  padding: 0.6rem 0.9rem; background: rgba(252, 211, 77, 0.03);
  border-left: 3px solid var(--warm); color: var(--warm); font-size: 0.78rem; line-height: 1.5; margin-bottom: 2px;
}

/* ─── Birth Chart — Premium Cosmic Style ─── */
.bc-section {
  background: linear-gradient(135deg, rgba(30, 15, 60, 0.5), rgba(18, 12, 45, 0.7));
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
}
.bc-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background:
    radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.06), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(56, 189, 248, 0.04), transparent 50%);
  pointer-events: none;
}
.bc-header {
  text-align: center;
  margin-bottom: 1.8rem;
  position: relative;
}
.bc-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
}
.bc-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.bc-saved-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1.2rem; position: relative;
}
.bc-saved-chip {
  padding: 0.55rem 0.9rem; border-radius: var(--r-sm); cursor: pointer;
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  display: flex; align-items: center; gap: 0.6rem;
  transition: all 0.3s var(--ease);
  position: relative;
  backdrop-filter: blur(8px);
}
.bc-saved-chip:hover, .bc-saved-chip.active {
  background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(56,189,248,0.1));
  border-color: rgba(167,139,250,0.4);
  box-shadow: 0 4px 20px rgba(167,139,250,0.1);
}
.bc-chip-name { font-size: 0.82rem; color: var(--text-bright); font-weight: 600; }
.bc-chip-meta { font-size: 0.72rem; color: var(--text-dim); }
.bc-chip-del {
  font-size: 0.75rem; color: var(--text-dim); cursor: pointer; opacity: 0;
  transition: opacity 0.2s; margin-left: 0.3rem;
}
.bc-saved-chip:hover .bc-chip-del { opacity: 1; }
.bc-chip-del:hover { color: var(--red); }

.bc-form-card {
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 1.5rem;
  position: relative;
  backdrop-filter: blur(8px);
}
.bc-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.bc-form-full { grid-column: 1 / -1; }
.bc-form-group label {
  display: block; font-size: 0.78rem; color: var(--text-dim);
  margin-bottom: 0.4rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.bc-form-group input,
.bc-form-group select {
  width: 100%; padding: 0.75rem 1rem; border-radius: var(--r-sm);
  background: rgba(15, 12, 35, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-bright); font-size: 0.88rem;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.bc-form-group input:focus,
.bc-form-group select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.08);
}
.bc-form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.2rem;
}
.bc-form-hint {
  text-align: center; font-size: 0.75rem; color: var(--text-dim);
  margin: 1rem 0 0.3rem;
}
.bc-calc-btn {
  display: block; width: 100%; padding: 0.85rem; margin-top: 1rem;
  border: none; border-radius: var(--r-sm); cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #fff; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em;
  transition: all 0.3s var(--ease);
  box-shadow: 0 6px 24px rgba(167, 139, 250, 0.2);
}
.bc-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.3);
}
.bc-calc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Big Three */
.bc-big3-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
  margin-bottom: 1rem; position: relative;
}
.bc-big3-card {
  text-align: center; padding: 1.2rem 0.6rem 1rem;
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  border-top: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.bc-big3-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(167,139,250,0.04), transparent);
  pointer-events: none;
}
.bc-big3-emoji { font-size: 2rem; display: block; position: relative; z-index: 1; }
.bc-big3-label {
  font-size: 0.7rem; color: var(--text-dim); display: block;
  margin: 0.4rem 0 0.2rem; letter-spacing: 0.1em; text-transform: uppercase;
  position: relative; z-index: 1;
}
.bc-big3-sign {
  font-size: 1.15rem; color: var(--text-bright); font-weight: 700; display: block;
  position: relative; z-index: 1;
}
.bc-big3-degree {
  font-size: 0.72rem; color: var(--text-dim); display: block; margin-top: 0.1rem;
  position: relative; z-index: 1;
}

/* Distribution bars */
.bc-dist-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  margin-bottom: 1rem; position: relative;
}
.bc-dist-card {
  padding: 1rem 1.1rem;
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
}
.bc-dist-card h4 {
  font-size: 0.85rem; color: var(--text-bright); margin: 0 0 0.7rem; font-weight: 600;
}
.bc-bar-row {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.bc-bar-label { font-size: 0.78rem; color: var(--text-dim); min-width: 2.8rem; }
.bc-bar-track {
  flex: 1; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,0.04); overflow: hidden;
}
.bc-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.8s var(--ease);
}
.bc-bar-pct {
  font-size: 0.72rem; color: var(--text-dim); min-width: 2.2rem; text-align: right;
  font-weight: 500;
}

.bc-section-title {
  font-size: 0.88rem; color: var(--text-bright); font-weight: 600;
  margin: 0.8rem 0 0.5rem; position: relative;
}

/* Planets table */
.bc-planet-table {
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  margin-bottom: 1.2rem;
  overflow: hidden;
}
.bc-pt-row {
  display: grid;
  grid-template-columns: 1.8rem 3rem 1fr auto;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  backdrop-filter: blur(8px);
}
.bc-pt-row:last-child { border-bottom: none; }
.bc-pt-row:hover { background: rgba(167,139,250,0.06); }
.bc-pt-icon { font-size: 1rem; text-align: center; }
.bc-pt-name { font-size: 0.8rem; color: var(--text-bright); font-weight: 600; }
.bc-pt-sign { font-size: 0.8rem; color: var(--purple); font-weight: 500; }
.bc-pt-house { font-size: 0.75rem; color: var(--text-dim); text-align: right; }

/* Aspects */
.bc-aspects-wrap {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.2rem; position: relative;
}
.bc-aspect-tag {
  padding: 0.35rem 0.65rem; border-radius: 8px; font-size: 0.78rem;
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.bc-aspect-tag:hover { background: rgba(167,139,250,0.06); }
.bc-asp-good { border-color: rgba(110, 231, 183, 0.25); }
.bc-asp-tense { border-color: rgba(252, 165, 165, 0.25); }
.bc-asp-neutral { border-color: rgba(167,139,250,0.2); }
.bc-aspect-tag span:first-child { color: var(--text); font-weight: 500; }
.bc-asp-info { color: var(--text-dim); margin-left: 0.35rem; font-size: 0.72rem; }

/* AI Reading */
.bc-interpret-area { margin: 1.5rem 0; position: relative; }
.bc-interpret-btn {
  display: block; width: 100%; padding: 0.85rem;
  border: 1px solid rgba(167,139,250,0.25); border-radius: var(--r-sm);
  cursor: pointer; font-size: 0.92rem; font-weight: 600;
  color: var(--purple);
  background: linear-gradient(135deg, rgba(167,139,250,0.06), rgba(56,189,248,0.04));
  transition: all 0.3s var(--ease);
}
.bc-interpret-btn:hover {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(56,189,248,0.08));
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(167,139,250,0.1);
}
.bc-interpret-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.bc-reading-box {
  padding: 1.5rem;
  background: rgba(15, 12, 35, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
}
.bc-reading-title {
  font-size: 1.05rem; color: var(--purple); font-weight: 700;
  margin: 0 0 1rem;
}
.bc-reading-body {
  font-size: 0.85rem; line-height: 1.85; color: var(--text);
}
.bc-reading-body h2 {
  font-size: 1.02rem; color: var(--text-bright); font-weight: 700;
  margin: 1.2rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(167,139,250,0.1);
}
.bc-reading-body h3 {
  font-size: 0.9rem; color: var(--text-bright); font-weight: 600;
  margin: 0.8rem 0 0.3rem;
}
.bc-reading-body p { margin: 0.4rem 0; }
.bc-reading-body strong { color: var(--text-bright); }
.bc-reading-body ul, .bc-reading-body ol { padding-left: 1.3rem; margin: 0.3rem 0; }
.bc-reading-body li { margin: 0.25rem 0; }
.bc-reading-body em { color: var(--text-dim); font-style: italic; }

.bc-new-btn {
  display: block; width: 100%; padding: 0.6rem; margin-top: 1rem;
  border: 1px solid var(--card-border); border-radius: var(--r-sm);
  cursor: pointer; background: transparent;
  color: var(--text-dim); font-size: 0.82rem; text-align: center;
  transition: all 0.3s var(--ease);
  position: relative;
}
.bc-new-btn:hover {
  border-color: rgba(167,139,250,0.3);
  color: var(--text);
  background: rgba(167,139,250,0.04);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.05); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.1); }

/* ─── Responsive ─── */
/* ===== ≤ 768px : Tablet & Mobile ===== */
@media (max-width: 768px) {
  .app {
    padding: 0 1rem calc(4rem + env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  header { padding: 2rem 0 1.2rem; }
  .header-row { gap: 0.75rem; }
  .header-left { gap: 0.6rem; min-width: 0; flex: 1; }
  .header-left h1 { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .subtitle { font-size: 0.7rem; letter-spacing: 0.12em; }

  /* Tabs: 横向滚动 */
  .tabs {
    border-radius: var(--r-sm);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    font-size: 0.78rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    flex: 0 0 auto;
  }

  /* Section heros */
  .section-hero { padding: 1.4rem 1.2rem; }
  .zodiac-hero { padding: 1.4rem 1.2rem; }

  /* 卡片内边距整体收紧 */
  .card { padding: 1.2rem; }

  /* 网格自适应 */
  .zodiac-sign-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .fortune-scores { grid-template-columns: repeat(2, 1fr); }
  .fortune-body { grid-template-columns: 1fr; gap: 1.2rem; }
  .chat-input-pair { flex-direction: column; gap: 0.6rem; }
  .arrow { transform: rotate(90deg); margin: 0.4rem auto; }
  .practice-grid { grid-template-columns: 1fr; }

  /* 配对：标签 + 选择器堆叠 */
  .match-body {
    flex-direction: column;
    gap: 1rem;
  }
  .match-side { width: 100%; }
  .match-center { order: 3; width: 100%; }
  .match-btn { width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem; }

  /* 星盘表单 */
  .bc-form-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .bc-date-group, .bc-time-group { grid-column: 1 / -1; }
  .bc-form-card { padding: 1.2rem; }

  /* 聊天会话栏 */
  .session-bar { flex-wrap: wrap; gap: 0.6rem; }
  .session-bar-left { flex-wrap: wrap; }
  .chat-timeline { max-height: 320px; }

  /* 选择最终回复栏 */
  .chosen-reply-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
  }
  .chosen-reply-bar input { width: 100%; }

  /* milestone 输入栏 */
  .milestone-input { flex-direction: column; gap: 0.5rem; }
  .milestone-input input,
  .milestone-input button { width: 100%; }

  /* Modal */
  .modal-card {
    padding: 1.5rem 1.2rem;
    width: calc(100% - 2rem);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
}

/* ===== ≤ 480px : 手机 ===== */
@media (max-width: 480px) {
  .app { padding-left: max(0.75rem, env(safe-area-inset-left, 0)); padding-right: max(0.75rem, env(safe-area-inset-right, 0)); padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0)); padding-top: 0; }

  header { padding: 1.5rem 0 1rem; }
  header h1 { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .subtitle { display: none; }
  .logo-mark { font-size: 1.15rem; margin-bottom: 0.4rem; }

  .btn-login { padding: 0.35rem 0.9rem; font-size: 0.78rem; }

  /* Tabs：在移动端继续保留横向滚动；适当再小一点 */
  .tabs { padding: 3px; gap: 2px; margin-bottom: 1.5rem; }
  .tab { font-size: 0.74rem; padding: 0.5rem 0.7rem; }

  /* Section/卡片更紧凑 */
  .section-hero { padding: 1.1rem 1rem; margin-bottom: 1.2rem; }
  .section-hero-title { font-size: clamp(1.1rem, 5vw, 1.3rem); }
  .section-hero-sub { font-size: 0.78rem; }
  .zodiac-hero { padding: 1.1rem 1rem; }
  .card { padding: 1rem; border-radius: 12px; }
  .card h2 { font-size: 0.95rem; margin-bottom: 0.9rem; }

  /* 12 星座网格 - 4 列 */
  .zodiac-sign-grid { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }

  /* 星盘表单单列 */
  .bc-form-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .bc-date-group, .bc-time-group { grid-column: auto; }
  .bc-form-card { padding: 1rem; }

  /* 日期/时间 select 内边距进一步压缩 */
  .bc-date-selects select,
  .bc-time-selects select {
    font-size: 0.78rem;
    padding: 0.5rem 1.4rem 0.5rem 0.45rem;
    background-position: right 4px center;
  }

  /* 配对卡 */
  .match-card { padding: 1.2rem 1rem; }
  .match-card .match-header h2 { font-size: 1.05rem; }

  /* 表单 */
  .form-grid { gap: 0.9rem; }
  .form-group label { font-size: 0.68rem; }
  select, input, textarea { padding: 0.65rem 0.85rem; }

  /* Modal 占满屏幕 */
  .modal-overlay { padding: 0.75rem; }
  .modal-card {
    width: 100%;
    max-width: 100%;
    padding: 1.3rem 1rem;
    border-radius: 16px;
  }
  .modal-close { top: 0.75rem; right: 0.75rem; }

  /* 已保存星盘列表 */
  .bc-saved-list { gap: 0.4rem; }

  /* Buttons */
  .btn-primary { padding: 0.85rem 1.2rem; font-size: 0.9rem; }

  /* 测评卡片单列 */
  .quiz-cards { grid-template-columns: 1fr !important; }
}

/* ===== 极窄屏 (≤ 360px iPhone SE / 5/5s) ===== */
@media (max-width: 360px) {
  .app { padding-left: 0.6rem; padding-right: 0.6rem; }
  .tab { font-size: 0.7rem; padding: 0.45rem 0.55rem; }
  .zodiac-sign-grid { grid-template-columns: repeat(3, 1fr); }
  header h1 { font-size: 1.25rem; }
  .logo-mark { font-size: 1rem; }
  .card { padding: 0.85rem; }
}

/* ===== 横屏适配 ===== */
@media (max-height: 480px) and (orientation: landscape) {
  header { padding: 1rem 0; }
  .modal-card { max-height: calc(100vh - 2rem); overflow-y: auto; }
}

.stream-cursor {
  display: inline;
  color: var(--purple);
  animation: blink 0.6s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ═══ Header Auth ═══ */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-left h1 { margin: 0; }
.header-left .subtitle { margin: 0; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }

.btn-login {
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(168,85,247,0.3));
  border: 1px solid rgba(192,132,252,0.35);
  color: #c084fc;
  padding: 0.4rem 1.2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-login:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.5), rgba(168,85,247,0.5));
  border-color: rgba(192,132,252,0.6);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c8cad0;
  font-size: 0.82rem;
}
.user-nickname {
  background: linear-gradient(135deg, #c084fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: #64748b;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover {
  border-color: rgba(252,165,165,0.3);
  color: #fca5a5;
}

/* ═══ Login Modal ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.25s ease;
}
.modal-card {
  background: linear-gradient(135deg, rgba(30,15,60,0.97), rgba(18,12,45,0.99));
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: #e2e8f0; }

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c084fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 0.5rem;
}
.login-desc {
  color: #94a3b8;
  font-size: 0.82rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-code-area {
  text-align: center;
  margin-bottom: 1.2rem;
}
.login-code {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 8px;
  color: #e2e8f0;
  background: rgba(26,26,62,0.8);
  border: 2px solid rgba(192,132,252,0.3);
  border-radius: 14px;
  padding: 0.8rem 1.5rem;
  display: inline-block;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.login-hint {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 0.6rem;
}
.login-status {
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.5rem;
  margin-bottom: 1rem;
}
.login-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.login-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #94a3b8;
  font-size: 0.8rem;
}
.step-num {
  width: 22px; height: 22px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(192,132,252,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #c084fc;
  flex-shrink: 0;
}
