/* ==========================================================================
   JyotirVed Engine — KP Workstation Redesign
   Synchronized with light (Sandalwood / Sky) & dark (Cosmic Midnight) themes
   ========================================================================== */

.kp-workstation-root {
  color: var(--ink, #0f172a);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  padding: 6px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================================
   1. Top Quick Stats Ribbon
   ========================================================================== */
.kp-ribbon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px) {
  .kp-ribbon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .kp-ribbon-grid {
    grid-template-columns: 1fr;
  }
}

.kp-ribbon-card {
  background: var(--paper, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

body.dark .kp-ribbon-card {
  background: var(--paper, #0c1527);
  border-color: var(--line, rgba(223, 177, 91, 0.22));
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.kp-ribbon-card:hover {
  border-color: #cbd5e1;
}

.kp-ribbon-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.kp-ricon-blue { background: #eff6ff; color: #0284c7; }
.kp-ricon-globe { background: #e0f2fe; color: #0369a1; }
.kp-ricon-gold { background: #fef3c7; color: #d97706; }
.kp-ricon-moon { background: #fffbeb; color: #b45309; }
.kp-ricon-purple { background: #f5f3ff; color: #7c3aed; }
.kp-ricon-sun { background: #fff7ed; color: #ea580c; }

body.dark .kp-ricon-blue { background: rgba(2, 132, 199, 0.2); color: #38bdf8; }
body.dark .kp-ricon-globe { background: rgba(3, 105, 161, 0.2); color: #38bdf8; }
body.dark .kp-ricon-gold { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
body.dark .kp-ricon-moon { background: rgba(217, 119, 6, 0.2); color: #fde047; }
body.dark .kp-ricon-purple { background: rgba(124, 58, 237, 0.2); color: #c084fc; }
body.dark .kp-ricon-sun { background: rgba(234, 88, 12, 0.2); color: #fb923c; }

.kp-ribbon-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kp-ribbon-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748b);
  display: flex;
  align-items: center;
  gap: 5px;
}

.kp-ribbon-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

body.dark .kp-ribbon-val {
  color: #f1f5f9;
}

/* ==========================================================================
   2. Main 3-Column Charts & Dasha Row
   ========================================================================== */
.kp-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 1280px) {
  .kp-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .kp-dasha-container-col {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .kp-main-grid {
    grid-template-columns: 1fr;
  }
  .kp-dasha-container-col {
    grid-column: span 1;
  }
}

/* Chart Card Structure */
.kp-card {
  background: var(--paper, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

body.dark .kp-card {
  background: var(--paper, #0c1527);
  border-color: var(--line, rgba(223, 177, 91, 0.22));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Inner Chart Card Header */
.kp-chart-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kp-chart-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kp-chart-badge {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.kp-badge-d1 { background: linear-gradient(135deg, #0284c7, #0369a1); }
.kp-badge-d3,
.kp-badge-cuspal { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.kp-chart-head-titles {
  display: flex;
  flex-direction: column;
}

.kp-chart-head-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0;
}

body.dark .kp-chart-head-title {
  color: #f1f5f9;
}

.kp-chart-head-sub {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  margin-top: 1px;
}

.kp-chart-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kp-btn-tool {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: var(--paper, #ffffff);
  color: var(--ink, #334155);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

body.dark .kp-btn-tool {
  background: var(--paper, #0c1527);
  border-color: var(--line, rgba(223, 177, 91, 0.22));
  color: var(--ink, #f1f5f9);
}

.kp-btn-tool:hover {
  border-color: #0284c7;
  color: #0284c7;
}

.kp-btn-tool.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #0284c7;
}

body.dark .kp-btn-tool.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* Stack: SVG Top + Details Below */
.kp-chart-split,
.kp-chart-vertical-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.kp-chart-box-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.kp-svg-wrapper {
  width: 100%;
  max-width: 100%;
  background: var(--paper, #ffffff);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

body.dark .kp-svg-wrapper {
  background: #08101e;
  border-color: rgba(223, 177, 91, 0.2);
}

.kp-svg-wrapper svg {
  width: 100%;
  height: auto;
  max-height: 380px;
  display: block;
}

.kp-chart-lagna-bar {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink, #1e293b);
  margin-top: 8px;
  text-align: center;
}

body.dark .kp-chart-lagna-bar {
  color: #e2e8f0;
}

/* Details Box below chart */
.kp-chart-details-panel {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

body.dark .kp-chart-details-panel {
  background: rgba(30, 58, 138, 0.15);
  border-color: rgba(59, 130, 246, 0.25);
}

.kp-details-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  padding-bottom: 5px;
  border-bottom: 1px solid #dbeafe;
}

body.dark .kp-details-head {
  color: #93c5fd;
  border-bottom-color: rgba(59, 130, 246, 0.25);
}

.kp-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}

@media (max-width: 480px) {
  .kp-details-grid {
    grid-template-columns: 1fr;
  }
}

.kp-details-row-span {
  grid-column: 1 / -1;
}

.kp-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 11.5px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

body.dark .kp-details-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.kp-details-row:last-of-type {
  border-bottom: none;
}

.kp-details-label {
  color: var(--muted, #64748b);
  font-weight: 500;
}

.kp-details-val {
  font-weight: 600;
  color: var(--ink, #0f172a);
  text-align: right;
}

.kp-details-callout {
  background: var(--paper, #ffffff);
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  padding: 6px 8px;
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.35;
  color: #1e40af;
}

body.dark .kp-details-callout {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* ==========================================================================
   3. Column 3: Vimshottari Dasha Component (Multi-Tier Navigation)
   ========================================================================== */
.kp-dasha-card {
  padding: 14px 16px;
}

.kp-dasha-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kp-dasha-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kp-dasha-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffedd5;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

body.dark .kp-dasha-icon {
  background: rgba(234, 88, 12, 0.18);
  color: #fb923c;
}

.kp-dasha-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0;
}

body.dark .kp-dasha-title {
  color: #f1f5f9;
}

.kp-dasha-header-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kp-btn-dasha-tab {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: var(--paper, #ffffff);
  color: var(--ink, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark .kp-btn-dasha-tab {
  background: var(--paper, #0c1527);
  border-color: var(--line, rgba(223, 177, 91, 0.22));
  color: var(--ink, #f1f5f9);
}

.kp-btn-dasha-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Nav Breadcrumb & Level Selector */
.kp-dasha-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--paper2, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
}

body.dark .kp-dasha-nav-row {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

.kp-dasha-crumbs {
  font-size: 12.5px;
  font-weight: 700;
  color: #0284c7;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kp-dasha-levels {
  display: flex;
  align-items: center;
  gap: 3px;
}

.kp-level-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: var(--paper, #ffffff);
  color: var(--ink, #334155);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

body.dark .kp-level-btn {
  background: var(--paper, #0c1527);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.kp-level-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Period Row Items */
.kp-dasha-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.kp-period-row {
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: var(--paper, #ffffff);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark .kp-period-row {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

.kp-period-row:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

body.dark .kp-period-row:hover {
  background: rgba(2, 132, 199, 0.15);
}

.kp-period-row.running-active {
  border-color: #38bdf8;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #38bdf8;
}

body.dark .kp-period-row.running-active {
  background: rgba(2, 132, 199, 0.2);
}

.kp-period-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kp-period-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kp-period-radio {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  display: inline-block;
  flex-shrink: 0;
}

.kp-period-row.running-active .kp-period-radio {
  border-color: #0284c7;
  background: #0284c7;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.kp-period-name {
  font-size: 12.5px;
  font-weight: 700;
}

.kp-period-dates {
  font-size: 10.5px;
  color: var(--muted, #64748b);
  font-family: var(--font-mono);
}

.kp-period-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 19px;
  font-size: 10px;
}

.kp-period-bot-label {
  color: var(--muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
}

.kp-period-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}

/* Dasha Footer */
.kp-dasha-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark .kp-dasha-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.kp-running-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
}

.kp-running-pills {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

/* ==========================================================================
   4. Planetary House Activation & Numbers (KP Activation Matrix)
   ========================================================================== */
.kp-activation-card {
  padding: 18px 20px;
}

.kp-table-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kp-table-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kp-table-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

body.dark .kp-table-icon {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.kp-table-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0;
}

body.dark .kp-table-title {
  color: #f1f5f9;
}

.kp-table-sub {
  font-size: 12px;
  color: var(--muted, #64748b);
}

/* Table Design */
.kp-matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

body.dark .kp-matrix-table-wrap {
  border-color: rgba(255, 255, 255, 0.08);
}

.kp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.kp-table th {
  background: #f8fafc;
  color: var(--muted, #64748b);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

body.dark .kp-table th {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.kp-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--ink, #334155);
  white-space: nowrap;
}

body.dark .kp-table td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.kp-table tr:hover {
  background: #f0f9ff;
}

body.dark .kp-table tr:hover {
  background: rgba(2, 132, 199, 0.1);
}

/* ==========================================================================
   5. Bottom 2-Column Section (Cusps & RP)
   ========================================================================== */
.kp-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .kp-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.kp-bottom-card {
  padding: 16px 18px;
}

/* Ruling Planets & Horary Split inside right card */
.kp-rp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 600px) {
  .kp-rp-split {
    grid-template-columns: 1fr;
  }
}

.kp-rp-table {
  width: 100%;
  border-collapse: collapse;
}

.kp-rp-table td {
  padding: 6px 4px;
  font-size: 11.5px;
  border-bottom: 1px solid #f1f5f9;
}

body.dark .kp-rp-table td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.kp-rp-table td:first-child {
  color: var(--muted, #64748b);
  font-weight: 600;
  width: 44%;
}

.kp-rp-table td:last-child {
  font-weight: 700;
  color: var(--ink, #0f172a);
}

body.dark .kp-rp-table td:last-child {
  color: #f1f5f9;
}

.kp-horary-panel {
  background: var(--paper2, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.dark .kp-horary-panel {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

.kp-horary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kp-horary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

body.dark .kp-horary-title {
  color: #f1f5f9;
}

.kp-horary-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kp-horary-stepper input {
  width: 55px;
  height: 28px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: var(--paper, #ffffff);
  color: var(--ink, #0f172a);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

body.dark .kp-horary-stepper input {
  background: #08101e;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

.kp-horary-display-card {
  background: var(--paper, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink, #334155);
}

body.dark .kp-horary-display-card {
  background: #08101e;
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

/* Number badges */
.kp-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  background: #eff6ff;
  color: #0369a1;
  border: 1px solid #bfdbfe;
  margin: 1px;
}

.kp-num-badge.kp-fav {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.kp-num-badge.kp-diff {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.kp-num-badge.kp-hidden {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

/* Breadcrumbs active & hover styles */
.kp-dasha-crumbs .crumb {
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--ink, #1e293b);
  background: transparent;
  transition: all 0.15s ease;
}
.kp-dasha-crumbs .crumb:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}
.kp-dasha-crumbs .crumb.active {
  background: #0284c7;
  color: #ffffff;
}
body.dark .kp-dasha-crumbs .crumb {
  color: #94a3b8;
}
body.dark .kp-dasha-crumbs .crumb.active {
  background: #0284c7;
  color: #ffffff;
}
.kp-dasha-crumbs .sep {
  color: var(--muted, #94a3b8);
  font-size: 11px;
}

/* Hide duplicate action bar inside chart split since we have card header tools */
.kp-chart-box-col .chart-action-bar {
  display: none !important;
}

/* Legend bar */
.kp-legend-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--paper, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
body.dark .kp-legend-bar {
  background: var(--paper, #0c1527);
  border-color: var(--line, rgba(223, 177, 91, 0.22));
}
.kp-legend-bar .legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

/* Selected row radio */
.kp-period-row.running-active .kp-period-radio,
.kp-period-row.selected-row .kp-period-radio {
  border-color: #0284c7;
  background: #0284c7;
  box-shadow: inset 0 0 0 2px #ffffff;
}

/* Practical Prediction Card */
.kp-dasha-practical-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--paper2, #f8fafc);
  margin-top: 6px;
}
body.dark .kp-dasha-practical-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}
.kp-dasha-practical-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  list-style: none;
}
.kp-dasha-practical-card summary::-webkit-details-marker {
  display: none;
}

/* Hidden Rules & Advanced Decks */
.kp-hidden-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .kp-hidden-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .kp-hidden-deck {
    grid-template-columns: 1fr;
  }
}
.kp-hidden-rule-card {
  background: var(--paper2, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
body.dark .kp-hidden-rule-card {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}
.kp-significators-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}
@media (max-width: 800px) {
  .kp-significators-grid {
    grid-template-columns: 1fr;
  }
}
.kp-csl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 1000px) {
  .kp-csl-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .kp-csl-grid {
    grid-template-columns: 1fr;
  }
}
.kp-csl-card {
  background: var(--paper2, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
}
body.dark .kp-csl-card {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}


/* ==========================================================================
   KP Horary 1–249 Resolver (The Instant Oracle) Styles
   ========================================================================== */
.kp-oracle-card {
  background: var(--paper, #ffffff);
  border: 1.5px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
  margin-top: 14px;
}
body.dark .kp-oracle-card {
  background: #0d1527;
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.kp-oracle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.kp-oracle-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kp-oracle-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}
body.dark .kp-oracle-icon {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}

.kp-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kp-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--paper2, #f8fafc);
  color: var(--muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.kp-category-chip:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.3);
}
.kp-category-chip.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #6d28d9;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.kp-verdict-banner {
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.kp-verdict-banner.verdict-positive {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.08) 100%);
  border: 1.5px solid #10b981;
}
.kp-verdict-banner.verdict-conditional {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1.5px solid #f59e0b;
}
.kp-verdict-banner.verdict-negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(220, 38, 38, 0.08) 100%);
  border: 1.5px solid #ef4444;
}

.kp-verdict-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kp-timing-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
}
body.dark .kp-timing-card {
  background: rgba(14, 30, 60, 0.8);
  border-color: rgba(56, 189, 248, 0.35);
}

.kp-advice-card {
  background: var(--paper2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.5;
}
body.dark .kp-advice-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
