/* ============================================
   Horoscope App - Premium Mystical Stylesheet
   ============================================
   Dark gradient + Gold accents + Glassmorphism
   Mobile-first responsive design
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,500;0,600;1,300&family=Noto+Serif+JP:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Background Gradients */
  --bg-navy: #020617;
  --bg-deep-purple: #1e1b4b;
  --bg-mid: #0f0d2e;
  --bg-cosmic: #0a0520;

  /* Gold Palette — refined warm tones */
  --gold-bright: #F0C040;
  --gold-dark: #A67C00;
  --gold-warm: #D4A520;
  --gold-pale: #F5DEB3;
  --gold-deep: #8B6914;
  --gold-rose: #D4956A;

  /* Glass Card */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(240, 192, 64, 0.12);
  --glass-shadow: rgba(0, 0, 0, 0.5);
  --glass-highlight: rgba(255, 255, 255, 0.06);

  /* Text Colors */
  --text-primary: #ede9e3;
  --text-secondary: #9a9494;
  --text-muted: #6b6363;
  --text-gold: #F0C040;

  /* Functional Colors */
  --harmony-high: #4ade80;
  --harmony-mid: #facc15;
  --harmony-low: #f87171;
  --info-blue: #60a5fa;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-heading: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
    'Noto Sans JP', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
}

/* --- Keyframe Animations --- */

@keyframes twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(240, 192, 64, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 25px rgba(240, 192, 64, 0.5);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes progressGlow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(240, 192, 64, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(240, 192, 64, 0.8);
  }
}

/* --- Reset & Base --- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(30, 20, 70, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(60, 20, 40, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(10, 5, 32, 0.6) 0%, transparent 70%),
    linear-gradient(165deg, var(--bg-navy) 0%, var(--bg-cosmic) 40%, var(--bg-deep-purple) 70%, var(--bg-navy) 100%);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-pale);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Star Field Background --- */

.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 1.5px;
  height: 1.5px;
  background: #c8c0b8;
  border-radius: 50%;
  animation: twinkle linear infinite;
  opacity: 0.15;
}

.star:nth-child(6n) {
  width: 2px;
  height: 2px;
  background: var(--gold-pale);
  opacity: 0.25;
  box-shadow: 0 0 3px rgba(240, 192, 64, 0.2);
}

.star:nth-child(10n) {
  width: 1px;
  height: 1px;
  opacity: 0.1;
}

