/* ==========================================================================
   Back header — Mobile sub-page top bar (BEM block: back-header)
   ========================================================================== */

.back-header {
    position: sticky;
    top: 0;
    left: 0;
    display: none;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    height: 48px;
    flex-shrink: 0;
    background: #06070b;
    box-sizing: border-box;
    overflow: hidden;
}

.back-header__inner {
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.back-header__back {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: opacity 0.2s ease;
}

.back-header__back:hover {
    opacity: 0.85;
}

.back-header__back-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.back-header__title {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-header__right {
    flex-shrink: 0;
    min-width: 24px;
    text-align: right;
    color: #989898;
    font-size: 12px;
    font-family: "PingFang TC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-weight: 400;
    line-height: 18px;
    white-space: nowrap;
}

.back-header__placeholder {
    flex-shrink: 0;
    width: 24px;
    opacity: 0;
    pointer-events: none;
    font-size: 12px;
    line-height: 18px;
    color: #989898;
}

/* ==========================================================================
   Back header — Mobile only (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    .back-header {
        display: block;
    }

    .main-column--back-header .site-header {
        display: none;
    }
}

/* Safe area for notched devices */

@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 767px) {
        .back-header {
            height: calc(48px + env(safe-area-inset-top, 0));
            padding-top: env(safe-area-inset-top, 0);
        }
    }
}
