
/* Global Typography */
:root {
  --font-display: "Marcellus", Georgia, serif;
  --font-body: "Hind", system-ui, -apple-system, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 12px;
}
	
/* Light Mode Palette */
:root,
[data-theme="light"] {
  color-scheme: light;
  --paper: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --saffron: #EA580C;
  --saffron-soft: rgba(234, 88, 12, 0.12);
  --indigo-soft: rgba(99, 102, 241, 0.12);
  --al: #2563EB;
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #FFF7ED;
  --chart-line: #CBD5E1;
  --pop-bg: #FFFFFF;
}


/* ================= LAVENDER PEACH THEME ================= */

[data-palette="lavender-peach"] {
  color-scheme: light;

  --paper: #F1EDFA;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-alt: rgba(255, 255, 255, 0.48);
  --ink: #302541;
  --muted: #746780;

  --line: rgba(255, 255, 255, 0.78);
  --line-strong: rgba(190, 172, 211, 0.48);

  --saffron: #8564C9;
  --saffron-soft: rgba(133, 100, 201, 0.14);
  --indigo-soft: rgba(174, 151, 226, 0.18);
  --al: #9B6AC8;

  --good: #398C78;
  --good-soft: rgba(57, 140, 120, 0.13);
  --bad: #C45F77;
  --bad-soft: rgba(196, 95, 119, 0.12);
  --amber: #B97853;
  --amber-soft: rgba(241, 174, 139, 0.17);

  --brand-bg: rgba(255, 255, 255, 0.60);
  --chart-bg: rgba(255, 255, 255, 0.90);
  --chart-lagna-bg: #E9DDF8;
  --chart-line: #C7B5E1;
  --pop-bg: rgba(255, 255, 255, 0.95);
}

/* Soft lavender-peach background */
html[data-palette="lavender-peach"] body {
  background:
    radial-gradient(
      ellipse at 8% 5%,
      rgba(188, 167, 240, 0.46),
      transparent 34%
    ),
    radial-gradient(
      ellipse at 93% 12%,
      rgba(255, 195, 171, 0.48),
      transparent 32%
    ),
    radial-gradient(
      ellipse at 78% 88%,
      rgba(211, 194, 241, 0.38),
      transparent 32%
    ),
    radial-gradient(
      ellipse at 15% 85%,
      rgba(255, 222, 207, 0.48),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      #F0EBFA 0%,
      #FFF8F4 52%,
      #F5EDF9 100%
    );
  background-attachment: fixed;
}

/* Frosted-glass surfaces */
[data-palette="lavender-peach"] ,
[data-palette="lavender-peach"] .card,
[data-palette="lavender-peach"] .panchang-card,
[data-palette="lavender-peach"] .panchang-item,
[data-palette="lavender-peach"] .chip,
[data-palette="lavender-peach"] .sugg,
[data-palette="lavender-peach"] .zodiac-hover-card,
[data-palette="lavender-peach"] .inline-error-popup {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.80),
    rgba(255, 248, 246, 0.48)
  ) !important;

  border: 1px solid rgba(255, 255, 255, 0.86) !important;
  box-shadow:
    0 10px 32px rgba(103, 78, 145, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);

  -webkit-backdrop-filter: blur(22px) saturate(155%);
  backdrop-filter: blur(22px) saturate(155%);
}

[data-palette="lavender-peach"] ,
[data-palette="lavender-peach"] .card,
[data-palette="lavender-peach"] .panchang-card {
  border-radius: 22px;
}