/* Stagger 60 stars across different durations and delays */
.star:nth-child(1)  { top: 5%;  left: 12%; animation-duration: 3.0s; animation-delay: 0.0s; }
.star:nth-child(2)  { top: 8%;  left: 45%; animation-duration: 4.2s; animation-delay: 0.5s; }
.star:nth-child(3)  { top: 12%; left: 78%; animation-duration: 3.5s; animation-delay: 1.2s; }
.star:nth-child(4)  { top: 3%;  left: 92%; animation-duration: 5.0s; animation-delay: 0.3s; }
.star:nth-child(5)  { top: 18%; left: 30%; animation-duration: 3.8s; animation-delay: 2.0s; }
.star:nth-child(6)  { top: 15%; left: 60%; animation-duration: 4.5s; animation-delay: 0.8s; }
.star:nth-child(7)  { top: 22%; left: 5%;  animation-duration: 3.2s; animation-delay: 1.5s; }
.star:nth-child(8)  { top: 25%; left: 88%; animation-duration: 4.8s; animation-delay: 0.2s; }
.star:nth-child(9)  { top: 20%; left: 52%; animation-duration: 3.6s; animation-delay: 2.5s; }
.star:nth-child(10) { top: 28%; left: 18%; animation-duration: 5.2s; animation-delay: 1.0s; }
.star:nth-child(11) { top: 32%; left: 72%; animation-duration: 3.3s; animation-delay: 0.7s; }
.star:nth-child(12) { top: 35%; left: 40%; animation-duration: 4.0s; animation-delay: 1.8s; }
.star:nth-child(13) { top: 30%; left: 95%; animation-duration: 3.9s; animation-delay: 0.4s; }
.star:nth-child(14) { top: 38%; left: 8%;  animation-duration: 4.6s; animation-delay: 2.2s; }
.star:nth-child(15) { top: 40%; left: 55%; animation-duration: 3.1s; animation-delay: 0.9s; }
.star:nth-child(16) { top: 42%; left: 25%; animation-duration: 5.5s; animation-delay: 1.3s; }
.star:nth-child(17) { top: 45%; left: 82%; animation-duration: 3.7s; animation-delay: 0.1s; }
.star:nth-child(18) { top: 48%; left: 15%; animation-duration: 4.3s; animation-delay: 2.8s; }
.star:nth-child(19) { top: 50%; left: 68%; animation-duration: 3.4s; animation-delay: 0.6s; }
.star:nth-child(20) { top: 52%; left: 38%; animation-duration: 4.9s; animation-delay: 1.7s; }
.star:nth-child(21) { top: 55%; left: 90%; animation-duration: 3.0s; animation-delay: 2.3s; }
.star:nth-child(22) { top: 58%; left: 3%;  animation-duration: 4.4s; animation-delay: 0.8s; }
.star:nth-child(23) { top: 60%; left: 48%; animation-duration: 5.1s; animation-delay: 1.1s; }
.star:nth-child(24) { top: 62%; left: 75%; animation-duration: 3.6s; animation-delay: 0.3s; }
.star:nth-child(25) { top: 65%; left: 22%; animation-duration: 4.7s; animation-delay: 2.6s; }
.star:nth-child(26) { top: 68%; left: 58%; animation-duration: 3.2s; animation-delay: 1.4s; }
.star:nth-child(27) { top: 70%; left: 85%; animation-duration: 4.1s; animation-delay: 0.5s; }
.star:nth-child(28) { top: 72%; left: 10%; animation-duration: 5.3s; animation-delay: 1.9s; }
.star:nth-child(29) { top: 75%; left: 42%; animation-duration: 3.8s; animation-delay: 0.2s; }
.star:nth-child(30) { top: 78%; left: 65%; animation-duration: 4.5s; animation-delay: 2.1s; }
.star:nth-child(31) { top: 2%;  left: 35%; animation-duration: 3.3s; animation-delay: 1.6s; }
.star:nth-child(32) { top: 7%;  left: 70%; animation-duration: 4.8s; animation-delay: 0.9s; }
.star:nth-child(33) { top: 10%; left: 20%; animation-duration: 3.5s; animation-delay: 2.4s; }
.star:nth-child(34) { top: 14%; left: 50%; animation-duration: 5.0s; animation-delay: 0.1s; }
.star:nth-child(35) { top: 80%; left: 32%; animation-duration: 3.9s; animation-delay: 1.2s; }
.star:nth-child(36) { top: 82%; left: 78%; animation-duration: 4.2s; animation-delay: 0.7s; }
.star:nth-child(37) { top: 85%; left: 52%; animation-duration: 3.1s; animation-delay: 2.7s; }
.star:nth-child(38) { top: 88%; left: 15%; animation-duration: 4.6s; animation-delay: 0.4s; }
.star:nth-child(39) { top: 90%; left: 90%; animation-duration: 5.2s; animation-delay: 1.8s; }
.star:nth-child(40) { top: 92%; left: 42%; animation-duration: 3.4s; animation-delay: 0.6s; }
.star:nth-child(41) { top: 95%; left: 68%; animation-duration: 4.0s; animation-delay: 2.0s; }
.star:nth-child(42) { top: 97%; left: 8%;  animation-duration: 3.7s; animation-delay: 1.3s; }
.star:nth-child(43) { top: 16%; left: 88%; animation-duration: 4.4s; animation-delay: 0.2s; }
.star:nth-child(44) { top: 24%; left: 62%; animation-duration: 5.5s; animation-delay: 2.9s; }
.star:nth-child(45) { top: 34%; left: 2%;  animation-duration: 3.0s; animation-delay: 0.8s; }
.star:nth-child(46) { top: 36%; left: 48%; animation-duration: 4.3s; animation-delay: 1.5s; }
.star:nth-child(47) { top: 44%; left: 70%; animation-duration: 3.6s; animation-delay: 0.3s; }
.star:nth-child(48) { top: 46%; left: 5%;  animation-duration: 4.9s; animation-delay: 2.2s; }
.star:nth-child(49) { top: 54%; left: 28%; animation-duration: 3.2s; animation-delay: 1.0s; }
.star:nth-child(50) { top: 56%; left: 80%; animation-duration: 4.1s; animation-delay: 0.5s; }
.star:nth-child(51) { top: 64%; left: 45%; animation-duration: 5.3s; animation-delay: 1.7s; }
.star:nth-child(52) { top: 66%; left: 12%; animation-duration: 3.8s; animation-delay: 2.5s; }
.star:nth-child(53) { top: 74%; left: 55%; animation-duration: 4.5s; animation-delay: 0.1s; }
.star:nth-child(54) { top: 76%; left: 92%; animation-duration: 3.3s; animation-delay: 1.9s; }
.star:nth-child(55) { top: 84%; left: 25%; animation-duration: 4.7s; animation-delay: 0.6s; }
.star:nth-child(56) { top: 86%; left: 62%; animation-duration: 3.1s; animation-delay: 2.3s; }
.star:nth-child(57) { top: 33%; left: 35%; animation-duration: 5.0s; animation-delay: 0.9s; }
.star:nth-child(58) { top: 47%; left: 95%; animation-duration: 3.5s; animation-delay: 1.4s; }
.star:nth-child(59) { top: 57%; left: 18%; animation-duration: 4.2s; animation-delay: 2.8s; }
.star:nth-child(60) { top: 93%; left: 55%; animation-duration: 3.9s; animation-delay: 0.7s; }

