/* R52: clear labels and a quiet selected icon; five stable touch targets. */
#app .vy-msg-signature { display:none!important; }
#app #bottomnav {
  --nav-r52-surface:var(--surface,#fff);
  box-sizing:border-box;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  align-items:center;
  height:calc(60px + env(safe-area-inset-bottom,0px));
  gap:2px;
  padding-block:0 env(safe-area-inset-bottom,0px);
  padding-left:max(8px,env(safe-area-inset-left,0px),calc((100vw - 520px)/2));
  padding-right:max(8px,env(safe-area-inset-right,0px),calc((100vw - 520px)/2));
}
#app #bottomnav .bottomnav__btn {
  display:grid;
  grid-template-rows:28px 14px;
  grid-template-columns:minmax(0,1fr);
  justify-items:center;
  align-content:center;
  position:relative;
  isolation:isolate;
  box-sizing:border-box;
  width:100%;
  min-width:44px;
  height:56px;
  min-height:56px;
  margin:0;
  border-radius:12px;
  gap:2px;
  padding:5px 0;
  background:transparent!important;
  transform:none!important;
  scale:1!important;
  animation:none!important;
}
#app #bottomnav .bottomnav__btn.is-active { background:transparent!important; }
#app #bottomnav .bottomnav__btn::before {
  content:"";
  position:absolute;
  z-index:-1;
  top:6px;
  left:50%;
  width:48px;
  height:28px;
  border-radius:10px;
  background:var(--accent-soft,#e9efff);
  opacity:0;
  transform:translateX(-50%) scale(.86);
  pointer-events:none;
}
#app #bottomnav .bottomnav__btn.is-active::before {
  opacity:1;
  transform:translateX(-50%) scale(1);
}
#app #bottomnav .bottomnav__btn__icon {
  display:grid;
  place-items:center;
  position:relative;
  grid-row:1;
  align-self:center;
  width:24px;
  height:24px;
  min-width:24px;
  margin:0;
  padding:0;
  line-height:0;
}
#app #bottomnav .bottomnav__btn__icon > svg { display:block; width:24px; height:24px; }
#app #bottomnav .bottomnav__btn__label {
  display:block;
  position:static;
  grid-row:2;
  align-self:center;
  margin:0;
  padding:0;
  max-width:100%;
  height:14px;
  font-size:11px!important;
  line-height:14px;
  font-weight:550;
  letter-spacing:0;
  white-space:nowrap;
}
#app #bottomnav .bottomnav__btn.is-active .bottomnav__btn__label { font-weight:650; }
#app #bottomnav .bottomnav__btn .vh-navbadge {
  position:absolute;
  box-sizing:border-box;
  z-index:2;
  top:3px;
  left:calc(50% + 7px);
  min-width:16px;
  height:16px;
  padding:0 4px;
  margin:0;
  border:1px solid var(--nav-r52-surface);
  border-radius:9px;
  background:var(--accent,#1a56db);
  font-size:10px;
  line-height:14px;
  box-shadow:none;
  animation:none!important;
  transform:none!important;
}
#app #bottomnav .bottomnav__btn > .maxi-ripple { display:none; }
#app #bottomnav .bottomnav__btn:focus-visible {
  outline:2px solid var(--accent,#1a56db);
  outline-offset:-2px;
}
/* The player owns a dark frame even when the rest of the app uses light mode. */
#app[data-view="clips"]:has(#view-clips.vd-player-mode) #bottomnav {
  --nav-r52-surface:#090d14;
  background:#090d14!important;
  border-top-color:rgb(255 255 255 / .09);
}
#app[data-view="clips"]:has(#view-clips.vd-player-mode) #bottomnav .bottomnav__btn {
  color:#aeb9ca!important;
}
#app[data-view="clips"]:has(#view-clips.vd-player-mode) #bottomnav .bottomnav__btn.is-active {
  color:#d7e5ff!important;
}
#app[data-view="clips"]:has(#view-clips.vd-player-mode) #bottomnav .bottomnav__btn::before {
  background:#223652;
}
#app[data-view="clips"]:has(#view-clips.vd-player-mode) #bottomnav .bottomnav__btn:focus-visible {
  outline-color:#9ebfff;
}

/* The footer identifies the loaded bundle. Availability is checked on demand. */
#view-settings .settings-footer {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px 16px;
  margin-top:22px;
  padding:16px 0 8px;
  border-top:1px solid var(--border,#dce2eb);
  text-align:left;
  color:var(--text-muted,#536174);
}
#view-settings .settings-footer__version {
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:4px 6px;
  font-size:12px;
  line-height:1.5;
}
#view-settings .settings-footer__version > span { overflow-wrap:anywhere; }
#view-settings .settings-footer__update {
  min-width:44px;
  min-height:44px;
  padding:10px 14px;
  border:1px solid var(--border,#dce2eb);
  border-radius:13px;
  background:var(--surface,#fff);
  color:var(--text,#17233c);
  font:inherit;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
  cursor:pointer;
}
#view-settings .settings-footer__update:disabled { opacity:.6; cursor:progress; }
#view-settings .settings-footer__update:focus-visible { outline:2px solid var(--accent,#1a56db);outline-offset:2px; }
#view-settings .settings-footer__status {
  grid-column:1/-1;
  font-size:12px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
#view-settings .settings-footer__status:empty { display:none; }
@media(max-width:420px) {
  #view-settings .settings-footer { grid-template-columns:minmax(0,1fr); gap:10px; }
  #view-settings .settings-footer__update { justify-self:start; }
}
/* Keep the 11px labels, including Settings, inside five narrow mobile cells. */
@media(max-width:360px) {
  #app #bottomnav {
    padding-left:max(4px,env(safe-area-inset-left,0px));
    padding-right:max(4px,env(safe-area-inset-right,0px));
  }
}
@media(prefers-reduced-motion:no-preference) {
  html:not([data-vy-motion="off"]) #app #bottomnav .bottomnav__btn::before {
    transition:opacity 160ms ease,transform 220ms cubic-bezier(.2,.8,.2,1);
  }
  html:not([data-vy-motion="off"]) #app #bottomnav .bottomnav__btn.is-active .bottomnav__btn__icon {
    animation:nav-r52-select 240ms cubic-bezier(.2,.8,.2,1);
  }
  html:not([data-vy-motion="off"]) #app #bottomnav .bottomnav__btn:active .bottomnav__btn__icon {
    transform:scale(.94);
  }
}
@keyframes nav-r52-select { 0%{transform:translateY(1px) scale(.94)} 100%{transform:none} }
@media(prefers-reduced-motion:reduce) {
  #app #bottomnav .bottomnav__btn,
  #app #bottomnav .bottomnav__btn::before,
  #app #bottomnav .bottomnav__btn__icon { animation:none!important;transition:none!important; }
}
html[data-vy-motion="off"] #app #bottomnav .bottomnav__btn,
html[data-vy-motion="off"] #app #bottomnav .bottomnav__btn::before,
html[data-vy-motion="off"] #app #bottomnav .bottomnav__btn__icon { animation:none!important;transition:none!important; }

/* Keep update actions above mobile navigation and the composer. */
@media(max-width:860px){#vy-release-update{bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;max-height:calc(100dvh - 112px);overflow:auto}}
