*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-ui);
  line-height: 1.5;
  background:
    radial-gradient(circle at 20% 20%, #f7efe1 0%, transparent 42%),
    radial-gradient(circle at 80% 10%, #e6f5f3 0%, transparent 36%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

body {
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.45;
}

.orb-1 {
  top: -90px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: #ffd089;
}

.orb-2 {
  bottom: -70px;
  left: -50px;
  width: 220px;
  height: 220px;
  background: #8ad3c8;
}

.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  gap: var(--space-4);
  padding: var(--space-4);
}

.sidebar {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.1;
}

.brand p {
  margin: 0.5rem 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.nav {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.nav-item {
  padding: 0.72rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition: 180ms ease;
}

.nav-item:hover {
  border-color: #e8e1d1;
  background: #f6f2ea;
}

.nav-item.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  gap: var(--space-4);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.topbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.topbar p {
  margin: 0.4rem 0 0;
  color: var(--text-2);
}

.topbar-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topbar-actions {
  gap: var(--space-2);
}

.btn {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-ghost {
  color: var(--text-1);
  background: #fff;
}

.btn-primary {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.panel,
.dashboard-card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-panel);
}

.panel h3 {
  margin: 0 0 0.5rem;
}

.panel p,
.dashboard-card p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
}

.span-2,
.dashboard-card-hero,
.dashboard-card-wide {
  grid-column: span 2;
}

.dashboard-card-hero {
  background: linear-gradient(135deg, #fff 0%, #f8f2e8 100%);
}

.dashboard-card h4 {
  margin: 0 0 0.6rem;
}

.dashboard-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand-1);
  font-size: 2rem;
  line-height: 1;
}

#sectionHost {
  min-height: 90px;
  margin-top: 0.8rem;
  padding: var(--space-3);
  border: 1px dashed #d4cab7;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: #fffcf6;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

#sectionHost.route-exit-active {
  opacity: 0;
  transform: translateY(8px);
}

#sectionHost.route-enter-active {
  opacity: 1;
  transform: translateY(0);
}

.route-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #eedbb7;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  background: #fff7e8;
}

.route-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: routePulse 900ms ease-in-out infinite;
}

@keyframes routePulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.form-grid {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}


.kp-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.kp-checkbox-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  white-space: nowrap;
}

.kp-checkbox-control input {
  width: auto;
  margin: 0;
}

.kp-event-control {
  display: grid;
  grid-template-columns: auto minmax(12rem, 18rem);
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.kp-event-control select {
  width: 100%;
}

@media (max-width: 760px) {
  .kp-controls {
    align-items: stretch;
  }

  .kp-event-control {
    width: 100%;
    grid-template-columns: 1fr;
  }
}



.field-label {
  margin-top: 0.2rem;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 700;
}

.form-errors {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #e9b9b9;
  border-radius: 10px;
  color: #8a2f2f;
  background: #fff3f3;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid #ece2cf;
  text-align: left;
  vertical-align: top;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.dashboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.dashboard-list > div {
  padding: 0.75rem;
  border: 1px solid #efe6d2;
  border-radius: 12px;
  background: #fffcf6;
}

.dashboard-list span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-2);
  font-size: 0.8rem;
}

/* Astrology */

.astro-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.astro-chart-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.55rem;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fffdfa;
}

.astro-chart-card header {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.astro-chart-card p {
  margin: 0.45rem 0 0.7rem;
  color: var(--text-2);
}

.astro-chart-card-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.astro-chart-card-title {
  color: var(--brand-1);
  font-size: 0.95rem;
  font-weight: 700;
}

.astro-chart-card-subtitle {
  color: var(--text-2);
  font-size: 0.82rem;
}

.astro-chart-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.astro-chart-chip,
.astro-cusp-pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  color: #6d5332;
  font-size: 0.72rem;
  background: #f4ebd8;
}

.astro-chart-preview {
  display: grid;
  min-height: 120px;
  height: 120px;
  place-items: center;
  border: 1px dashed #cfbfa1;
  border-radius: var(--radius-sm);
  background: #fff7e9;
}

.astro-chart-preview-computed {
  display: grid;
  min-height: 510px;
  height: 510px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfd0b8;
  border-radius: var(--radius-sm);
  background: #fffdfa;
}

/* Pending Varga cards remain compact. */
.astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
  min-height: 150px;
  height: 150px;
  border-style: dashed;
  background: #fff7e9;
}