/* --- App Container --- */

.app-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-md);
  min-height: 100vh;
}

/* --- Screen System --- */

.screen {
  display: none;
  opacity: 0;
  min-height: 100vh;
  padding: var(--space-lg) 0;
}

.screen.active {
  display: block;
  animation: fadeIn 0.6s ease forwards;
}

/* --- Glass Card --- */

.glass-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 192, 64, 0.22);
  box-shadow:
    0 16px 48px var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 30px rgba(240, 192, 64, 0.04);
}

.glass-card + .glass-card {
  margin-top: var(--space-lg);
}

.feature-grid .glass-card + .glass-card {
  margin-top: 0;
}

/* --- Section Divider --- */

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold-dark) 25%,
    var(--gold-bright) 50%,
    var(--gold-dark) 75%,
    transparent 100%
  );
  margin: var(--space-xl) auto;
  max-width: 280px;
  opacity: 0.4;
  position: relative;
}

.section-divider::before {
  content: '\2726';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  color: var(--gold-warm);
  background: var(--bg-cosmic);
  padding: 0 12px;
  letter-spacing: 0.3em;
  opacity: 0.7;
}

/* ============================
   1. INTRO SCREEN
   ============================ */

#screen-intro .hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

#screen-intro .hero-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  display: block;
  animation: pulse 3s ease-in-out infinite;
}

#screen-intro .hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--gold-pale) 0%,
    var(--gold-bright) 25%,
    var(--gold-warm) 50%,
    var(--gold-bright) 75%,
    var(--gold-pale) 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.08em;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(240, 192, 64, 0.15));
}

#screen-intro .hero p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 420px;
  margin: 0 auto;
  letter-spacing: 0.04em;
  line-height: 1.9;
}

/* --- Form Styles --- */

.form-group {
  margin-bottom: var(--space-md);
}

.form-group-inline {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.form-group-inline > label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-pale);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(240, 192, 64, 0.18);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--gold-warm);
  background: rgba(2, 6, 23, 0.9);
  box-shadow:
    0 0 0 3px rgba(240, 192, 64, 0.1),
    0 0 16px rgba(240, 192, 64, 0.06),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group input:hover,
.form-group select:hover {
  border-color: rgba(240, 192, 64, 0.45);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23FFD700' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-group select option {
  background: var(--bg-navy);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group .hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-group .error-message {
  display: block;
  font-size: 0.75rem;
  color: var(--harmony-low);
  margin-top: var(--space-xs);
}

.form-group.has-error input,
.form-group.has-error select {
  border-color: var(--harmony-low);
}

/* --- Buttons --- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 15px 32px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bg-navy);
  background: linear-gradient(135deg, var(--gold-pale) 0%, var(--gold-bright) 40%, var(--gold-warm) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow:
    0 4px 20px rgba(240, 192, 64, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(240, 192, 64, 0.35),
    0 0 40px rgba(240, 192, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(240, 192, 64, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold-bright);
  background: transparent;
  border: 1px solid rgba(240, 192, 64, 0.35);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.03em;
}

.btn-secondary:hover {
  background: rgba(240, 192, 64, 0.08);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ============================
   2. LOADING SCREEN
   ============================ */

#screen-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
}

#screen-loading.active {
  display: flex;
  opacity: 1;
}

.loading-circle {
  width: 140px;
  height: 140px;
  border: 2px solid rgba(240, 192, 64, 0.2);
  border-top-color: var(--gold-bright);
  border-right-color: var(--gold-warm);
  border-radius: 50%;
  animation: rotate 2.5s linear infinite;
  margin-bottom: var(--space-xl);
  position: relative;
  filter: drop-shadow(0 0 12px rgba(240, 192, 64, 0.15));
}

.loading-circle::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1.5px solid rgba(240, 192, 64, 0.12);
  border-bottom-color: var(--gold-dark);
  border-left-color: var(--gold-dark);
  border-radius: 50%;
  animation: rotate 3.5s linear infinite reverse;
}

.loading-circle::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 24px;
  border: 1px solid rgba(240, 192, 64, 0.1);
  border-top-color: var(--gold-pale);
  border-radius: 50%;
  animation: rotate 4.5s linear infinite;
}

.loading-circle .inner-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  min-height: 2em;
  width: 300px;
  text-align: center;
  transition: opacity 0.4s ease;
  letter-spacing: 0.06em;
}

.loading-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  animation: pulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(240, 192, 64, 0.4));
}

.loading-text.fade-out {
  opacity: 0;
}

.loading-text.fade-in {
  opacity: 1;
}

.loading-progress {
  width: 200px;
  height: 3px;
  background: rgba(240, 192, 64, 0.1);
  border-radius: var(--radius-full);
  margin-top: var(--space-lg);
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  animation: progressGlow 2s ease-in-out infinite;
}

/* ============================
   3. RESULT SCREEN
   ============================ */