/* Panchang glass cards */
[data-palette="lavender-peach"] .panchang-item,
[data-palette="lavender-peach"] .panchang-item.highlight {
  background: linear-gradient(
    135deg,
    rgba(237, 226, 252, 0.88),
    rgba(255, 231, 219, 0.78),
    rgba(255, 250, 247, 0.78)
  ) !important;

  border-color: rgba(255, 255, 255, 0.92) !important;
  border-radius: 16px;

  box-shadow:
    0 5px 18px rgba(103, 78, 145, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-palette="lavender-peach"] .panchang-label {
  color: #675575 !important;
}

[data-palette="lavender-peach"] .panchang-value {
  color: #6844A6 !important;
}

[data-palette="lavender-peach"] .panchang-sub {
  color: #746780 !important;
}

/* Inputs and dropdowns */
[data-palette="lavender-peach"] input,
[data-palette="lavender-peach"] select,
[data-palette="lavender-peach"] textarea {
  background: rgba(255, 255, 255, 0.68) !important;
  border: 1px solid rgba(255, 255, 255, 0.90) !important;
  box-shadow: inset 0 1px 3px rgba(103, 78, 145, 0.06);

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Primary buttons and selected tabs */
[data-palette="lavender-peach"] .btn:not(.ghost),
[data-palette="lavender-peach"] .tabs button[aria-selected="true"] {
  background: linear-gradient(
    115deg,
    rgba(139, 105, 207, 0.96),
    rgba(183, 133, 201, 0.94),
    rgba(222, 157, 156, 0.92)
  ) !important;

  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;

  box-shadow:
    0 6px 18px rgba(139, 105, 207, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);

  -webkit-backdrop-filter: blur(18px) saturate(165%);
  backdrop-filter: blur(18px) saturate(165%);
}

/* Secondary buttons */
[data-palette="lavender-peach"] .btn.ghost {
  background: rgba(255, 255, 255, 0.48);
  color: #684D91;
  border-color: rgba(255, 255, 255, 0.85);

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Generate Kundali — matching Lavender Peach glass */
[data-palette="lavender-peach"] #mainForm > button[type="submit"] {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.40),
      transparent 42%
    ),
    linear-gradient(
      115deg,
      rgba(139, 105, 207, 0.96),
      rgba(183, 133, 201, 0.94),
      rgba(222, 157, 156, 0.94)
    ) !important;

  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 14px;

  box-shadow:
    0 8px 24px rgba(139, 105, 207, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14);

  -webkit-backdrop-filter: blur(18px) saturate(165%);
  backdrop-filter: blur(18px) saturate(165%);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

[data-palette="lavender-peach"] #mainForm > button[type="submit"]:hover {
  filter: brightness(1.06) saturate(1.08);
  transform: translateY(-1px);

  box-shadow:
    0 11px 28px rgba(139, 105, 207, 0.29),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

[data-palette="lavender-peach"] #mainForm > button[type="submit"]:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

/* Research editor glass styling */
[data-palette="lavender-peach"] .desc-editor,
[data-palette="lavender-peach"] .desc-toolbar {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 255, 255, 0.86);

  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* Fix outer Panchang container corners */
html[data-palette="lavender-peach"] .panchang-card {
  border-radius: 10px !important;
}
/* ================= END LAVENDER PEACH THEME ================= */

/* Palette: High Contrast Monochrome (Black & White - Dark) */
[data-palette="mono"] {
  --paper: #000000;
  --surface: #0a0a0a;
  --surface-alt: #141414;
  --ink: #FFFFFF;
  --muted: #888888;
  --line: #2e2e2e;
  --line-strong: #555555;
  --saffron: #FFFFFF;
  --saffron-soft: rgba(255, 255, 255, 0.15);
  --indigo-soft: rgba(255, 255, 255, 0.10);
  --al: #CCCCCC;
  /* Feedback Colors (Standard Dark) */
  --good: #34D399;
  --good-soft: rgba(52, 211, 153, 0.14);
  --bad: #F87171;
  --bad-soft: rgba(248, 113, 113, 0.14);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  /* UI & Chart Additions */
  --brand-bg: rgba(0, 0, 0, 0.88);
  --chart-bg: #000000;
  --chart-lagna-bg: #1a1a1a;
  --chart-line: #555555;
  --pop-bg: #111111;
}

/* Palette: Ocean Blue (Light) */
[data-palette="ocean"] {
  --paper: #E9F1FA;
  --surface: #FFFFFF;
  --surface-alt: #DFECF8;
  --ink: #0A2540;
  --muted: #537599;
  --line: #C7DCF1;
  --line-strong: #99C4EB;
  --saffron: #00ABE4;
  --saffron-soft: rgba(0, 171, 228, 0.15);
  --indigo-soft: rgba(0, 122, 255, 0.12);
  --al: #0077B6;
  /* Feedback Colors (Standard Light) */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #DFECF8;
  --chart-line: #99C4EB;
  --pop-bg: #FFFFFF;
}

/* Palette: Golden Ivory (Light) */
[data-palette="ivory"] {
  --paper: #FAF6EE;
  --surface: #FFFFFF;
  --surface-alt: #F0E7D4;
  --ink: #1B1B1F;
  --muted: #6B6354;
  --line: #E8DFC9;
  --line-strong: #D9CEB2;
  --saffron: #E09A12;
  --saffron-soft: rgba(244, 183, 60, 0.18);
  --indigo-soft: rgba(224, 154, 18, 0.12);
  --al: #B06E10;
  /* Feedback Colors */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(250, 246, 238, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #FFF8E8;
  --chart-line: #D9CEB2;
  --pop-bg: #FFFFFF;
}

[data-theme="light"] .boot {
  background: linear-gradient(135deg, #FAF6EE, #F0E7D4);
  border: 1px solid var(--gold);
  color: var(--tx);
}
[data-theme="light"] .boot p {
  color: var(--mut);
}
[data-theme="light"] .feat,
[data-theme="light"] .schip,
[data-theme="light"] .wrow,
[data-theme="light"] .abcard {
  background: var(--card);
  border-color: var(--line2);
  box-shadow: var(--shadow);
}
[data-theme="light"] .feat:hover {
  border-color: var(--gold);
}

/* Palette: Cyber Lime (Dark) */
[data-palette="lime"] {
  --paper: #050B05;
  --surface: #0E170E;
  --surface-alt: #162416;
  --ink: #FFFFFF;
  --muted: #7E9E7E;
  --line: #1F381F;
  --line-strong: #2F592F;
  --saffron: #00DD00;
  --saffron-soft: rgba(0, 221, 0, 0.16);
  --indigo-soft: rgba(0, 221, 0, 0.10);
  --al: #55FF55;
  /* Feedback Colors (Standard Dark) */
  --good: #34D399;
  --good-soft: rgba(52, 211, 153, 0.14);
  --bad: #F87171;
  --bad-soft: rgba(248, 113, 113, 0.14);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  /* UI & Chart Additions */
  --brand-bg: rgba(5, 11, 5, 0.88);
  --chart-bg: #050B05;
  --chart-lagna-bg: #162416;
  --chart-line: #2F592F;
  --pop-bg: #0E170E;
}

/* Palette: White Lilac (Light) */
[data-palette="lilac"] {
  --paper: #F8F8F9;
  --surface: #FFFFFF;
  --surface-alt: #EEEFF4;
  --ink: #111439;
  --muted: #62658A;
  --line: #DCDEEA;
  --line-strong: #B8BBD1;
  --saffron: #4F46E5;
  --saffron-soft: rgba(79, 70, 229, 0.12);
  --indigo-soft: rgba(99, 102, 241, 0.14);
  --al: #2563EB;
  /* Feedback Colors (Standard Light) */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #EEEFF4;
  --chart-line: #B8BBD1;
  --pop-bg: #FFFFFF;
}

/* Palette: Pastel Mint (Light) */
[data-palette="mint"] {
  --paper: #EBF8EE;
  --surface: #FFFFFF;
  --surface-alt: #DBF3DF;
  --ink: #10341B;
  --muted: #4B6E54;
  --line: #C2F8CB;
  --line-strong: #96E4A3;
  --saffron: #15803D;
  --saffron-soft: rgba(21, 128, 61, 0.14);
  --indigo-soft: rgba(46, 125, 50, 0.12);
  --al: #0284C7;
  /* Feedback Colors (Standard Light) */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #DBF3DF;
  --chart-line: #96E4A3;
  --pop-bg: #FFFFFF;
}

/* Palette: Cream Yellow (Light) */
[data-palette="cream"] {
  --paper: #FFFDF5;
  --surface: #FFFFFF;
  --surface-alt: #FFF9E6;
  --ink: #332B00;
  --muted: #7A7040;
  --line: #F4E8B8;
  --line-strong: #D9C570;
  --saffron: #D4A017;
  --saffron-soft: rgba(212, 160, 23, 0.16);
  --indigo-soft: rgba(255, 238, 153, 0.35);
  --al: #2563EB;
  /* Feedback Colors (Standard Light) */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #FFF9E6;
  --chart-line: #D9C570;
  --pop-bg: #FFFFFF;
}

/* Palette: Turquoise (Light) */
[data-palette="turquoise"] {
  --paper: #F2FCFC;
  --surface: #FFFFFF;
  --surface-alt: #E3F8F6;
  --ink: #0A3633;
  --muted: #417370;
  --line: #B2EBE6;
  --line-strong: #40E0D0;
  --saffron: #00A896;
  --saffron-soft: rgba(64, 224, 208, 0.20);
  --indigo-soft: rgba(64, 224, 208, 0.12);
  --al: #0284C7;
  /* Feedback Colors (Standard Light) */
  --good: #059669;
  --good-soft: rgba(5, 150, 105, 0.12);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  /* UI & Chart Additions */
  --brand-bg: rgba(255, 255, 255, 0.88);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #E3F8F6;
  --chart-line: #40E0D0;
  --pop-bg: #FFFFFF;
}

/* ==========================================================
   WOODEN LIQUID GLASS — JupiterAstro
   Premium wood grain + warm translucent glass
   ========================================================== */

[data-palette="wooden"] {
  color-scheme: light;

  /* Core palette */
  --paper: #3B2416;
  --surface: rgba(255, 244, 224, 0.66);
  --surface-alt: rgba(228, 194, 146, 0.42);
  --ink: #382113;
  --muted: #765238;
  --line: rgba(255, 229, 190, 0.56);
  --line-strong: rgba(164, 104, 52, 0.68);

  /* Brand and status colours */
  --saffron: #A85E22;
  --saffron-soft: rgba(168, 94, 34, 0.16);
  --indigo-soft: rgba(203, 151, 91, 0.18);
  --al: #276C8C;

  --good: #2E7851;
  --good-soft: rgba(46, 120, 81, 0.14);
  --bad: #B83A32;
  --bad-soft: rgba(184, 58, 50, 0.13);
  --amber: #A96520;
  --amber-soft: rgba(169, 101, 32, 0.16);

  /* Chart colours */
  --brand-bg: rgba(74, 42, 22, 0.72);
  --chart-bg: rgba(255, 239, 211, 0.94);
  --chart-lagna-bg: #E8C99B;
  --chart-line: #9B6739;
  --pop-bg: rgba(255, 246, 229, 0.96);

  /* Liquid glass */
  --wood-glass: rgba(255, 239, 211, 0.30);
  --wood-glass-strong: rgba(255, 239, 211, 0.52);
  --wood-glass-border: rgba(255, 229, 190, 0.72);
  --wood-glass-highlight: rgba(255, 250, 238, 0.82);
  --wood-shadow: 0 12px 32px rgba(27, 13, 5, 0.24);
  --wood-blur: 18px;
}

/* Wooden background with lighter warm grain */
html[data-palette="wooden"] body {
  color: var(--ink);
  background-color: #5A3922;
  background-image:
    radial-gradient(
      ellipse at 12% 8%,
      rgba(255, 213, 157, 0.34),
      transparent 30%
    ),
    radial-gradient(
      ellipse at 88% 18%,
      rgba(74, 42, 22, 0.18),
      transparent 36%
    ),
    radial-gradient(
      ellipse at 52% 100%,
      rgba(255, 213, 157, 0.25),
      transparent 44%
    ),
    repeating-linear-gradient(
      2deg,
      rgba(255, 230, 190, 0.07) 0px,
      rgba(255, 230, 190, 0.07) 2px,
      rgba(75, 43, 24, 0.06) 3px,
      rgba(75, 43, 24, 0.06) 7px,
      transparent 8px,
      transparent 17px
    ),
    linear-gradient(
      115deg,
      #89613F 0%,
      #5D3C27 42%,
      #795235 72%,
      #50321F 100%
    );
  background-attachment: fixed;
}

/* Frosted glass surfaces */
html[data-palette="wooden"] ,
html[data-palette="wooden"] .card,
html[data-palette="wooden"] article.card,
html[data-palette="wooden"] .panchang-card,
html[data-palette="wooden"] .panchang-item,
html[data-palette="wooden"] .chip,
html[data-palette="wooden"] .sugg,
html[data-palette="wooden"] .zodiac-hover-card,
html[data-palette="wooden"] .inline-error-popup,
html[data-palette="wooden"] .desc-editor,
html[data-palette="wooden"] .desc-toolbar {
  background-color: var(--wood-glass);
  border-color: var(--wood-glass-border);
  box-shadow:
    inset 0 1px 0 var(--wood-glass-highlight),
    var(--wood-shadow);
  -webkit-backdrop-filter: blur(var(--wood-blur)) saturate(145%);
  backdrop-filter: blur(var(--wood-blur)) saturate(145%);
}

html[data-palette="wooden"] ,
html[data-palette="wooden"] .card,
html[data-palette="wooden"] .panchang-card {
  border-radius: 16px;
}

/* Remove the square background behind the palette dropdown */
html[data-palette="wooden"] .palette-chooser {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}

/* Rounded glass palette dropdown */
html[data-palette="wooden"] .palette-chooser select {
  border-radius: 999px !important;
  background: linear-gradient(
    135deg,
    rgba(255, 246, 226, 0.94),
    rgba(224, 197, 157, 0.96)
  ) !important;
  color: #3E2819 !important;
  border: 1px solid rgba(255, 229, 190, 0.9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 4px 12px rgba(32, 17, 7, 0.20) !important;
}

/* Warm cream form controls */
html[data-palette="wooden"] input,
html[data-palette="wooden"] select,
html[data-palette="wooden"] textarea,
html[data-palette="wooden"] .ql-container.ql-snow {
  color: #382113;
  background-color: rgba(255, 246, 229, 0.78);
  border-color: rgba(164, 104, 52, 0.48);
  box-shadow:
    inset 0 1px 3px rgba(70, 36, 13, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.48);
}

html[data-palette="wooden"] input::placeholder,
html[data-palette="wooden"] textarea::placeholder {
  color: #89694B;
}
/* Wooden Liquid Glass — Footer Visibility Fix */
html[data-palette="wooden"] footer {
  color: #F8E6CB !important;
  border-top: 1px solid rgba(255, 220, 170, 0.42) !important;
  background: linear-gradient(
    90deg,
    rgba(66, 37, 20, 0.38),
    rgba(130, 87, 49, 0.22),
    rgba(66, 37, 20, 0.38)
  );
}

html[data-palette="wooden"] footer strong {
  color: #FFF0D6 !important;
}

html[data-palette="wooden"] footer span {
  color: #DDB77E !important;
}

html[data-palette="wooden"] footer a {
  color: #F5D5A2 !important;
  text-decoration: none;
}

html[data-palette="wooden"] footer a:hover {
  color: #FFFFFF !important;
  text-decoration: underline;
}

/* Quill editor toolbar */
html[data-palette="wooden"] .ql-toolbar.ql-snow {
  background: rgba(238, 211, 171, 0.78);
  border-color: rgba(164, 104, 52, 0.48);
}

html[data-palette="wooden"] .ql-snow .ql-stroke {
  stroke: #68401F;
}

html[data-palette="wooden"] .ql-snow .ql-fill {
  fill: #68401F;
}

html[data-palette="wooden"] .ql-snow .ql-picker {
  color: #382113;
}

/* Buttons */
html[data-palette="wooden"] button,
html[data-palette="wooden"] .btn {
  border-color: rgba(255, 224, 178, 0.70);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

html[data-palette="wooden"] .btn:not(.ghost),
html[data-palette="wooden"] button.primary {
  color: #FFF5E4;
  background: linear-gradient(
    135deg,
    #A86B35 0%,
    #71401F 48%,
    #9A5D2D 100%
  );
  border-color: rgba(255, 220, 169, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 224, 0.42),
    0 5px 14px rgba(42, 20, 8, 0.22);
}

html[data-palette="wooden"] .btn.ghost {
  color: #4A2B17;
  background: rgba(255, 239, 211, 0.36);
}

html[data-palette="wooden"] button:hover,
html[data-palette="wooden"] .btn:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 7px 18px rgba(30, 14, 5, 0.24);
}

html[data-palette="wooden"] button:active,
html[data-palette="wooden"] .btn:active {
  transform: translateY(1px);
}

/* Research tags: readable text and premium selection state */
html[data-palette="wooden"] .tag-pill {
  color: #432714 !important;
  background: linear-gradient(
    135deg,
    #FFF2D9 0%,
    #E8C99B 100%
  ) !important;
  border: 1px solid #B9854F !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  text-shadow: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 5px rgba(48, 25, 9, 0.12) !important;
}

html[data-palette="wooden"] .tag-pill:hover {
  color: #2E190B !important;
  background: #FFF7E8 !important;
  border-color: #8B5429 !important;
}

html[data-palette="wooden"] .tag-pill.is-selected {
  color: #FFF5E3 !important;
  background: linear-gradient(
    135deg,
    #875126 0%,
    #4B2A15 100%
  ) !important;
  border-color: #F0C783 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 220, 0.25),
    0 3px 9px rgba(40, 18, 5, 0.24) !important;
}

/* Add Next Chart button */
html[data-palette="wooden"] #addChartBtn {
  color: #FFF6E6 !important;
  background: linear-gradient(
    135deg,
    #A96F37 0%,
    #70401F 52%,
    #92572B 100%
  ) !important;
  border: 1px solid #E8C18A !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 224, 0.42),
    0 5px 15px rgba(34, 16, 5, 0.28) !important;
}

html[data-palette="wooden"] #addChartBtn:hover {
  background: linear-gradient(
    135deg,
    #BD8549 0%,
    #80502A 52%,
    #A66A38 100%
  ) !important;
}

/* Keep chart text crisp; chart geometry remains unchanged */
html[data-palette="wooden"] svg text {
  text-rendering: geometricPrecision;
}

html[data-palette="wooden"] .panchang-label {
  color: #765238;
}


/* ==========================================
   WOODEN THEME — DETAILED DASHA HEADER FIX
   ========================================== */

html[data-palette="wooden"] .ddo-header {
  /* Solid warm cream background — no dark wood showing through */
  background: #FFF1D8 !important;
  background-color: #FFF1D8 !important;
  background-image: none !important;

  /* Clear separation from table rows */
  border-bottom: 1px solid #C9A77B !important;
  box-shadow: 0 2px 8px rgba(62, 40, 25, 0.12);

  /* Disable glass blending on the sticky header */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Header labels */
html[data-palette="wooden"] .ddo-header > div {
  color: #382113 !important;
  font-weight: 750 !important;
  text-shadow: none !important;
}


/* ==========================================
   CELESTIAL PASTEL — LIGHT THEME
   ========================================== */
[data-palette="celestial"] {
  color-scheme: light;

  /* Surfaces */
  --paper: #F5F3FB;
  --surface: #FFFFFF;
  --surface-alt: #F0EDF9;

  /* Text */
  --ink: #171B46;
  --muted: #666B91;

  /* Borders */
  --line: #E2DDED;
  --line-strong: #CCC5E3;

  /* Violet accent */
  --saffron: #6040D8;
  --saffron-soft: rgba(96, 64, 216, 0.10);
  --indigo-soft: rgba(139, 115, 235, 0.13);
  --al: #6554C0;

  /* Status colors */
  --good: #25866B;
  --good-soft: rgba(37, 134, 107, 0.11);
  --bad: #C64F62;
  --bad-soft: rgba(198, 79, 98, 0.10);
  --amber: #B76B32;
  --amber-soft: rgba(241, 124, 114, 0.14);

  /* Chart and popup surfaces */
  --brand-bg: rgba(255, 255, 255, 0.92);
  --chart-bg: #FFFFFF;
  --chart-lagna-bg: #F0E8FB;
  --chart-line: #D8CDEB;
  --pop-bg: #FFFFFF;

  /* Additional Celestial colors */
  --celestial-violet: #6040D8;
  --celestial-purple: #9360CF;
  --celestial-coral: #F17C72;
  --celestial-peach: #FBE5D9;
  --celestial-lavender: #E7E8FA;
  --celestial-mint: #D9F2E7;
}

/* Atmospheric background */
html[data-palette="celestial"] body {
  background:
    radial-gradient(
      ellipse at 8% 0%,
      rgba(155, 175, 248, 0.13),
      transparent 36%
    ),
    radial-gradient(
      ellipse at 95% 12%,
      rgba(241, 124, 114, 0.10),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #F5F3FB 0%,
      #FFFAF5 55%,
      #F9F1FA 100%
    );
}

/* Violet gradient for ordinary primary buttons */
[data-palette="celestial"] .btn:not(.ghost) {
  background: linear-gradient(
    110deg,
    #6040D8,
    #9360CF
  );
  color: #FFFFFF;
  border-color: transparent;
}

/* Violet active navigation */
[data-palette="celestial"]
.tabs button[aria-selected="true"] {
  background: linear-gradient(
    110deg,
    #6040D8,
    #9360CF
  );
  color: #FFFFFF;
  border-color: transparent;
}

/* Gradient across every Panchang card */
[data-palette="celestial"] .panchang-item,
[data-palette="celestial"] .panchang-item.highlight {
  background: linear-gradient(
    135deg,
    #F0E8FB 0%,
    #FFF3ED 55%,
    #FFF8F2 100%
  ) !important;
  border-color: #D9C8ED !important;
}

[data-palette="celestial"] .panchang-item .panchang-value {
  color: #6040D8 !important;
}


/* Inline Floating Error Popup */
.inline-error-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  opacity: 0.95;
  border: 1px solid var(--bad);
  color: var(--ink);
  padding: 8px 28px 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 50;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.inline-error-popup .close-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: var(--bad);
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 5px;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 0.95; transform: translateY(0); } }

/* Research Form Extended Fields */
.coords-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  background: var(--surface-alt);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
}
.coords-row .field input {
  font-family: var(--font-data);
  font-size: 0.85rem;
}
.tag-desc-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 12px;
}
.tag-desc-row select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  width: 100%;
}

