:root {
    --bg: #050505;
    --panel: #050505;
    --panel-soft: #101010;
    --panel-muted: #2f2f31;
    --grid: #2c2c2e;
    --text: #f3f3f3;
    --muted: #9b9b9e;
    --gold: #f0b12a;
    --gold-dark: #d59617;
    --gray-card: #7c7c7f;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
textarea,
input {
    background-color: transparent;
    color: white;
    font: inherit;
    padding-left: 10px;
}

option {
    background-color: white;
    color: black;
}

.visibleHolder{
    margin-top:12px;
}

button {
    color: inherit;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}

.field {
    position: relative;
}

/* Customizing the native date picker icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Adding a visual icon via background image if you want a specific look */
.field input[type="date"] {
    background: #1a1a1a url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-calendar" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>') no-repeat;
    background-position: calc(100% - 10px) center;
    padding-right: 30px;
    color-scheme: dark; /* This makes the native calendar popup dark-themed */
}


/* ---------- top bar ---------- */

.site-topbar {
    background: #3e3d3e;
    color: #fff;
    height: 42px;
    display: flex;
    justify-content: space-between;
    padding-left: 107px;
    font-size: 14px;
    letter-spacing: 0.02em;
    align-items: center;
}

    .site-topbar .left-title {
        font-weight: 700;
    }

.year-select {
    margin-left: 16px;
    width: 76px;
}

.month-viewer {
    width: 146px;
}

.site-topbar .right-links {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 537px;
    /*background-color: lime;*/ /* Your existing debug color */
    margin-left: auto;
}

.site-topbar .left-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.site-topbar .contact-link {
    margin-left: 26px;
    color: white;
}

/* ---------- page shell ---------- */

.page {
    max-width: 100%;
    margin: 0 auto;
    padding: 48px 108px 0;
    position: relative;
}

.hero-arrow-right {
    position: absolute;
    top: 36px;
    right: 0;
    width: 50px;
    height: 70px;
    background-image: url("../assets/top-arrow-inverse.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* ---------- brand / filter / months ---------- */

.brand-filter-row {
    display: grid;
    grid-template-columns: 2.6fr 0.6fr 1fr;
    gap: 2px;
    align-items: start;
    margin-bottom: 10px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 258px;
    max-width: 100%;
    height: auto;
    display: block;
}

.filter-bar {
    display: flex;
    position: relative;
    gap: 14px;
    right: 20px;
    padding-right: 27px;
    padding-bottom: 12px;
}

.filter-select-wrap {
    position: relative;
    min-width: 190px;
}

    .filter-select-wrap::after {
        content: "▾";
        position: absolute;
        right: 12px;
        top: 14px;
        transform: translateY(-20%);
        color: #fff;
        pointer-events: none;
        font-size: 12px;
    }

.filter-select {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 0;
    padding: 10px 20px 8px 10px;
    appearance: none;
    outline: none;
    font-size: 14px;
}

    .filter-select optgroup {
        font-weight: 400;
        color: #ffffff;
    }

    .filter-select option {
        padding-left: 10px;
        color: #000;
    }

.refresh-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.refresh-btn {
    width: 54px;
    height: 42px;
    border: 1px solid #727276;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

    .refresh-btn::before {
        content: "";
        display: block;
        width: 29px;
        height: 26px;
        background-image: url("../assets/refresh-arrow.png");
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
    }

.month-selector {
    display: grid;
    grid-template-columns: repeat(6, 64px);
    gap: 15px 10px;
    justify-content: end;
}

.month-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

    .month-icon .icon-box {
        width: 53px;
        height: 42px;
        border: 1px solid #727276;
        border-radius: 6px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }

        .month-icon .icon-box::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 10px;
            border-top: 1px solid #727276;
        }

    .month-icon .dots {
        display: flex;
        gap: 4px;
        margin-top: 8px;
    }

        .month-icon .dots span {
            width: 5px;
            height: 5px;
            background: #727276;
            display: block;
            border-radius: 1px;
        }

    .month-icon.active {
        color: #fff;
    }

        .month-icon.active .icon-box {
            border-color: #fff;
        }

            .month-icon.active .icon-box::before,
            .month-icon.active .dots span {
                border-color: #fff;
                background: #fff;
            }

/* ---------- main content ---------- */

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 600px;
    gap: 72px;
    align-items: start;
}

.details-panel {
    min-height: 680px;
    min-width: 0;
}

.month-heading {
    font-size: 40px;
    font-weight: 300;
    letter-spacing: 0.01em;
    margin: -30px 0 6px;
    text-transform: uppercase;
}

.selected-date-heading {
    font-size: 18px;
    color: var(--gold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 18px;
}

.public-detail-list {
    display: grid;
    gap: 18px;
}

/* ---------- accordion ---------- */

.accordion-group {
    display: grid;
    gap: 10px;
}

.accordion-date {
    font-size: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
}

.accordion-toggle-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    padding: 4px 0 9px;
    border-bottom: 1px solid #444;
    align-items: center;
    cursor: pointer;
}

.accordion-toggle {
    color: var(--gold);
    font-size: 22px;
    line-height: 1;
    transform: translateY(-1px);
}

.accordion-preview {
    font-size: 16px;
    line-height: 1.25;
    color: #f4f4f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accordion-details {
    display: none;
    padding: 2px 0 2px 34px;
}

.accordion-group.open .accordion-details {
    display: block;
}

/* ---------- detail cards ---------- */

.detail-card {
    border-bottom: 1px solid #444;
    padding: 0 0 14px;
}

    .detail-card:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .detail-card + .detail-card {
        padding-top: 10px;
    }

.detail-card-title {
    font-size: 20px;
    color: #fff;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.detail-card-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 3px 0;
    align-items: start;
}

.detail-card-label {
    color: var(--gold);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-card-value {
    color: #f4f4f4;
    font-size: 16px;
    line-height: 16px;
}

h3 {
    font-weight: 300;
}

/* ---------- calendar ---------- */

.calendar-wrapper {
    position: relative; /* This ensures 'top: 0' refers to the top of the grid */
    width: 100%;
}

#calendarSpanLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows you to still click the day cells underneath */
    z-index: 10;
}


.calendar-panel {
    padding-top: 20px;
    width: 600px;
    max-width: 600px;
    min-width: 0;
    justify-self: end;
    margin-right: -38px;
    display: flex;
    flex-direction: column;
}


/* 3. Ensure the individual month items inside the grid scale correctly */
.year-grid-item {
    width: 100%;
    min-width: 0; /* Prevents layout breaking */
}

.year-grid-container {
    display: grid !important; /* Ensure it overrides any 'none' display when active */
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns of equal width */
    gap: 10px; /* Adjust spacing between calendar items */
    width: 100%;
    box-sizing: border-box;
    margin-top: 30px;
}

.calendar-header-text {
    position: absolute;
    margin-top: -30px;
    font-size: 12px;
    font-style: italic;
    color: var(--white);
    text-align: left;
    line-height: 1.2;
    min-height: 1.2em;
    white-space: pre;
    /* Optional: padding-left if you need a tiny nudge to match the Reset box exactly */
    padding-left: 6px;
}


.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Matches the 7-column grid below */
    width: 100%;
    margin-bottom: 12px;
    position: relative;
    z-index: 3;
    /* Aligns exactly with the grid borders below */
    padding-left: 0px;
    padding-right: 0px;
}

.dow {
    display: grid;
    place-items: center;
    height: 30px;
    width:86px;
    min-width: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid var(--grid);
    width: 100%;
    max-width: 100%; /* Add this to prevent scaling issues */
    position: relative;
    z-index: 1;
}

.day:nth-child(7n+1) {
    border-left: 1px solid var(--grid);
}

.calendar-grid-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    user-select: none;
}