.result-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: slideUp 0.6s ease 0.2s both;
}

.result-header h2 {
  font-size: 1.5rem;
  color: var(--text-gold);
  margin-bottom: var(--space-xs);
}

.result-header .result-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Horoscope Chart --- */

.horoscope-chart {
  width: 100%;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  aspect-ratio: 1 / 1;
  animation: scaleIn 0.8s ease 0.3s both;
}

.horoscope-chart svg {
  width: 100%;
  height: 100%;
}

.horoscope-chart .zodiac-ring {
  fill: none;
  stroke: rgba(240, 192, 64, 0.2);
  stroke-width: 0.5;
}

.horoscope-chart .house-line {
  stroke: rgba(240, 192, 64, 0.15);
  stroke-width: 0.5;
}

.horoscope-chart .planet-symbol {
  fill: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: fill var(--transition-fast);
}

.horoscope-chart .planet-symbol:hover {
  fill: var(--gold-bright);
}

.horoscope-chart .aspect-line {
  stroke-width: 0.8;
  opacity: 0.6;
}

.horoscope-chart .aspect-line.conjunction { stroke: var(--gold-bright); }
.horoscope-chart .aspect-line.opposition  { stroke: var(--harmony-low); }
.horoscope-chart .aspect-line.trine       { stroke: var(--harmony-high); }
.horoscope-chart .aspect-line.square      { stroke: var(--harmony-low); stroke-dasharray: 4 2; }
.horoscope-chart .aspect-line.sextile     { stroke: var(--info-blue); }

/* --- Chart Tooltip --- */

.chart-tooltip {
  position: absolute;
  z-index: 100;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  max-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip .tooltip-title {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 2px;
}

.chart-tooltip .tooltip-detail {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* --- Tab Navigation --- */

.tab-nav {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(240, 192, 64, 0.1);
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-nav button {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.03em;
  position: relative;
}

.tab-nav button:hover {
  color: var(--text-secondary);
}

.tab-nav button.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

.tab-nav button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--gold-bright);
}

/* --- Tab Content --- */

.tab-content {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  font-size: 1.15rem;
  color: var(--gold-pale);
  margin-bottom: var(--space-md);
}

.tab-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* --- Planet Table --- */

.planet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.planet-table thead th {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--gold-dark);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(240, 192, 64, 0.15);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.planet-table tbody td {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.planet-table tbody tr:hover td {
  background: rgba(240, 192, 64, 0.03);
  color: var(--text-primary);
}

.planet-table .planet-name {
  color: var(--text-primary);
  font-weight: 500;
}

.planet-table .planet-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.planet-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  font-size: 1rem;
  font-family: 'Noto Serif JP', serif;
  text-align: center;
  vertical-align: middle;
}

.planet-table .degree {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.planet-table .retrograde td {
  font-size: inherit;
}

.planet-table .retrograde-badge {
  color: var(--harmony-low);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: var(--space-xs);
}

/* --- Aspect Row --- */

.aspect-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  font-size: 0.9rem;
}

.aspect-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.aspect-row + .aspect-row {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.aspect-row .aspect-symbol {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.aspect-row.harmony-high .aspect-symbol {
  background: rgba(74, 222, 128, 0.15);
  color: var(--harmony-high);
}

.aspect-row.harmony-mid .aspect-symbol {
  background: rgba(250, 204, 21, 0.15);
  color: var(--harmony-mid);
}

.aspect-row.harmony-low .aspect-symbol {
  background: rgba(248, 113, 113, 0.15);
  color: var(--harmony-low);
}

.aspect-row .aspect-planets {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.aspect-row .aspect-type {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.aspect-row .aspect-orb {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* --- Fortune Stars --- */

.fortune-stars {
  display: inline-flex;
  gap: 4px;
  font-size: 1.2rem;
}

.fortune-stars .star-filled {
  color: var(--gold-bright);
  text-shadow: 0 0 6px rgba(240, 192, 64, 0.4);
}

.fortune-stars .star-empty {
  color: rgba(240, 192, 64, 0.2);
}

.fortune-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.fortune-item + .fortune-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.fortune-item .fortune-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* --- Score Bar --- */

.score-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-bright));
  transition: width 1s ease;
  position: relative;
}

.score-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-pale);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-bright);
}

.score-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
  font-size: 0.85rem;
}

.score-bar-label .label-text {
  color: var(--text-secondary);
}

.score-bar-label .label-value {
  color: var(--gold-bright);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.score-item {
  margin-bottom: var(--space-md);
}

/* --- Balance Chart (see Section 7 for styles) --- */

/* ============================
   4. TRANSIT SCREEN
   ============================ */

#screen-transit .transit-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

#screen-transit .transit-header h2 {
  font-size: 1.4rem;
  color: var(--text-gold);
  margin-bottom: var(--space-xs);
}

#screen-transit .transit-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.daily-fortune {
  margin-top: var(--space-lg);
}

