html, body { margin: 0; min-height: 100%; }
html[data-theme='dark'], html:not([data-theme]) {
  background: #000;
  color: #f5f5f7;
  --ap-label: #f5f5f7;
  --ap-secondary-label: rgba(235, 235, 245, 0.6);
  --ap-tertiary-label: rgba(235, 235, 245, 0.3);
  --ap-material-regular-bg: rgba(28, 28, 30, 0.62);
  --ap-material-regular-blur: blur(14px) saturate(65%);
  --ap-separator: rgba(255, 255, 255, 0.08);
  --ap-header-height: 44px;
  --ap-header-padding-x: 24px;
  --ap-header-avatar-size: 20px;
  --ap-logo-penetration-stroke: #8D8D93;
  --ap-system-red: #FF453A;
  --ap-system-orange: #FF9F0A;
  --ap-system-yellow: #FFD60A;
  --ap-system-green: #30D158;
  --ap-system-blue: #0A84FF;
  --ap-system-purple: #BF5AF2;
}
html[data-theme='light'] {
  background: #f4f4f8;
  color: #1d1d1f;
  --ap-label: #1d1d1f;
  --ap-secondary-label: rgba(60, 60, 67, 0.6);
  --ap-tertiary-label: rgba(60, 60, 67, 0.3);
  --ap-material-regular-bg: rgba(255, 255, 255, 0.80);
  --ap-material-regular-blur: blur(20px) saturate(180%);
  --ap-separator: rgba(60, 60, 67, 0.12);
  --ap-header-height: 44px;
  --ap-header-padding-x: 24px;
  --ap-header-avatar-size: 20px;
  --ap-logo-penetration-stroke: #86868B;
  --ap-system-red: #FF3B30;
  --ap-system-orange: #FF9500;
  --ap-system-yellow: #FFCC00;
  --ap-system-green: #34C759;
  --ap-system-blue: #007AFF;
  --ap-system-purple: #AF52DE;
}
body { min-height: 100vh; }
#root { min-height: 100vh; }
#wedata-nav-overlay {
  position: fixed;
  top: var(--ap-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.wedata-nav-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(128, 128, 128, 0.35);
  animation: wedata-nav-spin 0.75s linear infinite;
}
#wedata-nav-overlay.wedata-nav-overlay--dismiss {
  opacity: 0;
  transition: opacity 120ms ease-out;
  pointer-events: none;
}
@keyframes wedata-nav-spin { to { transform: rotate(360deg); } }
#wedata-static-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483647;
  height: var(--ap-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--ap-header-padding-x);
  background: var(--ap-material-regular-bg);
  backdrop-filter: var(--ap-material-regular-blur);
  -webkit-backdrop-filter: var(--ap-material-regular-blur);
  border-bottom: 0.5px solid var(--ap-separator);
  box-sizing: border-box;
}
.wedata-static-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 100%;
  flex: 0 1 auto;
}
/* 频道导航：相对视口水平居中，保证距屏幕左右边缘等距 */
#wedata-header-center {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 2 * var(--ap-header-padding-x) - 12rem);
  pointer-events: none;
}
#wedata-header-center > * {
  pointer-events: auto;
}
#wedata-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  flex: 0 0 auto;
  /* 勿用 contain:paint — 会裁切 portaled 用户下拉（absolute top-full 超出 44px 顶栏） */
}
.wedata-static-header__center { height: 32px; }
#wedata-static-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ap-label);
  line-height: 0;
}
#wedata-header-breadcrumb { display: flex; align-items: center; min-width: 0; }
.wedata-static-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ap-secondary-label);
  border-radius: 9999px;
  line-height: 0;
}
.wedata-static-theme-icon,
.wedata-static-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wedata-static-user-slot { position: relative; display: inline-flex; }
.wedata-static-user-icon--avatar {
  width: var(--ap-header-avatar-size);
  height: var(--ap-header-avatar-size);
  border-radius: 9999px;
  font: 500 12px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--ap-system-blue), var(--ap-system-purple));
  color: #fff;
}
