/* Kaidolfest page layouts (templates/frontend/*): home, news list, news article, lineup, timetable,
   workshops, vendors, gallery, about, contact, partners, venue, CMS/legal pages, error pages, forms,
   applications overview, archive event.
   Built on tokens.css and the components in components.css; load after both. */

.kf-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Responsive card grid used by news and artist teasers */
.kf-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: var(--sp-5);
    margin-top: var(--sp-6);
}

.kf-chip-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }

/* ─── Home ───────────────────────────────────────────────── */
.kf-home-hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 72px;
    background: var(--gradient-sky);
}
.kf-home-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.kf-home-hero__logo { margin: 0; line-height: 0; }
.kf-home-hero__logo img { display: block; width: min(340px, 70vw); height: auto; }
.kf-home-hero__facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 18px;
    color: var(--kf-ink-2);
}
.kf-home-hero__facts li { display: inline-flex; align-items: center; gap: 8px; text-align: center; }
.kf-home-hero__facts .kf-icon { color: var(--kf-sakura-600); }

/* Live block under the hero while the stream is live (Home.jsx) */
.kf-home-live { padding: 40px 0; background: var(--gradient-candy); }

/* /stream */
.kf-stream-page { margin-top: 40px; }

.kf-home-about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 40px;
    align-items: center;
    padding: 88px 0 24px;
}
.kf-home-about__lead {
    margin: 0;
    font-size: var(--fs-lead);
    line-height: 1.7;
    color: var(--text-muted);
    text-wrap: pretty;
}

.kf-home-section { padding-top: 88px; }
.kf-home-section__body { margin-top: var(--sp-6); }

.kf-home-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 40px;
}
.kf-home-schedule__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.kf-home-schedule__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

.kf-home-partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6) var(--sp-7);
    margin: var(--sp-6) 0 0;
    padding: 0;
    list-style: none;
}
.kf-home-partners img { display: block; width: auto; max-width: min(240px, 70vw); height: auto; }
.kf-home-partners a { display: block; border-radius: var(--r-sm); }
.kf-home-partners a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }

/* ─── News list ──────────────────────────────────────────── */
.kf-news-list__filter { margin-top: var(--sp-6); }
.kf-news-list__items { display: flex; flex-direction: column; gap: var(--sp-5); max-width: 920px; margin-top: var(--sp-6); }
.kf-news-list__pagination { max-width: 920px; margin-top: var(--sp-7); }

/* ─── News article ───────────────────────────────────────── */
.kf-article { padding-top: 40px; background: var(--gradient-sky); }
.kf-article__inner { max-width: 780px; margin: 0 auto; padding: 0 var(--gutter); }
.kf-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 12px; }
.kf-article__date,
.kf-article__author { font-family: var(--font-numeric); font-weight: var(--fw-medium); color: var(--text-subtle); }
.kf-article__title {
    margin: 0 0 28px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h1);
    line-height: 1.08;
    overflow-wrap: break-word;
    text-wrap: balance;
}
.kf-article__body {
    position: relative;
    margin: -40px 16px 0;
    padding: 32px clamp(20px, 4vw, 44px);
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
/* The first paragraph reads as the lead, like the design's intro line */
.kf-article__body > p:first-child { font-size: var(--fs-lead); font-weight: var(--fw-medium); color: var(--text-body); }

@media (max-width: 480px) {
    .kf-article__body { margin-left: 0; margin-right: 0; }
}

/* ─── Lineup ─────────────────────────────────────────────── */
.kf-lineup { padding-bottom: 24px; }
.kf-lineup__empty { margin-top: 40px; }
.kf-lineup__section { padding-top: 48px; }
.kf-lineup__section + .kf-lineup__section { padding-top: 80px; }
.kf-lineup__headliners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 28px;
    margin-top: 28px;
}
.kf-lineup__filter { margin: 24px 0 0; }
.kf-lineup__grid { margin-top: 28px; }
/* The filter jumps to #alle-acts; keep the heading clear of the sticky header */
#alle-acts { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ─── Timetable ──────────────────────────────────────────── */
.kf-timetable { padding-bottom: 24px; }
.kf-timetable__empty { margin-top: 40px; }
.kf-timetable__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 32px 0 24px;
}
.kf-timetable__print[hidden] { display: none; }
.kf-timetable__toolbar > .kf-timetable__print:only-child { margin-left: auto; }
.kf-timetable__day + .kf-timetable__day { margin-top: 40px; }
.kf-timetable__day-title {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h2);
    line-height: 1.2;
    color: var(--kf-ink);
}
.kf-timetable__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }

