/* MiniBuchTipps: a sunny reading corner. All rules stay inside the mini theme. */
[data-theme="mini"] {
    --surface-100: #fffdf7;
    --surface-200: #fff1d4;
    --surface-300: #ffe5ae;
    --ink: #203b44;
    --ink-body: #354e56;
    --ink-muted: #506169;
    --primary: #176d68;
    --primary-strong: #10544f;
    --accent: #e9674c;
    --accent-ink: #a93423;
    --highlight: #ffd05b;
    --on-highlight: #203b44;
    --border: #e5ded0;
    --border-strong: #687d80;
    --shadow-pop: 0 8px 18px rgb(32 59 68 / 15%);
    --mini-peach: #ffe9df;
    --mini-mint: #e5f3ed;
    --mini-lilac: #eeecfa;
}

[data-theme="mini"] ::selection {
    color: var(--ink);
    background: var(--highlight);
}

[data-theme="mini"] :is(a, button):focus-visible {
    outline: 3px solid var(--accent-ink);
    outline-offset: 5px;
}

/* The shared navigation uses these tokens in !important color rules. */
[data-theme="mini"] :is(.bo-header, .bo-footer) {
    --on-night: var(--ink);
    --on-night-body: var(--ink-body);
    --link-on-night: var(--primary-strong);
}

[data-theme="mini"] .bo-header {
    background: var(--surface-100);
    color: var(--ink);
    border-bottom: 2px solid var(--border);
    padding-block: 20px;
}

[data-theme="mini"] .bo-header .bo-wordmark {
    color: var(--ink);
    font-size: 27px;
}

[data-theme="mini"] .bo-wordmark span {
    color: var(--accent-ink);
}

[data-theme="mini"] .bo-header .bo-nav {
    gap: 8px 12px;
}

[data-theme="mini"] .bo-header .bo-nav a {
    color: var(--ink);
    font-family: var(--font-kinder);
    font-size: 17px;
    line-height: 24px;
    padding: 10px 12px;
    border-radius: 18px;
}

[data-theme="mini"] .bo-header .bo-nav a:is(:hover, [aria-current="page"]) {
    color: var(--primary-strong);
    background: var(--mini-mint);
}

[data-theme="mini"] .bo-hero--home {
    background: var(--surface-200);
    padding-block: clamp(48px, 7vw, 88px);
    overflow: hidden;
}

[data-theme="mini"] .bo-hero--home h1 {
    font-size: clamp(38px, 5.2vw, 66px);
    line-height: 1.08;
    max-width: 13ch;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

[data-theme="mini"] .bo-hero--home h1 em {
    color: var(--accent-ink);
    font-style: normal;
}

[data-theme="mini"] .bo-hero__book {
    font-family: var(--font-kinder);
    font-size: clamp(23px, 2.7vw, 32px);
    line-height: 1.25;
}

[data-theme="mini"] .bo-mini-sun {
    position: absolute;
    width: clamp(100px, 13vw, 166px);
    height: auto;
    right: 34%;
    top: 34px;
    pointer-events: none;
}

[data-theme="mini"] .bo-hero__stage::before {
    background: var(--highlight);
    border-radius: 47% 53% 43% 57% / 54% 42% 58% 46%;
    box-shadow: none;
}

[data-theme="mini"] .bo-hero__bubble {
    color: var(--ink);
    background: var(--surface-100);
    border-color: var(--ink);
    box-shadow: var(--shadow-pop);
}

[data-theme="mini"] .bo-btn {
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 600;
}

[data-theme="mini"] .bo-btn--link {
    min-height: auto;
    padding: 8px 0;
}

[data-theme="mini"] .bo-section--series {
    background: var(--surface-100);
    padding-block: clamp(40px, 6vw, 72px);
}

[data-theme="mini"] :is(.bo-title, .bo-pagehead h1, .bo-detail h2, .bo-bookhero h1, .bo-series__text b) {
    font-family: var(--font-kinder);
    font-weight: 600;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

[data-theme="mini"] .bo-title {
    font-size: clamp(30px, 3.4vw, 42px);
    line-height: 1.15;
}

[data-theme="mini"] .bo-series {
    gap: 22px;
}

[data-theme="mini"] .bo-series__card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface-200);
    gap: 24px;
    transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

[data-theme="mini"] .bo-series__card:nth-child(4n + 2) {
    background: var(--mini-mint);
}

[data-theme="mini"] .bo-series__card:nth-child(4n + 3) {
    background: var(--mini-peach);
}

[data-theme="mini"] .bo-series__card:nth-child(4n + 4) {
    background: var(--mini-lilac);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    [data-theme="mini"] .bo-series__card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgb(32 59 68 / 12%);
    }
}

