.fkx-year-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.fkx-year-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 17px;
    background: #e1e3e5;
    border-radius: 8px;
    color: #222222;
    font-weight: 700;
    text-decoration: none;
}

.fkx-year-back:hover {
    background: #d4d7d9;
}

.fkx-apartment-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.fkx-apartment-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 15px;
    background: #ffffff;
    border: 1px solid #d9dddf;
    border-radius: 8px;
    color: #343a3e;
    font-weight: 700;
    text-decoration: none;
}

.fkx-apartment-link:hover {
    border-color: #2f5d50;
}

.fkx-apartment-link.is-active {
    background: #2f5d50;
    border-color: #2f5d50;
    color: #ffffff;
}

.fkx-year-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.fkx-year-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    background: #2f5d50;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.fkx-year-navigation a:hover {
    background: #24483d;
}

.fkx-year-navigation .fkx-year-current {
    background: #e1e3e5;
    color: #222222;
}

.fkx-year-navigation .fkx-year-current:hover {
    background: #d4d7d9;
}

.fkx-year-calendar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.fkx-year-month {
    overflow: hidden;
    background: #ffffff;
    border-radius: 13px;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.07);
}

.fkx-year-month-title {
    margin: 0;
    padding: 13px;
    background: #2f5d50;
    color: #ffffff;
    text-align: center;
    font-size: 18px;
}

.fkx-year-weekdays,
.fkx-year-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.fkx-year-weekdays {
    background: #f3f5f6;
}

.fkx-year-weekdays span {
    padding: 8px 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.fkx-year-day,
.fkx-year-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #eeeeee;
}

.fkx-year-empty {
    background: #fafafa;
}

.fkx-year-day {
    padding: 0;
    background: #ffffff;
    border-radius: 0;
    color: #303438;
    cursor: default;
}

.fkx-year-day.free {
    background: #ffffff;
}

.fkx-year-day.status-anfrage.booked { background:#d9d2f0; color:#493a75; }

.fkx-year-day.status-belegt.booked {
    background: var(--fkx-booked);
    color: var(--fkx-booked-text);
}

.fkx-year-day.status-reserviert.booked {
    background: var(--fkx-reserved);
    color: var(--fkx-reserved-text);
}

.fkx-year-day.status-gesperrt.booked {
    background: var(--fkx-locked);
    color: var(--fkx-locked-text);
}

.fkx-year-day.status-anfrage.arrival { background:linear-gradient(135deg,#fff 0%,#fff 49%,#d9d2f0 50%,#d9d2f0 100%);color:#493a75;}

.fkx-year-day.status-belegt.arrival {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 49%,
            var(--fkx-booked) 50%,
            var(--fkx-booked) 100%
        );
}

.fkx-year-day.status-reserviert.arrival {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 49%,
            var(--fkx-reserved) 50%,
            var(--fkx-reserved) 100%
        );
}

.fkx-year-day.status-gesperrt.arrival {
    background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-locked) 50%,var(--fkx-locked) 100%);
    color: var(--fkx-locked-text);
}

