/*
 * Modern playback skin
 * Presentation only: the existing player, routes, episodes, ads and comments
 * remain untouched. The body.bstem class is supplied by the template theme
 * switch and is used below for the dark palette.
 */

#play_page {
    --play-card: var(--tpl-bg-base, #ffffff);
    --play-card-soft: var(--tpl-bg-muted, #f5f7fa);
    --play-line: var(--tpl-border-soft, #e8edf2);
    --play-text: var(--tpl-text-strong, #1f2933);
    --play-muted: var(--tpl-text-muted, #73808c);
    --play-accent: var(--tpl-accent, #40cc92);
    --play-shadow: 0 10px 28px rgba(24, 39, 58, .07);
    background: var(--play-card-soft);
    color: var(--play-text);
}

/* public-head-early.css reserves 335px for the old player shell. That
 * reservation is wrong when the responsive player is shorter and pushes the
 * title/synopsis below a large blank area. Let the real children determine
 * the height while keeping the player aspect ratio untouched. */
#play_page .play_boxbg > .container {
    min-height: 0 !important;
}

body:not(.bstem) #play_page {
    --play-card: #ffffff;
    --play-card-soft: #f4f7fa;
    --play-line: #e5ebf0;
    --play-text: #1e2935;
    --play-muted: #71808d;
    --play-shadow: 0 10px 30px rgba(23, 42, 61, .07);
}

body.bstem #play_page,
.bstem #play_page {
    --play-card: #121a23;
    --play-card-soft: #0d141c;
    --play-line: rgba(255, 255, 255, .09);
    --play-text: #eef3f7;
    --play-muted: #a6b1bd;
    --play-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

/* The top player and source list become one balanced desktop card. */
@media (min-width: 821px) {
    #play_page .play_boxbg {
        padding: 22px 0 8px;
        background: transparent;
    }

    #play_page .play_boxbg > .container,
    #play_page > .container {
        max-width: 1280px;
    }

    #play_page .play_box.play_video {
        display: flex;
        align-items: stretch;
        gap: 16px;
    }

    #play_page .play_box.play_video > .left_row {
        float: none !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    #play_page .play_box.play_video > .right_row {
        float: none !important;
        flex: 0 0 316px;
        width: 316px;
    }
}

/* Metadata tags after the score: override the legacy rem-sized pills so
 * their text remains readable on desktop and in both color modes. */
#play_page .play_text .data a {
    display: inline-flex;
    align-items: center;
    height: auto;
    min-height: 24px;
    margin-right: 0;
    padding: 3px 9px;
    border: 1px solid var(--play-line);
    border-radius: 999px;
    background: var(--play-card-soft);
    color: var(--play-text) !important;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

#play_page .play_text .data a:hover {
    border-color: var(--play-accent);
    color: var(--play-accent) !important;
}

#play_page .player_video {
    overflow: hidden;
    border: 1px solid var(--play-line);
    border-radius: 14px;
    background: #050708;
    box-shadow: var(--play-shadow);
}

#play_page .play_but {
    margin-top: 10px;
    border: 1px solid var(--play-line);
    border-radius: 12px;
    background: var(--play-card);
    box-shadow: 0 5px 18px rgba(24, 39, 58, .04);
}

#play_page .play_box_right {
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid var(--play-line);
    border-radius: 14px;
    background: var(--play-card);
    box-shadow: var(--play-shadow);
}

#play_page .play_namebox {
    padding: 18px 18px 13px;
    border-bottom: 1px solid var(--play-line);
}

#play_page .play_namebox .title {
    margin: 0 0 7px;
    color: var(--play-text);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.35;
}

#play_page .play_namebox .fenlei {
    color: var(--play-muted);
    font-size: 12px;
}

#play_page .play_infobox {
    padding: 14px;
}

#play_page .play_infobox .play_vlist {
    margin: 0 0 14px;
    padding: 10px;
    border-radius: 10px;
    background: var(--play-card-soft);
}

#play_page .play_infobox .play_vlist_title {
    color: var(--play-text);
    font-weight: 600;
}