.astro-chart-preview-computed .vedic-chart-wrap {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  padding: 0.75rem;
}

.astro-chart-preview-computed .vedic-chart-svg-compact {
  display: block;
  width: min(100%, 560px);
  max-height: 480px;
  min-width: 0;
  height: auto;
}

.astro-style-north {
  background:
    linear-gradient(45deg, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%),
    #fff7e9;
}

.astro-style-south {
  background:
    linear-gradient(90deg, transparent 24%, #d8c7a8 24%, #d8c7a8 26%, transparent 26%, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%, transparent 74%, #d8c7a8 74%, #d8c7a8 76%, transparent 76%),
    linear-gradient(0deg, transparent 24%, #d8c7a8 24%, #d8c7a8 26%, transparent 26%, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%, transparent 74%, #d8c7a8 74%, #d8c7a8 76%, transparent 76%),
    #fff7e9;
}

.astro-chart-preview-label {
  padding: 0.25rem 0.55rem;
  border: 1px solid #dcc7a3;
  border-radius: 999px;
  color: #7a6542;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgb(255 255 255 / 82%);
}

.astro-table-wrap {
  overflow-x: auto;
}


.astro-planets-table th,
.astro-planets-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.astro-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.astro-highlights-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.astro-birth-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0;
}

.astro-birth-summary .astro-highlight-card {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
}

.astro-birth-summary .astro-highlight-card strong {
  margin-bottom: 0.12rem;
  font-size: 0.68rem;
  line-height: 1.2;
}

.astro-birth-summary .astro-highlight-card span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.25;
}

.astro-highlight-card {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.astro-highlight-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-2);
  font-size: 0.8rem;
}

.astro-highlight-card span {
  color: var(--brand-1);
  font-size: 0.95rem;
  font-weight: 700;
}

.astro-primary-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-4);
}

.astro-primary-chart {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid #e8dfcf;
  border-radius: var(--radius-md);
  background: #fffdfa;
}

.astro-main-chart {
  display: grid;
  gap: 0.75rem;
}

.astro-main-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.astro-main-chart-header span {
  color: var(--text-2);
  font-size: 0.85rem;
}

.astro-primary-chart .vedic-chart-wrap {
  padding-bottom: 0;
}

.astro-primary-chart .vedic-chart-svg {
  width: min(100%, 520px);
}

.astro-d9-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  color: var(--text-2);
  font-size: 0.82rem;
}

.astro-d9-summary span {
  padding: 0.2rem 0.5rem;
  border: 1px solid #eadfca;
  border-radius: 999px;
  background: #fff7e9;
}

.astro-runtime-debug {
  max-height: 22rem;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  overflow: auto;
  border: 1px solid var(--line);
  color: #3d2b1d;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: #fffdf8;
}

/* Vedic charts */

.vedic-chart-wrap {
  display: grid;
  width: 100%;
  place-items: center;
  overflow-x: auto;
  padding: 0.75rem 0;
}

.vedic-chart-svg {
  display: block;
  width: min(100%, 680px);
  height: auto;
  background: #fffdfa;
}

.vedic-chart-border,
.vedic-south-box {
  fill: #fffdf8;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-chart-line {
  fill: none;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-house-number,
.vedic-rashi-number {
  fill: #7a3825;
  font-weight: 800;
  text-anchor: middle;
}

.vedic-house-number {
  font-size: 11px;
}

.vedic-rashi-number {
  font-size: 15px;
}

.vedic-ascendant-label {
  fill: #b33d2d;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.vedic-ascendant-degree {
  fill: #24170e;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* .vedic-sign-name {
  fill: #24170e;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
} */

/* .vedic-planets {
  fill: #3d2b1d;
  font-size: 10px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.vedic-planets {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
} */


/* .vedic-planets {
  fill: #3d2b1d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
} */


.vedic-planets {
  fill: #563a25;  
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 2px;
  stroke-linejoin: round;
}


.vedic-south-cell .vedic-rashi-number,
.vedic-south-cell .vedic-ascendant-label,
.vedic-south-cell .vedic-sign-name {
  text-anchor: start;
}

.vedic-south-cell .vedic-planets {
  text-anchor: middle;
}



.vedic-south-center {
  fill: #f7ebd4;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-center-label {
  fill: #5b311c;
  font-size: 16px;
  font-weight: 700;
  text-anchor: middle;
}

.vedic-center-label-small {
  fill: #6d5332;
  font-size: 12px;
  text-anchor: middle;
}

.vedic-retrograde {
  fill: #b33d2d;
  font-weight: 700;
}

.table-retrograde {
  color: #b33d2d;
  font-weight: 800;
}


.vedic-chart-svg-compact .vedic-rashi-number {
  font-size: 11px;
}

.vedic-chart-svg-compact .vedic-ascendant-label {
  font-size: 10px;
}

.vedic-chart-svg-compact .vedic-planets,
.vedic-chart-svg-compact .vedic-retrograde {
  font-size: 10px;
}



/* Legacy circular-chart support */

.astro-chart-preview-wheel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 0.25rem;
  background: #fff7e9;
}

