.report-shell {
  --page-bg: #eaf5e6;
  --paper: #eef7e7;
  --chart-bg: #fffdea;
  --green: #169326;
  --blue: #152b9c;
  --red: #d41118;
  --maroon: #761336;
  --soft-line: #b8b3a2;
  --ink: #171717;
}

.result-heading {
  margin-top: 30px;
  margin-bottom: 0;
}

.result-heading h2 {
  font-size: clamp(18px, 3.5vw, 26px);
}

.report-shell {
  position: relative;
  width: min(100%, 720px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 18px rgba(31, 92, 29, .15);
  border-radius: 8px;
}

.report-content {
  width: calc(100% - 118px);
  margin: 0 auto;
  padding: 0 0 22px;
}

.ornament {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 46px;
  pointer-events: none;
  background-color: #fff;
  background-image:
    linear-gradient(var(--green), var(--green)),
    linear-gradient(var(--green), var(--green)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='48' viewBox='0 0 38 48'%3E%3Ctext x='19' y='34' text-anchor='middle' font-size='30' font-family='Arial Unicode MS, sans-serif' fill='%23d2181f'%3E%E5%8D%90%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, repeat-y;
  background-size: 2px 100%, 2px 100%, 38px 48px;
}

.ornament-left {
  left: 0;
  background-position: right 0 top, left 0 top, center top;
}

.ornament-right {
  right: 0;
  background-position: left 0 top, right 0 top, center top;
}

.planet-table-wrap {
  overflow: hidden;
  border-left: 2px solid var(--green);
  border-right: 2px solid var(--green);
  background: #fff;
}

.planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(13px, 2.55vw, 18px);
  font-weight: 650;
  line-height: 1.35;
}

.planet-table thead {
  background: var(--maroon);
}

.planet-table th {
  color: #fff;
  font-weight: 600;
  padding: 6px 4px;
  text-align: center;
  font-size: clamp(12px, 2.2vw, 15px);
  border-right: 1px solid rgba(255,255,255,0.15);
}

.planet-table th:last-child {
  border-right: 0;
}

.planet-table td {
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  background: rgba(255,255,255,.88);
  word-break: break-word;
}

.planet-table td:last-child {
  border-right: 0;
}

.planet-table tr:last-child td {
  border-bottom: 2px solid var(--green);
}

.planet-table .retrograde {
  color: var(--red);
  font-weight: 800;
}

.planet-table .planet-name {
  font-family: 'Tiro Devanagari Sanskrit', 'Nirmala UI', 'Noto Sans Devanagari', serif;
  font-weight: 700;
  color: var(--maroon);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 3px 7px;
  padding: 10px 0 18px;
  color: #1f1f1f;
  font-size: clamp(15px, 3vw, 21px);
  line-height: 1.4;
}

.report-meta strong {
  color: var(--red);
  font-weight: 800;
}

.report-meta .divider {
  color: var(--red);
  font-weight: 800;
  padding: 0 2px;
}

.kundli-card {
  margin: 0 0 24px;
  padding: 11px;
  border: 3px solid var(--green);
  border-radius: 16px;
  background: #e9f3e5;
}

.kundli-inner {
  padding: 12px 12px 14px;
  border: 2px solid #243fb3;
  border-radius: 9px;
  background: rgba(255,255,255,.53);
}

.kundli-inner h1,
.kundli-inner h2 {
  margin: 0 0 10px;
  color: var(--blue);
  text-align: center;
  font-size: clamp(24px, 4vw, 31px);
  line-height: 1.15;
  font-weight: 800;
}

.chart-host {
  width: 100%;
  aspect-ratio: 1 / 1;
  transition: transform .18s ease;
  transform-origin: center;
  touch-action: manipulation;
}

.chart-host.is-zoomed {
  transform: scale(1.025);
}

.kundli-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: var(--chart-bg);
  border-radius: 2px;
}

.chart-border,
.chart-main-line {
  fill: none;
  stroke: var(--maroon);
  stroke-width: 2.15;
  vector-effect: non-scaling-stroke;
}

.chart-soft-line {
  fill: none;
  stroke: var(--soft-line);
  stroke-width: 1.05;
  vector-effect: non-scaling-stroke;
}

.house-no,
.planet-label,
.center-label,
.node-label {
  font-family: "Nirmala UI", "Noto Sans Devanagari", Mangal, sans-serif;
  dominant-baseline: middle;
  text-anchor: middle;
  user-select: none;
}

.house-no {
  fill: var(--red);
  font-size: 21px;
  font-weight: 800;
}

.planet-label {
  fill: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.center-label {
  fill: var(--blue);
  font-size: 19px;
  font-weight: 800;
}

.node-circle {
  fill: rgba(255,255,255,.28);
  stroke: #aeb5a2;
  stroke-width: 1.6;
  stroke-dasharray: 3.5 3.5;
  vector-effect: non-scaling-stroke;
}

.node-solid {
  fill: #f9f8dc;
  stroke: #8c9586;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.node-label {
  fill: #162795;
  font-size: 18px;
  font-weight: 800;
}

  .arrow-line {
  fill: none;
  stroke: #324e5a;
  stroke-width: 4.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

@media (max-width: 600px) {
  .ornament {
    width: 34px;
    background-size: 2px 100%, 2px 100%, 29px 40px;
  }

  .report-content {
    width: calc(100% - 86px);
  }

  .kundli-card {
    padding: 8px;
    border-width: 2px;
    border-radius: 13px;
  }

  .kundli-inner {
    padding: 9px 8px 10px;
  }

  .planet-table td {
    padding: 6px 4px;
  }

  .report-meta {
    padding-bottom: 14px;
  }

  .planet-table th {
    font-size: 11px;
    padding: 5px 3px;
  }
  .arrow-line { stroke-width: 3; }
}

@media (max-width: 430px) {
  .ornament {
    width: 27px;
    background-size: 1.5px 100%, 1.5px 100%, 23px 34px;
  
  }

  .report-content {
    width: calc(100% - 67px);
  }

  .planet-table {
    font-size: 11px;
  }

  .planet-table td {
    padding: 5px 3px;
  }

  .planet-table th {
    font-size: 10px;
    padding: 4px 2px;
  }

  .report-meta {
    gap: 1px 4px;
    font-size: 13px;
  }

  .kundli-inner h1,
  .kundli-inner h2 {
    margin-bottom: 7px;
    font-size: 21px;
  }

  .house-no {
    font-size: 18px;
  }

  .planet-label,
  .center-label {
    font-size: 17px;
  }

  .node-label {
    font-size: 16px;
  }
  .arrow-line { stroke-width: 2; }
}

@media print {
  body {
    background: #fff;
  }

  .report-shell {
    box-shadow: none;
  }

  .chart-host {
    break-inside: avoid;
  }
}

/* ─── Toast ─── */
.kundali-toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: #2d2d2d;
  color: #f0e9dd;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Noto Sans Devanagari', sans-serif;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  max-width: 90vw;
  text-align: center;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.08);
}
.kundali-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.kundali-toast.error {
  background: #3d1a1a;
  border-color: rgba(220,80,60,0.25);
}
.kundali-toast.success {
  background: #1a3d1a;
  border-color: rgba(80,200,80,0.2);
}
.kundali-toast .toast-close {
  margin-left: 14px;
  cursor: pointer;
  opacity: 0.5;
  font-size: 18px;
  vertical-align: middle;
}
.kundali-toast .toast-close:hover { opacity: 1; }
