/* ============================================
   屏幕顶部标题条(章节页 & 关卡页共用)
   ============================================ */

.screen-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 22px;
    min-height: 44px;
}

.screen-header .section-title { margin: 0; }

.screen-header .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.screen-header .back-btn:hover {
    transform: translateY(-50%) translateX(-2px);
}

.progress-summary {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: .85em;
    color: rgba(255, 255, 255, .75);
    letter-spacing: 1px;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 4px 10px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(180, 120, 60, .3);
    border-radius: 12px;
    white-space: nowrap;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 游戏页 header 中的"第 X 关"标签 */
.game-level-label {
    font-weight: 900;
    color: #ffd7a3;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

/* 窄屏:标题条改为两行(标题在上,总进度在下) */
@media (max-width: 720px) {
    .screen-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        min-height: 0;
    }
    .progress-summary {
        position: static;
        transform: none;
        max-width: 90%;
        font-size: .78em;
    }
    .screen-header .back-btn { top: 0; transform: none; }
    .screen-header .back-btn:hover { transform: translateX(-2px); }
}

@media (max-width: 640px) {
    .progress-summary { font-size: .72em; padding: 3px 8px; }
}