.astro-wheel-svg {
  display: block;
  width: 100%;
  height: auto;
}

.astro-wheel-ring {
  fill: #fffdf8;
  stroke: #d8c8a3;
  stroke-width: 2;
}

.astro-wheel-inner {
  fill: #fff7ea;
  stroke: #d8c8a3;
  stroke-width: 1.2;
}

.astro-wheel-line {
  stroke: #eadbc0;
  stroke-width: 1;
}

.astro-wheel-sign {
  fill: #7a6542;
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

.astro-wheel-planet-label {
  fill: #5b4223;
  font-size: 9px;
  font-weight: 700;
}

.astro-wheel-ascendant {
  stroke: #c24f3c;
  stroke-width: 2.2;
}

.astro-wheel-center {
  fill: #784f22;
}

@media (max-width: 1080px) {
  .astro-primary-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
    padding: var(--space-3);
  }

  .workspace,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .dashboard-card-hero,
  .dashboard-card-wide {
    grid-column: span 1;
  }

  .dashboard-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

    .kp-ruling-planets-card {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .astro-highlights,
  .astro-highlights-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .astro-chart-grid {
    grid-template-columns: 1fr;
  }

  .astro-chart-preview-computed {
    min-height: 400px;
    height: 400px;
  }

  .astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
    min-height: 150px;
    height: 150px;
  }

  .astro-chart-preview-computed .vedic-chart-svg-compact {
    max-height: 370px;
  }

  .astro-highlights,
  .astro-highlights-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .vedic-chart-svg {
    min-width: 0;
  }

  .vedic-planets {
    font-size: 8px;
  }
}


.dasha-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent, #2f766f);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.dasha-toggle:hover {
  background: rgba(47, 118, 111, 0.1);
}

.dasha-lord {
  display: inline-block;
  font-weight: 600;
}

.dasha-level-indent-0 { padding-left: 0; }
.dasha-level-indent-1 { padding-left: 1.25rem; }
.dasha-level-indent-2 { padding-left: 2.5rem; }
.dasha-level-indent-3 { padding-left: 3.75rem; }
.dasha-level-indent-4 { padding-left: 5rem; }





.data-table tbody tr.dasha-level-maha td {
  color: #215c57;
  /* background: #edf7f5; */
  background: #f8f6ef;
  font-size: 0.96rem;
  font-weight: 500;
}

.data-table tbody tr.dasha-level-antara td {
  color: #355d85;
  background: #f1f6fb;
  font-size: 0.9rem;
}

.data-table tbody tr.dasha-level-pratyantara td {
  color: #7a4f20;
  background: #fff8ec;
  font-size: 0.88rem;
}

.data-table tbody tr.dasha-level-sookshma td {
  color: #6a477c;
  background: #faf2fc;
  font-size: 0.86rem;
}

.data-table tbody tr.dasha-level-prana td {
  color: #5c5f35;
  background: #fffffe;
  font-size: 0.84rem;
}

.data-table tbody tr.dasha-current-row td {
  background: #d8eee8;
  color: #174b45;
  font-weight: 700;
  /* box-shadow: inset 4px 0 0 #16806f; */
}