#play_page .play_infobox .play_vlist_now,
#play_page .play_infobox .play_clike {
    color: var(--play-muted);
}

#play_page .play_infobox .play_clike {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 600;
}

/* The title/meta/synopsis block below the player. */
#play_page .play_box:not(.play_video) {
    padding: 10px 0 0;
}

#play_page .play_pan,
#play_page #bofy,
#play_page .pannel--vod-related,
#play_page #pinglun,
#play_page #actor_vbox {
    box-sizing: border-box;
    margin-bottom: 14px;
    border: 1px solid var(--play-line);
    border-radius: 14px;
    background: var(--play-card);
    box-shadow: 0 5px 20px rgba(24, 39, 58, .035);
}

#play_page .play_pan {
    padding: 20px 22px 18px;
}

#play_page .player_detail {
    gap: 10px 14px;
}

#play_page .player_detail .video_title .title {
    color: var(--play-text) !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.01em;
}

#play_page .player_detail .play_now a.flip {
    color: var(--play-muted) !important;
    transition: color .2s ease;
}

#play_page .player_detail .play_now a.flip:hover {
    color: var(--play-accent) !important;
}

#play_page .play_text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 10px;
    color: var(--play-muted);
    font-size: 13px;
}

#play_page .play_text .text_score {
    color: var(--play-accent);
    font-weight: 700;
}

#play_page .play_content {
    display: block;
    box-sizing: border-box;
    clear: both;
    margin: 18px 0 0;
    padding: 16px 18px 4px;
    border: 1px solid var(--play-line);
    border-radius: 11px;
    background: var(--play-card-soft);
    color: var(--play-muted);
    font-size: 14px;
    line-height: 1.8;
}

#play_page .play_content::before {
    display: block;
    margin-bottom: 8px;
    color: var(--play-text);
    content: "剧情介绍";
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
}

#play_page .play_content p {
    margin: 0 0 9px;
    overflow-wrap: anywhere;
}

#play_page .play_content p > span:first-child {
    color: var(--play-text);
    font-weight: 600;
}

#play_page .play_content a {
    display: inline-block;
    margin-left: 8px;
    color: var(--play-accent);
}

/* Section headers and episode pills. */
#play_page .pannel_head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--play-line);
}

#play_page .pannel_head .title {
    color: var(--play-text);
    font-size: 16px;
    font-weight: 650;
}

#play_page #bofy .tabs,
#play_page #bofy .content {
    padding: 0 16px 16px;
}

#play_page #bofy .title_nav {
    gap: 8px;
    padding: 13px 0 0;
}

#play_page #bofy .title_nav li a,
#play_page #bofy .content_playlist li a {
    box-sizing: border-box;
    border: 1px solid var(--play-line);
    border-radius: 8px;
    background: var(--play-card-soft);
    color: var(--play-muted);
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

#play_page #bofy .title_nav li a:hover,
#play_page #bofy .content_playlist li a:hover,
#play_page #bofy .title_nav li.active a,
#play_page #bofy .content_playlist li.active a {
    border-color: var(--play-accent);
    background: color-mix(in srgb, var(--play-accent) 12%, var(--play-card));
    color: var(--play-accent);
}

#play_page #bofy .content_playlist li a {
    min-height: 38px;
    padding: 9px 10px;
}

#play_page .vod-playlist-expand {
    border-color: var(--play-line);
    border-radius: 8px;
    background: var(--play-card-soft);
    color: var(--play-muted);
}

#play_page #actor_vbox,
#play_page .pannel--vod-related,
#play_page #pinglun {
    overflow: hidden;
}

#play_page #actor_vbox .pannel_head,
#play_page .pannel--vod-related .pannel_head,
#play_page #pinglun .pannel_head {
    background: transparent;
}

#play_page #pinglun .mac_comment {
    min-height: 150px;
    padding: 6px 18px 18px;
}

#play_page .mac_comment .comment_form,
#play_page .mac_comment .comm_list_box {
    border-radius: 10px;
}

