/* Shared storefront chrome — sf-4
   Landing / marketing only. Match, room and game shells keep their own layout.
   Never override --chrome-top, never offset header.fixed, never restyle
   in-app chrome. Contractor match uses --chrome-top for the game iframe. */

.sf-install-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  min-height: 40px;
  padding: 7px 14px;
  background: rgba(8, 6, 14, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f6f3fb;
  text-align: center;
  position: relative;
  z-index: 120;
}
.sf-install-top.is-away,
.sf-install-top[hidden] { display: none; }
.sf-install-top__label {
  margin: 0;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  opacity: 0.82;
}
.sf-install-top__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.sf-install-top__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  opacity: 0.7;
}

/* In-app shells: no install strip, no --chrome-top rewrite. */
html[data-chrome="match"] .sf-install-top,
html.is-room .sf-install-top,
html.is-live-room .sf-install-top,
html[data-game] .sf-install-top,
html:has(.reload-in-room) .sf-install-top,
body.reload-in-room .sf-install-top,
body.is-room .sf-install-top,
body.is-live-room .sf-install-top {
  display: none !important;
}

/* Landing only: sit the fixed header under the in-flow install strip.
   Must not win over Contractor html[data-chrome=match] --chrome-top (104/156). */
html.has-sf-install:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.fixed.site-header,
html.has-sf-install:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.fixed.glass,
html:has(.sf-install-top:not([hidden]):not(.is-away)):not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.fixed.site-header,
html:has(.sf-install-top:not([hidden]):not(.is-away)):not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.fixed.glass {
  top: var(--sf-install-h, 40px) !important;
}
html.has-sf-install:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)),
html:has(.sf-install-top:not([hidden]):not(.is-away)):not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) {
  --chrome-top: calc(56px + var(--sf-install-h, 40px));
}

/* Dark landing headers stay readable over scrolled content. */
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.glass,
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header.glass {
  background: rgba(8, 10, 12, 0.94) !important;
  backdrop-filter: blur(20px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Compact lockups in dark landing headers — Winoverwin-sized on the phone. */
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left,
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand,
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left a {
  min-width: 0 !important;
  max-width: 100%;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left a,
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand img,
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left img {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  mix-blend-mode: plus-lighter;
}
html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-actions {
  flex: 0 0 auto !important;
}
@media (max-width: 1023px) {
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-nav { display: none !important; }
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-actions .online-chip,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header .online-chip { display: none !important; }
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-inner,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-actions {
    align-items: center !important;
  }
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-actions { gap: 0.35rem !important; }
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left svg,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left img,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand svg,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand img,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.site-header .site-header-left svg,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header.glass .site-header-left svg {
    height: 24px !important;
    max-height: 24px !important;
    width: auto !important;
    max-width: min(38vw, 132px) !important;
  }
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) header .chrome-inner {
    flex-wrap: nowrap !important;
  }
}
@media (min-width: 1024px) {
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left svg,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-left img,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand svg,
  html:not([data-chrome="match"]):not(.is-room):not(.is-live-room):not([data-game]):not(:has(.reload-in-room)) .site-header-brand img {
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    max-width: min(36vw, 220px) !important;
  }
}

/* Meirl / Maker family — no header plate; lockup sits on the page wash. */
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) body {
  padding-top: 0 !important;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .shell:not(.shell-fill) {
  padding-top: 14px !important;
  background: transparent !important;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar,
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .shell:not(.shell-fill) > .topbar,
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .shell-wide:not(.shell-fill) > .topbar {
  position: relative !important;
  top: auto !important;
  z-index: 8;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 8px !important;
  padding: 4px 0 10px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar::before,
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar::after {
  content: none !important;
  display: none !important;
  background: none !important;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .brand,
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar .brand-lockup-img {
  background: transparent !important;
  box-shadow: none !important;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}
html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar .brand-lockup-img {
  height: 44px !important;
  width: auto !important;
  max-width: min(72vw, 440px) !important;
  object-fit: contain;
}
@media (max-width: 767px) {
  html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .shell:not(.shell-fill) {
    padding-top: 10px !important;
  }
  html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar {
    gap: 8px;
    margin-bottom: 6px !important;
    padding: 2px 0 8px !important;
  }
  html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar-actions { gap: 8px; }
  html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar .brand-lockup-img {
    height: 38px !important;
    max-width: min(62vw, 280px) !important;
  }
}
@media (max-width: 479px) {
  html:not(.is-room):not(.is-live-room):not([data-chrome="match"]):not([data-game]) .topbar .brand-lockup-img {
    height: 34px !important;
    max-width: min(58vw, 220px) !important;
  }
}
