/* Astral Reader — celestial editorial UI. No external fonts or assets. */

:root {
  --ink: #06101f;
  --ink-2: #0a1728;
  --ink-3: #0f2138;
  --card: rgba(16, 32, 54, 0.66);
  --card-solid: #102035;
  --line: rgba(216, 178, 106, 0.16);
  --line-strong: rgba(216, 178, 106, 0.34);
  --gold: #d8b26a;
  --gold-soft: #ecd6a8;
  --ivory: #f3ecdf;
  --muted: #a9b9cd;
  --dim: #8b9db7;
  --violet: #7f9bd6;
  --rose: #d98a92;
  --aqua: #79b8a8;
  --blue: #88a9dd;
  --danger: #d4695f;
  --radius: 20px;
  --radius-sm: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(44, 86, 150, 0.38), transparent 62%),
    radial-gradient(900px 600px at 8% 8%, rgba(26, 74, 120, 0.3), transparent 60%),
    radial-gradient(700px 500px at 50% 115%, rgba(70, 60, 130, 0.2), transparent 65%),
    linear-gradient(180deg, #06101f 0%, #071426 55%, #040a14 100%);
}
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 27% 64%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 42% 22%, rgba(236,214,168,.8), transparent 60%),
    radial-gradient(1px 1px at 58% 76%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.2px 1.2px at 71% 34%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 83% 12%, rgba(236,214,168,.65), transparent 60%),
    radial-gradient(1px 1px at 91% 58%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.3px 1.3px at 35% 88%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 64% 51%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 6% 78%, rgba(255,255,255,.4), transparent 60%);
}

.skymap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
body.onboarding-mode .skymap { opacity: 0.72; }

.skymap svg { display: block; width: 100%; height: 100%; }
.skymap-live {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
body.sky-bg .skymap-live { opacity: 0.42; }
body.sky-bg #skymap { opacity: 0; }
.skymap-live svg { display: block; width: 100%; height: 100%; }
.skymap-live::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, transparent 34%, rgba(6, 16, 31, 0.35) 72%, rgba(6, 16, 31, 0.6) 100%),
    linear-gradient(180deg, rgba(6, 16, 31, 0.25), transparent 30%, rgba(6, 16, 31, 0.35));
}
.ls-planet {
  font-family: "Apple Symbols", "Segoe UI Symbol", var(--serif);
  font-size: 22px;
  fill: #f4e3bd;
}
.ls-cardinal {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  fill: rgba(216, 178, 106, 0.7);
}
.skymap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 760px at 18% 44%, rgba(6, 16, 31, 0.94), rgba(6, 16, 31, 0.6) 55%, transparent 78%),
    radial-gradient(820px 700px at 76% 44%, rgba(6, 16, 31, 0.55), transparent 76%),
    linear-gradient(90deg, rgba(6, 16, 31, 0.35), transparent 42%, rgba(6, 16, 31, 0.2));
}
.sm-grid, .sm-constellation { opacity: 0.85; }
.sm-zodiac {
  font-family: "Apple Symbols", "Segoe UI Symbol", var(--serif);
  font-size: 22px;
  fill: rgba(216, 178, 106, 0.55);
}
.sm-label {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: rgba(159, 176, 199, 0.3);
}
.sm-star-label {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.14em;
  fill: rgba(216, 178, 106, 0.28);
}
.sm-ecliptic { fill: none; stroke: rgba(216, 178, 106, 0.22); stroke-width: 1.2; stroke-dasharray: 3 8; }
.sm-ring { animation: sm-spin 420s linear infinite; transform-origin: 0 0; }
.sm-twinkle { animation: sm-twinkle 7s ease-in-out infinite alternate; }
@keyframes sm-spin { to { transform: rotate(360deg); } }
@keyframes sm-twinkle { from { opacity: 0.15; } to { opacity: 0.8; } }