body.bstem #play_page .play_content,
.bstem #play_page .play_content {
    background: rgba(255, 255, 255, .035);
}

body.bstem #play_page .play_box_right,
body.bstem #play_page .play_but,
body.bstem #play_page .play_pan,
body.bstem #play_page #bofy,
body.bstem #play_page .pannel--vod-related,
body.bstem #play_page #pinglun,
body.bstem #play_page #actor_vbox,
.bstem #play_page .play_box_right,
.bstem #play_page .play_but,
.bstem #play_page .play_pan,
.bstem #play_page #bofy,
.bstem #play_page .pannel--vod-related,
.bstem #play_page #pinglun,
.bstem #play_page #actor_vbox {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

@media (max-width: 820px) {
    #play_page .play_boxbg {
        padding: 8px 0 2px;
    }

    #play_page .player_video {
        border-radius: 10px;
    }

    #play_page .play_but {
        margin-top: 8px;
        border-radius: 10px;
    }

    #play_page .play_box:not(.play_video) {
        padding-top: 8px;
    }

    #play_page .play_pan {
        margin-bottom: 10px;
        padding: 16px 14px 14px;
        border-radius: 12px;
    }

    #play_page .player_detail .video_title .title {
        font-size: 20px;
    }

    #play_page .play_content {
        margin-top: 14px;
        padding: 14px 13px 4px;
        font-size: 13px;
        line-height: 1.75;
    }

    #play_page .pannel_head {
        padding: 13px 14px 10px;
    }

    #play_page #bofy,
    #play_page .pannel--vod-related,
    #play_page #pinglun,
    #play_page #actor_vbox {
        margin-bottom: 10px;
        border-radius: 12px;
    }

    #play_page #bofy .tabs,
    #play_page #bofy .content {
        padding-right: 10px;
        padding-left: 10px;
    }

    #play_page #pinglun .mac_comment {
        min-height: 130px;
        padding: 4px 12px 14px;
    }
}

/* Single-episode mode: keep the information card, remove route/episode UI. */
#play_page .play_box.play_video {
    grid-template-columns: minmax(0, 1fr);
}

#play_page .play_box.play_video > .right_row,
#play_page #bofy {
    display: none !important;
}

#play_page .play_box.play_video > .left_row {
    width: 100% !important;
}

#play_page .play_but {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#play_page .play_but .play-but-bar {
    display: none !important;
}

#play_page .play_but .play-but-social {
    margin-top: 8px;
}

#play_page .play_pan .play_now {
    display: none !important;
}

#play_page .play-info-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid var(--play-line);
}

#play_page .play-info-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--play-line);
    border-radius: 999px;
    background: transparent;
    color: var(--play-muted);
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

#play_page .play-info-action:hover,
#play_page .play-info-action:focus-visible {
    border-color: var(--play-accent);
    background: color-mix(in srgb, var(--play-accent) 10%, transparent);
    color: var(--play-accent);
    outline: none;
}

#play_page .play-info-action .iconfont {
    margin-right: 5px;
    font-size: 14px;
}

#play_page .play-info-action__ico {
    width: 14px;
    height: 14px;
    margin-right: 5px;
}

@media (max-width: 820px) {
    #play_page .play-info-actions {
        gap: 7px;
        margin-top: 13px;
        padding-top: 11px;
    }

    #play_page .play-info-action {
        min-width: 34px;
        width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 50%;
    }

    #play_page .play-info-action span {
        display: none;
    }

    #play_page .play-info-action .iconfont,
    #play_page .play-info-action__ico {
        margin-right: 0;
    }
}

/* Reference-layout pass: a cinematic frame with one visual language. */
body:not(.bstem) #play_page {
    background: #f3f6f9;
}

body.bstem #play_page,
.bstem #play_page {
    background: #0b1118;
}

