
        :root {
            --bg: #f5f3ee;
            --text: #26312f;
            --gray-light: #eeede7;
            --gray-border: #dcded8;
            --gray-text: #58635e;
            --signal: #a3444c;
            --simon: #a3444c;
            --leo: #446b7c;
            --linda: #55725d;
            --wut: #826544;
        }
        body {
            font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
            background: var(--bg);
            color: var(--text);
            margin: 0;
            padding: 36px 22px 65px;
            line-height: 1.6;
            font-size: 16px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        header {
            border-bottom: 1px solid #a9b1a9;
            padding-bottom: 24px;
            margin-bottom: 27px;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            flex-wrap: wrap;
            gap: 15px;
        }
        h1 {
            font-family: Georgia, "Times New Roman", serif;
            font-size: clamp(2rem, 4vw, 3rem);
            font-weight: 400;
            margin: 0;
            letter-spacing: -0.045em;
        }
        .subtitle {
            font-size: 0.95rem;
            color: var(--gray-text);
            margin-top: 3px;
            text-transform: uppercase;
            letter-spacing: 0.16em;
        }
        .intro-text {
            font-size: 1rem;
            color: var(--gray-text);
            margin-bottom: 28px;
            max-width: 780px;
        }
        nav a {
            color: var(--text);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border: 1px solid var(--gray-border);
            border-radius: 50px;
            padding: 10px 16px;
            display: inline-block;
        }
        nav a:hover {
            color: var(--signal);
            border-color: var(--signal);
        }
        .alert {
            padding: 12px;
            font-size: 0.95rem;
            margin-bottom: 20px;
            border-left: 3px solid;
            word-break: break-word;
        }
        .alert-success { background: #e6eee8; border-color: var(--linda); }
        .alert-danger { background: #fdf2f2; border-color: var(--signal); color: var(--signal); }

        .selection-panel {
            background: #e9ece6;
            border: 1px solid var(--gray-border);
            border-radius: 8px;
            padding: 23px 26px;
            margin-bottom: 34px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        .selection-info {
            font-size: 1rem;
            font-weight: 500;
        }
        .selection-controls {
            display: flex;
            gap: 10px;
            align-items: center;
            width: 100%;
            justify-content: space-between;
        }
        select {
            padding: 12px;
            background: white;
            border: 1px solid var(--gray-border);
            font-size: 1rem;
            flex-grow: 1;
            border-radius: 5px;
            color: var(--text);
        }
        button[type="submit"] {
            background: var(--text);
            color: white;
            border: none;
            padding: 13px 20px;
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            cursor: pointer;
            white-space: nowrap;
            border-radius: 5px;
        }
        button[type="submit"]:hover { background: var(--signal); }
        button[type="submit"]:disabled { background: #ccc; cursor: not-allowed; }

        .calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 22px;
        }
        .calendar-nav a {
            font-size: 0.95rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            text-decoration: none;
            color: var(--text);
            border-bottom: 1px solid #87918a;
            padding-bottom: 4px;
        }
        .calendar-nav span {
            font-size: 1rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.11em;
        }

        .months-grid-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }
        .month-box {
            border: 1px solid #e4e5de;
            padding: 20px 16px 23px;
            background: #fffefa;
            border-radius: 8px;
            box-shadow: 0 6px 24px rgba(40, 48, 42, 0.035);
        }
        .month-title {
            font-size: 0.95rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            text-align: left;
            margin-bottom: 18px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--gray-border);
        }
        .days-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            text-align: center;
        }
        .day-header {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--gray-text);
            text-transform: uppercase;
            padding-bottom: 4px;
        }
        .day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            font-size: 0.95rem;
            border-radius: 4px;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        .day.empty { background: transparent; }
        .day.free { background: #f0f1ec; color: var(--text); cursor: pointer; }
        .day.free:hover { background: #dbe3ec; outline: 2px solid #63788f; }
        .day.free:focus-visible { outline: 3px solid #111; outline-offset: 1px; }
        .day.booked { color: white; font-weight: 700; cursor: pointer; }
        .day.booked.member-simon { background: var(--simon); }
        .day.booked.member-leo { background: var(--leo); }
        .day.booked.member-linda { background: var(--linda); }
        .day.booked.member-wut { background: var(--wut); }
        .day.selected { background: var(--text) !important; color: white !important; font-weight: 600; }
        .day.in-range { background: #d7dfd9 !important; color: var(--text) !important; }

        .day.booked:hover::after {
            content: attr(data-name);
            position: absolute;
            bottom: calc(100% + 4px);
            left: 50%;
            transform: translateX(-50%);
            background: var(--text);
            color: white;
            padding: 3px 6px;
            font-size: 0.8rem;
            text-transform: uppercase;
            white-space: nowrap;
            z-index: 10;
            pointer-events: none;
        }

        .ical-box {
            margin-top: 25px;
            padding: 15px;
            background: #e9ece6;
            border: 1px solid var(--gray-border);
            border-radius: 8px;
            font-size: 0.9rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        .ical-box input {
            width: 100%;
            max-width: 320px;
            padding: 6px;
            font-size: 0.85rem;
            border: 1px solid var(--gray-border);
            background: white;
            box-sizing: border-box;
        }

        table.data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            font-size: 0.95rem;
        }
        table.data-table th, table.data-table td {
            border-bottom: 1px solid var(--gray-border);
            padding: 12px 9px;
            text-align: left;
            word-break: break-word;
        }
        table.data-table th {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--gray-text);
            font-weight: 600;
        }
        .btn-delete {
            color: var(--signal);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
            text-transform: uppercase;
        }
        .btn-delete:hover { text-decoration: underline; }

        /* Mobile Layout */
        @media (max-width: 900px) {
            .months-grid-4 { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 550px) {
            .months-grid-4 { grid-template-columns: 1fr; }
            h1 { font-size: 1.5rem; }
            .selection-panel { flex-direction: column; align-items: stretch; }
            .ical-box { flex-direction: column; align-items: stretch; }
            .ical-box input { max-width: 100%; }
            .calendar-nav { gap: 12px; }
            .calendar-nav span { text-align: center; }
        }
        .calendar-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 16px; color: var(--gray-text); font-size: 0.9rem; }
        .calendar-legend span { display: inline-flex; align-items: center; gap: 7px; }
        .legend-swatch { width: 15px; height: 15px; display: inline-block; background: var(--gray-light); border: 1px solid var(--gray-border); }
        .legend-swatch.booked { background: var(--signal); border-color: var(--signal); }
        .legend-swatch.selected { background: var(--text); border-color: var(--text); }
        .legend-swatch.member-simon { background: var(--simon); border-color: var(--simon); }
        .legend-swatch.member-leo { background: var(--leo); border-color: var(--leo); }
        .legend-swatch.member-linda { background: var(--linda); border-color: var(--linda); }
        .legend-swatch.member-wut { background: var(--wut); border-color: var(--wut); }
        .family-legend { margin-top: 20px; padding: 20px 24px; border: 1px solid var(--gray-border); border-radius: 8px; background: #fffefa; }
        .family-legend strong { display: block; margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 400; }
        .family-legend .calendar-legend { margin-bottom: 0; }
        .legend-swatch { border-radius: 3px; }
        a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid #5275a6; outline-offset: 3px; }
    
