/**
 * Sakalam Panchang Calendar — Styles
 *
 * Brand: saffron #FF8C00, maroon #9C0000
 * Design: Day View + Month View — redesigned v3
 */

/* ── Tokens ───────────────────────────────────────────────────────── */

:root {
    --sk-cal-bg: #fdfaf6;
    --sk-cal-surface: #ffffff;
    --sk-cal-surface-alt: #fff8f0;
    --sk-cal-border: #f0e6d8;
    --sk-cal-text: #2c1810;
    --sk-cal-text-muted: #8b7355;
    --sk-cal-saffron: #ff8c00;
    --sk-cal-saffron-light: #fff3e0;
    --sk-cal-maroon: #9c0000;
    --sk-cal-maroon-light: #fce8e8;
    --sk-cal-green: #2e7d32;
    --sk-cal-green-light: #e8f5e9;
    --sk-cal-blue: #1565c0;
    --sk-cal-blue-light: #e3f2fd;
    --sk-cal-gold: #c49000;
    --sk-cal-gold-light: #fff8e1;
    --sk-cal-radius: 10px;
    --sk-cal-radius-sm: 6px;
    --sk-cal-shadow: 0 1px 3px rgba(44, 24, 16, 0.08);
    --sk-cal-shadow-lg: 0 4px 16px rgba(44, 24, 16, 0.12);
    --sk-cal-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Telugu", "Noto Sans Tamil", "Noto Sans Kannada", "Noto Sans Malayalam", "Noto Sans Gujarati", "Noto Sans Bengali", "Noto Sans Oriya", sans-serif;

    /* Planet hora colors */
    --sk-hora-sun: #ff8c00;
    --sk-hora-moon: #e0e0e0;
    --sk-hora-mars: #c62828;
    --sk-hora-mercury: #2e7d32;
    --sk-hora-jupiter: #f9a825;
    --sk-hora-venus: #ec407a;
    --sk-hora-saturn: #546e7a;
}

/* No dark mode: the site theme is light only, so these blocks stay light
   on phones set to dark mode too. */

/* ── Container ────────────────────────────────────────────────────── */

#sakalam-panchang-calendar {
    font-family: var(--sk-cal-font);
    color: var(--sk-cal-text);
    background: var(--sk-cal-bg);
    max-width: 480px;
    margin: 0 auto;
    padding: 12px;
    line-height: 1.5;
}

/* ── Header ───────────────────────────────────────────────────────── */

.sk-cal-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

/* ── Row 1: toggle + today + language ─────────────────────────────── */

.sk-cal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.sk-cal-view-toggle {
    display: flex;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius);
    overflow: hidden;
}

.sk-cal-toggle-btn {
    padding: 6px 18px;
    border: none;
    background: transparent;
    color: var(--sk-cal-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: var(--sk-cal-font);
}

.sk-cal-toggle-btn.active {
    background: var(--sk-cal-saffron);
    color: #fff;
}

.sk-cal-toggle-btn:hover:not(.active) {
    background: var(--sk-cal-saffron-light);
    color: var(--sk-cal-saffron);
}

.sk-cal-today-btn {
    padding: 6px 14px;
    border: 1px solid var(--sk-cal-saffron);
    border-radius: var(--sk-cal-radius);
    background: transparent;
    color: var(--sk-cal-saffron);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--sk-cal-font);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.sk-cal-today-btn:hover {
    background: var(--sk-cal-saffron);
    color: #fff;
}

.sk-cal-lang-select {
    padding: 6px 10px;
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    background: var(--sk-cal-surface);
    color: var(--sk-cal-text);
    font-size: 12px;
    font-family: var(--sk-cal-font);
    cursor: pointer;
    min-width: 0;
}

/* ── Row 2: navigation with date picker inline ────────────────────── */

.sk-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.sk-cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--sk-cal-saffron);
    border-radius: 50%;
    background: var(--sk-cal-surface);
    color: var(--sk-cal-saffron);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    font-family: var(--sk-cal-font);
    line-height: 1;
    padding: 0;
}

.sk-cal-nav-btn:hover {
    background: var(--sk-cal-saffron);
    color: #fff;
}

/* Date picker box — clickable button that opens hidden date input */
.sk-cal-nav-date-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--sk-cal-border);
    border-radius: 8px;
    background: var(--sk-cal-surface);
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: var(--sk-cal-font);
}

.sk-cal-nav-date-box:hover {
    border-color: var(--sk-cal-saffron);
    background: var(--sk-cal-saffron-light);
}

.sk-cal-nav-date-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--sk-cal-text);
    white-space: nowrap;
}

.sk-cal-nav-drop-icon {
    font-size: 12px;
    color: var(--sk-cal-muted);
    line-height: 1;
}

/* Hidden off-screen picker input — triggered by showPicker() */
.sk-cal-hidden-picker {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.sk-cal-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--sk-cal-text);
    text-align: center;
    white-space: nowrap;
}

/* ── Loading & Error ──────────────────────────────────────────────── */

.sk-cal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 16px;
    color: var(--sk-cal-text-muted);
    font-size: 14px;
}

.sk-cal-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--sk-cal-border);
    border-top-color: var(--sk-cal-saffron);
    border-radius: 50%;
    animation: sk-cal-spin 0.8s linear infinite;
}

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

.sk-cal-error {
    padding: 16px;
    background: var(--sk-cal-maroon-light);
    color: var(--sk-cal-maroon);
    border-radius: var(--sk-cal-radius);
    text-align: center;
    font-size: 14px;
}

.sk-cal-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--sk-cal-text-muted);
    font-size: 14px;
}

/* ── Day View ─────────────────────────────────────────────────────── */

