/* AstroGuide — premium dark astrology, gold-on-night */
:root {
  --bg: #070711;
  --bg-deep: #03030a;
  --bg-soft: #0d0d1a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.10);
  --surface-hover: rgba(255, 255, 255, 0.13);
  --border: rgba(201, 168, 106, 0.18);
  --border-strong: rgba(201, 168, 106, 0.36);
  --border-soft: rgba(255, 255, 255, 0.06);

  --gold: #C9A86A;
  --gold-soft: #E8D29E;
  --gold-deep: #8C7140;

  --text: #F0E8D8;
  --text-mute: #8A8275;
  --text-faint: #5A5547;

  --danger: #E26565;
  --success: #4FBD6E;
  --success-soft: #6FD68A;
  --tension: #E0A560;
  --merc: #B79CE0;
  --moon: #BFD4E8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #050510;
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; color: inherit; }

/* Type families */
.f-yeseva { font-family: 'Yeseva One', 'Forum', serif; font-weight: 400; }
.f-forum  { font-family: 'Forum', 'Yeseva One', serif; }
.f-corm   { font-family: 'Cormorant Garamond', 'Cormorant', serif; font-style: italic; }
.f-mano   { font-family: 'Manrope', sans-serif; }

/* Scrollbars hidden in phone */
.phone-screen *::-webkit-scrollbar { display: none; }
.phone-screen * { scrollbar-width: none; }