.panchang-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}


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

.time-travel-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


.step-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 2px 4px;
}

.group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 4px;
}

.btn-step {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-step:hover {
  background: var(--saffron-soft);
  border-color: var(--line-strong);
  color: var(--saffron);
}



.btn-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 26px;
  padding: 0 12px;
  background: var(--surface-alt);
  color: var(--al);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--indigo-soft);
  transition: all 0.2s ease;
}

.btn-now:hover {
  background: var(--indigo-soft);
  border-color: var(--al);
  color: var(--al);
  box-shadow: 0 0 10px var(--indigo-soft);
}

.btn-now:active {
  transform: scale(0.96);
}


/* Sync Badge Variants */
.badge-synced {
  background: #d4edda;
  color: #155724;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-stepped {
  background: #fff3cd;
  color: #856404;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Live Ephemeris & Panchang Card */
.panchang-card {
  background: var(--surface-alt);
  max-width: 1140px;
  border: 1px solid var(--line-strong);
  align-items: center;
  border-radius: 14px;
  padding: 20px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.panchang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.panchang-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
  align-items: center;
  gap: 8px;
}
.live-badge {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.location-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.location-selector input {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
}

/* Grid Layout for Attributes */
.panchang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Panchang Collapse / Expand — Smooth Transition */
.panchang-body-wrapper {
  max-height: 600px;
  overflow: hidden;
  opacity: 1;

  transition:
    max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.30s ease;
}

.panchang-body-wrapper.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Smooth outer card transition */
.panchang-card {
  transition:
    margin-bottom 0.4s ease,
    padding 0.4s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* Collapsed state */
.panchang-card:has(.panchang-body-wrapper.collapsed) {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}


/* Panchang Cards — Theme Adaptive */
.panchang-item {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  outline: none !important;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}


.panchang-item.highlight {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  outline: none !important;
}


.panchang-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted) !important;
  font-weight: 600;
}

.panchang-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink) !important;
}

.panchang-sub {
  font-size: 0.72rem;
  color: var(--muted) !important;
}

/* Fix Panchang-to-Form spacing when collapsed */
.panchang-card:has(.panchang-body-wrapper.collapsed) {
  margin-bottom: 8px !important;
}

.panchang-card:has(.panchang-body-wrapper.collapsed) + main.wrap >  {
  margin-top: 0 !important;
}

/* Header Display Above Generated Research Chart */
.rc-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rc-tag-badge {
  background: var(--saffron-soft);
  color: var(--saffron);
  border: 1px solid var(--saffron);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rc-desc-note {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  max-width: 50ch;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Bottom Right Palette Chooser */
.palette-chooser {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.palette-chooser select {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  outline: none;
}

/* Vimshottari Timeline Scale Styling */

.tl {
  position: relative;
  margin-top: 6px;
}

.tl-bar {
  display: flex;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.tl-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #020617;
  overflow: hidden;
  white-space: nowrap;
  border-right: 1px solid rgba(2,6,23,.4);
  min-width: 0;
  cursor: pointer;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  padding: 0;
}

.tl-seg:last-child {
  border-right: 0;
}

.tl-now {
  position: absolute;
  top: -6px;
  bottom: 16px;
  width: 2px;
  background: var(--saffron);
}

.tl-now::after {
  content: "Today";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  color: var(--saffron);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tl-ticks {
  position: relative;
  height: 18px;
  font-size: .7rem;
  color: var(--muted);
  font-family: var(--font-data);
}

.tl-ticks span {
  position: absolute;
  transform: translateX(-50%);
  top: 2px;
  white-space: nowrap;
}
/* ===== Jupiter Astrology: Theme-Synced Quill Editor ===== */

.desc-editor,
.desc-editor .ql-editor,
.desc-format-toggle,
.desc-toolbar {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
}

/* Format text button */
.desc-format-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 8px 0;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.desc-format-toggle:hover {
  border-color: var(--saffron);
  background: var(--saffron-soft);
}

.desc-toggle-arrow {
  margin-left: 6px;
  transition: transform 0.2s ease;
}

/* Hide formatting toolbar until requested */
.desc-toolbar.is-hidden {
  display: none !important;
}

/* Toolbar: appear beside Format text when expanded */
.desc-toolbar.ql-toolbar.ql-snow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-alt);
  box-sizing: border-box;
  vertical-align: middle;
}

.desc-toolbar.ql-toolbar.ql-snow button {
  border-radius: 6px;
}

.desc-toolbar.ql-toolbar.ql-snow button:hover {
  background: var(--saffron-soft);
}

/* Editor box: full width with a visible border */
.desc-editor.ql-container.ql-snow {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100px;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  font-size: 15px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Writing area: 100 px minimum, 200 px maximum */
.desc-editor .ql-editor {
  height: auto;
  min-height: 100px;
  max-height: 200px;
  padding: 12px 16px;
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.desc-editor .ql-editor::-webkit-scrollbar {
  width: 6px;
}

.desc-editor .ql-editor::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 10px;
}

.desc-editor .ql-editor::-webkit-scrollbar-track {
  background: transparent;
}

/* Placeholder */
.desc-editor .ql-editor.ql-blank::before {
  left: 16px;
  right: 16px;
  color: var(--muted);
  font-style: italic;
}

/* Subtle focus shadow without an extra outline */
.desc-editor.ql-container.ql-snow:focus-within {
  border: 1px solid var(--line-strong) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  outline: none;
}

/* Toolbar icons follow the selected theme */
.desc-toolbar.ql-toolbar.ql-snow .ql-stroke {
  stroke: var(--ink);
}

.desc-toolbar.ql-toolbar.ql-snow .ql-fill {
  fill: var(--ink);
}

.desc-toolbar.ql-toolbar.ql-snow .ql-picker {
  color: var(--ink);
}

.desc-toolbar.ql-toolbar.ql-snow .ql-picker-options {
  background: var(--surface);
  border-color: var(--line);
}

.desc-toolbar.ql-toolbar.ql-snow .ql-picker-item {
  color: var(--ink);
}

.desc-toolbar.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: var(--saffron);
}

.desc-toolbar.ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: var(--saffron);
}

/* Collapsible Research Form Styling */
.collapse-toggle-bar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-alt);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}
.collapse-toggle-bar:hover {
  background: var(--saffron-soft);
  color: var(--saffron);
}
.collapsible-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}
.collapsible-fields.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: none;
}
.arrow-icon {
  transition: transform 0.3s ease;
}
.collapsible-fields.collapsed + .collapse-toggle-bar .arrow-icon,
.collapse-toggle-bar.collapsed .arrow-icon {
  transform: rotate(-90deg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--paper); color: var(--ink); margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.5; transition: background-color 0.2s ease, color 0.2s ease; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
a { color: var(--saffron); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
h1, h2, h3 { 
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif; 
  font-weight: 700; 
}
.brand { background: var(--surface); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100000; }.brand .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 7px; }
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.3;
}