.daily-fortune h3 {
  font-size: 1.1rem;
  color: var(--gold-pale);
  margin-bottom: var(--space-md);
  text-align: center;
}

.fortune-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.fortune-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(240, 192, 64, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: border-color var(--transition-fast);
}

.fortune-card:hover {
  border-color: rgba(240, 192, 64, 0.2);
}

.fortune-card .fortune-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.fortune-card .fortune-card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================
   5. SYNASTRY SCREEN
   ============================ */

.synastry-intro {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.synastry-intro h2 {
  font-size: 1.4rem;
  color: var(--text-gold);
  margin-bottom: var(--space-sm);
}

.synastry-intro p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Synastry Score --- */

.synastry-score {
  width: 160px;
  height: 160px;
  margin: var(--space-xl) auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.synastry-score .score-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.synastry-score .score-ring circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.synastry-score .score-ring .ring-bg {
  stroke: rgba(240, 192, 64, 0.1);
}

.synastry-score .score-ring .ring-fill {
  stroke: var(--gold-bright);
  transition: stroke-dashoffset 1.5s ease;
  filter: drop-shadow(0 0 6px rgba(240, 192, 64, 0.4));
}

.synastry-score .score-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.3);
  z-index: 1;
}

.synastry-score .score-label {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.synastry-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* ============================
   6. REGISTRATION SCREEN
   ============================ */

#screen-registration {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#screen-registration.active {
  display: flex;
}

.registration-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  animation: pulse 3s ease-in-out infinite;
}

#screen-registration h2 {
  font-size: 1.5rem;
  color: var(--text-gold);
  margin-bottom: var(--space-sm);
}

#screen-registration .registration-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

#screen-registration .email-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

#screen-registration .email-form .form-group input[type="email"] {
  text-align: center;
}

.registration-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  text-align: left;
  width: 100%;
  max-width: 360px;
}

.registration-features .feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.registration-features .feature-item .check-icon {
  color: var(--gold-bright);
  flex-shrink: 0;
}

/* ============================
   Utility Classes
   ============================ */

.text-center { text-align: center; }
.text-gold   { color: var(--gold-bright); }
.text-muted  { color: var(--text-muted); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================
   Scrollbar Styling
   ============================ */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(240, 192, 64, 0.2);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 192, 64, 0.35);
}

/* ============================
   Responsive: Tablet (600px+)
   ============================ */

@media (min-width: 600px) {
  .app-container {
    padding: var(--space-lg);
  }

  .screen {
    padding: var(--space-xl) 0;
  }

  #screen-intro .hero h1 {
    font-size: 2.2rem;
  }

  #screen-intro .hero p {
    font-size: 1.05rem;
  }

  .glass-card {
    padding: var(--space-xl);
  }

  .form-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .btn-primary {
    width: auto;
    min-width: 280px;
    margin: 0 auto;
    display: flex;
  }

  .btn-secondary {
    width: auto;
    min-width: 240px;
    margin: 0 auto;
    display: flex;
  }

  .btn-group {
    flex-direction: row;
    justify-content: center;
  }

  .tab-nav {
    justify-content: center;
  }

  .tab-nav button {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
  }

  .fortune-grid {
    grid-template-columns: 1fr 1fr;
  }

  .planet-table {
    font-size: 0.95rem;
  }

  .horoscope-chart {
    max-width: 500px;
  }

  .synastry-score {
    width: 180px;
    height: 180px;
  }

  .synastry-score .score-value {
    font-size: 3rem;
  }

  .loading-circle {
    width: 180px;
    height: 180px;
  }

  .result-header h2 {
    font-size: 1.75rem;
  }

  #screen-transit .transit-header h2 {
    font-size: 1.6rem;
  }

  .synastry-intro h2 {
    font-size: 1.6rem;
  }

  #screen-registration h2 {
    font-size: 1.75rem;
  }
}

/* ============================
   Responsive: Desktop (1024px+)
   ============================ */

@media (min-width: 1024px) {
  html {
    font-size: 17px;
  }

  .app-container {
    padding: var(--space-xl) var(--space-lg);
  }

  #screen-intro .hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  #screen-intro .hero h1 {
    font-size: 2.5rem;
  }

  .glass-card {
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
  }

  .glass-card:hover {
    transform: translateY(-3px);
  }

  .form-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-lg);
  }

  .fortune-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .horoscope-chart {
    max-width: 600px;
  }

  .synastry-score {
    width: 200px;
    height: 200px;
  }

  .synastry-score .score-value {
    font-size: 3.5rem;
  }

  .synastry-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .tab-nav button {
    font-size: 0.95rem;
    padding: var(--space-md) var(--space-xl);
  }

  .result-header h2 {
    font-size: 2rem;
  }

  .loading-circle {
    width: 200px;
    height: 200px;
  }

  .loading-text {
    font-size: 1.1rem;
  }
}