.sk-cal-day-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Context Chips — 2 rows ───────────────────────────────────────── */

.sk-cal-chips-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sk-cal-chips-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.sk-cal-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: var(--sk-cal-saffron-light);
    border: 1px solid var(--sk-cal-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--sk-cal-text);
    white-space: nowrap;
}

.sk-cal-chip.paksha {
    background: var(--sk-cal-gold-light);
}

.sk-cal-chip.month {
    background: var(--sk-cal-blue-light);
}

.sk-cal-chip.ayana {
    background: var(--sk-cal-green-light);
}

.sk-cal-chip.ruthu {
    background: var(--sk-cal-maroon-light);
}

.sk-cal-chip-label {
    color: inherit;
}

.sk-cal-chip-sub {
    font-size: 10px;
    color: var(--sk-cal-text-muted);
    font-weight: 400;
}

/* ── Sun & Moon — compact pills side by side ──────────────────────── */

.sk-cal-astro-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sk-cal-astro-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    box-shadow: var(--sk-cal-shadow);
}

.sk-cal-astro-pill.sun {
    border-left: 3px solid var(--sk-cal-saffron);
}

.sk-cal-astro-pill.moon {
    border-left: 3px solid var(--sk-cal-blue);
}

.sk-cal-astro-pill-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* SVG sun / moon icons (astro pills and rashi pills). */
.sk-cal-astro-pill-icon svg,
.sk-cal-rashi-icon svg {
    display: block;
}

.sk-cal-astro-pill.sun .sk-cal-astro-pill-icon,
.sk-cal-rashi-icon.sun {
    color: var(--sk-cal-saffron);
}

.sk-cal-astro-pill.moon .sk-cal-astro-pill-icon,
.sk-cal-rashi-icon {
    color: var(--sk-hora-saturn);
}

.sk-cal-astro-pill-times {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    min-width: 0;
    flex-wrap: wrap;
}

.sk-cal-astro-pill-pair {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    white-space: nowrap;
}

.sk-cal-astro-pill-lbl {
    color: var(--sk-cal-text-muted);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.sk-cal-astro-pill-val {
    font-weight: 700;
    color: var(--sk-cal-text);
    font-variant-numeric: tabular-nums;
}

.sk-cal-astro-pill-sep {
    color: var(--sk-cal-border);
    font-size: 10px;
}

/* ── Sections ─────────────────────────────────────────────────────── */

.sk-cal-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sk-cal-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sk-cal-text-muted);
    margin: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--sk-cal-border);
}

.sk-cal-section-title.auspicious {
    color: var(--sk-cal-green);
    border-bottom-color: var(--sk-cal-green-light);
}

.sk-cal-section-title.inauspicious {
    color: var(--sk-cal-maroon);
    border-bottom-color: var(--sk-cal-maroon-light);
}

/* ── Vedic Timeline — 2×2 grid ────────────────────────────────────── */

.sk-cal-vedic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sk-cal-vedic-item {
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    padding: 10px;
    box-shadow: var(--sk-cal-shadow);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 72px;           /* space for future timing info */
}

.sk-cal-vedic-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sk-cal-text-muted);
}

.sk-cal-vedic-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--sk-cal-text);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Auto font-size reduction for long names */
.sk-cal-vedic-item:has(.sk-cal-vedic-value) .sk-cal-vedic-value {
    /* Browser support for :has is solid; fallback is normal size which wraps */
}

.sk-cal-vedic-end-time {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-top: 2px;
}

.sk-cal-vedic-end-label {
    font-size: 10px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-vedic-end-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--sk-cal-saffron);
    font-variant-numeric: tabular-nums;
}

.sk-cal-vedic-sub {
    font-size: 10px;
    color: var(--sk-cal-text-muted);
    font-weight: 500;
}

/* Reserved space for future timing additions */
.sk-cal-vedic-extra {
    flex: 1;
    min-height: 8px;
}

/* ── Rashi — side by side ─────────────────────────────────────────── */

.sk-cal-rashi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.sk-cal-rashi-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--sk-cal-surface-alt);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
}

.sk-cal-rashi-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.sk-cal-rashi-label {
    font-size: 10px;
    color: var(--sk-cal-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.sk-cal-rashi-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--sk-cal-text);
    margin-left: auto;
}

/* ── Timing grids (auspicious / inauspicious) ─────────────────────── */

.sk-cal-timing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.sk-cal-timing-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 8px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
}

.sk-cal-timing-item.chandrashtama {
    grid-column: 1 / -1;
}

.sk-cal-timing-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sk-cal-text-muted);
}

.sk-cal-timing-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--sk-cal-text);
    font-variant-numeric: tabular-nums;
}

/* ── Hora Grid ────────────────────────────────────────────────────── */

.sk-cal-hora-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sk-cal-hora-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sk-cal-hora-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sk-cal-text-muted);
}

.sk-cal-hora-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.sk-cal-hora-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: var(--sk-cal-radius-sm);
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
}

.sk-cal-hora-planet {
    font-size: 14px;
    line-height: 1;
}

.sk-cal-hora-time {
    font-size: 9px;
    color: var(--sk-cal-text-muted);
    font-variant-numeric: tabular-nums;
}

/* Planet color accents */
.sk-cal-hora-slot.planet-sun    { border-bottom: 2px solid var(--sk-hora-sun); }
.sk-cal-hora-slot.planet-moon   { border-bottom: 2px solid var(--sk-hora-moon); }
.sk-cal-hora-slot.planet-mars   { border-bottom: 2px solid var(--sk-hora-mars); }
.sk-cal-hora-slot.planet-mercury{ border-bottom: 2px solid var(--sk-hora-mercury); }
.sk-cal-hora-slot.planet-jupiter{ border-bottom: 2px solid var(--sk-hora-jupiter); }
.sk-cal-hora-slot.planet-venus  { border-bottom: 2px solid var(--sk-hora-venus); }
.sk-cal-hora-slot.planet-saturn { border-bottom: 2px solid var(--sk-hora-saturn); }

