/* Kaidolfest UI components (PHP partials in templates/partials/components/).
   Built only on the variables from tokens.css; load after it.
   Hover/press states of the React design are plain :hover / :active / :focus-visible. */

/* ─── Shared ─────────────────────────────────────────────── */
.kf-icon { display: inline-block; flex: none; vertical-align: middle; }

.kf-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.kf-btn:focus-visible,
.kf-tag--interactive:focus-visible,
.kf-card--interactive:focus-visible,
.kf-stretched-link:focus-visible,
.kf-step-nav__item:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

/* Tints for icon bubbles: --kf-tint-bg (surface) and --kf-tint-fg (icon/text) */
.kf-tint--teal   { --kf-tint-bg: var(--kf-teal-100);   --kf-tint-fg: var(--kf-teal-700); }
.kf-tint--sakura { --kf-tint-bg: var(--kf-sakura-100); --kf-tint-fg: var(--kf-sakura-700); }
.kf-tint--star   { --kf-tint-bg: var(--kf-star-100);   --kf-tint-fg: var(--kf-star-700); }
.kf-tint--lilac  { --kf-tint-bg: var(--kf-lilac-100);  --kf-tint-fg: var(--kf-lilac-700); }

.kf-eyebrow {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 15px;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--kf-sakura-600);
}

/* ─── Button ─────────────────────────────────────────────── */
.kf-btn {
    --kf-btn-bg: var(--kf-teal-600);
    --kf-btn-hover: #1A877F; /* design value; refined via color-mix below */
    --kf-btn-fg: var(--kf-white);
    --kf-btn-edge-color: var(--kf-teal-700);
    --kf-btn-edge: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: var(--fw-semibold);
    line-height: 1.1;
    text-decoration: none;
    color: var(--kf-btn-fg);
    background: var(--kf-btn-bg);
    border: none;
    border-radius: var(--r-pill);
    box-shadow: 0 var(--kf-btn-edge) 0 var(--kf-btn-edge-color);
    cursor: pointer;
    user-select: none;
    transition: transform var(--dur) var(--ease-bounce), box-shadow var(--dur) var(--ease-bounce), background var(--dur-fast);
}
.kf-btn:hover { color: var(--kf-btn-fg); }
.kf-btn--sm { --kf-btn-edge: 3px; gap: 6px; padding: 8px 16px; font-size: 15px; }
.kf-btn--lg { --kf-btn-edge: 5px; gap: 10px; padding: 16px 32px; font-size: 20px; }
.kf-btn--full { display: flex; width: 100%; }

.kf-btn--pink {
    --kf-btn-bg: var(--kf-sakura-600);
    --kf-btn-hover: #BB4570;
    --kf-btn-edge-color: var(--kf-sakura-700);
}
/* Hover shades derived from the tokens where color-mix() is supported; the hex fallbacks above
   keep hover opaque in older browsers */
@supports (color: color-mix(in srgb, red, blue)) {
    .kf-btn { --kf-btn-hover: color-mix(in srgb, var(--kf-teal-600) 60%, var(--kf-teal-700)); }
    .kf-btn--pink { --kf-btn-hover: color-mix(in srgb, var(--kf-sakura-600) 65%, var(--kf-sakura-700)); }
}
.kf-btn--secondary {
    --kf-btn-bg: var(--kf-white);
    --kf-btn-hover: var(--kf-blush);
    --kf-btn-fg: var(--kf-ink);
    --kf-btn-edge-color: var(--kf-line);
}
.kf-btn--ghost {
    --kf-btn-bg: transparent;
    --kf-btn-hover: rgb(var(--kf-teal-rgb) / .18);
    --kf-btn-fg: var(--kf-teal-700);
    box-shadow: none;
}

.kf-btn:not(:disabled):not([aria-disabled="true"]):hover { background: var(--kf-btn-hover); }
.kf-btn:not(.kf-btn--ghost):not(:disabled):not([aria-disabled="true"]):hover {
    transform: translateY(-2px);
    box-shadow: 0 calc(var(--kf-btn-edge) + 2px) 0 var(--kf-btn-edge-color);
}
.kf-btn:not(.kf-btn--ghost):not(:disabled):not([aria-disabled="true"]):active {
    transform: translateY(calc(var(--kf-btn-edge) - 1px));
    box-shadow: 0 1px 0 var(--kf-btn-edge-color);
}
.kf-btn:disabled,
.kf-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ─── Tag ────────────────────────────────────────────────── */
.kf-tag {
    --kf-tag-bg: var(--cat-sonstiges-bg);
    --kf-tag-fg: var(--cat-sonstiges-fg);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: var(--fw-semibold);
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
    color: var(--kf-tag-fg);
    background: var(--kf-tag-bg);
    border: var(--bw) solid transparent;
    border-radius: var(--r-pill);
    transition: all var(--dur-fast) var(--ease-out);
}
.kf-tag--sm { padding: 3px 10px; font-size: 12px; }
.kf-tag--showact  { --kf-tag-bg: var(--cat-showact-bg);  --kf-tag-fg: var(--cat-showact-fg); }
.kf-tag--workshop { --kf-tag-bg: var(--cat-workshop-bg); --kf-tag-fg: var(--cat-workshop-fg); }
.kf-tag--panel    { --kf-tag-bg: var(--cat-panel-bg);    --kf-tag-fg: var(--cat-panel-fg); }
.kf-tag--meet     { --kf-tag-bg: var(--cat-meet-bg);     --kf-tag-fg: var(--cat-meet-fg); }
.kf-tag--party    { --kf-tag-bg: var(--cat-party-bg);    --kf-tag-fg: var(--cat-party-fg); }
.kf-tag--pause    { border: var(--bw) dashed var(--kf-line); }
.kf-tag--outline  { --kf-tag-bg: var(--kf-white); --kf-tag-fg: var(--kf-ink); border-color: var(--kf-line); }
.kf-tag.is-selected { --kf-tag-bg: var(--kf-teal-600); --kf-tag-fg: var(--kf-white); border-color: transparent; }

/* Tailwind 3.4 preflight (injected after this file) resets backgrounds via a plain `button`
   selector (0,0,1), so the class selectors here already win without overrides. */
button.kf-tag { appearance: none; margin: 0; }
.kf-tag--interactive { cursor: pointer; }
.kf-tag--interactive:not(.is-selected) { box-shadow: var(--shadow-xs); }
.kf-tag--interactive:not(.is-selected):hover { transform: translateY(-1px); color: var(--kf-tag-fg); }

/* ─── Section heading ────────────────────────────────────── */
.kf-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-5);
}
.kf-section-heading__text {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
}
.kf-section-heading__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h1);
    line-height: 1.05;
    color: var(--kf-ink);
    text-wrap: balance;
}
.kf-section-heading__subtitle {
    margin: 0;
    max-width: 620px;
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: var(--text-muted);
    text-wrap: pretty;
}
.kf-section-heading--center { justify-content: center; text-align: center; }
.kf-section-heading--center .kf-section-heading__text { align-items: center; }