.logo-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.5px;
}

.logo-sub {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-toggle-btn:hover { border-color: var(--saffron); color: var(--saffron); }

.panel {
  position: relative;
  z-index: 2;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
}
form { display: grid; grid-template-columns: 1.3fr 1fr 1fr 2fr auto; gap: 14px; align-items: end; }
.field { display: grid; gap: 5px; min-width: 0; position: relative; }
label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
input { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus-visible { border-color: var(--saffron); }
.btn { font-weight: 600; background: linear-gradient(to right, #d97706, #ea580c); color: #fff; border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer; white-space: nowrap; transition: opacity .15s; }
.btn:hover { opacity: 0.92; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); padding: 6px 14px; }
.btn.ghost:hover { border-color: var(--saffron); color: var(--saffron); }

.sugg {
  position: absolute;
  opacity: 1 !important;
  top: 100%;
  left: 0;
  min-width: 340px;
  width: max-content;
  max-width: min(500px, 85vw);
  z-index: 9999;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  var(--surface);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

.sugg li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  box-sizing: border-box;
}

.sugg li small {
  color: var(--muted);
}

.sugg li[aria-selected="true"],
.sugg li:hover {
  background: var(--surface);
}

.sugg li.none {
  color: var(--muted);
  cursor: default;
}

.dash-head { border-bottom: 1px solid var(--line-strong); padding-bottom: 12px; margin-top: 14px; }
.who { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.who h2 { font-size: 1.45rem; margin: 0; }
.who p { margin: 0; color: var(--muted); font-size: .88rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: baseline; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; font-size: .82rem; }
.chip span { color: var(--saffron); font-size: .7rem; text-transform: uppercase; font-weight: 600; }
.chip.alert { background: var(--bad-soft); border-color: var(--bad); }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; scrollbar-width: none; }
.tabs button { border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted); padding: 5px 12px; font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--saffron); color: #fff; border-color: var(--saffron); }

.tabpanel { padding-top: 18px; display: grid; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.card > header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.card h3 { font-size: 1.05rem; margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.two + .three { margin-top: 24px; }
.kchart { position: relative; }
.kchart svg { display: block; width: 100%; height: auto; max-width: 440px; margin: 0 auto; border-radius: 8px; }
.kchart svg text { font-family: var(--font-body); }
.kchart svg [data-p] { cursor: pointer; }

/* Subtle divider above Planetary Table */
[id$="-overviewPlanetTable"] .scroll {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
  margin-top: 8px;
}

/* Zodiac Sign Hover Information Card */
.zodiac-hover-card {
  position: fixed;
  z-index: 10000;
  width: 260px;
  max-width: calc(100vw - 24px);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface) 0%, transparent);
  color: var(--ink);
  border: 1px solid rgba(212, 160, 74, 0.25);
  border-left: 2px solid rgba(212, 160, 74, 0.45);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}

.zodiac-hover-card[hidden] {
  display: none !important;
}

.zodiac-hover-card .zh-title {
  margin: 0 0 2px;
  color: var(--saffron);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.zodiac-hover-card .zh-subtitle {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.zodiac-hover-card .zh-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 7px;
  padding: 3px 0;
  border-top: 1px solid var(--line);
}

.zodiac-hover-card .zh-label {
  color: var(--muted);
  font-weight: 600;
}

.zodiac-hover-card .zh-value {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.aspect-note { font-size: .82rem; color: var(--muted); text-align: center; min-height: 2em; margin-top: 6px; }
.aspect-note b { color: var(--al); }

.asp-pop { position: absolute; z-index: 50; width: max-content; max-width: min(280px, calc(100% - 16px)); background: var(--pop-bg); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 9px 12px; font-size: .82rem; line-height: 1.4; pointer-events: none; color: var(--ink); }
.asp-pop h4 { margin: 0 0 4px; font-size: .9rem; }
.asp-pop p { margin: 2px 0 0; }
.asp-pop .out { color: var(--al); font-weight: 600; }
.asp-pop .in { color: var(--saffron); font-weight: 600; }
.asp-pop .none { color: var(--muted); }

dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: .9rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 7px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.num, th.num { font-family: var(--font-data); font-size: .84rem; }
td.num.c, th.num.c { text-align: center; }
.sub { color: var(--muted); font-size: .8rem; }
tr.lagna td, tr.now td { background: var(--saffron-soft); }
.pname { font-weight: 600; }
.retro { font-size: .68rem; color: var(--saffron); border: 1px solid currentColor; border-radius: 4px; padding: 0 3px; margin-left: 4px; }
.dig { font-size: .75rem; border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.dig.ex { background: var(--good-soft); color: var(--good); }
.dig.own { background: var(--indigo-soft); color: var(--ink); }
.dig.deb { background: var(--bad-soft); color: var(--bad); }
.dig.comb { background: var(--amber-soft); color: var(--amber); }

.vfeature { display: grid; grid-template-columns: 0.7fr 1.1fr; gap: 5px; align-items: start; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; text-align: left; color: var(--ink); display: grid; gap: 3px; }
.vcard:hover, .vcard[aria-pressed="true"] { border-color: var(--saffron); box-shadow: 0 0 0 1px var(--saffron); }
.vcard b { font-size: .85rem; }
.vcard small { color: var(--muted); font-size: .72rem; }

.chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chain div { padding: 8px 10px; display: grid; gap: 1px; }
.chain div + div { border-left: 1px solid var(--line); }
.chain span { font-size: .65rem; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.chain b { font-size: .95rem; }
.chain i { font-style: normal; font-family: var(--font-data); font-size: .72rem; color: var(--muted); }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: .84rem; margin-bottom: 8px; flex-wrap: wrap; }
.crumbs button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 2px 10px; cursor: pointer; color: var(--ink); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--indigo-soft); }

.verdict { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; border: 1px solid currentColor; }
.verdict.strong { background: var(--good-soft); color: var(--good); }
.verdict.moderate { background: var(--amber-soft); color: var(--amber); }
.verdict.weak { background: var(--bad-soft); color: var(--bad); }
.lp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lp-card { display: grid; gap: 5px; }
.meter { height: 7px; background: var(--paper); border-radius: 999px; overflow: hidden; border: 1px solid var(--line-strong); }
.meter i { display: block; height: 100%; border-radius: 999px; }
.meter i.strong { background: var(--good); } .meter i.moderate { background: var(--amber); } .meter i.weak { background: var(--bad); }
details summary { cursor: pointer; font-size: .8rem; color: var(--saffron); font-weight: 600; }
.factors { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: .8rem; }
.factors li { display: grid; grid-template-columns: 3em 1fr; gap: 4px; }
.pts.p { color: var(--good); } .pts.n { color: var(--bad); }
.yl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.status { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; }
.status.good { background: var(--good-soft); color: var(--good); }
.status.bad { background: var(--bad-soft); color: var(--bad); }

.research-chart { margin-top: 24px; padding: 20px; background: var(--surface); border: 1px solid var(--saffron); border-radius: var(--radius); }
.remove-chart { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-weight: 600; font-size: .8rem; }
.remove-chart:hover { background: var(--bad); color: #fff; }

/* Prashna Kundali: match the Research Kundali frame */
#mainChartResult {
  margin-top: 20px;
  padding: 8px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--saffron);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

@media (max-width: 980px) {
  .two, .three, .vfeature, .lp-grid {
    grid-template-columns: 1fr;
  }

  form {
    grid-template-columns: 1fr 1fr;
  }

  form .field.namef,
  form .field.place {
    position: relative;
    grid-column: 1 / -1;
  }

  form .btn {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
  }
}
  @media (max-width: 768px) {
  form {
    grid-template-columns: 1fr !important;
  }
  .panchang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .wrap {
    padding-inline: 12px;
  }
  .research-chart {
    padding: 14px;
  }
}
  
/* SAV Square iPhone-Style Toggle Button */
.sav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.2s ease;
  user-select: none;
}
.sav-toggle-btn:hover {
  opacity: 0.8;
  border-color: #3b82f6;
}
.sav-toggle-btn.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
/* 'D' Degree Toggle Button with thin dark border */
.deg-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #111111; /* Clear thin black/dark border */
  background: var(--surface-alt);
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.2s ease;
  user-select: none;
}
.deg-toggle-btn:hover {
  opacity: 0.85;
  border-color: #3b82f6;
}
.deg-toggle-btn.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.18);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
/* Lal Kitab / Varshphal navigation button */
.tabs button.lal-kitab-varshphal-btn,
.tabs button.lal-kitab-varshphal-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border: 1px solid #dc2626;
  border-radius: 999px;
  background: transparent;
  color: #dc2626 !important;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700 !important;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

