/* PACKERO V295 — UI guard after public TinyFish audit, 2026-11-05.
   Fixes clear-theme islands in dark mode, protects status badge zero,
   preserves authorized 18+ gates, contests & checkout untouched. */

/* Online is a count, not an anonymous white toggle/dot. Multiple legacy
   nav styles have used .nav-number; the HTML hidden attribute is authoritative. */
body.packero-v3826 #sideOnline.hidden,
body.packero-v3826 #sideOnline[hidden],
body.packero-v3826 #sideOnline[aria-hidden="true"],
body.packero-v3826 #sideOnline:empty,
body.packero-v3826 #navOnline.hidden,
body.packero-v3826 #navOnline[hidden] { display:none!important; visibility:hidden!important; }
body.packero-v3826 #sideOnline:not([hidden]):not(.hidden) {
  flex:0 0 auto!important;
  min-width:26px!important;
  width:auto!important;
  padding-inline:7px!important;
  font-variant-numeric:tabular-nums;
  line-height:1!important;
}

/* Harden dark theme surfaces identified in read-only Feed audit.
   Explicit colors intentionally defeat old hard-coded light selectors. */
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-searchbox {
  background:#151b27!important;
  border-color:#334058!important;
  color:#eef2f8!important;
  box-shadow:0 8px 22px rgba(0,0,0,.16)!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-searchbox input,
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-searchbox .hp-home-search-field-v118 input {
  background:#0f151f!important;
  color:#f3f0fb!important;
  -webkit-text-fill-color:#f3f0fb!important;
  border-color:#334058!important;
  caret-color:#f96fcd!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-searchbox input::placeholder { color:#aeb7ca!important; opacity:1!important; }
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-tabs {
  background:#151b27!important;
  border-color:#334058!important;
  color:#eff0fa!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-tabs button:not(.active) {
  background:#1d2433!important;
  border-color:#334058!important;
  color:#e7e2f4!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain .hp-tabs button.active {
  background:#372149!important;
  color:#ffe5f5!important;
  border-bottom-color:#ea51bb!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain :is(#feedRoot,#homeFeedRoot) .hp-empty {
  background:linear-gradient(145deg,#191d2b,#20192e)!important;
  border:1px solid #3e3653!important;
  border-radius:16px!important;
  color:#eae4f3!important;
  padding:18px!important;
  line-height:1.55!important;
}
html[data-theme="dark"] body.packero-v3826 #packeroMain :is(#feedRoot,#homeFeedRoot) .loader {
  background:transparent!important;
  color:#cbbddc!important;
}

/* No phantom vertical space from an inactive contest promotion on routes
   without that rail (including Store). Active promotions are unaffected. */
body.packero-v3826 #contestPromoRail.hidden,
body.packero-v3826 #contestPromoRail:empty {
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
}
@media (max-width:820px) {
  /* The prelaunch ticker is meaningful on desktop; mobile uses contextual
     disclosure and cannot afford a blank-looking strip above Store. */
  body.packero-v3826 .hp-announcement { display:none!important; }
}
@media (prefers-reduced-motion: reduce) {
  body.packero-v3826 #packeroMain .hp-tabs button { transition:none!important; }
}