/* ─── Empty state ────────────────────────────────────────── */
.kf-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
    text-align: center;
    background: var(--kf-white);
    border: var(--bw) dashed var(--kf-sakura-300);
    border-radius: var(--r-xl);
}
.kf-empty--compact { padding: 28px 24px; }
.kf-empty__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: var(--kf-tint-fg);
    background: var(--kf-tint-bg);
}
.kf-empty--compact .kf-empty__icon { width: 56px; height: 56px; }
.kf-empty__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
    color: var(--kf-ink);
    text-wrap: balance;
}
.kf-empty--compact .kf-empty__title { font-size: 22px; }
.kf-empty__text {
    margin: 0;
    max-width: 520px;
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--text-muted);
    text-wrap: pretty;
}
.kf-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: 6px; }

/* ─── Info tile ──────────────────────────────────────────── */
.kf-tile {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    min-width: 0;
    padding: 18px 20px;
    background: var(--kf-white);
    border: var(--bw) solid transparent;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
}
/* Info tiles use the -600 teal/sakura shade for icon + label (InfoTile.jsx) */
.kf-tile.kf-tint--teal   { --kf-tint-fg: var(--kf-teal-600); }
.kf-tile.kf-tint--sakura { --kf-tint-fg: var(--kf-sakura-600); }
.kf-tile--highlight { background: var(--kf-tint-bg); }
.kf-tile__head { display: flex; align-items: center; gap: 10px; }
.kf-tile__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: var(--kf-tint-fg);
    background: var(--kf-tint-bg);
}
.kf-tile--highlight .kf-tile__icon { background: var(--kf-white); }
.kf-tile__label {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 13px;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--kf-tint-fg);
}
.kf-tile__body { display: flex; flex-direction: column; gap: 3px; }
.kf-tile__value {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 21px;
    line-height: 1.2;
    color: var(--kf-ink);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.kf-tile__sub { font-size: var(--fs-small); line-height: 1.5; color: var(--text-muted); }
.kf-tile__action { margin-top: auto; }
.kf-tile.is-pending { box-shadow: none; border: var(--bw) dashed var(--kf-line); }
.kf-tile.is-pending .kf-tile__icon { color: var(--kf-ink-3); background: var(--kf-cloud); }
.kf-tile.is-pending .kf-tile__label,
.kf-tile.is-pending .kf-tile__value { color: var(--kf-ink-3); }

/* ─── Photo / placeholder ────────────────────────────────── */
.kf-photo {
    position: relative;
    width: 100%;
    aspect-ratio: var(--kf-ratio, 4/5);
    overflow: hidden;
    border-radius: var(--kf-radius, var(--r-md));
    background: var(--pattern-dots), var(--kf-sakura-100);
}
.kf-photo--teal  { background: var(--pattern-dots), var(--kf-teal-100); }
.kf-photo--star  { background: var(--pattern-dots), var(--kf-star-100); }
.kf-photo--lilac { background: var(--pattern-dots), var(--kf-lilac-100); }
.kf-photo--mint  { background: var(--pattern-dots), var(--kf-mint); }
.kf-photo--cloud { background: var(--pattern-dots), var(--kf-cloud); }
.kf-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kf-photo__label {
    position: absolute;
    left: 12px;
    bottom: 10px;
    padding: 2px 8px;
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    font-size: var(--fs-micro);
    color: var(--kf-ink-3);
    background: rgb(var(--kf-white-rgb) / .75);
    border-radius: var(--r-pill);
}

/* ─── Cards (artist, news) ───────────────────────────────── */
.kf-card {
    position: relative;
    display: block;
    padding: 10px;
    color: var(--kf-ink);
    text-decoration: none;
    background: var(--surface-card);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur) var(--ease-bounce), box-shadow var(--dur) var(--ease-out);
}
.kf-card--interactive:hover,
.kf-card--interactive:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.kf-artist-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 3px 10px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-micro);
    color: var(--kf-ink);
    background: var(--kf-star);
    border-radius: var(--r-pill);
}
.kf-artist-card__body { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px 6px; }
.kf-artist-card__name {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 21px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.kf-artist-card__meta { margin: 0; font-size: var(--fs-small); color: var(--text-muted); }
.kf-artist-card--lg .kf-artist-card__name { font-size: 30px; }
.kf-artist-card--lg .kf-artist-card__meta { font-size: var(--fs-body); }
.kf-artist-card__description {
    margin: 6px 0 0;
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.kf-news-card { display: flex; flex-direction: column; }
.kf-news-card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: 14px 10px 10px; }
.kf-news-card--horizontal { flex-direction: row; flex-wrap: wrap; gap: 20px; }
.kf-news-card--horizontal .kf-news-card__media { flex: 1 1 220px; max-width: 320px; }
.kf-news-card--horizontal .kf-news-card__body { flex: 1 1 280px; padding: 10px 14px 10px 0; }
.kf-news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-family: var(--font-numeric);
    font-weight: var(--fw-medium);
    font-size: 13px;
    color: var(--text-subtle);
}
.kf-news-card__category { font-weight: var(--fw-semibold); color: var(--kf-sakura-600); }
.kf-news-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 21px;
    line-height: 1.25;
    color: var(--kf-ink);
    text-wrap: pretty;
    transition: color var(--dur-fast);
}
.kf-news-card:hover .kf-news-card__title,
.kf-news-card:focus-within .kf-news-card__title { color: var(--kf-teal-700); }
.kf-news-card__excerpt { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-muted); text-wrap: pretty; }

/* Link stretched over its positioned card */
.kf-stretched-link { color: inherit; text-decoration: none; }
.kf-stretched-link:hover { color: inherit; }
.kf-stretched-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kf-card .kf-stretched-link::after { border-radius: var(--r-lg); }

/* ─── Team card ──────────────────────────────────────────── */
.kf-team-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.kf-team-card__photo {
    width: 100%;
    max-width: 150px;
    padding: 6px;
    background: var(--kf-white);
    border-radius: 50%;
    box-shadow: var(--shadow-card);
}
.kf-team-card__name { margin: 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-h4); line-height: 1.1; }
.kf-team-card__role { margin: 0; font-size: var(--fs-small); line-height: 1.45; color: var(--text-muted); text-wrap: balance; }

/* ─── Notice ─────────────────────────────────────────────── */
.kf-notice {
    --kf-notice-bg: var(--kf-teal-100);
    --kf-notice-fg: var(--kf-teal-700);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: var(--kf-notice-bg);
    border-radius: var(--r-md);
}
.kf-notice--warning   { --kf-notice-bg: var(--kf-star-100);   --kf-notice-fg: var(--kf-star-700); }
.kf-notice--attention { --kf-notice-bg: var(--kf-sakura-100); --kf-notice-fg: var(--kf-sakura-700); }
.kf-notice__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--kf-notice-fg);
    background: var(--kf-white);
}
.kf-notice__content { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1 1 260px; min-width: 0; padding-top: 4px; }
.kf-notice__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-body);
    line-height: 1.25;
    color: var(--kf-notice-fg);
    text-wrap: balance;
}
.kf-notice__body { margin: 0; font-size: var(--fs-small); line-height: 1.6; color: var(--kf-ink); text-wrap: pretty; }
.kf-notice__body > :first-child { margin-top: 0; }
.kf-notice__body > :last-child { margin-bottom: 0; }
.kf-notice__actions { display: flex; flex-wrap: wrap; align-self: center; gap: 10px; }
.kf-notice--lg { gap: 18px; padding: 22px 26px; border-radius: var(--r-lg); }
.kf-notice--lg .kf-notice__icon { width: 48px; height: 48px; }
.kf-notice--lg .kf-notice__content { padding-top: 2px; }
.kf-notice--lg .kf-notice__title { font-size: 22px; }
.kf-notice--lg .kf-notice__body { font-size: var(--fs-body); }