.nav-arrow {
    cursor: pointer;
    font-size: 24px;
    color: var(--gold);
    padding: 0 10px;
    /*//back-arrow*/
}

    .nav-arrow:hover {
        color: var(--white);
    }

.carousel-months {
    display: flex;
    gap: 30px;
    font-weight: 400;
    font-size: 18px;
}

.carousel-month-item {
    cursor: pointer;
    color: var(--muted); /* Gray unselected */
    transition: color 0.3s ease;
}

    .carousel-month-item.active {
        color: var(--white); /* White selected */
        border-bottom: 2px solid var(--white);
    }


#calendar-container {
    position: relative; /* Essential for the absolute layer to align */
    width: 100%;
}

.calendar-span-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 98%;
    height: 100%;
    pointer-events: none;
    z-index: 5; /* Lower than details but higher than the grid base */
}

.span-event {
    position: absolute;
    height: 14px;
    line-height: 14px;
    z-index: 10;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 500;
    color: white;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Remove any hardcoded width: 100% here if it exists */
    cursor: pointer !important;
    pointer-events: auto !important;
    box-sizing: border-box;
}

.calendar-grid-wrapper {
    position: relative; /* Crucial: This anchors the span layer */
}

#calendarGrid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* Ensure no extra padding here that isn't accounted for in JS */
}