@media (min-width: 821px) {
    #play_page .play_boxbg {
        padding: 28px 0 12px;
        background: transparent;
    }

    #play_page .play_boxbg > .container,
    #play_page > .container {
        max-width: 1320px;
    }

    #play_page .play_box.play_video {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 326px;
        align-items: stretch;
        gap: 18px;
        padding-top: 0;
    }

    #play_page .play_box.play_video > .left_row,
    #play_page .play_box.play_video > .right_row {
        float: none !important;
        width: auto !important;
        min-width: 0;
    }

    #play_page .play_box.play_video > .left_row {
        display: flex;
        flex-direction: column;
    }

    #play_page .play_box.play_video > .right_row {
        display: block !important;
    }

    #play_page .player_video {
        min-height: 360px;
        border: 1px solid rgba(40, 55, 70, .68);
        border-radius: 16px;
        box-shadow: 0 18px 42px rgba(10, 20, 30, .16);
    }

    #play_page .play_box_right {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        border: 1px solid var(--play-line);
        border-radius: 16px;
        background: var(--play-card);
        box-shadow: 0 18px 42px rgba(10, 20, 30, .10);
    }

    #play_page .play_infobox {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        scrollbar-width: thin;
    }

    #play_page .play_infobox .play_vlist {
        border: 1px solid var(--play-line);
        background: var(--play-card-soft);
    }

    #play_page .play_boxbg + .container {
        max-width: 1320px;
    }

    #play_page .play_boxbg + .container > .left_row.container-wrap {
        float: none;
        width: 30rem;
        max-width: none;
        margin: 0;
    }

    #play_page .play_box:not(.play_video) {
        padding: 8px 0 0;
    }

    #play_page .play_box:not(.play_video) > .left_row {
        float: none;
        width: 100%;
    }
}

/* A compact action rail with icon-first controls. */
#play_page .play_but {
    margin: 10px 0 0;
    padding: 0 4px;
    border: 0;
    background: transparent;
}

#play_page .play_but .play-but-bar {
    display: flex;
    align-items: center;
    min-height: 42px;
}

#play_page .play_but .play-but-wrap,
#play_page .play_but .play-but-wrap .scroller {
    width: 100% !important;
    max-width: 100%;
    overflow: visible !important;
}

#play_page .play_but .play-but-strip {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

#play_page .play_but .play-but-item {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

#play_page .play_but .play-but-item > a,
#play_page .play_but .play-but-item > .play_collec {
    min-width: 38px;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--play-line);
    border-radius: 999px;
    background: var(--play-card) !important;
    color: var(--play-muted) !important;
    box-shadow: none;
}

#play_page .play_but .play-but-item > a:hover,
#play_page .play_but .play-but-item > .play_collec:hover,
#play_page .play_but .play-but-item > .play_collec.is_fav {
    border-color: var(--play-accent);
    color: var(--play-accent) !important;
}

#play_page .play_but .play-but-item .iconfont,
#play_page .play_but .play-but-item__report-ico {
    margin-right: 0;
    font-size: 15px;
}

#play_page .play_but .play-but-item > a span,
#play_page .play_but .play-but-item > .play_collec span {
    margin-left: 5px;
    color: inherit;
    font-size: 12px;
}

/* Metadata card, synopsis and primary actions. */
#play_page .play_pan {
    position: relative;
    padding: 22px 26px 20px;
    border: 1px solid var(--play-line);
    border-radius: 16px;
    background: var(--play-card);
    box-shadow: var(--play-shadow);
}

#play_page .player_detail .video_title .title,
#play_page .player .video_title h1.title {
    color: var(--play-text) !important;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -.025em;
}

#play_page .player_detail .play_now {
    margin-left: auto;
}

#play_page .player_detail .play_now a.flip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--play-line);
    border-radius: 999px;
    color: var(--play-muted) !important;
}

#play_page .play_text {
    margin-top: 11px;
    padding-bottom: 2px;
    color: var(--play-muted);
}

#play_page .play_content {
    margin-top: 18px;
    padding: 16px 18px 7px;
    border: 0;
    border-left: 3px solid var(--play-accent);
    border-radius: 0 10px 10px 0;
    background: var(--play-card-soft);
}

