.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px;
    margin: 12px 0 14px;
    background: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e1e2e6);
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--theme-shadow, rgba(20,24,32,.08));
    color: var(--theme-text, #222);
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--theme-surface-soft, #fafafa);
    color: var(--theme-text, #222);
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    border: 1px solid var(--theme-border, #e1e2e6);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.cal-nav-btn:hover {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
    border-color: var(--theme-accent, #d95e11);
    transform: translateY(-1px);
}

.cal-month-label {
    font-weight: 700;
    font-size: 18px;
    color: var(--theme-text, #222);
    min-width: 160px;
    text-align: center;
}

.cal-nav-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cal-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--theme-surface-soft, #fafafa);
    color: var(--theme-accent, #d95e11);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--theme-border-strong, #cfd2d8);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.cal-pill:hover {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
    border-color: var(--theme-accent, #d95e11);
}

.cal-pill-strong {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
    border-color: var(--theme-accent, #d95e11);
}

.cal-pill-strong:hover {
    background: var(--theme-accent-hover, #c0520f);
    border-color: var(--theme-accent-hover, #c0520f);
    color: var(--theme-on-accent, #fff);
}

.cal-jump {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cal-jump select,
.cal-jump button {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--theme-border-strong, #cfd2d8);
    background: var(--theme-surface, #fff);
    color: var(--theme-text, #222);
    font-size: 13px;
}

.cal-jump button {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
    cursor: pointer;
    font-weight: 600;
    border-color: var(--theme-accent, #d95e11);
}

.cal-jump button:hover {
    background: var(--theme-accent-hover, #c0520f);
    border-color: var(--theme-accent-hover, #c0520f);
}

.cal-list-cta {
    margin: 0 0 14px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    background: var(--theme-surface, #fff);
    border: 1px solid var(--theme-border, #e1e2e6);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 10px var(--theme-shadow, rgba(20,24,32,.08));
}

.cal-weekday {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--theme-muted, #777);
    padding: 6px 0;
}

.cal-cell {
    min-height: 110px;
    background: var(--theme-surface-soft, #fafafa);
    border: 1px solid var(--theme-border, #e1e2e6);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    color: var(--theme-text, #222);
}

.cal-cell-empty {
    background: transparent;
    border-color: transparent;
}

.cal-cell-today {
    border-color: var(--theme-accent, #d95e11);
    box-shadow: 0 0 0 1px var(--theme-accent, #d95e11) inset;
    background: var(--theme-accent-soft, #fff7f0);
}

.cal-cell-future .cal-day-num {
    color: var(--theme-accent, #d95e11);
}

.cal-cell-has {
    background: var(--theme-surface, #fff);
}

.cal-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cal-day-num {
    font-weight: 700;
    font-size: 13px;
    color: var(--theme-text, #222);
}

.cal-cell-today .cal-day-num {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
    border-radius: 999px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cal-day-count {
    font-size: 10px;
    font-weight: 700;
    background: var(--theme-accent-soft, #fff7f0);
    color: var(--theme-accent, #d95e11);
    border: 1px solid var(--theme-border, #e1e2e6);
    padding: 2px 6px;
    border-radius: 999px;
}

.cal-day-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.cal-ep {
    font-size: 11px;
    line-height: 1.3;
}

.cal-ep a {
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-decoration: none;
    color: var(--theme-text-soft, #444);
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color .12s ease, color .12s ease;
    overflow: hidden;
}

.cal-ep a:hover {
    background: var(--theme-accent, #d95e11);
    color: var(--theme-on-accent, #fff);
}

.cal-ep a:hover .cal-ep-badge {
    background: rgba(255,255,255,.22);
    color: var(--theme-on-accent, #fff);
}

.cal-ep-badge {
    font-size: 9px;
    font-weight: 700;
    background: var(--theme-surface-deep, #f0f0f0);
    color: var(--theme-muted, #777);
    padding: 1px 4px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cal-ep-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.cal-ep-more {
    font-size: 10px;
    color: var(--theme-muted, #777);
    font-style: italic;
    padding: 1px 4px;
}

/* Theme override: site-wide `body.site-modern a { color: var(--theme-accent) }`
   wins on specificity, so hover text becomes invisible on accent backgrounds.
   These selectors match that specificity to restore on-accent text. */
html[data-site-theme] .cal-pill:hover,
html[data-site-theme] .cal-pill-strong,
html[data-site-theme] .cal-pill-strong:hover,
html[data-site-theme] .cal-nav-btn:hover,
html[data-site-theme] .cal-ep a:hover,
html[data-site-theme] .cal-jump button,
html[data-site-theme] .cal-jump button:hover {
    color: var(--theme-on-accent);
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

html[data-site-theme] .cal-pill-strong:hover,
html[data-site-theme] .cal-jump button:hover {
    background: var(--theme-accent-hover);
    border-color: var(--theme-accent-hover);
}

html[data-site-theme] .cal-ep a:hover .cal-ep-name,
html[data-site-theme] .cal-ep a:hover .cal-ep-badge {
    color: var(--theme-on-accent);
}

.cal-empty-month {
    padding: 20px;
    text-align: center;
    color: var(--theme-muted, #777);
    font-size: 13px;
    background: var(--theme-surface-soft, #fafafa);
    border-radius: 10px;
    border: 1px dashed var(--theme-border, #e1e2e6);
    margin-top: 10px;
}

@media (max-width: 700px) {
    .cal-cell { min-height: 70px; padding: 4px; }
    .cal-ep-name { font-size: 10px; }
    .cal-ep-badge { display: none; }
    .cal-day-list .cal-ep:nth-child(n+3) { display: none; }
    .cal-month-label { font-size: 15px; min-width: 110px; }
    .cal-jump { display: none; }
}

/* Series page - countdown card */
.series-countdown-card {
    margin: 16px 0;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--theme-panel-gradient, linear-gradient(135deg, #fff7f0 0%, #fff 60%));
    color: var(--theme-text, #222);
    border: 1px solid var(--theme-border, #e1e2e6);
    border-left: 4px solid var(--theme-accent, #d95e11);
    box-shadow: 0 4px 14px var(--theme-shadow, rgba(20,24,32,.08));
    position: relative;
    overflow: hidden;
}

.series-countdown-kicker {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--theme-accent, #d95e11);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.series-countdown-kicker::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--theme-accent, #d95e11);
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--theme-focus, rgba(217,94,17,.18));
    animation: scd-pulse 1.6s infinite;
}

@keyframes scd-pulse {
    0%   { box-shadow: 0 0 0 0 var(--theme-focus, rgba(217,94,17,.4)); }
    70%  { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.series-countdown-title {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 4px;
    color: var(--theme-text, #222);
}

.series-countdown-subtitle {
    font-size: 13px;
    color: var(--theme-muted, #777);
    margin-bottom: 14px;
}

.series-countdown-clock {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.series-countdown-seg {
    background: var(--theme-surface, #fff);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 64px;
    text-align: center;
    border: 1px solid var(--theme-border, #e1e2e6);
}

.series-countdown-seg-val {
    font-variant-numeric: tabular-nums;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--theme-accent, #d95e11);
}

.series-countdown-seg-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
    color: var(--theme-muted, #777);
}

.series-countdown-airdate {
    font-size: 12px;
    color: var(--theme-text-soft, #444);
    margin-top: 8px;
}

.series-countdown-card.is-aired {
    border-left-color: var(--status-ok-solid, #2bb05a);
}
.series-countdown-card.is-aired .series-countdown-kicker { color: var(--status-ok-solid, #2bb05a); }
.series-countdown-card.is-aired .series-countdown-kicker::before { background: var(--status-ok-solid, #2bb05a); animation: none; }
.series-countdown-card.is-aired .series-countdown-seg-val { color: var(--status-ok-solid, #2bb05a); }