/* ── Festivals ────────────────────────────────────────────────────── */

.sk-cal-festival-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sk-cal-festival-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    flex-wrap: wrap;
}

.sk-cal-fest-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.sk-cal-fest-badge.major    { background: var(--sk-cal-saffron-light); color: var(--sk-cal-saffron); }
.sk-cal-fest-badge.regional { background: var(--sk-cal-blue-light); color: var(--sk-cal-blue); }
.sk-cal-fest-badge.vrat     { background: var(--sk-cal-green-light); color: var(--sk-cal-green); }
.sk-cal-fest-badge.lunar    { background: var(--sk-cal-gold-light); color: var(--sk-cal-gold); }

.sk-cal-fest-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-text);
    min-width: 0;
}

a.sk-cal-fest-link {
    color: var(--sk-cal-saffron);
    text-decoration: none;
    transition: color 0.2s;
}
a.sk-cal-fest-link:hover {
    color: #9C0000;
    text-decoration: underline;
}

.sk-cal-fest-desc {
    font-size: 11px;
    color: var(--sk-cal-text-muted);
    width: 100%;
}

/* ── Day footer ───────────────────────────────────────────────────── */

.sk-cal-day-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 12px 0 4px;
    font-size: 11px;
    color: var(--sk-cal-text-muted);
    border-top: 1px solid var(--sk-cal-border);
}


/* ═══════════════════════════════════════════════════════════════════ */
/* ── MONTH VIEW ─────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════ */

.sk-cal-month-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sk-cal-hindu-month-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-saffron);
    padding: 6px;
    background: var(--sk-cal-saffron-light);
    border-radius: var(--sk-cal-radius-sm);
}

/* ── Calendar grid ────────────────────────────────────────────────── */

