/* Shared mobile presentation. Loaded by the WAP template only; rem sizing and
   all route, player, permission and form behaviour remain owned by the theme. */
:root {
    color-scheme: dark;
    --md-mobile-bg: #111113;
    --md-mobile-surface: #1c1d21;
    --md-mobile-raised: #25262c;
    --md-mobile-text: #e7e7e7;
    --md-mobile-muted: #93969f;
    --md-mobile-accent: #ffd09b;
    --md-mobile-border: rgba(255,255,255,.08);
    --md-mobile-radius: 12px;
}
html, body { background: var(--md-mobile-bg); }
body { color: var(--md-mobile-text); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; -webkit-tap-highlight-color: transparent; }
body a { color: inherit; text-decoration: none; }
body button, body input, body textarea, body select { font-family: inherit; }
body :is(a,button,input,textarea,select):focus-visible { outline: 2px solid var(--md-mobile-accent); outline-offset: 3px; }
body :is(input,textarea)::placeholder { color: #82858e; opacity: 1; }
body :is(input,select,textarea) { accent-color: var(--md-mobile-accent); }
body #app { background: var(--md-mobile-bg); color: var(--md-mobile-text); }
body #app .van-nav-bar { background: var(--md-mobile-bg); color: var(--md-mobile-text); border-bottom: 1px solid var(--md-mobile-border); box-shadow: none; }
body #app .van-nav-bar__content { height: 46px; }
body #app .van-nav-bar__title { color: var(--md-mobile-text); font-size: 16px !important; font-weight: 600; }
body #app .van-nav-bar__text { color: var(--md-mobile-accent); font-size: 14px; }
body #app .van-nav-bar__left, body #app .van-nav-bar__right { min-height: 44px; }
body #app .van-cell, body #app .van-cell-group { background: var(--md-mobile-surface); color: var(--md-mobile-text); }
body #app .van-cell::after, body #app .van-hairline--bottom::after { border-color: var(--md-mobile-border); }
body #app .van-cell__value, body #app .van-cell__label { color: var(--md-mobile-muted); }
body #app .van-field__control { color: var(--md-mobile-text); font-size: 16px; background: transparent; }
body #app .van-field__label { color: var(--md-mobile-text); font-size: 14px; }
body #app .van-button--primary { border-color: transparent; background: var(--md-mobile-accent); color: #322419; }
body #app .van-list__finished-text { padding: 20px 10px; color: var(--md-mobile-muted); font-size: 12px; }
body .md-site-map-footer { color: var(--md-mobile-muted); font-size: 12px; }
body .md-site-map-footer a { color: var(--md-mobile-muted); }
body .md-site-route-shell, body .md-site-frame { background: var(--md-mobile-bg); }
body .md-site-route-cards span::before, body .md-site-route-cards span::after,
body .md-tab-skeleton i::before, body .md-tab-skeleton i::after { background: var(--md-mobile-surface); }
body .md-site-error { border-color: var(--md-mobile-border); border-radius: 12px; background: var(--md-mobile-raised); }
body .md-site-error a, body .md-site-error button { color: var(--md-mobile-accent); }

/* A compact, single-row search header. The existing form, history and hot list
   remain independent for videos and short dramas. */
body:is(.video-search-page,.sd-search-page) { background: var(--md-mobile-bg) !important; color: var(--md-mobile-text); }
body:is(.video-search-page,.sd-search-page) :is(.vss-shell,.sds-shell) { max-width: 720px; padding: 0 0 24px; background: var(--md-mobile-bg); }
body:is(.video-search-page,.sd-search-page) :is(.vss-header,.sds-header) {
    position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 32px minmax(0,1fr);
    align-items: center; gap: 6px; padding: 8px 10px; background: var(--md-mobile-bg); border: 0;
}
body:is(.video-search-page,.sd-search-page) :is(.vss-topline,.sds-topline) { display: contents; }
body:is(.video-search-page,.sd-search-page) :is(.vss-brand,.sds-brand),
body:is(.video-search-page,.sd-search-page) :is(.vss-topline,.sds-topline) > a:last-child { display: none; }
body:is(.video-search-page,.sd-search-page) :is(.vss-icon-link,.sds-icon-link) { width: 32px; height: 40px; color: var(--md-mobile-text); }
body:is(.video-search-page,.sd-search-page) :is(.vss-search-form,.sds-search-form) {
    grid-column: 2; display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0;
    height: 38px; min-height: 38px; margin: 0; padding: 0 4px 0 12px;
    border: 1px solid transparent; border-radius: 22px; background: var(--md-mobile-surface);
}
body:is(.video-search-page,.sd-search-page) :is(.vss-search-form,.sds-search-form):focus-within { border-color: #77604a; }
body:is(.video-search-page,.sd-search-page) :is(.vss-search-form,.sds-search-form) input { min-width: 0; height: 34px; color: var(--md-mobile-text); font-size: 16px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-search-form,.sds-search-form) button { flex: none; width: auto; min-width: 48px; height: 32px; padding: 0 8px; border: 0; border-radius: 18px; background: transparent; color: var(--md-mobile-accent); font-size: 13px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-content,.sds-content) { padding: 10px; border: 0; border-radius: 0; background: transparent; }
body:is(.video-search-page,.sd-search-page) :is(.vss-section,.sds-section) { margin: 0 0 24px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-section-head,.sds-section-head) { margin: 0 0 12px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-section-head,.sds-section-head) :is(h1,h2) { color: var(--md-mobile-text); font-size: 16px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-section-note,.sds-section-note,.vss-card-time,.sds-card-time) { color: var(--md-mobile-muted); font-size: 12px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-history-list,.sds-history-list) { gap: 8px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-history-list,.sds-history-list) a { padding: 7px 12px; border: 0; border-radius: 18px; background: var(--md-mobile-surface); color: var(--md-mobile-text); font-size: 13px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-hot-item,.sds-hot-item) { min-height: 44px; border-bottom: 1px solid var(--md-mobile-border); }
body:is(.video-search-page,.sd-search-page) :is(.vss-hot-rank,.sds-hot-rank).is-top { color: var(--md-mobile-accent); }
body:is(.video-search-page,.sd-search-page) :is(.vss-hot-copy,.sds-hot-copy) strong { font-size: 14px; font-weight: 500; color: var(--md-mobile-text); }
body:is(.video-search-page,.sd-search-page) :is(.vss-hot-hits,.sds-hot-hits) { color: var(--md-mobile-muted); font-size: 12px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-grid,.sds-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 10px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-card,.sds-card) { min-width: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--md-mobile-surface); }
body.video-search-page .vss-card-picture { aspect-ratio: 16 / 10; height: auto; border-radius: 10px 10px 0 0; }
body.sd-search-page .sds-card-picture { aspect-ratio: 3 / 4; height: auto; border-radius: 10px 10px 0 0; }
body.sd-search-page .sds-card-picture img { object-fit: fill; }
body:is(.video-search-page,.sd-search-page) :is(.vss-card,.sds-card) h3 { margin: 5px 6px 4px; color: var(--md-mobile-text); font-size: 14px; line-height: 1.45; }
body:is(.video-search-page,.sd-search-page) :is(.vss-card-blurb,.sds-card-blurb) { margin: 0 6px 5px; color: var(--md-mobile-muted); font-size: 12px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-card-time,.sds-card-time,.sds-card-tags) { margin: 0 6px 7px; }
body:is(.video-search-page,.sd-search-page) :is(.vss-score,.sds-score,.sds-class-tag) { color: var(--md-mobile-accent); background: #29231de6; }
body:is(.video-search-page,.sd-search-page) :is(.vss-badge,.sds-badge) { color: #332419; background: var(--md-mobile-accent); }
body:is(.video-search-page,.sd-search-page) :is(.vss-next,.sds-next) { border-color: var(--md-mobile-border); background: var(--md-mobile-surface); color: var(--md-mobile-accent); }

/* Library, tags, ranking and curated collections use the same filter language. */
body #app :is(.show,.tags,.rank,.special,.special_detail,.search) { background: var(--md-mobile-bg); color: var(--md-mobile-text); }
body #app .show :is(.van-tabs__nav,.van-tabs__nav_list,.van-sticky-tabs,.search_btn),
body #app .rank .van-sticky-tabs { background: var(--md-mobile-bg); }
body #app .show :is(.van-tab,.van-tab--active-list) { font-size: 14px; }
body #app .show :is(.van-tab--active,.van-tab--active-list,.activeBtn) { color: var(--md-mobile-accent); }
body #app .show .van-tabs__line { background: var(--md-mobile-accent); }
body #app .show .search_btn a { padding: 6px 12px; border-radius: 20px; border: 0; background: var(--md-mobile-surface); font-size: 13px; }
body #app .show .search_btn .activeBtn { background: #34302c; }
body #app .tags .container { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; padding: 14px 10px; }
body #app .tags .label_item { float: none; width: auto; margin: 0; padding: 8px 6px; border-radius: 18px; background: var(--md-mobile-surface); }
body #app .tags .label_span { color: var(--md-mobile-text); font-size: 13px; }
body #app .rank .nav_box { padding: 3px; border: 0; border-radius: 22px; background: var(--md-mobile-surface); }
body #app .rank .nav_item { font-size: 13px; line-height: 30px; color: var(--md-mobile-muted); }
body #app .rank .nav_active { border-radius: 18px; background: #35302b; color: var(--md-mobile-accent); }
body #app .rank :is(.rank_heat,.list_num) { color: var(--md-mobile-muted); }
body #app .rank .van-nav-bar__placeholder { height: 46px; }
body #app .rank .van-sticky-tabs { top: 46px; height: 50px; z-index: 90; }
body #app .rank .nav { height: 50px; padding: 0; }
body #app .rank .nav_item { height: 30px; }
body #app .rank .md-rank-rows { padding: 8px 10px; }
body #app .rank .md-rank-rows .list_item { position: relative; display: grid; grid-template-columns: minmax(100px,40%) minmax(0,1fr); align-items: center; gap: 12px; margin: 0 0 10px; padding: 8px; border-radius: 12px; background: var(--md-mobile-surface); }
body #app .rank .md-rank-rows .list_left_item { position: relative; width: 100% !important; height: auto !important; aspect-ratio: 16 / 10; margin: 0; }
body #app .rank .md-rank-rows .list_left_item .van-image { display: block; border-radius: 8px !important; }
body #app .rank .md-rank-rows .list_duration { right: 4px; bottom: 4px; font-size: 11px; }
body #app .rank .md-rank-rows .list_right_item { position: static; min-width: 0; width: auto; margin: 0; padding: 0; }
body #app .rank .md-rank-rows .list_title { min-height: 0; height: auto; margin: 0 0 6px; font-size: 14px; line-height: 20px; color: var(--md-mobile-text); }
body #app .rank .md-rank-rows .list_ul { margin: 0; padding: 0; font-size: 11px; }
body #app .rank .md-rank-rows .list_num { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 23px; height: 23px; margin: 0; border-radius: 7px 0 7px 0; background: var(--md-mobile-accent); color: #332419; font-size: 13px; font-weight: 700; }
body #app .special .list { padding: 10px; }
body #app .special .list_item { margin-bottom: 12px; padding: 0; }
body #app .special .list_item_bg { overflow: hidden; border-radius: 12px; background: var(--md-mobile-surface); }
body #app .special .cell_title { font-size: 16px; font-weight: 600; }
body #app .special .cell_value { font-size: 12px; color: var(--md-mobile-muted); }
body #app .special .list_swiper { padding: 0 10px 12px; }
body #app .special .list_swiper_img { border-radius: 9px !important; }
body #app .special .list_swiper_title { margin-top: 6px; font-size: 13px; }
body #app .feedback .textarea_box { margin: 12px 10px; overflow: hidden; border: 1px solid var(--md-mobile-border); border-radius: 12px; background: var(--md-mobile-surface); }
body #app .feedback .list { padding: 0 10px; }
body #app .feedback .list_item { margin: 10px 0; padding: 12px; border-radius: 12px; background: var(--md-mobile-surface); }
body #app .feedback .list_item_time { color: var(--md-mobile-muted); font-size: 12px; }

/* Player geometry and controls stay intact. Restyle its surrounding information. */
body #app .video { background: var(--md-mobile-bg); }
body #app .video .play_scroll { background: var(--md-mobile-bg); }
body #app .video .play_content { padding: 12px 10px; }
body #app .video .play_title { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--md-mobile-text); }
body #app .video .play_tag { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
body #app .video .play_tag a {
    display: inline-flex; align-items: center; box-sizing: border-box;
    height: auto; min-height: 28px; max-width: 100%; margin: 0; padding: 4px 9px;
    border-radius: 11px; color: var(--md-mobile-accent); background: #29231d;
    font-size: 12px; line-height: 16px; overflow-wrap: anywhere;
}
body #app .video .play_tag a::before { font-size: inherit; }
body #app .video .play_date { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 14px; color: var(--md-mobile-muted); font-size: 12px; line-height: 1.7; }
body #app .video .play_date span { margin: 0; padding: 0; border: 0; white-space: normal; }
body #app .video .play_nav { margin: 10px 0 18px; padding: 6px 0; border-radius: 12px; background: var(--md-mobile-surface); }
body #app .video .play_nav .van-grid-item__content { padding: 8px 3px; background: transparent; }
body #app .video .play_nav_icon { width: 40px; height: 40px; border-radius: 50%; background: var(--md-mobile-raised); }
body #app .video .play_nav_text { margin-top: 5px; color: var(--md-mobile-text); font-size: 12px; }
body #app .video #playlist .play-btn.active { color: var(--md-mobile-accent); }
body #app .video #playlist .play-url { border-radius: 9px; background: var(--md-mobile-surface); color: var(--md-mobile-text); }
body #app .video #playlist .play-url.active { background: var(--md-mobile-accent); color: #332419; }
body #app .video .play_list { padding: 0 10px; }
body #app .video .play_list_title { margin: 16px 0 12px; color: var(--md-mobile-text); font-size: 16px; font-weight: 600; }
body #app .mac_comment { color: var(--md-mobile-text); font-size: 14px; }
body #app .mac_comment :is(input,textarea) { border: 1px solid var(--md-mobile-border); border-radius: 10px; background: var(--md-mobile-surface); color: var(--md-mobile-text); }
body #app .mac_comment .comment-time { color: var(--md-mobile-muted); }
body.sd-play-body .sd-play-bottom h1 { font-size: 17px; }
body.sd-play-body .sd-episode-bar { border-top-color: var(--md-mobile-border); }
body.sd-play-body .sd-drawer { border: 1px solid var(--md-mobile-border); border-radius: 18px 18px 0 0; background: var(--md-mobile-surface); color: var(--md-mobile-text); }
body.sd-play-body .sd-episode { border-color: var(--md-mobile-border); background: var(--md-mobile-raised); }
body.sd-play-body .sd-episode.is-active, body.sd-play-body .sd-source-list .is-active { border-color: var(--md-mobile-accent); color: var(--md-mobile-accent); }
body.sd-play-body .sd-detail-tabs [aria-selected=true] { color: var(--md-mobile-accent); }

body.md-site-map-page { background: var(--md-mobile-bg); color: var(--md-mobile-text); }
body.md-site-map-page .sm-shell { padding: 10px; }
body.md-site-map-page :is(.sm-panel,.sm-section,.sm-categories a) { border-color: var(--md-mobile-border); border-radius: 12px; background: var(--md-mobile-surface); }
body.md-site-map-page .sm-section.is-active { color: var(--md-mobile-accent); border-color: #77604a; }
body.md-mobile-status { margin: 0; padding: 28px 12px; box-sizing: border-box; background: var(--md-mobile-bg); color: var(--md-mobile-text); font-size: 15px; line-height: 1.7; }
body.md-mobile-status .mac_msg_jump { box-sizing: border-box; width: 100%; max-width: 440px; margin: 15vh auto 0; padding: 24px 18px; border: 1px solid var(--md-mobile-border); border-radius: 16px; background: var(--md-mobile-surface); box-shadow: none; }
body.md-mobile-status .msg_jump_tit { margin: 0 0 16px; padding: 0; background: transparent; color: var(--md-mobile-text); font-size: 20px; font-weight: 600; }
body.md-mobile-status :is(.title,.text,.jump) { padding: 0; margin: 12px 0; color: var(--md-mobile-muted); line-height: 1.8; }
body.md-mobile-status input { box-sizing: border-box; max-width: 100%; padding: 9px 10px; border: 1px solid #45464d; border-radius: 9px; background: #25262c; color: var(--md-mobile-text); font-size: 16px; box-shadow: none; }
body.md-mobile-status :is(.submit_btn,.verify_submit,.md-status-home) { display: inline-block; width: auto; height: auto; min-height: 38px; padding: 6px 18px; border: 0; border-radius: 22px; background: var(--md-mobile-accent); color: #332419; font-size: 14px; }
body.md-mobile-status #browser { color: var(--md-mobile-text); }
@media (max-width:359px) { body #app .tags .container { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion:reduce) { body :is(.vss-card,.sds-card,.md-video-card) { transition: none; } }
