.pm-calendar {
    --pmcal-bg: #f4f5f8;
    --pmcal-surface: #ffffff;
    --pmcal-surface-soft: #f8f9fc;
    --pmcal-ink: #111827;
    --pmcal-muted: #667085;
    --pmcal-line: #e2e6ed;
    --pmcal-red: #ed1e24;
    --pmcal-red-dark: #b9121a;
    --pmcal-blue: #2475e8;
    --pmcal-green: #15956b;
    --pmcal-navy: #0c1526;
    --pmcal-serif: "Playfair Display", Georgia, serif;
    --pmcal-sans: "Montserrat", Arial, sans-serif;
    position: relative;
    z-index: 0;
    min-height: 80vh;
    overflow: clip;
    background: var(--pmcal-bg);
    color: var(--pmcal-ink);
    font-family: var(--pmcal-sans);
}

.pm-calendar *,
.pm-calendar *::before,
.pm-calendar *::after { box-sizing: border-box; }

.pmcal-container {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

.pmcal-hero {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    padding: 42px 0 38px;
    background:
        radial-gradient(circle at 82% 12%, rgba(237, 30, 36, .28), transparent 25rem),
        radial-gradient(circle at 14% 110%, rgba(255, 183, 77, .13), transparent 25rem),
        var(--pmcal-navy);
    color: #fff;
}

.pmcal-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(to right, #000, transparent 85%);
}

.pmcal-hero__layout { display: grid; gap: 28px; }

.pmcal-eyebrow,
.pmcal-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff9297;
    font-size: .69rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.pmcal-eyebrow .material-symbols-outlined { font-size: 18px; }

.pmcal-hero h1 {
    max-width: 760px;
    margin: 13px 0 14px;
    color: #fff;
    font-family: var(--pmcal-serif);
    font-size: clamp(2.4rem, 6.8vw, 4.35rem);
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: .98;
}

.pmcal-hero h1 em { color: #ffbc55; font-style: normal; }

.pmcal-hero__copy > p {
    max-width: 680px;
    margin: 0;
    color: #b9c3d4;
    font-size: clamp(.94rem, 2.7vw, 1.05rem);
    line-height: 1.65;
}

.pmcal-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }

.pmcal-primary-action,
.pmcal-secondary-action {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 17px;
    border-radius: 12px;
    font-family: var(--pmcal-sans);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.pmcal-primary-action {
    border: 1px solid var(--pmcal-red);
    background: var(--pmcal-red);
    color: #fff;
    cursor: pointer;
}

.pmcal-secondary-action {
    border: 1px solid rgba(255, 255, 255, .17);
    background: rgba(255, 255, 255, .075);
    color: #fff !important;
}

.pmcal-primary-action:hover,
.pmcal-secondary-action:hover { transform: translateY(-2px); }
.pmcal-primary-action .material-symbols-outlined,
.pmcal-secondary-action .material-symbols-outlined { font-size: 18px; }

.pmcal-next {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 19px;
    background: rgba(255, 255, 255, .075);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .22);
    backdrop-filter: blur(18px);
}

.pmcal-next__label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b9c3d4;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.pmcal-next__label i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 5px rgba(52, 211, 153, .12);
}

