:root {
    color-scheme: light;
    --ink: #20242b;
    --muted: #69727f;
    --paper: #faf3dd;
    --surface: #ffffff;
    --line: #d9e2cb;
    --wash: #c8d5b9;
    --mint: #8fc0a9;
    --sea: #68b0ab;
    --forest: #4a7c59;
    --event: #c8d5b9;
    --today: #4a7c59;
    --shadow: 0 18px 40px rgba(36, 51, 42, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(104, 176, 171, 0.1), transparent 32rem),
        linear-gradient(135deg, #fbf8ed 0%, var(--paper) 48%, #f6f7ef 100%);
    color: var(--ink);
    font-family: ui-monospace, "SF Mono", "Roboto Mono", "Courier New", monospace;
}

button {
    font: inherit;
}

.app {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 14px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(250, 243, 221, 0.58)),
        linear-gradient(90deg, rgba(200, 213, 185, 0.12), rgba(104, 176, 171, 0.08));
    box-shadow: var(--shadow);
}

.hero-copy {
    min-width: 0;
}

.eyebrow,
.dek {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--forest);
    font-weight: 800;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: 2.05rem;
    line-height: 1;
    letter-spacing: 0;
}

.dek {
    margin-top: 8px;
}

.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.year-tab {
    min-width: 4.4rem;
    min-height: 2.35rem;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.year-tab:hover {
    color: var(--ink);
    background: rgba(104, 176, 171, 0.1);
}

.year-tab:focus-visible {
    outline: 3px solid rgba(104, 176, 171, 0.36);
    outline-offset: 2px;
}

.year-tab.active {
    color: white;
    background: var(--sea);
    box-shadow: 0 8px 18px rgba(104, 176, 171, 0.22);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
}

.legend span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(74, 124, 89, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--muted);
    font-size: 0.8rem;
}

.legend-dot {
    width: 0.74rem;
    height: 0.74rem;
    border-radius: 999px;
}

.booked-dot {
    background: var(--sea);
}

.event-dot {
    background: var(--mint);
}

.today-dot {
    background: var(--today);
}

.calendar {
    width: 100%;
    overflow-x: auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
    scrollbar-color: rgba(104, 176, 171, 0.34) transparent;
}

.calendar::-webkit-scrollbar {
    height: 10px;
}

.calendar::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(104, 176, 171, 0.34);
    background-clip: content-box;
}

.month {
    display: grid;
    grid-template-columns: 9.25rem repeat(31, minmax(2.15rem, 1fr));
    min-width: 1120px;
    min-height: 3.85rem;
    position: relative;
    overflow: visible;
}

.month + .month {
    margin-top: 6px;
}

.weekday {
    display: none;
}

.dayname,
.day {
    min-height: 3.85rem;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.dayname {
    position: sticky;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-right: 1px solid var(--line);
    border-radius: 6px 0 0 6px;
    color: var(--ink);
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 10px 0 18px rgba(255, 255, 255, 0.96);
}

.day {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    min-width: 2.15rem;
    padding: 8px 6px 0 4px;
    border-right: 1px solid rgba(200, 213, 185, 0.58);
    color: #3e4d42;
    font-size: 0.82rem;
    overflow: visible;
}

.day.weekend {
    background: #fdfbf4;
}

.day::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 7px;
    left: 4px;
    height: 8px;
    border-radius: 999px;
    opacity: 0;
}

.day.booked::after {
    opacity: 1;
    background: linear-gradient(90deg, var(--sea), var(--mint));
}

.day.event::after {
    opacity: 1;
    background: linear-gradient(90deg, var(--mint), var(--event));
}

.day.maybe::after {
    opacity: 1;
    background: linear-gradient(90deg, var(--mint), var(--sea));
}

.day.today {
    z-index: 2;
    border: 2px solid var(--today);
    background: rgba(143, 192, 169, 0.18);
    color: var(--today);
    font-weight: 800;
}

.day.today::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(74, 124, 89, 0.22);
    border-radius: 6px;
    pointer-events: none;
}

span.description {
    position: absolute;
    left: 7px;
    bottom: 20px;
    z-index: 4;
    max-width: 13rem;
    padding: 4px 8px;
    border: 1px solid rgba(74, 124, 89, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(36, 51, 42, 0.12);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}

.day > sup {
    position: absolute;
    top: 26px;
    right: 7px;
    color: var(--muted);
    font-size: 0.55rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.month:hover sup,
.day.today sup {
    opacity: 1;
}

@media (max-width: 780px) {
    .app {
        padding: 10px;
    }

    .hero {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 14px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .year-tab {
        flex: 0 0 auto;
        min-width: 5.1rem;
        min-height: 2.7rem;
        font-size: 1rem;
    }

    .legend {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .legend::-webkit-scrollbar {
        display: none;
    }

    .legend span {
        flex: 0 0 auto;
        min-height: 2.2rem;
        font-size: 0.86rem;
    }

    .calendar {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 10px;
        overflow: visible;
    }

    .month {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        min-width: 0;
        min-height: auto;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
    }

    .weekday {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 2px;
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--muted);
        border-bottom: 2px solid var(--line);
        background: rgba(250, 243, 221, 0.6);
    }

    .dayname {
        grid-column: 1 / -1;
        position: static;
        z-index: auto;
        padding: 10px 6px;
        border-right: none;
        border-bottom: 2px solid var(--line);
        border-radius: 0;
        background: rgba(250, 243, 221, 0.6);
        font-size: 0.9rem;
        font-weight: 800;
        text-align: center;
        box-shadow: none;
        justify-content: center;
    }

    .day {
        grid-column-start: var(--col);
        min-height: 44px;
        min-width: 0;
        padding: 6px 4px 22px;
        border-bottom: 1px solid var(--line);
        border-right: none;
        font-size: 0.82rem;
        justify-content: center;
        align-items: flex-start;
    }

    .day.booked { background: rgba(104, 176, 171, 0.15); }
    .day.event  { background: rgba(143, 192, 169, 0.15); }

    .day > sup { display: none; }

    span.description {
        position: absolute;
        left: 0;
        bottom: 2px;
        padding: 2px 5px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        color: var(--ink);
        font-size: 0.6rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        z-index: 5;
    }

    .day::after {
        display: none;
    }

    .month:hover sup {
        opacity: 0.5;
    }
}
