/* FanKix V14.4.40 — tighter Kix logo pill + live balance support */

/* FanKix V13.2 — no hub flash */
html.fk-game-direct body:not(.fk-app-ready) .hub,
html.fk-game-direct body:not(.fk-app-ready) .rewards,
html.fk-game-direct body:not(.fk-app-ready) .toast-wrap {
  display: none !important;
}

html.fk-game-direct body:not(.fk-app-ready)::before {
  content: "Loading match...";
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(184,255,26,.26), transparent 28%),
    linear-gradient(135deg, #050705, #0d160a);
  color: #b8ff1a;
  font: 1000 16px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html.fk-root-redirect body:not(.fk-app-ready) .hub,
html.fk-root-redirect body:not(.fk-app-ready) .game,
html.fk-root-redirect body:not(.fk-app-ready) .rewards,
html.fk-root-redirect body:not(.fk-app-ready) .toast-wrap {
  display: none !important;
}

html.fk-root-redirect body:not(.fk-app-ready)::before {
  content: "Opening FanKix Arcade...";
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(184,255,26,.26), transparent 28%),
    linear-gradient(135deg, #050705, #0d160a);
  color: #b8ff1a;
  font: 1000 16px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#050807;color:#fff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button{font:inherit;-webkit-tap-highlight-color:transparent}.app{min-height:100dvh;display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 15% 0%,rgba(184,255,26,.18),transparent 31%),radial-gradient(circle at 85% 18%,rgba(36,82,255,.24),transparent 34%),#050807}.phone{width:min(430px,100%);height:min(880px,100dvh - 36px);border:1px solid rgba(255,255,255,.12);border-radius:34px;background:linear-gradient(180deg,#07134d,#020503 48%,#061a10);overflow:hidden;position:relative;box-shadow:0 40px 100px rgba(0,0,0,.45)}.topbar{height:66px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.22);backdrop-filter:blur(18px)}.brand{border:0;background:transparent;color:#fff;font-weight:1000;font-size:22px;letter-spacing:-.7px;cursor:pointer}.brand span{background:#b8ff1a;color:#000;border-radius:999px;padding:2px 7px;margin-left:3px;line-height:.92;display:inline-flex;align-items:center}.pill{border:1px solid rgba(184,255,26,.28);background:rgba(184,255,26,.12);color:#b8ff1a;border-radius:999px;padding:8px 10px;font-size:11px;font-weight:1000}.pill.error{border-color:rgba(255,75,56,.35);background:rgba(255,75,56,.14);color:#ff6b56}.screen{position:absolute;left:0;right:0;top:66px;bottom:0;overflow:auto;padding:18px 16px 28px}.hidden{display:none!important}.hero{border:1px solid rgba(255,255,255,.12);border-radius:30px;background:radial-gradient(circle at 80% 8%,rgba(184,255,26,.18),transparent 36%),rgba(0,0,0,.34);padding:24px}.hero p,.section-head p,.reward-hero p,.code-box p{margin:0 0 10px;color:#b8ff1a;font-size:11px;font-weight:1000;letter-spacing:1px}.hero h1{margin:0;font-size:52px;line-height:.88;letter-spacing:-2.4px}.hero h1 span{color:#b8ff1a}.hero small{display:block;margin-top:16px;color:rgba(255,255,255,.64);font-size:14px;line-height:1.45}.wallet{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.wallet>div{border-radius:24px;padding:18px;background:#b8ff1a;color:#000;min-height:110px;display:grid;align-content:center}.wallet span{font-size:10px;font-weight:1000;letter-spacing:.8px;color:rgba(0,0,0,.58)}.wallet strong{font-size:34px;line-height:1;font-weight:1000;letter-spacing:-1.3px}.profile,.daily{margin-top:14px;border:1px solid rgba(255,255,255,.12);border-radius:24px;background:rgba(255,255,255,.08);padding:14px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.profile b,.profile small,.daily b,.daily small{display:block}.profile small,.daily small{margin-top:4px;color:rgba(255,255,255,.58);font-size:12px;word-break:break-all}.profile button,.daily button,.pass-card button,.reward-card button,.code-box button,.end button{border:0;border-radius:999px;background:#b8ff1a;color:#000;min-height:42px;padding:0 14px;font-weight:1000;cursor:pointer}.navgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.navgrid button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.08);color:#fff;border-radius:24px;min-height:112px;display:grid;place-items:center;padding:12px;cursor:pointer}.navgrid span{font-size:28px}.navgrid b,.navgrid small{display:block}.navgrid small{color:rgba(255,255,255,.55);font-size:12px}.section-head{margin-top:24px}.section-head.compact{margin-top:18px}.section-head h2{margin:0 0 14px;font-size:30px;line-height:1;letter-spacing:-1.2px}.pass-grid,.reward-grid{display:grid;gap:10px}.pass-card,.reward-card{border:1px solid rgba(255,255,255,.12);border-radius:26px;background:radial-gradient(circle at 90% 10%,rgba(184,255,26,.12),transparent 36%),rgba(255,255,255,.07);padding:16px}.pass-card.glow,.reward-card.featured{border-color:rgba(184,255,26,.24);box-shadow:0 0 0 1px rgba(184,255,26,.06),0 18px 50px rgba(184,255,26,.08)}.badge{display:inline-flex;border:1px solid rgba(184,255,26,.22);background:rgba(184,255,26,.11);color:#b8ff1a;border-radius:999px;padding:7px 9px;font-size:10px;font-weight:1000;letter-spacing:.7px;margin-bottom:10px}.pass-card h3,.reward-card h3{margin:0;font-size:27px;line-height:1;letter-spacing:-1px}.pass-card p,.reward-card p{margin:9px 0 12px;color:rgba(255,255,255,.62);font-size:13px;line-height:1.42}.pass-card strong,.reward-card strong{display:block;font-size:23px;letter-spacing:-1px;margin-bottom:12px}.subtop{min-height:54px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px}.subtop button{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;min-height:38px;padding:0 12px;font-weight:1000}.subtop b,.subtop small{display:block}.subtop small{color:rgba(255,255,255,.58);font-size:12px}.reward-hero,.code-box{border:1px solid rgba(255,255,255,.12);border-radius:30px;background:rgba(0,0,0,.34);padding:20px;margin:12px 0}.reward-hero h2{margin:0;font-size:44px;line-height:1;letter-spacing:-1.8px}.reward-hero h2 span{color:#b8ff1a}.reward-hero small,.code-box small,.legal{color:rgba(255,255,255,.58);font-size:12px;line-height:1.45}.reward-card.locked{opacity:.55}.reward-card button[disabled]{opacity:.55;cursor:not-allowed}.code-box h3{margin:0 0 8px;font-size:38px;letter-spacing:-1.5px;color:#b8ff1a;word-break:break-all}.code-box button{width:100%;margin-top:10px}.code-box button:nth-of-type(2){background:rgba(255,255,255,.10);color:#fff;border:1px solid rgba(255,255,255,.14)}.legal{margin:14px 4px}.game{padding:0;display:flex;flex-direction:column;background:linear-gradient(180deg,#0b1f7b,#031028 48%,#076b34)}.game .subtop{padding:0 12px;height:66px;background:rgba(0,0,0,.45);border-bottom:1px solid rgba(255,255,255,.10)}.scorebar{height:46px;display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;text-align:center;background:rgba(0,0,0,.25);border-bottom:1px solid rgba(255,255,255,.09)}.scorebar span{font-size:11px;font-weight:1000;color:rgba(255,255,255,.64)}.scorebar b{color:#fff;font-size:15px}#pitch{width:100%;height:calc(100% - 66px - 46px - 58px);display:block;touch-action:none}.skill{height:58px;padding:0 14px;display:grid;grid-template-columns:52px 1fr 70px;gap:10px;align-items:center;background:rgba(0,0,0,.42);border-top:1px solid rgba(255,255,255,.10)}.skill span,.skill b{font-size:10px;font-weight:1000}.skill span{color:rgba(255,255,255,.58)}.skill b{text-align:right}.power{height:12px;border-radius:999px;background:rgba(255,255,255,.14);position:relative}.power em{position:absolute;left:47%;width:18%;top:0;height:100%;border-radius:999px;background:#b8ff1a;box-shadow:0 0 14px rgba(184,255,26,.8)}.power i{position:absolute;top:-5px;left:0;width:5px;height:22px;border-radius:999px;background:#fff;transform:translateX(-50%)}.msg{position:absolute;left:16px;right:16px;bottom:78px;border:1px solid rgba(255,255,255,.12);border-radius:22px;background:rgba(0,0,0,.68);padding:12px;text-align:center;pointer-events:none}.msg strong,.msg span{display:block}.msg span{margin-top:4px;color:rgba(255,255,255,.62);font-size:12px}.end{position:absolute;inset:0;background:rgba(0,0,0,.78);display:grid;place-content:center;gap:10px;text-align:center;padding:24px}.end p{margin:0;color:#b8ff1a;font-size:11px;font-weight:1000;letter-spacing:1px}.end h2{margin:0;font-size:54px;line-height:.9;letter-spacing:-2px}.end span{color:rgba(255,255,255,.68);margin-bottom:8px}.end button{min-width:210px}.end button:nth-of-type(n+2){background:rgba(255,255,255,.10);color:#fff;border:1px solid rgba(255,255,255,.14)}@media(max-width:520px){.app{padding:0}.phone{width:100%;height:100dvh;border-radius:0;border:0}.hero h1{font-size:48px}}
/* FanKix V12.4 post-game polish */
.end.claimed{background:radial-gradient(circle at 50% 22%,rgba(184,255,26,.22),transparent 36%),rgba(0,0,0,.82)}
.end.claimed #backArcadeBtn{background:#b8ff1a;color:#000;border:0}
.end.claimed #againBtn{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.16)}
.end.unclaimed #claimBtn{background:#b8ff1a;color:#000;box-shadow:0 0 0 4px rgba(184,255,26,.13)}
.end.unclaimed #backArcadeBtn{opacity:.78}
.end.zero #backArcadeBtn{background:#b8ff1a;color:#000;border:0}
.end.zero #claimBtn{display:none}


/* FanKix V13 Country System */
.country-card{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:22px;
  background:linear-gradient(135deg,rgba(184,255,26,.22),rgba(255,255,255,.08));
  border:1px solid rgba(184,255,26,.26);
}
.country-card b{
  display:block;
  color:#fff;
  font-size:14px;
  letter-spacing:-.01em;
}
.country-card b span{
  color:#b8ff1a;
}
.country-card small{
  display:block;
  margin-top:4px;
  color:rgba(255,255,255,.62);
  font-size:11px;
  line-height:1.25;
}
.country-card button{
  min-width:86px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(184,255,26,.35);
  background:#b8ff1a;
  color:#050705;
  font-weight:1000;
  cursor:pointer;
}
.country-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(16px);
}
.country-modal.hidden{
  display:none;
}
.country-modal-card{
  width:min(720px,100%);
  max-height:min(720px,92vh);
  overflow:auto;
  border-radius:30px;
  background:#071008;
  border:1px solid rgba(184,255,26,.22);
  box-shadow:0 30px 80px rgba(0,0,0,.55);
  padding:20px;
}
.country-modal-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.country-modal-top p{
  margin:0 0 8px;
  color:#b8ff1a;
  font-size:11px;
  font-weight:1000;
  letter-spacing:.16em;
}
.country-modal-top h2{
  margin:0;
  color:#fff;
  font-size:34px;
  line-height:.9;
  letter-spacing:-.06em;
}
.country-modal-top small{
  display:block;
  margin-top:9px;
  color:rgba(255,255,255,.62);
  font-size:13px;
}
#countryCloseBtn{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
.country-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.country-option{
  min-height:68px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.055);
  color:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  cursor:pointer;
  text-align:left;
}
.country-option:hover,
.country-option.active{
  border-color:#b8ff1a;
  background:rgba(184,255,26,.12);
}
.country-option .flag{
  font-size:26px;
  line-height:1;
}
.country-option strong{
  display:block;
  font-size:13px;
  font-weight:1000;
}
.country-option small{
  display:block;
  margin-top:3px;
  color:rgba(255,255,255,.56);
  font-size:10px;
  letter-spacing:.08em;
}
@media(max-width:680px){
  .country-grid{grid-template-columns:1fr 1fr;}
  .country-modal-card{border-radius:22px;padding:14px;}
}


