:root {
  --bg-obsidian: #060913;
  --bg-plum: #0D1326;
  --card-bg: rgba(15, 23, 42, 0.84);
  --card-border: rgba(226, 184, 107, 0.28);
  --gold: #E2B86B;
  --gold-soft: #FDE68A;
  --crimson: #818CF8;
  --rose: #F472B6;
  --violet: #818CF8;
  --emerald: #34D399;
  --text-main: #F8FAFC;
  --text-muted: #CBD5E1;
  --text-dim: #94A3B8;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-crucible: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 28px rgba(129, 140, 248, 0.1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 18% 10%, #1E1B4B 0%, #0B1021 52%, #05070F 100%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 105px;
}

h1, h2, h3, .serif-head {
  font-family: 'Cinzel Decorative', 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.02em;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.26;
}
.orb-gold {
  width: 340px;
  height: 340px;
  background: #E2B86B;
  top: -80px;
  right: -60px;
}
.orb-indigo {
  width: 320px;
  height: 320px;
  background: #6366F1;
  bottom: 12%;
  left: -90px;
}
.orb-rose {
  width: 300px;
  height: 300px;
  background: #F472B6;
  top: 42%;
  right: 10%;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-crucible);
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 18px;
  gap: 12px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
}
.avatar-ring {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--gold), var(--violet), var(--rose));
  flex-shrink: 0;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #060913;
}
.live-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid #060913;
  box-shadow: 0 0 8px var(--emerald);
}
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.brand-title-row h1 {
  font-size: 1.18rem;
  color: var(--gold-soft);
}
.pill-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.25), rgba(129, 140, 248, 0.3));
  border: 1px solid rgba(226, 184, 107, 0.5);
  color: var(--gold-soft);
  letter-spacing: 0.06em;
}
.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-chip, .btn-chip-xs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(226, 184, 107, 0.14);
  border: 1px solid rgba(226, 184, 107, 0.45);
  color: var(--gold-soft);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-chip-xs {
  padding: 6px 11px;
  font-size: 0.74rem;
}
.btn-chip:hover, .btn-chip-xs:hover {
  background: rgba(226, 184, 107, 0.28);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #FDE68A 0%, #E2B86B 50%, #C084FC 100%);
  color: #060913;
  font-weight: 800;
  border: none;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(226, 184, 107, 0.28);
  transition: transform 0.18s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-soft);
  border: 1px solid rgba(226, 184, 107, 0.45);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.79rem;
}
.btn-icon {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(226, 184, 107, 0.35);
  color: var(--gold-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.82rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}
.tab-pane.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-crucible-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(23, 32, 58, 0.92), rgba(9, 13, 28, 0.96));
  border: 1px solid rgba(226, 184, 107, 0.42);
}
.hero-portrait-img {
  width: 100%;
  height: 245px;
  object-fit: cover;
  border-radius: 16px;
  border: 1.5px solid rgba(226, 184, 107, 0.55);
}
.eyebrow-tag {
  display: inline-block;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}
.hero-copy-col h2 {
  font-size: 1.22rem;
  line-height: 1.38;
  color: #FFFBEB;
  margin-bottom: 10px;
}
.hero-subcopy {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.section-card {
  padding: 20px;
  margin-bottom: 18px;
}
.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.section-header-row h3 {
  font-size: 1.12rem;
  color: #FFFBEB;
}
.status-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #E0E7FF;
}
.muted-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.helena-quote-box {
  background: rgba(226, 184, 107, 0.09);
  border-left: 3px solid var(--gold);
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #FEF3C7;
  margin-bottom: 12px;
}
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sky-chip {
  font-size: 0.75rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(226, 184, 107, 0.28);
  color: var(--text-main);
}

.scrubber-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-input-pill {
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid rgba(226, 184, 107, 0.4);
  color: var(--gold-soft);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: inherit;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.diagnostic-item {
  background: rgba(9, 14, 28, 0.78);
  border: 1px solid rgba(226, 184, 107, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.diagnostic-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.diagnostic-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--gold-soft);
}
.diagnostic-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #E0E7FF;
}
.diagnostic-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.sign-pills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}
.sign-pill-btn {
  background: rgba(10, 15, 30, 0.82);
  border: 1px solid rgba(226, 184, 107, 0.22);
  border-radius: 12px;
  padding: 8px 6px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sign-pill-btn .g {
  font-size: 1.15rem;
}
.sign-pill-btn .n {
  font-size: 0.71rem;
  font-weight: 700;
}
.sign-pill-btn.active {
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.28), rgba(129, 140, 248, 0.28));
  border-color: var(--gold);
}