.sk-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.sk-cal-grid-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--sk-cal-text-muted);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sk-cal-grid-cell {
    background: var(--sk-cal-surface);
    border: 2px solid transparent;
    border-radius: var(--sk-cal-radius-sm);
    padding: 4px;
    min-height: 62px;
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.sk-cal-grid-cell.empty {
    background: transparent;
    cursor: default;
    border: none;
}

.sk-cal-grid-cell:not(.empty):hover {
    border-color: var(--sk-cal-saffron);
}

.sk-cal-grid-cell.today {
    border-color: var(--sk-cal-saffron);
    background: var(--sk-cal-saffron-light);
}

.sk-cal-grid-cell.selected {
    border-color: var(--sk-cal-maroon);
}

.sk-cal-grid-cell.purnima {
    background: var(--sk-cal-gold-light);
}

.sk-cal-grid-cell.amavasya {
    background: var(--sk-cal-surface-alt);
}

.sk-cal-cell-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sk-cal-cell-day {
    font-size: 13px;
    font-weight: 700;
    color: var(--sk-cal-text);
    line-height: 1;
}

.sk-cal-moon-phase {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sk-cal-moon-phase.purnima {
    background: var(--sk-cal-gold);
    box-shadow: 0 0 3px var(--sk-cal-gold);
}

.sk-cal-moon-phase.amavasya {
    background: var(--sk-cal-text-muted);
    opacity: 0.5;
}

.sk-cal-cell-tithi {
    font-size: 10px;
    font-weight: 500;
    color: var(--sk-cal-text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sk-cal-cell-nak {
    font-size: 9px;
    color: var(--sk-cal-text-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sk-cal-cell-dots {
    display: flex;
    gap: 3px;
    margin-top: auto;
}

.sk-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.sk-cal-dot.major    { background: var(--sk-cal-saffron); }
.sk-cal-dot.regional { background: var(--sk-cal-blue); }
.sk-cal-dot.vrat     { background: var(--sk-cal-green); }
.sk-cal-dot.lunar    { background: var(--sk-cal-gold); }

/* ── Month festivals ──────────────────────────────────────────────── */

.sk-cal-month-festivals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sk-cal-month-fest-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sk-cal-month-fest-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.sk-cal-month-fest-row:hover {
    border-color: var(--sk-cal-saffron);
}

.sk-cal-month-fest-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--sk-cal-text-muted);
    min-width: 50px;
    font-variant-numeric: tabular-nums;
}

.sk-cal-month-fest-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-text);
}


/* ── Month: system labels, Calendar/List toggle, list view, special periods ── */

.sk-cal-month-system {
    font-weight: 500;
    color: var(--sk-cal-text-muted);
}

.sk-cal-month-mode {
    align-self: flex-end;
}

.sk-cal-month-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sk-cal-month-list-row {
    display: flex;
    gap: 12px;
    padding: 8px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.sk-cal-month-list-row:hover,
.sk-cal-month-list-row.today {
    border-color: var(--sk-cal-saffron);
}

.sk-cal-month-list-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    font-size: 11px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-month-list-date strong {
    font-size: 18px;
    line-height: 1.2;
    color: var(--sk-cal-text);
}

.sk-cal-month-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sk-cal-month-list-tithi {
    font-size: 14px;
    font-weight: 600;
    color: var(--sk-cal-text);
}

.sk-cal-month-list-meta {
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-month-list-fest {
    font-size: 12px;
    font-weight: 600;
    color: var(--sk-cal-maroon);
}

.sk-cal-special-row {
    flex-wrap: wrap;
    cursor: default;
}

.sk-cal-special-range {
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

/* ── Day: festival banner, "then" line, running-period badge ──────── */

.sk-cal-fest-banner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    background: var(--sk-cal-saffron-light);
    border: 1px solid var(--sk-cal-saffron);
    border-left-width: 4px;
    border-radius: var(--sk-cal-radius-sm);
}

.sk-cal-fest-banner-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.sk-cal-fest-banner-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

.sk-cal-fest-banner .sk-cal-fest-banner-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-saffron);
    text-decoration: none;
    white-space: nowrap;
}

.sk-cal-fest-banner .sk-cal-fest-banner-link:hover {
    text-decoration: underline;
}

.sk-cal-vedic-next {
    font-size: 11px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-timing-item.now {
    border-color: var(--sk-cal-saffron);
    box-shadow: 0 0 0 1px var(--sk-cal-saffron);
}

.sk-cal-now-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--sk-cal-saffron);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* ── Location selector ──────────────────────────────────────────── */

.sk-cal-location {
    position: relative;
    display: flex;
    justify-content: center;
}

.sk-cal-location-icon svg {
    display: block;
    color: var(--sk-cal-maroon);
}

.sk-cal-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 12px;
    border: 1px solid var(--sk-cal-border);
    border-radius: 16px;
    background: var(--sk-cal-surface);
    color: var(--sk-cal-text);
    font-family: var(--sk-cal-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.sk-cal-location-btn:hover,
.sk-cal-location-btn[aria-expanded="true"] {
    border-color: var(--sk-cal-saffron);
}

.sk-cal-location-caret {
    font-size: 10px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-location-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    z-index: 20;
    width: min(320px, 92vw);
    padding: 8px;
    transform: translateX(-50%);
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius);
    box-shadow: var(--sk-cal-shadow-lg);
    box-sizing: border-box;
}

.sk-cal-location-panel[hidden] {
    display: none;
}

.sk-cal-location-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    font-family: var(--sk-cal-font);
    font-size: 14px;
    box-sizing: border-box;
}

.sk-cal-location-input:focus {
    outline: none;
    border-color: var(--sk-cal-saffron);
}

.sk-cal-location-geo {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 6px 0;
    padding: 8px 10px;
    border: none;
    border-radius: var(--sk-cal-radius-sm);
    background: var(--sk-cal-saffron-light);
    color: var(--sk-cal-maroon);
    font-family: var(--sk-cal-font);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.sk-cal-location-list {
    max-height: 240px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.sk-cal-location-option,
.sk-cal-location-empty {
    padding: 8px 10px;
    border-radius: var(--sk-cal-radius-sm);
    font-size: 14px;
}

.sk-cal-location-option {
    cursor: pointer;
}

.sk-cal-location-option.active,
.sk-cal-location-option:hover {
    background: var(--sk-cal-saffron-light);
}

.sk-cal-location-option.current {
    font-weight: 600;
    color: var(--sk-cal-maroon);
}

.sk-cal-location-empty {
    color: var(--sk-cal-text-muted);
}

.sk-cal-vedic-pada-line {
    font-size: 11px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-vedic-pada {
    font-size: 13px;
    font-weight: 500;
    color: var(--sk-cal-text-muted);
}

/* ── Tara Balam / Chandra Balam ───────────────────────────────────── */

.sk-cal-balam {
    padding: 10px 12px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
}

.sk-cal-balam + .sk-cal-balam {
    margin-top: 8px;
}

.sk-cal-balam-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

.sk-cal-balam-when {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sk-cal-text-muted);
}

.sk-cal-balam-names {
    font-size: 13px;
    line-height: 1.5;
    color: var(--sk-cal-text);
}

/* ── Lagna table and kundali ──────────────────────────────────────── */

.sk-cal-lagna-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.sk-cal-lagna-row {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
}

.sk-cal-lagna-row.now {
    border-color: var(--sk-cal-saffron);
    box-shadow: 0 0 0 1px var(--sk-cal-saffron);
}

.sk-cal-lagna-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-text);
}

.sk-cal-lagna-time {
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

.sk-cal-kundali {
    margin-top: 12px;
    padding: 12px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius);
}

.sk-cal-kundali-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.sk-cal-kundali-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

.sk-cal-kundali-styles .sk-cal-toggle-btn {
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Longer style names in some languages: let the toggle wrap rather than clip. */
.sk-cal-kundali-head {
    flex-wrap: wrap;
    row-gap: 6px;
}

.sk-cal-kundali-svg {
    max-width: 340px;
    margin: 0 auto;
}

.sk-k-svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: var(--sk-cal-font);
}

.sk-k-line {
    fill: none;
    stroke: var(--sk-cal-saffron);
    stroke-width: 1.2;
}

.sk-k-centre {
    fill: var(--sk-cal-saffron-light);
    stroke: none;
}

.sk-k-graha {
    font-size: 11px;
    font-weight: 600;
    fill: var(--sk-cal-text);
}

.sk-k-lagna {
    fill: var(--sk-cal-maroon);
}

.sk-k-sign {
    font-size: 9px;
    fill: var(--sk-cal-text-muted);
}

.sk-k-title {
    font-size: 13px;
    font-weight: 700;
    fill: var(--sk-cal-maroon);
}

.sk-k-lagna-mark {
    stroke: var(--sk-cal-maroon);
    stroke-width: 1.5;
}

.sk-k-wheel-rashi {
    fill: var(--sk-cal-saffron);
    stroke: #fff;
    stroke-width: 1;
}

.sk-k-wheel-rashi.alt {
    fill: var(--sk-cal-maroon);
}

.sk-k-wheel-rashi-name {
    font-size: 9px;
    font-weight: 600;
    fill: #fff;
}

.sk-k-wheel-house {
    font-size: 10px;
    font-weight: 600;
    fill: var(--sk-cal-text-muted);
}

.sk-k-wheel-nak {
    fill: var(--sk-cal-saffron-light);
    stroke: var(--sk-cal-border);
    stroke-width: 0.6;
}

.sk-k-wheel-nak.alt {
    fill: var(--sk-cal-surface-alt);
}

.sk-k-wheel-nak-num {
    font-size: 7px;
    fill: var(--sk-cal-text-muted);
}

.sk-k-wheel-hub {
    fill: var(--sk-cal-surface);
    stroke: var(--sk-cal-border);
}

.sk-k-wheel-spoke {
    stroke: var(--sk-cal-text-muted);
    stroke-width: 0.7;
}

.sk-k-wheel-asc {
    stroke: var(--sk-cal-maroon);
    stroke-width: 1.5;
}

.sk-k-wheel-asc-label {
    font-size: 11px;
    font-weight: 700;
    fill: var(--sk-cal-maroon);
}

.sk-k-wheel-graha {
    font-size: 10px;
    font-weight: 600;
    fill: var(--sk-cal-text);
    paint-order: stroke;
    stroke: var(--sk-cal-surface);
    stroke-width: 3px;
}

.sk-cal-kundali-legend {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--sk-cal-text-muted);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* ── MOBILE RESPONSIVE ──────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    #sakalam-panchang-calendar {
        padding: 8px;
        max-width: 100%;
    }

    /* Header */
    .sk-cal-header-top {
        gap: 6px;
    }

    .sk-cal-toggle-btn {
        padding: 5px 14px;
        font-size: 12px;
    }

    .sk-cal-today-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .sk-cal-lang-select {
        font-size: 11px;
        padding: 5px 6px;
    }

    .sk-cal-nav-date-label {
        font-size: 13px;
    }

    .sk-cal-nav-date-box {
        padding: 5px 10px;
        gap: 4px;
    }

    .sk-cal-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    /* Chips */
    .sk-cal-chip {
        padding: 4px 8px;
        font-size: 11px;
    }

    /* Astro pills — stack on very narrow */
    .sk-cal-astro-pills {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .sk-cal-astro-pill {
        padding: 6px 8px;
        gap: 4px;
    }

    .sk-cal-astro-pill-icon {
        font-size: 14px;
    }

    .sk-cal-astro-pill-times {
        font-size: 10px;
    }

    .sk-cal-astro-pill-lbl {
        font-size: 9px;
    }

    .sk-cal-astro-pill-sep {
        display: none;
    }

    .sk-cal-astro-pill-times {
        flex-direction: column;
        gap: 0;
    }

    /* Vedic grid */
    .sk-cal-vedic-item {
        padding: 8px;
        min-height: 64px;
    }

    .sk-cal-vedic-value {
        font-size: 13px;
    }

    /* Timings */
    .sk-cal-timing-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .sk-cal-timing-item {
        padding: 6px 8px;
    }

    .sk-cal-timing-label {
        font-size: 9px;
    }

    .sk-cal-timing-value {
        font-size: 11px;
    }

    /* Hora */
    .sk-cal-hora-slots {
        grid-template-columns: repeat(4, 1fr);
    }

    .sk-cal-hora-slot {
        padding: 4px 2px;
    }

    .sk-cal-hora-planet {
        font-size: 12px;
    }

    .sk-cal-hora-time {
        font-size: 8px;
    }

    /* Rashi */
    .sk-cal-rashi-pill {
        padding: 6px 8px;
    }

    .sk-cal-rashi-label {
        font-size: 9px;
    }

    .sk-cal-rashi-value {
        font-size: 12px;
    }

    /* Month grid cells */
    .sk-cal-grid-cell {
        min-height: 54px;
        padding: 3px;
    }

    .sk-cal-cell-day {
        font-size: 12px;
    }

    .sk-cal-cell-tithi {
        font-size: 9px;
    }

    .sk-cal-cell-nak {
        font-size: 8px;
    }

    .sk-cal-moon-phase {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 360px) {
    .sk-cal-header-top {
        justify-content: center;
    }

    .sk-cal-astro-pills {
        grid-template-columns: 1fr;
    }

    .sk-cal-astro-pill-times {
        flex-direction: row;
        gap: 4px;
    }

    .sk-cal-astro-pill-sep {
        display: inline;
    }

    .sk-cal-vedic-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sk-cal-timing-grid {
        grid-template-columns: 1fr;
    }

    .sk-cal-rashi-row {
        grid-template-columns: 1fr;
    }
}

/* ── Festival Date Card ([sakalam_festival_date]) ──────────────────────── */
/* The H2 above the card is styled by the theme's section box; the card is
   the content inside that box. */

.sk-fest-card {
    color: var(--sk-cal-text);
}

.sk-fest-card-date {
    display: inline-block;
    margin: 4px 0 10px;
    padding: 6px 14px;
    background: var(--sk-cal-saffron-light);
    border-radius: 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--sk-cal-text);
}