/* FanKix V13.1 Games-only root redirect screen */
body.fankix-games-only-redirect .hub .card:not(.hero),
body.fankix-games-only-redirect .hub .profile,
body.fankix-games-only-redirect .hub .country-card,
body.fankix-games-only-redirect .hub .row,
body.fankix-games-only-redirect .hub .passes,
body.fankix-games-only-redirect .hub .reward-preview {
  display: none !important;
}

body.fankix-games-only-redirect .hub .hero {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

body.fankix-games-only-redirect .hub .hero::after {
  content: "Redirecting to FanKix Arcade...";
  display: block;
  margin-top: 18px;
  color: rgba(255,255,255,.72);
  font-weight: 900;
}


/* FanKix V14 Penalty Royale Retro Skill Rebuild */
.game{
  background:
    radial-gradient(circle at 50% 8%, rgba(184,255,26,.14), transparent 34%),
    linear-gradient(180deg,#081338 0%,#06122c 47%,#063f24 48%,#041c12 100%) !important;
  color:#fff;
}
.game .subtop{
  background:linear-gradient(180deg,rgba(4,7,18,.88),rgba(4,7,18,.68)) !important;
  backdrop-filter:blur(14px);
}
.game .subtop b{
  letter-spacing:-.03em;
}
.game .subtop small{
  color:#b8ff1a !important;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.scorebar{
  height:48px !important;
  background:#080b16 !important;
  border-top:1px solid rgba(184,255,26,.16);
  border-bottom:1px solid rgba(184,255,26,.16) !important;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}
.scorebar span{
  color:rgba(255,255,255,.6) !important;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.scorebar b{
  display:block;
  margin-top:2px;
  color:#b8ff1a !important;
  font-size:16px !important;
  text-shadow:0 0 14px rgba(184,255,26,.32);
}
#pitch{
  image-rendering:auto;
  cursor:crosshair;
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
  background:#0b3d25;
}
.skill{
  height:64px !important;
  grid-template-columns:56px 1fr 88px !important;
  background:linear-gradient(180deg,rgba(2,4,12,.86),rgba(2,4,12,.96)) !important;
  border-top:1px solid rgba(184,255,26,.18) !important;
}
.skill span{
  color:rgba(255,255,255,.58) !important;
  letter-spacing:.14em;
}
.skill b{
  color:#b8ff1a;
  font-size:11px !important;
  letter-spacing:.08em;
}
.power{
  height:14px !important;
  border:1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(90deg,rgba(255,74,74,.45),rgba(255,205,74,.42),rgba(184,255,26,.82),rgba(255,205,74,.42),rgba(255,74,74,.45)) !important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.25);
}
.power em{
  left:60% !important;
  width:24% !important;
  background:rgba(255,255,255,.30) !important;
  box-shadow:0 0 16px rgba(184,255,26,.45) !important;
}
.power i{
  height:28px !important;
  top:-8px !important;
  width:6px !important;
  background:#fff !important;
  box-shadow:0 0 14px rgba(255,255,255,.65);
}
.msg{
  bottom:84px !important;
  border-color:rgba(184,255,26,.2) !important;
  background:rgba(3,5,14,.72) !important;
  backdrop-filter:blur(14px);
  box-shadow:0 16px 40px rgba(0,0,0,.28);
}
.msg strong{
  color:#fff;
  letter-spacing:-.02em;
}
.msg span{
  color:rgba(255,255,255,.7) !important;
}
.end{
  background:
    radial-gradient(circle at 50% 18%, rgba(184,255,26,.24), transparent 34%),
    rgba(0,0,0,.86) !important;
  backdrop-filter:blur(10px);
}
.end h2{
  color:#fff;
  text-shadow:0 0 24px rgba(184,255,26,.18);
}
.end p{
  color:#b8ff1a !important;
}
@media(max-width:520px){
  .skill{
    height:62px !important;
    grid-template-columns:52px 1fr 82px !important;
  }
  .msg{
    left:12px !important;
    right:12px !important;
    bottom:82px !important;
  }
}


/* FanKix V14.1 KIX Drift Dash additions */
.navgrid{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
.navgrid button:nth-child(2){
  background:
    radial-gradient(circle at 78% 12%, rgba(184,255,26,.28), transparent 34%),
    linear-gradient(135deg, rgba(255,111,45,.22), rgba(184,255,26,.10)),
    rgba(255,255,255,.065) !important;
  border-color:rgba(184,255,26,.22) !important;
}
.game .scorebar span:nth-child(2)::before{
  content:'';
}
@media(max-width:520px){
  .navgrid{
    grid-template-columns:1fr !important;
  }
}


/* FanKix V14.1.1 forced KIX Drift Dash card */
.fk-v135-game-drift-forced{
  border-color:rgba(184,255,26,.34) !important;
  background:
    radial-gradient(circle at 82% 8%, rgba(184,255,26,.22), transparent 30%),
    linear-gradient(135deg, rgba(255,111,45,.15), rgba(184,255,26,.08)),
    rgba(255,255,255,.06) !important;
}
.fk-v135-game-drift-forced .fk-v135-game-tag{
  background:#b8ff1a !important;
  color:#06110b !important;
  box-shadow:0 0 20px rgba(184,255,26,.24);
}
.fk-v135-game-drift-forced h3::after{
  content:"  🏎️";
}


/* FanKix V14.2 — uploaded HD Drift Dash integration */
.drift-hd-frame{
  width:100%;
  height:calc(100% - 66px - 46px);
  border:0;
  background:#050608;
  display:block;
  flex:1 1 auto;
}
.game.is-drift-hd{
  background:#050608 !important;
}
.game.is-drift-hd #pitch,
.game.is-drift-hd .skill{
  display:none !important;
}
.game.is-drift-hd .drift-hd-frame{
  display:block !important;
}
.game.is-drift-hd .msg{
  bottom:14px !important;
  left:14px !important;
  right:14px !important;
  opacity:.94;
}
.game.is-drift-hd .end{
  z-index:50;
}


/* FanKix V14.2.1 — Desktop fullscreen game optimization */
@media (min-width: 900px){
  .app{
    padding:28px;
    place-items:center;
  }

  .phone{
    width:min(1180px, calc(100vw - 56px));
    height:min(900px, calc(100dvh - 56px));
    border-radius:36px;
  }

  .screen{
    padding:22px 22px 34px;
  }

  .hub{
    display:grid;
    grid-template-columns:minmax(360px, 1.15fr) minmax(360px, .85fr);
    grid-auto-rows:max-content;
    gap:16px;
    align-content:start;
  }

  .hub .hero,
  .hub .pass-shop{
    grid-column:1;
  }

  .hub .wallet,
  .hub .profile,
  .hub .country-card,
  .hub .daily,
  .hub .navgrid{
    grid-column:2;
  }

  .hub .wallet{margin-top:0;}
  .hub .profile,.hub .country-card,.hub .daily,.hub .navgrid{margin-top:0;}
  .hub .hero{min-height:330px;display:grid;align-content:center;}
  .hub .hero h1{font-size:70px;}
  .hub .navgrid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .pass-grid{grid-template-columns:repeat(2,minmax(0,1fr));}

  body.fk-game-active .app,
  html.fk-game-direct .app{
    padding:0;
    display:block;
    min-height:100dvh;
  }

  body.fk-game-active .phone,
  html.fk-game-direct .phone{
    width:100vw;
    height:100dvh;
    max-width:none;
    border:0;
    border-radius:0;
    box-shadow:none;
    background:#050608;
  }

  body.fk-game-active .topbar,
  html.fk-game-direct .topbar{
    display:none;
  }

  body.fk-game-active .screen.game,
  html.fk-game-direct .screen.game{
    top:0;
    bottom:0;
    height:100dvh;
    padding:0;
  }

  body.fk-game-active .game .subtop,
  html.fk-game-direct .game .subtop{
    height:76px;
    padding:0 30px;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:16px;
    align-items:center;
    background:linear-gradient(180deg,rgba(5,7,14,.96),rgba(5,7,14,.74)) !important;
    border-bottom:1px solid rgba(184,255,26,.18) !important;
    box-shadow:0 12px 40px rgba(0,0,0,.28);
    z-index:5;
  }

  body.fk-game-active .game .subtop button,
  html.fk-game-direct .game .subtop button{
    min-height:42px;
    padding:0 18px;
    border-radius:999px;
  }

  body.fk-game-active .game .subtop b,
  html.fk-game-direct .game .subtop b{
    font-size:22px;
    line-height:1;
  }

  body.fk-game-active .game .subtop small,
  html.fk-game-direct .game .subtop small{
    margin-top:5px;
    font-size:11px;
    letter-spacing:.11em;
  }

  body.fk-game-active .game.is-drift-hd .scorebar,
  html.fk-game-direct .game.is-drift-hd .scorebar{
    position:absolute;
    top:16px;
    right:30px;
    width:min(420px, 34vw);
    height:44px !important;
    border-radius:999px;
    overflow:hidden;
    z-index:6;
    border:1px solid rgba(184,255,26,.18);
    background:rgba(0,0,0,.54) !important;
    backdrop-filter:blur(14px);
  }

  body.fk-game-active .game.is-drift-hd .scorebar span,
  html.fk-game-direct .game.is-drift-hd .scorebar span{
    font-size:10px;
  }

  body.fk-game-active .game.is-drift-hd .scorebar b,
  html.fk-game-direct .game.is-drift-hd .scorebar b{
    font-size:14px !important;
  }

  body.fk-game-active .game.is-drift-hd .drift-hd-frame,
  html.fk-game-direct .game.is-drift-hd .drift-hd-frame{
    flex:1 1 auto;
    min-height:0;
    height:auto !important;
  }

  body.fk-game-active .game:not(.is-drift-hd) #pitch,
  html.fk-game-direct .game:not(.is-drift-hd) #pitch{
    height:calc(100dvh - 76px - 48px - 70px);
  }

  body.fk-game-active .game:not(.is-drift-hd) .skill,
  html.fk-game-direct .game:not(.is-drift-hd) .skill{
    height:70px !important;
    padding:0 30px;
  }

  body.fk-game-active .game:not(.is-drift-hd) .msg,
  html.fk-game-direct .game:not(.is-drift-hd) .msg{
    left:50%;
    right:auto;
    width:min(620px, calc(100vw - 64px));
    transform:translateX(-50%);
  }
}

@media (min-width: 1180px){
  body.fk-game-active .game.is-drift-hd .subtop,
  html.fk-game-direct .game.is-drift-hd .subtop{
    padding-left:42px;
    padding-right:42px;
  }

  body.fk-game-active .game.is-drift-hd .scorebar,
  html.fk-game-direct .game.is-drift-hd .scorebar{
    right:42px;
    width:450px;
  }
}

@media (min-width: 900px) and (max-width: 1060px){
  body.fk-game-active .game.is-drift-hd .scorebar,
  html.fk-game-direct .game.is-drift-hd .scorebar{
    width:340px;
    right:20px;
  }

  body.fk-game-active .game .subtop,
  html.fk-game-direct .game .subtop{
    padding:0 20px;
  }
}

/* FanKix V14.2.2 — Mobile gameplay space + unified navy arcade game shell */
:root{
  --fk-shell-topbar:64px;
  --fk-arcade-navy:#07134d;
  --fk-arcade-navy-deep:#050d31;
  --fk-arcade-lime:#b8ff1a;
}

.topbar{
  height:var(--fk-shell-topbar) !important;
  gap:12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(184,255,26,.16), transparent 34%),
    linear-gradient(180deg, var(--fk-arcade-navy) 0%, var(--fk-arcade-navy-deep) 100%) !important;
  border-bottom:1px solid rgba(184,255,26,.18) !important;
  box-shadow:0 12px 34px rgba(0,0,0,.28);
}

