/* Two-pane chapter select layout */
#screen-chapters {
    background-color: transparent;
}

.chapters-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ---- Left pane: chapter list ---- */

.chapters-list-pane {
    width: 25%;
    display: flex;
    flex-direction: column;
    background-color: rgba(9, 7, 5, 0.82);
    border-right: 1px solid var(--color-border);
    overflow: hidden;
}

.chapters-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: rgba(18, 15, 7, 0.92);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.screen-heading {
    font-family: var(--font-title);
    color: var(--color-gold);
    letter-spacing: 0.12em;
    font-size: 1.1rem;
}

.chapter-list-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
}

.chapters-list-scroll {
    height: 100%;
    overflow-y: scroll;
}

.chapter-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: var(--color-text);
    text-align: left;
    transition: background-color 0.12s, color 0.12s;
}

.chapter-list-item:hover {
    background-color: rgba(90, 61, 16, 0.35);
    color: var(--color-gold-light);
}

.chapter-list-item.active {
    background-color: rgba(90, 61, 16, 0.55);
    border-left-color: var(--color-gold);
    color: var(--color-gold-light);
}

.chapter-list-num {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.chapter-list-tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-text-dim);
    margin-top: 0.2rem;
    line-height: 1.3;
}

.chapter-list-item:hover .chapter-list-tagline,
.chapter-list-item.active .chapter-list-tagline {
    color: var(--color-text);
}

/* In-progress: gold bullet after the chapter name */
.chapter-list-item.chapter-in-progress .chapter-list-num::after {
    content: ' \2022';
    color: var(--color-gold);
    font-size: 0.8em;
}

/* Completed: muted */
.chapter-list-item.chapter-completed {
    opacity: 0.55;
}

/* ---- Right pane: chapter detail ---- */

.chapters-detail-pane {
    width: 75%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chapter-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chapter-detail-image {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.90);
    background-size: cover;
    background-position: center top;
    min-height: 0;
    transition: opacity 1s ease;
}

.chapter-detail-info {
    flex-shrink: 0;
    padding: 2rem 2rem 2.5rem;
    background-color: rgba(12, 9, 4, 0.90);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-detail-num {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--color-gold);
    letter-spacing: 0.1em;
    line-height: 1.1;
}

.chapter-detail-tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text);
    line-height: 1.4;
}

.chapter-detail-status {
    font-family: var(--font-title);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-top: 0.15rem;
}

.chapter-status-completed { color: var(--color-text-dim); }
.chapter-status-inprogress { color: var(--color-gold-light); }

.chapter-detail-start {
    margin-top: 1rem;
    width: 100%;
    font-size: 1.05rem;
    padding: 0.85rem 2rem;
}

/* Header bar for save data screen (formerly shared with chapters) */
#screen-save-data .container > .d-flex:first-child {
    background-color: rgba(18, 15, 7, 0.88);
    border-bottom: 1px solid var(--color-border);
    margin-left: -12px;
    margin-right: -12px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem !important;
}