.data-table tbody tr.dasha-current-row td:last-child {
  color: #0b6559;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}


.dasha-periods-table thead th {
  color: #3f5155;
  /* background-color: #d7f2f7; */
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  
}

.dasha-periods-table tbody td {
  font-size: 0.86rem;
  line-height: 1.35;
}

/* .data-table th,
.data-table td {
 white-space: wrap;
  text-align: center;    
  vertical-align: middle;
} */


.data-table tbody td {
  font-size: 0.9rem;
  line-height: 1.35;
}


.dasha-summary h4 {
  margin-bottom: 0.85rem;
  color: #334448;
  font-size: 1.1rem;
  font-weight: 800;
}

.dasha-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.dasha-summary-grid > div {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e9dfcf;
  border-radius: 8px;
  background: #fffcf6;
}

.dasha-summary-grid span {
  display: block;
  margin-bottom: 0.28rem;
  color: #596a6e;
  font-size: 0.88rem;
  font-weight: 700;
}

.dasha-summary-grid strong {
  display: block;
  margin: 0;
  color: #2f766f;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}



.data-table tbody tr.kp-dasha-level-maha td {
  background: #f8f6ef;
  color: #215c57;
  font-weight: 600;
}

.data-table tbody tr.kp-dasha-level-antara td {
  background: #f1f6fb;
  color: #355d85;
}

.data-table tbody tr.kp-dasha-level-pratyantara td {
  background: #fff8ec;
  color: #7a4f20;
}


.data-table tbody tr.kp-dasha-current-row td {
  background: #d8eee8;
  color: #174b45;
  font-weight: 700;
  /* box-shadow: inset 4px 0 0 #16806f; */
}

.kp-eligibility {
  display: inline-block;
  min-width: 5.5rem;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.kp-eligibility-strong {
  background: #d8eee8;
  color: #174b45;
}

.kp-eligibility-mixed {
  background: #fff0c9;
  color: #7a4f20;
}

.kp-eligibility-weak {
  background: #f9dfe0;
  color: #8a2730;
}

.kp-venus-potential-present {
  color: #a13f76;
  font-weight: 700;
}

.kp-venus-potential-absent {
  color: #667085;
}



.astro-analysis-results {
  display: grid;
  gap: 0.75rem;
}

.astro-analysis-result {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf8;
}

.astro-analysis-result header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.astro-analysis-result header strong {
  color: var(--text-1);
  font-size: 1rem;
}

.astro-analysis-result header span {
  flex: 0 0 auto;
  padding: 0.18rem 0.5rem;
  border: 1px solid #d7caa9;
  border-radius: 999px;
  color: #76501f;
  background: #fff5dc;
  font-size: 0.78rem;
  font-weight: 700;
}

.astro-analysis-result ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-2);
}

.astro-analysis-result li + li {
  margin-top: 0.3rem;
}

.prediction-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.prediction-period {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #d9e4df;
  border-radius: 8px;
  background: #fbfdfb;
}

.prediction-period span,
.prediction-period small {
  display: block;
  color: var(--text-2);
}

.prediction-period span {
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.prediction-period strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #215c57;
  font-size: 1.05rem;
}

.prediction-period small {
  font-size: 0.8rem;
  line-height: 1.35;
}

.prediction-theme .prediction-level-active {
  border-color: #a9d7c7;
  color: #1c6253;
  background: #e7f5ef;
}

.prediction-theme .prediction-level-supportive {
  border-color: #bfd4e7;
  color: #285a82;
  background: #edf5fb;
}

.prediction-theme .prediction-level-requires-attention {
  border-color: #e6ca94;
  color: #805717;
  background: #fff6df;
}

.vedic-kp-house-label {
  fill: #245f58;
  font-size: 10px;
  font-weight: 800;
}

.kp-ruling-planets-card {
  width: 50%;
  min-width: 280px;
}

.kp-ruling-planets-card .kp-ruling-planets-table {
  width: 100%;
}

.kp-ruling-planets-card .kp-ruling-planets-table td:last-child {
  width: 4.5rem;
}



/* .kp-aspect-legends {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.9rem;
  margin: 0.85rem 0;
} */

.kp-aspect-legends {
  /* Layout */
  display: flex;
  /* flex-direction: row; */
  gap: 0.9rem;
  margin: 0.85rem 0;
  padding: 1.5rem;
  width: 60%;

  /* Card Styling */
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kp-aspect-legend {
  font-size: 0.82rem;  
}

.kp-aspect-matrix {
  min-width: 1140px;
  table-layout: fixed;  
}




/* .kp-aspect-matrix thead th,
.kp-aspect-row-header {
  background: #fff8df;
  
  color: #5d4a1d;
} */

.kp-aspect-matrix th span,
.kp-aspect-matrix th small {
  display: block;
  margin-top: 0.16rem;
  font-weight: 500;
}


/*----------NEW------------------------------------------------------------------------------*/
.kp-aspect-matrix th,
.kp-aspect-matrix td {
  min-width: 112px;
  padding: 0.3rem;
  text-align: center;
  vertical-align: middle;
}

.kp-aspect-matrix thead th,
.kp-aspect-row-header {
  /* background: #fff8df; */
   background: #fdfdf1;
  color: #5d4a1d;
  font-size: 0.78rem;
  line-height: 1.2;
}

.kp-aspect-matrix thead th strong,
.kp-aspect-row-header strong {
  display: block;
  margin: 0;
  color: #5d4a1d;
  font-size: 0.9rem;
  line-height: 1.15;
}

.kp-aspect-matrix thead th span,
.kp-aspect-row-header span,
.kp-aspect-matrix thead th small {
  font-size: 0.7rem;
}

.kp-aspect-cell {
  position: relative;
  min-height: 96px;
  padding: 1.45rem 0.3rem 0.35rem;
  color: #1f2933;
}

.dashboard-card .kp-aspect-rule-angle,
.dashboard-card .kp-aspect-orb {
  position: absolute;
  top: 0.28rem;
  margin: 0;
  color: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1;
}

.dashboard-card .kp-aspect-rule-angle {
  left: 0.3rem;
}

.dashboard-card .kp-aspect-orb {
  right: 0.3rem;
}

.dashboard-card .kp-aspect-code {
  display: block;
  margin: 0;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.12;
}

.dashboard-card .kp-aspect-actual-angle {
  display: block;
  margin: 1rem 0 0.22rem;
  color: #246f6b;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-card .kp-aspect-polarity,
.dashboard-card .kp-aspect-strength {
  display: block;
  margin: 0.20rem;
  color: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.50;
}

/*-------------------------------------------------------------------------------------------*/

.kp-aspect-empty,
.kp-aspect-self {
  background: #f7f7f7;
  color: #9aa1a8;
}

.kp-aspect-blue {
  background: #b9dcff;
}

.kp-aspect-light-green {
  background: #dff3d5;
}

.kp-aspect-medium-light-green {
  background: #b9e8ad;
}

.kp-aspect-green {
  background: #73cc73;
}

.kp-aspect-light-pink {
  background: #ffdce3;
}

.kp-aspect-medium-pink {
  background: #f5a8ba;
}

.kp-aspect-red {
  background: #ec6c6c;
  color: #3c1111;
}

.kp-aspect-color-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  border: 1px solid rgb(0 0 0 / 20%);
  vertical-align: -0.08rem;
}

.kp-aspect-direction-note,
.kp-aspect-source-note {
  margin: 0.65rem 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .kp-aspect-legends {
    grid-template-columns: 1fr;
  }
}

.astro-global-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.astro-global-node-control {
  display: grid;
  grid-template-columns: auto minmax(8rem, 11rem);
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.astro-global-node-control select {
  width: 100%;
}

.astro-chart-style-control {
  display: grid;
  gap: 0.35rem;
}

.astro-global-control-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.astro-chart-style-control .form-actions {
  margin: 0;
}

.astro-mode-controls {
  margin-top: 0.85rem;
}

.astro-chart-style-button {
  min-width: 8.75rem;
  border-radius: 6px;
}

.astro-chart-style-north.btn-ghost {
  border-color: #d7a64a;
  color: #76501f;
  background: #fff8e7;
}

.astro-chart-style-north.btn-primary {
  border-color: #a87316;
  color: #fff;
  background: #b87918;
}

.astro-chart-style-south.btn-ghost {
  border-color: #4f9d93;
  color: #17635b;
  background: #edf8f5;
}

.astro-chart-style-south.btn-primary {
  border-color: #247267;
  color: #fff;
  background: #2f766f;
}

@media (max-width: 760px) {
  .astro-global-controls {
    align-items: stretch;
  }

  .astro-global-node-control {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

.prashna-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prashna-form-grid label {
  margin: 0.2rem 0 0;
}

.prashna-form-grid textarea,
.prashna-form-grid input {
  min-width: 0;
  width: 100%;
}

.prashna-question-display {
  margin-top: 0.65rem !important;
  color: var(--text-1) !important;
  font-weight: 600;
}

@media (max-width: 760px) {
  .prashna-form-grid {
    grid-template-columns: 1fr;
  }
}



/*------------------- Mobile Friendly Astrology fixes ---------------------------*/

@media (max-width: 760px) {
  .dashboard-card,
  .panel {
    padding: 0.9rem;
    border-radius: 8px;
  }

  .dashboard-card h4 {
    margin-top: 0;
    font-size: 1rem;
    line-height: 1.3;
  }

  .dashboard-card p {
    font-size: 0.9rem;
  }

  .astro-global-controls {
    gap: 0.85rem;
  }

  .astro-chart-style-control,
  .astro-global-node-control {
    width: 100%;
  }

  .astro-chart-style-control .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .astro-chart-style-button {
    min-width: 0;
    width: 100%;
  }

  .astro-mode-controls {
    display: flex;
    flex-wrap: nowrap;
    width: calc(100% + 1.8rem);
    margin: 0.9rem -0.9rem -0.9rem;
    padding: 0.7rem 0.9rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-top: 1px solid var(--line);
    background: #fffdf8;
    scrollbar-width: none;
  }

  .astro-mode-controls::-webkit-scrollbar {
    display: none;
  }

  .astro-mode-controls .btn {
    flex: 0 0 auto;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .astro-primary-chart {
    padding: 0.75rem;
  }

  .astro-main-chart-header {
    align-items: flex-start;
    gap: 0.25rem;
  }

  .astro-main-chart-header span {
    font-size: 0.78rem;
  }

  .vedic-chart-wrap {
    padding: 0.4rem 0;
    overflow: hidden;
  }

  .vedic-chart-svg {
    width: 100%;
    max-height: none;
  }

  .astro-chart-preview-computed {
    min-height: 0;
    height: auto;
    aspect-ratio: 7 / 6;
  }

  .astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
    min-height: 9rem;
    height: 9rem;
    aspect-ratio: auto;
  }

  .astro-chart-preview-computed .vedic-chart-wrap {
    padding: 0.45rem;
  }

  .astro-chart-preview-computed .vedic-chart-svg-compact {
    width: 100%;
    max-height: none;
  }

  .astro-birth-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .astro-highlights {
    gap: 0.5rem;
  }

  .astro-highlight-card {
    padding: 0.65rem;
    border-radius: 7px;
  }

  .astro-table-wrap {
    position: relative;
    margin-right: -0.1rem;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
    font-size: 0.82rem;
  }

  .dasha-summary-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .dashboard-list > div {
    padding: 0.65rem;
  }
}

@media (max-width: 390px) {
  .app {
    padding: 0.65rem;
  }

  .astro-birth-summary {
    grid-template-columns: 1fr;
  }

  .astro-mode-controls {
    width: calc(100% + 1.3rem);
    margin-right: -0.65rem;
    margin-left: -0.65rem;
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }
}




/* Navigation bar */

@media (max-width: 760px) {
  .app {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .main {
    gap: 0.75rem;
  }

  .sidebar {
    position: sticky;
    top: 0.5rem;
    z-index: 10;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: 8px;
  }

  .brand h1 {
    font-size: 1rem;
    white-space: nowrap;
  }

  .brand p {
    display: none;
  }

  .nav {
    display: flex;
    min-width: 0;
    gap: 0.4rem;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .topbar {
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
    border-radius: 8px;
  }

  .topbar h2 {
    font-size: 1.1rem;
  }

  .topbar p {
    margin-top: 0.2rem;
    font-size: 0.84rem;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    min-height: 2.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
  }

  #sectionHost {
    margin-top: 0;
    padding: 0.75rem;
    border-radius: 8px;
  }
}

@media (max-width: 390px) {
  .app {
    padding: 0.65rem;
  }

  .sidebar {
    top: 0.35rem;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}




/* Prevent route content from widening the mobile app shell. */
/* html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.app,
.sidebar,
.main,
.workspace,
.panel,
#sectionHost,
#sectionHost > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .workspace,
  #sectionHost,
  #sectionHost > * {
    width: 100%;
  }

  .dashboard-card,
  .dashboard-card-hero,
  .dashboard-card-wide,
  .dashboard-list,
  .form-grid {
    min-width: 0;
    max-width: 100%;
  }

  .dashboard-card p,
  .dashboard-card strong,
  .dashboard-list strong,
  .field-label {
    overflow-wrap: anywhere;
  }
} */




/*------------------- END OF Mobile Friendly Astrology fixes ---------------------------*/