.topbar-game{
  display:none;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}

.topbar-back{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.10);
  color:#fff;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  font-weight:1000;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}

.topbar-back:hover{
  border-color:rgba(184,255,26,.38);
  background:rgba(184,255,26,.12);
}

.topbar-game-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.topbar-game-copy b,
.topbar-game-copy small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.topbar-game-copy b{
  font-size:18px;
  line-height:1;
  font-weight:1000;
  letter-spacing:-.04em;
}

.topbar-game-copy small{
  color:var(--fk-arcade-lime);
  font-size:11px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:.04em;
  text-transform:uppercase;
}

body.fk-game-active .topbar,
html.fk-game-direct .topbar{
  position:relative;
  z-index:30;
  display:flex !important;
  align-items:center;
}

body.fk-game-active .topbar-game,
html.fk-game-direct .topbar-game{
  display:flex;
}

body.fk-game-active .screen.game,
html.fk-game-direct .screen.game{
  top:var(--fk-shell-topbar) !important;
  bottom:0 !important;
  height:calc(100dvh - var(--fk-shell-topbar)) !important;
  min-height:0;
  padding:0 !important;
  overflow:hidden;
}

body.fk-game-active .game,
html.fk-game-direct .game{
  min-height:0;
  height:100%;
}

body.fk-game-active .game .subtop,
html.fk-game-direct .game .subtop,
body.fk-game-active .scorebar,
html.fk-game-direct .scorebar{
  display:none !important;
}