/* Only on paper: names the selected stage, since the tabs are hidden there */
.kf-timetable__print-stage { display: none; }

/* Print (timetable only): just the programme, black on white.
   Header/footer are hidden for every page in layout.css. */
@media print {
    .kf-page-hero--timetable { padding: 0 0 12px; background: none !important; }
    .kf-page-hero--timetable .kf-sakura,
    .kf-page-hero--timetable .kf-kasumi,
    .kf-page-hero--timetable .kf-eyebrow,
    .kf-timetable .kf-stage-tabs,
    .kf-timetable .kf-btn { display: none !important; }
    .kf-timetable__print-stage {
        display: block;
        margin: 0 0 12px;
        font-family: var(--font-display);
        font-weight: var(--fw-semibold);
        font-size: 18px;
        color: #000;
    }
    .kf-timetable__toolbar { margin: 0 0 8px; }
    .kf-timetable__day + .kf-timetable__day { margin-top: 16px; }
    .kf-timetable__list { gap: 4px; }
    .kf-timetable .kf-schedule-item,
    .kf-timetable .kf-schedule-item.is-live {
        color: #000 !important;
        background: #fff !important;
        border: 1px solid #000;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .kf-timetable .kf-schedule-item--pause { border-style: dashed; }
    .kf-timetable .kf-schedule-item__time,
    .kf-timetable .kf-schedule-item__stage,
    .kf-timetable .kf-schedule-item__live,
    .kf-timetable .kf-schedule-item__description,
    .kf-timetable .kf-schedule-item .kf-tag {
        color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .kf-timetable .kf-schedule-item .kf-tag { border: 1px solid #000; }
    .kf-page-hero--timetable .kf-section-heading__title,
    .kf-page-hero--timetable .kf-section-heading__subtitle,
    .kf-timetable__day-title,
    .kf-timetable .kf-schedule-item__title { color: #000 !important; }
}

/* ─── Workshops ──────────────────────────────────────────── */
.kf-workshops { padding: 40px var(--gutter) 24px; }
.kf-workshops__group + .kf-workshops__group { margin-top: 40px; }
.kf-workshops__group-title {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h2);
    line-height: 1.2;
    color: var(--kf-ink);
}
.kf-workshops__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
/* Workshop items carry more text than timetable rows: keep the time block at the top */
.kf-workshops__item { align-items: start; }
.kf-workshops__item .kf-schedule-item__time { align-self: start; min-height: 76px; }

/* ─── Vendors ────────────────────────────────────────────── */
.kf-vendors { padding-bottom: 24px; }
.kf-vendors__empty { margin-top: 40px; }
.kf-vendors__filter { margin: 32px 0 24px; }
.kf-vendors__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 20px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
.kf-vendors__filter + .kf-vendors__grid { margin-top: 0; }
.kf-vendor-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px;
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
.kf-vendor-card__logo { flex: none; width: 76px; }
/* Real logos sit on white and are never cropped; placeholders keep the dotted tint */
.kf-vendor-card__logo.has-logo .kf-photo { background: var(--kf-white); box-shadow: inset 0 0 0 var(--bw) var(--kf-line); }
.kf-vendor-card__logo.has-logo .kf-photo img { object-fit: contain; padding: 6px; }
.kf-vendor-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 4px 6px 4px 0; }
.kf-vendor-card__name {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 18px;
    line-height: 1.25;
    color: var(--text-body);
    overflow-wrap: anywhere;
}
.kf-vendor-card__place,
.kf-vendor-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    font-size: 13px;
}
.kf-vendor-card__place { align-items: flex-start; color: var(--text-subtle); }
.kf-vendor-card__place .kf-icon { flex: none; margin-top: 3px; }
.kf-vendor-card__description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}
.kf-vendor-card__link { color: var(--kf-teal-600); text-decoration: none; border-radius: 6px; }
.kf-vendor-card__link:hover { text-decoration: underline; }
.kf-vendor-card__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-vendors__halls { padding-top: 64px; }
.kf-vendors__hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 20px;
    margin-top: 24px;
}
.kf-hall-card { padding: 20px; background: var(--kf-white); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.kf-hall-card__name { margin: 0 0 8px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 20px; }
.kf-hall-card__text { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.kf-hall-card__plan { display: block; border-radius: var(--r-md); overflow: hidden; }
.kf-hall-card__plan:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.kf-hall-card__plan img { display: block; width: 100%; height: auto; }

/* ─── Gallery ────────────────────────────────────────────── */
.kf-gallery { padding-bottom: 24px; }
.kf-gallery__empty { margin-top: 40px; }
.kf-gallery__grid { columns: 3 240px; column-gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; }
.kf-gallery__item { break-inside: avoid; margin-bottom: 20px; }
.kf-gallery__frame {
    display: block;
    padding: 8px;
    background: var(--kf-white);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    cursor: zoom-in;
}
.kf-gallery__frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    /* Tinted until the lazy image arrives */
    background: var(--pattern-dots), var(--kf-tint-bg, var(--kf-cloud));
}
.kf-gallery__frame:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.kf-gallery__videos { padding-top: 48px; }
.kf-gallery__grid + .kf-gallery__videos { padding-top: 28px; }
.kf-gallery__video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 20px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.kf-video-card { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 14px; background: var(--kf-white); border-radius: 24px; box-shadow: var(--shadow-card); }
.kf-video-card__player {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: var(--pattern-dots), var(--kf-tint-bg, var(--kf-cloud));
}
.kf-video-card__player img { width: 100%; height: 100%; object-fit: cover; }
.kf-video-card__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kf-video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: var(--kf-white);
    background: var(--kf-sakura-600);
    border-radius: 50%;
    box-shadow: var(--shadow-card);
    transform: translate(-50%, -50%);
}
.kf-video-card__play .kf-icon { margin-left: 3px; fill: currentColor; }
.kf-video-card__player:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.kf-video-card__title { margin: 4px 8px 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 18px; line-height: 1.3; }
.kf-video-card__notice { display: flex; align-items: flex-start; gap: 6px; margin: 0 8px; font-size: 13px; line-height: 1.45; color: var(--text-subtle); }
.kf-video-card__notice .kf-icon { flex: none; margin-top: 2px; }