[data-theme="mini"] .bo-series__text b {
    font-size: 25px;
    line-height: 1.2;
}

[data-theme="mini"] .bo-series__meta {
    color: var(--ink-body);
    margin-top: 8px;
    font-size: 13px;
}

[data-theme="mini"] .bo-series__lead {
    color: var(--ink-body);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.65;
}

[data-theme="mini"] .bo-pagehead {
    background: var(--surface-200);
    border-bottom-color: var(--border);
}

[data-theme="mini"] :is(.bo-detail, .bo-bookhero) {
    background: var(--mini-mint);
    border-color: var(--border);
    border-radius: 28px;
}

[data-theme="mini"] .bo-detail h2 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
}

[data-theme="mini"] .bo-portrait img {
    border-radius: 18px;
    background: var(--surface-100);
}

[data-theme="mini"] .bo-badge {
    font-weight: 600;
    padding: 6px 12px;
}

[data-theme="mini"] .bo-dailyquote {
    background: var(--surface-200);
}

[data-theme="mini"] .bo-footer {
    background: var(--mini-mint);
    color: var(--ink-body);
    border-top: 2px solid var(--border);
}

[data-theme="mini"] .bo-footer :is(a, h3, .bo-wordmark, .bo-footer__label) {
    color: var(--ink);
}

[data-theme="mini"] .bo-footer p {
    color: var(--ink-body);
}

@media (max-width: 760px) {
    /* The shared navigation uses these tokens in !important color rules. */
[data-theme="mini"] :is(.bo-header, .bo-footer) {
    --on-night: var(--ink);
    --on-night-body: var(--ink-body);
    --link-on-night: var(--primary-strong);
}

[data-theme="mini"] .bo-header {
        padding-block: 16px;
    }

    [data-theme="mini"] .bo-header .bo-nav {
        gap: 2px 4px;
    }

    [data-theme="mini"] .bo-header .bo-nav a {
        padding: 10px 8px;
        font-size: 16px;
    }

    [data-theme="mini"] .bo-mini-sun {
        right: 22px;
        top: 22px;
        width: 72px;
    }

    [data-theme="mini"] .bo-hero--home .bo-hero__text {
        padding-top: 52px;
    }

    [data-theme="mini"] .bo-series__card {
        padding: 20px;
        gap: 20px;
        border-radius: 22px;
    }

    [data-theme="mini"] .bo-series__text b {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="mini"] .bo-series__card {
        transition: none;
    }
}

/* Temporary book spread; the original link and cover remain untouched underneath. */
[data-theme="mini"] .bo-book-opening {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    perspective: 1200px;
}

[data-theme="mini"] .bo-book-opening__backdrop {
    position: absolute;
    inset: 0;
    background: var(--surface-200);
    opacity: 0;
}

[data-theme="mini"] .bo-book-opening__book {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
}

[data-theme="mini"] :is(.bo-book-opening__paper, .bo-book-opening__flap, .bo-book-opening__front, .bo-book-opening__back) {
    position: absolute;
    inset: 0;
    border-radius: 3px 10px 10px 3px;
}

[data-theme="mini"] .bo-book-opening__paper {
    background: var(--surface-100);
    box-shadow: inset 8px 0 16px rgb(32 59 68 / 10%), 0 12px 30px rgb(32 59 68 / 16%);
}

[data-theme="mini"] .bo-book-opening__flap {
    transform-origin: left center;
    transform-style: preserve-3d;
    will-change: transform;
}

[data-theme="mini"] :is(.bo-book-opening__front, .bo-book-opening__back) {
    backface-visibility: hidden;
}

[data-theme="mini"] .bo-book-opening__front .bo-cover {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: none;
    transform: none;
}

[data-theme="mini"] .bo-book-opening__back {
    transform: rotateY(180deg);
    background: var(--surface-100);
    box-shadow: inset -8px 0 16px rgb(32 59 68 / 10%);
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="mini"] .bo-book-opening {
        display: none;
    }
}