body.fk-game-active .game:not(.is-drift-hd) #pitch,
html.fk-game-direct .game:not(.is-drift-hd) #pitch{
  width:100%;
  height:calc(100% - 56px) !important;
  flex:1 1 auto;
}

body.fk-game-active .skill,
html.fk-game-direct .skill{
  height:56px !important;
  padding:0 14px;
  grid-template-columns:54px minmax(0,1fr) 74px !important;
  background:rgba(3,6,18,.78) !important;
  border-top:1px solid rgba(184,255,26,.14) !important;
  backdrop-filter:blur(12px);
}

body.fk-game-active .skill span,
body.fk-game-active .skill b,
html.fk-game-direct .skill span,
html.fk-game-direct .skill b{
  font-size:11px !important;
  letter-spacing:.08em;
}

body.fk-game-active .power,
html.fk-game-direct .power{
  height:13px;
}

body.fk-game-active .msg,
html.fk-game-direct .msg{
  display:none;
}

body.fk-game-active .msg.fk-toast-pop,
html.fk-game-direct .msg.fk-toast-pop{
  display:block;
  left:50% !important;
  right:auto !important;
  bottom:72px !important;
  width:min(420px, calc(100vw - 28px));
  transform:translateX(-50%);
  padding:11px 14px;
  border-radius:18px;
  background:rgba(3,6,18,.76) !important;
  border:1px solid rgba(184,255,26,.18) !important;
  box-shadow:0 18px 45px rgba(0,0,0,.34);
  backdrop-filter:blur(14px);
  z-index:45;
}