#play_page .play_content::before {
    margin-bottom: 9px;
    content: "剧情介绍";
    letter-spacing: .02em;
}

/* Lower sections share the page surface instead of stacking heavy cards. */
#play_page .play_boxbg + .container-wrap,
#play_page .container-wrap {
    box-sizing: border-box;
}

#play_page #actor_vbox,
#play_page #bofy,
#play_page .pannel--vod-related,
#play_page #pinglun {
    margin-bottom: 16px;
    border: 1px solid var(--play-line);
    border-radius: 16px;
    background: var(--play-card);
    box-shadow: var(--play-shadow);
}

#play_page #actor_vbox .pannel_head,
#play_page #bofy .pannel_head,
#play_page .pannel--vod-related .pannel_head,
#play_page #pinglun .pannel_head {
    min-height: 50px;
    box-sizing: border-box;
    padding: 16px 20px 11px;
    border-bottom: 1px solid var(--play-line);
}

#play_page #actor_vbox .pannel_head .title,
#play_page #bofy .pannel_head .title,
#play_page .pannel--vod-related .pannel_head .title,
#play_page #pinglun .pannel_head .title {
    color: var(--play-text);
    font-size: 16px;
    font-weight: 650;
}

/* Playlist header: title, current source and sort stay on one rhythm line. */
#play_page #bofy .pannel_head--vod-playlist {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

#play_page #bofy .pannel_head--vod-playlist .title {
    flex: 0 0 auto;
    max-width: 140px;
    margin: 0;
}

#play_page #bofy .pannel_head--vod-playlist .vod-playlist-head-center {
    flex: 1 1 auto;
    min-width: 0;
}

#play_page #bofy .player_infotip__viewport {
    min-height: 28px;
}

#play_page #bofy .player_infotip__chunk {
    padding: 4px 0;
    color: var(--play-muted);
    font-size: 12px;
}

#play_page #bofy .player_infotip__name {
    color: var(--play-text);
}

#play_page #bofy .vod-playlist-head-sort {
    margin-left: auto;
    white-space: nowrap;
}

#play_page #bofy .vod-playlist-head-sort .sort_btn {
    color: var(--play-muted);
}

#play_page #bofy .tabs.playlist {
    padding: 0 20px 16px;
}

#play_page #bofy .tabs.playlist .title_nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 11px 0 0;
    border-bottom: 1px solid var(--play-line);
}

#play_page #bofy .tabs.playlist .title_nav li {
    flex: 0 0 auto;
}

#play_page #bofy .tabs.playlist .title_nav li a {
    min-height: 34px;
    padding: 0 1px 9px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent !important;
    color: var(--play-muted) !important;
    font-size: 13px;
}

#play_page #bofy .tabs.playlist .title_nav li.active a,
#play_page #bofy .tabs.playlist .title_nav li a:hover {
    border-bottom-color: var(--play-accent);
    color: var(--play-accent) !important;
}

#play_page #bofy .tabs.playlist .content.show {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0;
}

#play_page #bofy .playlist_notfull,
#play_page #bofy .playlist_notfull ul.content_playlist {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#play_page #bofy .playlist_notfull ul.content_playlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0 12px;
    padding: 4px 0 0;
}

#play_page #bofy .playlist_notfull .content_playlist li {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#play_page #bofy .playlist_notfull .content_playlist li > a {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    box-sizing: border-box;
    padding: 9px 8px 9px 12px;
    border: 0 !important;
    border-bottom: 1px solid var(--play-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--play-muted) !important;
    text-align: left;
}

#play_page #bofy .playlist_notfull .content_playlist li > a:hover,
#play_page #bofy .playlist_notfull .content_playlist li.active > a {
    background: transparent !important;
    color: var(--play-accent) !important;
}

#play_page #bofy .playlist_notfull .content_playlist li.active > a::before {
    position: absolute;
    left: 1px;
    top: 50%;
    width: 3px;
    height: 17px;
    border-radius: 3px;
    background: var(--play-accent);
    content: "";
    transform: translateY(-50%);
}