/* ─── Status steps ───────────────────────────────────────── */
.kf-status-steps { overflow-x: auto; padding-bottom: var(--sp-1); }
.kf-status-steps__list {
    display: grid;
    grid-template-columns: repeat(var(--kf-steps, 4), minmax(110px, 1fr));
    gap: var(--sp-4);
    width: 100%;
    max-width: calc(var(--kf-steps, 4) * 210px);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.kf-status-step {
    --kf-dot-bg: var(--kf-white);
    --kf-dot-fg: var(--kf-ink-3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    min-width: 0;
    text-align: center;
}
.kf-status-step__line {
    position: absolute;
    top: 18px;
    left: calc(50% + 32px);
    right: calc(-50% + 24px);
    height: 4px;
    border-radius: var(--r-pill);
    background: var(--kf-line);
}
.kf-status-step--done .kf-status-step__line { background: var(--kf-teal); }
.kf-status-step__dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-family: var(--font-numeric);
    font-weight: var(--fw-bold);
    color: var(--kf-dot-fg);
    background: var(--kf-dot-bg);
    border: var(--bw) solid var(--kf-line);
    border-radius: 50%;
}
.kf-status-step--done      { --kf-dot-bg: var(--kf-teal-600);   --kf-dot-fg: var(--kf-white); }
.kf-status-step--current   { --kf-dot-bg: var(--kf-star);       --kf-dot-fg: var(--kf-ink); }
.kf-status-step--attention { --kf-dot-bg: var(--kf-sakura-600); --kf-dot-fg: var(--kf-white); }
.kf-status-step:not(.kf-status-step--todo) .kf-status-step__dot { border-color: transparent; }
.kf-status-step--current .kf-status-step__dot,
.kf-status-step--attention .kf-status-step__dot { box-shadow: 0 0 0 5px var(--kf-white); }
.kf-status-step__label {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-small);
    line-height: 1.2;
    color: var(--kf-ink);
}
.kf-status-step--todo .kf-status-step__label { color: var(--kf-ink-3); }
.kf-status-step__sub { font-size: var(--fs-micro); line-height: 1.35; color: var(--text-subtle); }

/* ─── Step nav ───────────────────────────────────────────── */
.kf-step-nav__list { display: flex; flex-direction: column; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.kf-step-nav--horizontal .kf-step-nav__list { flex-direction: row; gap: 6px; overflow-x: auto; position: relative; }
/* position: relative keeps the absolutely positioned sr-only state text ("(erledigt)") inside the scroller;
   without it a done/error step beyond the visible width widened the whole page on phones */
.kf-step-nav--horizontal .kf-step-nav__list > li { flex: 1 0 auto; }
.kf-step-nav__item {
    --kf-dot-bg: var(--kf-white);
    --kf-dot-fg: var(--kf-ink-3);
    --kf-dot-border: var(--kf-line);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    font: inherit;
    text-align: left;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: background var(--dur-fast);
}
.kf-step-nav--horizontal .kf-step-nav__item { padding: 8px 12px; border-radius: var(--r-pill); }
.kf-step-nav__item:hover { background: rgb(var(--kf-white-rgb) / .6); }
.kf-step-nav__item.is-current { background: var(--kf-white); box-shadow: var(--shadow-soft); }
.kf-step-nav__item.is-current      { --kf-dot-bg: var(--kf-sakura-600); --kf-dot-fg: var(--kf-white); --kf-dot-border: transparent; }
/* done/error win over current (StepNav.jsx) */
.kf-step-nav__item.kf-step-nav__item--done  { --kf-dot-bg: var(--kf-teal-600);   --kf-dot-fg: var(--kf-white); --kf-dot-border: transparent; }
.kf-step-nav__item.kf-step-nav__item--error { --kf-dot-bg: var(--kf-sakura-100); --kf-dot-fg: var(--kf-sakura-700); --kf-dot-border: transparent; }
.kf-step-nav__dot {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    font-family: var(--font-numeric);
    font-weight: var(--fw-bold);
    font-size: var(--fs-small);
    color: var(--kf-dot-fg);
    background: var(--kf-dot-bg);
    border: var(--bw) solid var(--kf-dot-border);
    border-radius: 50%;
}
.kf-step-nav__text { display: flex; flex-direction: column; min-width: 0; }
.kf-step-nav__label {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--kf-ink-2);
}
.kf-step-nav__item.is-current .kf-step-nav__label { color: var(--kf-ink); }
.kf-step-nav__hint { font-size: var(--fs-micro); line-height: 1.35; color: var(--text-subtle); }

/* ─── Input ──────────────────────────────────────────────── */
.kf-input { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.kf-input__label {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: var(--fw-semibold);
    color: var(--text-body);
}
.kf-input__required { color: var(--kf-sakura-600); }
.kf-input__box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur-fast), border-color var(--dur-fast);
}
.kf-input__box:focus-within { border-color: var(--kf-teal); box-shadow: 0 0 0 4px var(--focus-ring); }
.kf-input.is-invalid .kf-input__box { border-color: var(--danger); }
.kf-input--action .kf-input__box { padding: 5px; }
.kf-input--multiline .kf-input__box { border-radius: var(--r-md); }
.kf-input__prefix { padding-left: 18px; margin-right: -10px; color: var(--text-subtle); font-size: 16px; white-space: nowrap; }
.kf-input__field {
    flex: 1;
    min-width: 0;
    padding: 12px 18px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--kf-ink);
    background: transparent;
    border: none;
    border-radius: inherit;
    outline: none;
    resize: vertical;
}
.kf-input__field::placeholder { color: var(--text-subtle); opacity: 1; }
.kf-input--action .kf-input__field { padding: 7px 13px; }
.kf-input__message { margin: 0; padding-left: 6px; font-size: 13px; color: var(--text-muted); }
.kf-input.is-invalid .kf-input__message { color: var(--danger); }
.kf-input--sm .kf-input__label { font-size: 13px; }
.kf-input--sm .kf-input__field { padding: 8px 14px; font-size: 14px; }
.kf-input--sm .kf-input__prefix { padding-left: 14px; font-size: 14px; }

