:root {
    --kh-bg: #f5f9ff;
    --kh-surface: #ffffff;
    --kh-surface-soft: #eef5ff;
    --kh-primary: #203864;
    --kh-primary-hover: #294b82;
    --kh-accent: #ffca3a;
    --kh-accent-hover: #f2b900;
    --kh-coral: #ef6c4d;
    --kh-text: #334155;
    --kh-muted: #64748b;
    --kh-border: #dce6f2;
    --kh-border-strong: #c8d6e7;
    --kh-radius-small: 10px;
    --kh-radius: 16px;
    --kh-radius-large: 24px;
    --kh-shadow: 0 12px 32px rgba(32, 56, 100, .09);
    --kh-shadow-hover: 0 16px 38px rgba(32, 56, 100, .14);
}

/* Startseite */
.kh-home-main {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    padding-bottom: 72px;
}

.kh-home-hero {
    padding: 46px 0 28px;
}

.kh-home-hero-panel,
.kh-home-final-panel {
    padding: clamp(42px, 7vw, 76px) clamp(24px, 7vw, 78px);
    border-radius: 28px;
    background: var(--kh-primary);
    color: #fff;
    text-align: center;
    box-shadow: var(--kh-shadow);
}

.kh-home-hero-logo {
    display: block;
    width: 104px;
    height: 104px;
    margin: 0 auto 18px;
    border-radius: 50%;
    object-fit: contain;
}