/* Lightbox (<dialog>, app.js initGallery): Ink 55 % + blur overlay, white rounded frame */
html:has(.kf-lightbox[open]) { overflow: hidden; }
.kf-lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 24px;
    background: transparent;
    border: 0;
}
.kf-lightbox[open] { display: grid; place-items: center; }
/* ::backdrop doesn't see :root custom properties in every browser, so the ink value is literal */
.kf-lightbox::backdrop { background: rgba(58, 53, 80, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.kf-lightbox__panel {
    position: relative;
    width: min(960px, 100%);
    padding: 12px;
    background: var(--kf-white);
    border-radius: 32px;
    box-shadow: var(--shadow-card);
}
.kf-lightbox__figure { margin: 0; }
.kf-lightbox__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    object-fit: contain;
    border-radius: 24px;
    background: var(--kf-cloud);
}
.kf-lightbox__caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 12px 8px 4px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-muted);
}
.kf-lightbox__counter { font-family: var(--font-numeric); font-weight: var(--fw-medium); color: var(--text-subtle); }
.kf-lightbox__text { color: var(--text-body); }
.kf-lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--kf-ink);
    background: var(--kf-white);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}
.kf-lightbox__btn:hover { color: var(--kf-teal-700); background: var(--kf-teal-100); }
.kf-lightbox__btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-lightbox__btn[hidden] { display: none; }
.kf-lightbox__btn--close { top: -14px; right: -14px; }
.kf-lightbox__btn--prev,
.kf-lightbox__btn--next { top: 50%; transform: translateY(-50%); }
.kf-lightbox__btn--prev { left: -18px; }
.kf-lightbox__btn--next { right: -18px; }
@media (max-width: 640px) {
    .kf-lightbox { padding: 16px 12px; }
    .kf-lightbox__panel { padding: 8px; border-radius: 24px; }
    .kf-lightbox__img { border-radius: 18px; }
    .kf-lightbox__btn--close { top: -10px; right: -6px; }
    .kf-lightbox__btn--prev { left: -6px; }
    .kf-lightbox__btn--next { right: -6px; }
}
@media (prefers-reduced-motion: no-preference) {
    .kf-lightbox[open] .kf-lightbox__panel { animation: kf-lightbox-in var(--dur, .2s) ease-out; }
    .kf-lightbox[open]::backdrop { animation: kf-lightbox-fade var(--dur, .2s) ease-out; }
}
@keyframes kf-lightbox-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes kf-lightbox-fade { from { opacity: 0; } to { opacity: 1; } }

