/* 底部导航（前台共用）：黑金简约版
   贴底全宽深色底；三等分选项；选中项为金色描边胶囊底 + 金色文字与图标。
   依赖 html[data-theme]（由 site_theme() 输出），用于压过 bottom-nav.css 与 theme.css。 */

:root,
:root[data-theme]{
  --bn-gold:#d6be8c;
  --bn-gold-hi:#f3e6c4;
  --bn-dim:rgba(239,233,221,.5);
  --bn-pill:rgba(214,190,140,.12);
  --bn-pill-line:rgba(214,190,140,.42);
  --bn-ease:cubic-bezier(.2,.7,.2,1);
}

/* 导航栏：贴底、全宽、深色底，上边一条极细分割线 */
html[data-theme] body nav.bottom-nav.bottom-nav,
html[data-theme] body.bottom-nav,
html[data-theme][data-theme] body nav.bottom-nav{
  position:fixed !important;top:auto !important;left:0 !important;right:0 !important;bottom:0 !important;
  transform:none !important;z-index:100 !important;
  display:flex !important;align-items:center !important;justify-content:space-around !important;gap:0 !important;
  width:100% !important;max-width:100% !important;
  height:auto !important;min-height:0 !important;margin:0 !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px)) !important;
  border:none !important;border-top:1px solid rgba(214,190,140,.14) !important;border-radius:0 !important;
  background:#07060a !important;
  box-shadow:none !important;
  backdrop-filter:none !important;-webkit-backdrop-filter:none !important}

/* 去掉所有旧的顶部线、分隔线 */
html[data-theme] body .bottom-nav::before,
html[data-theme] body .bottom-nav::after,
html[data-theme] body .bottom-nav .nav-item::before,
html[data-theme] body .bottom-nav .nav-item::after{content:none !important;display:none !important}

/* 选项：等宽，图标在上、文字在下，整体为胶囊形 */
html[data-theme] body nav.bottom-nav.bottom-nav .nav-item,
html[data-theme] body nav.bottom-nav .nav-item.nav-item{
  position:relative !important;flex:1 1 0 !important;min-width:0 !important;
  height:auto !important;min-height:0 !important;margin:0 4px !important;
  padding:7px 0 6px !important;border-radius:14px !important;border:1px solid transparent !important;
  display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;gap:4px !important;
  background:transparent !important;color:var(--bn-dim) !important;text-decoration:none !important;
  font-family:"Noto Serif SC","Songti SC","STSong","SimSun",serif !important;font-size:11px !important;letter-spacing:2px !important;line-height:1 !important;
  box-shadow:none !important;outline:none !important;
  transition:color .4s var(--bn-ease),background .4s var(--bn-ease),border-color .4s var(--bn-ease) !important}

/* 选中：金色描边胶囊底，文字与图标转金 */
html[data-theme] body nav.bottom-nav.bottom-nav .nav-item.active,
html[data-theme] body nav.bottom-nav .nav-item.nav-item.active{
  color:var(--bn-gold-hi) !important;background:var(--bn-pill) !important;border-color:var(--bn-pill-line) !important;box-shadow:none !important}
html[data-theme] body nav.bottom-nav.bottom-nav .nav-item.active .nav-icon,
html[data-theme] body nav.bottom-nav .nav-item.nav-item.active .nav-icon{color:var(--bn-gold) !important;filter:none !important}

/* 悬停：只变颜色 */
html[data-theme] body .bottom-nav .nav-item:hover{color:var(--bn-gold-hi) !important;background:transparent !important}

/* 图标 */
html[data-theme] body .bottom-nav .nav-icon{width:20px !important;height:20px !important;line-height:0 !important;color:inherit !important;display:block !important}
html[data-theme] body .bottom-nav .nav-icon svg{width:20px !important;height:20px !important;stroke:currentColor !important;stroke-width:1.4 !important}

/* 键盘焦点 */
html[data-theme] body .bottom-nav .nav-item:focus-visible{outline:1px solid rgba(214,190,140,.35) !important;outline-offset:-4px !important}

/* 页面底部留白，避免内容被导航栏遮住 */
html[data-theme] body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px)) !important}

/* 聊天页：导航回到文档流中（与输入栏并列），不悬浮，不遮挡消息区 */
html[data-theme] body.has-chat-nav{padding-bottom:0 !important}
html[data-theme] body.has-chat-nav nav.bottom-nav.bottom-nav,
html[data-theme] body.has-chat-nav .bottom-nav{
  position:relative !important;top:auto !important;left:auto !important;right:auto !important;bottom:auto !important;
  flex-shrink:0 !important;width:100% !important;z-index:auto !important}