.day {
    background-color: #fff;
    color: #000;
    position: relative;
    display: flex;
    flex-direction: column; /* Changed from column-reverse to standard top-down */
    justify-content: flex-start;
    height: 90px;
    padding: 4px;
    border-bottom: 1px solid var(--grid);
    border-right: 1px solid var(--grid);
    z-index: 1;
    aspect-ratio: 1 / 1 !important; /* Forces the square shape */
}

#calendarGrid .day {
    aspect-ratio: 1 / 1;
    height: auto;
}



.day.other-month {
    color: #656568;
    background-color: #cccccc;
}


.day-number {
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0; /* Don't let the number squish */
    align-self: flex-start;
    margin-right: 3px;
}

.day-header {
    display: flex;
    flex-wrap: wrap;
    /* Change 'center' to 'flex-start' */
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    padding: 2px 6px;
    width: 100%;
    box-sizing: border-box;
}

.day-event-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1; /* Take up the rest of the top row */
    min-width: 0; /* Essential for flex-wrap in tight containers */
}

    .day-event-mini span {
        font-size: 10px;
        text-transform: uppercase;
        font-weight: bold;
        color: var(--gold); /* Or match your state color map */
    }

.day-event-mini-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #fff !important;
    font-size: 9px;
    font-weight: bold;
    flex-shrink: 0;
    cursor: pointer;
}

.filled-event-title {
    font-size: 10px;
    line-height: 12px;
    color: white;
    cursor: pointer;

}
/* ---------- buttons / form ---------- */
.utility-row {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    margin: 36px 0 0;
    flex-wrap: wrap;
}

.loginBtn.logged-in {
    background-image: url("../assets/sign-out.png") !important;
}