/* ─── About ──────────────────────────────────────────────── */
.kf-about { padding-top: 40px; padding-bottom: 24px; }
.kf-about__features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: var(--sp-5);
    margin: 0;
    padding: 0;
    list-style: none;
}
.kf-feature-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px;
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
/* About.jsx: teal/sakura icons in the -600 shade, star/lilac in -700 */
.kf-feature-box.kf-tint--teal { --kf-tint-fg: var(--kf-teal-600); }
.kf-feature-box.kf-tint--sakura { --kf-tint-fg: var(--kf-sakura-600); }
.kf-feature-box__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: var(--kf-tint-fg);
    background: var(--kf-tint-bg);
}
.kf-feature-box__title { margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 22px; line-height: 1.2; }
.kf-feature-box__text { margin: 0; line-height: 1.65; color: var(--text-muted); }
.kf-about__team { padding-top: 88px; }
.kf-about__team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--sp-6);
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 400px) {
    .kf-about__team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-4); }
}

/* ─── CMS + legal pages: rich text in a white card ───────── */
.kf-doc { padding-top: 40px; padding-bottom: 24px; }
.kf-doc-card {
    box-sizing: border-box;
    max-width: 780px;
    padding: clamp(24px, 5vw, 48px);
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
.kf-about .kf-doc-card { margin: 0 auto; }

/* ─── Contact ────────────────────────────────────────────── */
.kf-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: var(--sp-6);
    padding-top: 40px;
    padding-bottom: 24px;
}
@media (min-width: 900px) {
    .kf-contact { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.kf-contact__card {
    padding: clamp(20px, 4vw, 40px);
    background: var(--kf-white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
.kf-contact__form { display: flex; flex-direction: column; gap: 18px; }
.kf-contact__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.kf-contact__captcha { display: flex; }
.kf-contact__thanks { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.kf-contact__thanks-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 40px;
    line-height: 1.1;
    color: var(--kf-teal-600);
}
/* Focused by script (tabindex=-1) only so screen readers announce it; no ring on a non-control */
.kf-contact__thanks-title:focus { outline: none; }
.kf-contact__thanks-text { margin: 0 0 8px; color: var(--text-muted); }
.kf-contact__info { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.kf-contact-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--kf-white);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-soft);
}
.kf-contact-info__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--kf-sakura-600);
    background: var(--kf-sakura-100);
}
.kf-contact-info__body { display: flex; flex-direction: column; min-width: 0; }
.kf-contact-info__label { font-size: 13px; color: var(--text-subtle); }
.kf-contact-info__value {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    color: var(--text-body);
    overflow-wrap: anywhere;
}
a.kf-contact-info__value { text-decoration: none; border-radius: 6px; }
a.kf-contact-info__value:hover { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }
a.kf-contact-info__value:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ─── Partners ───────────────────────────────────────────── */
.kf-partners { padding-top: 40px; padding-bottom: 24px; }
.kf-partners__tier + .kf-partners__tier { margin-top: 56px; }
.kf-partners__tier-title {
    margin: 0 0 20px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h3);
    line-height: 1.2;
    color: var(--kf-ink);
}
.kf-partners__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.kf-partners__grid--featured { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.kf-partner-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 10px 18px;
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
/* Logos sit on white and are never cropped */
.kf-partner-card__logo {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    color: var(--kf-teal-600);
    background: var(--kf-white);
    border-radius: var(--r-md);
    box-shadow: inset 0 0 0 var(--bw) var(--kf-line);
}
.kf-partner-card__logo img { position: absolute; inset: 18px; display: block; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; }
.kf-partner-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px; min-width: 0; }
.kf-partner-card__name {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 18px;
    line-height: 1.25;
    color: var(--text-body);
    overflow-wrap: anywhere;
}
.kf-partners__grid--featured .kf-partner-card__name { font-size: 22px; }
.kf-partner-card__description { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); overflow-wrap: anywhere; }
.kf-partner-card__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    font-size: 13px;
    color: var(--kf-teal-600);
    text-decoration: none;
    border-radius: 6px;
}
.kf-partner-card__link:hover { text-decoration: underline; }
.kf-partner-card__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* ─── Venue ──────────────────────────────────────────────── */
.kf-venue { padding-top: 40px; padding-bottom: 24px; }
.kf-venue__grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--sp-5); }
@media (min-width: 900px) {
    .kf-venue__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
.kf-venue__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(24px, 4vw, 40px);
    background: var(--kf-white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
.kf-venue__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: var(--kf-teal-600);
    background: var(--kf-teal-100);
}
.kf-venue__name { margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-h2); line-height: 1.15; overflow-wrap: anywhere; }
.kf-venue__address { font-style: normal; font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); }
.kf-venue__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.kf-venue__note { margin: 0; font-size: 13px; color: var(--text-subtle); }
.kf-venue__facts { display: flex; flex-direction: column; gap: 16px; }