/* ─── Segmented (radio group) ────────────────────────────── */
.kf-segmented { min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; }
.kf-segmented__legend {
    float: left; /* lets the legend sit in the flow like a label, so the gap below applies */
    width: 100%;
    margin: 0 0 6px;
    padding: 0;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: var(--fw-semibold);
    color: var(--text-body);
}
.kf-segmented__legend + .kf-segmented__track { clear: left; }
.kf-segmented__track {
    --kf-seg-on-bg: var(--kf-teal-600);
    --kf-seg-on-fg: var(--kf-white);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 100%;
    padding: 3px;
    background: var(--kf-cloud);
    border: var(--bw) solid var(--kf-line);
    /* Pill on one row; rounded rectangle when the options wrap on narrow screens */
    border-radius: 24px;
}
.kf-segmented--sakura .kf-segmented__track { --kf-seg-on-bg: var(--kf-sakura-300); --kf-seg-on-fg: var(--kf-sakura-700); }
.kf-segmented--lilac .kf-segmented__track { --kf-seg-on-bg: var(--kf-lilac-100); --kf-seg-on-fg: var(--kf-lilac-700); }
.kf-segmented--full .kf-segmented__track { display: flex; width: 100%; }
.kf-segmented__option { position: relative; display: flex; }
.kf-segmented--full .kf-segmented__option { flex: 1 1 auto; }
/* The native radio stays focusable and operable; only the pill is visible */
.kf-segmented__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kf-segmented__pill {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
    color: var(--kf-ink-2);
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.kf-segmented__input:hover + .kf-segmented__pill { color: var(--kf-ink); }
.kf-segmented__input:checked + .kf-segmented__pill {
    background: var(--kf-seg-on-bg);
    color: var(--kf-seg-on-fg);
    box-shadow: var(--shadow-xs);
}
.kf-segmented__input:focus-visible + .kf-segmented__pill { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-segmented--sm .kf-segmented__track { border-radius: var(--r-md); }
.kf-segmented--sm .kf-segmented__pill { padding: 6px 11px; font-size: 13px; }
.kf-segmented.is-invalid .kf-segmented__track { border-color: var(--danger); }
.kf-segmented__message { clear: left; margin: 6px 0 0; padding-left: 6px; font-size: 13px; color: var(--text-muted); }
.kf-segmented.is-invalid .kf-segmented__message { color: var(--danger); }

/* ─── Select ─────────────────────────────────────────────── */
.kf-select { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
.kf-select__label,
.kf-number__label,
.kf-file-drop__label,
.kf-choice-group__legend {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: var(--fw-semibold);
    color: var(--text-body);
}
.kf-select__box { position: relative; display: flex; }
.kf-select__field {
    width: 100%;
    min-width: 0;
    padding: 12px 44px 12px 18px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--kf-ink);
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-xs);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: box-shadow var(--dur-fast), border-color var(--dur-fast);
}
/* Placeholder option selected: muted like an input placeholder */
.kf-select__field:has(option[value=""]:checked) { color: var(--text-subtle); }
.kf-select__field option { color: var(--kf-ink); }
.kf-select__field:focus-visible { border-color: var(--kf-teal); box-shadow: 0 0 0 4px var(--focus-ring); }
.kf-select__field:disabled { cursor: not-allowed; opacity: .6; }
.kf-select__chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    display: flex;
    color: var(--kf-ink-2);
    transform: translateY(-50%);
    pointer-events: none;
}
.kf-select.is-invalid .kf-select__field { border-color: var(--danger); }
.kf-select__message,
.kf-number__message,
.kf-file-drop__message { margin: 0; padding-left: 6px; font-size: 13px; color: var(--text-muted); }
.kf-select.is-invalid .kf-select__message,
.kf-number.is-invalid .kf-number__message,
.kf-file-drop.is-invalid .kf-file-drop__message { color: var(--danger); }
.kf-select--sm .kf-select__label { font-size: 13px; }
.kf-select--sm .kf-select__field { padding: 8px 36px 8px 14px; font-size: 14px; }
.kf-select--sm .kf-select__chevron { right: 12px; }

/* ─── Checkbox / radio item ──────────────────────────────── */
.kf-checkbox { display: flex; align-items: flex-start; gap: 12px; }
.kf-checkbox__control { position: relative; flex: none; width: 24px; height: 24px; margin-top: 1px; }
/* The native input stays focusable and clickable on top of the custom box */
.kf-checkbox__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.kf-checkbox__box {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    color: var(--kf-white);
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    border-radius: 8px;
    transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-bounce);
}
.kf-checkbox__box .kf-icon { opacity: 0; transition: opacity var(--dur-fast); }
.kf-checkbox--radio .kf-checkbox__box { border-radius: 50%; }
.kf-checkbox__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kf-white); opacity: 0; }
.kf-checkbox__input:hover + .kf-checkbox__box { border-color: var(--kf-teal); }
.kf-checkbox__input:checked + .kf-checkbox__box { background: var(--kf-teal-600); border-color: var(--kf-teal-600); transform: scale(1.05); }
.kf-checkbox__input:checked + .kf-checkbox__box .kf-icon,
.kf-checkbox__input:checked + .kf-checkbox__box .kf-checkbox__dot { opacity: 1; }
.kf-checkbox__input:focus-visible + .kf-checkbox__box { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-color: var(--kf-teal); }
.kf-checkbox.is-invalid .kf-checkbox__box { border-color: var(--danger); }
.kf-checkbox__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kf-checkbox__label { font-size: 15px; font-weight: var(--fw-medium); line-height: 1.5; color: var(--kf-ink); cursor: pointer; overflow-wrap: anywhere; }
.kf-checkbox__label a { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }
.kf-checkbox__label a:hover { color: var(--text-link-hover); }
.kf-checkbox__description a { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }
.kf-checkbox__description { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.kf-checkbox__message { font-size: 13px; color: var(--danger); }
.kf-checkbox.is-disabled { opacity: .5; }
.kf-checkbox.is-disabled .kf-checkbox__input,
.kf-checkbox.is-disabled .kf-checkbox__label { cursor: not-allowed; }

/* Fieldset around a list of checkbox/radio items (FormRenderer) */
.kf-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.kf-choice-group__legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; }
.kf-choice-group__items { clear: left; display: flex; flex-direction: column; gap: 10px; }
.kf-choice-group__message { margin: 8px 0 0; padding-left: 6px; font-size: 13px; color: var(--text-muted); }
.kf-choice-group.is-invalid .kf-choice-group__message { color: var(--danger); }

/* ─── Number field ───────────────────────────────────────── */
.kf-number { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kf-number__box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur-fast), border-color var(--dur-fast);
}
.kf-number__box:focus-within { border-color: var(--kf-teal); box-shadow: 0 0 0 4px var(--focus-ring); }
.kf-number.is-invalid .kf-number__box { border-color: var(--danger); }
/* Locked value (readonly, e.g. the onboarding show length after the deadline) */
.kf-number.is-locked .kf-number__box { background: var(--kf-cloud); box-shadow: none; }
.kf-number.is-locked .kf-number__field { color: var(--kf-ink-2); }
.kf-number__icon { display: flex; flex: none; margin-left: 8px; color: var(--kf-sakura-600); }
.kf-number__field {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 7px 13px;
    font-family: var(--font-numeric);
    font-size: 18px;
    font-weight: var(--fw-semibold);
    font-variant-numeric: tabular-nums;
    color: var(--kf-ink);
    background: transparent;
    border: none;
    outline: none;
}
.kf-number__field::placeholder { color: var(--text-subtle); font-weight: var(--fw-regular); }
/* With the JS buttons the value is centered and the native spinner is hidden */
.kf-number.is-enhanced .kf-number__field { padding: 7px 4px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.kf-number.is-enhanced .kf-number__field::-webkit-inner-spin-button,
.kf-number.is-enhanced .kf-number__field::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.kf-number__suffix { flex: none; font-size: 14px; font-weight: var(--fw-medium); color: var(--text-muted); white-space: nowrap; }
.kf-number:not(.is-enhanced) .kf-number__suffix { padding-right: 12px; }
.kf-number__btn {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--kf-teal-700);
    background: var(--kf-teal-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--dur-fast), opacity var(--dur-fast);
}
.kf-number__btn[hidden] { display: none; }
.kf-number__btn:hover:not(:disabled) { background: var(--kf-teal-300); }
.kf-number__btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-number__btn:disabled { opacity: .35; cursor: not-allowed; }

