/**
 * 首页「直播模块」移动端专用布局（portal-live-block）
 * PC 表格见 portal.css .portal-live-row-pc；此处仅 ≤900px 生效，便于单独迭代组件样式。
 */
.portal-live-block .portal-live-m-title,
.portal-live-block .portal-live-row-m {
  display: none;
}
.portal-live-block .portal-live-m-head {
  display: contents;
}

@media (max-width: 900px) {
  .portal-live-block .portal-live-m-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--portal-space-md);
    margin-bottom: var(--portal-space-2xs);
  }
  .portal-live-block .portal-live-m-title {
    display: block;
    margin: 0;
    padding: 0;
    font-size: var(--portal-font-block);
    font-weight: 700;
    color: var(--portal-text-heading);
    line-height: 1.3;
  }
  .portal-live-block .portal-live-header {
    margin-bottom: 0;
    align-items: center;
  }
  /* 箭头 36×36，Tab 行与之同高 */
  .portal-live-block .portal-live-arrow {
    width: var(--portal-icon-md);
    height: var(--portal-icon-md);
    flex-shrink: 0;
    box-sizing: border-box;
  }
  .portal-live-block .portal-live-tabs {
    display: flex;
    align-items: center;
    min-height: var(--portal-icon-md);
  }
  /* 箭头与 Tab 区间距：PC 为 12px，移动端收窄 */
  .portal-live-block .portal-live-arrow.prev {
    margin-right: var(--portal-space-2xs);
  }
  .portal-live-block .portal-live-arrow.next {
    margin-left: var(--portal-space-2xs);
  }
  .portal-live-block .portal-live-tabs-wrap {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .portal-live-block .portal-live-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--portal-icon-md);
    padding: 0 0.875rem;
    font-size: var(--portal-font-caption);
    line-height: 1.2;
    color: var(--portal-text-heading);
    background: transparent;
    border-radius: 0;
    box-sizing: border-box;
  }
  .portal-live-block .portal-live-tab.act {
    background: var(--portal-primary);
    color: var(--portal-text-inverse);
    font-weight: 600;
  }
  .portal-live-block .portal-live-list-head,
  .portal-live-block .portal-live-row-pc {
    display: none !important;
  }
  /* 基础样式里 .portal-live-row-m 为 display:none，此处必须显式打开，否则移动端一直无卡片 */
  .portal-live-block .portal-live-row-m {
    display: block;
    padding: var(--portal-space-md) var(--portal-card-padding);
    box-sizing: border-box;
    width: 100%;
  }
  /* 主队 | 信息+信号源 | 客队 — 1 : 2 : 1 */
  .portal-live-block .portal-live-m-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: var(--portal-space-sm) var(--portal-space-md);
    width: 100%;
    min-width: 0;
  }
  .portal-live-block .portal-live-m-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--portal-space-sm);
    min-width: 0;
    text-align: center;
    align-self: center;
  }
  .portal-live-block .portal-live-m-team--home {
    grid-column: 1;
  }
  .portal-live-block .portal-live-m-team--away {
    grid-column: 3;
  }
  .portal-live-block .portal-live-m-center {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--portal-space-xs);
    min-width: 0;
    width: 100%;
    text-align: center;
  }
  .portal-live-block .portal-live-m-logo {
    width: var(--portal-thumb-52);
    height: var(--portal-thumb-52);
    border-radius: 50%;
    object-fit: contain;
    background: var(--portal-bg-alt);
    border: 1px solid var(--portal-border-muted);
    flex-shrink: 0;
  }
  .portal-live-block .portal-live-m-name {
    font-size: var(--portal-font-xs);
    font-weight: 500;
    color: var(--portal-text-heading);
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }
  .portal-live-block .portal-live-m-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--portal-space-xs);
    min-width: 0;
  }
  .portal-live-block .portal-live-m-league {
    font-size: var(--portal-font-caption);
    font-weight: 600;
    color: var(--portal-text-heading);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* 与 PC 同色；移动端略缩小、无圆角 */
  .portal-live-block .portal-live-m-meta .portal-live-status {
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    font-size: var(--portal-font-xs);
    font-weight: 600;
    line-height: 1.25;
    color: var(--portal-text-inverse);
    background: var(--portal-primary);
    border-radius: 0;
    padding: var(--portal-space-2xs) var(--portal-space-xs);
    box-sizing: border-box;
    white-space: nowrap;
  }
  .portal-live-block .portal-live-m-datetime {
    font-size: var(--portal-font-xs);
    color: var(--portal-text-muted);
    line-height: 1.35;
  }
  .portal-live-block .portal-live-m-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--portal-space-2xs);
    font-size: var(--portal-font-content);
    font-weight: 700;
    color: var(--portal-text-heading);
    letter-spacing: 0.02em;
  }
  .portal-live-block .portal-live-m-score-num {
    font-size: inherit;
  }
  .portal-live-block .portal-live-m-score-sep {
    font-weight: 700;
    font-size: 0.95em;
    opacity: 0.85;
  }
  /* 信号源：左右再留空一档，按钮更窄 */
  .portal-live-block .portal-live-m-center .portal-live-m-route {
    display: flex;
    justify-content: center;
    width: calc(100% - 2.5rem);
    max-width: 100%;
    margin: var(--portal-space-2xs) var(--portal-space-xl) 0;
    box-sizing: border-box;
    align-self: center;
  }
  .portal-live-block .portal-live-m-center .portal-live-route-wrap {
    width: 100%;
    justify-content: stretch;
  }
  .portal-live-block .portal-live-m-center .portal-live-route-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 1.75rem;
    padding: 0 var(--portal-space-sm);
    font-size: var(--portal-font-xs);
    gap: var(--portal-space-2xs);
    box-sizing: border-box;
  }
  .portal-live-block .portal-live-m-center .portal-live-route-btn .fa {
    font-size: var(--portal-font-xs);
    margin-left: 0.125rem;
  }
  .portal-live-block .portal-live-list {
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--portal-space-2xs);
  }
}