/* Outer stage */
.stage {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #11101e 0%, #050510 60%, #02020a 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.stage--embed {
  position: static; inset: auto;
  background: transparent;
  width: 393px; height: 852px;
  display: block;
  overflow: visible;
}
.stage--embed .tweaks-fab,
.stage--embed [class*="tweaks-panel"],
.stage--embed [class*="tweaksPanel"] { display: none !important; }
.phone--embed {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.phone--embed .phone-screen {
  inset: 0 !important;
  border-radius: 0 !important;
}
.phone-wrap {
  width: 393px; height: 852px;
  transform-origin: center center;
  flex-shrink: 0;
}

/* Phone bezel */
.phone {
  width: 393px; height: 852px;
  border-radius: 56px;
  background: #02020a;
  border: 1px solid #1d1d2c;
  box-shadow:
    0 60px 120px -20px rgba(0, 0, 0, 0.8),
    0 0 0 8px #0a0a14,
    0 0 0 9px #1d1d2c,
    inset 0 0 0 2px #0a0a14;
  position: relative;
  overflow: hidden;
}
.phone-screen {
  position: absolute; inset: 4px;
  border-radius: 52px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 600px 400px at 50% -10%, #0f0e1c 0%, transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

/* Status bar (Android) */
.status-bar {
  height: 36px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 5;
}
.status-bar .right { display: flex; gap: 7px; align-items: center; opacity: 0.95; }

/* Bottom nav */
.bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px 24px;
  background:
    linear-gradient(180deg, rgba(7,7,17,0.0) 0%, rgba(7,7,17,0.8) 30%, rgba(7,7,17,0.95) 100%);
  display: flex; justify-content: space-around; align-items: flex-end;
  z-index: 10;
  border-top: 1px solid var(--border);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px 4px;
  color: var(--text-faint);
  position: relative;
  transition: color 200ms ease;
}
.nav-item.active { color: var(--gold); }
.nav-item .glyph { font-size: 18px; line-height: 1; }
.nav-item .label {
  font-family: 'Forum', serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-item .dot {
  position: absolute; top: 2px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  transition: opacity 300ms ease;
  box-shadow: 0 0 8px var(--gold);
}
.nav-item.active .dot { opacity: 1; }

/* Page content area */
.page {
  position: absolute;
  top: 36px; left: 0; right: 0; bottom: 86px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.page.full { top: 36px; bottom: 0; }
.page-pad { padding: 8px 22px 24px; }

/* Common card */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: background 200ms ease, border-color 300ms ease;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(201,168,106,0.08), transparent 50%);
  pointer-events: none;
}
.glass.strong { background: var(--surface-strong); border-color: var(--border-strong); }
.glass.tap { cursor: pointer; }
.glass.tap:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.glass.tap:active { transform: scale(0.985); }

/* Buttons */
.btn {
  height: 52px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: 'Forum', serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 150ms ease, box-shadow 200ms ease, background 200ms ease;
  padding: 0 22px;
  white-space: nowrap;
}
.btn.primary {
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 60%, #a88752 100%);
  color: #1a1408;
  border: 1px solid var(--gold-soft);
  box-shadow:
    0 0 24px rgba(201, 168, 106, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn.primary:hover { box-shadow: 0 0 36px rgba(201, 168, 106, 0.4), inset 0 1px 0 rgba(255,255,255,0.4); }
.btn.primary:active { transform: scale(0.985); }
.btn.outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: 'Manrope', sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
}
.btn.outline:hover { background: var(--surface-hover); }
.btn.text {
  background: transparent; height: 38px; padding: 0 8px;
  color: var(--gold-soft);
  font-family: 'Manrope', sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
}
.btn.text:hover { color: var(--gold); }
.btn.block { width: 100%; }

/* Glyph divider */
.gdiv {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 14px 0;
  color: var(--gold);
}
.gdiv .line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.gdiv .glyph { font-size: 9px; opacity: 0.75; letter-spacing: 0.2em; }

/* Drop cap */
.dropcap::first-letter {
  font-family: 'Yeseva One', serif;
  font-size: 3.4em;
  line-height: 0.85;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(201, 168, 106, 0.35);
}

/* Headings */
.h-display {
  font-family: 'Yeseva One', serif;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201, 168, 106, 0.2);
}
.h-forum {
  font-family: 'Forum', serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.poetic {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
}
.section-label {
  font-family: 'Forum', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* Stagger fade-in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger > * {
  animation: fadeUp 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stagger > *:nth-child(1) { animation-delay: 60ms; }
.stagger > *:nth-child(2) { animation-delay: 140ms; }
.stagger > *:nth-child(3) { animation-delay: 220ms; }
.stagger > *:nth-child(4) { animation-delay: 300ms; }
.stagger > *:nth-child(5) { animation-delay: 380ms; }
.stagger > *:nth-child(6) { animation-delay: 460ms; }
.stagger > *:nth-child(7) { animation-delay: 540ms; }
.stagger > *:nth-child(8) { animation-delay: 620ms; }
.stagger > *:nth-child(9) { animation-delay: 700ms; }
.stagger > *:nth-child(10) { animation-delay: 780ms; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.fade-in { animation: fadeIn 400ms ease; }
.scale-in { animation: scaleIn 500ms cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Sigil ring */
.sigil-ring {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.sigil-ring::before, .sigil-ring::after {
  content: ''; position: absolute; border-radius: 50%;
  border: 1px solid var(--border);
}
.sigil-ring::before { inset: 0; border-color: var(--border-strong); animation: spin 80s linear infinite; }
.sigil-ring::after { inset: 14%; border-color: var(--border); animation: spin 120s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Page header (sub-screens) */
.page-header {
  display: flex; align-items: center; gap: 10px;
  height: 44px;
  padding: 0 16px;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  border-radius: 50%;
  transition: background 200ms ease, color 200ms ease;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.crumb {
  font-family: 'Forum', serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  color: var(--text-mute);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 200ms ease;
  cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: rgba(201, 168, 106, 0.15);
  border-color: var(--gold);
  color: var(--gold-soft);
}

/* Markers */
.dot-marker {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
}
.dot-marker.up { background: var(--success); }
.dot-marker.down { background: var(--danger); }
.dot-marker.tension { background: var(--tension); }
.dot-marker.merc { background: var(--merc); }
.dot-marker.moon { background: var(--moon); }

/* Mood bar (vertical strip on calendar cards) */
.mood-bar {
  width: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  align-self: stretch;
}

/* Modal sheet */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  animation: fadeIn 250ms ease forwards;
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #11101e 0%, #08081a 100%);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-top: 1px solid var(--border-strong);
  padding: 18px 22px 24px;
  z-index: 60;
  max-height: 76%;
  overflow-y: auto;
  animation: sheetUp 360ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.sheet::before {
  content: '';
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  width: 40px; height: 4px;
  background: var(--text-faint); opacity: 0.5;
  border-radius: 2px;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Inputs */
.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Manrope', sans-serif;
  transition: border-color 200ms ease;
}
.input:focus { outline: none; border-color: var(--gold); }
.input::placeholder { color: var(--text-faint); }
textarea.input { resize: none; line-height: 1.6; }

.field-label {
  font-family: 'Forum', serif;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}

/* Zodiac glyph (sign) tile */
.sign-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 0.92;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}
.sign-tile::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(201,168,106,0.10), transparent 60%);
  pointer-events: none;
}
.sign-tile:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.sign-tile.active {
  background: rgba(201, 168, 106, 0.14);
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(201, 168, 106, 0.18) inset;
}
.sign-tile .sym {
  font-family: 'Forum', serif;
  font-size: 30px;
  color: var(--gold);
  line-height: 1;
}
.sign-tile .nm {
  font-family: 'Forum', serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.sign-tile.active .nm { color: var(--gold-soft); }

/* Tap glow on press */
.tap-glow { position: relative; }
.tap-glow:active::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 24px rgba(201, 168, 106, 0.4) inset;
  pointer-events: none;
}

/* Period tile */
.period-tile {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}
.period-tile:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.period-tile .orb {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 18px;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, rgba(201,168,106,0.15), transparent 70%);
}
.period-tile .nm-row {
  flex: 1; min-width: 0;
}
.period-tile .nm {
  font-family: 'Forum', serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.period-tile .desc {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 2px;
}
.period-tile .arrow { color: var(--text-mute); font-size: 18px; }

/* Section heading on prognosis */
.f-section {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.f-section .ic {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* Tarot card visuals */
.tcard {
  width: 100%; aspect-ratio: 0.66;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,168,106,0.18), transparent 50%),
    linear-gradient(180deg, #1a1424 0%, #0d0a18 100%);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 250ms ease;
}
.tcard.back {
  background:
    repeating-linear-gradient(45deg, rgba(201,168,106,0.06) 0 2px, transparent 2px 8px),
    radial-gradient(circle at 50% 50%, #2a1f3a 0%, #0a0814 100%);
}
.tcard.back .core {
  width: 60%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  position: relative;
}
.tcard.back .core::before {
  content: ''; position: absolute; inset: 12%;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.tcard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.5); border-color: var(--gold); }

/* Resonance ring */
.res-ring {
  position: relative;
  width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
}

/* Drag handle for top sheets, etc. */
.drag-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--text-faint); opacity: 0.4;
  margin: 0 auto 14px;
}

/* misc */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4{margin-top:4px}.mt-6{margin-top:6px}.mt-8{margin-top:8px}.mt-10{margin-top:10px}.mt-12{margin-top:12px}.mt-14{margin-top:14px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-4{margin-bottom:4px}.mb-6{margin-bottom:6px}.mb-8{margin-bottom:8px}.mb-10{margin-bottom:10px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}
.center { text-align: center; }
.flex1 { flex: 1; }
.muted { color: var(--text-mute); }
.faint { color: var(--text-faint); }
.gold  { color: var(--gold); }
.gold-soft { color: var(--gold-soft); }
.danger { color: var(--danger); }
.success { color: var(--success); }
.tension { color: var(--tension); }