.sk-fest-card-summary {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--sk-cal-text);
}

.sk-fest-card-na {
    margin: 8px 0 0;
    color: var(--sk-cal-text-muted);
}

.sk-fest-card .sk-fest-card-timings {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--sk-cal-border);
}

.sk-fest-card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--sk-cal-border);
    font-size: 16px;
    line-height: 1.5;
}

.sk-fest-card-label {
    font-weight: 600;
}

.sk-fest-card-sep {
    padding: 0 6px;
    color: var(--sk-cal-text-muted);
}

.sk-fest-card-muhurat .sk-fest-card-label {
    color: var(--sk-cal-maroon);
}

/* Location note and major-city muhurat table. */
.sk-fest-card-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--sk-cal-text-muted);
}

.sk-fest-card .sk-fest-city-table {
    width: 100%;
    margin: 12px 0 0;
    border-collapse: collapse;
    font-size: 14px;
}

.sk-fest-card .sk-fest-city-table caption {
    margin-bottom: 6px;
    text-align: left;
    font-weight: 600;
    color: var(--sk-cal-maroon);
}

.sk-fest-card .sk-fest-city-table th,
.sk-fest-card .sk-fest-city-table td {
    padding: 7px 10px;
    border: 1px solid var(--sk-cal-border);
    text-align: left;
}

