/* r157 · 全机型统一布局层(确定性修正,不靠脚本量来量去)
   1 顶栏:实色白底 + 深色清晰标题,不糊、不投影、不跟壁纸混色
   2 状态栏/顶栏同色,不再一条蓝一条灰
   3 底栏贴屏幕最下沿,只让出机型真实安全区,下面不再大片白
   4 内容区底部让出底栏高度,最后一行不被压住 */
html {
  --sat-top: 0px !important;
  --sat-bot: 0px !important;
  --tab-pad-b: 0px !important;
  --jy-pad-b: 0px !important;
}

/* ===== 顶栏(选择器加重,压过包里的 html.shell-fill .app-header) ===== */
html body .app-header,
html body .app-header-solid,
html body .app-header-mine,
html body .app-header-float,
html body .vip-head,
html body .chat-header {
  background-color: #fff !important;
  background-image: none !important;
  color: #101418 !important;
  --status-top: #fff !important;
  --status-band: #fff !important;
  text-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
  opacity: 1 !important;
  padding-top: max(env(safe-area-inset-top, 0px), 10px) !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
  box-shadow: none !important;
}

html body .app-header *,
html body .app-header-float * {
  text-shadow: none !important;
  filter: none !important;
}

html body .app-header h1,
html body .app-header h2,
html body .app-header .app-title,
html body .app-header .title,
html body .app-header .header-title,
html body .app-header strong,
html body .app-header-float h1,
html body .app-header-float .title {
  color: #101418 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

html body .app-header svg,
html body .app-header-float svg,
html body .app-header button,
html body .app-header-float button {
  color: #101418 !important;
}

html body .app-header button,
html body .app-header-float button {
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 旧的「状态栏色带」不再显示,顶栏自己铺到最上面 */
.status-band,
.app-status-band,
.jy-status-band,
[data-status-band] {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* ===== 底栏 ===== */
html body .tabbar,
html body.tabbar-fix:not(.kb-open) .tabbar,
html body.shell-mode .tabbar,
html body.tab-pad-fix .tabbar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 6px) !important;
  background: #fff !important;
  border-top: 1px solid rgba(15, 23, 42, 0.07) !important;
  box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.03) !important;
}

html.kb-open body .tabbar {
  position: static !important;
}

/* 内容区底部让出底栏 + 安全区 */
html body .app-body,
html body .chat-body,
html body.tabbar-fix:not(.kb-open) .app-body,
html body.tabbar-fix:not(.kb-open) .chat-body {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 74px) !important;
}

/* 聊天页输入栏贴安全区 */
html body .chat-input,
html body .chat-bar,
html body .input-bar {
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px) !important;
}
