/* __YK_MOBILE_FIX__ mobile viewport + safe-area fix */
html,body{min-height:100%;height:auto}
body{overflow-x:hidden;-webkit-text-size-adjust:100%;padding-bottom:env(safe-area-inset-bottom,0px)}
/* 100vh -> 100dvh，避免移动端/全屏 WebView 底部被输入栏遮挡 */
.h-screen{height:100dvh;height:100dvh!important}
.min-h-screen{min-height:100dvh!important}
/* 注意：排除 .mobile-tabbar（底部导航自身也是 <nav>），否则会被加上 112px 底部内边距而变得又高又胖 */
@media (max-width:860px){
  nav:not(.mobile-tabbar){padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  main{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
}
/* __YK_TABBAR_GLASS__ 底部导航栏：更透明 + 更强模糊 */
nav.mobile-tabbar.mobile-tabbar{
  background:rgba(255,255,255,.16);
  backdrop-filter:blur(30px) saturate(185%);
  -webkit-backdrop-filter:blur(30px) saturate(185%);
  border:.5px solid rgba(255,255,255,.5);
  box-shadow:0 10px 40px -14px rgba(15,23,42,.28),inset 0 1px rgba(255,255,255,.55),inset 0 -1px rgba(255,255,255,.18);
  padding-bottom:calc(7px + env(safe-area-inset-bottom,0px))!important;
}
html.dark nav.mobile-tabbar.mobile-tabbar{
  background:rgba(16,18,24,.44);
  border-color:rgba(255,255,255,.14);
  box-shadow:0 10px 40px -14px rgba(0,0,0,.55),inset 0 1px rgba(255,255,255,.12),inset 0 -1px rgba(255,255,255,.04);
}
/* 低性能模式仍保持不透明、无模糊 */
html.perf-lite nav.mobile-tabbar.mobile-tabbar{
  background:rgba(255,255,255,.94);
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.perf-lite.dark nav.mobile-tabbar.mobile-tabbar{
  background:rgba(20,22,28,.94);
}

/* __YK_DRAWER_GLASS3__ 透明玻璃侧栏（修复 backdrop-filter 失效）
 * 抽屉的滑入动画用 transform，会让 backdrop-filter 采样不到页面 → 之前看起来
 * 只是「白墙/叠字」。这里对抽屉内的 aside 取消 transform，让模糊真正生效：
 * 背景 52% 白 + 40px 模糊，能透出首页的色块与布局，但不会出现文字重叠。
 */
@media (max-width:1023px){
  div.fixed.inset-0.z-40{
    background:transparent!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  div.fixed.inset-0.z-40 aside{
    transform:none!important;
    background:rgba(255,255,255,.40)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    border-radius:0 20px 20px 0!important;
    border:none!important;
    box-shadow:none!important;
  }
  html.dark div.fixed.inset-0.z-40 aside{
    background:rgba(18,20,26,.22)!important;
  }
  div.fixed.inset-0.z-40 aside button,
  div.fixed.inset-0.z-40 aside a{
    background:transparent!important;
    text-shadow:0 1px 2px rgba(255,255,255,.9);
  }
  div.fixed.inset-0.z-40 aside button[class*="bg-brand"]{
    background:rgb(59,102,241)!important;
    text-shadow:none!important;
  }
  html.dark div.fixed.inset-0.z-40 aside button,
  html.dark div.fixed.inset-0.z-40 aside a{
    text-shadow:0 1px 2px rgba(0,0,0,.7);
  }
  div.fixed.inset-0.z-40 aside .text-slate-400,
  div.fixed.inset-0.z-40 aside .text-slate-500{
    color:#475569!important;
  }
  html.dark div.fixed.inset-0.z-40 aside .text-slate-400,
  html.dark div.fixed.inset-0.z-40 aside .text-zinc-500{
    color:#c4c4cc!important;
  }
}
