.astrology-page { --accent: #a8737b; }

.astrology-hero {
  min-height: 390px;
  grid-template-columns: minmax(0, 1fr) 270px;
}

.celestial-seal {
  position: relative;
  width: 250px;
  aspect-ratio: 1;
  justify-self: end;
  border: 1px solid rgba(207, 175, 120, .3);
  border-radius: 50%;
  background: rgba(207, 175, 120, .025);
}

.celestial-seal::before,
.celestial-seal::after,
.orbit {
  content: "";
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(207, 175, 120, .28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.celestial-seal::before { width: 72%; height: 72%; }
.celestial-seal::after { width: 38%; height: 38%; border-color: rgba(168, 115, 123, .38); }
.celestial-seal .orbit-one { width: 94%; height: 38%; transform: translate(-50%, -50%) rotate(27deg); }
.celestial-seal .orbit-two { width: 42%; height: 94%; transform: translate(-50%, -50%) rotate(-18deg); }
.celestial-seal b { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); color: var(--gold); font-size: 34px; font-weight: 400; }
.celestial-seal span { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text); background: var(--panel); font-size: 17px; }
.celestial-seal span:nth-of-type(1) { left: 15px; top: 103px; }
.celestial-seal span:nth-of-type(2) { right: 29px; top: 32px; }
.celestial-seal span:nth-of-type(3) { right: 18px; bottom: 48px; }

.astro-promise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.astro-promise-grid article {
  min-height: 168px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 21, 31, .76);
}