.sk-fest-card .sk-fest-city-table thead th {
    background: var(--sk-cal-saffron-light);
    font-weight: 600;
}

.sk-fest-card .sk-fest-city-table tbody th {
    width: 40%;
    font-weight: 600;
}

/* Multi-day festivals: one block per day. */
.sk-fest-card .sk-fest-cluster-days {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sk-fest-cluster-day {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--sk-cal-border);
    border-left: 4px solid var(--sk-cal-saffron);
    border-radius: var(--sk-cal-radius-sm);
}

.sk-fest-cluster-day .sk-fest-card-timings {
    border-top: none;
}

.sk-fest-cluster-day .sk-fest-card-row:last-child {
    border-bottom: none;
}

.sk-fest-card .sk-fest-cluster-date {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.sk-fest-cluster-num {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--sk-cal-saffron);
    color: #fff;
    font-size: 12px;
}

.sk-fest-card .sk-fest-cluster-label {
    margin: 4px 0 0;
    font-size: 14px;
    font-style: italic;
    color: var(--sk-cal-text-muted);
}

.sk-fest-card .sk-fest-cluster-name {
    margin: 6px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

/* ── Festival Year Navigation ──────────────────────────────────────────── */

.sk-fest-year-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.sk-fest-year-btn,
.sk-fest-year-btn-spacer {
    min-width: 96px;
}

.sk-fest-card .sk-fest-year-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--sk-cal-saffron);
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sk-cal-saffron);
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s;
}

.sk-fest-card .sk-fest-year-btn:hover,
.sk-fest-card .sk-fest-year-btn:focus-visible {
    background: var(--sk-cal-saffron);
    color: #fff;
}

.sk-fest-year-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

.sk-fest-year-also {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--sk-cal-text-muted);
}

.sk-fest-card .sk-fest-year-also a {
    color: var(--sk-cal-text-muted);
    text-decoration: underline;
}

.sk-fest-card .sk-fest-year-also a:hover {
    color: var(--sk-cal-saffron);
}

.sk-fest-year-also-label {
    font-weight: 600;
}

@media (max-width: 600px) {
    .sk-fest-card-date {
        font-size: 16px;
    }

    .sk-fest-card-row {
        flex-direction: column;
        font-size: 15px;
    }

    .sk-fest-card-sep {
        display: none;
    }

    .sk-fest-year-btn,
    .sk-fest-year-btn-spacer {
        min-width: 84px;
    }

    .sk-fest-card .sk-fest-year-btn {
        padding: 0 12px;
    }
}

/* ── Panchang page: server-rendered summary (replaced by the calendar script) ── */

.sk-cal-static {
    max-width: 720px;
    color: var(--sk-cal-text);
    font-family: var(--sk-cal-font);
}

.sk-cal-static .sk-cal-static-title {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--sk-cal-maroon);
}

.sk-cal-static-summary {
    margin: 0 0 14px;
    line-height: 1.6;
}

.sk-cal-static .sk-cal-static-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
}

.sk-cal-static-table th,
.sk-cal-static-table td {
    padding: 8px 10px;
    border: 1px solid var(--sk-cal-border);
    text-align: left;
    vertical-align: top;
}

.sk-cal-static-table th {
    width: 40%;
    background: var(--sk-cal-surface-alt);
    font-weight: 600;
}

.sk-cal-static .sk-cal-static-table + .sk-cal-static-title {
    margin-top: 20px;
}

.sk-cal-static .sk-cal-static-fests {
    margin: 0 0 0 1.2em;
    padding: 0;
    line-height: 1.7;
}

/* ── Janma Kundali page ([sakalam_kundali]) ───────────────────────────── */

.sk-kd {
    max-width: 960px;
    color: var(--sk-cal-text);
    font-family: var(--sk-cal-font);
}

.sk-kd-form {
    padding: 16px;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-top: 4px solid var(--sk-cal-saffron);
    border-radius: var(--sk-cal-radius);
}

.sk-kd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.sk-kd-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 12px;
}

.sk-kd-grid .sk-kd-field {
    margin: 0;
}

.sk-kd-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sk-cal-maroon);
}

.sk-kd-hint {
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

.sk-kd input,
.sk-kd select {
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    background: #fff;
    color: var(--sk-cal-text);
    font-family: var(--sk-cal-font);
    font-size: 15px;
    box-sizing: border-box;
}

.sk-kd input:focus,
.sk-kd select:focus {
    outline: none;
    border-color: var(--sk-cal-saffron);
}

.sk-kd-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sk-kd-time select {
    width: auto;
    flex: 1;
}

.sk-kd-place {
    position: relative;
}

.sk-kd-place-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 260px;
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius-sm);
    box-shadow: var(--sk-cal-shadow-lg);
}

.sk-kd-place-list[hidden] {
    display: none;
}

.sk-kd-place-option,
.sk-kd-place-empty {
    padding: 8px 10px;
    border-radius: var(--sk-cal-radius-sm);
    font-size: 14px;
    color: var(--sk-cal-text-muted);
}

