/* R85: one shared glass surface, with no animated blur or full-page fade.
   Keep the tint separate from the highlight so content remains visible through
   the controls. Only small fixed/sticky surfaces use a backdrop filter. */
:root {
  --ygz-glass-tint: rgba(18, 24, 34, .34);
  --ygz-glass-solid: #202631;
  --ygz-glass-highlight: linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.025) 48%, rgba(205,231,255,.035));
  --ygz-glass-edge: rgba(232,243,255,.21);
  --ygz-glass-shadow: 0 5px 18px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.15);
  --ygz-glass-blur: 16px;
  --ygz-glass-ease: cubic-bezier(.2,.8,.2,1);
}

/* Explicit selectors support older Android WebViews, without relying on :has
   or color-mix. Solid is the default; transparency is progressive enhancement. */
html body .ygz-top-nav,
html body .search-bar,
html body .ygz-friend-search-box,
html body .bottom-nav,
html body .bottom-navigation,
html body [data-bottom-nav],
html body .music-trigger,
html body .music-card,
html body #showPostModalMobileBtn.dynamic-island-post,
html body #replyIslandBtn.reply-island,
html body #ghostIslandBtn.ghost-dynamic-island,
html body .ygz-action-island {
  background: var(--ygz-glass-highlight), var(--ygz-glass-solid) !important;
  border-color: var(--ygz-glass-edge) !important;
  box-shadow: var(--ygz-glass-shadow) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  will-change: auto !important;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body .ygz-top-nav,
  html body .search-bar,
  html body .ygz-friend-search-box,
  html body .bottom-nav,
  html body .bottom-navigation,
  html body [data-bottom-nav],
  html body .music-trigger,
  html body .music-card,
  html body #showPostModalMobileBtn.dynamic-island-post,
  html body #replyIslandBtn.reply-island,
  html body #ghostIslandBtn.ghost-dynamic-island,
  html body .ygz-action-island {
    background: var(--ygz-glass-highlight), var(--ygz-glass-tint) !important;
    -webkit-backdrop-filter: blur(var(--ygz-glass-blur)) saturate(145%) !important;
    backdrop-filter: blur(var(--ygz-glass-blur)) saturate(145%) !important;
  }
}

html body .search-bar,
html body .ygz-friend-search-box {
  transition: border-color 160ms ease, background-color 160ms ease !important;
}
html body .search-bar:focus-within,
html body .ygz-friend-search-box:focus-within {
  border-color: rgba(226,241,255,.50) !important;
  box-shadow: var(--ygz-glass-shadow), 0 0 0 2px rgba(181,219,255,.10) !important;
}
html body .search-input::placeholder { color: rgba(230,235,245,.66) !important; }
html body .ygz-menu-link,
html body .ygz-menu-return { color: rgba(245,248,255,.85); }
html body .ygz-menu-link.is-active { color: #fff !important; }
html body .ygz-top-nav .ygz-primary-indicator {
  top: var(--ygz-indicator-inset, 3px) !important;
  bottom: var(--ygz-indicator-inset, 3px) !important;
  border: 1px solid rgba(255,255,255,.30) !important;
  background: linear-gradient(145deg,rgba(255,255,255,.22),rgba(232,244,255,.09)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 7px rgba(0,0,0,.08) !important;
  transition: transform 240ms var(--ygz-glass-ease), width 240ms var(--ygz-glass-ease), opacity 120ms ease !important;
  will-change: auto !important;
}
html body .ygz-top-nav .ygz-primary-indicator::after { opacity: .12 !important; }
html body .ygz-top-nav.is-indicator-moving .ygz-primary-indicator {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 7px rgba(0,0,0,.08) !important;
}
html body .ygz-nav-menu-track {
  transition: transform 220ms var(--ygz-glass-ease), opacity 140ms ease !important;
}
html body .music-trigger::before,
html body .music-trigger::after,
html body .music-card::before { opacity: .20 !important; }
html body .music-card {
  --ygz-glass-tint: rgba(18,24,34,.58);
  --ygz-glass-blur: 18px;
}
html body .music-card.active { animation: ygzGlassPanelIn 220ms var(--ygz-glass-ease) both !important; }
html body .music-card.closing { animation: ygzGlassPanelOut 160ms ease both !important; }
@keyframes ygzGlassPanelIn {
  from { opacity: 0; transform: translate3d(0,8px,0) scale(.98); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}
@keyframes ygzGlassPanelOut {
  from { opacity: 1; transform: translate3d(0,0,0) scale(1); }
  to { opacity: 0; transform: translate3d(0,6px,0) scale(.985); }
}

/* A transformed/fading page wrapper also moves fixed dialogs and makes glass
   sample a temporary offscreen layer. Leave the page in place; animate the
   individual navigation indicator and dialog instead. */
html body #mainWrapper,
html body .main-wrapper,
html.ygz-102-ready body .main-wrapper,
html.ygz-r5-motion body .main-wrapper,
html.ygz-page-leaving body .main-wrapper {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  will-change: auto !important;
}
@view-transition { navigation: none; }
::view-transition-old(root),
::view-transition-new(root) { animation: none !important; }

/* Low-memory / data-saving mode already selected by the existing runtime. */
html.ygz-lite-effects,
html.ygz-low-power { --ygz-glass-blur: 8px; --ygz-glass-tint: rgba(22,29,40,.56); }
html.ygz-lite-effects body .ygz-top-nav,
html.ygz-lite-effects body .search-bar,
html.ygz-lite-effects body .ygz-friend-search-box {
  background: var(--ygz-glass-highlight), var(--ygz-glass-solid) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 520px) { :root { --ygz-glass-blur: 12px; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root, html.ygz-lite-effects, html.ygz-low-power { --ygz-glass-tint: var(--ygz-glass-solid); --ygz-glass-highlight: linear-gradient(transparent,transparent); --ygz-glass-blur: 0px; }
  html body .music-card { --ygz-glass-tint: var(--ygz-glass-solid); --ygz-glass-blur: 0px; }
  html body .ygz-menu-link { color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  html body .ygz-nav-menu-track,
  html body .ygz-top-nav .ygz-primary-indicator,
  html body .search-bar,
  html body .ygz-friend-search-box,
  html body .music-trigger,
  html body .music-card,
  html body .music-card.active,
  html body .music-card.closing,
  html body #showPostModalMobileBtn.dynamic-island-post,
  html body #replyIslandBtn.reply-island,
  html body #ghostIslandBtn.ghost-dynamic-island,
  html body .ygz-action-island { animation: none !important; transition: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