.lens-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lens-tab {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(226, 184, 107, 0.22);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.lens-tab.active {
  background: rgba(226, 184, 107, 0.2);
  border-color: var(--gold);
  color: #FFFBEB;
}
.horoscope-display-card {
  background: rgba(8, 12, 26, 0.85);
  border: 1px solid rgba(226, 184, 107, 0.34);
  border-radius: 16px;
  padding: 16px;
}

.wheel-container {
  max-width: 500px;
  margin: 10px auto 18px;
}
.subtab-bar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.subtab-btn {
  white-space: nowrap;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(226, 184, 107, 0.25);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.subtab-btn.active {
  background: linear-gradient(135deg, #FDE68A, #E2B86B);
  color: #060913;
  border-color: transparent;
}
.subtab-pane {
  display: none;
}
.subtab-pane.active {
  display: block;
}

.angel-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.angel-btn {
  padding: 11px 8px;
  border-radius: 12px;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(226, 184, 107, 0.28);
  color: var(--gold-soft);
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
}
.angel-btn.active {
  background: linear-gradient(135deg, #FDE68A, #E2B86B);
  color: #060913;
}
.portal-decode-card {
  background: rgba(9, 14, 28, 0.85);
  border: 1px solid rgba(226, 184, 107, 0.4);
  border-radius: 16px;
  padding: 16px;
}
.num-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.num-stat-box {
  background: rgba(9, 14, 28, 0.82);
  border: 1px solid rgba(226, 184, 107, 0.3);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.num-stat-box .big-num {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.65rem;
  color: var(--gold);
  font-weight: 900;
}
.num-stat-box .lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sound-bath-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.16), rgba(9, 14, 28, 0.85));
  border: 1px solid rgba(226, 184, 107, 0.3);
  border-radius: 18px;
  margin-bottom: 16px;
}
.crucible-breath-orb {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: radial-gradient(circle, #FDE68A 0%, #818CF8 58%, #1E1B4B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #FFFBEB;
  box-shadow: 0 0 36px rgba(226, 184, 107, 0.35);
  margin-bottom: 14px;
}
.crucible-breath-orb.pulsing {
  animation: cruciblePulse 8s infinite ease-in-out;
}
@keyframes cruciblePulse {
  0%, 100% { transform: scale(0.92); box-shadow: 0 0 25px rgba(226, 184, 107, 0.3); }
  50% { transform: scale(1.14); box-shadow: 0 0 58px rgba(129, 140, 248, 0.65); }
}
.freq-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.freq-btn {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(226, 184, 107, 0.15);
  border: 1px solid rgba(226, 184, 107, 0.45);
  color: var(--gold-soft);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.freq-btn.active {
  background: var(--gold);
  color: #060913;
}
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.protocol-card {
  background: rgba(9, 14, 28, 0.78);
  border: 1px solid rgba(226, 184, 107, 0.22);
  border-radius: 14px;
  padding: 14px;
}
.protocol-card h4 {
  color: var(--gold-soft);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.protocol-card p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.meter-flex-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.meter-ring-box {
  position: relative;
  width: 132px;
  height: 132px;
}
.meter-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.meter-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 11;
}
.meter-fg-circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}
.meter-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.meter-center-label span {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--gold-soft);
}
.meter-center-label small {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.checklist-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(9, 14, 28, 0.78);
  border: 1px solid rgba(226, 184, 107, 0.22);
  cursor: pointer;
}
.check-row.done {
  border-color: var(--emerald);
  background: rgba(52, 211, 153, 0.11);
}
.check-row input {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
}

.prompt-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.prompt-chip {
  font-size: 0.75rem;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(226, 184, 107, 0.14);
  border: 1px solid rgba(226, 184, 107, 0.35);
  color: var(--gold-soft);
  cursor: pointer;
}
.grimoire-textarea {
  width: 100%;
  background: rgba(8, 12, 26, 0.9);
  border: 1px solid rgba(226, 184, 107, 0.38);
  border-radius: 14px;
  padding: 13px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 11px;
}
.diary-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 7px;
  z-index: 50;
  background: rgba(9, 14, 28, 0.95);
  border: 1px solid rgba(226, 184, 107, 0.42);
}
.nav-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 7px 4px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.nav-icon {
  font-size: 1.08rem;
  font-weight: 800;
}
.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
}
.nav-tab.active {
  background: linear-gradient(135deg, rgba(226, 184, 107, 0.25), rgba(129, 140, 248, 0.28));
  color: var(--gold-soft);
  border: 1px solid rgba(226, 184, 107, 0.45);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-backdrop.hidden {
  display: none;
}
.modal-card {
  width: 100%;
  max-width: 460px;
  padding: 22px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-soft);
}
.form-input {
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid rgba(226, 184, 107, 0.4);
  border-radius: 11px;
  padding: 10px 12px;
  color: #FFF;
  font-family: inherit;
  font-size: 0.88rem;
}

@media (max-width: 680px) {
  .hero-crucible-card {
    grid-template-columns: 1fr;
  }
  .hero-portrait-img {
    height: 210px;
  }
  .sign-pills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .protocol-grid {
    grid-template-columns: 1fr;
  }
  .num-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

