:root {
    --surface: #fffdf8;
    --surface-muted: #f3f1e8;
    --text: #203029;
    --muted: #69746e;
    --border: #ded9cb;
    --brand: #526b55;
    --brand-dark: #38503e;
    --brand-soft: #e5ece1;
    --available: #e3efe0;
    --available-border: #c9ddc4;
    --available-text: #365a3e;
    --busy: #c95c54;
    --busy-dark: #a8443e;
    --busy-text: #ffffff;
    --past: #f0eee8;
    --today: #e3af55;
    --shadow: 0 16px 45px rgba(40, 54, 45, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    margin: 0;
    padding: 24px;
    background: transparent;
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

button {
    font: inherit;
}

.calendar-card {
    width: min(100%, 1250px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(82, 107, 85, 0.2);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.page-header {
    padding: 28px 32px 24px;
    background: linear-gradient(135deg, #eef1e7 0%, #f7f3e8 100%);
}

.eyebrow,
.sidebar-kicker,
.selected-caption {
    margin: 0;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: "Young Serif", Georgia, serif;
    font-weight: 400;
}

h1 {
    margin: 6px 0 0;
    font-size: clamp(31px, 4vw, 44px);
    line-height: 1.08;
}

.description {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.calendar-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 675px;
}

.property-sidebar {
    padding: 26px 20px;
    border-right: 1px solid var(--border);
    background: #faf8f1;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 20px;
}

.step-number {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.sidebar-heading h2 {
    margin: 3px 0 0;
    font-size: 20px;
}

.property-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.property-button {
    display: flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px 10px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.property-button:hover {
    border-color: #9cad9c;
    transform: translateX(2px);
}

.property-button[aria-pressed="true"] {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.property-arrow {
    font-size: 22px;
    line-height: 1;
}

.calendar-panel {
    min-width: 0;
    padding: 25px 28px 20px;
}

.calendar-toolbar,
.month-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.calendar-toolbar {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--border);
}

.calendar-toolbar h2 {
    margin: 4px 0 0;
    font-size: 27px;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button,
.today-button {
    min-height: 40px;
    border: 1px solid rgba(82, 107, 85, 0.3);
    background: #fff;
    color: var(--brand-dark);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.today-button:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.icon-button {
    width: 40px;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
}

.today-button {
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.month-heading {
    padding: 18px 0 13px;
}

.month-heading h3 {
    margin: 0;
    font-size: 23px;
    text-transform: capitalize;
}

.legend {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 12px;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-dot.available {
    border: 1px solid var(--available-border);
    background: var(--available);
}

.legend-dot.busy {
    background: var(--busy);
}

.calendar-view {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
}

.weekday-grid,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-grid {
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
}

.weekday-grid span {
    padding: 11px 5px;
    border-right: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.weekday-grid span:last-child {
    border-right: 0;
}

.day-cell {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 82px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 9px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.day-cell:nth-child(7n) {
    border-right: 0;
}

.day-cell.available {
    background: var(--available);
    color: var(--available-text);
}

.day-cell.busy {
    background: linear-gradient(145deg, var(--busy) 0%, #bd4f48 100%);
    color: var(--busy-text);
}

.day-cell.past,
.empty-day {
    background: var(--past);
    color: #a3aaa5;
}

.empty-day {
    min-height: 82px;
}

.day-cell.today {
    box-shadow: inset 0 0 0 3px var(--today);
}

.day-number {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

.day-cell.today .day-number {
    background: var(--today);
    color: #3d321d;
}

.day-status {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.day-cell.busy .day-status {
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(110, 25, 21, 0.2);
}

.loading,
.error,
.notice {
    margin: 5px 0 16px;
    padding: 16px;
    border-radius: 12px;
    font-size: 13px;
    text-align: center;
}

.loading {
    background: var(--surface-muted);
    color: var(--muted);
}

.error {
    background: #fbe8e5;
    color: #8b3934;
}

.notice {
    border: 1px solid #e4d6ad;
    background: #fff6da;
    color: #705d2b;
}

.calendar-footer {
    padding: 16px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.calendar-footer p {
    margin: 0;
}

@media (max-width: 850px) {
    body {
        padding: 8px;
    }

    .calendar-card {
        border-radius: 17px;
        box-shadow: none;
    }

    .page-header {
        padding: 22px 18px 19px;
    }

    .calendar-layout {
        display: block;
        min-height: 0;
    }

    .property-sidebar {
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-heading {
        padding: 0 0 13px;
    }

    .property-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-button {
        min-height: 45px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .calendar-panel {
        padding: 19px 12px 17px;
    }

    .calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .month-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .month-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .weekday-grid span {
        padding: 9px 2px;
        font-size: 9px;
    }

    .day-cell,
    .empty-day {
        min-height: 61px;
    }

    .day-cell {
        padding: 5px;
    }

    .day-number {
        width: 23px;
        height: 23px;
        font-size: 12px;
    }

    .day-status {
        font-size: 7px;
        letter-spacing: 0;
    }

    .day-cell.busy .day-status {
        padding: 3px;
    }
}

@media (max-width: 430px) {
    .property-list {
        display: flex;
        max-height: 230px;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .property-list::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .property-button:hover {
        transform: none;
    }

    .description {
        font-size: 13px;
    }
}