body.fk-game-active .game.is-drift-hd .drift-hd-frame,
html.fk-game-direct .game.is-drift-hd .drift-hd-frame{
  height:100% !important;
  min-height:0;
  flex:1 1 auto;
}

body.fk-game-active .game.is-drift-hd .msg.fk-toast-pop,
html.fk-game-direct .game.is-drift-hd .msg.fk-toast-pop{
  bottom:16px !important;
}

@media (min-width:900px){
  :root{--fk-shell-topbar:68px;}

  body.fk-game-active .app,
  html.fk-game-direct .app{
    padding:0 !important;
    display:block !important;
    min-height:100dvh;
  }

  body.fk-game-active .phone,
  html.fk-game-direct .phone{
    width:100vw !important;
    height:100dvh !important;
    max-width:none !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:#050608 !important;
  }

  body.fk-game-active .topbar,
  html.fk-game-direct .topbar{
    height:var(--fk-shell-topbar) !important;
    padding:0 34px !important;
  }

  body.fk-game-active .brand,
  html.fk-game-direct .brand{
    flex:0 0 auto;
  }

  body.fk-game-active .topbar-game-copy b,
  html.fk-game-direct .topbar-game-copy b{
    font-size:21px;
  }

  body.fk-game-active .topbar-game-copy small,
  html.fk-game-direct .topbar-game-copy small{
    font-size:11px;
    letter-spacing:.12em;
  }

  body.fk-game-active .pill,
  html.fk-game-direct .pill{
    min-width:150px;
    text-align:center;
  }

  body.fk-game-active .game:not(.is-drift-hd) #pitch,
  html.fk-game-direct .game:not(.is-drift-hd) #pitch{
    height:calc(100% - 66px) !important;
  }

  body.fk-game-active .skill,
  html.fk-game-direct .skill{
    height:66px !important;
    padding:0 32px;
    grid-template-columns:70px minmax(0,1fr) 96px !important;
  }
}