/* Hover or Active/Open State: solid crimson red with white bold text */
.tabs button.lal-kitab-varshphal-btn:hover,
.tabs button.lal-kitab-varshphal-btn[aria-selected="true"] {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Keyboard focus */
.tabs button.lal-kitab-varshphal-btn:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
}

/* Remove unwanted horizontal lines when the Quill editor is focused */
.field:has(.desc-editor:focus-within) {
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Keep the editor border rounded, with only a subtle focus shadow */
.desc-editor.ql-container.ql-snow:focus-within {
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  outline: none !important;
}

/* Prevent the writing area from adding its own outline */
.desc-editor .ql-editor:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Quill 20-Font Dropdown Styles */
.ql-snow .ql-picker.ql-font {
  width: 140px;
}
.ql-snow .ql-picker.ql-font .ql-picker-options {
  max-height: 250px;
  overflow-y: auto;
}

/* --- Clean Modern Sans-Serif --- */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="roboto"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="roboto"]::before { content: 'Roboto'; font-family: 'Roboto', sans-serif; }
.ql-font-roboto { font-family: 'Roboto', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="inter"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="inter"]::before { content: 'Inter'; font-family: 'Inter', sans-serif; }
.ql-font-inter { font-family: 'Inter', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="poppins"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="poppins"]::before { content: 'Poppins'; font-family: 'Poppins', sans-serif; }
.ql-font-poppins { font-family: 'Poppins', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="montserrat"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="montserrat"]::before { content: 'Montserrat'; font-family: 'Montserrat', sans-serif; }
.ql-font-montserrat { font-family: 'Montserrat', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="outfit"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="outfit"]::before { content: 'Outfit'; font-family: 'Outfit', sans-serif; }
.ql-font-outfit { font-family: 'Outfit', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="nunito"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="nunito"]::before { content: 'Nunito'; font-family: 'Nunito', sans-serif; }
.ql-font-nunito { font-family: 'Nunito', sans-serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="comfortaa"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="comfortaa"]::before { content: 'Comfortaa'; font-family: 'Comfortaa', cursive; }
.ql-font-comfortaa { font-family: 'Comfortaa', cursive !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="quicksand"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="quicksand"]::before { content: 'Quicksand'; font-family: 'Quicksand', sans-serif; }
.ql-font-quicksand { font-family: 'Quicksand', sans-serif !important; }

/* --- Elegant Serifs --- */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="playfair"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="playfair"]::before { content: 'Playfair Display'; font-family: 'Playfair Display', serif; }
.ql-font-playfair { font-family: 'Playfair Display', serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="merriweather"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="merriweather"]::before { content: 'Merriweather'; font-family: 'Merriweather', serif; }
.ql-font-merriweather { font-family: 'Merriweather', serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="lora"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="lora"]::before { content: 'Lora'; font-family: 'Lora', serif; }
.ql-font-lora { font-family: 'Lora', serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="cormorant"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="cormorant"]::before { content: 'Cormorant'; font-family: 'Cormorant Garamond', serif; }
.ql-font-cormorant { font-family: 'Cormorant Garamond', serif !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="cinzel"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="cinzel"]::before { content: 'Cinzel Classical'; font-family: 'Cinzel', serif; }
.ql-font-cinzel { font-family: 'Cinzel', serif !important; }

/* --- Monospace / Tech --- */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="robotomono"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="robotomono"]::before { content: 'Roboto Mono'; font-family: 'Roboto Mono', monospace; }
.ql-font-robotomono { font-family: 'Roboto Mono', monospace !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="firasource"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="firasource"]::before { content: 'Source Code'; font-family: 'Source Code Pro', monospace; }
.ql-font-firasource { font-family: 'Source Code Pro', monospace !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="inconsolata"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="inconsolata"]::before { content: 'Inconsolata'; font-family: 'Inconsolata', monospace; }
.ql-font-inconsolata { font-family: 'Inconsolata', monospace !important; }

/* --- Handwritten / Calligraphy --- */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="dancing"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="dancing"]::before { content: 'Dancing Script'; font-family: 'Dancing Script', cursive; }
.ql-font-dancing { font-family: 'Dancing Script', cursive !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="pacific"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="pacific"]::before { content: 'Pacifico'; font-family: 'Pacifico', cursive; }
.ql-font-pacific { font-family: 'Pacifico', cursive !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="greatvibes"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="greatvibes"]::before { content: 'Great Vibes'; font-family: 'Great Vibes', cursive; }
.ql-font-greatvibes { font-family: 'Great Vibes', cursive !important; }

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sacramento"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sacramento"]::before { content: 'Sacramento'; font-family: 'Sacramento', cursive; }
.ql-font-sacramento { font-family: 'Sacramento', cursive !important; }

/* Quill text box: minimum 100px, maximum 200px */
.desc-editor.ql-container.ql-snow {
  height: auto !important;
  min-height: 100px !important;
  max-height: 200px !important;
  overflow: hidden !important;
  border-radius: 12px;
  box-sizing: border-box;
}

/* Writing area with vertical scrolling */
.desc-editor .ql-editor {
  height: auto !important;
  min-height: 100px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 12px 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-sizing: border-box;
}

/* Custom history, color pickers, and delete controls */
.desc-toolbar.ql-toolbar.ql-snow .ql-undo,
.desc-toolbar.ql-toolbar.ql-snow .ql-redo,
.desc-toolbar.ql-toolbar.ql-snow .ql-clear-description {
  width: 28px;
  min-width: 28px;
  padding: 0 3px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.desc-toolbar.ql-toolbar.ql-snow .ql-clear-description {
  color: #dc2626;
  font-size: 20px;
}
.desc-toolbar.ql-toolbar.ql-snow .ql-clear-description:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.10);
}
.desc-toolbar.ql-toolbar.ql-snow .ql-color,
.desc-toolbar.ql-toolbar.ql-snow .ql-background {
  max-width: 34px;
}

/* ===== Mobile Overflow Fix: iPhone, Android & Tablets ===== */
@media (max-width: 768px) {

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .research-chart,
  .research-chart form,
  .research-chart .field,
  .research-chart .coords-row,
  .research-chart .tag-desc-row {
    min-width: 0;
    max-width: 100%;
  }

  .research-chart form {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .research-chart .coords-row,
  .research-chart .tag-desc-row {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .research-chart input,
  .research-chart select,
  .research-chart textarea,
  .research-chart .desc-editor,
  .research-chart .desc-toolbar {
    min-width: 0;
    max-width: 100%;
  }

  .research-chart .sugg {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .research-chart .desc-toolbar {
    flex-wrap: wrap;
  }
}

/* FIX: Quill font/list dropdown appearing behind description box */

/* Place the entire toolbar above the editor */
.desc-toolbar.ql-toolbar.ql-snow {
  position: relative;
  z-index: 2;
  overflow: visible !important;
}

/* Raise the active dropdown above the description editor */
.desc-toolbar.ql-toolbar.ql-snow .ql-picker.ql-expanded {
  position: relative;
  z-index: 3;
}

/* Ensure dropdown options remain visible */
.desc-toolbar.ql-toolbar.ql-snow .ql-picker-options {
  position: absolute;
  z-index: 4;
}

/* Keep the description editor below the toolbar */
.desc-editor.ql-container.ql-snow {
  position: relative;
  z-index: 1;
}

/* =========================================
   GLOBAL THEME-ADAPTIVE SCROLLBARS
========================================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--saffron) var(--surface-alt);
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--surface-alt);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb {
  background: var(--saffron);
  border: 2px solid var(--surface-alt);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}

::-webkit-scrollbar-corner {
  background: var(--surface-alt);
}

[id$="-overviewPlanetTable"]:not([hidden]),
[id$="-avContent"]:not([hidden]),
[id$="-apContent"]:not([hidden]) {
  margin-top: 12px;
}

/* ===== YEARLY / MONTHLY CHART DURATION ===== */

.lk-chart-duration {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line-strong);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== YEARLY / MONTHLY CHART CONTROLS ===== */

.lk-chart-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  position: relative;
  z-index: 1;
}

/* Transparent Glass Dropdown */
.lk-period-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 175px;
  height: 40px;
  padding: 0 32px 0 12px;

  background: rgba(255, 255, 255, 0.10) !important;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 9px;

  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;

  position: relative;
  z-index: 0;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Dropdown options */
.lk-period-select option {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

/* Dropdown Hover and Focus */
.lk-period-select:hover {
  border-color: var(--accent);
}

.lk-period-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.12);
}

/* Navigation Buttons */
.lk-nav-btn {
  height: 40px;
  min-width: 90px;
  padding: 0 12px;

  border: 1px solid var(--line-strong);
  border-radius: 9px;

  background: var(--glass-bg, rgba(255, 255, 255, 0.12));
  color: var(--text);

  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;

  position: relative;
  z-index: 0;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition: all 0.2s ease;
}

/* Button Hover */
.lk-nav-btn:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.20));
  border-color: var(--accent);
}

/* Current Year / Month */
.lk-nav-btn.current {
  background: var(--accent-soft, rgba(255, 255, 255, 0.18));
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.10);
}

/* Button Focus */
.lk-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 700px) {
  .lk-chart-controls {
    justify-content: flex-start;
    gap: 7px;
  }

  .lk-period-select {
    width: 100%;
    min-width: 0;
  }

  .lk-nav-btn {
    min-width: 0;
    flex: 1;
    padding: 0 9px;
    font-size: 0.82rem;
  }
}


/* ================= COSMIC GLASS THEME ================= */