#play_page #bofy .vod-playlist-expand {
    margin-top: 4px;
    border: 0;
    border-top: 1px solid var(--play-line);
    border-radius: 0;
    background: transparent;
    color: var(--play-accent);
}

/* Comments: leave the plugin markup intact, soften the visual container. */
#play_page #pinglun .mac_comment {
    min-height: 154px;
    padding: 10px 20px 20px;
}

body.bstem #play_page #bofy .playlist_notfull .content_playlist li > a,
.bstem #play_page #bofy .playlist_notfull .content_playlist li > a {
    background: transparent !important;
    color: var(--play-muted) !important;
}

@media (max-width: 820px) {
    #play_page .play_boxbg {
        padding: 8px 0 2px;
    }

    #play_page .play_boxbg > .container,
    #play_page > .container {
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }

    #play_page .play_box:not(.play_video) > .left_row,
    #play_page > .container > .left_row.container-wrap {
        float: none;
        width: 100%;
    }

    #play_page .play_box.play_video > .left_row {
        float: none !important;
        width: 100% !important;
    }

    #play_page .play_box.play_video > .right_row {
        display: none !important;
    }

    #play_page .player_video {
        min-height: 0;
        border-radius: 11px;
        box-shadow: 0 10px 24px rgba(10, 20, 30, .12);
    }

    #play_page .play_but {
        margin-top: 7px;
        padding: 0;
    }

    #play_page .play_but .play-but-bar {
        min-height: 40px;
    }

    #play_page .play_but .play-but-strip {
        gap: 6px;
    }

    #play_page .play_but .play-but-item > a,
    #play_page .play_but .play-but-item > .play_collec {
        width: 35px;
        min-width: 35px;
        height: 35px;
        min-height: 35px;
        padding: 0;
        border-radius: 50%;
    }

    #play_page .play_but .play-but-item > a span,
    #play_page .play_but .play-but-item > .play_collec span {
        display: none;
    }

    #play_page .play_pan {
        margin-bottom: 10px;
        padding: 17px 14px 15px;
        border-radius: 12px;
    }

    #play_page .player_detail .video_title .title,
    #play_page .player .video_title h1.title {
        font-size: 20px;
    }

    #play_page .player_detail .play_now {
        margin-left: auto;
    }

    #play_page .play_content {
        margin-top: 14px;
        padding: 14px 12px 5px;
        font-size: 13px;
    }

    #play_page #actor_vbox,
    #play_page #bofy,
    #play_page .pannel--vod-related,
    #play_page #pinglun {
        margin-bottom: 10px;
        border-radius: 12px;
    }

    #play_page #actor_vbox .pannel_head,
    #play_page #bofy .pannel_head,
    #play_page .pannel--vod-related .pannel_head,
    #play_page #pinglun .pannel_head {
        min-height: 45px;
        padding: 13px 14px 10px;
    }

    #play_page #bofy .pannel_head--vod-playlist {
        gap: 8px;
    }

    #play_page #bofy .pannel_head--vod-playlist .title {
        max-width: 86px;
        font-size: 15px;
    }

    #play_page #bofy .player_infotip__chunk {
        font-size: 11px;
    }

    #play_page #bofy .tabs.playlist {
        padding: 0 12px 10px;
    }

    #play_page #bofy .tabs.playlist .title_nav {
        gap: 15px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    #play_page #bofy .tabs.playlist .title_nav::-webkit-scrollbar {
        display: none;
    }

    #play_page #bofy .playlist_notfull ul.content_playlist {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0 7px;
        padding-top: 3px;
    }

    #play_page #bofy .playlist_notfull .content_playlist li > a {
        justify-content: center;
        min-height: 38px;
        padding: 8px 4px;
        text-align: center;
    }

    #play_page #bofy .playlist_notfull .content_playlist li.active > a::before {
        left: 3px;
    }

    #play_page #pinglun .mac_comment {
        min-height: 130px;
        padding: 6px 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #play_page .player_detail .play_now a.flip,
    #play_page #bofy .title_nav li a,
    #play_page #bofy .content_playlist li a {
        transition: none;
    }
}

