:root {
    color-scheme: dark;
    --bg: #2a070d;
    --bg-soft: #3a0b13;
    --panel: rgba(74, 13, 23, 0.92);
    --panel-strong: rgba(58, 10, 17, 0.98);
    --line: rgba(255, 248, 247, 0.16);
    --line-strong: rgba(241, 196, 95, 0.34);
    --text: #fff8f7;
    --muted: #d8bfc1;
    --accent: #f1c45f;
    --accent-strong: #f1c45f;
    --danger: #ff8b7a;
    --success: #62d58d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

img,
svg,
canvas,
table {
    max-width: 100%;
}

button,
input,
select,
textarea {
    min-width: 0;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(241, 196, 95, 0.18), transparent 30%),
        radial-gradient(circle at 86% 12%, rgba(217, 35, 50, 0.22), transparent 26%),
        radial-gradient(circle at 70% 80%, rgba(148, 17, 29, 0.22), transparent 28%),
        linear-gradient(180deg, #2a070d 0%, #26060c 100%);
    overflow-x: hidden;
}

.skip-link {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 1000;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    background: var(--text);
    color: var(--bg);
    padding: 0.55rem 0.8rem;
    border-radius: 6px;
    font-weight: 800;
}

.skip-link:focus-visible {
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.18;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    min-height: 68px;
    padding: 0.75rem max(1rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: rgba(42, 7, 13, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand-block {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
    color: var(--text);
    text-decoration: none;
}

.brand-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-name {
    min-width: 0;
    color: var(--text);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 1rem;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-links a,
.nav-auth {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.nav-links a {
    padding: 0.48rem 0.66rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
    color: var(--text);
    background: rgba(255, 248, 247, 0.06);
}

.nav-auth {
    width: auto;
    justify-content: flex-end;
    gap: 0.5rem;
}

.nav-auth .auth-toolbar-text {
    max-width: 220px;
    overflow: hidden;
    color: var(--success);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-auth .toolbar-logout-button {
    min-height: 38px;
    padding: 0.48rem 0.72rem;
}

.page-shell {
    width: min(1240px, calc(100% - 20px));
    margin: 0 auto;
    padding: 10px 0 28px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
    padding: 6px 0 12px;
}

.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}

.auth-toolbar-text {
    font-size: 0.9rem;
    color: var(--success);
}

.toolbar-logout-button {
    border: 1px solid var(--line-strong);
    background: rgba(225, 59, 59, 0.08);
    color: var(--accent-strong);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
}

.hero-copy {
    max-width: 680px;
    animation: rise-in 700ms ease-out both;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--accent-strong);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero h1,
.section-heading h2 {
    margin: 0;
    font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hero h1 {
    font-size: clamp(2rem, 10vw, 4.6rem);
    line-height: 0.96;
    max-width: 12ch;
}

.hero-text {
    margin: 12px 0 0;
    max-width: 36ch;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-orbit {
    position: relative;
    order: -1;
    height: 140px;
    display: grid;
    place-items: center;
    animation: fade-in 1100ms ease-out both;
}

.orbit-ring,
.orbit-core {
    position: absolute;
    border-radius: 50%;
}

.orbit-ring {
    border: 1px solid var(--line-strong);
}

.orbit-ring-a {
    width: 140px;
    height: 140px;
    animation: spin 18s linear infinite;
}

.orbit-ring-b {
    width: 92px;
    height: 92px;
    border-style: dashed;
    animation: spin-reverse 12s linear infinite;
}

.orbit-core {
    width: 54px;
    height: 54px;
    background:
        radial-gradient(circle at 30% 30%, #f7e8be, #d5ae69 48%, rgba(213, 174, 105, 0.16) 72%, transparent 74%);
    box-shadow: 0 0 90px rgba(225, 59, 59, 0.2);
}

.workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.input-panel,
.results-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.input-panel {
    position: static;
    padding: 18px;
    min-width: 0;
}

.results-panel {
    padding: 18px;
    min-width: 0;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    font-size: clamp(1.7rem, 7vw, 2.8rem);
}

.lifetime-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(140, 216, 186, 0.45);
    background: rgba(140, 216, 186, 0.16);
    color: #bff2dd;
    font-family: "Manrope", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.table-hint {
    margin: -2px 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.kp-form {
    display: grid;
    gap: 14px;
}

.profile-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(214, 184, 122, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.profile-state {
    margin: -4px 0 16px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.profile-state.is-success {
    color: #79d39e;
}

.profile-state.is-error {
    color: var(--danger);
}

.profile-picker {
    display: grid;
    gap: 8px;
}

.profile-new-button {
    width: 100%;
    text-align: center;
}

.city-search-field {
    position: relative;
}

.city-suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin-top: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(255, 250, 248, 0.99), rgba(255, 241, 238, 0.99));
    border: 1px solid rgba(148, 17, 29, 0.16);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(30, 7, 11, 0.14);
}

.city-suggestion {
    width: 100%;
    text-align: left;
    background: rgba(255, 250, 249, 0.96);
    color: #321016;
    border: 1px solid rgba(148, 17, 29, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: none;
}

.city-suggestion:hover,
.city-suggestion:focus-visible {
    border-color: rgba(148, 17, 29, 0.26);
    background: #fff3ef;
}

.city-suggestion-title {
    display: block;
    font-weight: 700;
    color: #321016;
}

.city-suggestion-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.88rem;
    color: #7a3b41;
}

.country-autocomplete-group {
    position: relative;
}

.country-autocomplete-group > input[type="text"] {
    width: 100%;
}

[data-theme="dark"] .city-suggestions,
.alt-theme .city-suggestions {
    background: linear-gradient(180deg, rgba(74, 13, 23, 0.99), rgba(42, 7, 13, 0.99));
    border-color: rgba(241, 196, 95, 0.2);
}

[data-theme="dark"] .city-suggestion,
.alt-theme .city-suggestion {
    background: rgba(60, 10, 18, 0.96);
    color: #fff8f7;
    border-color: rgba(241, 196, 95, 0.15);
}

[data-theme="dark"] .city-suggestion:hover,
[data-theme="dark"] .city-suggestion:focus-visible,
.alt-theme .city-suggestion:hover,
.alt-theme .city-suggestion:focus-visible {
    background: rgba(90, 20, 30, 0.96);
    border-color: rgba(241, 196, 95, 0.3);
}

[data-theme="dark"] .city-suggestion-title,
.alt-theme .city-suggestion-title {
    color: #fff8f7;
}

[data-theme="dark"] .city-suggestion-meta,
.alt-theme .city-suggestion-meta {
    color: #d8bfc1;
}

label {
    display: grid;
    gap: 8px;
}

label span {
    font-size: 0.92rem;
    color: var(--muted);
}

input {
    width: 100%;
    border: 1px solid rgba(197, 50, 50, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    border-radius: 16px;
    padding: 15px 16px;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

input::placeholder {
    color: rgba(125, 18, 18, 0.42);
}

select {
    width: 100%;
    border: 1px solid rgba(197, 50, 50, 0.12);
    background-color: rgba(7, 4, 7, 0.72);
    color: var(--text);
    border-radius: 16px;
    padding: 15px 16px;
    padding-right: 42px;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent-strong) 50%),
        linear-gradient(135deg, var(--accent-strong) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(245, 181, 72, 0.52);
    outline-offset: 3px;
}

select:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

select option {
    color: var(--text);
    background-color: #16060a;
}

select option:checked,
select option:hover {
    color: #180509;
    background-color: var(--accent);
}

input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

input[readonly] {
    border-color: rgba(214, 184, 122, 0.24);
    background: rgba(214, 184, 122, 0.08);
    color: #e8dcc2;
    cursor: default;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.time-input-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.time-slot {
    display: grid;
    gap: 6px;
}

.time-slot span {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.time-input-group input {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 12px 10px;
    border-color: rgba(240, 213, 154, 0.28);
    background: rgba(10, 21, 36, 0.92);
    color: #fff8eb;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
}

#time-meridiem {
    text-transform: uppercase;
}

.time-input-group input::placeholder {
    color: rgba(255, 248, 235, 0.6);
}

.time-input-group input:focus {
    border-color: var(--accent-strong);
    background: rgba(14, 28, 47, 0.98);
    box-shadow: 0 0 0 1px rgba(240, 213, 154, 0.24);
}

.time-input-group input::-webkit-outer-spin-button,
.time-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-input-group input[type="text"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.time-helper {
    font-size: 0.84rem;
    color: var(--muted);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
}

button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, #efd7a3 100%);
    color: #1f1404;
    font-weight: 700;
    padding: 15px 20px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    box-shadow: 0 16px 32px rgba(214, 184, 122, 0.22);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ghost-button {
    background: transparent;
    color: var(--accent-strong);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.status-text {
    margin: 0;
    color: var(--muted);
    min-height: 1.4em;
}

.status-text.is-error {
    color: var(--danger);
}

.status-text.is-success {
    color: var(--success);
}

.derived-panel {
    margin-top: 4px;
}

.prediction-copy {
    margin: 0;
    color: inherit;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.prediction-loading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(240, 213, 154, 0.24);
    border-top-color: var(--accent-strong);
    animation: spin 0.8s linear infinite;
}

.prediction-loading-hero {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.prediction-loading-orbit {
    position: relative;
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(225, 59, 59, 0.14), transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96), rgba(255, 240, 238, 1) 72%);
    border: 1px solid rgba(225, 59, 59, 0.16);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 18px 36px rgba(225, 59, 59, 0.12);
    overflow: hidden;
}

.prediction-loading-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(225, 59, 59, 0.2);
}

.prediction-loading-ring-outer {
    inset: 10px;
    animation: loading-orbit 10s linear infinite;
}

.prediction-loading-ring-inner {
    inset: 28px;
    border-style: dashed;
    border-color: rgba(225, 59, 59, 0.26);
    animation: loading-orbit-reverse 14s linear infinite;
}

.prediction-loading-core {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #fff6dc 0%, #ffc6c6 38%, #ef6c6c 70%, #ba1f1f 100%);
    box-shadow:
        0 0 0 10px rgba(225, 59, 59, 0.08),
        0 0 22px rgba(225, 59, 59, 0.24);
    animation: loading-pulse 2.8s ease-in-out infinite;
}

.prediction-loading-copy-block {
    min-width: 0;
}

.prediction-loading-kicker {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.prediction-loading-countdown {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text);
}

.prediction-loading-countdown strong {
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 0.95;
    color: var(--accent-strong);
}

.prediction-loading-countdown span {
    color: var(--muted);
    font-size: 0.92rem;
}

.prediction-loading-copy {
    margin: 0 0 6px;
    color: var(--text);
    font-weight: 600;
}

.prediction-loading-subcopy {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.prediction-loading-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(225, 59, 59, 0.06);
    border: 1px solid rgba(225, 59, 59, 0.12);
    overflow: hidden;
}

.prediction-loading-bar {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffb1b1 0%, #f46a6a 45%, #d91d1d 100%);
    box-shadow: 0 0 18px rgba(225, 59, 59, 0.26);
    transition: width 900ms linear;
}

.prediction-loading-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

.results-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.results-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.result-card {
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 242, 0.96));
    padding: 16px;
}

.result-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.result-card-head h3 {
    margin: 0;
    color: var(--text);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: clamp(1.35rem, 1.9vw, 1.9rem);
    line-height: 1;
}

.data-slab {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 244, 0.98));
}

.data-slab.is-empty,
.cusp-significator-table.is-empty,
.western-aspects-panel.is-empty {
    padding: 18px;
    color: var(--muted);
}

.table-scroll {
    overflow: auto;
    max-width: 100%;
}

.astro-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    color: var(--text);
}

.astro-table th,
.astro-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(225, 59, 59, 0.1);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.astro-table thead th {
    background: rgba(255, 228, 228, 0.98);
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 1;
}

.astro-table tbody tr:last-child td {
    border-bottom: 0;
}

.astro-table-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.planetary-table-scroll {
    display: none !important;
}

.compact-table-stack {
    display: grid;
    gap: 12px;
}

.compact-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(225, 59, 59, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 242, 0.96));
}

.compact-astro-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.compact-astro-table th,
.compact-astro-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(225, 59, 59, 0.1);
    text-align: left;
    vertical-align: top;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.compact-astro-table th {
    background: rgba(255, 228, 228, 0.98);
    color: var(--accent-strong);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compact-astro-table tbody tr:last-child td {
    border-bottom: 0;
}

.compact-astro-primary {
    gap: 6px;
    font-size: 0.75rem;
}

.compact-token {
    gap: 4px;
}

.compact-planetary-table th,
.compact-planetary-table td {
    padding: 8px 4px;
    font-size: 0.66rem;
}

.compact-planetary-table th:nth-child(1),
.compact-planetary-table td:nth-child(1) {
    width: 42px;
}

.compact-planetary-table th:nth-child(2),
.compact-planetary-table td:nth-child(2) {
    width: 40px;
}

.compact-planetary-table th:nth-child(3),
.compact-planetary-table td:nth-child(3) {
    width: 52px;
}

.compact-planetary-table th:nth-child(4),
.compact-planetary-table td:nth-child(4) {
    width: 32px;
}

.compact-planetary-table th:nth-child(5),
.compact-planetary-table td:nth-child(5),
.compact-planetary-table th:nth-child(6),
.compact-planetary-table td:nth-child(6) {
    width: 40px;
}

.compact-planetary-table td:last-child {
    white-space: normal;
}

.western-aspects-panel {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 244, 0.98));
}

.western-aspects-stack {
    display: grid;
    gap: 14px;
    padding: 12px;
}

.aspect-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aspect-legend-chip {
    border: 1px solid rgba(50, 16, 22, 0.12);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.aspect-table-block {
    display: grid;
    gap: 8px;
}

.aspect-table-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.aspect-table-title h4 {
    margin: 0;
    color: var(--text);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: clamp(0.98rem, 1.4vw, 1.2rem);
    letter-spacing: 0.02em;
}

.aspect-table-title span {
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aspect-table-frame {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 17, 29, 0.16);
    border-radius: 14px;
    background: #fffaf8;
}

.western-aspect-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--text);
}

.western-aspect-table th,
.western-aspect-table td {
    border-bottom: 1px solid rgba(148, 17, 29, 0.12);
    border-right: 1px solid rgba(148, 17, 29, 0.1);
    padding: 5px 3px;
    text-align: center;
    vertical-align: middle;
}

.western-aspect-table th:last-child,
.western-aspect-table td:last-child {
    border-right: 0;
}

.western-aspect-table tbody tr:last-child th,
.western-aspect-table tbody tr:last-child td {
    border-bottom: 0;
}

.western-aspect-table th {
    background: #ffe6df;
    color: var(--accent-strong);
    font-size: clamp(0.55rem, 1.4vw, 0.72rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.western-aspect-table th:first-child {
    width: 42px;
}

.aspect-cell {
    height: 42px;
    font-size: clamp(0.48rem, 1.15vw, 0.68rem);
    font-weight: 800;
    line-height: 1.05;
}

.aspect-cell span {
    display: block;
}

.aspect-degree span {
    display: inline;
}

.aspect-name {
    font-size: 0.92em;
    letter-spacing: 0.01em;
}

.aspect-degree {
    margin-top: 2px;
    opacity: 0.96;
}

.aspect-empty {
    color: rgba(50, 16, 22, 0.22);
}

.aspect-negative-45 { background: #ffe0df !important; color: #9d292d !important; }
.aspect-negative-90 { background: #ffbdbc !important; color: #7e1217 !important; }
.aspect-negative-180 { background: #8e111b !important; color: #fff7f5 !important; }
.aspect-positive-30 { background: #e5f8e9 !important; color: #236b39 !important; }
.aspect-positive-60 { background: #bdf0c8 !important; color: #15592b !important; }
.aspect-positive-120 { background: #23884a !important; color: #f5fff7 !important; }

@media (max-width: 640px) {
    .western-aspects-stack {
        padding: 10px;
        gap: 12px;
    }

    .aspect-legend {
        gap: 6px;
    }

    .aspect-legend-chip {
        padding: 5px 7px;
        font-size: 0.58rem;
    }

    .aspect-table-title h4 {
        font-size: 0.98rem;
    }

    .western-aspect-table th:first-child {
        width: 42px;
    }

    .western-aspect-table th,
    .western-aspect-table td {
        padding: 4px 1px;
    }

    .aspect-cell {
        height: 32px;
        font-size: 0.56rem;
        line-height: 1;
    }

    .aspect-cell .aspect-name {
        display: none;
    }

    .aspect-degree {
        margin-top: 0;
    }

    .aspect-cell .aspect-degree-decimal {
        display: none;
    }
}

.compact-cusp-table th:first-child,
.compact-cusp-table td:first-child {
    width: 52px;
}

.compact-cusp-table th:nth-child(2),
.compact-cusp-table td:nth-child(2) {
    width: 34%;
}

.compact-cusp-table .cusp-house-tag {
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.compact-cusp-table .life-area-badge {
    padding: 4px 8px;
    font-size: 0.72rem;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
}

.compact-cusp-table .significator-name {
    font-size: 0.7rem;
}

.compact-cusp-table .significator-code {
    min-width: 28px;
    padding: 2px 6px;
    font-size: 0.68rem;
}

.compact-cusp-table .significator-badge {
    min-width: 22px;
    padding: 3px 5px;
    font-size: 0.75rem;
}

.compact-cusp-area-table th:first-child,
.compact-cusp-area-table td:first-child {
    width: 88px;
}

.compact-cusp-role-table th:first-child,
.compact-cusp-role-table td:first-child {
    width: 56px;
}

.planet-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(225, 59, 59, 0.35);
    box-shadow: 0 0 0 3px rgba(225, 59, 59, 0.08);
    flex: 0 0 auto;
}

.planet-dot.sun { background: #d94f4f; }
.planet-dot.moon { background: #d77777; }
.planet-dot.mars { background: #ff6a6a; }
.planet-dot.mercury { background: #c16a6a; }
.planet-dot.jupiter { background: #cf7f6a; }
.planet-dot.venus { background: #d76a9b; }
.planet-dot.saturn { background: #8e5d5d; }
.planet-dot.rahu { background: #a83e82; }
.planet-dot.ketu { background: #7b57c6; }
.planet-dot.ascendant { background: #d98b4f; }

.chart-views {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.chart-panel {
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 242, 0.96));
    padding: 16px;
}

.chart-panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.chart-panel h3 {
    margin: 0;
    color: var(--text);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: clamp(1.4rem, 2.1vw, 2rem);
    line-height: 1;
}

.chart-panel-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(225, 59, 59, 0.08);
    border: 1px solid rgba(225, 59, 59, 0.16);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lagna-chart-view,
.kp-chart-view,
.dasha-chart-panel {
    min-height: 320px;
}

.lagna-chart-view.is-empty,
.kp-chart-view.is-empty,
.dasha-chart-panel.is-empty {
    display: grid;
    place-items: center;
    padding: 28px 18px;
    color: var(--muted);
    border: 1px dashed rgba(225, 59, 59, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.dasha-chart-panel {
    min-height: auto;
}

.dasha-stack {
    display: grid;
    gap: 10px;
}

.dasha-sequence-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dasha-sequence-chip {
    display: inline-grid;
    gap: 2px;
    min-width: 0;
    border: 1px solid rgba(148, 17, 29, 0.14);
    border-radius: 14px;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.82);
}

.dasha-sequence-chip small {
    color: #8e4c52;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dasha-sequence-chip strong {
    color: #321016;
    font-size: 0.95rem;
    font-weight: 800;
}

.dasha-level-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 10px;
    border: 1px solid rgba(148, 17, 29, 0.14);
    border-radius: 16px;
    padding: 13px;
    background:
        radial-gradient(circle at 92% 10%, rgba(241, 196, 95, 0.2), transparent 34%),
        linear-gradient(135deg, #fffaf8 0%, #fff0ed 100%);
}

.dasha-level-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #9b1721;
}

.dasha-tone-saffron::before { background: #c96b19; }
.dasha-tone-rose::before { background: #be2c5c; }
.dasha-tone-copper::before { background: #a94724; }
.dasha-tone-gold::before { background: #c49a2d; }

.dasha-level-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.dasha-level-head span {
    color: #9b1721;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dasha-level-head strong {
    color: #321016;
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1;
}

.dasha-dates,
.dasha-next-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6a3036;
    font-size: 0.82rem;
    font-weight: 700;
}

.dasha-track {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 17, 29, 0.1);
}

.dasha-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #9b1721 0%, #d95540 58%, #f1c45f 100%);
}

.dasha-next-row {
    justify-content: flex-start;
}

.dasha-next-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    border: 1px solid rgba(148, 17, 29, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: #321016;
    padding: 5px 9px;
}

.dasha-next-row small {
    color: #8b5559;
    font-size: 0.7rem;
}

.dasha-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dasha-meta-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    border: 1px solid rgba(148, 17, 29, 0.12);
    border-radius: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.74);
}

.dasha-meta-card small {
    color: #8b5559;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dasha-meta-card strong {
    color: #321016;
    font-size: 1rem;
    font-weight: 800;
}

.dasha-meta-subline {
    display: grid;
    gap: 6px;
}

.dasha-meta-subline > span,
.dasha-meta-line > span {
    color: #8b5559;
    font-size: 0.72rem;
    font-weight: 700;
}

.dasha-number-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dasha-number-badge,
.dasha-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 17, 29, 0.15);
    background: rgba(255, 255, 255, 0.94);
    color: #9b1721;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    padding: 0 8px;
}

.dasha-empty {
    min-width: 36px;
    color: #8b5559;
}

.dasha-drilldown {
    border-top: 1px solid rgba(148, 17, 29, 0.09);
    padding-top: 10px;
}

.dasha-drilldown summary {
    cursor: pointer;
    color: #7f1820;
    font-size: 0.9rem;
    font-weight: 800;
    list-style: none;
}

.dasha-drilldown summary::-webkit-details-marker {
    display: none;
}

.dasha-drilldown summary::after {
    content: "+";
    float: right;
    color: #9b1721;
    font-size: 1rem;
}

.dasha-drilldown[open] summary::after {
    content: "-";
}

.dasha-period-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.dasha-period-row {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(148, 17, 29, 0.1);
    border-radius: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.dasha-period-row.is-active {
    border-color: rgba(155, 23, 33, 0.24);
    box-shadow: 0 10px 24px rgba(99, 14, 22, 0.08);
    background: rgba(255, 249, 245, 0.96);
}

.dasha-period-head,
.dasha-period-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dasha-period-head strong {
    color: #321016;
    font-size: 1rem;
    font-weight: 800;
}

.dasha-period-label {
    display: block;
    color: #9b1721;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.dasha-current-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(155, 23, 33, 0.1);
    color: #8b1019;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dasha-period-dates {
    color: #6a3036;
    font-size: 0.8rem;
    font-weight: 700;
}

.dasha-period-meta {
    display: grid;
    gap: 8px;
}

.dasha-meta-line {
    display: grid;
    gap: 6px;
}

.lagna-chart-svg {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(225, 59, 59, 0.14);
}

.lagna-chart-svg svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-fallback-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kp-chart-stack {
    display: grid;
    gap: 16px;
}

.kp-chart-svg-shell {
    border-radius: 18px;
    overflow: hidden;
    background: #fffaf8;
    border: 1px solid rgba(185, 33, 33, 0.2);
}

.kp-north-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.kp-chart-outline,
.kp-chart-diamond,
.kp-chart-split {
    fill: none;
    stroke: rgba(185, 33, 33, 0.78);
    stroke-width: 1.15;
    vector-effect: non-scaling-stroke;
}

.kp-chart-center-disc {
    fill: rgba(255, 249, 248, 0.96);
    stroke: rgba(225, 59, 59, 0.14);
    stroke-width: 1.2;
}

.kp-chart-center-overline {
    fill: var(--accent-strong);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.kp-chart-center-title {
    fill: var(--accent-strong);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;
}

.kp-house-id {
    fill: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.kp-house-sign {
    fill: #321016;
    font-weight: 600;
}

.kp-house-planets {
    fill: #321016;
    font-weight: 700;
}

.kp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planet-placement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.house-placement-card {
    border: 1px solid rgba(225, 59, 59, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 244, 0.96));
    padding: 12px;
    display: grid;
    gap: 10px;
    min-height: 126px;
}

.house-placement-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text);
}

.house-placement-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
}

.house-placement-sign {
    color: var(--muted);
    font-size: 0.86rem;
}

.house-placement-planets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.planet-chip small {
    opacity: 0.78;
    font-size: 0.7rem;
}

.planet-chip.sun { background: rgba(255, 198, 198, 0.18); border-color: rgba(225, 59, 59, 0.2); color: #b11414; }
.planet-chip.moon { background: rgba(255, 224, 224, 0.9); border-color: rgba(225, 59, 59, 0.16); color: #a02a2a; }
.planet-chip.mars { background: rgba(255, 214, 214, 0.86); border-color: rgba(225, 59, 59, 0.18); color: #c21d1d; }
.planet-chip.mercury { background: rgba(255, 237, 237, 0.9); border-color: rgba(225, 59, 59, 0.14); color: #8e2c2c; }
.planet-chip.jupiter { background: rgba(255, 232, 225, 0.92); border-color: rgba(225, 59, 59, 0.14); color: #aa3b3b; }
.planet-chip.venus { background: rgba(255, 241, 245, 0.92); border-color: rgba(225, 59, 59, 0.14); color: #b12d56; }
.planet-chip.saturn { background: rgba(255, 236, 236, 0.92); border-color: rgba(225, 59, 59, 0.12); color: #7b3c3c; }
.planet-chip.rahu { background: rgba(255, 228, 239, 0.92); border-color: rgba(225, 59, 59, 0.14); color: #ad246d; }
.planet-chip.ketu { background: rgba(248, 235, 255, 0.94); border-color: rgba(225, 59, 59, 0.14); color: #7e3db1; }
.planet-chip.ascendant { background: rgba(255, 239, 232, 0.95); border-color: rgba(225, 59, 59, 0.16); color: #b14f14; }

.planet-placement-card {
    border: 1px solid rgba(225, 59, 59, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 242, 0.98));
    padding: 14px;
    display: grid;
    gap: 10px;
}

.planet-placement-card h4 {
    margin: 0;
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text);
}

.planet-placement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}

.planet-placement-meta strong {
    color: var(--text);
}

.planet-placement-chipline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planet-placement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(225, 59, 59, 0.07);
    border: 1px solid rgba(225, 59, 59, 0.14);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.significator-cell.role-csl .significator-code {
    background: rgba(214, 184, 122, 0.12);
    border-color: rgba(214, 184, 122, 0.22);
    color: var(--accent-strong);
}

.significator-cell.role-nl .significator-code {
    background: rgba(127, 182, 255, 0.12);
    border-color: rgba(127, 182, 255, 0.22);
    color: #dbe8ff;
}

.significator-cell.role-sl .significator-code {
    background: rgba(255, 137, 184, 0.12);
    border-color: rgba(255, 137, 184, 0.22);
    color: #ffd3e7;
}

.cusp-significator-table {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    overflow: visible;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 244, 0.98));
}

.cusp-significator-table.is-empty {
    padding: 18px;
    color: var(--muted);
}

.desktop-cusp-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.desktop-cusp-table th,
.desktop-cusp-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.desktop-cusp-table th {
    color: var(--accent-strong);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(225, 59, 59, 0.04);
}

.desktop-cusp-table tr:last-child td {
    border-bottom: 0;
}

.cusp-house-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: rgba(225, 59, 59, 0.08);
    border: 1px solid rgba(225, 59, 59, 0.18);
    font-weight: 700;
}

.cusp-life-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    position: relative;
}

.desktop-cusp-table {
    display: none !important;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 6px;
    max-width: 100%;
}

.mobile-cusp-results {
    display: grid;
}

.mobile-cusp-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-cusp-caption {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.mobile-cusp-areas {
    margin-bottom: 12px;
}

.mobile-role-grid {
    display: grid;
    gap: 10px;
}

.mobile-role-card {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(225, 59, 59, 0.1);
}

.mobile-role-label {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-role-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
}

.life-area-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(225, 59, 59, 0.08);
    border: 1px solid rgba(225, 59, 59, 0.16);
    color: #a51919;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    box-shadow: none;
    max-width: 100%;
}

.life-area-badge:hover,
.life-area-badge:focus-visible,
.life-area-badge.is-active {
    transform: translateY(-1px);
    border-color: rgba(225, 59, 59, 0.3);
    background: rgba(225, 59, 59, 0.14);
}

.prediction-popup {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    z-index: 20;
    width: min(560px, calc(100vw - 24px));
    max-height: min(78vh, 640px);
    padding: 16px 18px 18px;
    border-radius: 18px;
    border: 1px solid rgba(225, 59, 59, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 245, 244, 0.98));
    box-shadow: 0 24px 50px rgba(225, 59, 59, 0.16);
    color: var(--text);
    animation: prediction-pop-in 180ms ease-out both;
}

.prediction-popup.is-desktop-floating {
    position: fixed;
    left: 16px;
    top: 16px;
    right: auto;
    bottom: auto;
    z-index: 1050;
}

.prediction-popup.is-closing {
    animation: prediction-pop-out 180ms ease-in both;
}

.prediction-popup.is-mobile-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(94vw, 440px);
    max-width: 440px;
    max-height: 82vh;
    transform: translate(-50%, -50%);
    z-index: 1100;
    box-shadow:
        0 0 0 100vmax rgba(225, 59, 59, 0.14),
        0 24px 50px rgba(225, 59, 59, 0.16);
}

.prediction-popup.is-mobile-modal::after {
    display: none;
}

.prediction-popup.is-mobile-modal .prediction-popup-body {
    max-height: 60vh;
    overscroll-behavior: contain;
}

.prediction-popup.align-right {
    left: auto;
    right: 0;
}

.prediction-popup.align-left {
    left: 0;
    right: auto;
}

.prediction-popup.place-below {
    top: calc(100% + 12px);
    bottom: auto;
}

.prediction-popup::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 100%;
    width: 12px;
    height: 12px;
    background: rgba(255, 250, 249, 0.98);
    border-right: 1px solid rgba(225, 59, 59, 0.18);
    border-bottom: 1px solid rgba(225, 59, 59, 0.18);
    transform: rotate(45deg) translateY(-6px);
}

.prediction-popup.align-right::after {
    left: auto;
    right: 20px;
}

.prediction-popup.place-below::after {
    top: auto;
    bottom: 100%;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid rgba(225, 59, 59, 0.18);
    border-top: 1px solid rgba(225, 59, 59, 0.18);
    transform: rotate(45deg) translateY(6px);
}

.prediction-popup-title {
    margin: 0 28px 8px 0;
    color: var(--accent-strong);
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.prediction-popup-body {
    color: var(--text);
    line-height: 1.7;
    max-height: min(62vh, 500px);
    overflow-y: auto;
    padding-right: 14px;
    padding-bottom: 32px;
    scrollbar-gutter: stable;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.prediction-popup-body::-webkit-scrollbar {
    width: 8px;
}

.prediction-popup-body::-webkit-scrollbar-thumb {
    background: rgba(225, 59, 59, 0.28);
    border-radius: 999px;
}

.prediction-section + .prediction-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(225, 59, 59, 0.12);
}

.prediction-section:last-child {
    margin-bottom: 10px;
}

.prediction-section h4 {
    margin: 0 0 6px;
    color: var(--accent-strong);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prediction-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(225, 59, 59, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-strong);
    box-shadow: none;
    font-size: 1rem;
    line-height: 1;
}

.prediction-popup.is-error .prediction-popup-body {
    color: var(--danger);
}

.prediction-popup.is-loading .prediction-popup-body {
    color: var(--text);
}

.prediction-popup .prediction-copy,
.prediction-popup .prediction-loading-copy,
.prediction-popup .prediction-loading-subcopy,
.prediction-popup .prediction-loading-countdown span,
.prediction-popup .prediction-loading-meta,
.chart-panel,
.cusp-significator-table,
.planet-placement-card,
.house-placement-card,
.mobile-role-card {
    color: var(--text);
}

@keyframes loading-orbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes loading-orbit-reverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes loading-pulse {
    0%,
    100% {
        transform: scale(0.96);
    }
    50% {
        transform: scale(1.04);
    }
}

.significator-cell {
    display: grid;
    gap: 8px;
}

.significator-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.significator-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(214, 184, 122, 0.12);
    border: 1px solid rgba(214, 184, 122, 0.24);
    color: var(--accent-strong);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.significator-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.significator-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(122, 164, 214, 0.12);
    border: 1px solid rgba(122, 164, 214, 0.22);
    color: #dbe8ff;
    font-size: 0.86rem;
    font-weight: 700;
}

.significator-badge:only-child {
    min-width: 36px;
}

.significator-numbers:empty::before {
    content: "-";
    color: var(--muted);
    font-size: 0.9rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes prediction-pop-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes prediction-pop-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
}

@media (min-width: 981px) {
    .hero {
        grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 42svh;
        gap: 28px;
        padding: 28px 0 20px;
    }

    .hero-orbit {
        order: 0;
        height: 420px;
    }

    .orbit-ring-a {
        width: 320px;
        height: 320px;
    }

    .orbit-ring-b {
        width: 220px;
        height: 220px;
    }

    .input-panel {
        position: static;
        top: auto;
        padding: 26px;
    }

    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-shell {
        width: min(1520px, calc(100% - 32px));
        padding: 32px 0 48px;
    }

    .results-panel {
        padding: 26px;
    }

    .hero h1 {
        font-size: clamp(3rem, 6vw, 5.4rem);
        line-height: 0.92;
        max-width: 10ch;
    }

    .hero-text {
        margin-top: 20px;
        max-width: 54ch;
        font-size: 1.02rem;
    }

    .time-input-group {
        grid-template-columns: repeat(4, minmax(68px, 1fr));
        gap: 10px;
    }

    .cusp-life-areas {
        min-width: 0;
    }

    .profile-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .profile-new-button {
        width: auto;
        white-space: nowrap;
    }

    .compact-table-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

}

@media (max-width: 1180px) {
    .page-shell {
        width: min(1040px, calc(100% - 16px));
    }

    .workspace {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .input-panel {
        position: static;
        top: auto;
    }

    .chart-views {
        grid-template-columns: 1fr;
    }

    .results-dashboard {
        grid-template-columns: 1fr;
    }

    .chart-fallback-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .results-dashboard {
        grid-template-columns: 1fr;
        overflow: visible;
        padding-bottom: 0;
        gap: 12px;
    }

    .results-column {
        min-width: 0;
    }

    .result-card,
    .chart-panel {
        min-height: 100%;
    }
}

@media (max-width: 720px) {
    .top-nav {
        position: relative;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 0.75rem;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-links a {
        font-size: 0.84rem;
        padding-inline: 0.54rem;
    }

    .nav-auth {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-auth .auth-toolbar-text {
        display: none;
    }

    .eyebrow,
    .section-kicker {
        margin-bottom: 8px;
        font-size: 0.72rem;
    }

    .input-panel,
    .results-panel {
        border-radius: 18px;
        padding: 14px;
    }

    .page-shell {
        width: calc(100% - 12px);
        padding: 8px 0 18px;
    }

    .workspace {
        gap: 10px;
    }

    .hero-copy {
        max-width: 100%;
    }

    .section-heading h2 {
        font-size: clamp(1.5rem, 8vw, 2.1rem);
    }

    .field-grid {
        gap: 10px;
    }

    .city-suggestion {
        border-radius: 16px;
    }

    .status-text {
        font-size: 0.88rem;
    }

    .chart-panel {
        padding: 14px;
    }

    .chart-panel-head {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 12px;
    }

    .chart-fallback-board {
        grid-template-columns: 1fr;
    }

    .results-dashboard {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 14px;
    }

    .compact-astro-table th,
    .compact-astro-table td {
        padding: 9px 6px;
        font-size: 0.72rem;
    }

    .compact-planetary-table th,
    .compact-planetary-table td {
        padding: 7px 3px;
        font-size: 0.61rem;
    }

    .compact-cusp-table th,
    .compact-cusp-table td {
        padding: 8px 5px;
        font-size: 0.68rem;
    }

    .compact-table-stack {
        grid-template-columns: 1fr;
    }

    .planet-placement-card {
        padding: 12px;
    }

    .lagna-chart-view,
    .kp-chart-view,
    .dasha-chart-panel {
        min-height: auto;
    }

    .planet-chip {
        max-width: 100%;
        white-space: normal;
    }

    .dasha-level-head,
    .dasha-dates {
        align-items: flex-start;
        flex-direction: column;
    }

    .dasha-meta-grid {
        grid-template-columns: 1fr;
    }

    .dasha-period-head,
    .dasha-period-dates {
        align-items: flex-start;
        flex-direction: column;
    }

    .prediction-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: min(94vw, 440px);
        max-width: 420px;
        max-height: 76vh;
        padding-bottom: 16px;
        transform: translate(-50%, -50%);
        box-shadow:
            0 0 0 100vmax rgba(225, 59, 59, 0.14),
            0 24px 50px rgba(225, 59, 59, 0.16);
        animation: prediction-pop-in-mobile 220ms ease-out both;
    }

    .prediction-popup.is-closing {
        animation: prediction-pop-out-mobile 180ms ease-in both;
    }

    .prediction-popup.align-left,
    .prediction-popup.align-right,
    .prediction-popup.place-below {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
    }

    .prediction-popup::after {
        display: none;
    }

    .prediction-popup-body {
        max-height: 60vh;
        overscroll-behavior: contain;
    }

    .prediction-loading-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .prediction-loading-orbit {
        width: 112px;
        height: 112px;
    }

    .prediction-loading-meta {
        font-size: 0.8rem;
    }

    .time-input-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@keyframes prediction-pop-in-mobile {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 12px)) scale(0.96);
        box-shadow:
            0 0 0 100vmax rgba(225, 59, 59, 0),
            0 24px 50px rgba(225, 59, 59, 0.12);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 0 100vmax rgba(225, 59, 59, 0.14),
            0 24px 50px rgba(225, 59, 59, 0.16);
    }
}

@keyframes prediction-pop-out-mobile {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 0 100vmax rgba(225, 59, 59, 0.14),
            0 24px 50px rgba(225, 59, 59, 0.16);
    }
    to {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 12px)) scale(0.96);
        box-shadow:
            0 0 0 100vmax rgba(225, 59, 59, 0),
            0 24px 50px rgba(225, 59, 59, 0.12);
    }
}

/* Unified KP Astro Academy theme overrides */
.page-shell {
    width: min(1240px, calc(100% - 24px));
}

.input-panel,
.results-panel,
.result-card,
.planet-placement-card,
.interpretation-card,
.prediction-popup,
.profile-toolbar,
.city-suggestions,
.lagna-chart-view,
.kp-chart-view,
.chart-fallback-board,
.prediction-loading-hero,
.results-dashboard > *,
.life-area-card,
.house-detail-card,
.planet-card,
.sub-lord-card,
.payment-card,
.lifetime-panel {
    border-color: var(--line) !important;
    background: linear-gradient(180deg, rgba(74, 13, 23, 0.96), rgba(42, 7, 13, 0.97)) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow);
}

.input-panel,
.results-panel,
.result-card,
.planet-placement-card,
.prediction-popup,
.lagna-chart-view,
.kp-chart-view {
    border-radius: 8px;
}

.toolbar-logout-button,
.ghost-button,
.profile-new-button,
.tab-button,
.filter-chip,
.planet-chip,
.house-chip,
.lifetime-badge,
.status-pill,
.note-chip,
.time-slot,
.saved-profile-card {
    border-color: var(--line) !important;
    background: rgba(255, 248, 247, 0.06) !important;
    color: var(--text) !important;
}

.eyebrow,
.section-kicker,
.auth-toolbar-text,
.profile-state.is-success,
.status-text.is-success,
.table-hint strong,
.result-card strong,
.planet-name,
.house-number,
.prediction-loading-meta {
    color: var(--accent) !important;
}

.hero-text,
.table-hint,
.profile-state,
.time-helper,
.status-text,
.result-card p,
.planet-placement-card p,
.subtle,
.muted,
.empty-state {
    color: var(--muted) !important;
}

.kp-form label span,
.profile-picker span,
.time-slot span,
.field-grid label span {
    color: var(--text) !important;
}

.kp-form input,
.kp-form select,
.kp-form textarea,
.time-input-group input,
.profile-picker select,
.city-search-field input,
.prediction-popup textarea,
input,
select,
textarea {
    border-color: rgba(255, 248, 247, 0.2) !important;
    background: rgba(7, 4, 7, 0.72) !important;
    color: var(--text) !important;
    border-radius: 8px !important;
}

select,
select:disabled {
    color: var(--text) !important;
    background-color: rgba(7, 4, 7, 0.92) !important;
}

select option,
select optgroup {
    color: #fff8f7 !important;
    background-color: #16060a !important;
}

select option:checked,
select option:hover,
select option:focus {
    color: #180509 !important;
    background-color: var(--accent) !important;
}

.kp-form input::placeholder,
.kp-form textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(216, 191, 193, 0.68) !important;
}

button,
.toolbar-logout-button.primary,
.payment-button {
    border: 1px solid rgba(241, 196, 95, 0.45);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffe5aa 0%, var(--accent) 100%);
    color: #1d0709;
    box-shadow: 0 12px 30px rgba(241, 196, 95, 0.16);
}

.ghost-button,
.toolbar-logout-button {
    background: rgba(255, 248, 247, 0.06) !important;
    color: var(--text) !important;
    box-shadow: none;
}

.astro-table,
.astro-table th,
.astro-table td,
table,
th,
td {
    border-color: var(--line) !important;
}

.astro-table th,
th {
    background: rgba(241, 196, 95, 0.1) !important;
    color: var(--accent) !important;
}

.astro-table td,
td {
    background: rgba(255, 248, 247, 0.035) !important;
    color: var(--text) !important;
}

.planet-dot.sun,
.planet-dot.moon,
.planet-dot.mars,
.planet-dot.mercury,
.planet-dot.jupiter,
.planet-dot.venus,
.planet-dot.saturn,
.planet-dot.rahu,
.planet-dot.ketu,
.planet-dot.ascendant {
    background: var(--accent) !important;
}

.prediction-popup {
    box-shadow:
        0 0 0 100vmax rgba(7, 4, 7, 0.58),
        0 24px 70px rgba(0, 0, 0, 0.44) !important;
}

.footer-strip {
    width: min(1240px, calc(100% - 24px));
    margin: 0 auto;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.86rem;
}

.footer-links,
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.45rem 0.7rem;
    flex-wrap: wrap;
}

.footer-strip a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.footer-strip a:hover,
.footer-strip a:focus-visible {
    color: var(--accent);
}

/* Output panels need light work surfaces, not the dark marketing skin. */
.results-panel .result-card,
.results-panel .chart-panel,
.results-panel .data-slab,
.results-panel .cusp-significator-table,
.results-panel .western-aspects-panel,
.results-panel .mobile-role-card,
.results-panel .compact-table-wrap,
.results-panel .dasha-chart-panel {
    border-color: rgba(148, 17, 29, 0.18) !important;
    background: linear-gradient(180deg, #fffaf8 0%, #fff1ee 100%) !important;
    color: #321016 !important;
    box-shadow: 0 18px 42px rgba(63, 8, 17, 0.18) !important;
}

.results-panel .result-card,
.results-panel .chart-panel,
.results-panel .data-slab,
.results-panel .table-scroll,
.results-panel .compact-table-wrap,
.results-panel .cusp-significator-table,
.results-panel .western-aspects-panel,
.results-panel .dasha-chart-panel {
    max-width: 100%;
    min-width: 0;
}

.results-panel .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

.results-panel .result-card h3,
.results-panel .chart-panel h3,
.results-panel .aspect-table-title h4,
.results-panel .astro-table,
.results-panel .astro-table-primary,
.results-panel .compact-astro-table,
.results-panel .western-aspect-table,
.results-panel .significator-name,
.results-panel .house-placement-head,
.results-panel .mobile-role-name,
.results-panel .prediction-popup-title {
    color: #321016 !important;
}

.results-panel .result-card .section-kicker,
.results-panel .chart-panel .section-kicker,
.results-panel .mobile-role-label,
.results-panel .cusp-house-tag,
.results-panel .significator-code,
.results-panel .chart-panel-tag,
.results-panel .compact-astro-table th,
.results-panel .aspect-table-title span {
    color: #9b1721 !important;
}

.results-panel .astro-table th,
.results-panel .desktop-cusp-table th,
.results-panel .western-aspect-table th {
    background: #ffe6df !important;
    color: #9b1721 !important;
    border-color: rgba(148, 17, 29, 0.16) !important;
    white-space: nowrap;
}

.results-panel .astro-table td,
.results-panel .desktop-cusp-table td,
.results-panel .mobile-cusp-caption,
.results-panel .compact-astro-table td,
.results-panel .western-aspect-table td.aspect-empty {
    background: #fffaf8 !important;
    color: #321016 !important;
    border-color: rgba(148, 17, 29, 0.12) !important;
}

.results-panel .western-aspect-table td.aspect-empty {
    color: rgba(50, 16, 22, 0.28) !important;
}

.results-panel .astro-table td,
.results-panel .desktop-cusp-table td,
.results-panel .astro-table-primary {
    white-space: nowrap;
}

.results-panel .compact-cusp-table td,
.results-panel .compact-cusp-table .cusp-life-areas,
.results-panel .prediction-popup-body,
.results-panel .prediction-copy {
    white-space: normal;
}

.results-panel .compact-cusp-table .significator-name,
.results-panel .compact-cusp-table .significator-numbers,
.results-panel .compact-cusp-table .life-area-badge {
    white-space: nowrap;
}

.results-panel .astro-table td:last-child,
.results-panel .desktop-cusp-table td:nth-child(2) {
    min-width: 180px;
    white-space: normal;
}

.results-panel .astro-table tbody tr:nth-child(even) td,
.results-panel .desktop-cusp-table tbody tr:nth-child(even) td {
    background: #fff1ee !important;
}

.results-panel .life-area-badge,
.results-panel .planet-placement-badge,
.results-panel .significator-badge {
    background: rgba(148, 17, 29, 0.08) !important;
    border-color: rgba(148, 17, 29, 0.18) !important;
    color: #9b1721 !important;
}

.results-panel .significator-cell.role-nl .significator-code,
.results-panel .significator-cell.role-nl .significator-badge {
    color: #195b91 !important;
}

.results-panel .significator-cell.role-sl .significator-code,
.results-panel .significator-cell.role-sl .significator-badge {
    color: #ad2359 !important;
}

.results-panel .table-scroll {
    background: #fffaf8;
}

.lagna-chart-svg {
    background: #fffaf8 !important;
}

.lagna-chart-svg svg {
    max-height: 420px;
}

.lagna-chart-svg svg text {
    fill: #321016 !important;
    font-weight: 700;
}

.lagna-chart-svg svg path,
.lagna-chart-svg svg line,
.lagna-chart-svg svg polygon,
.lagna-chart-svg svg rect {
    stroke: rgba(185, 33, 33, 0.78) !important;
}

.kp-chart-svg-shell {
    max-width: min(100%, 430px);
    margin-inline: auto;
    padding: 0;
    background: #fffaf8 !important;
    border: 1px solid rgba(185, 33, 33, 0.22) !important;
    border-radius: 8px;
}

.kp-house-cell {
    pointer-events: none;
}

.kp-house-id {
    fill: #9b1721 !important;
    font-size: 12px;
}

.kp-house-sign {
    fill: #b30000 !important;
    font-weight: 600;
}

.kp-house-planets {
    fill: #000000 !important;
    letter-spacing: 0;
}

body[data-page="app"] .page-shell {
    width: min(1580px, calc(100% - 24px));
}

body[data-page="app"] .hero {
    min-height: clamp(220px, 30svh, 320px);
    padding-bottom: 8px;
}

body[data-page="app"] .hero-copy h1 {
    max-width: 8ch;
}

body[data-page="app"] .workspace {
    gap: 18px;
}

body[data-page="app"] .results-panel {
    padding: 22px;
}

body[data-page="app"] .results-dashboard {
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
    gap: 18px;
}

body[data-page="app"] .chart-views {
    grid-template-columns: 1fr;
}

body[data-page="app"] .chart-panel {
    padding: 18px;
}

body[data-page="app"] .lagna-chart-svg svg {
    max-height: 500px;
}

body[data-page="app"] .kp-chart-svg-shell {
    max-width: min(100%, 520px);
}

body[data-page="app"] .dasha-stack {
    gap: 12px;
}

@media (max-width: 1320px) {
    body[data-page="app"] .results-dashboard {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 0.88fr);
    }

    body[data-page="app"] .kp-chart-svg-shell {
        max-width: min(100%, 480px);
    }
}

@media (max-width: 1100px) {
    body[data-page="app"] .results-dashboard {
        grid-template-columns: 1fr;
    }
}

body[data-page="app"] .city-suggestions {
    background: linear-gradient(180deg, rgba(255, 250, 248, 0.99), rgba(255, 241, 238, 0.99)) !important;
    border: 1px solid rgba(148, 17, 29, 0.18) !important;
    box-shadow: 0 18px 40px rgba(30, 7, 11, 0.18) !important;
}

body[data-page="app"] .city-suggestions .city-suggestion {
    background: rgba(255, 251, 250, 0.98) !important;
    color: #321016 !important;
    border: 1px solid rgba(148, 17, 29, 0.12) !important;
}

body[data-page="app"] .city-suggestions .city-suggestion:hover,
body[data-page="app"] .city-suggestions .city-suggestion:focus-visible {
    background: #fff1ee !important;
    color: #321016 !important;
    border-color: rgba(148, 17, 29, 0.28) !important;
}

body[data-page="app"] .city-suggestions .city-suggestion-title {
    color: #321016 !important;
}

body[data-page="app"] .city-suggestions .city-suggestion-meta {
    color: #7a3b41 !important;
}

.varga-tab-btn { padding: 6px 12px; background: transparent; border: 1px solid var(--border-color); color: var(--text-color); border-radius: 4px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 500; transition: all 0.2s ease; }
.varga-tab-btn:hover { background: var(--bg-hover); }
.varga-tab-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