/* ─── File drop ──────────────────────────────────────────── */
.kf-file-drop { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kf-file-drop__zone {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    background: var(--pattern-dots-pink), var(--kf-white);
    border: var(--bw) dashed var(--kf-sakura-300);
    border-radius: var(--r-lg);
    transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.kf-file-drop.is-invalid .kf-file-drop__zone { border-color: var(--danger); }
.kf-file-drop__prompt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.kf-file-drop__bubble {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--kf-sakura-600);
    background: var(--kf-sakura-100);
    border-radius: 50%;
}
.kf-file-drop__button { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 15px; color: var(--kf-teal-700); }
.kf-file-drop__drop { font-size: 13px; color: var(--text-muted); }
/* Without JS the native input is shown below the prompt */
.kf-file-drop__input { max-width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--kf-ink); }
.kf-file-drop__input:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-file-drop__drop,
.kf-file-drop__meta,
.kf-file-drop__warning,
.kf-file-drop__preview { display: none; }

/* Enhanced (app.js): fixed-ratio zone, the input becomes a transparent layer over it */
.kf-file-drop.is-enhanced .kf-file-drop__zone { aspect-ratio: var(--kf-ratio, 16/9); min-height: 168px; padding: 16px; justify-content: center; cursor: pointer; }
.kf-file-drop.is-enhanced .kf-file-drop__drop { display: inline; }
.kf-file-drop.is-enhanced .kf-file-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.kf-file-drop.is-enhanced .kf-file-drop__zone:focus-within { border-color: var(--kf-teal); box-shadow: 0 0 0 4px var(--focus-ring); }
.kf-file-drop.is-dragover .kf-file-drop__zone { background: var(--kf-teal-100); border-color: var(--kf-teal); }
.kf-file-drop.has-file .kf-file-drop__zone { padding: 0; background: var(--kf-ink); border-style: solid; border-color: transparent; cursor: default; }
.kf-file-drop.has-file .kf-file-drop__prompt { display: none; }
/* With a file the layer stops catching clicks (audio controls), the "change" button opens the picker */
.kf-file-drop.has-file .kf-file-drop__input { pointer-events: none; }
.kf-file-drop.has-file .kf-file-drop__preview:not([hidden]) { display: block; position: absolute; inset: 0; }
/* A stored file (has-current) without JS: preview above the native input that picks a replacement;
   the JS-only change/remove buttons are hidden, nojs_html (e.g. a remove submit) shows instead */
.kf-file-drop.has-current:not(.is-enhanced) .kf-file-drop__zone { padding: 12px; background: var(--kf-white); border: var(--bw) solid var(--kf-line); }
.kf-file-drop.has-current:not(.is-enhanced) .kf-file-drop__preview:not([hidden]) { position: relative; inset: auto; aspect-ratio: var(--kf-ratio, 16/9); overflow: hidden; background: var(--kf-ink); border-radius: var(--r-md); }
.kf-file-drop.has-current:not(.is-enhanced) .kf-file-drop__input { pointer-events: auto; }
.kf-file-drop:not(.is-enhanced) .kf-file-drop__action { display: none; }
.kf-file-drop__nojs { display: inline-flex; }
.kf-file-drop.is-enhanced .kf-file-drop__nojs { display: none; }
.kf-file-drop__preview img,
.kf-file-drop__preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kf-file-drop__file { display: grid; place-items: center; height: 100%; color: var(--kf-white); }
.kf-file-drop.is-audio .kf-file-drop__zone { aspect-ratio: auto; min-height: 96px; background: var(--kf-teal-100); }
.kf-file-drop.is-audio .kf-file-drop__preview:not([hidden]) { position: static; }
.kf-file-drop__audio { display: flex; align-items: center; gap: 14px; padding: 16px; }
.kf-file-drop__audio-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--kf-white);
    background: var(--kf-teal-600);
    border-radius: 16px;
}
.kf-file-drop__audio audio { flex: 1; min-width: 0; height: 36px; }
.kf-file-drop.has-file .kf-file-drop__meta:not([hidden]) { display: flex; }
.kf-file-drop__meta { flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: 13px; color: var(--text-muted); }
.kf-file-drop__name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-medium); color: var(--kf-ink); }
.kf-file-drop__details { flex: 1 1 auto; font-family: var(--font-numeric); white-space: nowrap; }
.kf-file-drop__action {
    padding: 2px 4px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 13px;
    color: var(--kf-teal-700);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.kf-file-drop__action--remove { color: var(--kf-sakura-600); }
.kf-file-drop__action:hover { text-decoration: underline; text-underline-offset: 3px; }
.kf-file-drop__action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-file-drop__warning:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--kf-star-700);
    background: var(--kf-star-100);
    border-radius: 12px;
}
.kf-file-drop__warning .kf-icon { flex: none; }

/* Compact: a pill button; with a file a teal chip with name, duration and remove */
.kf-file-drop--compact { display: inline-flex; flex-direction: row; flex-wrap: wrap; align-items: center; max-width: 100%; }
.kf-file-drop--compact .kf-file-drop__zone { padding: 6px 12px; gap: 6px; border-radius: var(--r-pill); background: var(--kf-white); }
.kf-file-drop--compact .kf-file-drop__prompt { flex-direction: row; gap: 7px; }
.kf-file-drop--compact .kf-file-drop__bubble { width: auto; height: auto; background: none; }
.kf-file-drop--compact .kf-file-drop__button { font-size: 13px; color: var(--kf-sakura-700); }
.kf-file-drop--compact.is-enhanced .kf-file-drop__zone { aspect-ratio: auto; min-height: 0; padding: 6px 14px; }
.kf-file-drop--compact.has-file .kf-file-drop__zone { display: none; }
/* Without JS a stored file keeps the native input visible next to its chip (pick a replacement) */
.kf-file-drop--compact.has-current:not(.is-enhanced) .kf-file-drop__zone { display: flex; }
.kf-file-drop--compact .kf-file-drop__meta {
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    padding: 4px 4px 4px 12px;
    color: var(--kf-teal-700);
    background: var(--kf-teal-100);
    border-radius: var(--r-pill);
}
.kf-file-drop--compact .kf-file-drop__name { max-width: 200px; color: inherit; }
.kf-file-drop--compact .kf-file-drop__details { flex: none; opacity: .8; }
.kf-file-drop--compact .kf-file-drop__action--remove {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: inherit;
    background: rgba(255, 255, 255, .7);
    border-radius: 50%;
}

/* ─── Decor: sakura, kasumi, page hero ───────────────────── */
.kf-sakura,
.kf-kasumi { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.kf-sakura__blossom { position: absolute; display: block; max-width: none; height: auto; opacity: .95; }
.kf-kasumi__band { position: absolute; height: 14px; border-radius: var(--r-pill); background: var(--kf-sakura); }

.kf-page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 56px;
    background: var(--gradient-sky);
}
.kf-page-hero__inner {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ─── Highlight panel ────────────────────────────────────── */
.kf-highlight {
    --kf-hl-bg: var(--kf-teal);
    --kf-hl-fg: var(--kf-white);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 64px);
    text-align: center;
    color: var(--kf-hl-fg);
    background: var(--kf-hl-bg);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
.kf-highlight--sakura { --kf-hl-bg: var(--kf-sakura); }
.kf-highlight--white  { --kf-hl-bg: var(--kf-white); --kf-hl-fg: var(--kf-teal-600); }
.kf-highlight--left { text-align: left; }
.kf-highlight__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(40px, 7vw, 84px);
    line-height: 1;
    color: inherit;
    text-wrap: balance;
}
.kf-highlight__subtitle {
    margin: 8px 0 0;
    font-family: var(--font-numeric);
    font-weight: var(--fw-bold);
    font-size: clamp(28px, 4.4vw, 54px);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.kf-highlight__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-5); }