@media (max-width:680px){
  :root{--fk-shell-topbar:58px;}

  .topbar{
    padding:0 10px !important;
  }

  body.fk-game-active .brand,
  html.fk-game-direct .brand{
    display:none;
  }

  .topbar-game{
    gap:8px;
  }

  .topbar-back{
    min-height:36px;
    padding:0 12px;
    font-size:12px;
  }

  .topbar-game-copy b{
    font-size:15px;
  }

  .topbar-game-copy small{
    font-size:9px;
    letter-spacing:.055em;
  }

  body.fk-game-active .pill,
  html.fk-game-direct .pill{
    flex:0 0 auto;
    max-width:96px;
    padding:7px 8px;
    font-size:9.5px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body.fk-game-active .game:not(.is-drift-hd) #pitch,
  html.fk-game-direct .game:not(.is-drift-hd) #pitch{
    height:calc(100% - 52px) !important;
  }

  body.fk-game-active .skill,
  html.fk-game-direct .skill{
    height:52px !important;
    padding:0 10px;
    grid-template-columns:48px minmax(0,1fr) 62px !important;
    gap:8px;
  }

  body.fk-game-active .skill span,
  body.fk-game-active .skill b,
  html.fk-game-direct .skill span,
  html.fk-game-direct .skill b{
    font-size:10px !important;
  }

  body.fk-game-active .msg.fk-toast-pop,
  html.fk-game-direct .msg.fk-toast-pop{
    bottom:60px !important;
    font-size:12px;
  }
}

