/* Čtenář jednoho příběhu */
.story-reader-body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
.reader-container { max-width: 900px; margin: var(--site-content-offset-desktop, 160px) auto 50px; padding: 20px; flex: 1; }
.story-header { text-align: center; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: none; position: relative; }
.story-header::after {
    content: "";
    display: block;
    width: 100%;
    max-width: 100%;
    height: 0;
    margin: 0.875rem auto 0;
    padding: 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    background: none;
    box-shadow: none;
}
.story-type-badge { display: inline-block; padding: 5px 15px; background: var(--panel-soft, #2d343a); color: var(--text-muted, #a7b0b8); border-radius: 1px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; }
.story-title { font-family: 'Cinzel', serif; font-size: 3rem; color: #fff; margin: 10px 0; }
.story-chapter-headline {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: rgba(232, 238, 242, 0.92);
    margin: 0.15rem 0 0.5rem;
    letter-spacing: 0.04em;
}
.story-chapter-headline--multi {
    min-height: 1.4em;
}
.story-meta { color: var(--text-muted, #a7b0b8); font-style: italic; }

/* Přepínač kapitol — tlačítka v rozbalovacím panelu pod hamburgerem */
.story-reading-chapter-toolbar--embedded {
    position: relative;
    flex-shrink: 0;
    align-self: center;
    width: auto;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}
.story-header + .story-reading-theme-bar {
    margin-top: 0;
}
.story-chapter-menu-btn {
    appearance: none;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 1px;
    border: 1px solid rgba(58, 83, 100, 0.45);
    background: rgba(255, 255, 255, 0.4);
    color: #1a2329;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.story-chapter-menu-btn:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(58, 83, 100, 0.65);
}
.story-chapter-menu-btn:focus-visible {
    outline: 2px solid rgba(58, 83, 100, 0.75);
    outline-offset: 2px;
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-menu-btn {
    border-color: rgba(17, 25, 31, 0.35);
    background: rgba(255, 255, 255, 0.35);
    color: #000000;
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-menu-btn:hover {
    background: rgba(255, 255, 255, 0.55);
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-menu-btn {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.22);
    color: #a7b0b8;
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-menu-btn:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.22);
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-menu-btn:focus-visible {
    outline: 2px solid rgba(232, 238, 242, 0.75);
    outline-offset: 2px;
}
.story-chapter-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 6;
    padding: 0.75rem;
    min-width: min(17rem, calc(100vw - 3rem));
    max-width: calc(100vw - 2.5rem);
    box-sizing: border-box;
    border-radius: 1px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.story-reading-chapter-toolbar--reading-theme-light .story-chapter-menu-panel {
    background: #e8ecf0;
    border: 1px solid var(--border-soft, #45515b);
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-menu-panel {
    background: #a8a8a8;
    border: 1px solid rgba(17, 25, 31, 0.35);
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-menu-panel {
    background: #252a30;
    border: 1px solid rgba(0, 0, 0, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.story-chapter-menu-panel .story-chapter-jump-toolbar {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border: none;
}
.story-chapter-jump-btn {
    appearance: none;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    padding: 0.55rem 0.75rem;
    border-radius: 1px;
    border: 1px solid rgba(58, 83, 100, 0.5);
    background: rgba(255, 255, 255, 0.55);
    color: #1a2329;
    line-height: 1.3;
    width: 100%;
    max-width: 100%;
    text-align: left;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.story-chapter-jump-btn:hover {
    border-color: rgba(58, 83, 100, 0.85);
    background: rgba(255, 255, 255, 0.88);
}
.story-chapter-jump-btn:focus-visible {
    outline: 2px solid rgba(58, 83, 100, 0.75);
    outline-offset: 2px;
}
.story-chapter-jump-btn.is-active {
    border-color: rgba(58, 83, 100, 0.95);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 rgba(17, 25, 31, 0.08);
}
.story-reading-chapter-toolbar--reading-theme-light .story-chapter-jump-btn {
    border-color: rgba(58, 83, 100, 0.55);
    background: rgba(255, 255, 255, 0.72);
    color: #11191f;
}
.story-reading-chapter-toolbar--reading-theme-light .story-chapter-jump-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}
.story-reading-chapter-toolbar--reading-theme-light .story-chapter-jump-btn.is-active {
    border-color: var(--border-soft, #45515b);
    background: #f2f5f8;
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-jump-btn {
    border-color: rgba(17, 25, 31, 0.4);
    background: rgba(255, 255, 255, 0.5);
    color: #000000;
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-jump-btn:hover {
    background: rgba(255, 255, 255, 0.78);
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-jump-btn.is-active {
    border-color: rgba(17, 25, 31, 0.65);
    background: rgba(255, 255, 255, 0.92);
}
.story-reading-chapter-toolbar--reading-theme-default .story-chapter-jump-btn:focus-visible {
    outline: 2px solid rgba(17, 25, 31, 0.65);
    outline-offset: 2px;
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-jump-btn {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    color: #a7b0b8;
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-jump-btn:hover {
    background: rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.22);
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-jump-btn.is-active {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.45);
    color: #e8eef2;
    box-shadow: none;
}
.story-reading-chapter-toolbar--reading-theme-night .story-chapter-jump-btn:focus-visible {
    outline: 2px solid rgba(232, 238, 242, 0.75);
    outline-offset: 2px;
}

/* Ikony režimu čtení — bez obdélníkového pozadí */
.story-reading-theme-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.35rem, 5vw, 2.5rem);
    width: 100%;
    max-width: 100%;
    margin: 0 auto 1rem;
    box-sizing: border-box;
}
.story-reading-theme-btn {
    appearance: none;
    margin: 0;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    width: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease, color 0.18s ease;
}
.story-reading-theme-btn svg {
    flex-shrink: 0;
    display: block;
}
.story-reading-theme-btn:focus-visible {
    outline: 2px solid rgba(232, 238, 242, 0.95);
    outline-offset: 3px;
}
.story-reading-theme-btn.is-active {
    transform: scale(1.12);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    opacity: 1;
}
.story-reading-theme-btn:not(.is-active) {
    opacity: 0.5;
}
.story-reading-theme-btn:not(.is-active):hover {
    opacity: 0.92;
}
.story-reading-theme-btn--default {
    color: #999999;
}
.story-reading-theme-btn--light {
    color: rgba(232, 238, 242, 0.95);
}
.story-reading-theme-btn--night {
    color: #a7b0b8;
}

.story-body { background: #d7dde2; border: 1px solid var(--border-soft, #45515b); border-radius: 1px; padding: 40px; line-height: 1.8; color: #11191f; font-size: 1.1rem; font-family: 'Special Elite', serif; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); min-height: 200px; }
.story-body.story-body--reading-theme-light {
    background: #d7dde2;
    color: #11191f;
    border-color: var(--border-soft, #45515b);
}
.story-body.story-body--reading-theme-default {
    background: #999999;
    color: #000000;
    border-color: rgba(17, 25, 31, 0.35);
}
.story-body.story-body--reading-theme-night {
    background: #2d343a;
    color: #a7b0b8;
    border-color: rgba(0, 0, 0, 0.45);
}
.story-body.story-body--reading-theme-default a,
.story-body.story-body--reading-theme-night a {
    color: inherit;
}
.story-body.story-body--reading-theme-night .story-chapter-nav__chapter-title {
    color: #a7b0b8;
}
.story-body.story-body--reading-theme-default .story-chapter-nav__chapter-title {
    color: #000000;
}
.story-body.story-body--reading-theme-night.story-body--multi-chapter .story-chapter-nav {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.story-body.story-body--reading-theme-default.story-body--multi-chapter .story-chapter-nav {
    border-bottom-color: rgba(17, 25, 31, 0.22);
}
.story-body.story-body--reading-theme-night .story-chapter-bottom-nav {
    border-top-color: rgba(255, 255, 255, 0.1);
}
.story-body.story-body--reading-theme-default .story-chapter-bottom-nav {
    border-top-color: rgba(17, 25, 31, 0.22);
}
.story-body.story-body--reading-theme-night .story-chapter-btn {
    background: rgba(0, 0, 0, 0.2);
    color: #a7b0b8;
    border-color: rgba(255, 255, 255, 0.12);
}
.story-body.story-body--reading-theme-night .story-chapter-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}
.story-body.story-body--reading-theme-default .story-chapter-btn {
    background: rgba(255, 255, 255, 0.45);
    color: #000000;
    border-color: rgba(17, 25, 31, 0.35);
}
.story-body.story-body--reading-theme-default .story-chapter-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.75);
}
/* Oddělovače kapitol z administrace (více Jodit editorů → jedno pole content) */
.story-body .obrlobus-story-chapter-sep {
    display: none !important;
}
.story-chapter-panel {
    display: none;
}
.story-chapter-panel.is-active {
    display: block;
}
.story-body--multi-chapter .story-chapter-nav {
    margin: 0 0 1.15rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(17, 25, 31, 0.18);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 0.75rem;
    width: 100%;
}
.story-chapter-nav__chapter-title {
    color: #1a2329;
    font-family: 'Cinzel', serif;
    font-size: 1.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.story-chapter-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.story-chapter-jump__label {
    color: #2c3840;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.story-chapter-jump {
    width: min(100%, 24rem);
    min-height: 44px;
    border: 1px solid rgba(58, 83, 100, 0.55);
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.8);
    color: #1a2329;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    font-family: inherit;
}
.story-chapter-bottom-nav {
    margin: 1.35rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(17, 25, 31, 0.18);
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.story-chapter-btn {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(58, 83, 100, 0.55);
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.55);
    color: #1a2329;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.story-chapter-btn:hover:not(:disabled) {
    border-color: rgba(58, 83, 100, 0.85);
    background: rgba(255, 255, 255, 0.9);
}
.story-chapter-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.story-body p { margin-bottom: 0.2em; text-indent: 15px; text-align: justify; }
/* Zpět na příběhy — vizuál jako rozcestníkové „statické filtry“ (.list-chip--signpost v list-page.css, načte site-pages.css) */
.story-reader-body .back-link.list-chip {
    margin: 2.75rem auto 2rem;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .story-title { font-size: 2.2rem; }
    .story-body { padding: 22px 16px; font-size: 1rem; }
    .reader-container { margin-top: var(--site-content-offset-mobile, 60px); padding-left: 14px; padding-right: 14px; }
    .story-header { margin-bottom: 1rem; padding-bottom: 0.85rem; }
    .story-header::after {
        margin-top: 0.65rem;
    }
    .story-header + .story-reading-theme-bar {
        margin-top: 0;
    }
    .story-reading-theme-bar {
        gap: clamp(1rem, 4.5vw, 1.75rem);
        margin-bottom: 0.85rem;
    }
    .story-reading-theme-btn {
        min-width: 48px;
        min-height: 48px;
        padding: 0.4rem;
    }
    .story-chapter-jump-btn {
        min-height: 44px;
        padding: 0.55rem 0.7rem;
        font-size: 0.8rem;
    }
    .story-body--multi-chapter .story-chapter-nav {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem 0.6rem;
    }
    .story-chapter-nav__chapter-title {
        font-size: 1.48rem;
        padding-top: 0;
    }
    .story-chapter-menu-panel {
        min-width: min(17rem, calc(100vw - 2.25rem));
        max-width: calc(100vw - 1.75rem);
    }
    .story-chapter-bottom-nav {
        margin-top: 1rem;
        align-items: stretch;
    }
    .story-chapter-btn {
        width: 100%;
        min-height: 44px;
    }
}
