:root {
  color-scheme: light;
  --canvas: #f4eee2;
  --surface: #fffdf8;
  --surface-warm: #fbf5e9;
  --ink: #241a16;
  --ink-soft: #55473f;
  --muted: #7d6e63;
  --line: #ded1bd;
  --line-strong: #b9975c;
  --gold: #b18a3b;
  --gold-light: #d8b968;
  --gold-dark: #72551d;
  --kumkum: #8d2927;
  --kumkum-dark: #50151b;
  --indigo: #26354d;
  --good-bg: #edf3e9;
  --good-line: #75906e;
  --good-ink: #29492f;
  --warn-bg: #fbefd1;
  --warn-line: #c18b2d;
  --warn-ink: #6b490c;
  --bad-bg: #f8e7e2;
  --bad-line: #ad665e;
  --bad-ink: #702d28;
  --shadow: 0 16px 50px rgba(52, 32, 21, 0.08);
  --focus: #9e7021;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--canvas); }
body { position: relative; margin: 0; background: var(--canvas); color: var(--ink); font-family: Georgia, "Times New Roman", serif; line-height: 1.58; isolation: isolate; }
body::before { position: fixed; inset: 0; z-index: 0; background: url("../assets/celestial-header.jpg") top center / 1200px auto repeat-y; content: ""; opacity: 0.035; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent); }
body > * { position: relative; z-index: 1; }
button, input, select { min-height: 46px; font: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 4.6rem; font-weight: 400; line-height: 0.98; }
h2 { margin: 0; font-size: 2.75rem; font-weight: 500; line-height: 1.08; }
h3 { margin: 0; font-size: 1.65rem; font-weight: 600; line-height: 1.22; }
h4 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.32; }

.skip-link { position: fixed; top: 0.6rem; left: 0.6rem; z-index: 20; transform: translateY(-150%); border: 1px solid var(--gold-light); background: var(--surface); padding: 0.55rem 0.8rem; }
.skip-link:focus { transform: translateY(0); }
.wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