.kh-home-hero h1 {
    max-width: 900px;
    margin: 0 auto 22px;
    color: #fff;
    font-size: clamp(2.15rem, 5vw, 3.45rem);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.kh-home-hero-panel > p,
.kh-home-final-panel > p {
    max-width: 790px;
    margin: 0 auto 28px;
    color: #e3ecfa;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.kh-home-hero-panel > .kh-home-hero-lead {
    margin-bottom: 8px;
    color: #fff;
    font-size: clamp(1.08rem, 2.2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.45;
}

.kh-home-hero-panel > .kh-home-hero-description {
    margin-bottom: 28px;
    color: #e3ecfa;
    font-size: clamp(.98rem, 1.8vw, 1.12rem);
    line-height: 1.65;
}

.kh-home-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.kh-button-light {
    background: #fff;
    color: var(--kh-primary);
}

.kh-button-light:hover {
    background: #eef5ff;
    color: var(--kh-primary);
}

.kh-home-benefits {
    padding: 22px 0 48px;
}

.kh-home-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.kh-home-benefit-grid article {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 24px;
    border: 1px solid var(--kh-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(32, 56, 100, .06);
}

.kh-home-benefit-grid article > span {
    font-size: 2rem;
    line-height: 1;
}

.kh-home-benefit-grid h2 {
    margin: 0 0 7px;
    font-size: 1.12rem;
}

.kh-home-benefit-grid p {
    margin: 0;
    color: var(--kh-muted);
    font-size: .92rem;
    line-height: 1.55;
}

.kh-home-daily { padding: 8px 0 54px; }
.kh-home-daily-card {
    align-items: center; background: linear-gradient(135deg,#203864 0%,#294b82 100%);
    border-radius: 28px; box-shadow: var(--kh-shadow); color: #fff; display: grid;
    gap: clamp(28px,5vw,64px); grid-template-columns: minmax(0,1.08fr) minmax(300px,.92fr);
    overflow: hidden; padding: clamp(28px,5vw,56px);
}
.kh-home-daily-copy { min-width: 0; }
.kh-home-daily-badge { align-items: center; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.22); border-radius: 99px; color: #fff; display: inline-flex; font-size: .8rem; font-weight: 800; gap: 7px; margin-bottom: 18px; padding: 8px 12px; }
.kh-home-daily-badge > span { color: var(--kh-accent); font-size: 1rem; }
.kh-home-daily-copy .kh-section-kicker { color: var(--kh-accent); display: block; margin-bottom: 10px; }
.kh-home-daily-copy h2 { color: #fff; font-size: clamp(1.9rem,4vw,3rem); font-weight: 800; line-height: 1.12; margin: 0 0 17px; text-transform: uppercase; }
.kh-home-daily-copy > p { color: #e2ebf8; font-size: 1.03rem; line-height: 1.7; margin: 18px 0 24px; }
.kh-home-daily-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-home-daily-meta span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 99px; color: #fff; font-size: .78rem; padding: 7px 11px; }
.kh-home-daily-copy .kh-button { display: inline-flex; }
.kh-home-daily-preview { align-items: center; aspect-ratio: 1/1; background: #fff; border: 12px solid rgba(255,255,255,.15); border-radius: 22px; display: flex; justify-content: center; overflow: hidden; }
.kh-home-daily-preview img { background: #fff; height: 100%; object-fit: contain; transition: transform .25s ease; width: 100%; }
.kh-home-daily-preview:hover img { transform: scale(1.025); }
.kh-home-daily-preview > span { color: var(--kh-primary); font-size: 1.2rem; font-weight: 800; }

.kh-home-section {
    padding: 62px 0;
    scroll-margin-top: 30px;
}

.kh-home-section-heading {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.kh-home-section-heading .kh-section-kicker {
    margin-bottom: 9px;
    color: var(--kh-coral);
}

.kh-home-section-heading h2,
.kh-home-copy-panel h2 {
    margin: 0 0 13px;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
    font-weight: 800;
    line-height: 1.18;
    text-transform: uppercase;
}

.kh-home-section-heading p {
    margin: 0;
    color: var(--kh-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.kh-home-age-section,
.kh-home-latest-section,
.kh-home-occasions {
    background: #fff;
}

.kh-home-age-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.kh-home-age-card {
    --card-bg: #fff5d8;
    --card-border: #f1cc65;
    --card-color: #765b11;
    --card-button: #e8b82c;
    display: flex;
    min-height: 310px;
    flex-direction: column;
    align-items: center;
    padding: 34px 26px;
    border: 1px solid var(--card-border);
    border-radius: 22px;
    background: var(--card-bg);
    text-align: center;
}

.kh-home-age-card.is-green { --card-bg: #e9f7ee; --card-border: #b7dfc4; --card-color: #275c39; --card-button: #58aa73; }
.kh-home-age-card.is-blue { --card-bg: #eaf4ff; --card-border: #bad7f2; --card-color: #28587e; --card-button: #4b91c9; }
.kh-home-age-card.is-purple { --card-bg: #f1ebff; --card-border: #d2c0fa; --card-color: #563c85; --card-button: #8066b4; }
.kh-home-age-card.is-coral { --card-bg: #fff0e9; --card-border: #f2c1ad; --card-color: #8b482e; --card-button: #d8734e; }
.kh-home-age-card.is-teal { --card-bg: #e8f7f7; --card-border: #addada; --card-color: #265f60; --card-button: #3a9293; }

.kh-home-age-icon {
    margin-bottom: 14px;
    font-size: 2.1rem;
}

.kh-home-age-card h3 {
    margin: 0 0 9px;
    color: var(--card-color);
    font-size: 1.45rem;
}

.kh-home-age-card p {
    flex: 1;
    margin: 0 0 22px;
    color: var(--card-color);
    line-height: 1.65;
}

.kh-home-age-card a {
    display: inline-flex;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--card-button);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, filter .2s ease;
}

.kh-home-age-card.is-yellow a { color: #342700; }
.kh-home-age-card a:hover { transform: translateY(-2px); filter: brightness(.96); }
.kh-home-adult-card { align-items: center; background: linear-gradient(135deg,#173b73,#28558f); border-radius: 22px; color: #fff; display: grid; gap: 22px; grid-template-columns: auto 1fr auto; margin-top: 22px; padding: 25px 30px; }
.kh-home-adult-icon { align-items: center; background: rgba(255,255,255,.13); border-radius: 17px; display: flex; font-size: 34px; height: 68px; justify-content: center; width: 68px; }
.kh-home-adult-card .kh-section-kicker { color: #ffc83d; }
.kh-home-adult-card h3 { color: #fff; font-size: 1.55rem; margin: 2px 0 4px; }
.kh-home-adult-card p { color: #e6effb; margin: 0; }
.kh-home-adult-card a { background: #ffc83d; border-radius: 11px; color: #173b73; font-weight: 800; padding: 13px 18px; text-decoration: none; }

.kh-home-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.kh-home-type-card {
    --type-color: #4b91c9;
    display: flex;
    min-height: 180px;
    align-items: flex-start;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--kh-border);
    border-radius: 20px;
    background: #fff;
    color: var(--kh-primary);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(32, 56, 100, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.kh-home-type-card.is-yellow { --type-color: #d0a62c; }
.kh-home-type-card.is-purple { --type-color: #8066b4; }
.kh-home-type-card.is-coral { --type-color: #d8734e; }
.kh-home-type-card.is-green { --type-color: #58aa73; }
.kh-home-type-card.is-teal { --type-color: #3a9293; }
.kh-home-type-card:hover { transform: translateY(-3px); box-shadow: var(--kh-shadow-hover); }

.kh-home-type-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--type-color) 15%, white);
    color: var(--type-color);
    place-items: center;
}

.kh-home-type-icon svg { width: 31px; height: 31px; }
.kh-home-type-copy { display: flex; min-width: 0; flex-direction: column; }
.kh-home-type-copy strong { margin-bottom: 7px; font-size: 1.28rem; }
.kh-home-type-copy small { flex: 1; color: var(--kh-muted); font-size: .92rem; line-height: 1.55; }
.kh-home-type-copy em { margin-top: 14px; color: var(--type-color); font-size: .88rem; font-style: normal; font-weight: 800; }

.kh-home-puzzle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.kh-home-puzzle-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--kh-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(32, 56, 100, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.kh-home-puzzle-card:hover { transform: translateY(-3px); box-shadow: var(--kh-shadow-hover); }

.kh-home-puzzle-thumb {
    display: grid;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--kh-surface-soft);
    color: var(--kh-primary);
    font-weight: 800;
    text-decoration: none;
    place-items: center;
}

.kh-home-puzzle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.kh-home-puzzle-card:hover .kh-home-puzzle-thumb img { transform: scale(1.025); }
.kh-home-puzzle-body { padding: 19px; }

.kh-home-puzzle-meta {
    display: flex;
    min-height: 36px;
    flex-wrap: wrap;
    gap: 4px 6px;
    color: var(--kh-muted);
    font-size: .76rem;
    line-height: 1.4;
}

.kh-home-puzzle-card h3 {
    margin: 9px 0 16px;
    font-size: 1.05rem;
    line-height: 1.42;
}

.kh-home-puzzle-card h3 a { color: var(--kh-primary); text-decoration: none; }

.kh-home-copy-panel {
    padding: clamp(34px, 6vw, 62px);
    border: 1px solid var(--kh-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--kh-shadow);
}

.kh-home-copy-panel h2 { text-align: center; }
.kh-home-copy-panel p { max-width: 940px; margin: 0 auto 16px; line-height: 1.8; }
.kh-home-copy-panel p:last-child { margin-bottom: 0; }

.kh-home-occasion-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.kh-home-occasion-grid article {
    padding: 28px 22px;
    border: 1px solid var(--kh-border);
    border-radius: 18px;
    background: var(--kh-bg);
    text-align: center;
}

.kh-home-occasion-grid article > span { font-size: 2rem; }
.kh-home-occasion-grid h3 { margin: 12px 0 8px; font-size: 1.08rem; }
.kh-home-occasion-grid p { margin: 0; color: var(--kh-muted); font-size: .9rem; line-height: 1.55; }

.kh-home-final-cta { padding: 62px 0 0; }
.kh-home-final-panel { padding-block: clamp(38px, 6vw, 58px); }
.kh-home-final-panel h2 { margin: 0 0 14px; color: #fff; font-size: clamp(1.8rem, 4vw, 2.4rem); text-transform: uppercase; }

@media (max-width: 960px) {
    .kh-home-daily-card { gap: 26px; grid-template-columns: minmax(0,1fr) minmax(260px,.8fr); }
    .kh-home-age-grid,
    .kh-home-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kh-home-puzzle-grid,
    .kh-home-occasion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .kh-home-adult-card { grid-template-columns: auto 1fr; padding: 22px; }
    .kh-home-adult-card a { grid-column: 1 / -1; text-align: center; }
    .kh-home-main { padding-bottom: 44px; }
    .kh-home-hero { padding-top: 24px; }
    .kh-home-hero-panel { padding: 36px 22px; border-radius: 22px; }
    .kh-home-hero-logo { width: 82px; height: 82px; }
    .kh-home-benefit-grid,
    .kh-home-age-grid,
    .kh-home-type-grid,
    .kh-home-puzzle-grid,
    .kh-home-occasion-grid { grid-template-columns: 1fr; }
    .kh-home-benefit-grid article { padding: 20px; }
    .kh-home-section { padding: 44px 0; }
    .kh-home-age-card { min-height: 0; padding: 28px 22px; }
    .kh-home-type-card { min-height: 0; padding: 22px; }
    .kh-home-actions { align-items: stretch; flex-direction: column; }
    .kh-home-actions .kh-button { justify-content: center; }
    .kh-home-daily { padding: 4px 0 44px; }
    .kh-home-daily-card { gap: 24px; grid-template-columns: 1fr; padding: 28px 20px; }
    .kh-home-daily-preview { border-width: 8px; margin: 0 auto; max-width: 430px; width: 100%; }
    .kh-home-daily-copy .kh-button { justify-content: center; width: 100%; }
}

/* Die allgemeinen Template-Farben stehen weiter unten im Stylesheet. */
.kh-main .kh-home-hero h1,
.kh-main .kh-home-final-panel h2 {
    color: #fff;
}

.kh-main .kh-home-hero-panel > p,
.kh-main .kh-home-final-panel > p {
    color: #e3ecfa;
}

.kh-main {
    min-height: 70vh;
    overflow: hidden;
    background: var(--kh-bg);
    color: var(--kh-text);
}

/*
 * GeneratePress bringt bereits einen oberen Innenabstand fuer den normalen
 * Seiteninhalt mit. Unsere eigenen Templates steuern diesen Abstand selbst.
 * Ohne die zentrale Ausnahme addieren sich beide Werte – besonders deutlich
 * auf den Landing-/Archivseiten.
 */
body:has(.kh-main) .site-content {
    padding-top: 0 !important;
}

.kh-main *,
.kh-main *::before,
.kh-main *::after {
    box-sizing: border-box;
}

.kh-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.kh-main h1,
.kh-main h2,
.kh-main h3 {
    color: var(--kh-primary);
}

.kh-main p,
.kh-main li {
    color: var(--kh-text);
}

.kh-main .kh-home-daily-copy h2 { color: #fff; }
.kh-main .kh-home-daily-copy > p { color: #e2ebf8; }
.kh-main .kh-home-daily-badge,
.kh-main .kh-home-daily-meta span { color: #fff; }
.kh-main .kh-home-daily-copy .kh-button { color: #173b73; }
.kh-home-daily-copy .kh-button > span { margin-left: 7px; }
.kh-main .kh-home-adult-card h3 { color: #fff; }
.kh-main .kh-home-adult-card p { color: #e6effb; }

.kh-hero,
.kh-landing-hero {
    padding: 38px 0 56px;
    background: var(--kh-bg);
}

.kh-hero,
.kh-landing-hero {
    padding-top: 18px;
}

.kh-hero-panel,
.kh-landing-hero-panel {
    border-radius: 28px;
    background: var(--kh-primary);
    box-shadow: var(--kh-shadow);
    color: #fff;
}

.kh-hero-panel {
    padding: clamp(30px, 5vw, 56px);
}

.kh-landing-hero-panel {
    max-width: 1180px;
    padding: clamp(40px, 6vw, 65px) clamp(24px, 5vw, 50px);
    text-align: center;
}

.kh-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
    align-items: center;
    gap: clamp(32px, 5vw, 58px);
}

.kh-hero-icon {
    margin-bottom: 14px;
    font-size: 48px;
    line-height: 1;
}

.kh-landing-hero-panel .kh-hero-icon {
    margin-bottom: 20px;
    font-size: 54px;
}

.kh-hero-theme-image {
    display: block;
    width: 96px;
    height: 96px;
    margin-inline: auto;
    object-fit: contain;
}

.kh-hero-content .kh-hero-theme-image {
    margin-inline: 0;
}

.kh-hero-icon .kh-subpage-symbol {
    width: 54px;
    height: 54px;
    margin-inline: auto;
}

.kh-hero-content .kh-subpage-symbol {
    margin-inline: 0;
}

.kh-eyebrow,
.kh-section-kicker {
    display: block;
    color: var(--kh-accent);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.kh-eyebrow {
    margin-bottom: 12px;
}

.kh-hero h1,
.kh-landing-hero h1 {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    text-transform: uppercase;
}

.kh-hero h1 {
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
}

.kh-landing-hero h1 {
    max-width: 900px;
    margin-inline: auto;
    font-size: clamp(2.1rem, 4.5vw, 3rem);
}

.kh-intro {
    max-width: 760px;
    margin: 0 0 26px;
    color: #dce8ff !important;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
}

.kh-landing-hero .kh-intro {
    margin-inline: auto;
}

.kh-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
}

.kh-landing-hero .kh-taxonomy-list {
    justify-content: center;
}

.kh-chip {
    display: inline-flex;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff !important;
    font-size: .88rem;
    text-decoration: none;
}

.kh-chip:hover {
    background: rgba(255, 255, 255, .18);
}

.kh-chip span {
    color: #dce8ff;
}

/* Einzelraetsel: Eckdaten und Aufgabe vor dem Fantasietitel gewichten. */
.kh-raetsel .kh-hero-content {
    display: flex;
    flex-direction: column;
}
.kh-raetsel .kh-hero-content .kh-hero-icon { order: 1; }
.kh-raetsel .kh-hero-content .kh-eyebrow { order: 2; }
.kh-raetsel .kh-hero-content .kh-taxonomy-list {
    gap: 10px;
    margin: 4px 0 22px;
    order: 3;
}
.kh-raetsel .kh-hero-content .kh-chip {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .32);
    font-size: .96rem;
    font-weight: 700;
    padding: 10px 14px;
}
.kh-raetsel .kh-hero-content .kh-chip span {
    color: #b9cbea;
    font-weight: 500;
}
.kh-raetsel .kh-hero-content h1 {
    color: #fff;
    font-size: clamp(1.12rem, 2vw, 1.35rem);
    font-weight: 600;
    line-height: 1.65;
    margin-bottom: 22px;
    order: 4;
    text-transform: none;
}
.kh-raetsel .kh-hero-content .kh-intro {
    color: #c8d8ef !important;
    font-size: clamp(.96rem, 1.35vw, 1.12rem);
    font-weight: 500;
    line-height: 1.55;
    margin: 0 0 24px;
    order: 5;
}
.kh-raetsel .kh-hero-content .kh-intro::before {
    color: #8fa9ca;
    content: 'Aufgabe';
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.kh-raetsel .kh-hero-content .kh-hero-actions { order: 6; }

.kh-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.kh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(32, 56, 100, .15);
}

.kh-button-primary {
    background: var(--kh-accent);
    color: var(--kh-primary) !important;
}

.kh-button-primary:hover {
    background: var(--kh-accent-hover);
}

.kh-button-secondary {
    background: var(--kh-primary);
    color: #fff !important;
}

.kh-button-secondary:hover {
    background: var(--kh-primary-hover);
}

.kh-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.kh-hero-actions .kh-button-secondary {
    border: 1px solid rgba(255, 255, 255, .55);
    background: transparent;
}

.kh-hero-actions .kh-button-secondary:hover {
    background: rgba(255, 255, 255, .12);
}

.kh-preview-card {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 22px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 22px 55px rgba(9, 22, 48, .22);
}

.kh-preview-card,
.kh-preview-image {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-select: none;
}
.kh-preview-image { pointer-events: none; }

.kh-preview-image,
.kh-preview-placeholder {
    display: block;
    width: 100%;
    border-radius: 12px;
    background: #fff;
}

.kh-preview-image {
    height: auto;
}

.kh-preview-placeholder {
    display: grid;
    min-height: 340px;
    place-content: center;
    gap: 8px;
    color: var(--kh-text);
    text-align: center;
}

.kh-breadcrumbs {
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 34px;
    margin: 0 0 14px;
    padding: 5px 10px;
    border: 1px solid #d9e5f3;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 5px 16px rgba(23, 59, 115, .05);
    font-size: .84rem;
}

.kh-breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kh-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.kh-breadcrumbs li:not(:last-child)::after {
    margin: 0 3px 0 7px;
    color: #91a6c1;
    content: '\203A';
    font-size: 1.15em;
    line-height: 1;
}

.kh-breadcrumbs a,
.kh-breadcrumbs span {
    color: var(--kh-muted);
    text-decoration: none;
}

.kh-breadcrumbs a {
    padding: 2px 4px;
    border-radius: 6px;
    transition: color .18s ease, background-color .18s ease;
}

.kh-breadcrumbs a:hover {
    color: var(--kh-primary);
    background: #eaf2fc;
}

.kh-breadcrumbs [aria-current=page] {
    color: var(--kh-primary);
    font-weight: 700;
}

.kh-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 28px;
    padding: 0 0 52px;
}

.kh-content-card,
.kh-side-card,
.kh-solution,
.kh-benefit-card,
.kh-archive-card,
.kh-related-card {
    border: 1px solid var(--kh-border);
    background: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

.kh-content-card,
.kh-side-card {
    border-radius: var(--kh-radius-large);
}

.kh-content-card {
    padding: clamp(24px, 4vw, 40px);
}

.kh-side-card {
    position: sticky;
    top: 96px;
    padding: 28px;
}

.kh-content-card > h2,
.kh-side-card > h2,
.kh-related-section h2 {
    margin-top: 0;
}

.kh-entry-content {
    color: var(--kh-text);
    font-size: 1.03rem;
    line-height: 1.8;
}

.kh-ad-section {
    padding: 8px 0 64px;
    text-align: center;
}

.kh-ad-label {
    display: block;
    margin-bottom: 9px;
    color: var(--kh-muted);
    font-size: .7rem;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.kh-ad-slot {
    display: grid;
    width: 100%;
    min-width: 0;
    place-items: center;
    overflow: hidden;
}

.kh-ad-slot .widget {
    width: 100%;
    margin: 0;
}

.kh-download-section {
    padding: clamp(28px, 4vw, 48px) 0 64px;
    scroll-margin-top: 28px;
}

.kh-download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
    padding: 26px;
    border: 1px solid #f3d989;
    border-radius: 18px;
    background: #fff4d8;
}

.kh-download-section .kh-download-box {
    margin-top: 0;
}

.kh-download-box h2 {
    margin: 0 0 6px;
}

.kh-download-box p {
    margin: 0;
    color: #6f6137;
}

.kh-download-box .kh-section-kicker {
    display: block;
    margin-bottom: 5px;
    color: #8a6500;
}

.kh-side-note {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--kh-border);
    color: var(--kh-muted);
    font-size: .92rem;
}

.kh-steps {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: khsteps;
}

.kh-steps li {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 12px;
    counter-increment: khsteps;
}

.kh-steps li::before {
    display: grid;
    width: 36px;
    height: 36px;
    place-content: center;
    border-radius: 50%;
    background: var(--kh-surface-soft);
    color: var(--kh-primary);
    font-weight: 900;
    content: counter(khsteps);
}

.kh-solution-section {
    padding-bottom: 52px;
}

.kh-solution {
    overflow: hidden;
    border-radius: var(--kh-radius-large);
}

.kh-solution summary {
    padding: 24px 28px;
    cursor: pointer;
    color: var(--kh-primary);
    font-size: 1.1rem;
    font-weight: 800;
}

.kh-solution-content {
    display: grid;
    gap: 22px;
    padding: 0 28px 28px;
}

.kh-solution-image {
    width: 100%;
    max-width: 760px;
    height: auto;
    border: 1px solid var(--kh-border);
    border-radius: 14px;
}

.kh-related-section {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 52px 0 72px;
    border-top: 1px solid var(--kh-border);
    background: var(--kh-surface-soft);
}

body.single-raetsel .kh-main {
    overflow: visible;
}

.kh-ad-before-related {
    padding-top: 12px;
}

.kh-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.kh-related-card {
    overflow: hidden;
    border-radius: 18px;
    color: var(--kh-text);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.kh-related-card:hover,
.kh-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kh-shadow-hover);
}

.kh-related-thumb {
    display: grid;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    place-content: center;
    background: var(--kh-surface-soft);
}

.kh-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kh-related-card h3 {
    margin: 0;
    padding: 18px;
    font-size: 1rem;
    line-height: 1.4;
}

.kh-landing-content {
    padding-top: 0;
    padding-bottom: 78px;
}

.kh-landing-content > section:not(.kh-archive-section) {
    width: 100%;
    max-width: none;
    margin: 0 auto 54px;
}

.kh-landing-content h2 {
    margin: 0 0 18px;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.kh-landing-content p,
.kh-landing-content li {
    font-size: 1.04rem;
    line-height: 1.8;
}

.kh-editorial-intro {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius-large);
    background: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

.kh-archive-section {
    margin: 0 0 68px;
    transition: opacity .16s ease;
}

.kh-archive-section.is-loading {
    opacity: .55;
    pointer-events: none;
}

.kh-landing-content > .kh-subpage-section {
    max-width: none;
    margin-bottom: 58px;
    text-align: center;
}

.kh-subpage-section h2 {
    margin-bottom: 26px;
}

.kh-subpage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    text-align: left;
}

.kh-subpage-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 20px;
    border: 1px solid var(--kh-border);
    border-radius: 18px;
    background: var(--kh-surface);
    box-shadow: var(--kh-shadow);
    color: var(--kh-primary);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.kh-subpage-card:hover {
    transform: translateY(-3px);
    border-color: var(--kh-border-strong);
    box-shadow: var(--kh-shadow-hover);
    color: var(--kh-primary);
}

.kh-subpage-icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-content: center;
    border-radius: 13px;
    background: #fff4d8;
    color: #1682a8;
}

.kh-subpage-symbol {
    display: block;
    width: 32px;
    height: 32px;
}

.kh-subpage-theme-image {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.kh-subpage-card strong,
.kh-subpage-card small {
    display: block;
}

.kh-subpage-card strong {
    margin-bottom: 3px;
    font-size: 1.03rem;
}

.kh-subpage-card small {
    color: var(--kh-muted);
    font-size: .86rem;
}

.kh-subpage-arrow {
    color: #287ba3;
    font-size: 1.3rem;
    font-weight: 800;
}

.kh-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.kh-section-kicker {
    margin-bottom: 7px;
    color: var(--kh-coral);
}

.kh-section-heading h2 {
    margin: 0;
}

.kh-result-count {
    padding: 8px 12px;
    border: 1px solid var(--kh-border);
    border-radius: 999px;
    background: #fff;
    color: var(--kh-muted);
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
}

.kh-puzzle-filters {
    margin: -6px 0 28px;
    scroll-margin-top: 28px;
}

.kh-filter-controls {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--kh-border);
    border-radius: 16px;
    background: var(--kh-surface-soft);
}

.kh-puzzle-filters:not(.has-theme-filter) .kh-filter-controls {
    display: block;
}

.kh-mobile-filter-toggle,
.kh-filter-backdrop,
.kh-filter-sheet-header {
    display: none;
}

.kh-theme-filter {
    display: grid;
    gap: 7px;
}

.kh-theme-picker {
    position: relative;
}

.kh-theme-picker-toggle {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 42px minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 10px;
    padding: 7px 13px 7px 8px;
    border: 1px solid var(--kh-border-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--kh-primary);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(24, 61, 105, .06);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.kh-theme-picker-toggle:hover,
.kh-theme-picker.is-open .kh-theme-picker-toggle {
    border-color: #83acd0;
    background: #f8fbff !important;
    color: var(--kh-primary) !important;
    box-shadow: 0 8px 22px rgba(24, 61, 105, .12);
}

.kh-theme-picker-icon,
.kh-theme-option-icon {
    display: grid;
    place-content: center;
    overflow: hidden;
    border-radius: 11px;
    background: #fff4d8;
}

.kh-theme-picker-icon {
    width: 42px;
    height: 42px;
}

.kh-theme-picker-icon img,
.kh-theme-option-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kh-theme-picker-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.kh-theme-picker-copy small {
    color: var(--kh-muted);
    font-size: .69rem;
    font-weight: 650;
    line-height: 1.2;
}

.kh-theme-picker-copy strong {
    overflow: hidden;
    font-size: .94rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kh-theme-picker-count,
.kh-theme-filter-option > strong {
    display: grid;
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    place-content: center;
    border-radius: 999px;
    background: var(--kh-surface-soft);
    color: var(--kh-muted);
    font-size: .75rem;
}

.kh-theme-picker-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
}

.kh-theme-picker.is-open .kh-theme-picker-chevron {
    transform: translateY(2px) rotate(225deg);
}

.kh-theme-picker-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 30;
    max-height: 360px;
    padding: 7px;
    overflow-y: auto;
    border: 1px solid var(--kh-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 51, 91, .2);
}

.kh-theme-picker-menu[hidden] {
    display: none;
}

.kh-theme-filter-option {
    display: grid;
    width: 100%;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 8px;
    border-radius: 11px;
    color: var(--kh-primary);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
}

.kh-theme-filter-option:hover,
.kh-theme-filter-option:focus {
    background: #f3f8ff !important;
    color: var(--kh-primary) !important;
    outline: none;
}

.kh-theme-filter-option.is-active {
    background: #eaf3ff !important;
    color: var(--kh-primary) !important;
    box-shadow: inset 3px 0 0 #b7d0ec;
}

.kh-theme-option-icon {
    width: 40px;
    height: 40px;
}

.kh-all-themes-icon {
    color: #ee9d16;
    font-size: 1.25rem;
    line-height: 1;
}

.kh-difficulty-filter {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    align-self: stretch;
    align-items: center;
    column-gap: 10px;
    row-gap: 7px;
    margin: 0;
    padding: 0;
}

.kh-difficulty-filter > .kh-filter-label {
    flex-basis: 100%;
    margin: 0;
}

.kh-filter-label {
    margin-right: 2px;
    color: var(--kh-primary);
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.35;
}

.kh-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--kh-border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--kh-primary);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.kh-filter-option > span {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    place-content: center;
    border-radius: 999px;
    background: var(--kh-surface-soft);
    color: var(--kh-muted);
    font-size: .75rem;
}

.kh-filter-option:hover {
    transform: translateY(-1px);
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

.kh-filter-option.is-active {
    border-color: var(--kh-primary);
    background: var(--kh-primary);
    color: #fff;
}

.kh-filter-option.is-active > span {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.kh-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.kh-load-more-wrap {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 34px;
}

.kh-load-more-button {
    min-width: 230px;
    justify-content: center;
    background: var(--kh-primary);
    color: #fff;
}

.kh-load-more-button:hover {
    background: var(--kh-primary-hover);
    color: #fff;
}

.kh-load-more-button.is-loading {
    cursor: wait;
    opacity: .72;
    pointer-events: none;
}

.kh-load-more-status:not(.screen-reader-text) {
    color: var(--kh-muted);
    font-size: .92rem;
}

.kh-archive-card {
    overflow: hidden;
    position: relative;
    border-radius: 18px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.kh-progress-badge {
    align-items: center;
    background: #fff4c9;
    border: 1px solid #f2c64d;
    border-radius: 999px;
    box-shadow: 0 5px 14px rgba(23, 59, 115, .16);
    color: #173b73;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    left: 12px;
    line-height: 1;
    padding: 7px 10px;
    position: absolute;
    top: 12px;
    z-index: 4;
}

.kh-progress-badge.is-complete {
    background: #dff7ec;
    border-color: #65cda2;
    color: #087b50;
}

.kh-related-card { position: relative; }
.kh-related-card > .kh-progress-badge { left: 10px; top: 10px; }
.kh-home-daily-card { position: relative; }
.kh-home-daily-card > .kh-progress-badge { left: auto; right: 18px; top: 18px; }

.kh-archive-thumb {
    display: grid;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    place-content: center;
    background: var(--kh-surface-soft);
    color: var(--kh-primary);
    font-weight: 800;
    text-decoration: none;
}

.kh-archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kh-archive-card-body {
    padding: 20px;
}

.kh-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--kh-muted);
    font-size: .78rem;
}

.kh-archive-card h3 {
    margin: 10px 0;
    font-size: 1.08rem;
    line-height: 1.4;
}

.kh-archive-card h3 a {
    color: var(--kh-primary);
    text-decoration: none;
}

.kh-archive-card p {
    margin: 0 0 14px;
    color: var(--kh-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.kh-card-link {
    color: #287ba3;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.kh-card-link:hover {
    color: var(--kh-primary);
}

.kh-empty-state {
    padding: 42px;
    border: 1px dashed var(--kh-border-strong);
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.kh-empty-state p {
    margin: 8px 0 0;
}

.kh-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.kh-benefit-card {
    padding: 26px 22px;
    border-radius: 18px;
    text-align: center;
}

.kh-benefit-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.kh-benefit-card p {
    margin: 0;
    color: var(--kh-muted);
    font-size: .94rem;
    line-height: 1.65;
}

.kh-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.kh-related-links a {
    display: inline-flex;
    padding: 9px 13px;
    border: 1px solid var(--kh-border);
    border-radius: 10px;
    background: #fff;
    color: #287ba3;
    font-weight: 700;
    text-decoration: none;
}

.kh-related-links a:hover {
    border-color: var(--kh-primary);
    color: var(--kh-primary);
}

.kh-faq {
    display: grid;
    gap: 10px;
}

.kh-faq details {
    border: 1px solid var(--kh-border);
    border-radius: 14px;
    background: #fff;
}

.kh-faq summary {
    padding: 17px 18px;
    cursor: pointer;
    color: var(--kh-primary);
    font-weight: 800;
}

.kh-faq p {
    margin: 0;
    padding: 0 18px 18px;
    font-size: .96rem;
}

.kh-search-hero {
    padding: 38px 0 24px;
}

.kh-search-hero-panel {
    padding: clamp(30px, 5vw, 52px);
    border-radius: var(--kh-radius-large);
    background: var(--kh-primary);
    box-shadow: var(--kh-shadow);
}

.kh-search-hero-panel h1 {
    margin: 10px 0 14px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.kh-search-hero-panel p {
    max-width: 780px;
    margin: 0;
    color: #dce8ff;
    font-size: 1.08rem;
    line-height: 1.7;
}

.kh-search-content {
    padding-bottom: 76px;
}

.kh-search-form {
    margin-bottom: 54px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius-large);
    background: var(--kh-surface);
    box-shadow: var(--kh-shadow);
}

.kh-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.kh-search-row input,
.kh-search-filter select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--kh-border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--kh-text);
    font: inherit;
}

.kh-search-row input {
    padding: 10px 16px;
    font-size: 1rem;
}

.kh-search-row input:focus,
.kh-search-filter select:focus {
    border-color: var(--kh-primary);
    outline: 3px solid rgba(32, 56, 100, .12);
    outline-offset: 1px;
}

.kh-search-row .kh-button {
    min-height: 48px;
    border: 0;
    cursor: pointer;
}

.kh-search-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.kh-search-filter > span {
    display: block;
    margin-bottom: 7px;
    color: var(--kh-primary);
    font-size: .82rem;
    font-weight: 800;
}

.kh-search-filter select {
    padding: 9px 34px 9px 12px;
}

.kh-search-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    color: var(--kh-muted);
    font-size: .85rem;
}

.kh-search-actions a {
    color: #287ba3;
    font-weight: 800;
    text-decoration: none;
}

.kh-search-filter-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.kh-search-filter-buttons .kh-button {
    min-height: 40px;
    padding: 9px 16px;
    cursor: pointer;
}

.kh-search-results {
    min-height: 320px;
}

.kh-pagination {
    margin-top: 38px;
}

.kh-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kh-pagination a,
.kh-pagination span {
    display: grid;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    place-content: center;
    border: 1px solid var(--kh-border);
    border-radius: 10px;
    background: #fff;
    color: var(--kh-primary);
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.kh-pagination .current {
    border-color: var(--kh-primary);
    background: var(--kh-primary);
    color: #fff;
}

@media (max-width: 920px) {
    .kh-hero-grid,
    .kh-content-grid {
        grid-template-columns: 1fr;
    }

    .kh-side-card {
        position: static;
    }

    .kh-archive-grid,
    .kh-related-grid,
    .kh-subpage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kh-benefit-grid {
        grid-template-columns: 1fr;
    }

    .kh-search-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .kh-container {
        width: min(100% - 24px, 1180px);
    }

    .kh-hero,
    .kh-landing-hero {
        padding: 22px 0 38px;
    }

    .kh-hero,
    .kh-landing-hero {
        padding-top: 12px;
    }

    .kh-hero-panel,
    .kh-landing-hero-panel {
        border-radius: 20px;
    }

    .kh-hero-panel {
        padding: 26px 20px;
    }

    .kh-landing-hero-panel {
        padding: 38px 20px;
    }

    .kh-breadcrumbs {
        width: 100%;
        min-height: 32px;
        margin-bottom: 12px;
        padding: 5px 8px;
        border-radius: 12px;
        font-size: .79rem;
    }

    .kh-preview-card {
        padding: 10px;
    }

    .kh-download-box,
    .kh-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .kh-download-box .kh-button {
        width: 100%;
    }

    .kh-search-hero {
        padding-top: 22px;
    }

    .kh-search-row,
    .kh-search-filters {
        grid-template-columns: 1fr;
    }

    .kh-search-row .kh-button {
        width: 100%;
    }

    .kh-search-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .kh-search-filter-buttons {
        flex-wrap: wrap;
    }

    .kh-difficulty-filter {
        align-items: stretch;
    }

    body.kh-filter-sheet-open {
        overflow: hidden;
    }

    .kh-puzzle-filters {
        margin-bottom: 20px;
    }

    .kh-mobile-filter-toggle {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        border: 1px solid var(--kh-border-strong);
        border-radius: 13px;
        background: #fff;
        color: var(--kh-primary);
        font: inherit;
        font-weight: 800;
    }

    .kh-mobile-filter-toggle strong {
        display: grid;
        min-width: 25px;
        height: 25px;
        padding: 0 7px;
        place-content: center;
        border-radius: 999px;
        background: var(--kh-primary);
        color: #fff;
        font-size: .78rem;
    }

    .kh-filter-controls {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 100002;
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 18px;
        max-height: min(78vh, 620px);
        padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
        overflow-y: auto;
        border: 0;
        border-radius: 22px 22px 0 0;
        background: #fff;
        box-shadow: 0 -18px 50px rgba(12, 37, 72, .22);
        transform: translateY(110%);
        visibility: hidden;
        transition: transform .24s ease, visibility 0s linear .24s;
    }

    .kh-puzzle-filters.is-open .kh-filter-controls {
        transform: translateY(0);
        visibility: visible;
        transition-delay: 0s;
    }

    .kh-filter-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--kh-primary);
        font-size: 1.08rem;
    }

    .kh-filter-close {
        display: grid;
        width: 40px;
        height: 40px;
        padding: 0;
        place-content: center;
        border: 0;
        border-radius: 50%;
        background: var(--kh-surface-soft);
        color: var(--kh-primary);
        font: inherit;
        font-size: 1.55rem;
        cursor: pointer;
    }

    .kh-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100001;
        border: 0;
        background: rgba(7, 25, 51, .48);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .kh-puzzle-filters.is-open .kh-filter-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .kh-theme-picker-toggle {
        min-height: 60px;
    }

    .kh-theme-picker-menu {
        position: static;
        max-height: 42vh;
        margin-top: 8px;
        box-shadow: inset 0 0 0 1px var(--kh-border);
    }

    .kh-filter-label {
        flex-basis: 100%;
    }

    .kh-archive-grid,
    .kh-related-grid,
    .kh-subpage-grid {
        grid-template-columns: 1fr;
    }

    .kh-landing-content {
        padding-bottom: 54px;
    }
}

/* Ausmalhelden compatibility for the shared Knobelhelden layout system. */
body.single-ausmalbild .kh-main {
    overflow: visible;
}

.ah-ausmalbild .kh-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.ah-ausmalbild .ah-beta-badge {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--kh-coral);
    color: #fff;
    font-size: .66em;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.kh-home-type-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 620px) {
    .ah-ausmalbild .kh-download-actions,
    .ah-ausmalbild .kh-download-actions .kh-button {
        width: 100%;
    }
}