/* Final single-episode overrides (must remain last to beat legacy rules). */
#play_page .play_box.play_video {
    grid-template-columns: minmax(0, 1fr) !important;
}

#play_page .play_box.play_video > .right_row,
#play_page #bofy,
#play_page .play_pan .play_now {
    display: none !important;
}

#play_page .play_box.play_video > .left_row {
    float: none !important;
    width: 100% !important;
}

#play_page .play_but {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#play_page .play_but .play-but-bar {
    display: none !important;
}

#play_page .play-info-actions {
    display: flex;
}

@media (max-width: 820px) {
    #play_page .play_box.play_video > .right_row {
        display: none !important;
    }

    #play_page .play_box.play_video > .left_row {
        float: none !important;
        width: 100% !important;
    }
}

/* Desktop related cards: align their content with the comment placeholder
 * and use a stable five-column width instead of container-query units. */
@media (min-width: 821px) {
    /* #pinglun keeps the legacy 30rem desktop width. Match it here so the
     * related panel does not stop at the 1000px lower-column width. */
    #play_page .pannel--vod-related {
        width: 30rem;
        max-width: none;
    }

    #play_page .pannel--vod-related > #js-play-like-groups {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        padding: 0 20px 20px;
    }

    #play_page .pannel--vod-related .mac-vod-related-scroller,
    #play_page .pannel--vod-related .mac-vod-related-scroller__viewport,
    #play_page .pannel--vod-related .mac-vod-type-group__grid {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    #play_page .pannel--vod-related .mac-vod-related-scroller.is-pc-ready .mac-vod-type-group__grid {
        width: 100%;
        max-width: none;
    }

    #play_page .pannel--vod-related .mac-vod-related-scroller.is-pc-ready .mac-vod-type-group__grid .vodlist_item {
        flex: 0 0 calc((100% - 40px) / 5);
        width: calc((100% - 40px) / 5);
        max-width: calc((100% - 40px) / 5);
    }
}

/* Desktop-only correction: the legacy shell uses a fixed rem height and a
 * higher-specificity white title rule. Use a true 16:9 surface and an
 * explicit theme-aware title color; mobile keeps the original responsive
 * sizing untouched. */
@media (min-width: 821px) {
    #play_page .player_video {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 9;
        padding-bottom: 0 !important;
    }

    #play_page .player_detail .video_title {
        display: block !important;
        flex: 1 1 auto;
        min-width: 0;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body:not(.bstem) #play_page .player .player_detail .video_title .title,
    body:not(.bstem) #play_page .player .player_detail .video_title h1.title {
        display: block !important;
        visibility: visible !important;
        color: var(--play-text, var(--tpl-text-strong, #1e2935)) !important;
        opacity: 1 !important;
    }

    body.bstem #play_page .player .player_detail .video_title .title,
    body.bstem #play_page .player .player_detail .video_title h1.title,
    .bstem #play_page .player .player_detail .video_title .title,
    .bstem #play_page .player .player_detail .video_title h1.title {
        display: block !important;
        visibility: visible !important;
        color: var(--play-text, #eef3f7) !important;
        opacity: 1 !important;
    }
}

/* Lightweight controls: avoid a full-width rectangle around every icon. */
#play_page .play_but {
    border: 0;
    background: transparent;
    box-shadow: none;
}

#play_page .play-but-bar {
    min-height: 42px;
    padding: 2px 0;
}

#play_page .play-but-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

#play_page .play_but .play-but-item {
    float: none;
    margin: 0;
}

#play_page .play_but .play-but-item > a,
#play_page .play_but .play-but-item > .play_collec {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--play-line);
    border-radius: 999px;
    background: var(--play-card);
    color: var(--play-muted);
    line-height: 1;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

