/* Base */

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: var(--header-border);
}

.header-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(12px, 2vw, 18px) clamp(16px, 4vw, 36px);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Chapter Nav */

.chapter-nav {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-btn {
    background: transparent;
    border: none;
    font-family: var(--body-font);
    font-size: 20px;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    line-height: 1;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.nav-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.3;
}

.back-arrow {
    display: none;
}

.story-titles {
    min-width: 120px;
    text-align: center;
}

.story-title {
    font-family: var(--display-font);
    font-weight: 700;
    font-size: clamp(14px, 1.6vw, 17px);
    color: var(--heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-subtitle {
    font-family: var(--body-font);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.06em;
}

/* Cefr Controls */

.cefr-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 3px;
    border-radius: 8px;
    flex-shrink: 0;
}

.cefr-btn {
    font-family: var(--body-font);
    font-weight: 700;
    background: #4a7bb8;
    border: none;
    color: #fff;
    border-radius: var(--tag-radius);
    font-size: 12px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cefr-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.cefr-current {
    font-family: var(--body-font);
    font-weight: 800;
    font-size: 11px;
    color: var(--text-muted);
    min-width: 28px;
    text-align: center;
}


/* Views button */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0,
    'wght' 200,
    'GRAD' 0,
    'opsz' 24
}

.header-content > .flashcards-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--settings-icon-color);
    flex-shrink: 0;
    transition: all 0.2s;
    background: var(--btn-bg);
    color: var(--btn-fg);
}

.header-content > .flashcards-btn {
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--body-font);
    font-weight: 300;
    font-size: 20px;
    letter-spacing: var(--chapter-letter-spacing);
    text-transform: var(--chapter-text-transform);
    transition: background 0.2s, color 0.2s;
}


.flashcards-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.flashcards-btn.active {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.05);
}





/* Miscellaneous Buttons */

.lang-tag {
    font-family: var(--body-font);
    font-weight: 700;
    background: var(--tag-bg);
    border: var(--tag-border);
    color: var(--tag-fg);
    border-radius: var(--tag-radius);
    font-size: 10px;
    padding: 3px 9px;
    letter-spacing: 0.1em;
    flex-shrink: 0;
}

.gear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--settings-icon-color);
    flex-shrink: 0;
}


/* Progress Bar */

.progress-bar-container {
    height: 2px;
    width: 100%;
    background: var(--progress-bg);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.2s;
}