/* ─── Error pages ────────────────────────────────────────── */
.kf-error { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 56px; padding-bottom: 40px; }
.kf-error .kf-empty { width: 100%; max-width: 640px; box-sizing: border-box; }
.kf-error__code { color: var(--kf-sakura-600); }
.kf-error__details {
    box-sizing: border-box;
    max-width: min(960px, calc(100% - 2 * var(--gutter)));
    margin: 0 auto 40px;
    padding: 16px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--kf-ink);
    background: var(--kf-white);
    border-radius: var(--r-sm);
}
/* Static 500 layout (layouts/error.php): logo on top, block centred */
.kf-error-layout { min-height: 100vh; margin: 0; }
.kf-error-layout__header { display: flex; justify-content: center; padding: 24px var(--gutter) 0; }
.kf-error-layout__header a { display: block; border-radius: var(--r-sm); }
.kf-error-layout__header a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }

/* ─── Forms: /apply/{type}, /form/{slug} (FormRenderer + partials/forms/dynamic-form.php) ─── */
.kf-form-page { max-width: 820px; padding-top: 40px; padding-bottom: 24px; }
.kf-form-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: clamp(20px, 4vw, 40px);
    background: var(--kf-white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
.kf-form-card__intro { padding-bottom: 24px; border-bottom: var(--bw) solid var(--kf-line); }
.kf-form-card__errors:focus { outline: none; }
.kf-form-errors { margin: 4px 0 0; padding-left: 1.2em; }
.kf-form-errors li + li { margin-top: 2px; }
.kf-form-errors a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.kf-form-errors a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.kf-form { display: flex; flex-direction: column; gap: 22px; }
.kf-form__note { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 13px; color: var(--text-muted); }
.kf-form__captcha { display: flex; }
.kf-form__actions { display: flex; }
.kf-form-fields { display: flex; flex-direction: column; gap: 20px; }
.kf-form-field { min-width: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.kf-form-field :target { scroll-margin-top: calc(var(--header-h) + 24px); }
.kf-form-section { padding-top: 20px; border-top: var(--bw) solid var(--kf-line); }
.kf-form-fields > .kf-form-section:first-child { padding-top: 0; border-top: 0; }
.kf-form-section__title { margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 22px; line-height: 1.25; color: var(--kf-ink); }
.kf-form-section__text { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }
.kf-form-section a,
.kf-input__message a,
.kf-select__message a,
.kf-number__message a,
.kf-file-drop__message a,
.kf-choice-group__message a,
.kf-choice-group__legend a,
.kf-input__label a { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }

.kf-form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px);
    text-align: center;
    background: var(--kf-white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
.kf-form-success__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    color: var(--kf-teal-700);
    background: var(--kf-teal-100);
    border-radius: 50%;
}
.kf-form-success__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(30px, 5vw, 40px);
    line-height: 1.1;
    color: var(--kf-teal-600);
}
.kf-form-success__title:focus { outline: none; }
.kf-form-success__text { max-width: 52ch; margin: 0 0 8px; color: var(--text-muted); }