.sk-kd-place-option {
    cursor: pointer;
}

.sk-kd-place-option strong {
    color: var(--sk-cal-text);
}

.sk-kd-place-option:hover {
    background: var(--sk-cal-saffron-light);
}

.sk-kd-place-chosen {
    margin: -6px 0 6px;
    font-size: 13px;
    color: var(--sk-cal-text-muted);
}

.sk-kd .sk-kd-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--sk-cal-saffron);
    font-family: var(--sk-cal-font);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.sk-kd-manual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.sk-kd-manual[hidden] {
    display: none;
}

.sk-kd-error {
    margin: 10px 0 0;
    color: var(--sk-cal-maroon);
    font-size: 14px;
}

.sk-kd .sk-kd-submit {
    display: inline-block;
    min-height: 44px;
    margin-top: 12px;
    padding: 0 22px;
    border: none;
    border-radius: 22px;
    background: var(--sk-cal-saffron);
    color: #fff;
    font-family: var(--sk-cal-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sk-kd .sk-kd-submit:hover {
    background: var(--sk-cal-maroon);
}

.sk-kd-results {
    margin-top: 20px;
}

.sk-kd-loading {
    color: var(--sk-cal-text-muted);
}

.sk-kd .sk-kd-title {
    margin: 0;
    font-size: 22px;
    color: var(--sk-cal-maroon);
}

.sk-kd-sub {
    margin: 2px 0 14px;
    color: var(--sk-cal-text-muted);
}

.sk-kd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.sk-kd-chart {
    margin-top: 0;
}

.sk-kd-block {
    margin-top: 16px;
}

.sk-kd-layout .sk-kd-block {
    margin-top: 0;
}

.sk-kd .sk-kd-h {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--sk-cal-maroon);
}

.sk-kd-note {
    margin: 0 0 8px;
    font-size: 14px;
}

.sk-kd-scroll {
    overflow-x: auto;
}

.sk-kd .sk-kd-table {
    width: 100%;
    margin: 0 0 12px;
    border-collapse: collapse;
    font-size: 14px;
}

.sk-kd-table th,
.sk-kd-table td {
    padding: 7px 10px;
    border: 1px solid var(--sk-cal-border);
    text-align: left;
    vertical-align: top;
}

.sk-kd-table thead th,
.sk-kd-table tbody th {
    background: var(--sk-cal-surface-alt);
    font-weight: 600;
}

.sk-kd-table tbody th {
    width: 42%;
}

.sk-kd-table tr.current td {
    background: var(--sk-cal-saffron-light);
    font-weight: 600;
}

.sk-kd-actions {
    margin-top: 8px;
}

.sk-kd-credit {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

@media (max-width: 700px) {
    .sk-kd-grid,
    .sk-kd-layout {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sk-kd-form,
    .sk-kd-actions,
    .sk-cal-kundali-styles {
        display: none !important;
    }
}

.sk-kd-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: var(--sk-cal-saffron-light);
    border: 1px solid var(--sk-cal-saffron);
    border-left-width: 4px;
    border-radius: var(--sk-cal-radius-sm);
    font-size: 14px;
    line-height: 1.5;
}

.sk-kd-alert strong {
    color: var(--sk-cal-maroon);
}

.sk-kd-alert p {
    margin: 6px 0 0;
}

.sk-kd-alert .sk-kd-alert-tip {
    font-size: 12px;
    color: var(--sk-cal-text-muted);
}

/* ── Language menu (Panchang and Kundali pages) ───────────────────── */

.sk-lang {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
    font-family: var(--sk-cal-font);
}

.sk-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--sk-cal-saffron);
    border-radius: 999px;
    background: var(--sk-cal-surface);
    color: var(--sk-cal-maroon);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.sk-lang-btn::-webkit-details-marker {
    display: none;
}

.sk-lang-btn svg {
    color: var(--sk-cal-saffron);
}

.sk-lang-caret {
    font-size: 11px;
    color: var(--sk-cal-text-muted);
}

.sk-lang[open] .sk-lang-btn {
    background: var(--sk-cal-saffron-light);
}

.sk-lang-list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 2px;
    min-width: 240px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--sk-cal-surface);
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius);
    box-shadow: var(--sk-cal-shadow-lg);
}

.sk-lang-list li {
    margin: 0;
    padding: 0;
}

.sk-lang .sk-lang-list a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--sk-cal-radius-sm);
    color: var(--sk-cal-text);
    font-size: 15px;
    text-decoration: none;
}

.sk-lang .sk-lang-list a:hover,
.sk-lang .sk-lang-list a:focus {
    background: var(--sk-cal-saffron-light);
    color: var(--sk-cal-maroon);
}

.sk-lang .sk-lang-list a.current {
    background: var(--sk-cal-saffron);
    color: #fff;
    font-weight: 600;
}

/* ── Kundali print / PDF ──────────────────────────────────────────── */

/* Built only while printing (sakalam-kundali.js). */
.sk-kd-print-root {
    display: none;
}