@media (max-width:380px){
  body.fk-game-active .pill,
  html.fk-game-direct .pill{
    max-width:78px;
  }

  .topbar-back{
    padding:0 10px;
  }

  .topbar-game-copy b{
    font-size:14px;
  }
}

/* V14.2.2 hotfix: games should use the full device viewport on mobile too. */
body.fk-game-active .app,
html.fk-game-direct .app{
  padding:0 !important;
  display:block !important;
  min-height:100dvh;
  place-items:stretch !important;
}

body.fk-game-active .phone,
html.fk-game-direct .phone{
  width:100vw !important;
  height:100dvh !important;
  max-width:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#050608 !important;
}


/* FanKix V14.2.3 — Intro title + logo corner polish */
.brand span{
  border-radius:10px !important;
}


/* FanKix V14.4.15.1 — Jungle Surge integration */
.block-blitz-frame{
  width:100%;
  height:100%;
  min-height:0;
  border:0;
  background:#05070a;
  display:block;
  flex:1 1 auto;
}
.game.is-block-blitz{
  background:#05070a !important;
}
.game.is-block-blitz #pitch,
.game.is-block-blitz .drift-hd-frame,
.game.is-block-blitz .skill{
  display:none !important;
}
.game.is-block-blitz .block-blitz-frame{
  display:block !important;
}
.game.is-block-blitz .msg{
  bottom:14px !important;
  left:14px !important;
  right:14px !important;
  opacity:.94;
}
.game.is-block-blitz .end{
  z-index:60;
}

/* Slime Rush frame — same full-bleed iframe treatment as the other games. */
.slime-rush-frame{
  width:100%;
  height:100%;
  min-height:0;
  border:0;
  background:#120725;
  display:block;
  flex:1 1 auto;
}
.game.is-slime-rush{
  background:#120725 !important;
}
.game.is-slime-rush #pitch,
.game.is-slime-rush .drift-hd-frame,
.game.is-slime-rush .block-blitz-frame,
.game.is-slime-rush .skill{
  display:none !important;
}
.game.is-slime-rush .slime-rush-frame{
  display:block !important;
}
.game.is-slime-rush .msg{
  bottom:14px !important;
  left:14px !important;
  right:14px !important;
  opacity:.94;
}
.game.is-slime-rush .end{
  z-index:60;
}
@media (min-width: 900px){
  body.fk-game-active .game.is-slime-rush .slime-rush-frame,
  html.fk-game-direct .game.is-slime-rush .slime-rush-frame,
  body.fk-desktop-play-stage .game .slime-rush-frame{
    width:100% !important;
    height:100% !important;
    max-height:100% !important;
    border-radius:0 !important;
    border:0 !important;
    box-shadow:none !important;
    overflow:hidden !important;
    align-self:stretch !important;
    flex:1 1 auto !important;
  }
}
@media (max-width: 899px){
  body.fk-game-active .game.is-slime-rush .slime-rush-frame,
  html.fk-game-direct .game.is-slime-rush .slime-rush-frame{
    height:100% !important;
    width:100% !important;
    border-radius:0 !important;
  }
}

