/**
 * 底部 Tab 栏 — 锁定样式，勿改布局/定位
 * build 81 · Tab 字号写死 16px，与 APP 壳底栏一致
 */
:root {
  --jw-nav-h: 62px;
  --jw-ios-bottom: 0px;
  --jw-ios-top: 0px;
}

#jw-bottom-nav.bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-height: var(--jw-nav-h);
  background: var(--card, #fff);
  border-top: 1px solid var(--line, rgba(60, 60, 67, 0.12));
  padding-bottom: env(safe-area-inset-bottom, 0);
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--jw-ios-bottom, 0px);
  z-index: 99999;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  margin: 0;
}

#jw-bottom-nav.bottom-nav.nav-shell {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

#jw-bottom-nav .nav-item {
  border: 0;
  background: transparent;
  padding: 14px 4px 10px;
  font-size: 16px;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
}

#jw-bottom-nav .nav-icon {
  display: none;
}

#jw-bottom-nav .nav-label {
  font-size: 16px;
  font-weight: inherit;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#jw-bottom-nav .nav-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  left: auto;
  margin-left: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 1.5px var(--card, #fff);
}

#jw-bottom-nav .nav-badge-wide {
  min-width: auto;
  padding: 0 5px;
  font-size: 9px;
  letter-spacing: -0.2px;
}

#jw-bottom-nav .nav-badge-alert {
  min-width: 16px;
  width: 16px;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
}

#jw-bottom-nav .nav-item.active {
  color: #1a1a1a;
  font-weight: 700;
}

#jw-bottom-nav .nav-item[data-tab="home"] {
  display: none;
  color: #007aff;
  font-weight: 500;
}

html.jw-chat-shell .app-root {
  height: 100% !important;
  min-height: 100% !important;
}

/* APP 壳内：聊天室自带底栏（联系人/通话/聊天等），shell 底栏保留同城/影剧等 */
html.jw-chat-shell #jw-bottom-nav.bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  bottom: 0;
  z-index: 99999;
}

html.jw-chat-shell #jw-bottom-nav .nav-item[data-tab="home"] {
  display: flex;
}

.app-root {
  height: calc(100dvh - var(--jw-nav-h) - env(safe-area-inset-bottom, 0px) - var(--jw-ios-bottom, 0px));
}

html.jw-chat-shell .app-root {
  height: calc(100% - var(--jw-nav-h) - env(safe-area-inset-bottom, 0px) - var(--jw-ios-bottom, 0px));
}

html.jw-chat-shell,
html.jw-chat-shell body {
  height: 100%;
  overflow: hidden;
}