.fkx-year-day.status-anfrage.departure { background:linear-gradient(135deg,#d9d2f0 0%,#d9d2f0 49%,#fff 50%,#fff 100%);color:#493a75;}

.fkx-year-day.status-belegt.departure {
    background:
        linear-gradient(
            135deg,
            var(--fkx-booked) 0%,
            var(--fkx-booked) 49%,
            #ffffff 50%,
            #ffffff 100%
        );
}

.fkx-year-day.status-reserviert.departure {
    background:
        linear-gradient(
            135deg,
            var(--fkx-reserved) 0%,
            var(--fkx-reserved) 49%,
            #ffffff 50%,
            #ffffff 100%
        );
}

.fkx-year-day.status-gesperrt.departure {
    background: linear-gradient(135deg,var(--fkx-locked) 0%,var(--fkx-locked) 49%,#fff 50%,#fff 100%);
    color: var(--fkx-locked-text);
}

.fkx-year-day.today {
    box-shadow: inset 0 0 0 2px #2f5d50;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .fkx-year-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .fkx-year-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .fkx-year-back {
        width: 100%;
    }

    .fkx-apartment-switcher {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fkx-year-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .fkx-year-current {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .fkx-year-calendar {
        grid-template-columns: 1fr;
    }
}
/* Status-Workflow Phase 1 */
.fkx-year-day.status-angebot.booked { background:#d9d2f0; color:#493a75; }
.fkx-year-day.status-storniert.booked { background:#dfe3e5; color:#555d62; }
.fkx-year-day.status-angebot.arrival { background:linear-gradient(135deg,#fff 0%,#fff 49%,#d9d2f0 50%,#d9d2f0 100%);color:#493a75; }
.fkx-year-day.status-angebot.departure { background:linear-gradient(135deg,#d9d2f0 0%,#d9d2f0 49%,#fff 50%,#fff 100%);color:#493a75; }
.fkx-year-day.status-storniert.arrival { background:linear-gradient(135deg,#fff 0%,#fff 49%,#dfe3e5 50%,#dfe3e5 100%);color:#555d62; }
.fkx-year-day.status-storniert.departure { background:linear-gradient(135deg,#dfe3e5 0%,#dfe3e5 49%,#fff 50%,#fff 100%);color:#555d62; }


/* 1.4.6-test4: Anfragen bleiben reine Timeline. Die Linie beginnt in der
   Mitte des Anreisetages und endet in der Mitte des Abreisetages. */
.fkx-year-day.inquiry {
    position: relative;
    background: #ffffff !important;
    color: #493a75 !important;
}

.fkx-year-day.inquiry::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #7865a8;
    pointer-events: none;
}

.fkx-year-day.inquiry.arrival::after {
    left: 50%;
}

.fkx-year-day.inquiry.departure::after {
    right: 50%;
}

.fkx-year-day.inquiry.arrival.departure::after {
    right: 50%;
    left: 50%;
}

.fkx-legend-inquiry {
    background: #ffffff;
    box-shadow: inset 0 -4px 0 #7865a8;
}



/* v011: Jahresansicht nutzt dieselbe Interaktionslogik wie die 3-Monatsansicht. */
.fkx-year-day { cursor: pointer; }
.fkx-year-day.past:not(.has-booking):not(.has-inquiry) { cursor: default; opacity: .66; }
.fkx-year-day .fkx-inquiry-timeline { inset: 0; }
.fkx-year-day .fkx-inquiry-segment { min-height: 2px; }

/* v019b-132: Herkunftsfarben auch in der Jahresübersicht */
:root {
    --fkx-booking-source: #b8d5ee;
    --fkx-booking-source-text: #16496f;
    --fkx-airbnb-source: #f2adb5;
    --fkx-airbnb-source-text: #701822;
    --fkx-external-block: #879199;
    --fkx-external-block-text: #1f2528;
}
.fkx-year-day.status-belegt.fkx-source-booking.booked { background: var(--fkx-booking-source); color: var(--fkx-booking-source-text); }
.fkx-year-day.status-belegt.fkx-source-airbnb.booked { background: var(--fkx-airbnb-source); color: var(--fkx-airbnb-source-text); }
.fkx-year-day.status-gesperrt.fkx-source-external-block.booked,
.fkx-year-day.status-gesperrt.fkx-source-ical.booked { background: var(--fkx-external-block); color: var(--fkx-external-block-text); }
.fkx-year-day.status-belegt.fkx-source-booking.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-booking-source) 50%,var(--fkx-booking-source) 100%); color:var(--fkx-booking-source-text); }
.fkx-year-day.status-belegt.fkx-source-booking.departure { background: linear-gradient(135deg,var(--fkx-booking-source) 0%,var(--fkx-booking-source) 49%,#fff 50%,#fff 100%); color:var(--fkx-booking-source-text); }
.fkx-year-day.status-belegt.fkx-source-airbnb.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-airbnb-source) 50%,var(--fkx-airbnb-source) 100%); color:var(--fkx-airbnb-source-text); }
.fkx-year-day.status-belegt.fkx-source-airbnb.departure { background: linear-gradient(135deg,var(--fkx-airbnb-source) 0%,var(--fkx-airbnb-source) 49%,#fff 50%,#fff 100%); color:var(--fkx-airbnb-source-text); }
.fkx-year-day.status-gesperrt.fkx-source-external-block.arrival,
.fkx-year-day.status-gesperrt.fkx-source-ical.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-external-block) 50%,var(--fkx-external-block) 100%); color:var(--fkx-external-block-text); }
.fkx-year-day.status-gesperrt.fkx-source-external-block.departure,
.fkx-year-day.status-gesperrt.fkx-source-ical.departure { background: linear-gradient(135deg,var(--fkx-external-block) 0%,var(--fkx-external-block) 49%,#fff 50%,#fff 100%); color:var(--fkx-external-block-text); }
.fkx-legend-booking-source { background: var(--fkx-booking-source); }
.fkx-legend-airbnb-source { background: var(--fkx-airbnb-source); }
.fkx-legend-external-block { background: var(--fkx-external-block); }

.fkx-booking-channel-section { margin-top: 14px; }
.fkx-booking-channel-section[hidden], #externalReferenceRow[hidden] { display:none !important; }
