*{box-sizing:border-box}html,body{margin:0;min-width:320px;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;background:#fff;color:#425c84;-webkit-font-smoothing:antialiased}button{font:inherit;cursor:pointer}img{display:block;max-width:100%}.page{--blue:#3f83f8;--orange:#ff7628;--line:#e7eef7;--soft:#f7faff;--nav:4rem;width:100%;max-width:1180px;margin:0 auto;min-height:100dvh;padding-top:3.5rem;padding-bottom:calc(var(--nav) + env(safe-area-inset-bottom) + 0.875rem);background:#fff}.header{height:3.5rem;min-height:3.5rem;display:flex;align-items:center;justify-content:space-between;padding:0.25rem clamp(0.75rem,2.6vw,1.125rem);gap:0.4375rem;position:fixed;top:0;left:50%;transform:translateX(-50%);width:min(100%,73.75rem);z-index:80;background:#fff}.brand{border:0;background:transparent;display:inline-flex;align-items:baseline;flex:0 0 auto;white-space:nowrap;font-weight:1000;font-style:italic;font-size:clamp(1.75rem,8vw,2.1875rem);letter-spacing:-0.15625rem;line-height:1;padding:0 0.125rem}.brand>.b{color:#1e96b5}.brand .g{color:#efb933}.brand .dot{color:#e94868;font-size:.88em;letter-spacing:-1px}.brand .boo{color:#1e96b5;letter-spacing:-0.15625rem}.brand .boo>.b{color:#efb933}.actions{display:flex;align-items:center;gap:0.4375rem}.login,.register{height:2rem;border-radius:1.125rem;font-weight:800;white-space:nowrap;font-size:0.875rem}.login{min-width:3.75rem;padding:0 0.6875rem}.register{min-width:3.875rem;padding:0 0.75rem}.login{background:#fff;color:var(--blue);border:0.09375rem solid var(--blue)}.register{background:var(--orange);color:#fff;border:1px solid var(--orange)}.lang{height:2rem;min-width:2rem;border:0;background:#fff;color:#52698e;padding:0;display:flex;align-items:center;justify-content:center}.lang img{width:1.8125rem;height:1.8125rem;flex:0 0 1.8125rem}.home-content{padding:0 clamp(0.5rem,2.6vw,1.5rem)}.hero{margin-inline:calc(0.75rem - clamp(0.5rem,2.6vw,1.5rem))}.slides{position:relative;border-radius:0.75rem;overflow:hidden}.slide-track{display:flex;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:none}.slide-track::-webkit-scrollbar{display:none}.slide{flex:0 0 100%;width:100%;height:100%;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always}.slide img{width:100%;height:100%;object-fit:cover;display:block}.dots{position:absolute;left:50%;bottom:0.5rem;z-index:6;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:0.4375rem;height:auto;padding:0;margin:0;pointer-events:none}.dots button{pointer-events:auto}.dots button{width:0.375rem;height:0.375rem;border:0;padding:0;border-radius:0.5625rem;background:rgba(255,255,255,.82);box-shadow:0 1px 0.1875rem rgba(32,58,92,.16)}.dots button.active{width:0.9375rem;background:#2cc646}@media(min-width:481px) and (max-width:767px){.hero{margin-inline:0}}@media(min-width:768px){.hero{margin-inline:0}.slides{border-radius:1rem}.dots{bottom:0.625rem}}
.ticker{width:100%;height:1.5625rem;border:0;border-radius:0.5625rem;background:var(--soft);display:flex;align-items:center;gap:0.3125rem;padding:0 0.5rem;color:#7891b8;text-align:left}.bell{font-size:0.75rem}.window{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:0.75rem;font-weight:500;line-height:1.2}.ticker b{font-size:0.75rem;font-weight:400;line-height:1}.lobby{display:grid;grid-template-columns:clamp(3.5rem,14vw,4rem) minmax(0,1fr);gap:clamp(0.375rem,1.8vw,0.625rem);margin-top:0.625rem;align-items:start}.rail{display:flex;flex-direction:column;gap:0.25rem;align-self:start;position:sticky;top:3.75rem}.rail button{position:relative;width:100%;min-height:4.875rem;border:0;background:#fff;border-radius:0.875rem;color:#748bb3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.1875rem;padding:0.3125rem 0.125rem}.rail button.active{background:linear-gradient(180deg,#599cff,#3f83f8);color:#fff;box-shadow:0 0.3125rem 0.875rem rgba(63,131,248,.18)}.rail span{line-height:1}.rail-icon{width:2.625rem;height:2.625rem;display:grid;place-items:center;flex:0 0 2.625rem}.rail-icon img{width:100%;height:100%;object-fit:contain;display:block}.rail button.active .rail-icon{width:2.75rem;height:2.75rem;flex-basis:2.75rem}.rail button.active .rail-icon img{filter:none}.rail b{font-size:0.75rem;font-weight:500;white-space:nowrap}.games-column{min-width:0}.games-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(0.5rem,2vw,0.75rem)}.card{width:100%;border:0;background:#fff;padding:0;border-radius:1.0625rem;overflow:hidden;box-shadow:0 0.125rem 0.4375rem rgba(56,77,113,.10);position:relative}.bottom{position:fixed;z-index:40;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,73.75rem);height:calc(var(--nav) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -0.375rem 1.375rem rgba(45,74,116,.07);display:grid;grid-template-columns:repeat(4,1fr)}.bottom button,.bottom a{border:0;background:none;color:#8298bb;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.1875rem;text-decoration:none}.nav-icon{width:1.6875rem!important;height:1.6875rem!important;min-width:1.6875rem;min-height:1.6875rem;max-width:1.6875rem;max-height:1.6875rem;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;display:block;overflow:visible}.bottom b{font-size:0.75rem;font-weight:500}.bottom button.active,.bottom a.active{color:var(--blue)}@media(min-width:431px) and (max-width:767px){.lobby{grid-template-columns:4.125rem minmax(0,1fr);gap:0.625rem}}@media(min-width:768px){.home-content{padding-inline:1.375rem}.ticker{height:1.6875rem;border-radius:0.625rem}.lobby{grid-template-columns:5.125rem minmax(0,1fr);gap:0.875rem;margin-top:0.75rem}.games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0.875rem}.rail{gap:0.375rem}.rail button{min-height:5.75rem;border-radius:1.125rem}.rail b{font-size:0.875rem}.rail-icon{width:2.875rem;height:2.875rem;flex-basis:2.875rem}.rail button.active .rail-icon{width:3rem;height:3rem;flex-basis:3rem}.bottom{height:calc(4rem + env(safe-area-inset-bottom))}}@media(min-width:1200px){body{padding-inline:1.125rem}.page{box-shadow:0 0 2.5rem rgba(44,74,119,.06)}.home-content{padding-inline:1.75rem}.lobby{grid-template-columns:5.625rem minmax(0,1fr);gap:1rem}.games-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}}

/* BG-Core V1.06.39: retained shared layout behavior (no page scroll lock). */
.hero + .ticker{margin-top:0.625rem}
html,body{scrollbar-width:none;-ms-overflow-style:none}
html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}
.header{isolation:isolate}
/* Single-finger scrolling and tapping remain browser-native. */
html,body,.page,button,a,label,input,select,textarea,.header,.home-content,.lobby,.games-column,.card,.bottom{touch-action:manipulation}

/* Final rail geometry: same 7 items, alignment and sizes as V1.06.38. */
.rail button[data-cat]{
  display:grid;
  grid-template-rows:2.625rem 0.9375rem;
  align-content:center;
  justify-items:center;
  row-gap:0;
  gap:0;
  min-height:3.8125rem;
  padding:0 0.125rem;
}
.rail-icon,
.rail button.active .rail-icon{
  width:3.625rem;
  height:3rem;
  min-width:3.625rem;
  min-height:3rem;
  max-width:3.625rem;
  max-height:3rem;
  margin:0;
  overflow:visible;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.rail-icon img{
  width:70%;
  height:70%;
  object-position:center bottom;
  margin:0;
  transform:translateY(-0.3125rem);
}
.rail-icon-bigo img{
  width:92%;
  height:92%;
  transform:translate(0.5rem,-0.3125rem);
  overflow:visible;
}
.rail button[data-cat] b{
  display:block;
  width:100%;
  margin:0;
  padding:0;
  line-height:0.9375rem;
  height:0.9375rem;
  text-align:center;
  align-self:start;
}

/* BG-HOME-R1.29.4: one stable 7-view game layout, all four SPA entries.
   The six homepage covers and six zone covers have their own intrinsic-ratio
   frames. No generic .card img rule can ever size the BIGO LIVE badges. */
#gameGrid > .card{
  display:block;aspect-ratio:765/300;min-width:0;isolation:isolate;
}
#gameGrid > .card > img:first-child{
  position:absolute;inset:0;display:block;width:100%;height:100%;
  max-width:none;aspect-ratio:765/300;object-fit:cover;
}
#gameGrid > .card > img.home-live-badge{
  position:absolute;top:2.6%;left:1.6%;width:32%;height:auto;
  max-width:none;aspect-ratio:190/55;object-fit:contain;
  display:block;z-index:1;pointer-events:none;
}
/* One active zone surface, no gray placeholder or hidden legacy banner. */
#bgZonePanel{
  width:100%;min-width:0;aspect-ratio:750/320;position:relative;
  border:0;padding:0;border-radius:1.0625rem;overflow:hidden;
  background:transparent;box-shadow:0 0.125rem 0.4375rem rgba(56,77,113,.10);
}
#bgZonePanel > :is(a,button){
  position:relative;display:block;width:100%;height:100%;aspect-ratio:750/320;
  margin:0;padding:0;border:0;background:transparent;line-height:0;
  text-align:left;cursor:pointer;
}
#bgZonePanel .bg-zone-cover{
  position:absolute;inset:0;display:block;width:100%;height:100%;
  max-width:none;aspect-ratio:750/320;object-fit:cover;
}
#bgZonePanel .bg-zone-live-badge{
  position:absolute;top:2.6%;left:1.6%;width:32%;height:auto;
  max-width:none;aspect-ratio:190/55;object-fit:contain;
  display:block;pointer-events:none;z-index:1;
}
#bgHomeDevToast{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9999;max-width:calc(100vw - 3rem);padding:0.5rem 0.875rem;border-radius:0.6875rem;background:rgba(35,44,61,.94);color:white;font-size:0.75rem;font-weight:400;line-height:1.45;box-shadow:0 0.25rem 1rem rgba(0,0,0,.2);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s ease;white-space:nowrap}
#bgHomeDevToast.is-visible{opacity:1;visibility:visible}

