/* ===== css/kopf/buch.css ===== */


:root[data-thema] .buch-wrap {
    max-width: 940px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

:root[data-thema] .buch-reader {
    position: relative;

    border-radius: 10px 22px 22px 10px;
}


:root[data-thema] .buch {
    position: relative;
    min-height: 62vh;
    padding: clamp(1.8rem, 4.5vw, 3.6rem);
    perspective: 2200px;
    border-width: 1px;
    border-style: solid;
    border-radius: 10px 22px 22px 10px;
    background: var(--k-vertieft);
    overflow: hidden;
}

:root[data-thema] .buch::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-image: var(--k-verlauf);
    pointer-events: none;
    z-index: 2;
}


:root[data-thema] .buch-reader:not(.vollbild) .buch {
    cursor: url("../images/zeiger/hand.svg") 13 2, pointer;
}


:root[data-thema] .buch-seite {

    position: relative;
    display: none;
    color: var(--k-text-leise);
    font-size: 1.1rem;
    line-height: 1.9;
}

:root[data-thema] .buch-seite.aktiv {
    display: block;
}




:root[data-thema] .buch[data-richtung="vor"] .buch-seite.aktiv {
    animation: seiteVor var(--bew-ruhig) var(--bew-feder);
}

:root[data-thema] .buch[data-richtung="zurueck"] .buch-seite.aktiv {
    animation: seiteZurueck var(--bew-ruhig) var(--bew-feder);
}


@media (prefers-reduced-motion: reduce) {
    :root[data-thema] .buch[data-richtung] .buch-seite.aktiv {
        animation: none;
    }
}

:root[data-thema] .buch-seitenzahl {
    position: absolute;
    top: 1.1rem;
    right: 1.4rem;
    color: var(--k-text-still);
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
}

:root[data-thema] .buch-seite p {
    max-width: 62ch;
    margin-bottom: 1.5rem;
}

:root[data-thema] .buch-seite strong {
    color: var(--k-text);
}


:root[data-thema] .buch-reader.vollbild .buch-seite {
    font-size: clamp(1.1rem, 1.35vw, 1.28rem);
    line-height: 2.05;
}

:root[data-thema] .buch-reader.vollbild .buch-seite p {
    max-width: 68ch;
    margin-bottom: 1.9rem;
}

:root[data-thema] .buch-reader.vollbild .buch-titel {
    margin-bottom: 2.2rem;
}


:root[data-thema] .buch-cover {
    padding: clamp(1rem, 4vw, 3rem) 0.5rem;
    text-align: center;
}