.kf-highlight--left .kf-highlight__actions { justify-content: flex-start; }

/* ─── Marquee ────────────────────────────────────────────── */
.kf-marquee {
    --kf-mq-bg: var(--kf-teal-600);
    position: relative;
    --kf-mq-fg: var(--kf-white);
    --kf-mq-sep: var(--kf-star);
    overflow: hidden;
    padding: 14px 0;
    color: var(--kf-mq-fg);
    background: var(--kf-mq-bg);
}
.kf-marquee--sakura { --kf-mq-bg: var(--kf-sakura-300); --kf-mq-fg: var(--kf-ink); --kf-mq-sep: var(--kf-sakura-600); }
.kf-marquee--white  { --kf-mq-bg: var(--kf-white);      --kf-mq-fg: var(--kf-ink); --kf-mq-sep: var(--kf-sakura-600); }
.kf-marquee__track {
    display: flex;
    width: max-content;
    animation: kf-marquee var(--kf-marquee-duration, 40s) linear infinite;
}
.kf-marquee:hover .kf-marquee__track,
.kf-marquee.is-paused .kf-marquee__track { animation-play-state: paused; }
/* Pause/play toggle (WCAG 2.2.2), revealed by app.js; sits on the band's right edge */
.kf-marquee__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--kf-mq-bg);
    background: var(--kf-mq-fg);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transform: translateY(-50%);
}
.kf-marquee__toggle[hidden] { display: none; }
.kf-marquee__toggle:focus-visible { outline: 3px solid var(--kf-star); outline-offset: 2px; }
.kf-marquee--white .kf-marquee__toggle { color: var(--kf-white); background: var(--kf-teal-600); }
.kf-marquee--sakura .kf-marquee__toggle { color: var(--kf-white); background: var(--kf-sakura-700); }
.kf-marquee__toggle-icon { display: grid; }
.kf-marquee__toggle[aria-pressed="false"] .kf-marquee__toggle-icon--play,
.kf-marquee__toggle[aria-pressed="true"] .kf-marquee__toggle-icon--pause { display: none; }
.kf-marquee__group { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
/* Spacing lives on the items (not flex gap) so both halves are exactly equal and -50% loops seamlessly */
.kf-marquee__item {
    display: inline-flex;
    align-items: center;
    padding-left: 24px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 21px;
    line-height: 1;
    white-space: nowrap;
}
.kf-marquee__sep { margin-left: 24px; color: var(--kf-mq-sep); }
@keyframes kf-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ─── Schedule item ──────────────────────────────────────── */
.kf-schedule-item {
    --kf-si-bg: var(--cat-sonstiges-bg);
    --kf-si-fg: var(--cat-sonstiges-fg);
    display: grid;
    grid-template-columns: minmax(92px, 112px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 10px;
    background: var(--surface-card);
    border: var(--bw) solid transparent;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-soft);
}
.kf-schedule-item--showact  { --kf-si-bg: var(--cat-showact-bg);  --kf-si-fg: var(--cat-showact-fg); }
.kf-schedule-item--workshop { --kf-si-bg: var(--cat-workshop-bg); --kf-si-fg: var(--cat-workshop-fg); }
.kf-schedule-item--panel    { --kf-si-bg: var(--cat-panel-bg);    --kf-si-fg: var(--cat-panel-fg); }
.kf-schedule-item--meet     { --kf-si-bg: var(--cat-meet-bg);     --kf-si-fg: var(--cat-meet-fg); }
.kf-schedule-item--party    { --kf-si-bg: var(--cat-party-bg);    --kf-si-fg: var(--cat-party-fg); }
.kf-schedule-item--pause { border-style: dashed; border-color: var(--kf-line); }
.kf-schedule-item.is-live { background: var(--kf-star-100); }
.kf-schedule-item__time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 12px 6px;
    font-family: var(--font-numeric);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    color: var(--kf-si-fg);
    background: var(--kf-si-bg);
    border-radius: 14px;
}
.kf-schedule-item__start { font-weight: var(--fw-bold); font-size: 20px; }
.kf-schedule-item__end { font-weight: var(--fw-medium); font-size: 14px; opacity: .8; }
.kf-schedule-item__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 6px 8px 6px 0; }
.kf-schedule-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.kf-schedule-item__stage { font-family: var(--font-display); font-weight: var(--fw-medium); font-size: 13px; color: var(--text-subtle); }
.kf-schedule-item__live { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 13px; color: var(--kf-sakura-600); }
.kf-schedule-item__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 19px;
    line-height: 1.25;
    color: var(--text-body);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}
.kf-schedule-item__description { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
/* Rich-text description (admin editor): tame the editor's block margins */
.kf-schedule-item__description--rich > :first-child { margin-top: 0; }
.kf-schedule-item__description--rich > :last-child { margin-bottom: 0; }
.kf-schedule-item__description--rich :where(p, ul, ol) { margin: 0 0 8px; }
.kf-schedule-item__description--rich :where(ul, ol) { padding-left: 1.25em; }
.kf-schedule-item__description--rich ul { list-style: disc; }
.kf-schedule-item__description--rich ol { list-style: decimal; }
.kf-schedule-item__description--rich a { color: var(--kf-teal-600); text-decoration: underline; }
.kf-schedule-item__host {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    font-size: 14px;
    color: var(--text-muted);
}
.kf-schedule-item__host-photo {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    font-weight: var(--fw-semibold);
    color: var(--kf-si-fg);
    background: var(--kf-si-bg);
}
.kf-schedule-item__facts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 0;
    padding: 10px 0 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    border-top: var(--bw) dashed var(--kf-line);
}
.kf-schedule-item__facts li { display: flex; align-items: flex-start; gap: 8px; }
.kf-schedule-item__facts .kf-icon { flex: none; margin-top: 2px; color: var(--kf-si-fg); }
.kf-schedule-item__fact-label { font-weight: var(--fw-semibold); color: var(--text-body); }
.kf-schedule-item__fact-text { display: block; }
.kf-schedule-item--compact { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 8px; }
.kf-schedule-item--compact .kf-schedule-item__time { padding: 8px 4px; }
.kf-schedule-item--compact .kf-schedule-item__start { font-size: 16px; }
.kf-schedule-item--compact .kf-schedule-item__end { font-size: 12px; }
.kf-schedule-item--compact .kf-schedule-item__body { padding: 2px 4px; }
.kf-schedule-item--compact .kf-schedule-item__title { font-size: 16px; }