/* ─── Applications overview (/bewerbungen) ───────────────── */
.kf-applications { display: flex; flex-direction: column; gap: var(--sp-6); padding-top: 40px; padding-bottom: 24px; }
.kf-applications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: var(--sp-5);
    margin: 0;
    padding: 0;
    list-style: none;
}
.kf-application-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--kf-white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}
.kf-application-card.is-closed { background: rgb(var(--kf-white-rgb) / .6); box-shadow: var(--shadow-soft); }
.kf-application-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kf-application-card__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: var(--kf-tint-fg);
    background: var(--kf-tint-bg);
    border-radius: 18px;
}
.kf-application-card__title { margin: 6px 0 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 24px; line-height: 1.2; color: var(--kf-ink); }
.kf-application-card__text { flex: 1; margin: 0; line-height: 1.6; color: var(--text-muted); }
.kf-application-card__status { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: var(--fw-medium); color: var(--kf-ink-2); }
.kf-application-card__status .kf-icon { flex: none; color: var(--kf-sakura-600); }
.kf-application-card__action { margin-top: 6px; }

/* ─── Archive event (/events/{slug}) ─────────────────────── */
.kf-archive { display: flex; flex-direction: column; gap: var(--sp-8); padding-top: 40px; padding-bottom: 24px; }
.kf-archive .kf-doc-card { width: 100%; margin: 0 auto; }
.kf-archive__section { display: flex; flex-direction: column; gap: var(--sp-4); }
.kf-archive__section > .kf-card-grid { margin-top: var(--sp-2); }
.kf-archive__day { display: flex; flex-direction: column; gap: var(--sp-3); }
.kf-archive__more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--sp-5); }
.kf-archive__list { padding: 20px; background: var(--kf-white); border-radius: var(--r-md); box-shadow: var(--shadow-soft); }
.kf-archive__list-title { margin: 0 0 12px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 18px; color: var(--kf-ink); }