.loginBtn {
    cursor: pointer;
    background-image: url("../assets/sign-in.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    margin-left: 10px;
    width: 20px;
    height: 20px;
}

.xlsBtn {
    margin-left: 190px;
    cursor: pointer;
    background-image: url("../assets/excel-icon.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    width: 20px;
    height: 20px;
    visibility: hidden;
}

.btn {
    border: 1px solid #6e6e72;
    background: transparent;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
}

.setRight {
    margin-left: auto;
}

.btn:hover {
    border-color: #fff;
}

.btn.gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
    font-weight: 400;
}

.editor-drawer {
    margin-top: 28px;
    border-top: 1px solid #333;
    padding-top: 22px;
    display: none;
    width: 100%;
}

    .editor-drawer.active {
        display: block;
    }

.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.field {
    display: grid;
    gap: 7px;
}

    .field.full {
        grid-column: 1 / -1;
    }

    .field label {
        font-size: 14px;
        color: var(--muted);
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .field input,
    .field select {
        background: #111;
        color: #fff;
        border: 1px solid #47474b;
        padding: 12px 10px;
        min-height: 44px;
    }

.status-line {
    color: var(--muted);
    font-size: 14px;
    margin-top: 18px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.pill {
    border: 1px solid #666;
    color: #d5d5d7;
    background: transparent;
    padding: 7px 11px;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
}

    .pill.active {
        background: var(--gold);
        border-color: var(--gold);
        color: #111;
        font-weight: 400;
    }

.notice {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}
/* ---------- Year at a Glance scaling ---------- */

.calendar-overview-wrapper {
    overflow: hidden; /* clip scaled content that would otherwise bleed */
    width: 100%;
}

#yearAtAGlance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    transform-origin: top left;
    padding-left: 107px;
}

@media (max-width: 1200px) {
    #yearAtAGlance {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #yearAtAGlance {
        grid-template-columns: 1fr;
    }
}



.mini-month-box {
    cursor: pointer;
    background: #000;
    padding: 10px 30px 10px 0px;
    /* This makes the width fill the available container space */
    width: 100%;
    /* This forces the height to always match the width */
    /* Ensures padding doesn't break the square calculation */
    box-sizing: border-box;
}

.calendar-wrapper.mini {
    width: 100%;
    display: block;
}

.mini-month-name {
    /* 1. Reset everything to stop the scaling */
    all: initial !important;
    /* 2. Re-apply the 'Block' status so it sits on its own line and respects margins */
    display: block !important;
    /* 3. Lock the size and font (matches your site style) */
    font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #f3f3f3 !important;
    /* 4. Fix the positioning that 'all: initial' broke */
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    /* 5. The magic fix for the JS scaling issue */
    transform: scale(1) !important;
    transform-origin: center !important;
}

.mini-month-link {
    text-decoration: none;
    color: #333;
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

    .mini-month-link:hover {
        transform: translateY(-5px);
        border-color: var(--brand-gold);
    }

.mini-month-header {
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 10px;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0.1px solid #eee;
    position: relative;
}

    .mini-day.inactive {
        color: #ccc;
    }

.mini-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-top: 1px;
}


.editEventBtn {
    cursor: pointer;
    background-image: url("../assets/edit.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    display: none;
    justify-content: center;
    align-items: center;
    margin-right: 8px;
    margin-left: -30px;
}
/* ---------- AWS ---------- */
.is-hidden {
    visibility: hidden !important;
    pointer-events: none; /* Prevents clicking even if visible */
}

.awsBtnholder {
    display: flex;
    align-items: center;
    /* Match this to the left-padding of your accordion header */
    padding-left: 5px;
    margin-top: 8px;
    margin-left: -40px;
}

.awsBtn {
    cursor: pointer;
    background-image: url("../assets/upload.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    min-width: 20px;
    max-width: 20px;
    min-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    visibility: hidden;
}



/* ---------- footer ---------- */

.footer {
    margin-top: 94px;
    background: #343437;
    padding: 40px 58px 60px;
}

.footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: center;
}

.footer-left {
    color: #fff;
    font-size: 16px;
    line-height: 1.45;
    min-width: 0;
}

    .footer-left .office-title {
        margin-bottom: 10px;
    }

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    max-width: 560px;
    margin-bottom: 18px;
}

.footer-left a.underline {
    text-decoration: underline;
}

.copyright {
    font-size: 14px;
    color: #e1e1e1;
    padding-top: 40px;
}

.map-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.map-image {
    width: 100%;
    max-width: 640px;
    height: auto;
    display: block;
}

/* ---------- responsive ---------- */

@media (max-width: 1500px) {

    .site-topbar {
        padding-left: 48px;
    }


    .page {
        padding-left: 48px;
    }
}

#yearAtAGlance {
    padding-left: 48px;
}