:root[data-thema] .buch-cover__marke {
    color: var(--k-text-still);
    font-size: max(12px, 0.72rem);
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

:root[data-thema] .buch-cover__titel {
    margin: 1.2rem 0 1.4rem;
    font-family: 'Aerona Sans', system-ui, sans-serif;
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    background-image: linear-gradient(var(--k-winkel),
            var(--k-verlauf-a) 0%, var(--k-verlauf-b) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

:root[data-thema] .buch-cover__sub {
    max-width: 34ch;
    margin: 0 auto 2.2rem;
    color: var(--k-text-leise);
    font-size: 1.15rem;
    line-height: 1.7;
}

:root[data-thema] .buch-cover__autor {
    color: var(--k-text);
    font-weight: 600;
}

:root[data-thema] .buch-cover__hint {
    margin-top: 2.4rem;
    color: var(--k-text-still);
    font-size: 0.85rem;
}




:root[data-thema] .buch-reader .fenster__ring,
:root[data-thema] .buch .buch-pixel {
    position: absolute;
    pointer-events: none;
    max-width: none;
    max-height: none;
}


:root[data-thema] .buch .buch-pixel {
    left: 0;
    top: 0;
}



@media (max-width: 640px) {
    :root[data-thema] .buch {
        border-radius: 8px 14px 14px 8px;
    }

    :root[data-thema] .buch-seite {
        font-size: 1.02rem;
    }
}

:root[data-thema] .buch-oeffnen {
    position: absolute;
    left: 50%;
    bottom: 1.8rem;
    z-index: 5;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.8rem;
    border: none;
    border-radius: var(--k-rund-mittel);

    background: var(--k-verlauf-tief);
    color: var(--k-auf-akzent);
    font-size: 1rem;
    font-weight: 800;
    cursor: url("../images/zeiger/hand.svg") 13 2, pointer;
    transition: box-shadow var(--bew-mikro) var(--bew-knackig);
}

:root[data-thema] .buch-oeffnen {
    box-shadow:
        var(--k-schatten-eng),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -12px 18px -12px rgba(0, 0, 0, 0.45);
}

:root[data-thema] .buch-oeffnen:hover,
:root[data-thema] .buch-oeffnen:focus-visible {
    box-shadow:
        0 10px 26px var(--k-schein-verlauf),
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 -12px 18px -12px rgba(0, 0, 0, 0.45);
}

:root[data-thema] .buch-oeffnen:focus-visible {
    outline: 2px solid var(--k-fokus);
    outline-offset: 3px;
}

:root[data-thema] .buch-oeffnen:active {
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -16px 22px -12px rgba(0, 0, 0, 0.5);
}

:root[data-thema] .buch-oeffnen > .knopf-pixel {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    max-width: none;
    max-height: none;
    border-radius: inherit;
    z-index: 0;
}

:root[data-thema] .buch-oeffnen > .fenster__zeichen-pixel {
    position: absolute;
    pointer-events: none;
    max-width: none;
    max-height: none;
}

:root[data-thema] .buch-oeffnen > span,
:root[data-thema] .buch-oeffnen > i {
    position: relative;
    z-index: 1;
}

:root[data-thema] .buch-oeffnen > i.zeichen--zerfaellt::before {
    visibility: hidden;
}

:root[data-thema] .buch-reader.vollbild .buch-oeffnen {
    display: none;
}




:root[data-thema] .buch-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--k-text-still);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

:root[data-thema] .kapitel-start .buch-kicker:not(.buch-kicker--lauf) {
    background-image: linear-gradient(var(--k-winkel),
            var(--k-verlauf-a) 0%, var(--k-verlauf-b) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

:root[data-thema] .buch-kicker--lauf {
    margin-bottom: 1.6rem;
    opacity: 0.75;
}

:root[data-thema] .buch-titel {
    margin-bottom: 1.8rem;
    font-family: 'Aerona Sans', system-ui, sans-serif;
    font-size: clamp(1.7rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.18;
    color: var(--k-text);
}


:root[data-thema] .buch-dropcap {
    float: left;
    margin: 0.1em 0.12em -0.06em 0;
    font-family: 'Aerona Sans', system-ui, sans-serif;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 0.82;
    background-image: linear-gradient(var(--k-winkel),
            var(--k-verlauf-a) 0%, var(--k-verlauf-b) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}


:root[data-thema] .buch-quote {
    position: relative;
    margin: 2rem 0;
    padding: 1.8rem 1.8rem 1.8rem 2rem;
    border-width: 1px;
    border-style: solid;
    border-radius: var(--k-rund-gross);
    background: var(--k-vertieft);
    color: var(--k-text);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.65;
    overflow: hidden;
}

:root[data-thema] .buch-quote::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-image: linear-gradient(180deg,
            var(--k-verlauf-a) 0%, var(--k-verlauf-b) 100%);
    pointer-events: none;
}

:root[data-thema] .buch-quote--lila::before {
    background-image: linear-gradient(180deg,
            var(--k-verlauf-b) 0%, var(--k-verlauf-a) 100%);
}


:root[data-thema] .buch-box {
    position: relative;
    margin: 2rem 0;
    padding: 1.8rem;
    border-width: 1px;
    border-style: solid;
    border-radius: var(--k-rund-gross);
    background: var(--k-vertieft);
    overflow: hidden;
}

:root[data-thema] .buch-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background-image: var(--k-verlauf);
    pointer-events: none;
}

:root[data-thema] .buch-box__emoji {
    margin-bottom: 0.7rem;
    font-size: 2rem;
}

:root[data-thema] .buch-box h3 {
    margin-bottom: 0.7rem;
    color: var(--k-text);
    font-size: 1.2rem;
    font-weight: 700;
}

:root[data-thema] .buch-box p {
    margin-bottom: 0;
}


:root[data-thema] .buch-verweis {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--k-text-leise);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--bew-mikro) var(--bew-knackig);
}

:root[data-thema] .buch-verweis:hover,
:root[data-thema] .buch-verweis:focus-visible {
    color: var(--k-text);
}


:root[data-thema] .buch-verweis:focus-visible {
    outline: 2px solid var(--k-fokus);
    outline-offset: 3px;
}


:root[data-thema] .buch-verweis.hat-pixelstrich {
    text-decoration: none;
}


:root[data-thema] .buch-autor {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2.5rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--k-rand-dicke);
}

:root[data-thema] .buch-autor__kreis {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-image: var(--k-verlauf);
    color: #fff;
    font-family: 'Aerona Sans', system-ui, sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
}

:root[data-thema] .buch-autor__name {
    color: var(--k-text);
    font-size: 1.1rem;
    font-weight: 700;
}

:root[data-thema] .buch-autor__rolle {
    color: var(--k-text-still);
    font-size: 0.88rem;
}



:root[data-thema] .buch-schliessen,
:root[data-thema] .buch-pfeil,
:root[data-thema] .buch-inhalt-btn,
:root[data-thema] .buch-zaehler {
    display: none;
}

:root[data-thema] .buch-reader.vollbild .buch-schliessen,
:root[data-thema] .buch-reader.vollbild .buch-inhalt-btn,
:root[data-thema] .buch-reader.vollbild .buch-pfeil {
    display: flex;
}

:root[data-thema] .buch-reader.vollbild .buch-zaehler {
    display: block;
}


:root[data-thema] .buch-schliessen,
:root[data-thema] .buch-inhalt-btn {
    position: fixed;
    top: 1.1rem;
    z-index: 3;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-width: 1px;
    border-style: solid;
    border-radius: 50%;
    background: var(--k-menue);
    backdrop-filter: var(--k-glas-filter);
    -webkit-backdrop-filter: var(--k-glas-filter);
    color: var(--k-text-leise);
    font-size: 1rem;
    cursor: url("../images/zeiger/hand.svg") 13 2, pointer;
    transition: color var(--bew-mikro) var(--bew-knackig);
}

:root[data-thema] .buch-schliessen {
    right: 1.1rem;
}

:root[data-thema] .buch-inhalt-btn {
    left: 1.1rem;
}

:root[data-thema] .buch-schliessen:hover,
:root[data-thema] .buch-inhalt-btn:hover,
:root[data-thema] .buch-schliessen:focus-visible,
:root[data-thema] .buch-inhalt-btn:focus-visible {
    color: var(--k-text);
}


:root[data-thema] .buch-schliessen:focus-visible,
:root[data-thema] .buch-inhalt-btn:focus-visible,
:root[data-thema] .buch-pfeil:focus-visible,
:root[data-thema] .buch-inhalt button:focus-visible {
    outline: 2px solid var(--k-fokus);
    outline-offset: 3px;
}


:root[data-thema] .buch-schliessen > .fenster__ring,
:root[data-thema] .buch-inhalt-btn > .fenster__ring,
:root[data-thema] .buch-pfeil > .fenster__ring,
:root[data-thema] .buch-schliessen > .fenster__zeichen-pixel,
:root[data-thema] .buch-inhalt-btn > .fenster__zeichen-pixel,
:root[data-thema] .buch-pfeil > .fenster__zeichen-pixel {
    position: absolute;
    pointer-events: none;
    max-width: none;
    max-height: none;
}


:root[data-thema] .buch-schliessen > i.zeichen--zerfaellt::before,
:root[data-thema] .buch-inhalt-btn > i.zeichen--zerfaellt::before,
:root[data-thema] .buch-pfeil > i.zeichen--zerfaellt::before {
    visibility: hidden;
}


:root[data-thema] .buch-pfeil {
    position: fixed;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-width: 1px;
    border-style: solid;
    border-radius: 50%;
    background: var(--k-menue);
    backdrop-filter: var(--k-glas-filter);
    -webkit-backdrop-filter: var(--k-glas-filter);
    font-size: 1.2rem;
    cursor: url("../images/zeiger/hand.svg") 13 2, pointer;
    transition: opacity var(--bew-mikro) var(--bew-knackig);
}

:root[data-thema] .buch-pfeil > i::before,
:root[data-thema] .buch-pfeil::before {
    background-image: var(--k-verlauf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-thema] .buch-pfeil--zurueck {
    left: 1.2rem;
}

:root[data-thema] .buch-pfeil--vor {
    right: 1.2rem;
}


:root[data-thema] .buch-pfeil[disabled] {
    opacity: 0.28;
    cursor: url("../images/zeiger/pfeil.svg") 3 3, default;
}


:root[data-thema] .buch-zaehler {
    position: fixed;
    bottom: 1.1rem;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    padding: 0.35rem 0.9rem;
    border-width: 1px;
    border-style: solid;
    border-radius: var(--k-rund-pille);
    background: var(--k-menue);
    backdrop-filter: var(--k-glas-filter);
    -webkit-backdrop-filter: var(--k-glas-filter);
    color: var(--k-text-leise);
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.06em;
    white-space: nowrap;
}


:root[data-thema] .buch-inhalt {
    display: none;
    position: fixed;
    top: 4.6rem;
    left: 1.1rem;
    right: 1.1rem;
    z-index: 4;
    max-width: 760px;
    max-height: 72vh;
    margin: 0 auto;
    padding: 1rem;
    overflow-y: auto;
    border-width: 1px;
    border-style: solid;
    border-radius: var(--k-rund-gross);
    background: var(--k-menue);
    backdrop-filter: var(--k-glas-filter);
    -webkit-backdrop-filter: var(--k-glas-filter);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 0.5rem;
}

:root[data-thema] .buch-inhalt.offen {
    display: grid;
}

:root[data-thema] .buch-inhalt button {
    position: relative;
    padding: 0.7rem 1rem;
    border-width: 1px;
    border-style: solid;
    border-radius: var(--k-rund-klein);
    background: var(--k-vertieft);
    color: var(--k-text-leise);
    font-size: 0.9rem;
    text-align: left;
    cursor: url("../images/zeiger/hand.svg") 13 2, pointer;
    transition: color var(--bew-mikro) var(--bew-knackig);
}

:root[data-thema] .buch-inhalt button:hover,
:root[data-thema] .buch-inhalt button:focus-visible {
    color: var(--k-text);
}



:root[data-thema] .buch-inhalt button.aktiv {
    color: var(--k-text);
}

:root[data-thema] .buch-inhalt button.aktiv::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: var(--k-rund-klein) 0 0 var(--k-rund-klein);
    background-image: var(--k-verlauf);
    pointer-events: none;
}


:root[data-thema] .buch-inhalt button > .fenster__ring {
    position: absolute;
    pointer-events: none;
    max-width: none;
    max-height: none;
}

:root[data-thema] .buch-inhalt button span {
    display: block;
    color: var(--k-text-leise);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}



:root[data-thema] .buch-reader.vollbild {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(0.6rem, 2vw, 1.6rem);
    background: var(--k-grund);
}

:root[data-thema] .buch-reader.vollbild .buch {
    flex: 1;
    width: 100%;
    max-width: 860px;
    min-height: 0;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--k-rund-gross);
    scrollbar-width: thin;
    scrollbar-color: var(--k-rand-seite) transparent;
}

:root[data-thema] .buch-reader.vollbild .buch::-webkit-scrollbar {
    width: 8px;
}

:root[data-thema] .buch-reader.vollbild .buch::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: var(--k-rand-seite);
}

@media (max-width: 640px) {
    :root[data-thema] .buch-reader.vollbild {
        padding: 0.5rem;
    }

    :root[data-thema] .buch-reader.vollbild .buch {
        padding: 3.2rem 1.2rem 4.4rem;
    }

    :root[data-thema] .buch-pfeil {
        top: auto;
        bottom: 1rem;
        width: 48px;
        height: 48px;
        transform: none;
    }

    :root[data-thema] .buch-pfeil--zurueck {
        left: 1rem;
    }

    :root[data-thema] .buch-pfeil--vor {
        right: 1rem;
    }

    :root[data-thema] .buch-zaehler {
        bottom: 1.5rem;
    }
}

:root[data-thema] .buch-reader.vollbild > .fenster__ring,
:root[data-thema] .buch-reader.vollbild > .buch > .fenster__ring,
:root[data-thema] .buch-reader.vollbild > .buch-oeffnen .fenster__ring { display: none; }