::selection { background: rgba(216, 178, 106, 0.28); color: #fff; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: #fff; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Shell                                                              */
/* ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px clamp(18px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(6, 16, 31, 0.94), rgba(6, 16, 31, 0.72));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(216, 178, 106, 0.09);
}

.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ivory); }
.brand:hover { color: var(--ivory); }
.brand-mark { color: var(--gold); font-size: 21px; transform: translateY(-2px); }
.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.15em;
  font-weight: 500;
}
.brand-sub {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.mainnav a:hover { color: var(--ivory); background: rgba(255, 255, 255, 0.04); }
.mainnav a.active { color: var(--ivory); background: rgba(216, 178, 106, 0.11); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 30% 25%, rgba(216,178,106,.3), rgba(20,17,36,.9));
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 15px;
  text-transform: uppercase;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 44px) 110px;
  min-height: calc(100vh - 70px);
  outline: none;
}

.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(6, 16, 31, 0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(216, 178, 106, 0.12);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.tabbar a.active { color: var(--gold-soft); }
.tab-ico { font-size: 26px; line-height: 1; }

/* ------------------------------------------------------------------ */
/* Type & primitives                                                  */
/* ------------------------------------------------------------------ */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.4vw, 44px); }
h2 { font-size: clamp(23px, 3vw, 30px); }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.serif { font-family: var(--serif); }
.gold { color: var(--gold-soft); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-title { font-family: var(--serif); font-size: 20px; }
.card-kicker { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #e7cb92, #cfa457 60%, #b88a41);
  color: #221708;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(216, 178, 106, 0.18);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--gold-soft);
}
.btn-ghost:hover { background: rgba(216, 178, 106, 0.08); }
.btn-quiet {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ivory);
}
.btn-quiet:hover { background: rgba(255, 255, 255, 0.08); }
.btn-danger { background: transparent; border-color: rgba(212, 105, 95, 0.35); color: #e39a92; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--gold-soft);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.ghost-btn:hover { background: rgba(216, 178, 106, 0.08); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.chip.gold { border-color: rgba(216, 178, 106, 0.4); color: var(--gold-soft); }
.chip.rose { border-color: rgba(217, 138, 146, 0.35); color: #e7aab0; }
.chip.aqua { border-color: rgba(121, 184, 168, 0.35); color: #a3d3c6; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--dim);
}
.tag.gold { color: var(--gold); border-color: rgba(216, 178, 106, 0.35); }

/* ------------------------------------------------------------------ */
/* Onboarding                                                         */
/* ------------------------------------------------------------------ */

.onboarding {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(10px, 4vh, 54px);
  animation: rise 0.7s var(--ease) both;
}
.hero h1 {
  font-size: clamp(40px, 6.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero h1 em { color: var(--gold-soft); font-style: italic; }
.hero .lede { font-size: 17px; color: var(--muted); max-width: 46ch; line-height: 1.65; }
.hero-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 16px; }
.hero-points li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; font-size: 14px; color: var(--muted); align-items: start; }
.hero-points b { color: var(--ivory); font-weight: 500; }
.hero-points .pt-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: radial-gradient(circle at 34% 28%, rgba(216,178,106,.24), rgba(8,20,36,.75)); color: var(--gold); font-family: "Apple Symbols", var(--serif); font-size: 25px; line-height: 1; text-align: center; }
.hero-foot { margin-top: 28px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }

.birth-card { padding: clamp(22px, 3vw, 34px); }
.birth-card h2 { font-size: 26px; margin-bottom: 4px; }
.form-grid { display: grid; gap: 15px; margin-top: 22px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 7px; position: relative; }
.field > label:not(.checkbox) { font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); }
.field input, .field select {
  width: 100%;
  background: rgba(4, 10, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ivory);
  font-size: 14.5px;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(4, 10, 20, 0.8);
}
.field input::placeholder { color: #5f576d; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.hint { font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.hint.warn { color: #d9a06a; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.4; }
.checkbox-field { align-self: center; }
.checkbox input {
  appearance: none;
  width: 18px; height: 18px; flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(4, 10, 20, 0.6);
  display: grid; place-content: center;
  transition: background .15s, border-color .15s;
}
.checkbox input:checked { background: var(--gold); border-color: var(--gold); }
.checkbox input:checked::after { content: "✓"; color: #221708; font-size: 12px; line-height: 1; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--gold); }

.city-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 20;
  margin-top: 6px;
  background: #12233b;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}
.city-results:empty { display: none; }
.city-option { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 13px; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.05); text-align: left; font-size: 14px; }
.city-option:last-child { border-bottom: 0; }
.city-option:hover, .city-option:focus { background: rgba(216, 178, 106, 0.1); }
.city-option .co { color: var(--dim); font-size: 11.5px; }
.selected-place { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid rgba(216,178,106,.3); border-radius: var(--radius-sm); background: rgba(216,178,106,.06); font-size: 13.5px; }

/* ------------------------------------------------------------------ */
/* Views                                                              */
/* ------------------------------------------------------------------ */

.view { animation: rise 0.45s var(--ease) both; }
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.view-head h1 { margin-bottom: 8px; }
.view-sub { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view-sub .dot { color: var(--dim); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

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

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 24px;
  align-items: start;
}
.wheel-card { padding: 18px; display: grid; gap: 14px; position: sticky; top: 92px; }
.wheel { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 12px; color: var(--dim); letter-spacing: .04em; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 16px; height: 2px; border-radius: 2px; }

.wheel-sign { font-family: var(--serif); font-size: 27px; fill: var(--gold); opacity: .92; }
.wheel-house { font-family: var(--sans); font-size: 11px; fill: var(--dim); letter-spacing: .06em; }
.wheel-angle { font-family: var(--sans); font-size: 11.5px; fill: var(--gold); letter-spacing: .1em; opacity: .75; }
.wheel-planet { font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", var(--serif); font-size: 23px; fill: #f7f0e2; }
.wheel-retro { font-size: 10.5px; fill: var(--rose); }
.wheel-degree { font-size: 11.5px; fill: var(--muted); letter-spacing: .02em; }
.wheel-name { font-family: var(--serif); font-size: 14px; fill: var(--gold-soft); letter-spacing: .18em; }
.wheel-meta { font-size: 11px; fill: var(--muted); letter-spacing: .05em; }
.wheel-brand { font-size: 10px; fill: var(--dim); letter-spacing: .38em; }

.panel { min-width: 0; }
.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 10px 14px;
  color: var(--dim);
  font-size: 12.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ivory); }
.tab.active { color: var(--gold-soft); border-bottom-color: var(--gold); }

.summary-text { font-size: 16px; line-height: 1.72; color: #e5dcd0; font-family: var(--serif); }
.summary-text strong { color: #fff; font-weight: 500; }

.big-three { display: grid; gap: 12px; margin-top: 20px; }
.big-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 15px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}
.big-glyph {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 32% 28%, rgba(216,178,106,.28), rgba(12,10,22,.9));
  font-family: "Apple Symbols", "Segoe UI Symbol", var(--serif);
  font-size: 46px;
  color: var(--gold-soft);
}
.big-card h4 { font-size: 15px; margin-bottom: 4px; }
.big-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }

.meters { display: grid; gap: 10px; margin-top: 6px; }
.meter-row { display: grid; grid-template-columns: 64px 1fr 42px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.meter { height: 5px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(216,178,106,.55), var(--gold)); }
.meter-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); font-size: 11px; }

.planet-list { display: grid; gap: 2px; }
.planet-row { border-bottom: 1px solid rgba(255,255,255,.055); }
.planet-row:last-child { border-bottom: 0; }
.planet-row summary {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  list-style: none;
  cursor: pointer;
}
.planet-row summary::-webkit-details-marker { display: none; }
.planet-row summary:hover { background: rgba(255,255,255,.02); }
.p-glyph { font-family: "Apple Symbols", "Segoe UI Symbol", var(--serif); font-size: 26px; color: var(--gold); }
.p-name { font-size: 14px; }
.p-place { font-size: 13px; color: var(--muted); }
.p-deg { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 12.5px; }
.p-body { padding: 2px 4px 18px 46px; font-size: 14px; color: var(--muted); line-height: 1.68; }
.p-body strong { color: var(--ivory); font-weight: 500; }
.p-body .basis-line { margin-top: 10px; font-size: 12px; color: var(--dim); letter-spacing: .03em; }

.house-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.house-row:last-child { border-bottom: 0; }
.house-n { font-family: var(--serif); color: var(--gold); font-size: 16px; }
.house-title { font-size: 13.5px; margin-bottom: 2px; }
.house-domain { font-size: 13px; color: var(--dim); line-height: 1.5; }
.house-cusp { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.house-planets { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.aspect-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.aspect-row:last-child { border-bottom: 0; }
.aspect-glyph { font-size: 24px; text-align: center; }
.aspect-main { font-size: 14px; }
.aspect-sub { font-size: 13px; color: var(--dim); margin-top: 2px; }
.orb-bar { width: 86px; height: 3px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.orb-fill { height: 100%; background: var(--gold); opacity: .7; }

.pattern {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.018);
}
.pattern-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.pattern-head span { font-family: var(--serif); font-size: 15px; }
.pattern p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ------------------------------------------------------------------ */
/* Today                                                              */
/* ------------------------------------------------------------------ */

.today-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.today-hero {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px;
  margin-bottom: 18px;
}
.moon-face {
  width: 92px; height: 92px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #f6ecd8, #cdbd9d 45%, #8f8168 70%, #4a4234);
  box-shadow: 0 0 46px rgba(236, 214, 168, 0.18), inset -12px -8px 22px rgba(0,0,0,.35);
  position: relative;
  overflow: hidden;
}
.moon-face::after {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 66% 38%, rgba(20,16,28,.92) 0 33%, transparent 34%);
  opacity: var(--shadow-amount, 0);
}
.today-hero h2 { margin-bottom: 5px; }
.today-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.stat .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.stat .v { font-family: var(--serif); font-size: 18px; color: var(--ivory); }

.daily-text { font-family: var(--serif); font-size: 16.5px; line-height: 1.75; color: #e8dfd2; }
.daily-text strong { color: #fff; font-weight: 500; }

.transit-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; margin-bottom: 10px; background: rgba(255,255,255,.018); }
.transit-card h4 { font-size: 14.5px; margin-bottom: 5px; }
.transit-card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 8px; }
.basis { display: flex; flex-wrap: wrap; gap: 6px; }
.basis-chip {
  font-size: 11.5px;
  color: var(--dim);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  padding: 2px 7px;
  letter-spacing: .02em;
}
.basis-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-right: 4px; }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-cell {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  background: rgba(255,255,255,.015);
}
.day-cell .dow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.day-cell .dnum { font-family: var(--serif); font-size: 17px; margin: 2px 0; }
.day-cell .dmoon { font-size: 12px; color: var(--gold-soft); }
.day-cell.today { border-color: rgba(216,178,106,.4); background: rgba(216,178,106,.07); }

