/* Two-row mobile header and fixed news categories; no signal-grid geometry changes. */
.mobile-topbar,
html.feishu-webview .mobile-topbar {
  height: auto;
  min-height: 0;
  padding: 7px 10px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  overflow: visible;
}
.mobile-topbar > .mobile-top-primary,
html.feishu-webview .mobile-topbar > .mobile-top-primary {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: none;
}
.mobile-top-primary .mobile-brand { flex: 0 0 auto; }
.mobile-top-primary-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.mobile-top-primary-actions > button {
  min-width: 0;
  min-height: 29px;
  padding: 4px 6px;
  flex: 0 1 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 7px;
  color: var(--v23-top-text, #f5faff);
  background: rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-top-primary-actions > button[hidden] { display: none; }
.mobile-top-primary-actions > .member-pill { max-width: none; }
.mobile-top-primary-actions > .mobile-theme-toggle {
  color: var(--member-cta, #1677c8);
  background: #fff;
  border-color: var(--line, #d7e5f1);
}
.mobile-topbar > .mobile-top-actions,
html.feishu-webview .mobile-topbar > .mobile-top-actions {
  min-width: 0;
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  overflow: visible;
}
.mobile-topbar .mobile-top-actions > :not([hidden]) {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  padding: 5px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.mobile-topbar .mobile-top-actions > [hidden] { display: none; }
.mobile-topbar .mobile-top-actions > .mobile-top-link {
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 7px;
  color: var(--v23-top-text, #f5faff);
  background: rgba(255,255,255,.08);
}
.mobile-topbar .mobile-top-actions > .mobile-home-center {
  color: #fff;
  background: var(--member-cta, #1677c8);
  border-color: var(--member-cta, #1677c8);
}
.mobile-topbar .mobile-top-actions > .mobile-system-update,
.mobile-topbar .mobile-top-actions > .mobile-view-switch {
  color: var(--v23-top-text, #f5faff);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.20);
}
.mobile-sticky-controls,
html.feishu-webview .mobile-sticky-controls { top: 83px; }
@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) {
    .mobile-sticky-controls,
    html.feishu-webview .mobile-sticky-controls { top: 0; }
  }
}
@media (max-width: 390px) {
  .mobile-topbar,
  html.feishu-webview .mobile-topbar { padding-inline: 7px; }
  .mobile-top-primary-actions { gap: 3px; }
  .mobile-top-primary-actions > button { padding-inline: 4px; font-size: 10px; }
  .mobile-topbar .mobile-top-actions > :not([hidden]) { font-size: 10.5px; }
}
@media (max-width: 360px) {
  .mobile-topbar,
  html.feishu-webview .mobile-topbar { padding-inline: 6px; }
  .mobile-top-primary-actions > button { padding-inline: 3px; font-size: 9px; }
  .mobile-topbar .mobile-top-actions > :not([hidden]) { font-size: 10px; }
}

/* Category bar stays above the independently scrolling news list. */
.mobile-news-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line, #d7e5f1);
  background: var(--panel, #fff);
}
.mobile-news-tab {
  min-width: 0;
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  border-right: 1px solid var(--line-soft, #eaf1f7);
  border-bottom: 2px solid transparent;
  color: var(--muted, #5f7890);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}
.mobile-news-tab:last-child { border-right: 0; }
.mobile-news-tab.is-active {
  border-bottom-color: var(--member-cta, #1677c8);
  color: var(--member-cta, #1677c8);
  background: var(--v23-soft, #f2f7fc);
}
.mobile-news-sheet { background: var(--bg, #f5f9fd); }
.mobile-news-head,
.mobile-news-item { background: var(--panel, #fff); border-color: var(--line, #d7e5f1); }
.mobile-news-head h2,
.mobile-news-item h3 { color: var(--text, #17324b); }
.mobile-news-item p,
.mobile-news-meta { color: var(--muted, #5f7890); }
html.hscan-v23-night .mobile-top-primary-actions > .mobile-theme-toggle {
  color: #fff;
  background: var(--member-cta);
  border-color: var(--member-cta);
}
html.hscan-v23-night .mobile-news-close {
  color: var(--text);
  background: var(--v23-soft);
  border-color: var(--line);
}