/* ─── Idol quote ─────────────────────────────────────────── */
.kf-quote {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas: "avatar text" "avatar caption";
    column-gap: var(--sp-4);
    align-items: end;
    margin: 0;
}
.kf-quote--right { grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "text avatar" "caption avatar"; }
.kf-quote__avatar {
    grid-area: avatar;
    align-self: end;
    padding: 4px;
    background: var(--kf-white);
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
}
.kf-quote__text,
.kf-quote__caption { background: var(--kf-tint-bg); }
.kf-quote__text {
    grid-area: text;
    position: relative;
    margin: 0;
    padding: 18px 22px 0;
    border-radius: 24px 24px 0 0;
}
.kf-quote__text::before {
    content: "\201C";
    position: absolute;
    top: -6px;
    left: 16px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 56px;
    line-height: 1;
    color: var(--kf-tint-fg);
    opacity: .35;
}
.kf-quote--right .kf-quote__text::before { left: auto; right: 16px; }
.kf-quote__text p {
    position: relative;
    margin: 0;
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: 17px;
    line-height: 1.6;
    color: var(--kf-ink);
    text-wrap: pretty;
}
.kf-quote__caption {
    grid-area: caption;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sp-2);
    padding: 10px 22px 16px;
    border-radius: 0 0 24px 6px;
}
.kf-quote--right .kf-quote__caption { border-radius: 0 0 6px 24px; }
.kf-quote__name { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 16px; color: var(--kf-tint-fg); }
.kf-quote__role { font-size: 13px; color: var(--text-muted); }

/* ─── Pagination ─────────────────────────────────────────── */
.kf-pagination__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.kf-pagination__link,
.kf-pagination__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    font-family: var(--font-numeric);
    font-weight: var(--fw-semibold);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    border-radius: var(--r-pill);
}
.kf-pagination__link {
    color: var(--kf-ink);
    text-decoration: none;
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    box-shadow: var(--shadow-xs);
    transition: background var(--dur-fast), color var(--dur-fast);
}
.kf-pagination__link:hover { color: var(--kf-teal-700); background: var(--kf-teal-100); }
.kf-pagination__link.is-current { color: var(--kf-white); background: var(--kf-teal-600); border-color: transparent; }
.kf-pagination__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.kf-pagination__gap { color: var(--text-subtle); }

/* ─── Rich text from the CMS (news articles, event descriptions) ─── */
/* Tailwind preflight (injected after this file) resets margins/lists; selectors use the class for specificity */
.kf-prose { font-size: var(--fs-body); line-height: 1.75; color: var(--text-muted); overflow-wrap: break-word; }
.kf-prose > :first-child { margin-top: 0; }
.kf-prose > :last-child { margin-bottom: 0; }
.kf-prose p, .kf-prose ul, .kf-prose ol, .kf-prose blockquote, .kf-prose figure, .kf-prose table { margin: 0 0 1.1em; }
.kf-prose h2, .kf-prose h3, .kf-prose h4 {
    margin: 1.6em 0 .5em;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    color: var(--text-body);
}
.kf-prose h2 { font-size: 28px; }
.kf-prose h3 { font-size: var(--fs-h3); }
.kf-prose h4 { font-size: var(--fs-h4); }
.kf-prose strong, .kf-prose b { font-weight: var(--fw-bold); color: var(--text-body); }
.kf-prose a { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }
.kf-prose a:hover { color: var(--text-link-hover); }
.kf-prose ul, .kf-prose ol { padding-left: 1.4em; }
.kf-prose ul { list-style: disc; }
.kf-prose ol { list-style: decimal; }
.kf-prose li { margin: .3em 0; }
.kf-prose li::marker { color: var(--kf-sakura-600); }
.kf-prose blockquote > :last-child { margin-bottom: 0; }
.kf-prose blockquote {
    padding: 14px 20px;
    color: var(--text-body);
    background: var(--kf-sakura-100);
    border-radius: var(--r-md);
}
.kf-prose img, .kf-prose video, .kf-prose iframe { max-width: 100%; height: auto; border-radius: var(--r-md); }
.kf-prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.kf-prose th, .kf-prose td { padding: 8px 12px; text-align: left; border: 1px solid var(--kf-line); }
.kf-prose th { font-weight: var(--fw-semibold); background: var(--kf-cloud); }
.kf-prose hr { margin: 2em 0; border: 0; border-top: var(--bw) solid var(--kf-line); }
.kf-prose--lead { font-size: var(--fs-lead); line-height: 1.7; }

/* ─── Reduced motion: keep color/shadow feedback, drop lifts and bounces ─── */
@media (prefers-reduced-motion: reduce) {
    .kf-btn,
    .kf-tag,
    .kf-card,
    .kf-news-card__title,
    .kf-step-nav__item { transition: none; }
    .kf-btn:not(.kf-btn--ghost):not(:disabled):not([aria-disabled="true"]):hover,
    .kf-btn:not(.kf-btn--ghost):not(:disabled):not([aria-disabled="true"]):active,
    .kf-tag--interactive:not(.is-selected):hover,
    .kf-card--interactive:hover,
    .kf-card--interactive:focus-within { transform: none; }

    /* Marquee: no motion, show the readable copy as a static wrapped row */
    .kf-marquee__track { width: auto; animation: none; justify-content: center; }
    .kf-marquee__group { flex-wrap: wrap; justify-content: center; row-gap: 10px; padding-right: 24px; }
    .kf-marquee__group[aria-hidden="true"] { display: none; }
    .kf-marquee__toggle { display: none; }
    .kf-pagination__link { transition: none; }
    .kf-segmented__pill { transition: none; }
}

/* ─── Stage tabs (schedule) ──────────────────────────────── */
.kf-stage-tabs { max-width: 100%; }
.kf-stage-tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 5px;
    list-style: none;
    background: var(--kf-white);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-soft);
}
.kf-stage-tabs__tab {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 9px 18px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 15px;
    line-height: 1.2;
    color: var(--kf-ink-2);
    text-decoration: none;
    border-radius: var(--r-pill);
    transition: background var(--dur-fast), color var(--dur-fast);
}
a.kf-stage-tabs__tab:hover { background: var(--kf-teal-100); color: var(--kf-ink); }
.kf-stage-tabs__tab:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-stage-tabs__tab.is-current,
.kf-stage-tabs__tab.is-current:hover { background: var(--kf-teal-600); color: var(--kf-white); }
.kf-stage-tabs__count { font-size: 12px; opacity: .75; }

/* ─── Host card (schedule) ───────────────────────────────── */
.kf-host-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    padding: 6px 22px 6px 6px;
    background: var(--kf-white);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-soft);
}
.kf-host-card__avatar { flex: none; width: 52px; border-radius: 50%; box-shadow: 0 0 0 3px var(--kf-tint-bg); }
.kf-host-card__body { display: flex; flex-direction: column; min-width: 0; }
.kf-host-card__label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 12px;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--kf-sakura-600);
}
.kf-host-card__stage { color: var(--text-subtle); }
.kf-host-card__name {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 19px;
    line-height: 1.2;
    color: var(--kf-ink);
    overflow-wrap: anywhere;
}
.kf-host-card__note { font-size: 13px; color: var(--text-muted); }