[data-palette="cosmic"] {
  color-scheme: dark;

  /* Backgrounds */
  --paper: #05081A;
  --surface: rgba(10, 18, 51, 0.82);
  --surface-alt: rgba(26, 35, 86, 0.72);

  /* Typography */
  --ink: #FFFFFF;
  --muted: #C7C9E8;

  /* Borders */
  --line: rgba(142, 130, 255, 0.22);
  --line-strong: rgba(142, 130, 255, 0.30);

  /* Brand colours */
  --saffron: #C636FF;
  --saffron-soft: rgba(198, 54, 255, 0.16);
  --indigo-soft: rgba(26, 61, 255, 0.18);
  --al: #FF8AE6;

  /* Status colours */
  --good: #69E6C1;
  --good-soft: rgba(105, 230, 193, 0.13);
  --bad: #FF729B;
  --bad-soft: rgba(255, 114, 155, 0.14);
  --amber: #FFC66D;
  --amber-soft: rgba(255, 198, 109, 0.14);

  /* Chart colours */
  --brand-bg: rgba(10, 18, 51, 0.72);
  --chart-bg: #0B1740;
  --chart-lagna-bg: url(#cosmicLagnaGradient);
  --chart-line: rgba(142, 130, 255, 0.42);
  --pop-bg: rgba(5, 8, 26, 0.96);

  /* Cosmic effects */
  --cosmic-glass: rgba(10, 18, 51, 0.72);
  --cosmic-border: rgba(142, 130, 255, 0.30);
  --cosmic-gradient: linear-gradient(
    110deg,
    #1A3DFF 0%,
    #7A25FF 45%,
    #FF3EDB 100%
  );
}

/* Background */
html[data-palette="cosmic"] body {
  color: var(--ink);
  background-color: #05081A;
  background-image:
    radial-gradient(ellipse at 12% 4%, rgba(26, 61, 255, 0.24), transparent 38%),
    radial-gradient(ellipse at 88% 12%, rgba(255, 62, 219, 0.17), transparent 34%),
    radial-gradient(ellipse at 52% 100%, rgba(122, 37, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #05081A 0%, #0A1233 55%, #05081A 100%);
}

/* Glass surfaces */
html[data-palette="cosmic"] ,
html[data-palette="cosmic"] .card,
html[data-palette="cosmic"] article.card,
html[data-palette="cosmic"] .panchang-card,
html[data-palette="cosmic"] .panchang-item,
html[data-palette="cosmic"] .chip,
html[data-palette="cosmic"] .sugg,
html[data-palette="cosmic"] .zodiac-hover-card,
html[data-palette="cosmic"] .inline-error-popup,
html[data-palette="cosmic"] .desc-editor,
html[data-palette="cosmic"] .desc-toolbar {
  background:
    linear-gradient(
      135deg,
      rgba(26, 61, 255, 0.16),
      rgba(122, 37, 255, 0.15),
      rgba(255, 62, 219, 0.09)
    ),
    rgba(10, 18, 51, 0.72) !important;

  color: var(--ink);
  border-color: var(--cosmic-border) !important;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 8px 32px rgba(0, 0, 30, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Panchang gradient */
html[data-palette="cosmic"] .panchang-item,
html[data-palette="cosmic"] .panchang-item.highlight {
  background: linear-gradient(
    135deg,
    rgba(26, 61, 255, 0.28),
    rgba(122, 37, 255, 0.24),
    rgba(255, 62, 219, 0.16)
  ) !important;

  border-color: rgba(142, 130, 255, 0.38) !important;
}

html[data-palette="cosmic"] .panchang-label {
  color: #C7C9E8 !important;
}

html[data-palette="cosmic"] .panchang-value {
  color: #FFFFFF !important;
}

html[data-palette="cosmic"] .panchang-sub {
  color: #929BC4 !important;
}

/* Buttons and active tabs */
html[data-palette="cosmic"] .btn:not(.ghost),
html[data-palette="cosmic"] .tabs button[aria-selected="true"],
html[data-palette="cosmic"] button.primary {
  background: var(--cosmic-gradient);
  color: #FFFFFF;
  border-color: transparent;

  box-shadow:
    0 0 15px rgba(122, 37, 255, 0.30),
    0 0 35px rgba(255, 62, 219, 0.12);
}

/* Form elements */
html[data-palette="cosmic"] input,
html[data-palette="cosmic"] select,
html[data-palette="cosmic"] textarea,
html[data-palette="cosmic"] .ql-container.ql-snow {
  background: rgba(5, 8, 26, 0.62) !important;
  color: #FFFFFF !important;
  border-color: rgba(142, 130, 255, 0.34) !important;
}

html[data-palette="cosmic"] input::placeholder,
html[data-palette="cosmic"] textarea::placeholder {
  color: #929BC4 !important;
}

/* Palette selector */
html[data-palette="cosmic"] .palette-chooser select {
  background: rgba(10, 18, 51, 0.82);
  color: #FFFFFF;
  border-color: rgba(142, 130, 255, 0.42);
}

/* Footer and SVG */
html[data-palette="cosmic"] footer {
  color: #C7C9E8;
}

html[data-palette="cosmic"] svg text {
  paint-order: stroke;
}

/* Reusable glass and glow classes */
html[data-palette="cosmic"] .cosmic-glass {
  background: rgba(10, 18, 51, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(142, 130, 255, 0.30);
  border-radius: 18px;
  box-shadow:
    0 8px 32px rgba(0, 0, 30, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-palette="cosmic"] .cosmic-glow {
  box-shadow:
    0 0 15px rgba(122, 37, 255, 0.30),
    0 0 35px rgba(255, 62, 219, 0.12);
}

/* ================= END COSMIC GLASS THEME ================= */

/* Square iPhone-Style Panchang Toggle Button (matching 'D' button) */
.header-panchang-btn.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Custom Divisional Chart Dropdown */
.chart-dd {
  position: relative;
  min-width: 190px;
  z-index: 100;
}

.chart-dd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.chart-dd-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(340px, 85vw);
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 12px 28px rgba(0,0,0,.30);
  z-index: 100;
}

.chart-dd-menu[hidden] {
  display: none;
}

.chart-dd-group {
  padding: 9px 12px 6px;
  color: var(--saffron);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.chart-dd-option {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  white-space: nowrap;
  cursor: pointer;
}

.chart-dd-option:hover,
.chart-dd-option.selected {
  background: var(--indigo-soft);
}

/* ==========================================
   JUPITER ASTRO — PREMIUM HEADER ICON TOOLBAR
========================================== */

.header-quick-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Common icon button */
.header-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;

  background: transparent;
  color: var(--muted);

  opacity: 0.88;
  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Consistent icon dimensions */
.header-icon-btn svg {
  width: 20px;
  height: 20px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Information icon */
#analysisGuideOpen span {
  font-size: 20px !important;
  font-weight: 650 !important;
  line-height: 1;
}

/* Hover effect */
.header-icon-btn:hover {
  opacity: 1;
  color: var(--saffron);
  background: var(--saffron-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

/* Keyboard accessibility */
.header-icon-btn:focus-visible,
.header-panchang-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

/* Account button — logged-in state */
.header-icon-btn.is-logged-in {
  opacity: 1;
  color: var(--saffron);
  background: var(--saffron-soft);
  border: 1px solid var(--saffron);
  border-radius: 11px;

  box-shadow:
    0 3px 12px var(--saffron-soft),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

.header-icon-btn.is-logged-in svg {
  stroke: currentColor;
}

.header-icon-btn .account-user-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  user-select: none;
}

.header-icon-btn.is-logged-in:hover {
  opacity: 1;
  color: var(--saffron);
  background: var(--saffron-soft);
  border-color: var(--saffron);
  transform: translateY(-1px);
}

/* Panchang collapse button */
.header-panchang-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;

  background: var(--surface-alt);
  color: var(--muted);

  font-family: inherit;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;

  cursor: pointer;
  transition: all 0.2s ease;
}

.header-panchang-btn:hover {
  color: var(--saffron);
  background: var(--saffron-soft);
  border-color: var(--saffron);
}

/* Mobile header spacing */
@media (max-width: 600px) {
  .header-quick-icons {
    gap: 4px;
  }

  .header-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .header-panchang-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
}

	

/* ============================================
   JUPITER AI — THEME-ADAPTIVE LIQUID GLASS
============================================ */

/* 1. THEME VARIABLES */

#jupiter-ai-widget {
  --ai-accent: var(--saffron);
  --ai-accent-dark: var(--al);
  --ai-accent-text: #ffffff;
  --ai-text: var(--ink);
  --ai-border: var(--line);
  --ai-surface: var(--surface);
  --ai-bg: var(--paper);

  position: fixed !important;
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
  z-index: 99999 !important;
  font-family: inherit;
  color: var(--ai-text);
}

/* ============================================
   2. FLOATING ICON
============================================ */

#jupiter-ai-toggle {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--ai-border);
  border-radius: 80%;
  background: color-mix(in srgb, var(--ai-accent) 85%, transparent);
  color: var(--ai-accent-text);

  font-size: 23px;
  cursor: pointer;

  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 4px 14px rgba(0,0,0,.14);

  transition: transform .22s ease, box-shadow .22s ease;
}

#jupiter-ai-toggle:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 7px 20px rgba(0,0,0,.20);
}

#jupiter-ai-toggle:active {
  transform: scale(.94);
}

#jupiter-ai-toggle .ai-icon {
  font-size: 23px;
  line-height: 1;
}

/* Hover label */

#jupiter-ai-toggle::after {
  content: "Assistant";
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);

  padding: 6px 11px;
  border-radius: 9px;

  background: var(--ai-accent-dark);
  color: var(--ai-accent-text);

  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}

#jupiter-ai-toggle:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   3. CHAT WINDOW
============================================ */

#jupiter-ai-window {
  position: absolute;
  left: 0 !important;
  right: auto !important;
  bottom: 60px;

  width: 420px;
  max-width: calc(100vw - 36px);

  height: 920px;
  max-height: min(75dvh, 966px);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: color-mix(in srgb, var(--ai-surface) 38%, transparent);
  color: var(--ai-text);

  border: 1px solid var(--ai-border);
  border-radius: 24px;

  box-shadow:
    0 10px 30px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.45);

  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);

  opacity: 0;
  visibility: hidden;

  transform: translateY(12px) scale(.97);
  transform-origin: bottom left;

  transition:
    opacity .22s ease,
    transform .22s ease,
    visibility .22s;
}

#jupiter-ai-window.ai-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ============================================
   4. HEADER
============================================ */

#jupiter-ai-header {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 0;
  padding: 12px 18px;

  background: color-mix(in srgb, var(--ai-accent) 88%, transparent);
  color: var(--ai-accent-text);

  border-bottom: 1px solid var(--ai-border);
  border-radius: 22px 22px 0 0;

  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);

  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

