/* startbar-fix29: LIVE pill + Zapisz się stay fully above Arena tabs / GRAJ TERAZ
   Root cause: .hbtns is position:absolute at the hero bottom (raised above .bnav on phone),
   while .emblem grows from the top and used to paint into the dock (z-index 3 < hbtns 4).
   Fix: scale .eWrap to the free space above the dock (--hbH / --eScale from app2.js fit).
   Also: ui27 set height:100%!important on .hero which collapses the grid row to ~12px at
   tablet widths (601–820) where style2's height:560px was overridden — restore a definite height. */
html[class*=emb] .emblem{
  top:8px;
  max-height:calc(100% - var(--hbH, 160px) - 14px);
  box-sizing:border-box;
  overflow:visible; /* never clip LIVE / Zapisz */
  pointer-events:none; /* empty chrome passes through; children re-enable */
  z-index:5; /* above .hbtns (4) so Zapisz stays clickable if they kiss */
}
html[class*=emb] .emblem .eWrap,
html[class*=emb] .emblem .live,
html[class*=emb] .emblem .tsign,
html[class*=emb] .emblem .ePlate,
html[class*=emb] .emblem .eCrown,
html[class*=emb] .emblem .ecrown{
  pointer-events:auto;
}
html[class*=emb] .emblem .eWrap{
  transform:scale(var(--eScale, 1)) !important;
  transform-origin:50% 0 !important;
  /* lobby-a54: --eMb from fit() = (scale-1)*nat so Zapisano sits above plM; 0 kills ui27 dig-into-dock */
  margin-bottom:var(--eMb, 0px) !important;
}
html[class*=emb] .emblem .live,
html[class*=emb] .emblem .tsign{
  position:relative;
  z-index:6;
}

/* Phone: give hero real height so fit() can clear the raised dock without unreadably tiny scale */
@media (max-width:600px){
  html[class*=emb] .hero{
    height:auto !important;
    min-height:min(760px, calc(100svh - 120px)) !important; /* mobscroll-30: svh = stable vs URL bar */
  }
  .page.on[data-page=start] .home{
    height:auto !important;
    min-height:0 !important;
  }
}

/* Tablet 601–820: ui27 height:100%!important collapsed .hero to ~12px (absolute kids don't
   stretch the grid row). Restore a definite height so dock + emblem share one card. */
@media (min-width:601px) and (max-width:820px){
  html[class*=emb] .hero{
    height:min(720px, calc(100svh - 140px)) !important; /* mobscroll-30: svh = stable vs URL bar */
    min-height:560px !important;
  }
  .page.on[data-page=start] .home{
    height:auto !important;
    min-height:0 !important;
  }
}

@media (max-width:820px){
  html[class*=emb] .emblem{top:6px;width:min(600px,96%) !important}
  html[class*=emb] .emblem .eWrap{margin-bottom:0 !important}
  .hero .hbtns{z-index:4}
}
@media (min-width:821px){
  html[class*=emb] .emblem{top:10px}
}

/* mobscroll-30: sticky profil/nick/waluty ZAWSZE nad kartą Igrzysk przy scrollu.
   Emblem zostaje z-index:5 (nad .hbtns=4, żeby Zapisz było klikalne), header.top=10 > emblem.
   UWAGA: NIE używać gołego selektora .top — #acSnd też dostaje class "top" (panel dźwięku). */
@media (max-width:820px){
  .app > header.top,
  header.top{
    z-index:10;
    isolation:isolate;
    background:#070c22 !important; /* fully opaque — no ghost Igrzyska / crown */
    /* solid veil under sticky bar so scaled emblem/crown never show through gaps */
    box-shadow:0 1px 0 #070c22, 0 8px 16px #070c22aa;
  }
  /* speaker in topbar: class .ib inherits style2 colors; only neutralize #acSnd float chrome */
  #acSnd.inTop{background:transparent!important;isolation:auto;display:flex;align-items:center;align-self:center;margin:0;padding:0}
  #acSnd.inTop > button.ib{
    width:34px!important;height:34px!important;border-radius:10px!important;
    border:1px solid #4a3aa8!important;background:#120f3d!important;color:#c9d3ff!important;
    box-shadow:none!important;opacity:1!important;font-size:0!important;line-height:0;padding:0;
  }
  #acSnd.inTop > button.ib svg{width:18px;height:18px;display:block}
  .icons .ib,#acSnd.inTop > button.ib{box-sizing:border-box}
}


/* mobperf-30: webp hero background via <picture class="bgc"> */
picture.bgc{position:absolute;inset:0;width:100%;height:100%;display:block;margin:0;padding:0;border:0;z-index:0;pointer-events:none}
picture.bgc img{width:100%;height:100%;object-fit:cover;display:block}