/* ============================
   Reduced Motion
   ============================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .star {
    animation: none;
    opacity: 0.4;
  }

  .loading-circle,
  .loading-circle::before,
  .loading-circle::after {
    animation: none;
    border-color: rgba(240, 192, 64, 0.3);
    border-top-color: var(--gold-bright);
  }
}

/* ============================
   Print Styles
   ============================ */

@media print {
  body {
    background: #ffffff;
    color: #111111;
  }

  .star-field,
  .tab-nav,
  .btn-primary,
  .btn-secondary,
  .loading-circle,
  #screen-loading,
  #screen-registration {
    display: none !important;
  }

  .glass-card {
    background: #ffffff;
    border: 1px solid #cccccc;
    backdrop-filter: none;
    box-shadow: none;
    break-inside: avoid;
  }

  .screen {
    display: block !important;
    opacity: 1 !important;
  }

  h1, h2, h3 {
    color: #111111;
    -webkit-text-fill-color: #111111;
  }
}

/* === Additional Styles for HTML Elements === */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-md);
}

.hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold-bright);
  margin-bottom: var(--space-md);
  letter-spacing: 0.08em;
  filter: drop-shadow(0 0 24px rgba(240, 192, 64, 0.12));
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.form-card {
  margin: var(--space-xl) 0;
  padding: var(--space-xl);
}

.form-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold-bright);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.form-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}

.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transition: color var(--transition-fast);
  user-select: none;
}

/* Custom radio — simple filled circle */
.radio-label input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  padding: 0;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
  box-sizing: content-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.radio-label input[type="radio"]:checked {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.radio-label:has(input:checked) {
  color: var(--gold-bright);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-bottom: var(--space-3xl);
}

.feature-item {
  text-align: center;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 8px rgba(240, 192, 64, 0.3));
  transition: filter var(--transition-base), transform var(--transition-base);
}

.feature-item:hover .feature-icon {
  filter: drop-shadow(0 0 12px rgba(240, 192, 64, 0.5));
  transform: scale(1.08);
}

.feature-item h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--gold-bright);
  margin-bottom: var(--space-xs);
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.6;
}

.result-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
}

.result-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--gold-bright);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.06em;
  filter: drop-shadow(0 0 16px rgba(240, 192, 64, 0.1));
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  display: inline-block;
}

.btn-back:hover {
  color: var(--gold-bright);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  width: 100%;
  margin-top: var(--space-sm);
}

.btn-outline:hover {
  border-color: var(--gold-dark);
  color: var(--gold-bright);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--space-lg) 0;
}

.chart-container {
  width: 100%;
  max-width: 600px;
}

.chart-container svg {
  width: 100%;
  height: auto;
}

.chart-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: var(--space-sm);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-xl) 0 var(--space-3xl);
}

/* Interpretation Sections */
.interpretation-section {
  margin-bottom: var(--space-md);
  padding: var(--space-lg);
  border-left: 2px solid rgba(240, 192, 64, 0.08);
  transition: border-color var(--transition-base);
}

.interpretation-section:hover {
  border-left-color: rgba(240, 192, 64, 0.25);
}

.interp-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--gold-bright);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.interp-icon {
  font-size: 1.3rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 4px rgba(240, 192, 64, 0.3));
}

.interp-subtitle {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

.interp-keywords {
  color: var(--gold-warm);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, rgba(240, 192, 64, 0.06) 0%, rgba(240, 192, 64, 0.02) 100%);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-dark);
  letter-spacing: 0.02em;
}

.interp-text {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 2;
}