#jupiter-ai-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,.13),
    transparent 48%,
    rgba(255,255,255,.035)
  );
}

#jupiter-ai-title {
  display: flex;
  align-items: center;
  gap: 9px;

  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 650;
}

#jupiter-ai-title span {
  font-size: 21px;
}

#jupiter-ai-close {
  width: 32px;
  height: 32px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;
  background: transparent;

  color: var(--ai-accent-text);
  font-size: 23px;
  cursor: pointer;

  opacity: .85;
  transition: opacity .2s ease, background .2s ease;
}

#jupiter-ai-close:hover {
  opacity: 1;
  background: rgba(255,255,255,.16);
}

/* ============================================
   5. MESSAGE AREA
============================================ */

#jupiter-ai-messages {
  flex: 1;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 12px;
  background: color-mix(in srgb, var(--ai-bg) 25%, transparent);

  scrollbar-width: thin;
  scrollbar-color: var(--ai-border) transparent;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

#jupiter-ai-messages::-webkit-scrollbar {
  width: 7px;
}

#jupiter-ai-messages::-webkit-scrollbar-track {
  background: transparent;
}

#jupiter-ai-messages::-webkit-scrollbar-thumb {
  background: var(--ai-border);
  border-radius: 10px;
}

/* Message bubbles — compact liquid glass */

.jupiter-ai-message {
  position: relative;
  width: fit-content;
  max-width: 88%;
  box-sizing: border-box;

  padding: 9px 11px;
  margin-bottom: 8px;

  border: 1px solid var(--ai-border);
  border-radius: 15px;

  font-size: 12.5px;
  line-height: 1.45;

  overflow-wrap: anywhere;

  backdrop-filter: blur(14px) saturate(155%);
  -webkit-backdrop-filter: blur(14px) saturate(155%);
}

/* AI response — theme-aware translucent glass */

.jupiter-ai-message.ai {
  background: color-mix(in srgb, var(--surface-alt) 86%, transparent);
  color: var(--ai-text);

  border-color: color-mix(in srgb, var(--ai-border) 55%, transparent);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.62),
    0 3px 12px rgba(0,0,0,.045);
}

/* Subtle inner glass reflection */

.jupiter-ai-message.ai::before,
.jupiter-ai-message.user::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* Keep message content above the reflection */

.jupiter-ai-message.ai > *,
.jupiter-ai-message.user > * {
  position: relative;
}

/* User question — saffron glass */

.jupiter-ai-message.user {
  margin-left: auto;

  background: color-mix(in srgb, var(--ai-accent) 88%, transparent);
  color: var(--ai-accent-text);

  border-color: rgba(255,255,255,.32);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 3px 12px rgba(0,0,0,.08);

  white-space: pre-wrap;
}

/* AI Markdown typography — compact spacing */

.jupiter-ai-message.ai p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.jupiter-ai-message.ai p:last-child {
  margin-bottom: 0;
}

.jupiter-ai-message.ai h1,
.jupiter-ai-message.ai h2,
.jupiter-ai-message.ai h3,
.jupiter-ai-message.ai h4 {
  margin: 8px 0 6px;
  line-height: 1.3;
  color: var(--ai-text);
}

.jupiter-ai-message.ai h1:first-child,
.jupiter-ai-message.ai h2:first-child,
.jupiter-ai-message.ai h3:first-child,
.jupiter-ai-message.ai h4:first-child {
  margin-top: 0;
}

.jupiter-ai-message.ai ul,
.jupiter-ai-message.ai ol {
  margin: 5px 0 8px;
  padding-left: 20px;
}

.jupiter-ai-message.ai li {
  margin: 0 0 7px;
  padding-left: 2px;
  line-height: 1.45;
}

.jupiter-ai-message.ai li:last-child {
  margin-bottom: 0;
}

.jupiter-ai-message.ai li p {
  margin-bottom: 4px;
}

.jupiter-ai-message.ai li ul,
.jupiter-ai-message.ai li ol {
  margin: 4px 0;
}

.jupiter-ai-message.ai ul:last-child,
.jupiter-ai-message.ai ol:last-child {
  margin-bottom: 0;
}

/* ============================================
   6. INPUT AREA
============================================ */

#jupiter-ai-input-area {
  flex-shrink: 0;

  padding: 12px 16px;

  border-top: 1px solid var(--ai-border);
  border-radius: 0 0 22px 22px;

  background: color-mix(in srgb, var(--ai-surface) 85%, transparent);
}

#jupiter-ai-input {
  display: block;
  width: 100%;
  box-sizing: border-box;

  min-height: 45px;
  max-height: 90px;

  padding: 10px 55px 42px 11px;
  resize: vertical;

  border: 1px solid var(--line-strong);
  border-radius: 12px;

  outline: none;
  outline-offset: 2px;

  background: var(--ai-surface);
  color: var(--ai-text);

  font: inherit;
  font-size: 13px;
}

#jupiter-ai-input:focus {
  border-color: var(--ai-accent);
  box-shadow: 0 0 0 3px var(--saffron-soft);
}

#jupiter-ai-input::placeholder {
  color: var(--muted);
}

/* ============================================
   7. SEND ROW AND ARROW BUTTON
============================================ */

#jupiter-ai-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  margin-top: 9px;
}

#jupiter-ai-status {
  display: none !important;
}

#jupiter-ai-send {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;

  display: grid;
  place-items: center;

  border: 1px solid var(--ai-border);
  border-radius: 50% !important;

  background: color-mix(in srgb, var(--ai-accent) 88%, transparent);
  color: var(--ai-accent-text);

  font-size: 0 !important;
  cursor: pointer;

  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 4px 14px rgba(0,0,0,.14);

  transition:
    opacity .2s ease,
    transform .2s ease,
    filter .2s ease;
}

#jupiter-ai-send svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

#jupiter-ai-send:hover {
  filter: brightness(1.12) saturate(1.12);
}

#jupiter-ai-send:disabled {
  opacity: .99;
  pointer-events: none;
  transform: scale(.96);
  cursor: wait;
}

/* ============================================
   8. MONOCHROME PALETTE
============================================ */

[data-palette="mono"] #jupiter-ai-widget {
  --ai-accent-text: #000000;
}

/* ============================================
   9. MOBILE — FULL SCREEN
============================================ */

@media (max-width: 600px) {

  #jupiter-ai-widget {
    left: 12px !important;
    bottom: 12px !important;
  }

  #jupiter-ai-window {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    max-width: 100vw !important;

    height: 100dvh !important;
    max-height: 100dvh !important;

    border-radius: 0 !important;
    transform: translateY(8px);
    transform-origin: center;
  }

  #jupiter-ai-window.ai-open {
    transform: translateY(0);
  }

  #jupiter-ai-header {
    min-height: 56px;
    padding: 10px 15px;
    padding-top: max(10px, env(safe-area-inset-top));
    border-radius: 0;
  }

  #jupiter-ai-close {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }

  #jupiter-ai-messages {
    padding: 14px;
  }

  #jupiter-ai-input-area {
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-radius: 0;
  }

  #jupiter-ai-input {
  min-height: 90px;
  max-height: 130px;
  font-size: 14px;
  padding-right: 58px;
  padding-bottom: 50px;
}
  #jupiter-ai-toggle::after {
    display: none;
  }
}

/* ============================================
   10. REDUCED MOTION
============================================ */

@media (prefers-reduced-motion: reduce) {
  #jupiter-ai-toggle,
  #jupiter-ai-window,
  #jupiter-ai-toggle::after,
  #jupiter-ai-send {
    transition: none;
  }
}


/* ===== GENERAL ANALYSIS GLASS POPUP ===== */

#analysisGuideOverlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(10,10,18,.45);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .3s ease;
}

#analysisGuideOverlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#analysisGuidePanel {
  width: 75vw;
  max-width: 1200px;
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 20px 70px rgba(0,0,0,.3),
              inset 0 1px 0 rgba(255,255,255,.2);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  transform: translateY(15px);
  transition: transform .3s ease;
}

#analysisGuideOverlay.is-open #analysisGuidePanel {
  transform: translateY(0);
}

.analysis-guide-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 25px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-alt) 65%, transparent);
}

.analysis-guide-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.analysis-guide-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

#analysisGuideClose {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}

#analysisGuideClose:hover {
  color: var(--saffron);
}

.analysis-guide-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 25px 38px 45px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  overscroll-behavior: contain;
}

.analysis-guide-scroll::-webkit-scrollbar {
  width: 8px;
}

.analysis-guide-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--saffron) 40%, transparent);
  border-radius: 20px;
}

.analysis-guide-content {
  max-width: 950px;
  margin: auto;
  color: var(--ink);
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-word;
  overflow-wrap: anywhere;
}

.analysis-guide-content h1,
.analysis-guide-content h2,
.analysis-guide-content h3 {
  text-align: left;
}

.analysis-guide-content h1,
.analysis-guide-content h2 {
  color: var(--saffron);
}

.analysis-guide-content h2 {
  margin-top: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.analysis-guide-content h3 {
  margin-top: 22px;
}

.analysis-guide-content li {
  margin-bottom: 5px;
}

.analysis-guide-content strong {
  color: var(--saffron);
}

@media(max-width:768px) {
  #analysisGuideOverlay {
    padding: 0;
  }

  #analysisGuidePanel {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .analysis-guide-scroll {
    padding: 20px;
  }

  .analysis-guide-header {
    padding: 13px 17px;
  }
}

/* Embedded send button */

.jupiter-ai-compose {
  position: relative;
}

.jupiter-ai-compose #jupiter-ai-send {
  position: absolute;
  right: 10px;
  bottom: 10px;

  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;

  border-radius: 50% !important;
  z-index: 2;
}


/* ==========================================
   JUPITER AI — TYPING INDICATOR
========================================== */

.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai-accent);
  opacity: .35;
  animation: jupiterTyping 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) {
  animation-delay: .18s;
}

.ai-typing-dots span:nth-child(3) {
  animation-delay: .36s;
}

@keyframes jupiterTyping {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: .35;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-typing-dots span {
    animation: none;
    opacity: .8;
  }
}

#locationPanel {
  position: fixed;
  top: 85px;
  right: 150px;
  z-index: 99999;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(150, 125, 190, 0.25);
  box-shadow: 0 8px 30px rgba(60, 40, 90, 0.15);
}


/* =========================================
   JUPITER ASTRO — GLASS ACCOUNT DIALOGUE
   Automatically adapts to the selected palette
========================================= */