@media (max-width: 1280px) {
    .page {
        padding: 48px 48px 0;
    }

    .year-grid-container {
        margin-top: 0px;
    }

        .brand-filter-row {
            grid-template-columns: 1fr;
            gap: 0;
            margin-bottom: 24px;
        }

        .brand-wrap {
            margin-bottom: 30px;
        }

        .filter-bar {
            right: 0;
            padding-right: 0;
            margin-top: 0;
            margin-bottom: 24px;
            justify-content: flex-start;
        }

        .month-selector {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-start;
            gap: 15px 14px;
            margin-bottom: 24px;
        }

        .content-grid {
            grid-template-columns: 1fr;
            gap: 32px;
        }

        .calendar-panel {
            order: 1;
            padding-top: 0;
            width: 100%;
            max-width: 600px;
            justify-self: start;
            margin-right: 0;
        }

        .details-panel {
            order: 2;
            min-height: auto;
            min-width: 0;
            padding-top: 60px;
        }

        .footer {
            padding: 64px 48px 72px;
        }

        .footer-inner {
            grid-template-columns: 1fr;
            gap: 48px;
            align-items: start;
        }

        .footer-left {
            max-width: 100%;
        }

        .footer-columns {
            max-width: 100%;
        }

        .map-wrap {
            justify-content: flex-start;
        }

        .map-image {
            max-width: 100%;
        }

        .icon-btn {
            min-width: 48px;
            padding: 10px 14px;
            font-size: 18px;
            line-height: 1;
        }
    }

    @media (max-width: 1040px) {
        .rightBtnLink {
            display: none
        }

        .site-topbar .left-title {
            width: auto;
            flex-shrink: 0;
        }


        #editModeBtn.loginBtn {
            position: absolute;
            top: 10px;
            right: 10px; /* Changed from left to right */
            left: auto; /* Resets any previous left positioning */
            margin: 0;
            z-index: 10;
        }
        /* Positions the Excel Button to the left of the Login Button */
        .xlsBtn {
            position: absolute;
            top: 10px;
            right: 45px; /* Adjust this value (10px + width of login btn + gap) */
            left: auto;
        }
    }

    @media (max-width: 710px) {

        .site-topbar {
            padding-left: 16px;
        }

        .page {
            padding-left: 16px;
            padding-right: 16px;
        }
        #yearAtAGlance {
            padding-left: 16px;
        }

        .year-grid-container {
            margin-top: 0px;
        }


        .calendar-panel {
            width: 100% !important;
            max-width: 100% !important;
            margin-right: 0;
            overflow: hidden;
            padding-top: 0px;
            display: block;
        }

        .details-panel {
            padding-top: 0px;
        }

        .footer {
            padding: 64px 16px 72px;
            margin-top: 20px;
        }


        .calendar-panel .calendar-wrapper {
            width: 100%;
            overflow: hidden;
        }

        /* Day cells — let them shrink freely with the grid */
        .calendar-panel #calendarGrid .day {
            height: auto !important;
            min-height: 0 !important;
            padding: 2px !important;
        }

        .calendar-panel #calendarGrid .day-header {
            padding: 1px 2px;
            gap: 2px;
        }

        /* DOW labels */
        .calendar-panel .calendar-header-row .dow {
            width: auto;
            font-size: 10px;
            height: 22px;
        }

        /* Dots — CSS controls size/font since JS doesn't set inline styles on dots */
        .calendar-panel #calendarGrid .day-event-mini-dot {
            width: clamp(8px, 2.254vw, 16px);
            height: clamp(8px, 2.254vw, 16px);
            font-size: clamp(6px, 1.268vw, 9px);
            flex-shrink: 0;
        }

        /* Day number */
        .calendar-panel #calendarGrid .day-number {
            font-size: clamp(8px, 1.69vw, 12px);
        }

        /* Filled single-event title text */
        .calendar-panel #calendarGrid .filled-event-title {
            font-size: clamp(7px, 1.69vw, 12px);
            line-height: 1.2;
            overflow: hidden;
        }
    }

    @media (max-width: 480px) {
        .page {
            padding-left: 8px;
            padding-right: 8px;
        }

        .calendar-panel .calendar-header-row .dow {
            font-size: 8px;
            letter-spacing: -0.03em;
            height: 18px;
        }

        .calendar-panel #calendarGrid .day-event-mini-dot {
            width: clamp(6px, 2vw, 11px);
            height: clamp(6px, 2vw, 11px);
            font-size: clamp(5px, 1.3vw, 8px);
        }

        .calendar-panel #calendarGrid .day-number {
            font-size: clamp(7px, 1.8vw, 10px);
        }

        .calendar-panel #calendarGrid .filled-event-title {
            font-size: clamp(6px, 1.5vw, 9px);
        }
    }




    @media (max-width: 575px) {
        .site-topbar {
            height: 42px;
        }

        .rightBtnLink {
            display: none;
        }

        .footer-columns {
            grid-template-columns: 1fr;
            gap: 18px;
            max-width: 100%;
        }
    }

    @media (max-width: 530px) {
        .site-topbar {
            position: relative; /* Required to anchor the absolute button */
            height: auto;
            flex-wrap: wrap;
            justify-content: flex-start;
            gap: 0;
        }

        .left-title {
            padding-top: 10px;
        }

        .site-topbar .left-links {
            gap: 10px;
        }

        .site-topbar .right-links {
            margin-left: 0;
            padding-top: 10px;
            padding-bottom: 0px;
            gap: 0px;
        }



        .left-links {
            display: flex;
            flex-direction: row; /* Change from column to row */
            flex-wrap: wrap; /* Allows items to move to the next line */
            align-items: center;
            justify-content: flex-start;
            width: 100%;
        }




            /* Ensure children (titles/selects) also adhere to the left edge */
            .left-links > * {
                margin-left: 0;
            }

        .left-title {
            min-width: 100%; /* Keeps the title on its own line */
        }

        .year-select, .month-viewer {
            width: auto; /* They will now sit side-by-side */
        }

        .year-select {
            max-width: 100px; /* They will now sit side-by-side */
        }

        .rightBtnLink {
            display: none;
        }
    }