button { border: 1px solid var(--line-strong); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; padding: 0.72rem 1rem; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
button:hover { border-color: var(--kumkum); background: var(--surface-warm); color: var(--kumkum-dark); }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus), transparent 50%); outline-offset: 3px; }
button.primary { min-height: 54px; border-color: var(--kumkum-dark); background: var(--kumkum-dark); color: #fff9e9; box-shadow: 0 7px 18px rgba(80, 21, 27, 0.18); font-size: 1.04rem; font-weight: 700; }
button.primary:hover { border-color: var(--gold-dark); background: var(--kumkum); color: #fffdf6; box-shadow: 0 9px 24px rgba(80, 21, 27, 0.24); }
button.quiet-action { border-color: transparent; color: var(--muted); }
button.quiet-action:hover { border-color: var(--line); background: transparent; color: var(--kumkum-dark); }

input, select { width: 100%; border: 1px solid #cdbfa8; border-radius: 3px; background: #fffefa; color: var(--ink); padding: 0.62rem 0.72rem; transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus, select:focus { border-color: var(--gold-dark); background: #fff; box-shadow: 0 0 0 3px rgba(177, 138, 59, 0.15); }
label { display: grid; gap: 0.42rem; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }

.site-header { position: relative; min-height: 320px; overflow: hidden; border-bottom: 4px solid var(--gold); background: var(--kumkum-dark); color: #fff9eb; isolation: isolate; }
.header-art { position: absolute; inset: 0; z-index: -2; background: var(--kumkum-dark) url("../assets/celestial-header.jpg") center / cover no-repeat; }
.site-header::after { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(45, 7, 12, 0.82), rgba(47, 9, 14, 0.34) 54%, rgba(47, 9, 14, 0.08)); content: ""; }
.header-topline { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(241, 209, 125, 0.45); padding-block: 0.72rem; color: #eddba9; font-size: 0.76rem; letter-spacing: 0; text-transform: uppercase; }
.header-topline p { margin: 0; }
.header-inner { padding: 2.8rem 0 3.4rem; }
.brand-lockup { display: flex; max-width: 720px; align-items: center; gap: 1rem; }
.brand-mark { position: relative; display: grid; width: 4.5rem; height: 4.5rem; place-items: center; flex: 0 0 auto; border: 1px solid #e5c66f; color: #f3db98; transform: rotate(45deg); }
.brand-mark::before { position: absolute; inset: 6px; border: 1px solid rgba(229, 198, 111, 0.5); content: ""; }
.brand-mark span { transform: rotate(-45deg); font-size: 0.78rem; font-weight: 700; letter-spacing: 0; }
.brand-script { margin: 0 0 0.5rem; color: #edd69a; font-size: 0.9rem; font-style: italic; }
.header-note { max-width: 660px; margin: 1.1rem 0 0; color: #f2e9d5; font-size: 1.02rem; line-height: 1.55; }
.header-principles { display: flex; flex-wrap: wrap; gap: 0.75rem 1.6rem; margin-top: 1.15rem; color: #efd996; font-size: 0.78rem; text-transform: uppercase; }
.header-principles span { position: relative; }
.header-principles span + span::before { position: absolute; top: 0.4rem; left: -0.92rem; color: var(--gold-light); content: "◆"; font-size: 0.42rem; }

.main-layout { display: grid; gap: 1rem; padding: 0 0 3rem; }
.journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: -1.65rem -2.4rem 1.6rem; border-bottom: 1px solid var(--line-strong); background: #f8f0e2; }
.journey-step { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.68rem; min-height: 68px; padding: 0.72rem 1.1rem; color: var(--muted); }
.journey-step + .journey-step { border-left: 1px solid var(--line); }
.journey-step.current { color: var(--ink); background: var(--surface-warm); }
.journey-step.completed { color: var(--ink-soft); background: #f5ebd7; }
.journey-step.completed .journey-number::after { margin-left: 0.28rem; color: var(--kumkum); content: "✓"; font-size: 0.7rem; vertical-align: middle; }
.journey-number { color: var(--gold-dark); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.journey-step strong { display: block; color: var(--kumkum-dark); font-weight: 700; }

.panel, .notice { background: var(--surface); }
.panel { border: 1px solid var(--line); }
.entry-panel { position: relative; overflow: hidden; margin-top: -1.7rem; padding: 2.4rem; box-shadow: var(--shadow); }
.entry-panel::after, #analysis-output::after, #profile-output::after { position: absolute; top: 0; right: 0; z-index: 0; width: min(58%, 680px); height: 190px; background: url("../assets/celestial-header.jpg") 82% center / 680px auto no-repeat; content: ""; opacity: 0.055; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%, #000); mask-image: linear-gradient(90deg, transparent, #000 42%, #000); }
.entry-panel > *, #analysis-output > *, #profile-output > * { position: relative; z-index: 1; }
#analysis-output::before, #profile-output::before { display: block; width: 54px; height: 4px; margin-bottom: 1.3rem; background: var(--kumkum); content: ""; }
.notice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #d3c39f; border-left: 4px solid var(--gold); color: var(--ink-soft); padding: 0.95rem 1.15rem; font-size: 0.91rem; }
.notice strong { display: block; margin-bottom: 0.1rem; color: var(--kumkum-dark); }
.info-notice span + span { border-left: 1px solid var(--line); padding-left: 1.15rem; }
.error-notice { display: block; margin-top: 1rem; border-color: var(--bad-line); border-left-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-ink); }
.hidden { display: none !important; }
.entry-note { display: flex; justify-content: space-between; gap: 1rem 2rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); padding: 0 0 0.85rem; color: var(--muted); font-size: 0.84rem; }
.entry-note p { margin: 0; }
.entry-note strong { color: var(--ink-soft); }

.section-heading { max-width: 790px; margin-bottom: 1.4rem; }
.entry-heading { display: grid; grid-template-columns: minmax(250px, 0.72fr) minmax(320px, 1fr); max-width: none; align-items: end; gap: 2rem; border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
.section-intro { margin: 0; color: var(--muted); }
.eyebrow { margin: 0 0 0.38rem; color: var(--kumkum); font-size: 0.72rem; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.entry-planets { display: flex; width: 74px; height: 42px; align-items: center; margin-top: 0.8rem; }
.entry-planet { width: 38px; height: 38px; }
.entry-planet-left { z-index: 2; animation: entry-planet-left 3.6s ease-in-out infinite; }
.entry-planet-right { margin-left: -7px; animation: entry-planet-right 3.6s ease-in-out infinite; }

.person-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.person-card { display: grid; gap: 1rem; min-width: 0; margin: 0; border: 1px solid var(--line); border-top: 4px solid var(--kumkum); border-radius: 3px; background: var(--surface-warm); padding: 1.15rem; }
.person-card:nth-child(2) { border-top-color: var(--indigo); }
.person-card legend { display: flex; align-items: center; gap: 0.65rem; padding: 0 0.25rem; color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.person-card legend > span:last-child { display: grid; line-height: 1.1; }
.person-card legend small { margin-top: 0.22rem; color: var(--muted); font-size: 0.7rem; font-weight: 400; }
.person-index { display: inline-grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid var(--gold); background: #fffefa; color: var(--kumkum-dark); font-size: 0.78rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.field-help { margin: 0; color: var(--muted); font-size: 0.84rem; }
.actions { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 1.25rem; margin-top: 1.35rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.primary-action { display: grid; grid-template-columns: minmax(230px, 0.7fr) minmax(250px, 1fr); align-items: center; gap: 1rem; }
.primary-action p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.secondary-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 0.55rem; }

#analysis-output, #profile-output { position: relative; overflow: hidden; scroll-margin-top: 1rem; padding: 2.25rem; background: #fffdf8; }
.output-stack { display: grid; gap: 0.95rem; }
.summary-grid, .score-grid, .koota-grid, .factor-grid, .profile-grid, .narrative-grid, .guide-grid, .portrait-grid, .impact-grid, .scenario-grid { display: grid; gap: 0.9rem; }
.summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.score-grid { grid-template-columns: minmax(210px, 0.4fr) minmax(0, 1fr); }
.koota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.factor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-grid, .narrative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portrait-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; }
.impact-grid, .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-section { position: relative; overflow: hidden; scroll-margin-top: 5rem; padding-top: 0.8rem; }
.report-section::after { position: absolute; top: 0.25rem; right: -1.2rem; z-index: 0; width: 250px; height: 105px; background: url("../assets/celestial-header.jpg") 79% center / 390px auto no-repeat; content: ""; opacity: 0.045; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 48%, #000); mask-image: linear-gradient(90deg, transparent, #000 48%, #000); }
.report-section > * { position: relative; z-index: 1; }
.report-section + .report-section { margin-top: 0.2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.report-nav { position: sticky; top: 0; z-index: 5; display: flex; overflow-x: auto; border-block: 1px solid var(--line-strong); background: rgba(255, 253, 248, 0.96); scrollbar-width: thin; }
.report-nav a { flex: 0 0 auto; border-bottom: 3px solid transparent; padding: 0.78rem 0.9rem 0.65rem; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 0.83rem; }
.report-nav a:hover, .report-nav a[aria-current="location"] { border-bottom-color: var(--kumkum); color: var(--kumkum-dark); }

.card { min-width: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); padding: 1.05rem; }
.card.compact { padding: 0.95rem; }
.card p:not(.eyebrow):not(.field-help) { color: var(--ink-soft); }
.card h3 + p, .card h4 + p { margin-top: 0.55rem; }
.card-title-row { display: flex; align-items: start; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.45rem; }
.summary-grid .card { border-top: 4px solid var(--kumkum); background: var(--surface-warm); }
.summary-grid .card:nth-child(2) { border-top-color: var(--indigo); }
.portrait-item { border-top: 3px solid var(--gold); }
.birth-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.planet-seal { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.75rem; }
.planet-seal-label { white-space: nowrap; }
.meta-list { display: grid; gap: 0; margin: 0.85rem 0 0; }
.meta-row { display: grid; grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr); gap: 0.75rem; padding: 0.42rem 0; border-bottom: 1px solid #e8ddcd; }
.meta-row:last-child { border-bottom: 0; }
.meta-label { color: var(--muted); font-size: 0.84rem; }

.synthesis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-strong); background: var(--surface-warm); }
.synthesis-item { min-width: 0; padding: 1.15rem; }
.synthesis-item + .synthesis-item { border-left: 1px solid var(--line); }
.synthesis-item h4 { color: var(--kumkum-dark); }
.synthesis-item p { margin: 0.55rem 0 0; color: var(--ink-soft); }

.comparison-table { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); }
.comparison-row { display: grid; grid-template-columns: minmax(145px, 0.72fr) repeat(2, minmax(210px, 1fr)) minmax(240px, 1.18fr); min-width: 0; }
.comparison-row + .comparison-row { border-top: 1px solid var(--line); }
.comparison-cell { min-width: 0; padding: 1rem; }
.comparison-cell + .comparison-cell { border-left: 1px solid var(--line); }
.comparison-cell p { margin: 0; color: var(--ink-soft); }
.comparison-header { background: var(--kumkum-dark); color: #fff9e9; }
.comparison-header .comparison-cell { display: grid; align-content: center; color: inherit; font-size: 0.86rem; }
.comparison-header .comparison-cell + .comparison-cell { border-left-color: rgba(241, 209, 125, 0.3); }
.person-heading { gap: 0.08rem; }
.person-heading strong { color: #f0d588; font-size: 1.02rem; }
.person-heading span { color: #e8d9bc; }
.comparison-aspect { background: #f8eedc; }
.comparison-aspect h4 { margin-bottom: 0.58rem; }
.groom-cell { background: #fffdf8; }
.bride-cell { background: #faf8f2; }
.interplay-cell { border-left-color: var(--line-strong) !important; background: #f3f0e8; }
.interplay-cell .field-help { margin-top: 0.7rem; padding-top: 0.58rem; border-top: 1px solid var(--line); }
.comparison-mobile-label { display: none; color: var(--kumkum-dark); font-size: 0.75rem; font-weight: 700; }

.planet-body { position: relative; display: block; flex: 0 0 auto; border: 2px solid rgba(65, 42, 29, 0.44); border-radius: 50%; background: var(--planet-color); box-shadow: inset -7px -8px 0 rgba(62, 30, 22, 0.12), 0 7px 14px rgba(67, 37, 24, 0.14); }
.planet-body::before { position: absolute; content: ""; pointer-events: none; }
.planet-detail { position: absolute; z-index: 1; display: block; border-radius: 50%; pointer-events: none; }
.planet-face { position: absolute; inset: 0; z-index: 3; }
.planet-eye { position: absolute; top: 34%; width: 11%; aspect-ratio: 1; border-radius: 50%; background: #35251e; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.7); }
.planet-eye.left-eye { left: 27%; }
.planet-eye.right-eye { right: 27%; }
.planet-cheek { position: absolute; top: 50%; width: 14%; height: 8%; border-radius: 50%; background: rgba(185, 74, 74, 0.48); }
.planet-cheek.left-cheek { left: 18%; }
.planet-cheek.right-cheek { right: 18%; }
.planet-smile { position: absolute; top: 47%; left: 38%; width: 24%; height: 18%; border-bottom: 2px solid #35251e; border-radius: 0 0 50% 50%; }
.planet-arm { position: absolute; z-index: 1; top: 54%; width: 34%; height: 22%; border-bottom: 3px solid #5f4336; border-radius: 50%; }
.mini-planet { width: 34px; height: 34px; animation: planet-float 3.4s ease-in-out infinite; }
.mini-planet .toward-arm, .entry-planet .toward-arm { display: none; }

.planet-sun { border-color: #9b6418; background: #f2b63f; box-shadow: 0 0 0 5px rgba(223, 151, 33, 0.22), inset -7px -8px 0 rgba(143, 78, 13, 0.12), 0 7px 16px rgba(122, 69, 15, 0.2); }
.planet-sun::before { inset: -10%; border: 3px dotted #c9801d; border-radius: 50%; animation: sun-halo 8s linear infinite; }
.planet-sun .detail-one { top: 18%; left: 19%; width: 16%; height: 9%; background: #ffd66f; transform: rotate(-18deg); }
.planet-sun .detail-two { right: 17%; bottom: 19%; width: 19%; height: 10%; background: #db8d23; transform: rotate(20deg); }

.planet-moon { border-color: #9d927c; background: #eee3c8; }
.planet-moon .detail-one { top: 16%; left: 18%; width: 22%; height: 20%; background: #c8bea9; box-shadow: inset 2px 2px 0 rgba(87, 74, 62, 0.15); }
.planet-moon .detail-two { right: 15%; bottom: 16%; width: 16%; height: 15%; background: #d3c7ae; }

.planet-mars { border-color: #8e3029; background: #d95537; box-shadow: inset -8px -9px 0 rgba(117, 35, 28, 0.18), 0 0 0 4px rgba(237, 118, 45, 0.14), 0 8px 18px rgba(128, 43, 27, 0.25); }
.planet-mars::before { top: 5%; left: -42%; z-index: 0; width: 62%; height: 72%; border: 0; border-radius: 80% 18% 70% 25%; background: #f39a33; box-shadow: -10px 5px 0 #dc5b2d, -19px 12px 0 #f5c34e; transform: rotate(-20deg); animation: mars-flame 0.8s ease-in-out infinite alternate; }
.planet-mars .detail-one { top: 17%; right: 17%; width: 21%; height: 15%; background: #f28b45; transform: rotate(17deg); }
.planet-mars .detail-two { bottom: 16%; left: 19%; width: 17%; height: 14%; background: #9f362d; box-shadow: inset 2px 2px 0 rgba(69, 24, 20, 0.18); }
.planet-mars .planet-cheek { background: rgba(255, 181, 91, 0.6); }

.planet-mercury { border-color: #68716f; background: #a8b0a9; }
.planet-mercury .detail-one { top: 17%; right: 18%; width: 19%; height: 18%; background: #78847f; }
.planet-mercury .detail-two { bottom: 15%; left: 18%; width: 14%; height: 14%; background: #c8cec7; }

.planet-jupiter { border-color: #8d5a2b; background: #d7a565; }
.planet-jupiter .detail-one { top: 23%; left: 8%; width: 84%; height: 10%; border-radius: 8px; background: #f0cf98; box-shadow: 0 14px 0 #af6f43, 0 27px 0 #ead0a1; }
.planet-jupiter .detail-two { right: 13%; bottom: 22%; width: 19%; height: 11%; background: #a84b32; transform: rotate(-7deg); }

.planet-venus { border-color: #9e6c58; background: #dfad79; }
.planet-venus .detail-one { top: 21%; left: 9%; width: 78%; height: 11%; border-radius: 50%; background: #f0d39f; transform: rotate(-12deg); }
.planet-venus .detail-two { right: 11%; bottom: 22%; width: 67%; height: 9%; border-radius: 50%; background: #c98768; transform: rotate(16deg); }

.planet-saturn { border-color: #806b4d; background: #ccb071; }
.planet-saturn::before { top: 42%; left: -23%; z-index: 2; width: 142%; height: 27%; border: 3px solid #927448; border-radius: 50%; transform: rotate(-12deg); }
.planet-saturn .detail-one { top: 20%; left: 14%; width: 72%; height: 9%; border-radius: 8px; background: #e8d19b; }
.planet-saturn .detail-two { right: 19%; bottom: 20%; width: 32%; height: 8%; border-radius: 8px; background: #a88b59; }
.planet-saturn .planet-face { z-index: 4; }

.planet-rahu { border-color: #554761; background: #75617f; box-shadow: inset -9px -10px 0 rgba(38, 28, 45, 0.22), 0 0 0 5px rgba(117, 97, 127, 0.12); }
.planet-rahu .detail-one, .planet-ketu .detail-one { top: 14%; left: 15%; width: 24%; height: 18%; background: rgba(255, 255, 255, 0.2); }
.planet-rahu .detail-two, .planet-ketu .detail-two { right: 14%; bottom: 14%; width: 18%; height: 15%; background: rgba(59, 36, 58, 0.25); }
.planet-ketu { border-color: #774b35; background: #a96c48; box-shadow: inset -9px -10px 0 rgba(81, 45, 27, 0.2), 0 0 0 5px rgba(169, 108, 72, 0.12); }

.planet-bond { position: relative; display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 1fr); align-items: center; gap: 1.4rem; overflow: hidden; border: 1px solid var(--line-strong); background: #f8eedc; padding: 1.1rem 1.25rem; }
.planet-bond::after { position: absolute; inset: 0; z-index: 0; background: url("../assets/celestial-header.jpg") 76% center / cover no-repeat; content: ""; opacity: 0.06; pointer-events: none; }
.planet-bond > * { position: relative; z-index: 1; }
.planet-stage { position: relative; display: grid; min-height: 150px; grid-template-columns: 1fr 62px 1fr; align-items: center; justify-items: center; }
.planet-stage::before { position: absolute; width: 72%; height: 78%; border: 1px solid rgba(177, 138, 59, 0.42); border-radius: 50%; content: ""; }
.planet-character { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0.12rem; color: var(--ink-soft); text-align: center; }
.planet-character strong { margin-top: 0.38rem; color: var(--kumkum-dark); font-size: 0.86rem; }
.planet-character > span:last-child { max-width: 125px; color: var(--muted); font-size: 0.71rem; line-height: 1.25; }
.large-planet { width: 76px; height: 76px; }
.planet-character-left .toward-arm { right: -24%; transform: rotate(-16deg); }
.planet-character-right .toward-arm { left: -24%; transform: scaleX(-1) rotate(-16deg); }
.planet-gesture { position: relative; z-index: 3; width: 58px; height: 46px; }
.gesture-hand { position: absolute; top: 21px; width: 24px; height: 12px; border: 2px solid #6a4938; border-radius: 45%; background: #cf9871; opacity: 0; }
.left-hand { left: 7px; transform: rotate(12deg); }
.right-hand { right: 7px; transform: rotate(-12deg); }
.gesture-spark { position: absolute; top: 5px; left: 25px; width: 10px; height: 10px; border: 2px solid var(--gold-dark); background: #f2d377; opacity: 0; transform: rotate(45deg); }
.planet-bond-copy { border-left: 1px solid var(--line); padding-left: 1.4rem; }
.planet-bond-copy h4 { color: var(--kumkum-dark); font-size: 1.15rem; }
.planet-bond-copy > p:not(.eyebrow):not(.field-help) { margin: 0.45rem 0 0; color: var(--ink-soft); }
.planet-bond-copy .field-help { margin-top: 0.6rem; }

.bond-hug .planet-character-left { animation: planet-hug-left 3.8s ease-in-out infinite; }
.bond-hug .planet-character-right { animation: planet-hug-right 3.8s ease-in-out infinite; }
.bond-hug .gesture-spark { opacity: 1; animation: spark-pulse 3.8s ease-in-out infinite; }
.bond-hug .planet-eye { height: 8%; border-bottom: 2px solid #35251e; border-radius: 50%; background: transparent; box-shadow: none; }
.bond-handshake .planet-character-left, .bond-handshake .planet-character-right { animation: planet-polite-bob 3.2s ease-in-out infinite; }
.bond-handshake .gesture-hand { opacity: 1; animation: handshake 1.8s ease-in-out infinite; }
.bond-handshake .gesture-spark { opacity: 0.6; animation: handshake-spark 1.8s ease-in-out infinite; }
.bond-orbit .planet-character-left { animation: planet-orbit-left 5s ease-in-out infinite; }
.bond-orbit .planet-character-right { animation: planet-orbit-right 5s ease-in-out infinite; }
.bond-orbit .planet-stage::before { animation: orbit-breathe 5s ease-in-out infinite; }
.report-section > .eyebrow::before { display: inline-block; margin-right: 0.38rem; color: var(--gold); content: "✦"; animation: section-star 4s ease-in-out infinite; }

.insight-label, .badge { display: inline-flex; min-height: 27px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 2px; padding: 0.16rem 0.5rem; white-space: nowrap; font-size: 0.71rem; font-weight: 700; }
.insight-label.calculated { border-color: #789080; background: #edf3ee; color: #2d5037; }
.insight-label.traditional { border-color: var(--line-strong); background: #fbf0d8; color: var(--gold-dark); }
.insight-label.unknown { border-color: #91867b; background: #f0eeea; color: #554d46; }
.insight-label.scenario { border-color: #78849a; background: #edf0f5; color: var(--indigo); }
.badge.good { border-color: var(--good-line); background: var(--good-bg); color: var(--good-ink); }
.badge.warn, .badge.moderate { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-ink); }

.reading-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.1rem; }
.reading-key-item { display: grid; align-content: start; gap: 0.42rem; border-top: 2px solid var(--line-strong); padding-top: 0.68rem; }
.reading-key-item .insight-label { justify-self: start; }
.reading-key-item p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.reading-detail { display: grid; gap: 0.18rem; margin-top: 0.72rem; padding-top: 0.62rem; border-top: 1px solid #e9dfd1; }
.reading-detail p { margin: 0; }
.reading-label { color: var(--kumkum); font-size: 0.73rem; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.impact-card { border-top: 4px solid var(--kumkum); }
.scenario-card { border-left: 4px solid var(--indigo); }
.score-card { position: relative; display: grid; min-height: 195px; place-items: center; overflow: hidden; border-color: var(--line-strong); background: #f8eedc; text-align: center; }
.score-card::before { position: absolute; inset: -35%; background: url("../assets/celestial-header.jpg") 76% center / cover no-repeat; content: ""; opacity: 0.065; transform: rotate(-4deg); }
.score-card > * { position: relative; z-index: 1; }
.score-number { color: var(--kumkum-dark); font-size: 5rem; font-weight: 500; line-height: 1; }
.score-number small { color: var(--muted); font-size: 1rem; font-weight: 400; }
.progress { width: 100%; height: 7px; overflow: hidden; background: #dfd2bb; }
.progress span { display: block; width: var(--value, 0%); height: 100%; background: var(--kumkum); }
.discussion-card { border-top: 3px solid var(--gold); background: var(--surface-warm); }
.discussion-card h4 { color: var(--kumkum-dark); }
.disclaimer { border-left: 4px solid var(--gold); background: var(--surface-warm); }
.report-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.paired-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.birth-chart-report { display: grid; gap: 1.05rem; min-width: 0; border: 1px solid var(--line-strong); background: var(--surface-warm); padding: 1.15rem; }
.chart-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; }
.chart-title-row p:not(.eyebrow) { max-width: 690px; margin: 0.45rem 0 0; color: var(--ink-soft); }
.chart-method { display: grid; grid-template-columns: auto auto; gap: 0.14rem 0.65rem; min-width: 235px; margin: 0; border-left: 3px solid var(--gold); background: #fffdf8; padding: 0.72rem; font-size: 0.72rem; }
.chart-method dt { color: var(--muted); }
.chart-method dd { margin: 0; color: var(--ink); }
.house-mandala { position: relative; display: grid; width: 100%; min-width: 0; aspect-ratio: 1.18; grid-template: repeat(4, minmax(0, 1fr)) / repeat(4, minmax(0, 1fr)); gap: 2px; border: 2px solid var(--gold-dark); background: var(--gold-dark); }
.house-cell { position: relative; z-index: 2; display: grid; min-width: 0; align-content: start; gap: 0.36rem; overflow: hidden; background: #fffaf0; padding: 0.48rem; }
.house-cell::after { position: absolute; right: -18px; bottom: -18px; width: 48px; height: 48px; border: 1px solid rgba(177, 138, 59, 0.18); border-radius: 50%; content: ""; }
.house-1 { grid-area: 1 / 2; }
.house-2 { grid-area: 1 / 3; }
.house-3 { grid-area: 1 / 4; }
.house-4 { grid-area: 2 / 4; }
.house-5 { grid-area: 3 / 4; }
.house-6 { grid-area: 4 / 4; }
.house-7 { grid-area: 4 / 3; }
.house-8 { grid-area: 4 / 2; }
.house-9 { grid-area: 4 / 1; }
.house-10 { grid-area: 3 / 1; }
.house-11 { grid-area: 2 / 1; }
.house-12 { grid-area: 1 / 1; }
.house-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0.1rem 0.35rem; line-height: 1.15; }
.house-heading strong { min-width: 0; color: var(--kumkum-dark); font-size: 0.78rem; }
.house-heading small { grid-column: 1 / -1; color: var(--muted); font-size: 0.62rem; }
.house-number { display: inline-grid; min-width: 1.45rem; height: 1.35rem; place-items: center; background: var(--kumkum-dark); color: #fff8e8; font-size: 0.61rem; font-weight: 700; }
.house-occupants { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.house-empty { color: #9b8d80; font-size: 0.62rem; font-style: italic; }
.chart-centre { grid-area: 2 / 2 / 4 / 4; display: grid; place-items: center; align-content: center; background: #f3e5c9 url("../assets/celestial-header.jpg") 78% center / cover no-repeat; color: var(--kumkum-dark); text-align: center; isolation: isolate; }
.chart-centre::before { position: absolute; inset: calc(25% + 2px); z-index: -1; background: rgba(255, 249, 237, 0.88); content: ""; }
.chart-centre strong { font-size: 1.35rem; font-weight: 500; }
.chart-centre small { color: var(--ink-soft); font-size: 0.67rem; }
.centre-sun { width: 42px; height: 42px; margin-bottom: 0.28rem; animation: planet-float 3.8s ease-in-out infinite; }
.chart-planet { display: flex; min-width: 0; align-items: center; gap: 0.2rem; }
.chart-planet-face { width: 27px; height: 27px; animation: planet-float 3.2s ease-in-out infinite; }
.chart-planet:nth-child(2n) .chart-planet-face { animation-delay: -1.15s; }
.chart-planet:nth-child(3n) .chart-planet-face { animation-delay: -2.1s; }
.chart-planet-copy { display: grid; min-width: 0; line-height: 1.02; }
.chart-planet-copy strong { overflow: hidden; color: var(--ink); font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }
.chart-planet-copy small { color: var(--muted); font-size: 0.53rem; }
.planet-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.planet-row { display: grid; grid-template-columns: 38px minmax(68px, 0.55fr) minmax(95px, 1fr) minmax(85px, 0.8fr); min-width: 0; align-items: center; gap: 0.5rem; padding: 0.72rem; }
.planet-row:nth-child(n+4) { border-top: 1px solid var(--line); }
.planet-row + .planet-row { border-left: 1px solid var(--line); }
.planet-row:nth-child(4), .planet-row:nth-child(7) { border-left: 0; }
.table-planet-face { width: 34px; height: 34px; animation: planet-float 3.5s ease-in-out infinite; }
.planet-row-name, .planet-row-place, .planet-row-house { display: grid; min-width: 0; line-height: 1.25; }
.planet-row strong { color: var(--kumkum-dark); font-size: 0.82rem; }
.planet-row small { overflow: hidden; color: var(--muted); font-size: 0.65rem; text-overflow: ellipsis; }
.graha-reading-intro { margin-top: 0.55rem; border-top: 1px solid var(--line-strong); padding-top: 1.2rem; }
.graha-reading-intro p:last-child { margin: 0.45rem 0 0; color: var(--ink-soft); }
.graha-reading-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.graha-reading { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.graha-reading[open] { border-color: var(--line-strong); box-shadow: 0 9px 24px rgba(52, 32, 21, 0.07); }
.graha-reading-summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 68px; align-items: center; gap: 0.58rem; cursor: pointer; padding: 0.68rem; list-style: none; }
.graha-reading-summary::-webkit-details-marker { display: none; }
.graha-reading-summary > span:nth-child(2) { display: grid; min-width: 0; line-height: 1.25; }
.graha-reading-summary strong { color: var(--kumkum-dark); font-size: 0.84rem; }
.graha-reading-summary small { margin-top: 0.16rem; color: var(--muted); font-size: 0.66rem; }
.graha-reading-face { width: 38px; height: 38px; animation: planet-float 3.5s ease-in-out infinite; }
.details-mark { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border: 1px solid var(--gold); color: var(--kumkum-dark); font-size: 1rem; line-height: 1; transition: transform 160ms ease; }
.graha-reading[open] .details-mark { transform: rotate(45deg); }
.graha-reading-body { border-top: 1px solid var(--line); padding: 0 0.72rem 0.72rem; }
.graha-reading-body .reading-detail p { color: var(--ink-soft); font-size: 0.82rem; }
.lordship-intro { margin-top: 0.6rem; border-top: 1px solid var(--line-strong); padding-top: 1.2rem; }
.lordship-intro p:last-child { max-width: 820px; color: var(--ink-soft); }
.lordship-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.lord-reading { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--gold); background: var(--surface); padding: 0.92rem; }
.lord-reading-heading { display: flex; align-items: center; gap: 0.72rem; }
.lord-planet-face { width: 44px; height: 44px; animation: planet-float 3.6s ease-in-out infinite; }
.lord-reading h4 { color: var(--kumkum-dark); }
.calculation-line { margin: 0.28rem 0 0; color: var(--good-ink); font-size: 0.78rem; }
.lord-reading .reading-detail { margin-top: 0.52rem; padding-top: 0.48rem; }
.lord-reading .reading-detail p { color: var(--ink-soft); font-size: 0.86rem; }
.chart-unavailable { border: 1px solid var(--warn-line); border-left: 4px solid var(--warn-line); background: var(--warn-bg); padding: 1rem; }
.chart-unavailable p:not(.eyebrow) { margin: 0.45rem 0 0; color: var(--warn-ink); }
.compact-chart .chart-title-row { grid-template-columns: 1fr; }
.compact-chart .chart-method { min-width: 0; }
.compact-chart .planet-table { grid-template-columns: 1fr; }
.compact-chart .planet-row { border-top: 1px solid var(--line); border-left: 0; }
.compact-chart .planet-row:first-child { border-top: 0; }

.site-footer { position: relative; overflow: hidden; border-top: 5px solid var(--gold); background: #291b19; color: #ddd0bb; isolation: isolate; }
.site-footer::before { position: absolute; inset: 0; z-index: 0; background: url("../assets/celestial-header.jpg") center / cover no-repeat; content: ""; opacity: 0.16; }
.footer-inner { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 1.6rem 0; }
.site-footer p { max-width: 760px; margin: 0; font-size: 0.87rem; }
.site-footer .footer-brand { margin-bottom: 0.4rem; color: #e5c873; font-size: 1.05rem; font-weight: 700; }
.footer-contact { display: grid; justify-items: end; gap: 0.28rem; text-align: right; white-space: nowrap; }
.site-footer a { color: #ead58f; text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }

@keyframes entry-planet-left {
  0%, 100% { transform: translateX(0) rotate(-4deg); }
  45%, 60% { transform: translateX(5px) rotate(3deg); }
}
@keyframes entry-planet-right {
  0%, 100% { transform: translateX(0) rotate(4deg); }
  45%, 60% { transform: translateX(-5px) rotate(-3deg); }
}
@keyframes planet-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes sun-halo {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
@keyframes mars-flame {
  from { transform: translateX(0) rotate(-20deg) scale(0.94); }
  to { transform: translateX(-3px) rotate(-14deg) scale(1.06); }
}
@keyframes planet-hug-left {
  0%, 22%, 100% { transform: translateX(0) rotate(0); }
  45%, 70% { transform: translateX(23px) rotate(7deg); }
}
@keyframes planet-hug-right {
  0%, 22%, 100% { transform: translateX(0) rotate(0); }
  45%, 70% { transform: translateX(-23px) rotate(-7deg); }
}
@keyframes spark-pulse {
  0%, 25%, 100% { opacity: 0; transform: translateY(8px) rotate(45deg) scale(0.65); }
  48%, 68% { opacity: 1; transform: translateY(0) rotate(45deg) scale(1); }
}
@keyframes planet-polite-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes handshake {
  0%, 100% { transform: translateY(0) rotate(10deg); }
  50% { transform: translateY(3px) rotate(4deg); }
}
@keyframes handshake-spark {
  0%, 100% { transform: translateY(1px) rotate(45deg) scale(0.7); }
  50% { transform: translateY(-2px) rotate(45deg) scale(0.9); }
}
@keyframes planet-orbit-left {
  0%, 100% { transform: translate(0, -5px); }
  50% { transform: translate(-8px, 7px); }
}
@keyframes planet-orbit-right {
  0%, 100% { transform: translate(0, 6px); }
  50% { transform: translate(8px, -6px); }
}
@keyframes orbit-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.52; }
  50% { transform: scale(1.03); opacity: 0.9; }
}
@keyframes section-star {
  0%, 100% { opacity: 0.55; transform: rotate(0); }
  50% { opacity: 1; transform: rotate(45deg); }
}

@media (max-width: 960px) {
  h1 { font-size: 4.2rem; }
  h2 { font-size: 2.25rem; }
  .entry-heading { grid-template-columns: 1fr; gap: 0.65rem; }
  .actions { grid-template-columns: 1fr; }
  .secondary-actions { justify-content: start; }
  .comparison-header { display: none; }
  .comparison-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-row + .comparison-row { border-top-color: var(--line-strong); }
  .comparison-aspect { grid-column: 1 / -1; }
  .comparison-cell { border-left: 0 !important; }
  .groom-cell + .bride-cell { border-left: 1px solid var(--line) !important; }
  .interplay-cell { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .comparison-mobile-label { display: block; margin-bottom: 0.38rem; }
  .paired-charts, .planet-table, .graha-reading-list { grid-template-columns: 1fr; }
  .planet-row { border-top: 1px solid var(--line); border-left: 0; }
  .planet-row:first-child { border-top: 0; }
}

@media (max-width: 780px) {
  .site-header { min-height: 300px; }
  .entry-panel { margin-top: -1.2rem; padding: 1.2rem; }
  .journey { grid-template-columns: 1fr; margin: -1.2rem -1.2rem 1.25rem; }
  .journey-step { min-height: 56px; }
  .journey-step + .journey-step { border-top: 1px solid var(--line); border-left: 0; }
  .person-grid, .summary-grid, .score-grid, .koota-grid, .factor-grid, .profile-grid, .narrative-grid, .guide-grid, .portrait-grid, .impact-grid, .scenario-grid { grid-template-columns: 1fr; }
  .entry-note { align-items: start; flex-direction: column; gap: 0.35rem; }
  .synthesis-grid, .reading-key { grid-template-columns: 1fr; }
  .chart-title-row, .lordship-grid { grid-template-columns: 1fr; }
  .chart-method { min-width: 0; }
  .planet-bond { grid-template-columns: 1fr; }
  .planet-bond-copy { border-top: 1px solid var(--line); border-left: 0; padding-top: 1rem; padding-left: 0; }
  .synthesis-item + .synthesis-item { border-top: 1px solid var(--line); border-left: 0; }
  .footer-inner { align-items: start; flex-direction: column; gap: 1rem; }
  .footer-contact { justify-items: start; text-align: left; }
}

@media (max-width: 560px) {
  body::before { background-size: 780px auto; opacity: 0.028; }
  .wrap { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 330px; }
  .header-topline p:last-child { display: none; }
  .header-inner { padding: 2.1rem 0 3rem; }
  .header-art { background-position: 16% center; }
  .brand-lockup { align-items: start; }
  .brand-mark { width: 3.35rem; height: 3.35rem; margin-top: 0.2rem; }
  h1 { font-size: 3.15rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.35rem; }
  .score-number { font-size: 3.75rem; }
  .header-note { font-size: 0.98rem; }
  .notice, .field-row, .meta-row { grid-template-columns: 1fr; }
  .info-notice span + span { border-top: 1px solid var(--line); border-left: 0; padding-top: 0.8rem; padding-left: 0; }
  .primary-action { grid-template-columns: 1fr; }
  .secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secondary-actions .quiet-action { grid-column: 1 / -1; justify-self: start; }
  .portrait-grid { padding: 0.75rem; }
  .card-title-row { align-items: start; flex-direction: column; }
  .insight-label { white-space: normal; }
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-aspect, .interplay-cell { grid-column: auto; }
  .comparison-cell + .comparison-cell { border-top: 1px solid var(--line); }
  .groom-cell + .bride-cell { border-left: 0 !important; }
  #analysis-output, #profile-output, .entry-panel { padding: 1.2rem; }
  .planet-stage { min-height: 138px; grid-template-columns: 1fr 46px 1fr; }
  .large-planet { width: 64px; height: 64px; }
  .planet-character > span:last-child { max-width: 100px; }
  .house-mandala { aspect-ratio: 0.92; }
  .house-cell { padding: 0.32rem; }
  .house-heading { grid-template-columns: 1fr; }
  .house-number { min-width: 1.3rem; width: max-content; height: 1.2rem; }
  .chart-planet-copy { display: none; }
  .chart-planet-face { width: 23px; height: 23px; }
  .chart-centre::before { inset: calc(25% + 2px); }
  .planet-row { grid-template-columns: 36px minmax(62px, 0.55fr) minmax(88px, 1fr) minmax(72px, 0.8fr); gap: 0.35rem; padding: 0.58rem; }
}

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

@media print {
  body { background: #fff; }
  body::before, .entry-panel::after, #analysis-output::after, #profile-output::after, .report-section::after, .planet-bond::after, .score-card::before { display: none !important; }
  .site-header { min-height: 0; color: var(--ink); border-bottom-color: var(--gold); background: #fff; }
  .header-art, .site-header::after, .header-topline, .header-principles, .journey, .main-layout > .notice, .main-layout > .entry-panel, .report-nav, .report-actions, .site-footer { display: none !important; }
  .header-inner { padding: 0 0 1rem; }
  .brand-mark { border-color: var(--gold); color: var(--gold-dark); }
  .brand-script, .header-note { color: var(--ink-soft); }
  .main-layout { display: block; padding: 0; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .card, .person-card, .comparison-row, .house-mandala, .planet-row, .lord-reading { break-inside: avoid; }
}