.pmcal-next__body { min-height: 72px; padding: 16px 0; }
.pmcal-next__date { display: block; margin-bottom: 7px; color: #ffbc55; font-size: .71rem; font-weight: 800; text-transform: uppercase; }
.pmcal-next__body strong,
.pmcal-next__body a { color: #fff !important; font-family: var(--pmcal-serif); font-size: 1.23rem; font-weight: 850; line-height: 1.18; text-decoration: none !important; }
.pmcal-next__body a { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pmcal-next__body a .material-symbols-outlined { flex: 0 0 auto; color: #ff9297; font-size: 19px; }

.pmcal-next__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.pmcal-next__stats span { padding-top: 13px; color: #aab5c7; font-size: .68rem; line-height: 1.25; }
.pmcal-next__stats strong { display: block; margin-bottom: 3px; color: #fff; font-size: 1.18rem; }

.pmcal-ad {
    position: relative;
    display: grid;
    min-width: 0;
    place-items: center;
    overflow: clip;
    border: 1px solid var(--pmcal-line);
    background: var(--pmcal-surface);
}

.pmcal-ad--leader,
.pmcal-ad--inline,
.pmcal-ad--lower {
    width: min(970px, calc(100% - 32px));
    min-height: 112px;
    margin: 24px auto;
    padding: 25px 8px 8px;
    border-radius: 15px;
}

.pmcal-ad--inline { margin-block: 30px; }
.pmcal-ad--lower { margin-block: 26px 0; }
.pmcal-ad--rail { width: 100%; min-height: 280px; padding: 26px 8px 8px; border-radius: 17px; }

.pmcal-ad__label {
    position: absolute;
    top: 8px;
    right: 8px;
    left: 8px;
    color: #8a94a5;
    font-size: .54rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-align: center;
    text-transform: uppercase;
}

.pmcal-ad .adsbygoogle,
.pmcal-ad .pm-adsbygoogle-suspended,
.pmcal-ad iframe { width: 100% !important; max-width: 100% !important; }

.pmcal-ad.pm-ad-unfilled,
.pmcal-ad[data-pm-ad-state="unfilled-collapsed"],
.pmcal-ad[data-pm-ad-state="failed-collapsed"] { display: none !important; }

.pmcal-workspace { padding-top: 8px; scroll-margin-top: 160px; }

.pmcal-toolbar {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
    padding: 14px;
    border: 1px solid var(--pmcal-line);
    border-radius: 18px;
    background: var(--pmcal-surface);
    box-shadow: 0 10px 30px rgba(17, 24, 39, .045);
}

.pmcal-month-nav { display: grid; grid-template-columns: 43px minmax(0, 1fr) 43px; align-items: center; gap: 8px; }
.pmcal-month-heading { min-width: 0; text-align: center; }
.pmcal-month-heading > span { display: block; color: var(--pmcal-muted); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pmcal-month-heading h2 { margin: 3px 0 0; color: var(--pmcal-ink); font-family: var(--pmcal-serif); font-size: clamp(1.3rem, 5vw, 1.75rem); font-weight: 900; line-height: 1.1; }

.pmcal-icon-btn {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 1px solid var(--pmcal-line);
    border-radius: 12px;
    background: var(--pmcal-surface-soft);
    color: var(--pmcal-ink);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.pmcal-icon-btn:hover { background: var(--pmcal-red); color: #fff; transform: translateY(-1px); }
.pmcal-icon-btn:disabled { cursor: wait; opacity: .5; transform: none; }

.pmcal-filter-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: var(--pmcal-surface-soft); }
.pmcal-filter { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 9px; background: transparent; color: var(--pmcal-muted); font-family: var(--pmcal-sans); font-size: .71rem; font-weight: 750; cursor: pointer; }
.pmcal-filter.is-active { background: var(--pmcal-surface); color: var(--pmcal-ink); box-shadow: 0 3px 12px rgba(17, 24, 39, .08); }
.pmcal-dot { width: 7px; height: 7px; border-radius: 50%; }
.pmcal-dot--movie { background: var(--pmcal-blue); }
.pmcal-dot--event { background: var(--pmcal-red); }

.pmcal-layout { display: grid; min-width: 0; gap: 18px; }
.pmcal-primary { min-width: 0; }
.pmcal-calendar { position: relative; min-height: 260px; overflow: hidden; border: 1px solid var(--pmcal-line); border-radius: 20px; background: var(--pmcal-surface); box-shadow: 0 16px 38px rgba(17, 24, 39, .05); }

.pmcal-loading {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: color-mix(in srgb, var(--pmcal-surface) 88%, transparent);
    backdrop-filter: blur(5px);
}

.pmcal-calendar.is-loading .pmcal-loading { display: flex; }
.pmcal-loading > span:not(.sr-only) { width: 9px; height: 9px; border-radius: 50%; background: var(--pmcal-red); animation: pmcal-pulse .75s ease-in-out infinite alternate; }
.pmcal-loading > span:nth-child(2) { animation-delay: .13s; }
.pmcal-loading > span:nth-child(3) { animation-delay: .26s; }
@keyframes pmcal-pulse { to { transform: translateY(-7px); opacity: .45; } }

.pmcal-weekdays,
.pmcal-grid { display: none; }
.pmcal-list { padding: 12px; }
.pmcal-date-group + .pmcal-date-group { margin-top: 11px; }
.pmcal-date-group { overflow: hidden; border: 1px solid var(--pmcal-line); border-radius: 16px; background: var(--pmcal-surface-soft); }
.pmcal-list-date { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--pmcal-line); }
.pmcal-list-date > strong { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--pmcal-navy); color: #fff; font-size: 1.07rem; }
.pmcal-list-date > span { color: var(--pmcal-ink); font-family: var(--pmcal-serif); font-size: 1.04rem; font-weight: 850; line-height: 1.05; }
.pmcal-list-date small { display: block; margin-top: 4px; color: var(--pmcal-muted); font-family: var(--pmcal-sans); font-size: .62rem; font-weight: 700; }
.pmcal-date-group__items { display: grid; gap: 1px; }

.pmcal-list-item {
    display: grid;
    grid-template-columns: 63px minmax(0, 1fr) 22px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--pmcal-surface);
    color: var(--pmcal-ink) !important;
    text-decoration: none !important;
}

.pmcal-list-item + .pmcal-list-item { border-top: 1px solid var(--pmcal-line); }
.pmcal-list-item > img { width: 63px; height: 78px; object-fit: cover; border-radius: 10px; background: #e8ebf1; }
.pmcal-list-item__copy { min-width: 0; }
.pmcal-list-item__copy > small { display: block; margin-bottom: 5px; color: var(--pmcal-red); font-size: .6rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.pmcal-list-item--movie .pmcal-list-item__copy > small { color: var(--pmcal-blue); }
.pmcal-list-item__copy > strong { display: -webkit-box; overflow: hidden; color: var(--pmcal-ink); font-size: .85rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pmcal-list-item__copy > em { display: flex; min-width: 0; align-items: center; gap: 4px; margin-top: 7px; overflow: hidden; color: var(--pmcal-muted); font-size: .67rem; font-style: normal; line-height: 1.3; }
.pmcal-list-item__copy > em .material-symbols-outlined { flex: 0 0 auto; font-size: 15px; }
.pmcal-list-item__arrow { color: #9ba5b5; font-size: 18px; }

.pmcal-rail { display: grid; gap: 16px; }
.pmcal-glance { padding: 20px; border: 1px solid var(--pmcal-line); border-radius: 18px; background: var(--pmcal-navy); color: #fff; }
.pmcal-glance h3 { margin: 7px 0 16px; color: #fff; font-family: var(--pmcal-serif); font-size: 1.5rem; }
.pmcal-glance__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; }
.pmcal-glance__grid span { padding: 13px; }
.pmcal-glance__grid span + span { border-left: 1px solid rgba(255, 255, 255, .1); }
.pmcal-glance__grid strong { display: block; color: #fff; font-size: 1.32rem; }
.pmcal-glance__grid small { color: #9eabc0; font-size: .62rem; }
.pmcal-glance > p { margin: 14px 0 0; color: #aab5c7; font-size: .74rem; line-height: 1.55; }

.pmcal-empty { grid-column: 1 / -1; padding: 48px 20px; text-align: center; }
.pmcal-empty > .material-symbols-outlined { color: #a9b2c0; font-size: 38px; }
.pmcal-empty strong { display: block; margin-top: 8px; color: var(--pmcal-ink); font-family: var(--pmcal-serif); font-size: 1.2rem; }
.pmcal-empty p { margin: 6px 0 0; color: var(--pmcal-muted); font-size: .76rem; }
.pmcal-empty button { margin-top: 14px; padding: 10px 14px; border: 0; border-radius: 9px; background: var(--pmcal-red); color: #fff; font: 800 .72rem var(--pmcal-sans); cursor: pointer; }

.pmcal-discover { padding: 14px 0 46px; }
.pmcal-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.pmcal-section-head h2 { margin: 5px 0 0; color: var(--pmcal-ink); font-family: var(--pmcal-serif); font-size: clamp(1.7rem, 4.5vw, 2.35rem); line-height: 1.08; }
.pmcal-section-head > a { display: inline-flex; align-items: center; gap: 6px; color: var(--pmcal-red) !important; font-size: .72rem; font-weight: 800; text-decoration: none !important; }
.pmcal-section-head > a .material-symbols-outlined { font-size: 17px; }

.pmcal-month-cards { display: grid; gap: 10px; }
.pmcal-month-cards button {
    position: relative;
    display: grid;
    min-height: 116px;
    grid-template-columns: 54px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 12px;
    padding: 15px;
    overflow: hidden;
    border: 1px solid var(--pmcal-line);
    border-radius: 17px;
    background: var(--pmcal-surface);
    color: var(--pmcal-ink);
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pmcal-month-cards button:hover { transform: translateY(-3px); border-color: #f3a7aa; box-shadow: 0 14px 28px rgba(17, 24, 39, .07); }
.pmcal-month-cards button > span { display: grid; width: 54px; height: 58px; place-items: center; border-radius: 14px; background: #fff0f1; color: var(--pmcal-red); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.pmcal-month-cards button > strong { min-width: 0; font-family: var(--pmcal-serif); font-size: 1.05rem; }
.pmcal-month-cards button > small { grid-column: 2; margin-top: -32px; color: var(--pmcal-muted); font-size: .63rem; }
.pmcal-month-cards button > i { grid-column: 3; grid-row: 1; color: var(--pmcal-red); font-size: 19px; }

.pmcal-paths { display: grid; gap: 10px; margin-top: 22px; }
.pmcal-paths > a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--pmcal-line); border-radius: 15px; background: var(--pmcal-surface-soft); color: var(--pmcal-ink) !important; text-decoration: none !important; }
.pmcal-paths > a > .material-symbols-outlined:first-child { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: #fff0f1; color: var(--pmcal-red); font-size: 20px; }
.pmcal-paths strong,
.pmcal-paths small { display: block; }
.pmcal-paths strong { color: var(--pmcal-ink); font-size: .77rem; }
.pmcal-paths small { margin-top: 3px; color: var(--pmcal-muted); font-size: .64rem; line-height: 1.35; }
.pmcal-paths > a > .material-symbols-outlined:last-child { color: #9ba5b5; font-size: 18px; }

@media (min-width: 700px) {
    .pmcal-container { width: min(1240px, calc(100% - 48px)); }
    .pmcal-hero { padding-block: 48px; }
    .pmcal-hero__layout { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); align-items: center; }
    .pmcal-toolbar { grid-template-columns: minmax(340px, 1fr) auto; align-items: center; padding: 13px 16px; }
    .pmcal-filter-group { min-width: 270px; }
    .pmcal-rail { grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); }
    .pmcal-month-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pmcal-month-cards button { grid-template-columns: 1fr 24px; align-content: center; }
    .pmcal-month-cards button > span { position: absolute; top: 12px; right: 12px; width: auto; height: auto; padding: 5px 7px; border-radius: 999px; }
    .pmcal-month-cards button > strong { padding-right: 35px; font-size: 1.12rem; }
    .pmcal-month-cards button > small { grid-column: 1; margin: 4px 0 0; }
    .pmcal-month-cards button > i { grid-column: 2; }
    .pmcal-paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .pmcal-list { display: none; }
    .pmcal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--pmcal-line); background: var(--pmcal-surface-soft); }
    .pmcal-weekdays span { padding: 13px 8px; color: var(--pmcal-muted); font-size: .62rem; font-weight: 850; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
    .pmcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .pmcal-day { min-width: 0; min-height: 148px; padding: 10px; border-right: 1px solid var(--pmcal-line); border-bottom: 1px solid var(--pmcal-line); background: var(--pmcal-surface); }
    .pmcal-day:nth-child(7n) { border-right: 0; }
    .pmcal-day.is-outside { background: var(--pmcal-surface-soft); }
    .pmcal-day.is-outside .pmcal-day__number { color: #b1b8c4; }
    .pmcal-day.is-today { box-shadow: inset 0 0 0 2px rgba(237, 30, 36, .38); }
    .pmcal-day__number { display: grid; width: 28px; height: 28px; place-items: center; margin-bottom: 8px; border-radius: 9px; color: var(--pmcal-ink); font-size: .72rem; font-weight: 850; }
    .pmcal-day.is-today .pmcal-day__number { background: var(--pmcal-red); color: #fff; }
    .pmcal-day__items { display: grid; gap: 6px; }
    .pmcal-item { display: grid; min-width: 0; grid-template-columns: 25px minmax(0, 1fr); gap: 6px; align-items: center; padding: 6px; border: 1px solid color-mix(in srgb, var(--pmcal-blue) 18%, var(--pmcal-line)); border-radius: 9px; background: color-mix(in srgb, var(--pmcal-blue) 7%, var(--pmcal-surface)); color: var(--pmcal-ink) !important; text-decoration: none !important; }
    .pmcal-item--event { border-color: color-mix(in srgb, var(--pmcal-red) 18%, var(--pmcal-line)); background: color-mix(in srgb, var(--pmcal-red) 6%, var(--pmcal-surface)); }
    .pmcal-item > img { width: 25px; height: 31px; object-fit: cover; border-radius: 6px; background: #e8ebf1; }
    .pmcal-item > span { min-width: 0; }
    .pmcal-item strong { display: block; overflow: hidden; color: var(--pmcal-ink); font-size: .59rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
    .pmcal-item small { display: block; margin-top: 2px; overflow: hidden; color: var(--pmcal-muted); font-size: .49rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
}

@media (min-width: 1180px) {
    .pmcal-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
    .pmcal-rail { position: sticky; top: 178px; grid-template-columns: 1fr; align-self: start; }
    .pmcal-day { min-height: 157px; }
}

@media (max-width: 699px) {
    .pmcal-hero h1 br { display: none; }
    .pmcal-next { padding: 17px; }
    .pmcal-ad--leader,
    .pmcal-ad--inline,
    .pmcal-ad--lower { width: calc(100% - 24px); min-height: 102px; margin-block: 16px; }
    .pmcal-workspace { width: calc(100% - 20px); }
    .pmcal-section-head { align-items: start; }
    .pmcal-section-head > a { max-width: 118px; justify-content: flex-end; text-align: right; }
    .pmcal-rail { margin-top: 2px; }
    .pmcal-ad--rail { min-height: 250px; }
}

:root.dark-theme .pm-calendar {
    --pmcal-bg: #070d18;
    --pmcal-surface: #0e1727;
    --pmcal-surface-soft: #121d2f;
    --pmcal-ink: #f4f7fb;
    --pmcal-muted: #9aa8bc;
    --pmcal-line: #263349;
    --pmcal-navy: #090f1d;
}

:root.dark-theme .pmcal-hero { border-bottom: 1px solid #263349; }
:root.dark-theme .pmcal-month-cards button > span,
:root.dark-theme .pmcal-paths > a > .material-symbols-outlined:first-child { background: rgba(237, 30, 36, .15); }
:root.dark-theme .pmcal-filter.is-active { background: #1c283b; }
:root.dark-theme .pmcal-ad { background: #0d1626; }
:root.dark-theme .pmcal-list-item > img,
:root.dark-theme .pmcal-item > img { background: #1a2638; }

@media (prefers-reduced-motion: reduce) {
    .pm-calendar *,
    .pm-calendar *::before,
    .pm-calendar *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