/* ─── Stream panel (StreamPanel.jsx) ─────────────────────── */
.kf-stream-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    background: var(--kf-white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-card);
}
@media (min-width: 900px) {
    .kf-stream-panel { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}
.kf-stream-panel__media {
    position: relative;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--kf-ink);
}
.kf-stream-panel__player {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 16px;
    background: radial-gradient(circle at 50% 40%, #4A4466, #2A2640);
    color: rgba(255, 255, 255, .85);
    text-align: center;
    text-decoration: none;
}
.kf-stream-panel__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kf-stream-panel__player:focus-visible { outline: 3px solid var(--kf-white); outline-offset: -6px; }
.kf-stream-panel__player--empty { font-family: var(--font-display); font-weight: var(--fw-medium); font-size: 14px; }
.kf-stream-panel__play {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    color: var(--kf-white);
    background: var(--kf-sakura-600);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    transition: transform .15s ease, background-color .15s ease;
}
.kf-stream-panel__play .kf-icon { margin-left: 4px; fill: currentColor; }
.kf-stream-panel__player:hover .kf-stream-panel__play { background: var(--kf-sakura-700); transform: scale(1.06); }
.kf-stream-panel__hint { display: flex; flex-direction: column; gap: 4px; max-width: 34ch; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 15px; line-height: 1.3; color: var(--kf-white); }
.kf-stream-panel__hint small { font-family: var(--font-body); font-weight: 400; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.kf-stream-panel__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--kf-sakura-600);
    color: var(--kf-white);
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: 13px;
    line-height: 1.2;
    pointer-events: none;
}
/* Once the player is loaded it shows its own live indicator and title in that corner */
.kf-stream-panel__media:has(iframe) .kf-stream-panel__badge { display: none; }
.kf-stream-panel__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.kf-stream-panel__body { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 12px 12px 8px; }
.kf-stream-panel__title { margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 26px; line-height: 1.15; color: var(--kf-ink); overflow-wrap: anywhere; }
.kf-stream-panel__box { padding: 12px 16px; border-radius: var(--r-md); background: var(--kf-cloud); }
.kf-stream-panel__box--now { background: var(--kf-star-100); }
.kf-stream-panel__box p { margin: 0; }
.kf-stream-panel__box .kf-stream-panel__box-title { margin-top: 2px; }
.kf-stream-panel__box-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 13px; color: var(--text-muted); }
.kf-stream-panel__box--now .kf-stream-panel__box-label { color: var(--kf-sakura-600); }
.kf-stream-panel__box--now .kf-stream-panel__box-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.kf-stream-panel__box-title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 20px; line-height: 1.25; color: var(--kf-ink); overflow-wrap: anywhere; }
.kf-stream-panel__box--next .kf-stream-panel__box-title { font-size: 18px; }
.kf-stream-panel__box-time { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text-muted); }
.kf-stream-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
@media (max-width: 519.98px) {
    .kf-stream-panel__player { gap: 8px; padding: 44px 12px 12px; }
    .kf-stream-panel__play { width: 52px; height: 52px; }
    .kf-stream-panel__hint { font-size: 14px; }
    .kf-stream-panel__hint small { font-size: 11px; }
    .kf-stream-panel__title { font-size: 22px; }
}

/* ─── Consent banner (templates/partials/consent-banner.php, js/consent.js) ───────────────
   Non-modal bottom bar: the page stays usable; consent.js pads <body> by the bar height
   (--kf-consent-h) so nothing at the bottom of the page is ever hidden behind it. */
.kf-consent[hidden],
.kf-consent [hidden] { display: none !important; }
.kf-consent {
    position: fixed;
    inset: auto 0 0;
    z-index: 35; /* under the sticky header (40) and the mobile menu */
    display: flex;
    justify-content: center;
    padding: 0 12px max(12px, env(safe-area-inset-bottom));
    pointer-events: none;
}
body.kf-has-consent { padding-bottom: var(--kf-consent-h, 0px); }
.kf-consent__card {
    pointer-events: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 28px;
    width: 100%;
    max-width: 960px;
    max-height: calc(100dvh - var(--header-h) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 22px 18px 18px;
    background: var(--kf-white);
    border: var(--bw) solid var(--kf-line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-candy-white), 0 18px 48px rgba(58, 53, 80, .16);
}
.kf-consent__intro { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.kf-consent__badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--kf-teal-700);
    background: var(--gradient-candy);
    box-shadow: inset 0 0 0 var(--bw) var(--kf-white), 0 3px 0 var(--kf-teal-300);
    transform: rotate(-6deg);
}
.kf-consent__copy { min-width: 0; }
.kf-consent__title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-heading);
    color: var(--kf-ink);
}
.kf-consent__title:focus { outline: none; }
.kf-consent__title:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }
.kf-consent__text { margin: 0; font-size: var(--fs-small); line-height: 1.55; color: var(--text-muted); }
.kf-consent__text a { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.kf-consent__text a:hover { color: var(--text-link-hover); }

.kf-consent__settings { grid-column: 1 / -1; }
.kf-consent__fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.kf-consent__option {
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--kf-cloud);
}
.kf-consent__option--fixed { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kf-consent__option-title { margin: 0; font-size: 15px; font-weight: var(--fw-medium); line-height: 1.5; color: var(--kf-ink); }
.kf-consent__option-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.kf-consent__always {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: var(--fw-semibold);
    color: var(--kf-teal-700);
    background: var(--kf-teal-100);
}

.kf-consent__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 12px; }
/* Both choices: same variant, same size, same width (no nudging towards "accept") */
.kf-consent__btn { min-width: 168px; min-height: 44px; }
.kf-consent__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    font: inherit;
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    color: var(--text-link);
    background: none;
    border: 0;
    border-radius: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.kf-consent__link:hover { color: var(--text-link-hover); }
.kf-consent__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.kf-consent__notice { grid-column: 1 / -1; display: grid; gap: 12px; }
.kf-consent__notice-text {
    display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 14px;
    border-radius: var(--r-md); background: var(--kf-star-100); color: var(--kf-ink); font-size: var(--fs-small); line-height: 1.5;
}
.kf-consent__notice-text .kf-icon { margin-top: 2px; color: var(--kf-star-700); }
.kf-consent__notice-text:focus { outline: none; }
.kf-consent__notice-text:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.kf-consent__notice .kf-consent__actions { justify-content: flex-start; }
.kf-consent.is-notice .kf-consent__card { grid-template-columns: minmax(0, 1fr); }

/* Settings open: one column, actions under the toggles */
.kf-consent.is-settings .kf-consent__card { grid-template-columns: minmax(0, 1fr); }
.kf-consent.is-settings .kf-consent__actions { justify-content: flex-start; }

@media (prefers-reduced-motion: no-preference) {
    .kf-consent:not([hidden]) .kf-consent__card { animation: kf-consent-in var(--dur-slow) var(--ease-out); }
    @keyframes kf-consent-in { from { opacity: 0; transform: translateY(16px); } }
}
@media (max-width: 759.98px) {
    .kf-consent { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
    .kf-consent__card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--r-md); }
    .kf-consent__badge { width: 36px; height: 36px; border-radius: 12px; }
    .kf-consent__badge .kf-icon { width: 18px; height: 18px; }
    .kf-consent__title { font-size: 17px; }
    .kf-consent__text { font-size: 13px; }
    .kf-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .kf-consent__btn { min-width: 0; padding-inline: 10px; }
    .kf-consent__btn[data-kf-consent-action="save"] { grid-column: 1 / -1; }
    .kf-consent__link { grid-column: 1 / -1; justify-self: center; padding-block: 4px; }
}
@media print { .kf-consent { display: none !important; } }