#play_page .play_but .play-but-item > a:hover,
#play_page .play_but .play-but-item > .play_collec:hover,
#play_page .play_but .play-but-item > .play_collec.is_fav {
    border-color: var(--play-accent);
    background: var(--play-card);
    color: var(--play-accent);
}

#play_page .play_but .play-but-item .iconfont,
#play_page .play_but .play-but-item__report-ico {
    margin-right: 4px;
}

/* Keep the social/danmaku tools visually separate from the small action icons. */
#play_page .play_but .play-but-social {
    margin-top: 8px;
    border-top: 1px solid var(--play-line);
}

/* One section surface, with text-like tabs and only the active episode filled. */
#play_page #bofy {
    overflow: hidden;
}

#play_page #bofy .pannel_head--vod-playlist {
    border-bottom: 1px solid var(--play-line);
}

#play_page #bofy .title_nav {
    align-items: center;
    gap: 3px;
    border-bottom: 1px solid var(--play-line);
}

#play_page #bofy .title_nav li a {
    min-height: 32px;
    padding: 0 9px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--play-muted);
}

#play_page #bofy .title_nav li a:hover,
#play_page #bofy .title_nav li.active a {
    border-bottom-color: var(--play-accent);
    background: transparent;
    color: var(--play-accent);
}

#play_page #bofy .content_playlist {
    gap: 4px 8px;
}

#play_page #bofy .content_playlist li a {
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--play-line);
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--play-muted) !important;
}

#play_page #bofy .content_playlist li a:hover {
    border-bottom-color: var(--play-accent);
    background: transparent !important;
    color: var(--play-accent) !important;
}

#play_page #bofy .content_playlist li.active a {
    position: relative;
    border-bottom-color: var(--play-accent);
    background: transparent !important;
    color: var(--play-accent) !important;
    font-weight: 600;
}

#play_page #bofy .content_playlist li.active a::before {
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 16px;
    border-radius: 3px;
    background: var(--play-accent);
    content: "";
    transform: translateY(-50%);
}

#play_page #bofy .vod-playlist-expand {
    border: 0;
    border-top: 1px solid var(--play-line);
    border-radius: 0;
    background: transparent;
}

/* The legacy public-head stylesheet reserves 5rem for old list layouts.
 * The current list is auto-height, so a single episode must not leave a void. */
#play_page #bofy .tabs.playlist .content.show,
#play_page #bofy .tabs.playlist .playlist_notfull,
#play_page #bofy .tabs.playlist .playlist_notfull ul.content_playlist {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#play_page #bofy .tabs.playlist .content.show {
    padding-bottom: 8px;
}

@media (max-width: 820px) {
    #play_page .play-but-bar {
        min-height: 38px;
    }

    #play_page .play-but-strip {
        gap: 5px;
    }

    #play_page .play_but .play-but-item > a,
    #play_page .play_but .play-but-item > .play_collec {
        width: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 50%;
    }

    #play_page .play_but .play-but-item .iconfont,
    #play_page .play_but .play-but-item__report-ico {
        margin-right: 0;
    }

    #play_page #bofy .title_nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    #play_page #bofy .title_nav::-webkit-scrollbar {
        display: none;
    }

    #play_page #bofy .content_playlist li a {
        min-height: 38px;
        padding: 9px 6px;
        border-bottom-color: var(--play-line);
    }
}

/* Final single-episode overrides (kept at EOF so legacy rules cannot undo them). */
#play_page .play_box.play_video {
    grid-template-columns: minmax(0, 1fr) !important;
}

#play_page .play_box.play_video > .right_row,
#play_page #bofy,
#play_page .play_pan .play_now {
    display: none !important;
}

#play_page .play_box.play_video > .left_row {
    float: none !important;
    width: 100% !important;
}

#play_page .play_but {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#play_page .play_but .play-but-bar {
    display: none !important;
}

#play_page .play-info-actions {
    display: flex;
}

@media (max-width: 820px) {
    #play_page .play_box.play_video > .right_row {
        display: none !important;
    }

    #play_page .play_box.play_video > .left_row {
        float: none !important;
        width: 100% !important;
    }
}