.event-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.event-row:last-child { border-bottom: 0; }
.event-date { font-size: 12px; letter-spacing: .06em; color: var(--gold); text-transform: uppercase; padding-top: 2px; }
.event-label { font-size: 13.5px; margin-bottom: 2px; }
.event-detail { font-size: 13px; color: var(--dim); line-height: 1.5; }

.locked {
  position: relative;
  overflow: hidden;
}
.locked > :not(.lock-cta) { filter: blur(5px); opacity: .45; pointer-events: none; user-select: none; }
.lock-cta {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,9,19,.2), rgba(10,9,19,.75));
}
.lock-cta p { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }

/* ------------------------------------------------------------------ */
/* Ask                                                                */
/* ------------------------------------------------------------------ */

.chat-shell {
  display: grid;
  grid-template-rows: 1fr auto;
  height: calc(100vh - 250px);
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 13, 30, 0.55);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.015);
}
.chat-head .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.chat-scroll { overflow-y: auto; padding: 24px clamp(14px, 3vw, 30px); scroll-behavior: smooth; }
.msg { display: grid; gap: 5px; margin-bottom: 22px; max-width: 86%; }
.msg-user { margin-left: auto; justify-items: end; }
.msg-ai { margin-right: auto; }
.msg-bubble {
  padding: 15px 18px;
  border-radius: 16px;
  font-size: 15.2px;
  line-height: 1.68;
  color: #e7ded1;
}
.msg-ai .msg-bubble {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
  border-top-left-radius: 5px;
}
.msg-user .msg-bubble {
  background: linear-gradient(135deg, rgba(216,178,106,.2), rgba(216,178,106,.1));
  border: 1px solid rgba(216,178,106,.25);
  border-top-right-radius: 5px;
  color: #f6efe2;
}
.msg-bubble p { margin: 0 0 10px; }
.msg-bubble p:last-child { margin: 0; }
.msg-bubble ul { margin: 6px 0 10px; padding-left: 18px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-meta { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 0 4px; }
.msg .basis { margin-top: 2px; }
.msg .basis-toggle {
  background: none; border: 0; padding: 0;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  opacity: .8;
}
.msg .basis-toggle:hover { opacity: 1; }
.msg .basis-list { display: none; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg.basis-open .basis-list { display: flex; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
.suggestion {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  transition: all .2s;
}
.suggestion:hover { border-color: var(--line-strong); color: var(--ivory); background: rgba(216,178,106,.06); }

.composer { border-top: 1px solid rgba(255,255,255,.06); padding: 12px 14px 14px; background: rgba(10,9,19,.5); }
.composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(8,7,15,.6);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 0;
  background: none;
  padding: 8px 0;
  font-size: 14.5px;
  line-height: 1.5;
  max-height: 140px;
  outline: none;
}
.composer textarea::placeholder { color: #5f576d; }
.send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #e7cb92, #cfa457);
  color: #221708;
  font-size: 16px;
  display: grid; place-items: center;
  flex: none;
}
.send-btn:disabled { opacity: .4; cursor: default; }
.composer-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.composer-foot a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .4; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

.quota-note { font-size: 12px; color: var(--dim); }
.quota-note b { color: var(--gold-soft); font-weight: 500; }

/* ------------------------------------------------------------------ */
/* Relationships                                                      */
/* ------------------------------------------------------------------ */

.rel-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.rel-list { display: grid; gap: 10px; }
.rel-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  text-align: left;
  width: 100%;
  color: inherit;
}
.rel-card:hover { border-color: var(--line-strong); }
.rel-card.active { border-color: rgba(216,178,106,.5); background: rgba(216,178,106,.06); }
.rel-name { font-family: var(--serif); font-size: 17px; }
.rel-meta { font-size: 12.5px; color: var(--dim); }
.rel-score { font-size: 12px; color: var(--gold); }

.affinity-head { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.score-ring { position: relative; width: 116px; height: 116px; flex: none; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 30px; color: var(--ivory); }
.score-ring .score-num small { font-size: 13px; color: var(--dim); }

.cat-bars { flex: 1; min-width: 220px; display: grid; gap: 9px; }
.cat-bar { display: grid; grid-template-columns: 112px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.cat-bar .meter { height: 4px; }

.empty {
  border: 1px dashed rgba(216,178,106,.22);
  border-radius: var(--radius);
  padding: 46px 26px;
  text-align: center;
}
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 18px; font-size: 13.5px; }

/* ------------------------------------------------------------------ */
/* Premium                                                            */
/* ------------------------------------------------------------------ */

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.plan {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: rgba(255,255,255,.018);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan.featured {
  border-color: rgba(216,178,106,.55);
  background: linear-gradient(180deg, rgba(216,178,106,.1), rgba(255,255,255,.015) 45%);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.plan h3 { font-size: 20px; }
.plan .price { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--ivory); }
.plan .price small { font-family: var(--sans); font-size: 13px; color: var(--dim); letter-spacing: .04em; }
.plan-features { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--muted); }
.plan-features li::before { content: "·"; color: var(--gold); margin-right: 8px; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 7px; font-size: 13.5px; color: var(--muted); }
.plan li::before { content: "·"; color: var(--gold); margin-right: 8px; }
.plan .btn { margin-top: auto; }
.plan .tag { align-self: flex-start; }

.faq { display: grid; gap: 2px; }
.faq details { border-bottom: 1px solid rgba(255,255,255,.06); padding: 14px 0; }
.faq summary { cursor: pointer; font-size: 14.5px; color: var(--ivory); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq p { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

/* ------------------------------------------------------------------ */
/* Modals                                                             */
/* ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 4, 10, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade .2s ease both;
  overflow-y: auto;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(620px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  background: linear-gradient(180deg, #102138, #081322);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: pop .25s var(--ease) both;
}
.modal.wide { width: min(820px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 24px 0;
}
.modal-head h2 { font-size: 25px; }
.modal-head p { font-size: 13.5px; color: var(--dim); margin-top: 4px; }
.modal-close {
  background: none; border: 1px solid rgba(255,255,255,.1); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%; flex: none; font-size: 16px; line-height: 1;
}
.modal-close:hover { color: var(--ivory); border-color: var(--line-strong); }
.modal-body { padding: 20px 24px 26px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.report-section { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.report-section:last-child { border-bottom: 0; }
.report-section h3 { font-size: 20px; margin-bottom: 4px; }
.report-section .kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.report-section p { font-family: var(--serif); font-size: 16px; line-height: 1.72; color: #e2d8c9; }
.report-section strong { color: #fff; font-weight: 500; }
.report-section .basis { margin-top: 12px; }

.paywall-box {
  border: 1px solid rgba(216,178,106,.3);
  background: rgba(216,178,106,.06);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
  text-align: center;
}
.paywall-box p { font-size: 13px; color: var(--muted); }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  background: #12233b;
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toastIn .25s var(--ease) both;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.onboarding-mode .tabbar { display: none; }
.noscript { padding: 40px; text-align: center; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .brand-sub { display: none; }
}

@media (max-width: 1080px) {
  .chart-grid { grid-template-columns: 1fr; }
  .wheel-card { position: static; }
  .today-grid { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .onboarding { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(38px, 8vw, 56px); }
}

@media (max-width: 760px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 14.5px; letter-spacing: 0.1em; }
  .hero-points, .hero-foot { display: none; }
  .skymap { opacity: 0.6 !important; }
  body.sky-bg .skymap-live { opacity: 0.32 !important; }
  .skymap-live .sm-label, .skymap-live .sm-star-label { display: none; }
  .skymap::after {
    background:
      radial-gradient(620px 520px at 12% 24%, rgba(6, 16, 31, 0.82), transparent 76%),
      radial-gradient(600px 520px at 82% 38%, rgba(6, 16, 31, 0.35), transparent 80%),
      linear-gradient(180deg, rgba(6, 16, 31, 0.1), transparent 35%, rgba(6, 16, 31, 0.25));
  }
  .sm-label, .sm-star-label { display: none; }
  .sm-zodiac { font-size: 27px; }
  .hero .lede { font-size: 15px; }
  .onboarding { padding-top: 4px; gap: 22px; }
  .ask-head { display: none; }
  .chat-shell {
    position: fixed;
    top: 58px; left: 0; right: 0;
    bottom: calc(76px + env(safe-area-inset-bottom));
    height: auto; min-height: 0;
    border-radius: 0; border-left: 0; border-right: 0;
    z-index: 30;
    background: rgba(12, 10, 24, 0.96);
  }
  .chat-head { padding: 10px 16px; }
  .wheel-degree { display: none; }
  .wheel-house { font-size: 13px; }
  .wheel-angle { font-size: 12px; }
  .wheel-meta { font-size: 12px; }
  .eyebrow { font-size: 12px; }
  .card-kicker { font-size: 11px; }
  .hint { font-size: 12.5px; }
  .tab { font-size: 13px; }
  .chat-scroll { padding: 16px 14px; }
  .composer { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .composer-foot span:first-child { display: none; }
  .composer-foot { justify-content: flex-end; }
  .mainnav { display: none; }
  .tabbar { display: flex; }
  .topbar { padding: 12px 18px; }
  .ghost-btn.small { padding: 6px 12px; font-size: 11.5px; }
  .app { padding: 22px 16px 100px; }
  .view-head { margin-bottom: 18px; }
  .card { padding: 20px; border-radius: 16px; }
  .big-card { grid-template-columns: 60px 1fr; gap: 12px; }
  .big-glyph { width: 60px; height: 60px; font-size: 38px; }
  .msg { max-width: 94%; }
  .today-hero { gap: 18px; padding: 20px; }
  .moon-face { width: 68px; height: 68px; }
  .week-strip { gap: 4px; }
  .day-cell { padding: 8px 3px; }
  .day-cell .dnum { font-size: 14px; }
  .day-cell .dmoon { font-size: 14px; }
  .house-row { grid-template-columns: 30px 1fr; }
  .house-cusp { grid-column: 2; text-align: left; }
  .form-grid.two { grid-template-columns: 1fr; }
  .modal { border-radius: 16px; }
  .modal-body { padding: 16px 18px 22px; }
  .modal-head { padding: 18px 18px 0; }
  .toasts { bottom: 86px; }
  .affinity-head { gap: 18px; }
  .score-ring { width: 96px; height: 96px; }
  .score-ring .score-num { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .chat-scroll { scroll-behavior: auto; }
  .sm-ring, .sm-twinkle { animation: none; }
}

@media print {
  .topbar, .tabbar, .sky, .modal-close, .modal-actions, .toasts { display: none !important; }
  body, .modal, .modal-backdrop { background: #fff !important; color: #111 !important; }
  .modal-backdrop { position: static; display: block; padding: 0; }
  .modal { max-height: none; border: 0; box-shadow: none; width: 100%; }
  .report-section p, .report-section strong, .modal-head h2 { color: #111 !important; }
  .basis-chip { color: #444; border-color: #ccc; }
}