/* BG-CAROUSEL-R1.324: native 1040 x 460 banners fill the frame without generated backdrop bands. */
.hero[data-home-carousel][data-hc-state="pending"]{aspect-ratio:52/23;border-radius:.75rem;background:#eef3f9;overflow:hidden}
.hero[data-home-carousel][data-hc-state="empty"]{display:none}
.hero[data-home-carousel] .slides{height:auto;aspect-ratio:52/23;background:transparent}
.hero[data-home-carousel] .slide-track{direction:ltr}
.hero[data-home-carousel] .bg-hc-slide{position:relative;isolation:isolate;display:block;background:transparent;color:#fff}
.hero[data-home-carousel] .bg-hc-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
.hero[data-home-carousel] .bg-hc-copy{position:absolute;left:5%;top:12.5%;width:54%;height:75%;box-sizing:border-box;display:flex;align-items:center;min-width:0;padding:0;overflow:hidden;text-align:start;text-shadow:0 1px 3px #16243c33}
.hero[data-home-carousel] .bg-hc-inner{width:100%;min-width:0;flex:none;overflow-wrap:anywhere;word-break:normal;hyphens:auto}
.hero[data-home-carousel] h3{margin:0;font-size:var(--bg-hc-title,20px);line-height:1.25;font-weight:600;color:inherit;white-space:pre-wrap;overflow-wrap:anywhere}
.hero[data-home-carousel] p{margin:var(--bg-hc-gap,7px) 0 0;font-size:var(--bg-hc-body,12px);line-height:1.45;color:inherit;white-space:pre-wrap;overflow-wrap:anywhere}

/* BG-HOME-R1.357: keep categories below the fixed header; short screens retain every category. */
@media(max-height:650px){
  .home-content .rail{
    max-height:calc(100vh - 3.75rem - var(--nav) - env(safe-area-inset-bottom) - .875rem);
    max-height:calc(100dvh - 3.75rem - var(--nav) - env(safe-area-inset-bottom) - .875rem);
    margin-inline:-.25rem;padding-inline:.25rem;
    overflow-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior-y:contain;
  }
  .home-content .rail::-webkit-scrollbar{display:none}
  .home-content .rail>button[data-cat]{flex:none}
}