/* Full-screen overlay */
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(20, 20, 30, 0.24);

  -webkit-backdrop-filter: blur(9px) saturate(125%);
  backdrop-filter: blur(9px) saturate(125%);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.account-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Main glass panel */
.account-dialog {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  position: relative;
  min-height: 0;

padding: 28px 30px;
  color: var(--ink);

  background: color-mix(
    in srgb,
    var(--surface) 76%,
    transparent
  );

  border: 1px solid var(--line-strong);
  border-radius: 24px;

  box-shadow:
    0 20px 65px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);

  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);

  transform: translateY(15px) scale(0.98);
  transition: transform 0.25s ease;
}

.account-overlay.is-open .account-dialog {
  transform: translateY(0) scale(1);
}

/* Header */
.account-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding-bottom: 17px;
  margin-bottom: 22px;

  border-bottom: 1px solid var(--line);
}

.account-dialog-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-dialog-brand .logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.account-dialog-brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.account-dialog-brand .account-dialog-powered-brand {
  color: var(--saffron);
  font-weight: 700;
}

.account-dialog-close {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--line-strong);
  border-radius: 50%;

  color: var(--ink);
  background: var(--surface-alt);

  font-size: 20px;
  cursor: pointer;
}

/* Sign In / Set Password tabs */
.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;

  padding: 5px;
  margin-bottom: 22px;

  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.account-tab {
  padding: 11px 8px;

  border: 1px solid transparent;
  border-radius: 10px;

  background: transparent;
  color: var(--muted);

  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.account-tab.active {
  background: var(--saffron-soft);
  color: var(--saffron);
  border-color: var(--line-strong);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

/* Form fields */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 6px;

  width: 100%;
  min-width: 0;
  align-items: stretch;
  text-align: left;
}

.account-field label {
  display: block;
  width: 100%;

  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}

.account-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  padding: 13px 14px;

  border: 1px solid var(--line-strong);
  border-radius: 12px;

  background: color-mix(
    in srgb,
    var(--surface) 78%,
    transparent
  );

  color: var(--ink);
  font: inherit;
  outline: none;
}

.account-field input:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px var(--saffron-soft);
}

.account-field input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

/* Remember and forgot password row */

.account-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;

  width: 100%;
  box-sizing: border-box;

  font-size: 0.82rem;
  color: var(--muted);
}

.account-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.account-options a {
  white-space: nowrap;
}

/* Main action button */
.account-submit {
  width: 100%;
  padding: 13px;

  margin-top: 5px;

  border: 1px solid var(--line-strong);
  border-radius: 13px;

  background: var(--saffron);
  color: white;

  font: inherit;
  font-weight: 700;
  cursor: pointer;

  box-shadow: 0 6px 18px var(--saffron-soft);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.account-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Bottom text */
.account-switch {
  margin: 19px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.account-security {
  margin-top: 20px;
  padding-top: 14px;

  border-top: 1px solid var(--line);

  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
}

/* Authentication messages */
.account-message {
  width: 100%;
  box-sizing: border-box;

  padding: 10px 12px;
  margin-top: 4px;

  border-radius: 8px;

  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.account-message.error {
  color: var(--bad);
  background: var(--bad-soft);
  border: 1px solid var(--bad);
}

.account-message.success {
  color: var(--good);
  background: var(--good-soft);
  border: 1px solid var(--good);
}

/* Utility */
.account-hidden {
  display: none !important;
}

/* Single-column layout for Set Password */

#signUpForm {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
  align-items: stretch;
}

/* All elements occupy full width */

#signUpForm > * {
  width: 100%;
  box-sizing: border-box;
}

/* Mobile layout */
@media (max-width: 600px) {

  .account-overlay {
    padding: 12px;
  }

  .account-dialog {
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 20px;
    border-radius: 20px;
  }

  .account-dialog-brand .logo {
    font-size: 1.35rem;
  }
.account-options {
  justify-content: flex-start;
  gap: 12px 20px;
}
  #signUpForm {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

  #signUpForm .account-submit,
  #signUpForm .account-switch,
  #signUpForm .account-message {
    grid-column: 1;
  }
}

/* LOGOUT CONFIRMATION TOAST */

#loginToast,
#logoutToast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);

  z-index: 2000000;

  padding: 12px 22px;
  border: 1px solid var(--good);
  border-radius: 10px;

  background: var(--surface);
  color: var(--good);

  font-size: 0.9rem;
  font-weight: 700;

  box-shadow: 0 6px 22px rgba(0,0,0,0.15);

  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

#loginToast.show,
#logoutToast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}


/* ==========================================
   COPY / EXPORT CONTROL
========================================== */

.copy-export-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 20;
}

.copy-export-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink, #333);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.copy-export-trigger:hover {
  background: var(--surface-alt);
  border-color: var(--saffron);
}

.export-chevron {
  font-size: 0.9rem;
  line-height: 1;
}

.copy-export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
width: 220px;
max-width: min(220px, 85vw);
box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink, #333);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.14);
  z-index: 1000;
}

.copy-export-menu[hidden] {
  display: none;
}

.copy-export-heading {
  padding: 5px 8px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #777);
}

.copy-export-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.copy-export-option:hover {
  background: var(--surface-alt);
}

.copy-export-option input {
  margin: 0;
  accent-color: var(--saffron);
  cursor: pointer;
	width: 16px;
height: 16px;
flex-shrink: 0;
}
.copy-export-control[hidden] {
  display: none !important;
}

/* Hide the complete Copy / Export control while signed out. */
.copy-export-control.ja-auth-locked {
  display: none !important;
}



/* Planetary Transits: authenticated lifecycle group and bottom-right P control */
.ja-transit-insights-gated[hidden],
.ja-transit-lifecycle-content[hidden],
.ja-transit-planetary-table[hidden] {
  display: none !important;
}

.ja-transit-insights-gated {
  margin-top: 14px;
}

.ja-transit-lifecycle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 6px 10px 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.ja-transit-lifecycle-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.ja-transit-lifecycle-content {
  margin-top: 10px;
  gap: 14px;
}

.ja-transit-planetary-table {
  margin-top: 12px;
}

.ja-transit-bottom-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}


/* Nav Tara Chakra section — layout only; calculations will be added separately. */
.ja-navtara-section {
  margin-bottom: 12px;
}

.ja-navtara-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 6px 10px 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.ja-navtara-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.ja-navtara-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.ja-navtara-content[hidden] {
  display: none !important;
}

.ja-navtara-card {
  min-width: 0;
}

.ja-navtara-card header h3 {
  margin: 0;
}

.ja-navtara-placeholder {
  min-height: 56px;
}

@media (min-width: 760px) {
  .ja-navtara-content {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Nav Tara Chakra tables */
.ja-navtara-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.ja-navtara-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

.ja-navtara-table th,
.ja-navtara-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.ja-navtara-table thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.035em;
}

.ja-navtara-table th:first-child,
.ja-navtara-table td:first-child {
  width: 190px;
}

.ja-navtara-planet {
  color: var(--ink);
  font-weight: 750;
}

.ja-navtara-tara {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 450;
}

/* Alternate subtle theme-tinted bands for easier row tracking. */
.ja-navtara-table tbody tr:nth-child(odd) > td {
  background: var(--saffron-soft, rgba(0, 170, 150, 0.08));
}

.ja-navtara-table tbody tr:nth-child(even) > td {
  background: transparent;
}

/* Keep planetary occupants inline beside their Nakshatra, comma-separated. */
.ja-navtara-occupant {
  display: inline;
  margin: 0;
  font-weight: 800;
}

/* Let a crowded occupant list wrap naturally instead of being clipped. */
.ja-navtara-occupants {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
}


/* FORGOT PASSWORD DIALOGUE */
.forgot-password-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.forgot-password-description {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

#forgotPasswordPanel .account-switch {
  margin-top: 8px;
}

#forgotPasswordPanel .account-switch a {
  color: var(--saffron);
  font-weight: 600;
  text-decoration: none;
}

#forgotPasswordPanel .account-switch a:hover {
  text-decoration: underline;
}

/* Red prohibited-action cursor for login controls locked pending email verification. */
.account-disabled-hover {
  display: block;
  width: 100%;
  cursor: auto;
}

.account-disabled-hover.is-locked {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='white' stroke='%23dc2626' stroke-width='2'/%3E%3Cpath d='M5.64 5.64l12.72 12.72' stroke='%23dc2626' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, not-allowed;
}

.account-disabled-hover > input:disabled,
.account-disabled-hover > button:disabled {
  pointer-events: none;
  cursor: inherit;
}

/* Keep the prohibited cursor active over the whole disabled control area. */
.account-disabled-hover.is-locked {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='white' stroke='%23dc2626' stroke-width='2'/%3E%3Cpath d='M5.64 5.64l12.72 12.72' stroke='%23dc2626' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, not-allowed;
}

.account-disabled-hover > button:disabled {
  filter: grayscale(0.18);
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}


/* ==========================================
   GLOBAL TYPOGRAPHY SCALE — HEADER CONTROLS
   Text only; layout dimensions remain untouched.
========================================== */
.header-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(35, 25, 55, 0.055);
  flex: 0 0 auto;
}

.header-font-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  width: 29px;
  height: 27px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease,
              box-shadow .16s ease, transform .16s ease;
}

.header-font-btn:hover {
  color: var(--saffron);
  background: var(--saffron-soft);
  border-color: var(--line-strong);
}

.header-font-btn.is-active,
.header-font-btn[aria-pressed="true"] {
  color: var(--saffron);
  background: var(--saffron-soft);
  border-color: var(--saffron);
  box-shadow: inset 0 1px 2px rgba(120, 75, 20, .08),
              0 1px 5px rgba(120, 75, 20, .10);
}

.header-font-btn:active {
  transform: scale(.94);
}

.header-font-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

.header-font-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

/* Every element receives its own captured base font size. This avoids
   changing rem-based padding, margins, widths, heights, and gaps. */
body.ja-font-scale-enabled [data-ja-font-scale-target] {
  font-size: calc(var(--ja-font-base-size) * var(--ja-font-scale)) !important;
}

@media (max-width: 600px) {
  .header-font-controls {
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
  }

  .header-font-btn {
    min-width: 27px;
    width: 27px;
    height: 26px;
    border-radius: 8px;
    font-size: .72rem;
  }
}
