.fvc-calendar {
    --fvc-accent: #ff5a66;
    --fvc-text: #24212b;
    --fvc-muted: #77727d;
    --fvc-border: #eee9ef;
    --fvc-soft: #f8f5f7;
    --fvc-danger: #cf3f45;
    width: 100%;
    max-width: 100%;
    color: var(--fvc-text);
    direction: rtl;
    font: inherit;
    box-sizing: border-box;
}
.fvc-calendar *, .fvc-calendar *::before, .fvc-calendar *::after { box-sizing: border-box; }
.fvc-calendar__shell {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--fvc-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 22px rgba(36, 33, 43, .045);
}
.fvc-calendar__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fvc-calendar__today-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fvc-calendar__eyebrow { color: var(--fvc-muted); font-size: 12px; }
.fvc-calendar__today-main { color: var(--fvc-text); font-size: 17px; font-weight: 750; line-height: 1.8; }
.fvc-calendar__gregorian, .fvc-calendar__selected-gregorian { color: var(--fvc-muted); font-size: 11px; line-height: 1.7; }
.fvc-calendar__status-pill { display: inline-flex; align-items: center; border-radius: 30px; padding: 4px 8px; font-size: 10px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.fvc-calendar__status-pill.is-official { color: #b52e37; background: #fff0f0; }
.fvc-calendar__nav { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 8px; margin-bottom: 12px; }
.fvc-calendar__month-title { margin: 0; color: var(--fvc-text); font-size: 16px; font-weight: 750; text-align: center; }
.fvc-calendar__nav-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--fvc-border); border-radius: 10px; background: #fff; color: var(--fvc-text); font: inherit; font-size: 23px; line-height: 1; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.fvc-calendar__nav-button:hover { border-color: #d7bfd9; background: var(--fvc-soft); }
.fvc-calendar__weekdays, .fvc-calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fvc-calendar__weekdays { margin-bottom: 5px; }
.fvc-calendar__weekday { padding: 7px 0; color: var(--fvc-muted); font-size: 11px; font-weight: 650; text-align: center; }
.fvc-calendar__weekday:last-child { color: var(--fvc-danger); }
.fvc-calendar__day { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 39px; padding: 5px 2px 7px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--fvc-text); font: inherit; font-size: 13px; font-weight: 550; line-height: 1.2; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.fvc-calendar__day:hover { border-color: #e6d5e8; background: var(--fvc-soft); }
.fvc-calendar__day.is-outside { color: #c6c1c9; }
.fvc-calendar__day.is-holiday { color: var(--fvc-accent); }
.fvc-calendar__day.is-today { border-color: var(--fvc-accent); color: var(--fvc-accent); font-weight: 800; }
.fvc-calendar__day.is-selected { border-color: var(--fvc-accent); background: var(--fvc-accent); color: #fff; font-weight: 800; }
.fvc-calendar__day.is-selected.is-holiday { color: #fff; }
.fvc-calendar__marker { position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.fvc-calendar__day.is-selected .fvc-calendar__marker { background: #fff; }
.fvc-calendar__selected-panel { margin-top: 15px; padding: 13px; border-radius: 12px; background: var(--fvc-soft); }
.fvc-calendar__selected-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fvc-calendar__selected-title { margin: 0; color: var(--fvc-text); font-size: 13px; font-weight: 750; line-height: 1.9; }
.fvc-calendar__section-title { margin: 0 0 8px; color: var(--fvc-text); font-size: 13px; font-weight: 750; }
.fvc-calendar__events { margin-top: 10px; }
.fvc-calendar__event-list, .fvc-calendar__upcoming-list { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.fvc-calendar__event-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: var(--fvc-text); font-size: 12px; line-height: 1.8; }
.fvc-calendar__event-title, .fvc-calendar__upcoming-title { min-width: 0; }
.fvc-calendar__event-tag { flex: 0 0 auto; color: #b52e37; font-size: 10px; }
.fvc-calendar__empty { margin: 0; color: var(--fvc-muted); font-size: 11px; line-height: 1.8; }
.fvc-calendar__annual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fvc-calendar__annual-item { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--fvc-border); border-radius: 10px; }
.fvc-calendar__annual-label { color: var(--fvc-muted); font-size: 10px; line-height: 1.6; }
.fvc-calendar__annual-value { color: var(--fvc-accent); font-size: 17px; font-weight: 800; }
.fvc-calendar__upcoming { margin-top: 15px; }
.fvc-calendar__upcoming-item { display: flex; align-items: baseline; gap: 9px; color: var(--fvc-text); font-size: 11px; line-height: 1.8; }
.fvc-calendar__upcoming-date { flex: 0 0 auto; min-width: 44px; color: var(--fvc-accent); font-weight: 750; direction: ltr; text-align: center; }
.fvc-calendar button:focus-visible { outline: 2px solid var(--fvc-accent); outline-offset: 2px; }
.fvc-calendar__loading, .fvc-calendar__noscript { padding: 14px; color: var(--fvc-muted); font-size: 13px; }

/* Compact sidebar variant. */
.fvc-calendar--compact .fvc-calendar__shell { padding: 12px; border-radius: 13px; box-shadow: none; }
.fvc-calendar--compact .fvc-calendar__top { flex-direction: column; gap: 7px; margin-bottom: 10px; }
.fvc-calendar--compact .fvc-calendar__today-main { font-size: 14px; }
.fvc-calendar--compact .fvc-calendar__nav { grid-template-columns: 30px 1fr 30px; gap: 5px; }
.fvc-calendar--compact .fvc-calendar__nav-button { width: 30px; height: 30px; border-radius: 8px; }
.fvc-calendar--compact .fvc-calendar__month-title { font-size: 14px; }
.fvc-calendar--compact .fvc-calendar__weekdays, .fvc-calendar--compact .fvc-calendar__grid { gap: 2px; }
.fvc-calendar--compact .fvc-calendar__weekday { font-size: 10px; }
.fvc-calendar--compact .fvc-calendar__day { min-height: 32px; border-radius: 8px; font-size: 11px; }
.fvc-calendar--compact .fvc-calendar__selected-panel { padding: 10px; }
.fvc-calendar--compact .fvc-calendar__annual-item { padding: 8px; }

@media (max-width: 480px) {
    .fvc-calendar__shell { padding: 12px; border-radius: 13px; }
    .fvc-calendar__day { min-height: 38px; }
    .fvc-calendar__today-main { font-size: 15px; }
    .fvc-calendar__month-title { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .fvc-calendar *, .fvc-calendar *::before, .fvc-calendar *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* 0.3.0: compact summary-first layout and accessible upcoming-events dialog. */
.fvc-calendar__top {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.fvc-calendar__today-card { gap: 2px; }
.fvc-calendar__eyebrow { font-size: 10px; line-height: 1.4; }
.fvc-calendar__today-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 9px;
    row-gap: 1px;
}
.fvc-calendar__today-main { font-size: 15px; line-height: 1.55; }
.fvc-calendar__gregorian { font-size: 10px; line-height: 1.5; white-space: nowrap; }
.fvc-calendar__top > .fvc-calendar__status-pill { flex: 0 0 auto; }
.fvc-calendar__annual {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 16px;
    margin: 0 0 10px;
    padding: 7px 9px;
    border: 1px solid var(--fvc-border);
    border-radius: 10px;
    background: #fff;
}
.fvc-calendar__annual-item {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 0;
}
.fvc-calendar__annual-value { font-size: 13px; line-height: 1.4; }
.fvc-calendar__annual-label { font-size: 10px; line-height: 1.4; }
.fvc-calendar__nav { margin-bottom: 8px; }
.fvc-calendar__upcoming { margin-top: 13px; }
.fvc-calendar__upcoming-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}
.fvc-calendar__upcoming-header .fvc-calendar__section-title { margin: 0; }
.fvc-calendar__view-all {
    flex: 0 0 auto;
    padding: 3px 9px;
    border: 1px solid var(--fvc-border);
    border-radius: 7px;
    background: #fff;
    color: var(--fvc-accent);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.fvc-calendar__view-all:hover { background: var(--fvc-soft); }
.fvc-calendar__upcoming-item { align-items: flex-start; }
.fvc-calendar__upcoming-date { direction: rtl; min-width: 70px; text-align: right; }
.fvc-calendar__dialog {
    width: min(620px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    max-height: min(78vh, 720px);
    margin: auto;
    padding: 17px;
    overflow: auto;
    border: 1px solid var(--fvc-border);
    border-radius: 16px;
    background: #fff;
    color: var(--fvc-text);
    box-shadow: 0 18px 70px rgba(20, 15, 25, .2);
    direction: rtl;
    font: inherit;
}
.fvc-calendar__dialog::backdrop { background: rgba(24, 20, 29, .48); }
.fvc-calendar__dialog-header {
    position: sticky;
    top: -17px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -17px -17px 13px;
    padding: 13px 17px;
    border-bottom: 1px solid var(--fvc-border);
    background: #fff;
}
.fvc-calendar__dialog-title { margin: 0; font-size: 14px; font-weight: 750; }
.fvc-calendar__dialog-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid var(--fvc-border);
    border-radius: 8px;
    background: #fff;
    color: var(--fvc-text);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.fvc-calendar__dialog .fvc-calendar__upcoming-list { gap: 9px; }
.fvc-calendar__dialog .fvc-calendar__upcoming-item {
    padding-bottom: 8px;
    border-bottom: 1px solid #f1edf2;
    font-size: 12px;
}
.fvc-calendar__dialog .fvc-calendar__upcoming-item:last-child { border-bottom: 0; }
.fvc-calendar__dialog button:focus-visible { outline: 2px solid var(--fvc-accent); outline-offset: 2px; }

.fvc-calendar--compact .fvc-calendar__top { flex-direction: row; align-items: center; gap: 8px; }
.fvc-calendar--compact .fvc-calendar__today-main { font-size: 14px; }
.fvc-calendar--compact .fvc-calendar__annual { gap: 6px 12px; padding: 6px 8px; }
.fvc-calendar--compact .fvc-calendar__annual-value { font-size: 12px; }
.fvc-calendar--compact .fvc-calendar__annual-label { font-size: 9px; }

@media (max-width: 480px) {
    .fvc-calendar__top { align-items: flex-start; }
    .fvc-calendar__today-main { font-size: 14px; }
    .fvc-calendar__annual { gap: 5px 12px; }
}

/* 0.4.0: reader-accent styling, three annual metrics, and compact navigation. */
.fvc-calendar {
    --fvc-accent: var(--fr-reader-accent, #ff5a66);
    --fvc-accent-soft: rgb(255 90 102 / .10);
}
.fvc-calendar__top {
    align-items: center;
    min-width: 0;
    gap: 8px 12px;
    margin-bottom: 9px;
}
.fvc-calendar__today-card { flex: 1 1 auto; }
.fvc-calendar__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    font-size: 10px;
    font-weight: 700;
}
.fvc-calendar__today-line { column-gap: 8px; }
.fvc-calendar__today-main { line-height: 1.55; }
.fvc-calendar__gregorian { font-size: 10px; color: var(--fvc-muted); }
.fvc-calendar__today-events {
    display: flex;
    flex: 0 1 52%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 6px;
    min-width: 0;
    direction: rtl;
    text-align: left;
}
.fvc-calendar__today-event {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 7px;
    color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    font-size: 10px;
    line-height: 1.65;
}
.fvc-calendar__today-event.is-official {
    font-weight: 750;
    box-shadow: inset 0 0 0 1px rgb(255 90 102 / .18);
}
.fvc-calendar__annual {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    margin: 0 0 9px;
    padding: 6px;
    border: 1px solid var(--fvc-border);
    border-radius: 10px;
    background: #fff;
}
.fvc-calendar__annual-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 5px 3px;
    border: 0;
    border-radius: 7px;
    background: var(--fvc-soft);
    text-align: center;
}
.fvc-calendar__annual-value { color: var(--fvc-accent); font-size: 15px; line-height: 1.4; }
.fvc-calendar__annual-label { font-size: 9px; line-height: 1.5; }
.fvc-calendar__nav { grid-template-columns: 34px minmax(0, 1fr) auto 34px; gap: 6px; }
.fvc-calendar__today-jump {
    padding: 4px 8px;
    border: 1px solid rgb(255 90 102 / .2);
    border-radius: 7px;
    color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}
.fvc-calendar__today-jump[hidden] { display: none; }
.fvc-calendar__day:hover,
.fvc-calendar__day:focus-visible {
    border-color: rgb(255 90 102 / .24);
    background: var(--fvc-accent-soft);
    color: var(--fvc-accent);
}
.fvc-calendar__day.is-today {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    color: var(--fvc-accent);
    font-weight: 850;
}
.fvc-calendar__day.is-selected,
.fvc-calendar__day.is-selected:hover,
.fvc-calendar__day.is-selected:focus-visible {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent);
    color: #fff;
}
.fvc-calendar__status-pill.is-official,
.fvc-calendar__event-tag.is-official {
    color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    border-radius: 6px;
    padding: 2px 7px;
}
.fvc-calendar__view-all {
    border-color: rgb(255 90 102 / .2);
    color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
}
.fvc-calendar__view-all:hover,
.fvc-calendar__today-jump:hover { background: rgb(255 90 102 / .16); }
.fvc-calendar__dialog {
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.fvc-calendar__dialog-section-label {
    margin: 0 0 8px;
    color: var(--fvc-muted);
    font-size: 11px;
    font-weight: 700;
}
.fvc-calendar__dialog-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 17px 0 12px;
    color: var(--fvc-accent);
    font-size: 11px;
    font-weight: 800;
    scroll-margin-top: 58px;
}
.fvc-calendar__dialog-divider::before,
.fvc-calendar__dialog-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgb(255 90 102 / .24);
}
.fvc-calendar__dialog .fvc-calendar__event-tag.is-official { white-space: nowrap; }
.fvc-calendar--compact .fvc-calendar__nav { grid-template-columns: 30px minmax(0, 1fr) auto 30px; gap: 4px; }
.fvc-calendar--compact .fvc-calendar__today-jump { padding: 3px 6px; font-size: 9px; }
.fvc-calendar--compact .fvc-calendar__annual { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 5px; }
.fvc-calendar--compact .fvc-calendar__annual-item { padding: 5px 2px; }
.fvc-calendar--compact .fvc-calendar__annual-value { font-size: 13px; }
.fvc-calendar--compact .fvc-calendar__annual-label { font-size: 8px; }
@media (max-width: 480px) {
    .fvc-calendar__today-events { flex-basis: 100%; max-width: 100%; }
    .fvc-calendar__top { align-items: flex-start; }
    .fvc-calendar__annual { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fvc-calendar__nav { grid-template-columns: 32px minmax(0, 1fr) auto 32px; gap: 4px; }
    .fvc-calendar__today-jump { padding: 3px 6px; font-size: 9px; }
}
.fvc-calendar__selected-flags { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }


/* 0.4.1: final visual cleanup. */
.fvc-calendar__eyebrow { display: none !important; }
.fvc-calendar__nav:not(.has-today-jump) { grid-template-columns: 36px minmax(0, 1fr) 36px; }
.fvc-calendar__nav.has-today-jump { grid-template-columns: 36px minmax(0, 1fr) auto 36px; }
.fvc-calendar--compact .fvc-calendar__nav:not(.has-today-jump) { grid-template-columns: 30px minmax(0, 1fr) 30px; }
.fvc-calendar--compact .fvc-calendar__nav.has-today-jump { grid-template-columns: 30px minmax(0, 1fr) auto 30px; }
.fvc-calendar__view-all {
    border: 0;
    border-inline-start: 3px solid var(--fvc-accent);
    border-radius: 0;
    padding: 2px 0 2px 8px;
    color: var(--fvc-accent);
    background: transparent;
    font-weight: 750;
}
.fvc-calendar__view-all:hover,
.fvc-calendar__view-all:focus-visible {
    background: transparent;
    color: var(--fvc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.fvc-calendar__day.is-holiday {
    color: var(--fvc-accent);
}
.fvc-calendar__day.is-holiday:hover,
.fvc-calendar__day.is-holiday:focus-visible {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    color: var(--fvc-accent);
}

/* 0.4.2: stable selected-day details, multi-event today summary, and modal polish. */
.fvc-calendar__today-events {
    display: flex;
    flex: 0 1 48%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}
.fvc-calendar__today-event {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 2px 7px;
    line-height: 1.5;
    text-align: right;
    white-space: normal;
}
.fvc-calendar__today-more {
    display: block;
    max-width: 100%;
    padding: 0 3px;
    color: var(--fvc-muted);
    font-size: 9px;
    font-weight: 650;
    line-height: 1.5;
}
.fvc-calendar__selected-panel {
    margin-top: 12px;
    padding: 10px 13px;
}
.fvc-calendar__selected-header {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2px 10px;
}
.fvc-calendar__selected-title {
    min-width: 0;
    font-size: 12px;
    line-height: 1.7;
}
.fvc-calendar__selected-gregorian {
    flex: 0 0 auto;
    color: var(--fvc-muted);
    font-size: 10px;
    line-height: 1.6;
    direction: rtl;
    text-align: left;
    white-space: nowrap;
}
.fvc-calendar__events { margin-top: 5px; }
.fvc-calendar__events .fvc-calendar__event-list { gap: 4px; }
.fvc-calendar .fvc-calendar__view-all {
    border: 1px solid var(--fvc-accent);
    border-radius: 10px;
    padding: 4px 11px;
    background: var(--fvc-accent);
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
    transition: filter .15s ease, box-shadow .15s ease;
}
.fvc-calendar .fvc-calendar__view-all:hover,
.fvc-calendar .fvc-calendar__view-all:focus-visible {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent);
    color: #fff;
    filter: brightness(.96);
    text-decoration: none;
}
.fvc-calendar__dialog.is-fallback {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 999999;
    transform: translate(-50%, -50%);
}
.fvc-calendar__dialog.is-fallback::before {
    content: "";
    position: fixed;
    inset: -100vh -100vw;
    z-index: -1;
    background: rgba(24, 20, 29, .48);
}
@media (max-width: 480px) {
    .fvc-calendar__top { flex-wrap: wrap; }
    .fvc-calendar__today-card { flex: 1 1 100%; }
    .fvc-calendar__today-events { flex: 1 1 100%; max-width: 100%; }
}


/* 0.4.3: exact date-header, day-state, details-height and calendar-frame adjustments. */
.fvc-calendar__today-card {
    flex: 1 1 100%;
    width: 100%;
}
.fvc-calendar__today-line {
    width: 100%;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.fvc-calendar__today-main { flex: 0 1 auto; }
.fvc-calendar__gregorian {
    flex: 0 0 auto;
    margin-inline-start: auto;
    white-space: nowrap;
}

/* The calendar frame uses the same 1px border token as the annual summary. */
.fvc-calendar__board {
    padding: 8px;
    border: 1px solid var(--fvc-border);
    border-radius: 10px;
    background: #fff;
}
.fvc-calendar--compact .fvc-calendar__board { padding: 6px; }

/* Hover, keyboard focus, today and selected day all share today's accent treatment. */
.fvc-calendar .fvc-calendar__day:hover,
.fvc-calendar .fvc-calendar__day:focus-visible,
.fvc-calendar .fvc-calendar__day.is-today,
.fvc-calendar .fvc-calendar__day.is-selected,
.fvc-calendar .fvc-calendar__day.is-selected:hover,
.fvc-calendar .fvc-calendar__day.is-selected:focus-visible {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
    color: var(--fvc-accent);
}
.fvc-calendar .fvc-calendar__day.is-selected { font-weight: 850; }
.fvc-calendar .fvc-calendar__day.is-selected.is-holiday { color: var(--fvc-accent); }
.fvc-calendar .fvc-calendar__day.is-selected .fvc-calendar__marker { background: var(--fvc-accent); }

/* The All button mirrors the current-day treatment with a slightly tighter radius. */
.fvc-calendar .fvc-calendar__view-all,
.fvc-calendar .fvc-calendar__view-all:hover,
.fvc-calendar .fvc-calendar__view-all:focus-visible {
    border: 1px solid var(--fvc-accent);
    border-radius: 8px;
    padding: 3px 9px;
    background: var(--fvc-accent-soft);
    color: var(--fvc-accent);
    text-decoration: none;
    font-weight: 800;
}

/* One-line empty and one-event states have the same minimum height. */
.fvc-calendar__events {
    display: flex;
    align-items: center;
    min-height: 22px;
    margin-top: 5px;
}
.fvc-calendar__events .fvc-calendar__empty {
    display: flex;
    align-items: center;
    min-height: 22px;
    line-height: 22px;
}
.fvc-calendar__events .fvc-calendar__event-list {
    width: 100%;
}
.fvc-calendar__events .fvc-calendar__event-item {
    align-items: center;
    min-height: 22px;
    line-height: 1.6;
}
.fvc-calendar__events .fvc-calendar__event-tag.is-official {
    padding-top: 1px;
    padding-bottom: 1px;
    line-height: 1.4;
}


/* 0.4.9: keep Jannah's native icon element, font and calendar glyph. */
.widget_fvc_calendar .widget-title .widget-title-icon.tie-icon::before,
.fvc-mobile-launcher .widget-title-icon.tie-icon::before {
    content: "\f073" !important;
    font-family: "tiefonticon", "Font Awesome 5 Free" !important;
    font-style: normal !important;
    font-weight: 400 !important;
    display: inline-block !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased;
    /* Keep the native Jannah icon color; do not force a calendar-specific color. */
}

/* The collapse control sits in the free space between both dates, not on a new row. */
.fvc-calendar[data-collapsible="1"] .fvc-calendar__today-line {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    gap: 6px;
}
.fvc-calendar[data-collapsible="1"] .fvc-calendar__today-main {
    min-width: 0;
    text-align: right;
    white-space: nowrap;
}
.fvc-calendar[data-collapsible="1"] .fvc-calendar__gregorian {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
    text-align: left;
    white-space: nowrap;
}
.fvc-calendar[data-collapsible="1"] .fvc-calendar__collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    align-self: center;
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--fvc-accent);
    cursor: pointer;
    line-height: 1 !important;
    transition: background-color .16s ease, border-color .16s ease;
    -webkit-appearance: none;
    appearance: none;
}
.fvc-calendar[data-collapsible="1"] .fvc-calendar__collapse-toggle:hover,
.fvc-calendar[data-collapsible="1"] .fvc-calendar__collapse-toggle:focus-visible {
    border-color: var(--fvc-accent);
    background: var(--fvc-accent-soft);
}
.fvc-calendar__collapse-chevron {
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(225deg);
    transition: transform .18s ease;
}
.fvc-calendar.is-collapsed .fvc-calendar__collapse-chevron {
    transform: rotate(45deg);
}
.fvc-calendar.is-collapsed .fvc-calendar__content {
    display: none !important;
}
.fvc-calendar.is-collapsed .fvc-calendar__top {
    margin-bottom: 2px;
}
.fvc-calendar.is-collapsed .fvc-calendar__shell {
    padding-bottom: 8px;
}

/* Standalone mobile launcher: never nest it inside the initially hidden Reader Tools panel. */
.fvc-mobile-launcher {
    display: none !important;
}
.fvc-mobile-launcher .widget-title-icon {
    position: static !important;
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: 18px !important;
    line-height: 1 !important;
    vertical-align: middle;
}
@media (max-width: 767px) {
	body > .fvc-mobile-launcher {
		position: fixed !important;
		z-index: 1000005 !important;

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

		left: 50% !important;
		right: auto !important;
		top: auto !important;
		bottom: 10px !important;

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

		margin: 0 !important;
		padding: 0 !important;

		border: 1px solid var(--fr-reader-border, #e9e4eb) !important;
		border-radius: 50% !important;

		background: var(--fr-reader-surface, #fff) !important;
		color: var(--fr-reader-accent) !important;

		box-shadow: 0 5px 25px rgba(0,0,0,0.3) !important;

		transform: translateX(-50%) !important;
		cursor: pointer;

		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;

		-webkit-appearance: none;
		appearance: none;
	}
}

/* Bottom-sheet viewer moves the existing widget; it never creates a second calendar. */
.fvc-mobile-calendar-dialog {
    position: fixed;
    inset: auto 0 0;
    width: min(100%, 680px);
    max-width: min(100%, 680px);
    max-height: 88vh;
    max-height: 88dvh;
    margin: auto 0 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    color: #24212b;
    box-shadow: 0 -12px 45px rgba(20, 16, 24, .20);
    direction: rtl;
}
.fvc-mobile-calendar-dialog::backdrop {
    background: rgba(24, 20, 29, .52);
}
.fvc-mobile-calendar-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}
.fvc-mobile-calendar-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 8px 16px;
    border-bottom: 1px solid #eee9ef;
    background: #fff;
}
.fvc-mobile-calendar-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: #d8d3da;
    transform: translate(-50%, -50%);
}
.fvc-mobile-calendar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #eee9ef;
    border-radius: 8px;
    background: #fff;
    color: #55505a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.fvc-mobile-calendar-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(88vh - 48px);
    max-height: calc(88dvh - 48px);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.fvc-mobile-calendar-body > .widget_fvc_calendar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
}
.fvc-mobile-calendar-body .fvc-calendar {
    width: 100%;
}
.fvc-mobile-calendar-body .fvc-calendar__collapse-toggle {
    display: none !important;
}
.fvc-mobile-calendar-dialog.is-fallback[open] {
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}
.fvc-mobile-calendar-dialog.is-fallback[open]::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background: rgba(24, 20, 29, .52);
    content: "";
}
.fvc-mobile-calendar-dialog.is-fallback[open] .fvc-mobile-calendar-sheet {
    width: min(100%, 680px);
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 45px rgba(20, 16, 24, .20);
}



/* Pointer/touch focus should not leave an ornamental ring; keyboard focus stays visible. */
.fvc-calendar button:focus:not(:focus-visible),
.fvc-mobile-calendar-close:focus:not(:focus-visible),
body > .fvc-mobile-launcher:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
.fvc-mobile-calendar-close:focus-visible {
    outline: 2px solid var(--fr-reader-accent, currentColor);
    outline-offset: 2px;
}

/* 0.4.7: centered inline chevron keeps hover space equal on all sides. */
@media (max-width: 360px) {
    .fvc-calendar[data-collapsible="1"] .fvc-calendar__today-line {
        grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
        gap: 3px;
    }
    .fvc-calendar[data-collapsible="1"] .fvc-calendar__collapse-toggle {
        width: 26px;
        min-width: 26px;
        height: 26px;
        flex-basis: 26px;
    }
    .fvc-calendar[data-collapsible="1"] .fvc-calendar__today-main { font-size: 13px; }
    .fvc-calendar[data-collapsible="1"] .fvc-calendar__gregorian { font-size: 9px; }
}

/* Static snapshot uses the same design tokens; do not suggest clickable cells. */
.fvc-calendar__snapshot .fvc-calendar__day { cursor: default; }
.fvc-calendar__snapshot .fvc-calendar__day:hover { background: transparent; }
.fvc-calendar__snapshot-note { margin-top: 10px; }
.fvc-calendar__snapshot summary { cursor: pointer; }