.interp-house-info {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

.retrograde-notice {
  margin-top: var(--space-sm);
  color: var(--harmony-low);
  font-size: 0.8rem;
  font-style: italic;
}

.retrograde-badge {
  display: inline-block;
  background: rgba(248, 113, 113, 0.2);
  color: var(--harmony-low);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: bold;
}

/* Aspect Details in Interpretation */
.interp-aspects {
  margin-top: var(--space-md);
}

.aspect-detail {
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.aspect-detail-header {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.aspect-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aspect-harmonious .aspect-dot {
  background: var(--harmony-high);
  box-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
}

.aspect-challenging .aspect-dot {
  background: var(--harmony-low);
  box-shadow: 0 0 4px rgba(248, 113, 113, 0.4);
}

.aspect-neutral .aspect-dot {
  background: var(--harmony-mid);
  box-shadow: 0 0 4px rgba(250, 204, 21, 0.4);
}

.aspect-adjusting .aspect-dot {
  background: var(--info-blue);
  box-shadow: 0 0 4px rgba(96, 165, 250, 0.4);
}

.aspect-detail-name {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.aspect-detail-orb {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.aspect-detail-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

.aspect-detail.aspect-harmonious {
  background: rgba(74, 222, 128, 0.04);
  border-color: rgba(74, 222, 128, 0.08);
}

.aspect-detail.aspect-challenging {
  background: rgba(248, 113, 113, 0.04);
  border-color: rgba(248, 113, 113, 0.08);
}

.aspect-detail.aspect-neutral {
  background: rgba(250, 204, 21, 0.04);
  border-color: rgba(250, 204, 21, 0.08);
}

.aspect-detail.aspect-adjusting {
  background: rgba(96, 165, 250, 0.04);
  border-color: rgba(96, 165, 250, 0.08);
}

/* Planet Ranking */
.planet-ranking {
  margin-top: var(--space-md);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.ranking-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(240, 192, 64, 0.1);
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: bold;
}

.ranking-score {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Fortune Styles */
.fortune-date {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold-bright);
  margin-bottom: var(--space-xs);
}

.fortune-moon {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}

.fortune-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.fortune-category {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.fortune-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.fortune-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.fortune-star {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 1px;
}

.fortune-star.filled {
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(240, 192, 64, 0.5);
}

.fortune-lucky {
  display: flex;
  justify-content: space-around;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.lucky-item {
  text-align: center;
}

.lucky-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: var(--space-xs);
}

.lucky-value {
  color: var(--gold-bright);
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.fortune-message {
  padding: var(--space-lg);
  line-height: 1.9;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Registration Screen */
.registration-card {
  text-align: center;
}

.reg-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.reg-benefits {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
  text-align: left;
}

.reg-benefits li {
  padding: var(--space-sm) 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  position: relative;
  padding-left: var(--space-lg);
}

.reg-benefits li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--gold-bright);
  font-weight: bold;
}

.privacy-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: var(--space-md);
}

/* Synastry Score */
.synastry-score-title {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.synastry-score-section {
  text-align: center;
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.synastry-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1em;
  margin-bottom: var(--space-md);
}

.score-number {
  font-family: var(--font-display);
  font-size: 3.8rem;
  color: var(--gold-bright);
  font-weight: 300;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 0 20px rgba(240, 192, 64, 0.3));
}

.score-label {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 300;
}

.synastry-level {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.synastry-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.synastry-category {
  padding: var(--space-lg);
}

.synastry-category h4 {
  font-family: var(--font-heading);
  color: var(--gold-bright);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.synastry-category p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: var(--space-sm);
}

.score-value {
  color: var(--gold-warm);
  font-size: 0.85rem;
  font-weight: bold;
}

/* Balance Chart */
.balance-chart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

@media (max-width: 599px) {
  .balance-chart {
    grid-template-columns: 1fr;
  }
}

.balance-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(240, 192, 64, 0.08);
}

.balance-section h4 {
  font-family: var(--font-heading);
  color: var(--gold-bright);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  letter-spacing: 0.05em;
}

.balance-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 10px;
}

.balance-row:last-child {
  margin-bottom: 0;
}

.balance-label {
  width: 28px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  flex-shrink: 0;
}

.balance-bar {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.balance-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.balance-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

.balance-fill.element-fire   { background: linear-gradient(90deg, #dc2626, #ef4444, #f97316); }
.balance-fill.element-earth  { background: linear-gradient(90deg, #15803d, #22c55e, #84cc16); }
.balance-fill.element-air    { background: linear-gradient(90deg, #1d4ed8, #3b82f6, #06b6d4); }
.balance-fill.element-water  { background: linear-gradient(90deg, #6d28d9, #8b5cf6, #6366f1); }
.balance-fill.quality-cardinal { background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--gold-pale)); }
.balance-fill.quality-fixed    { background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf); }
.balance-fill.quality-mutable  { background: linear-gradient(90deg, #9333ea, #a78bfa, #c084fc); }

.balance-value {
  width: 38px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}

/* Desktop enhancements */
@media (min-width: 600px) {
  .container { padding: var(--space-lg); }
  .hero-title { font-size: 2.5rem; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .action-buttons { flex-direction: row; flex-wrap: wrap; }
  .action-buttons .btn-primary,
  .action-buttons .btn-secondary,
  .action-buttons .btn-outline { flex: 1; min-width: 200px; }
  .synastry-categories { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .container { max-width: 900px; }
  .hero-title { font-size: 3rem; }
}

/* ============================
   8. ACCESSIBILITY & POLISH
   ============================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus states for keyboard navigation */
button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* Cursor pointer on all interactive elements */
button,
select,
.radio-label,
.tab-nav button,
.feature-item,
.btn-back {
  cursor: pointer;
}

/* Improved button disabled state */
button:disabled,
button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* Smooth hover for glass cards */
.glass-card {
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-item.glass-card:hover {
  border-color: rgba(240, 192, 64, 0.25);
  box-shadow: 0 4px 24px rgba(240, 192, 64, 0.06);
}

/* Table row hover */
.planet-table tbody tr {
  transition: background var(--transition-fast);
}

.planet-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Aspect row hover */
.aspect-row {
  transition: background var(--transition-fast), transform var(--transition-fast);
  border-radius: var(--radius-sm);
  cursor: default;
}

.aspect-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Fortune star animation */
.fortune-star.filled {
  text-shadow: 0 0 8px rgba(240, 192, 64, 0.6);
}

/* Score bar glow */
.score-fill {
  position: relative;
}

.score-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  filter: blur(2px);
}

/* Synastry score emphasis */
.synastry-score .score-number {
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.4);
}

/* Interpretation section entrance */
.interpretation-section {
  animation: fadeInUp 0.5s ease both;
}

.interpretation-section:nth-child(2) { animation-delay: 0.05s; }
.interpretation-section:nth-child(3) { animation-delay: 0.1s; }
.interpretation-section:nth-child(4) { animation-delay: 0.15s; }
.interpretation-section:nth-child(5) { animation-delay: 0.2s; }
.interpretation-section:nth-child(6) { animation-delay: 0.25s; }

/* Planet ranking bars */
.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-num {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(240, 192, 64, 0.15);
  color: var(--gold-bright);
  flex-shrink: 0;
}

.ranking-score {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Retrograde badge styling */
.retrograde-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ===== 相性診断ローディングアニメーション ===== */
.synastry-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.synastry-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.heart-container {
  position: relative;
  width: 120px;
  height: 120px;
}

/* メインのハート（中央で脈打つ） */
.heart-main {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  animation: heartbeat 1.2s ease-in-out infinite;
}

.heart-main::before,
.heart-main::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 50% 50% 0 0;
}

.heart-main::before {
  left: -10px;
  transform: rotate(-45deg);
  transform-origin: bottom right;
}

.heart-main::after {
  left: 10px;
  transform: rotate(45deg);
  transform-origin: bottom left;
}

/* 浮かび上がる小さなハート */
.heart {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0;
}

.heart::before,
.heart::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50% 50% 0 0;
  opacity: 0.6;
}

.heart::before {
  left: -3px;
  transform: rotate(-45deg);
  transform-origin: bottom right;
}

.heart::after {
  left: 3px;
  transform: rotate(45deg);
  transform-origin: bottom left;
}

.heart-1 {
  left: 20%;
  bottom: 30%;
  animation: floatHeart 2.4s ease-out 0s infinite;
}

.heart-2 {
  left: 70%;
  bottom: 25%;
  animation: floatHeart 2.4s ease-out 0.4s infinite;
}

.heart-3 {
  left: 45%;
  bottom: 35%;
  animation: floatHeart 2.4s ease-out 0.8s infinite;
}

.heart-4 {
  left: 10%;
  bottom: 40%;
  animation: floatHeart 2.4s ease-out 1.2s infinite;
}

.heart-5 {
  left: 80%;
  bottom: 35%;
  animation: floatHeart 2.4s ease-out 1.6s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  15% { transform: translate(-50%, -50%) scale(1.25); }
  30% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.15); }
  60% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.2) rotate(15deg);
  }
}

.synastry-loading-text {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Wasm loading indicator styling */
#swe-loading-indicator {
  animation: pulse 2s ease-in-out infinite;
}

/* Smooth screen transitions */
.screen {
  transition: opacity 0.4s ease;
}

/* ============================
   9. ATMOSPHERE & REFINEMENT
   ============================ */

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* Vignette effect for depth */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
}

/* Ensure content sits above atmosphere */
.screen, .star-field {
  position: relative;
  z-index: 1;
}

/* Enhanced form card treatment */
.form-card {
  border: 1px solid rgba(240, 192, 64, 0.1);
}

.form-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-warm), transparent);
  opacity: 0.3;
  border-radius: 1px;
}

/* Fortune card hover enhancement */
.fortune-card {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.fortune-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Synastry category card polish */
.synastry-category {
  transition: border-color var(--transition-base);
  border-left: 2px solid rgba(240, 192, 64, 0.06);
}

.synastry-category:hover {
  border-left-color: rgba(240, 192, 64, 0.2);
}

/* Registration card special glow */
.registration-card {
  border: 1px solid rgba(240, 192, 64, 0.1);
}

.registration-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-warm), transparent);
  opacity: 0.25;
}

/* Score bar refined glow */
.score-bar-fill {
  box-shadow: 0 0 8px rgba(240, 192, 64, 0.15);
}

/* Aspect detail subtle glow */
.aspect-detail.aspect-harmonious:hover {
  background: rgba(74, 222, 128, 0.06);
}

.aspect-detail.aspect-challenging:hover {
  background: rgba(248, 113, 113, 0.06);
}

.aspect-detail.aspect-neutral:hover {
  background: rgba(250, 204, 21, 0.06);
}

.aspect-detail.aspect-adjusting:hover {
  background: rgba(96, 165, 250, 0.06);
}

/* Planet table planet name refined */
.planet-table .planet-name {
  letter-spacing: 0.02em;
}

/* Selection color */
::selection {
  background: rgba(240, 192, 64, 0.25);
  color: var(--text-primary);
}