.astro-promise-grid span { color: var(--accent); font-size: 11px; letter-spacing: .14em; }
.astro-promise-grid strong { display: block; margin: 21px 0 7px; font-family: "Songti SC", "STSong", serif; font-size: 20px; font-weight: 600; }
.astro-promise-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.astro-form { display: grid; gap: 22px; }
.astro-form-grid,
.astro-question-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, .025);
  font: inherit;
  font-size: 14px;
}
.field textarea { min-height: 108px; resize: vertical; line-height: 1.7; }
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.place-search-results { display: grid; gap: 8px; margin: -8px 0 2px; }
.place-result {
  width: 100%;
  min-height: 60px;
  display: grid;
  gap: 4px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, .018);
  text-align: left;
  cursor: pointer;
}
.place-result:hover,
.place-result:focus-visible { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.place-result small,
.place-preview { color: var(--muted); font-size: 11px; line-height: 1.5; }
.place-preview[data-state="ok"] { color: #9fd8c2; }
.place-preview[data-state="warn"] { color: #e39a8e; }

.consent-line { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.consent-line input { margin-top: 4px; accent-color: var(--accent); }
.consent-line a { color: var(--text); }
.submit-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.submit-row .primary { min-width: 240px; padding: 0 24px; }
.submit-row small { color: var(--faint); }
.astro-method .notice { margin: 18px 0 0; }
.result-shell { scroll-margin-top: 90px; }
.result { color: var(--muted); line-height: 1.8; }
.result.empty { min-height: 90px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 15px; text-align: center; }
.transit-toolbar { display: grid; grid-template-columns: minmax(170px, 230px) auto 1fr; align-items: end; gap: 14px; }
.transit-toolbar .secondary { min-height: 49px; padding: 0 20px; }
.transit-toolbar small { align-self: center; color: var(--faint); line-height: 1.6; }
.transit-result { display: grid; gap: 12px; margin-top: 20px; }
.transit-result.empty { min-height: 90px; place-items: center; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; }
.transit-summary { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.transit-summary div { display: flex; align-items: baseline; gap: 10px; }
.transit-summary div span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.transit-summary p { margin: 0; color: var(--text); font-size: 13px; }
.transit-summary small { grid-column: 1 / -1; color: var(--muted); line-height: 1.6; }
.transit-month { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.transit-month > summary { padding: 15px 17px; color: var(--text); cursor: pointer; font-weight: 700; list-style-position: inside; }
.transit-event-list { display: grid; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.transit-event { position: relative; display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 3px 14px; padding: 15px 17px 15px 20px; background: var(--panel); }
.transit-event::before { content: ""; position: absolute; inset: 14px auto 14px 0; width: 3px; border-radius: 4px; background: var(--line-strong); }
.transit-event.major::before { background: var(--accent); }
.transit-event.notable::before { background: var(--gold); }
.transit-event time { grid-row: 1 / 4; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.transit-event strong { color: var(--text); font-size: 14px; }
.transit-event p { margin: 0; color: var(--muted); font-size: 12px; }
.transit-event small { color: var(--faint); font-size: 11px; }
.synastry-shell { overflow: hidden; }
.synastry-pair-note,
.synastry-person-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 18px; }
.synastry-pair-note { padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--gold) 5%, transparent); }
.synastry-pair-note strong,
.synastry-person-head strong { color: var(--gold); font-family: "Songti SC", "STSong", serif; font-size: 17px; }
.synastry-pair-note span,
.synastry-person-head small { color: var(--muted); font-size: 12px; }
.synastry-form { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.synastry-result { display: grid; gap: 12px; margin-top: 20px; }
.synastry-result.empty { min-height: 90px; place-items: center; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; }
.synastry-summary { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.synastry-summary strong { color: var(--text); }
.synastry-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.synastry-summary small { grid-column: 1 / -1; color: var(--faint); line-height: 1.6; }
.synastry-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.synastry-column { display: grid; gap: 10px; align-content: start; }
.synastry-column > h3 { margin: 5px 0 0; color: var(--gold); font-family: "Songti SC", "STSong", serif; font-size: 17px; font-weight: 600; }
.synastry-event,
.synastry-overlay { position: relative; display: grid; gap: 5px; padding: 14px 15px 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.synastry-event::before { content: ""; position: absolute; inset: 13px auto 13px 0; width: 3px; border-radius: 3px; background: var(--line-strong); }
.synastry-event.major::before { background: var(--accent); }
.synastry-event.notable::before { background: var(--gold); }
.synastry-event strong,
.synastry-overlay strong { color: var(--text); font-size: 13px; }
.synastry-event span,
.synastry-overlay span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.synastry-event small,
.synastry-overlay small { color: var(--faint); font-size: 10px; }
.synastry-wheel-wrap { width: min(100%, 560px); display: grid; gap: 8px; justify-self: center; margin: 4px auto; color: var(--text); }
.synastry-wheel-wrap svg { width: 100%; max-height: 520px; filter: drop-shadow(0 12px 34px rgba(0, 0, 0, .12)); }
.synastry-wheel-wrap figcaption { color: var(--faint); font-size: 10px; line-height: 1.6; text-align: center; }
.synastry-reading { display: grid; gap: 10px; margin-top: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel)); }
.synastry-reading-head { display: grid; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.synastry-reading-head h3 { margin: 0; color: var(--gold); font-family: "Songti SC", "STSong", serif; font-size: 19px; }
.synastry-reading-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.synastry-reading-card { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.synastry-reading-card:last-child { border-bottom: 0; }
.synastry-reading-index { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line)); border-radius: 50%; color: var(--accent); font: 600 10px/1 ui-monospace, monospace; }
.synastry-reading-card > div { display: grid; gap: 6px; }
.synastry-reading-card strong { color: var(--text); font-size: 14px; }
.synastry-reading-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.synastry-reading-card small { color: var(--faint); font-size: 10px; line-height: 1.55; }
.synastry-reading-card em { color: var(--gold); font-size: 11px; line-height: 1.55; font-style: normal; }
.progress-card { display: grid; justify-items: center; gap: 10px; padding: 30px; text-align: center; }
.progress-card .spinner { width: 28px; height: 28px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: astro-spin .9s linear infinite; }
.progress-card span,
.progress-card small { color: var(--muted); }
@keyframes astro-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .progress-card .spinner { animation: none; border-top-color: var(--gold); }
}

@media (prefers-color-scheme: light) {
  .celestial-seal { border-color: rgba(139, 104, 56, .27); background: rgba(139, 104, 56, .02); }
  .celestial-seal::before,
  .celestial-seal .orbit { border-color: rgba(139, 104, 56, .25); }
  .celestial-seal::after { border-color: rgba(154, 68, 60, .3); }
  .celestial-seal span { background: #fffdfa; box-shadow: 0 8px 24px rgba(62, 53, 45, .08); }
  .astro-promise-grid article { background: rgba(255, 253, 249, .88); box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(62, 53, 45, .04); }
  .field input,
  .field select,
  .field textarea,
  .place-result,
  .transit-event,
  .synastry-event,
  .synastry-overlay { color: var(--text); background: #fffdfa; }
  .synastry-reading { background: linear-gradient(145deg, #fffaf0, #f6eee0); }
  .place-preview[data-state="ok"] { color: #39715d; }
  .place-preview[data-state="warn"] { color: #9c4a42; }
}

@media (max-width: 820px) {
  .astrology-hero { min-height: 0; grid-template-columns: minmax(0, 1fr) 190px; }
  .celestial-seal { width: 185px; }
  .astro-promise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .astrology-hero { grid-template-columns: 1fr; }
  .celestial-seal { width: 168px; justify-self: start; margin-top: 4px; }
  .astro-promise-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .astro-promise-grid article { min-height: 150px; padding: 17px; }
  .astro-promise-grid strong { margin-top: 15px; font-size: 18px; }
  .astro-form-grid,
  .astro-question-row { grid-template-columns: 1fr; gap: 14px; }
  .field-wide { grid-column: auto; }
  .submit-row { display: grid; }
  .submit-row .primary { width: 100%; min-width: 0; }
  .astro-ledger { grid-template-columns: 1fr 1fr; }
  .transit-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .transit-event { grid-template-columns: 1fr; }
  .transit-event time { grid-row: auto; }
  .synastry-columns { grid-template-columns: 1fr; }
  .synastry-pair-note,
  .synastry-person-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 380px) {
  .astro-promise-grid { grid-template-columns: 1fr; }
  .astro-promise-grid article { min-height: 0; }
}
