/* PKG–PKKM v2.0.7 R9.7.5: Mobile 3D Color Navigation (visual only).
   Preserves R9.7.4 JavaScript, route handling, access control and bottom sheet.
   This file is intentionally loaded AFTER r974-mobile-nav.css. */
@media (max-width:767px){
  body:not(.activation-required) .pkg-mobile-bar{
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    bottom:calc(8px + env(safe-area-inset-bottom));
    width:auto;max-width:510px;margin-inline:auto;
    padding:7px 7px 6px;
    min-height:75px;gap:3px;
    align-items:stretch;
    border:1px solid rgba(255,255,255,.92);border-radius:26px;
    background:linear-gradient(150deg,rgba(255,255,255,.98),rgba(248,250,255,.98));
    box-shadow:0 14px 38px rgba(24,57,46,.21),0 3px 12px rgba(35,72,59,.08),inset 0 1px 2px #fff;
    backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
    isolation:isolate;
  }
  .pkg-mobile-bar button{
    position:relative;overflow:visible;min-height:62px;
    padding:6px 1px 4px;gap:5px;border-radius:19px;
    font-size:clamp(9px,2.65vw,11.5px);font-weight:800;
    letter-spacing:-.015em;color:#5d687b;
    background:transparent;
    transition:transform .18s ease,background .18s ease,box-shadow .18s ease,color .18s ease;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  .pkg-mobile-bar button::before{
    content:"";position:absolute;top:5px;left:50%;transform:translateX(-50%);
    width:33px;height:33px;border-radius:12px;
    background:var(--nav-icon-bg,#eef1ff);
    box-shadow:inset 0 1px 1px rgba(255,255,255,.92),0 3px 8px rgba(42,57,91,.06);
    pointer-events:none;
  }
  .pkg-mobile-bar button svg{
    position:relative;z-index:1;width:24px;height:24px;
    margin-top:7px;flex:none;
    color:var(--nav-icon,#4d7dff);stroke-width:2.25;
    filter:drop-shadow(0 1.5px 1px rgba(25,47,71,.12));
  }
  .pkg-mobile-bar button span{position:relative;z-index:1;overflow:visible;line-height:1.1;}
  .pkg-mobile-bar button[data-mobile-action="home"]{--nav-icon:#477ef6;--nav-icon-bg:linear-gradient(155deg,#f3f7ff,#e1e9ff)}
  .pkg-mobile-bar button[data-mobile-action="pkg"]{--nav-icon:#0d9b5c;--nav-icon-bg:linear-gradient(155deg,#e6fff2,#b5f0d3)}
  .pkg-mobile-bar button[data-mobile-action="pkkm"]{--nav-icon:#e89423;--nav-icon-bg:linear-gradient(155deg,#fff8e9,#ffe4c4)}
  .pkg-mobile-bar button[data-mobile-action="more"]{--nav-icon:#8c37dc;--nav-icon-bg:linear-gradient(155deg,#fbf2ff,#efddff)}
  .pkg-mobile-bar button[aria-current="page"],
  .pkg-mobile-bar button[aria-expanded="true"]{
    color:var(--nav-icon,#0d9b5c);
    background:linear-gradient(150deg,rgba(248,255,252,.97),var(--nav-active-bg,#e1fff0));
    box-shadow:0 5px 15px var(--nav-active-shadow,rgba(12,157,90,.24)),inset 0 1px 2px #fff;
    transform:translateY(-2px);
  }
  .pkg-mobile-bar button[data-mobile-action="home"]{--nav-active-bg:#e5ecff;--nav-active-shadow:rgba(57,109,220,.20)}
  .pkg-mobile-bar button[data-mobile-action="pkg"]{--nav-active-bg:#ddf9e9;--nav-active-shadow:rgba(14,153,94,.24)}
  .pkg-mobile-bar button[data-mobile-action="pkkm"]{--nav-active-bg:#fff1d8;--nav-active-shadow:rgba(229,151,41,.21)}
  .pkg-mobile-bar button[data-mobile-action="more"]{--nav-active-bg:#f2e5ff;--nav-active-shadow:rgba(147,60,221,.20)}
  .pkg-mobile-bar button[aria-current="page"]::before,
  .pkg-mobile-bar button[aria-expanded="true"]::before{
    background:linear-gradient(155deg,var(--nav-active-top,#31cb8b),var(--nav-active-bottom,#008753));
    box-shadow:0 4px 10px var(--nav-active-shadow),inset 0 1px 2px rgba(255,255,255,.45);
  }
  .pkg-mobile-bar button[data-mobile-action="home"]{--nav-active-top:#76a5ff;--nav-active-bottom:#376be9}
  .pkg-mobile-bar button[data-mobile-action="pkg"]{--nav-active-top:#42d599;--nav-active-bottom:#049658}
  .pkg-mobile-bar button[data-mobile-action="pkkm"]{--nav-active-top:#ffc36b;--nav-active-bottom:#e48a19}
  .pkg-mobile-bar button[data-mobile-action="more"]{--nav-active-top:#ba79ef;--nav-active-bottom:#7a31d1}
  .pkg-mobile-bar button[aria-current="page"] svg,
  .pkg-mobile-bar button[aria-expanded="true"] svg{color:#fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}
  .pkg-mobile-bar button:disabled{opacity:.60;cursor:wait}
  .pkg-mobile-bar button:focus-visible{outline:3px solid #d4a62d;outline-offset:2px}
  body:not(.activation-required) .main #view{padding-bottom:calc(152px + env(safe-area-inset-bottom))!important}
  body:not(.activation-required) .toast-wrap{bottom:calc(110px + env(safe-area-inset-bottom))!important}
  body:not(.activation-required) .r7-update-banner{bottom:calc(105px + env(safe-area-inset-bottom))!important}
  .assessment-actions{bottom:calc(110px + env(safe-area-inset-bottom))!important}
}
@media (max-width:360px){
  body:not(.activation-required) .pkg-mobile-bar{left:max(5px,env(safe-area-inset-left));right:max(5px,env(safe-area-inset-right));gap:1px;padding:5px 4px}
  .pkg-mobile-bar button{min-height:58px;gap:4px;padding-inline:0}
  .pkg-mobile-bar button::before{width:30px;height:30px;border-radius:11px}
  .pkg-mobile-bar button svg{width:22px;height:22px;margin-top:6px}
}
[data-theme="dark"] .pkg-mobile-bar{
  background:linear-gradient(155deg,#24372f,#14261e)!important;
  border-color:#3a5546!important;box-shadow:0 14px 35px #0008,inset 0 1px 1px #ffffff1c!important;
}
[data-theme="dark"] .pkg-mobile-bar button{color:#d0d8d2}
[data-theme="dark"] .pkg-mobile-bar button[aria-current="page"],
[data-theme="dark"] .pkg-mobile-bar button[aria-expanded="true"]{
  background:linear-gradient(150deg,#284535,#24382c);
  box-shadow:0 5px 15px #0005,inset 0 1px 1px #ffffff23;
  color:#e6fff2;
}
@media (prefers-reduced-motion:reduce){.pkg-mobile-bar button{transition:none!important;transform:none!important}}
@media print{.pkg-mobile-bar{display:none!important}}