@media (min-width: 900px){
  body.fk-game-active .game.is-block-blitz,
  html.fk-game-direct .game.is-block-blitz{
    display:flex !important;
    align-items:stretch;
    justify-content:stretch;
    padding:0;
    background:
      linear-gradient(90deg, rgba(184,255,26,.08), transparent 24%, transparent 76%, rgba(24,244,223,.07)),
      linear-gradient(180deg,#07134d 0%, #061225 52%, #071a11 100%) !important;
  }

  body.fk-game-active .game.is-block-blitz .block-blitz-frame,
  html.fk-game-direct .game.is-block-blitz .block-blitz-frame,
  body.fk-desktop-play-stage .game .block-blitz-frame{
    width:100% !important;
    height:100% !important;
    max-height:100% !important;
    aspect-ratio:auto;
    border-radius:0 !important;
    border:0 !important;
    box-shadow:none !important;
    overflow:hidden !important;
    align-self:stretch !important;
    flex:1 1 auto !important;
  }

  body.fk-desktop-play-stage .game.is-block-blitz .skill{
    display:grid !important;
  }

  body.fk-desktop-play-stage .game.is-block-blitz .skill::after{
    content:"Drag pieces onto the board. Clear full rows and columns. Combos and perfect clears raise your KIX tier.";
    color:rgba(255,255,255,.66);
    font-size:14px;
    line-height:1.45;
    font-weight:750;
  }
}

@media (max-width: 899px){
  body.fk-game-active .game.is-block-blitz .block-blitz-frame,
  html.fk-game-direct .game.is-block-blitz .block-blitz-frame,
  body.fk-desktop-play-stage .block-blitz-frame{
    height:100% !important;
    width:100% !important;
    border-radius:0 !important;
  }
}


/* FanKix V14.4.15.1 — Jungle Surge rename/skin */
.game.is-block-blitz .block-blitz-frame{
  background:#071a3d;
}


/* FanKix V14.4.15 — paid gamepasses removed */
.pass-shop,
.pass-grid,
.pass-card{
  display:none !important;
}


/* FanKix V14.4.23 AdSense-ready ad placements */
.fk-ad-rail {
  position: fixed;
  top: 96px;
  bottom: 26px;
  width: 160px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 5;
}
.fk-ad-rail-left { left: max(18px, calc((100vw - 1180px) / 2 - 178px)); }
.fk-ad-rail-right { right: max(18px, calc((100vw - 1180px) / 2 - 178px)); }
.fk-ad-label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  text-align: center;
  margin-bottom: 8px;
  font-weight: 800;
}
.fk-ad-box {
  width: 160px;
  min-height: 600px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: radial-gradient(circle at 50% 0%, rgba(175,255,30,.10), transparent 34%), rgba(4,10,8,.50);
  box-shadow: 0 18px 44px rgba(0,0,0,.30);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fk-ad-box::before {
  content: "Ad slot";
  color: rgba(255,255,255,.32);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fk-ads-live .fk-ad-box::before, .fk-ad-box.fk-ads-live::before { content: ""; }
.fk-ad-slot {
  display: none;
  width: min(100%, 728px);
  margin: 18px auto 0;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  position: relative;
  z-index: 8;
}
.fk-ad-box-game-over, .fk-ad-box-lower-hub {
  width: 100%;
  min-height: 90px;
}
.fk-ad-slot-game-over {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: 728px;
}
.fk-ad-slot-lower-hub {
  max-width: 900px;
  margin: 22px auto;
}
@media (min-width: 1320px) {
  .game-active .fk-ad-rail { display: flex; flex-direction: column; }
}
@media (max-width: 1319px) {
  .fk-ad-rail { display: none !important; }
}
@media (max-width: 720px) {
  .fk-ad-slot {
    width: calc(100% - 24px);
    min-height: 88px;
    padding: 8px;
    border-radius: 16px;
  }
  .fk-ad-slot-game-over {
    bottom: 10px;
    max-width: calc(100% - 20px);
  }
  .fk-ad-box-game-over, .fk-ad-box-lower-hub { min-height: 80px; }
}


/* FanKix V14.4.26 — Mobile iframe game loading/stage fix */
.drift-hd-frame,
.block-blitz-frame {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  contain: layout paint size;
}

@media (max-width: 899px) {
  body.fk-game-active,
  html.fk-game-direct {
    overflow: hidden !important;
    min-height: 100dvh !important;
  }

  body.fk-game-active .app,
  html.fk-game-direct .app {
    min-height: 100dvh !important;
  }

  body.fk-game-active .phone,
  html.fk-game-direct .phone {
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.fk-game-active .screen.game,
  html.fk-game-direct .screen.game {
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body.fk-game-active .game.is-drift-hd .subtop,
  body.fk-game-active .game.is-block-blitz .subtop,
  html.fk-game-direct .game.is-drift-hd .subtop,
  html.fk-game-direct .game.is-block-blitz .subtop {
    flex: 0 0 auto !important;
  }

  body.fk-game-active .game.is-drift-hd .scorebar,
  body.fk-game-active .game.is-block-blitz .scorebar,
  html.fk-game-direct .game.is-drift-hd .scorebar,
  html.fk-game-direct .game.is-block-blitz .scorebar {
    flex: 0 0 auto !important;
  }

  body.fk-game-active .game.is-drift-hd .drift-hd-frame,
  body.fk-game-active .game.is-block-blitz .block-blitz-frame,
  html.fk-game-direct .game.is-drift-hd .drift-hd-frame,
  html.fk-game-direct .game.is-block-blitz .block-blitz-frame {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #05070a !important;
  }

  body.fk-game-active .game.is-drift-hd #pitch,
  body.fk-game-active .game.is-block-blitz #pitch,
  html.fk-game-direct .game.is-drift-hd #pitch,
  html.fk-game-direct .game.is-block-blitz #pitch {
    display: none !important;
  }

  body.fk-game-active .game.is-drift-hd .skill,
  body.fk-game-active .game.is-block-blitz .skill,
  html.fk-game-direct .game.is-drift-hd .skill,
  html.fk-game-direct .game.is-block-blitz .skill {
    display: none !important;
  }
}
