/**
 * 移动端触控与播放/评论体验（全模板族共享）。
 * 断点与 globals 对齐：767 / 640。
 */

.play-ep-truncated {
  display: none !important;
}

/* 全模板共用页脚：将导航、收录入口、版权与友链统一居中。 */
.site-footer-shell .site-footer {
  text-align: center;
}

.site-footer .footer-nav,
.site-footer .footer-discovery,
.site-footer .friend-links {
  justify-content: center;
}

.site-footer .footer-discovery-mobile {
  text-align: center;
}

.site-footer .footer-discovery-more summary {
  text-align: center;
}

.play-ep-more {
  border-style: dashed !important;
  font-weight: 600;
  color: var(--brand, #1677ff) !important;
}

@media (max-width: 899px) {
  /*
   * —— 手机顶栏第一行：导航按钮 | 品牌（居中）| 搜索按钮（点开全屏搜索层）——
   * 两侧列等宽（1fr），左侧按钮带「导航」字比右侧宽时品牌仍在屏幕正中；品牌过长才省略。
   */
  .cg-navbar .cg-navbar-bar {
    position: relative;
    grid-template-columns: minmax(44px, 1fr) minmax(0, auto) minmax(44px, 1fr);
    gap: 8px;
    padding: 6px 10px;
  }

  .cg-navbar .cg-navbar-bar > .cg-nav-toggle {
    justify-self: start;
  }

  .cg-navbar .cg-navbar-bar > .cg-search-toggle {
    justify-self: end;
  }

  .cg-navbar .cg-navbar-bar > .brand {
    justify-self: center;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cg-navbar .cg-navbar-bar > .brand > span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .cg-navbar .cg-navbar-bar > .brand img {
    max-width: 100%;
    height: auto;
    max-height: 30px;
  }

  .cg-nav-toggle {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .cg-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: var(--text, #e8e8e8);
    background: color-mix(in srgb, var(--text, #fff) 8%, transparent);
    text-decoration: none;
  }

  /* 全屏搜索层：输入框自动聚焦，联想 / 最近搜索下拉铺满宽度，下方热门搜索 */
  .cg-search-sheet {
    position: fixed;
    inset: 0;
    z-index: 270;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--bg, #fff);
    color: var(--text, #1f2329);
  }

  /* 第一行：输入框 | 取消；第二行：最近搜索 / 联想（常驻页面流，不再是盖住热词的下拉） */
  .cg-search-sheet-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 6px;
    padding: 8px 6px 8px 12px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    background: var(--panel-bg, var(--panel, #fff));
  }

  .cg-search-sheet .search-wrap-inline {
    display: contents;
  }

  .cg-search-sheet .search {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    margin-left: 0;
  }

  .cg-search-sheet-cancel {
    grid-column: 2;
    grid-row: 1;
  }

  .cg-search-sheet .search-wrap-inline .search-history {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 8px 6px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .cg-search-sheet .search input {
    font-size: 16px;
    padding: 0 6px 0 14px;
  }

  .cg-search-sheet .search button {
    min-width: 52px;
    padding: 0 14px 0 6px;
    font-size: 15px;
  }

  .cg-search-sheet .search-history-item a,
  .cg-search-sheet .search-suggest-item a {
    min-height: 44px;
    font-size: 15px;
  }

  .cg-search-sheet-cancel {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--text, #1f2329);
    font-size: 15px;
    cursor: pointer;
  }

  .cg-search-sheet-body {
    padding: 16px 14px 24px;
  }

  .cg-search-sheet-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
  }

  .cg-search-sheet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cg-search-chip {
    max-width: 100%;
    min-height: 38px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 999px;
    background: var(--panel-bg, var(--panel, #fff));
    color: var(--text, #1f2329);
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
  }

  .cg-search-sheet-hint {
    margin: 16px 0 0;
    color: var(--muted, #8a8f98);
    font-size: 13px;
    line-height: 1.6;
  }

  html.cg-search-open,
  html.cg-search-open body {
    overflow: hidden;
  }

  /* —— 第二行：横滑频道条（选中项由 hscroll-active.js 滚入视野；族皮肤在 family-chrome.css）—— */
  .cg-mobile-channels {
    display: block;
    border-top: 1px solid color-mix(in srgb, var(--line, #2a2a2a) 70%, transparent);
  }

  .cg-mobile-channels-track {
    display: flex;
    gap: 4px;
    padding: 0 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .cg-mobile-channels-track::-webkit-scrollbar {
    display: none;
  }

  .cg-mobile-channel {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 10px;
    color: var(--text, #e8e8e8);
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: inset 0 -2px 0 transparent;
  }

  .cg-mobile-channel.is-active {
    color: var(--brand, #ff2d78);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--brand, #ff2d78);
  }

  .cg-side-close {
    width: 44px;
    height: 44px;
  }

  /* 侧栏频道：有二级标签的行右侧展开按钮，展开后 3 列宫格 chip；链接始终在 DOM 里 */
  .cg-side-group-head {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .cg-side-group-head .cg-side-link {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cg-side-expand {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text, #e8e8e8);
    cursor: pointer;
  }

  .cg-side-caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.7;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.15s ease;
  }

  .cg-side-group.is-open .cg-side-caret {
    transform: rotate(-135deg) translate(-2px, -2px);
  }

  .cg-side-sub {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 4px 4px 10px 12px;
  }

  .cg-side-group.is-open .cg-side-sub {
    display: grid;
  }

  .cg-side-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 6px;
    overflow: hidden;
    border: 1px solid var(--line, #2a2a2a);
    border-radius: 999px;
    color: var(--text, #e8e8e8);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
  }

  .cg-side-chip.is-active,
  .cg-side-chip[aria-current="page"] {
    border-color: var(--brand, #ff2d78);
    color: var(--brand, #ff2d78);
    background: color-mix(in srgb, var(--brand, #ff2d78) 10%, transparent);
  }

  body.has-mobile-sticky-ad main.shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  body.layout-bottom-tabs.has-mobile-sticky-ad main.shell,
  body.family-header-bottom-tabs.has-mobile-sticky-ad main.shell {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

  /* 页脚在 main 外：预留底栏广告 / 底栏 Tab / 系统手势区，避免版权被挡或裁切 */
  html {
    scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .site-footer-shell {
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-sticky-ad {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  body.has-mobile-sticky-ad .site-footer-shell {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  /* 与 chrome.css 底栏 Tab 高度对齐（勿缩小到 44px，否则会盖住页脚最后一行） */
  body.layout-bottom-tabs .site-footer-shell,
  body.family-header-bottom-tabs .site-footer-shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  body.layout-bottom-tabs.has-mobile-sticky-ad .site-footer-shell,
  body.family-header-bottom-tabs.has-mobile-sticky-ad .site-footer-shell {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer.panel {
    padding: 18px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer-copyright {
    margin: 0 0 10px;
  }

  .site-footer-preview-meta {
    margin: 8px 0 0;
    padding-bottom: 4px;
    font-size: 12px;
    line-height: 1.5;
  }

  .site-footer .footer-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
  }

  .ad-mobile-sticky {
    z-index: 30;
  }

  .artplayer-app {
    z-index: 35 !important;
  }

  /* 广告位：移动端全宽展示，不裁切、不隐藏（蜘蛛仍由 siteAds 清空） */
  .ad-slot-list,
  .channel-portal-lead .ad-channel-banner,
  .channel-portal-lead .ad-list-feed,
  .ad-channel-banner,
  .ad-list-feed,
  .ad-home-notice,
  .ad-jingang,
  .ad-home-banner,
  .ad-home-feed-card,
  .ad-detail-banner,
  .ad-detail-after-info,
  .ad-search-result,
  .ad-footer-banner,
  .ad-nav-text-link,
  .ad-player-above,
  .ad-player-below {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ad-jingang {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
  }

  .ad-jingang .ad-slot-link {
    min-height: 44px;
    justify-content: center;
  }

  .ad-home-banner .ad-slot-image,
  .ad-channel-banner .ad-slot-image,
  .ad-list-feed .ad-slot-image,
  .ad-player-above .ad-slot-image,
  .ad-player-below .ad-slot-image {
    width: 100%;
    max-height: min(28vw, 140px);
    object-fit: contain;
    border-radius: 8px;
  }

  .ad-slot-third-party,
  .ad-slot-frame {
    min-height: 0;
  }
}

.footer-discovery-mobile {
  display: none;
}

@media (max-width: 640px) {
  .footer-discovery-desktop {
    display: none !important;
  }

  .footer-discovery-mobile {
    display: block;
  }

  .footer-discovery-mobile .footer-discovery-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 8px;
  }

  .footer-discovery-more summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand, #1677ff);
    padding: 6px 0;
    list-style: none;
  }

  .footer-discovery-more summary::-webkit-details-marker {
    display: none;
  }
}

@media (max-width: 767px) {
  .site-main-play.shell,
  .site-main-detail.shell {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 12px;
  }

  /* —— 播放页：贴边沉浸 —— */
  .site-main-play.shell {
    padding-left: 0;
    padding-right: 0;
  }

  .play-page-stage.panel {
    display: flex;
    flex-direction: column;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding-bottom: 12px;
  }

  /* 标题信息 → 广告(若有) → 播放器 → 选集(在 play-island 内) → 底栏操作 */
  .play-page-stage .play-page-info {
    order: 0;
  }

  .play-page-stage .ad-player-above {
    order: 1;
  }

  .play-page-stage .play-island {
    order: 2;
  }

  .play-page-stage .ad-player-below {
    order: 3;
  }

  .play-page-stage .play-page-handles {
    order: 4;
  }

  .play-page-info {
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  }

  .play-page-extra-open .play-page-extra-body {
    margin-top: 4px;
  }

  .play-page-extra-open .play-page-synopsis p {
    margin: 6px 0 0;
    line-height: 1.55;
  }

  .play-page-crumb {
    display: none;
  }

  .play-page-heading {
    margin-bottom: 6px;
  }

  .play-page-title-text {
    font-size: 1.125rem;
  }

  .play-page-synopsis {
    font-size: 13px;
    color: var(--muted, #667085);
  }

  .play-page-synopsis p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 4px 0 0;
  }

  .play-page-handles {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
    padding: 10px 14px 14px;
    margin: 0;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
    background: var(--panel-bg, transparent);
    box-sizing: border-box;
  }

  .play-handle-btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
  }

  .play-island .player-stage {
    max-height: min(56vw, 72vh);
    min-height: 200px;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    width: 100%;
  }

  .play-island .artplayer-app {
    width: 100% !important;
    height: 100% !important;
  }

  .play-page-stage .play-island-online-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 14px;
    margin-top: 2px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.06));
  }

  .play-page-stage .detail-online-title {
    margin: 0;
  }

  .play-page .play-island-online-head {
    padding: 10px 14px 0;
  }

  .play-page .detail-online-title {
    font-size: 1rem;
    margin: 0 0 8px;
  }

  .play-island-online-head .play-line-tabs,
  .detail-online-head .play-line-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 4px;
    margin: 0 -2px;
  }

  .play-island-online-head .play-line-tabs::-webkit-scrollbar,
  .detail-online-head .play-line-tabs::-webkit-scrollbar {
    display: none;
  }

  .play-island-online-head .play-tab,
  .play-island-online-head a.play-tab,
  .play-island-online-head button.play-tab,
  .play-island-online-head span.play-tab {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 999px;
    box-shadow: none !important;
  }

  .play-island-online-head .play-tab.active,
  .play-island-online-head span.play-tab.active {
    border-color: var(--brand, #1677ff);
    box-shadow: none !important;
  }

  .play-page-extra {
    margin: 0 0 8px;
  }

  .play-page-extra-summary {
    list-style: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand, #1677ff);
    padding: 4px 0;
  }

  .play-page-extra-summary::-webkit-details-marker {
    display: none;
  }

  .play-page-extra-body {
    margin-top: 8px;
  }

  .play-island-compact .play-island-online-head,
  .play-island-compact .play-episode-panel {
    display: none;
  }

  .play-island-single-ep .play-episode-panel {
    display: none;
  }

  .site-main-list.shell,
  .site-main-channel.shell,
  .site-main-home.shell,
  .site-main-search.shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .site-main-home .ad-jingang,
  .site-main-home .ad-home-banner,
  .site-main-home .ad-home-feed-card {
    margin-left: 0;
    margin-right: 0;
  }

  .site-main-channel .grid,
  .site-main-list .grid {
    --grid-cols: 2;
  }

  .site-main-channel .channel-portal-title {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
  }

  .site-main-channel .channel-portal-title h1 {
    font-size: 1.25rem;
    margin: 0;
  }

  .site-main-channel .breadcrumbs {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .site-main-channel .grid.chrome-grid-poster,
  .site-main-channel .chrome-grid-poster.grid {
    --grid-cols: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .site-main-channel .channel-portal-section {
    margin: 16px 0 20px;
  }

  /* —— 列表 / 筛选片库：区块纵向呼吸感（八族共用 site-main-list）—— */
  .site-main-list .filter-chip-breadcrumbs {
    margin-bottom: 10px;
  }

  /* —— 站内搜索：移动端 Hero 单列，非 PC 横条 —— */
  .site-main-search {
    padding-top: 12px;
  }

  .site-main-search .search-hero {
    margin-bottom: 14px;
    border-radius: 12px;
  }

  .site-main-search .search-hero.is-open {
    padding: 24px 14px;
  }

  .site-main-search .search-hero.is-compact {
    padding: 16px 12px;
  }

  .site-main-search .search-hero-title {
    font-size: 1.3rem;
    line-height: 1.35;
  }

  .site-main-search .search-hero-sub {
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  /* 搜索页顶栏无搜索入口，正文这条一行式表单是唯一改词入口（回填当前词） */
  .site-main-search .search-page-form {
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    max-width: none;
    margin-top: 12px;
  }

  .site-main-search .search-page-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--line, #2a3140) 90%, transparent);
    background: color-mix(in srgb, var(--bg, #0f1115) 40%, var(--panel-bg, #171b22));
  }

  .site-main-search .search-page-btn {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    padding: 0 16px;
    background: var(--brand, #1677ff);
    color: #fff;
  }

  .site-main-search .search-hot-terms {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 14px;
  }

  .site-main-search .search-notice,
  .site-main-search .search-suggestions,
  .site-main-search .search-empty-recommend {
    margin-bottom: 14px;
    padding: 12px 14px;
  }

  .site-main-search .search-suggestions ul {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-main-search .search-suggestions li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
  }

  .site-main-search .search-results-wrap {
    margin-top: 4px;
  }

  .site-main-search .search-results-wrap .ad-search-result {
    margin-bottom: 14px;
  }

  .site-main-search .search-results-wrap .pagination.panel {
    margin-top: 18px;
    margin-bottom: 16px;
  }

  .site-main-list .channel-filter-bar {
    margin-bottom: 14px;
    overflow: hidden;
  }

  .site-main-list .active-filter-chips {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--line, #2a3140) 85%, transparent);
    background: color-mix(in srgb, var(--panel-bg, #171b22) 96%, transparent);
  }

  .site-main-list .ad-channel-banner,
  .site-main-list .ad-list-feed {
    margin: 0 0 16px;
  }

  .site-main-list .filter-chip-category-grid,
  .site-main-list .kids-soft-category-grid {
    margin-top: 4px;
  }

  .site-main-list .filter-chip-category-grid > .grid,
  .site-main-list .kids-soft-category-grid > .grid {
    margin-top: 0;
  }

  .site-main-list .pagination.panel {
    margin-top: 20px;
    margin-bottom: 12px;
  }

  .site-main-channel .channel-portal-lead {
    margin-bottom: 16px;
  }

  .site-main-channel .channel-filter-bar {
    margin-bottom: 14px;
    overflow: hidden;
  }

  .site-main-detail .ad-detail-banner,
  .site-main-detail .ad-detail-after-info,
  .site-main-play .ad-player-above,
  .site-main-play .ad-player-below {
    margin: 12px 0;
  }

  /* —— 筛选面板（四种骨架共用）：每行单行横滑、标签列固定，禁止换行铺满首屏 —— */
  .channel-filter-bar {
    padding: 2px 12px 6px;
  }

  .channel-filter-head {
    padding: 8px 0 10px;
  }

  .channel-filter-head h1 {
    font-size: 1.125rem;
  }

  .channel-filter-row,
  .channel-filter-bar-compact .channel-filter-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
  }

  .channel-filter-label,
  .channel-filter-bar-compact .channel-filter-label {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 36px;
  }

  .channel-filter-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .channel-filter-options::-webkit-scrollbar {
    display: none;
  }

  .channel-filter-options a,
  .channel-filter-sep {
    flex: 0 0 auto;
  }

  .channel-filter-options a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .channel-filter-bar-magazine .channel-filter-options a {
    min-height: 36px;
  }

  .channel-filter-more {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* 分类行栏目数有限，手机换行铺开一眼看全；类型 / 地区 / 年份选项多，仍单行横滑 */
  .channel-filter-row[data-filter-key="category"] {
    align-items: flex-start;
  }

  .channel-filter-row[data-filter-key="category"] .channel-filter-options {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 8px;
  }

  .channel-filter-lite {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .channel-filter-lite > .channel-filter-row,
  .channel-filter-lite > .channel-filter-dl {
    flex: 1 1 100%;
  }

  .channel-filter-lite .channel-filter-more {
    margin-left: auto;
  }

  .list-sort-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }

  .list-sort-tabs::-webkit-scrollbar {
    display: none;
  }

  .list-sort-tabs a {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .active-filter-chip,
  .active-filter-clear {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* 播放页用 ArtPlayer 自带控件，不叠「点击播放」大按钮 */
  .site-main-play .player-unmute {
    display: none !important;
  }

  .play-island .play-episode-grid span.play-ep,
  .detail-online .play-episode-grid span.play-ep {
    flex: 0 0 auto;
    min-width: 3.25rem;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .player-stage-touch .artplayer-app .art-bottom .art-controls {
    height: 48px;
  }

  .player-stage-touch .artplayer-app .art-control {
    min-width: 36px;
  }

  .meta-chip-more {
    display: inline;
  }

  .meta-chip-more summary {
    display: inline-block;
    cursor: pointer;
    font-size: 13px;
    color: var(--brand, #1677ff);
    font-weight: 600;
    margin-left: 4px;
  }

  .meta-chip-more summary::-webkit-details-marker {
    display: none;
  }

  .meta-chip-more-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  .play-page .play-episode-panel,
  .play-island .play-episode-panel {
    margin: 0 14px 8px;
    padding: 0;
    background: transparent;
    border: none;
  }

  .play-page .play-episode-grid,
  .play-island .play-episode-grid,
  .detail-online .play-episode-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
  }

  .play-page .play-episode-grid a.play-ep,
  .play-page .play-episode-grid button.play-ep,
  .play-page .play-episode-grid span.play-ep,
  .play-island .play-episode-grid a.play-ep,
  .play-island .play-episode-grid button.play-ep,
  .detail-online .play-episode-grid a.play-ep {
    flex: 0 0 auto;
    min-width: 3.25rem;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .play-page .detail-watch-related,
  .play-page .comment-section.panel {
    margin-left: 10px;
    margin-right: 10px;
  }

  .play-page .comment-section.panel {
    border-radius: 10px;
  }

  /* —— 详情：选集同样紧凑 —— */
  .detail-online.panel {
    padding: 12px 14px;
  }

  .detail-main.panel {
    padding: 12px 14px;
  }

  .detail-main-cta .detail-play-cta,
  .btn-important {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .comment-section.panel {
    padding: 14px 12px;
  }

  .comment-form {
    padding: 14px 12px 16px;
    gap: 14px;
  }

  .comment-form .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .comment-form .form-label {
    width: auto;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
  }

  .comment-form .text-input,
  .comment-form .text-area {
    font-size: 16px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .comment-form .text-area {
    min-height: 96px;
    resize: none;
  }

  .comment-form .form-row.form-row-captcha {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    flex-direction: unset;
  }

  .comment-form .form-row.form-row-captcha .form-label {
    grid-column: 1 / -1;
  }

  .comment-form .captcha-input {
    max-width: none;
    min-width: 0;
  }

  .comment-form .captcha-img {
    width: 112px;
    height: 44px;
    border-radius: 8px;
  }

  .comment-form .star-row {
    flex-wrap: wrap;
    gap: 4px 6px;
  }

  .comment-form .star-btn {
    font-size: 28px;
    padding: 6px 8px;
    min-width: 44px;
    min-height: 44px;
  }

  .comment-form .form-row-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .comment-form .dead-check {
    min-height: 44px;
    align-items: flex-start;
    line-height: 1.45;
  }

  .comment-form .submit-btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    border-radius: 10px;
  }

  .site-footer-shell .footer-discovery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
  }

  /* 暗轨宽卡在手机也是 2 列（240px 最小列宽会塌成 1 列） */
  .site-main-list .chrome-grid-rail,
  .site-main-channel .chrome-grid-rail,
  .site-main-search .chrome-grid-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 767px) {
  /* —— 分页：第一行数字页码居中，第二行「上一页 / 下一页」平分，按钮 ≥44px —— */
  .pagination.panel {
    justify-content: center;
    gap: 6px;
  }

  .pagination .pagination-item {
    order: 1;
    gap: 4px;
  }

  .pagination .pagination-link {
    min-width: 40px;
    min-height: 44px;
    padding: 0 8px;
  }

  /* 强制换行：页码少时上一页 / 下一页也不挤进页码行 */
  .pagination.panel::before {
    content: "";
    order: 2;
    flex: 1 1 100%;
    height: 0;
  }

  .pagination > .pagination-link {
    order: 3;
    flex: 1 1 0;
  }

  .pagination .pagination-meta {
    order: 4;
    flex: 1 1 100%;
    margin: 2px 0 0;
    text-align: center;
  }

  .pagination .pagination-jump {
    order: 5;
    flex: 1 1 100%;
    justify-content: center;
    margin: 4px 0 0;
  }

  .pagination .pagination-jump-input,
  .pagination .pagination-jump-btn {
    min-height: 40px;
  }

  /* —— 搜索结果信息行：单列，海报缩到 96px，按钮 ≥40px —— */
  .search-result-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .search-result-item {
    gap: 12px;
    padding: 10px;
  }

  .search-result-list-feed .search-result-item,
  .search-result-list-editorial .search-result-item {
    padding: 12px 0;
  }

  .search-result-poster,
  .search-result-list-feed .search-result-poster {
    flex-basis: 96px;
  }

  .search-result-no {
    flex-basis: 1.6rem;
    font-size: 1.25rem;
  }

  .search-result-title {
    font-size: 1rem;
  }

  .search-result-play,
  .search-result-detail {
    min-height: 40px;
    padding: 0 14px;
  }

  .search-hot-list a {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 420px) {
  /* 窄屏顶栏只留汉堡图标（按钮有 aria-label），宽度留给品牌名 */
  .cg-nav-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* —— 收藏引导弹窗（BookmarkPopup）：移动端底部 sheet，safe-area + 44px 点区 —— */
@media (max-width: 767px) {
  #seo-bookmark-popup {
    align-items: flex-end;
    padding: 0;
  }

  .bp-panel {
    width: 100%;
    max-width: none;
    max-height: 82vh;
    margin: 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 16px 16px 0 0;
  }

  .bp-close,
  .bp-cta,
  .bp-contact-link {
    min-height: 44px;
  }

  .bp-cta {
    line-height: 44px;
  }

  .bp-cta-secondary {
    line-height: 42px;
  }

  .bp-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .bp-title {
    margin-right: 56px;
  }
}