@media print {
    @page {
        size: A4;
        margin: 10mm 12mm 12mm;
    }

    html.sk-kd-printing body > *:not(.sk-kd-print-root) {
        display: none !important;
    }

    html.sk-kd-printing,
    html.sk-kd-printing body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html.sk-kd-printing .sk-kd-print-root {
        display: block;
        font-family: var(--sk-cal-font);
        color: var(--sk-cal-text);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .sk-kd-print-table {
        width: 100%;
        border-collapse: collapse;
        border: 0;
        margin: 0;
    }

    .sk-kd-print-table > thead > tr > td,
    .sk-kd-print-table > tbody > tr > td {
        padding: 0;
        border: 0;
        background: none;
    }

    /* The header row repeats at the top of every printed page. */
    .sk-kd-print-table > thead {
        display: table-header-group;
    }

    .sk-kd-print-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 0 6px;
        margin: 0 0 12px;
        border-bottom: 2px solid var(--sk-cal-saffron);
    }

    .sk-kd-print-logo img {
        display: block;
        height: 40px;
        width: auto;
    }

    .sk-kd-print-root .sk-kd-print-url {
        color: var(--sk-cal-maroon);
        font-size: 12px;
        text-decoration: none;
    }

    /* Faint logo in the middle of every page. */
    /* Faint logo three times down every page: top, middle, bottom. */
    .sk-kd-watermark {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        opacity: 0.12;
        pointer-events: none;
        z-index: 2; /* Over the table cells, which have their own background. */
    }

    .sk-kd-watermark img {
        display: block;
        width: 60%;
        height: auto;
    }

    .sk-kd-print-root .sk-kd-results {
        position: relative;
        z-index: 1;
    }

    /* Compact, so a kundali fits on about three pages. */
    .sk-kd-print-root .sk-kd-results {
        font-size: 11px;
        line-height: 1.35;
    }

    .sk-kd-print-root .sk-kd-title {
        margin: 0 0 2px;
        font-size: 18px;
    }

    .sk-kd-print-root .sk-kd-sub {
        margin: 0 0 8px;
    }

    .sk-kd-print-root .sk-kd-alert {
        margin: 0 0 8px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .sk-kd-print-root .sk-kd-layout {
        display: grid;
        grid-template-columns: 46% 1fr;
        gap: 12px;
        align-items: start;
    }

    .sk-kd-print-root .sk-kd-block {
        margin: 0 0 10px;
    }

    .sk-kd-print-root .sk-kd-h {
        margin: 6px 0 4px;
        font-size: 13px;
        break-after: avoid;
    }

    .sk-kd-print-root .sk-kd-table {
        width: 100%;
        font-size: 11px;
    }

    .sk-kd-print-root .sk-kd-table th,
    .sk-kd-print-root .sk-kd-table td {
        padding: 2px 6px;
    }

    .sk-kd-print-root .sk-kd-chart,
    .sk-kd-print-root .sk-kd-alert,
    .sk-kd-print-root .sk-kd-table tr {
        break-inside: avoid;
    }

    .sk-kd-print-root .sk-kd-scroll {
        overflow: visible;
    }

    .sk-lang {
        display: none !important;
    }
}

/* ── Kundali: contact call-to-action under the report ─────────────── */

.sk-kd-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
    padding: 14px 16px;
    background: var(--sk-cal-saffron-light);
    border: 1px solid var(--sk-cal-saffron);
    border-radius: var(--sk-cal-radius);
}

.sk-kd-cta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    line-height: 1.45;
}

.sk-kd-cta-text strong {
    color: var(--sk-cal-maroon);
    font-size: 16px;
}

.sk-kd .sk-kd-cta-btn,
.sk-kd-print-root .sk-kd-cta-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--sk-cal-maroon);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.sk-kd .sk-kd-cta-btn:hover,
.sk-kd .sk-kd-cta-btn:focus {
    background: var(--sk-cal-saffron);
    color: #fff;
}

@media (max-width: 520px) {
    .sk-kd-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ── Kundali matching (Guna Milan) ────────────────────────────────── */

.sk-mt-people {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.sk-mt-person {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--sk-cal-border);
    border-radius: var(--sk-cal-radius);
    background: var(--sk-cal-surface);
}

.sk-mt-person legend {
    padding: 0 6px;
    color: var(--sk-cal-maroon);
    font-weight: 700;
}

.sk-mt-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: var(--sk-cal-radius);
    background: var(--sk-cal-saffron-light);
    border: 1px solid var(--sk-cal-saffron);
}

.sk-mt-score-num {
    flex-shrink: 0;
    color: var(--sk-cal-text-muted);
    font-size: 18px;
}

.sk-mt-score-num strong {
    color: var(--sk-cal-maroon);
    font-size: 36px;
    line-height: 1;
}

.sk-mt-score-text {
    flex: 1;
}

.sk-mt-bar {
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: var(--sk-cal-border);
    overflow: hidden;
}

.sk-mt-bar span {
    display: block;
    height: 100%;
    background: var(--sk-cal-saffron);
}

.sk-mt-excellent .sk-mt-bar span,
.sk-mt-good .sk-mt-bar span {
    background: var(--sk-cal-green);
}

.sk-mt-low .sk-mt-bar span {
    background: var(--sk-cal-maroon);
}

.sk-kd-table tr.sk-mt-zero td {
    color: var(--sk-cal-maroon);
}

.sk-kd-table tr.sk-mt-full td:nth-child(5) {
    color: var(--sk-cal-green);
    font-weight: 700;
}

.sk-kd-table tr.sk-mt-total td {
    font-weight: 700;
    background: var(--sk-cal-saffron-light);
}

.sk-mt-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.sk-mt-disclaimer {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 4px solid var(--sk-cal-saffron);
    background: var(--sk-cal-surface-alt);
    font-size: 13px;
    color: var(--sk-cal-text-muted);
}

@media (max-width: 700px) {
    .sk-mt-people,
    .sk-mt-two {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sk-kd-print-root .sk-mt-two {
        grid-template-columns: 1fr 1fr;
    }

    .sk-kd-print-root .sk-mt-score-num strong {
        font-size: 28px;
    }
}

/* ── Timings with more than one period; method note ───────────────── */

.sk-cal-timing-range {
    display: block;
}

.sk-cal-method-note,
.sk-cal-static-note {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sk-cal-text-muted);
}
