/* R40R42R1_MOBILE_FIRST_RUN_TAP_FIX */
#sk-r40r42-root,
#sk-r40r42-root *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
#sk-r40r42-root{position:fixed;inset:0;z-index:2147483647!important;pointer-events:none;font-family:Arial,Helvetica,sans-serif;color:#fff}
.sk-r40r42-hidden{display:none!important}
.sk-r40r42-modal{position:fixed;inset:0;z-index:2147483647!important;display:flex;align-items:center;justify-content:center;padding:18px;background:radial-gradient(circle at 50% 18%,rgba(59,130,246,.22),rgba(0,0,0,.82) 54%,rgba(0,0,0,.90));pointer-events:auto;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.sk-r40r42-panel{width:min(760px,calc(100vw - 28px));max-height:min(88vh,760px);overflow:auto;border:2px solid rgba(251,191,36,.86);border-radius:22px;padding:22px 22px 18px;background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(2,6,23,.98));box-shadow:0 22px 80px rgba(0,0,0,.74),0 0 36px rgba(251,191,36,.18)}
.sk-r40r42-title{margin:0 0 10px;font-size:clamp(27px,5vw,46px);line-height:1.05;font-weight:1000;letter-spacing:.02em;text-align:center;color:#fbbf24;text-shadow:0 0 18px rgba(251,191,36,.46)}
.sk-r40r42-subtitle{margin:0 auto 16px;max-width:620px;text-align:center;color:#e5e7eb;font-size:clamp(16px,3.2vw,21px);line-height:1.35;font-weight:800}
.sk-r40r42-list{margin:12px auto 18px;padding:0;display:grid;gap:9px;max-width:650px;list-style:none}
.sk-r40r42-list li{padding:10px 12px;border:1px solid rgba(148,163,184,.24);border-radius:14px;background:rgba(15,23,42,.68);font-size:clamp(14px,2.6vw,18px);line-height:1.35;color:#dbeafe}
.sk-r40r42-list strong{color:#fff}
.sk-r40r42-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:16px}
.sk-r40r42-btn{appearance:none;border:none;border-radius:16px;padding:13px 17px;min-height:50px;min-width:150px;font-size:clamp(14px,2.7vw,18px);font-weight:1000;letter-spacing:.02em;color:#fff;background:linear-gradient(180deg,#2563eb,#1d4ed8);box-shadow:0 8px 24px rgba(37,99,235,.35);cursor:pointer;touch-action:manipulation}
.sk-r40r42-btn:focus{outline:3px solid rgba(251,191,36,.9);outline-offset:2px}
.sk-r40r42-btn:hover{filter:brightness(1.08)}
.sk-r40r42-btn:active{transform:translateY(1px) scale(.99)}
.sk-r40r42-btn.gold{background:linear-gradient(180deg,#f59e0b,#b45309);box-shadow:0 8px 24px rgba(245,158,11,.32);color:#111827}
.sk-r40r42-btn.green{background:linear-gradient(180deg,#22c55e,#15803d);box-shadow:0 8px 24px rgba(34,197,94,.28)}
.sk-r40r42-btn.gray{background:linear-gradient(180deg,#475569,#1e293b);box-shadow:0 8px 24px rgba(15,23,42,.35)}
.sk-r40r42-quickbar{position:fixed;left:14px;bottom:14px;display:flex;gap:8px;pointer-events:auto;z-index:2147481995;transition:opacity .18s ease,transform .18s ease}.sk-r40r42-quickbar.sk-r40r42-in-fight{opacity:.18;transform:translateY(8px);pointer-events:none}.sk-r40r42-quickbar button{border:1px solid rgba(251,191,36,.72);border-radius:14px;padding:10px 13px;background:rgba(2,6,23,.82);color:#fef3c7;font-weight:1000;font-size:13px;box-shadow:0 8px 28px rgba(0,0,0,.5);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.sk-r40r42-toast{position:fixed;left:50%;top:82px;transform:translateX(-50%);max-width:min(720px,calc(100vw - 28px));padding:13px 18px;border:1px solid rgba(96,165,250,.85);border-radius:16px;background:rgba(2,6,23,.88);color:#fff;font-weight:900;font-size:clamp(14px,2.7vw,18px);line-height:1.3;text-align:center;pointer-events:none;box-shadow:0 12px 40px rgba(0,0,0,.6),0 0 24px rgba(96,165,250,.22)}
.sk-r40r42-coach{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);width:min(760px,calc(100vw - 28px));padding:14px 18px;border:2px solid rgba(96,165,250,.72);border-radius:18px;background:linear-gradient(180deg,rgba(15,23,42,.94),rgba(2,6,23,.96));box-shadow:0 16px 60px rgba(0,0,0,.72),0 0 30px rgba(96,165,250,.18);pointer-events:auto}.sk-r40r42-coach-title{font-weight:1000;color:#fbbf24;font-size:clamp(16px,3.4vw,22px);margin-bottom:4px}.sk-r40r42-coach-text{font-weight:900;color:#e5e7eb;font-size:clamp(14px,2.8vw,18px);line-height:1.32}.sk-r40r42-progress{margin-top:10px;height:7px;border-radius:999px;overflow:hidden;background:rgba(148,163,184,.24)}.sk-r40r42-progress>i{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#fbbf24);width:0%}.sk-r40r42-small{margin-top:8px;color:#94a3b8;font-size:12px;font-weight:800;text-align:center}.sk-r40r42-kbd{display:inline-block;padding:2px 7px;border:1px solid rgba(255,255,255,.35);border-radius:7px;background:rgba(15,23,42,.76);color:#fff;font-weight:1000;margin:0 2px;white-space:nowrap}
.sk-r40r42-fighttip{position:fixed;right:14px;top:74px;width:min(360px,calc(100vw - 28px));padding:12px 14px;border:1px solid rgba(34,197,94,.8);border-radius:15px;background:rgba(2,6,23,.84);box-shadow:0 12px 45px rgba(0,0,0,.55),0 0 20px rgba(34,197,94,.20);font-weight:900;font-size:15px;line-height:1.28;pointer-events:none;animation:skR40R42TipIn .25s ease both}
@keyframes skR40R42TipIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}
.sk-r40r42-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
@media(max-width:640px){.sk-r40r42-panel{padding:18px 14px 14px;border-radius:20px}.sk-r40r42-actions{gap:8px}.sk-r40r42-btn{min-width:calc(50% - 6px);padding:12px 10px}.sk-r40r42-quickbar{left:8px;bottom:8px}.sk-r40r42-quickbar button{font-size:12px;padding:9px 10px}.sk-r40r42-fighttip{top:58px;right:8px}.sk-r40r42-coach{bottom:10px}}
body.sk-r40r42-modal-open canvas#gc{filter:saturate(.9) brightness(.72)}

/* R40R42R1 mobile tap hardening */
#sk-r40r42-root .sk-r40r42-modal,#sk-r40r42-root .sk-r40r42-panel,#sk-r40r42-root [data-sk-action],#sk-r40r42-root [data-key]{pointer-events:auto!important;touch-action:manipulation!important;-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}
#sk-r40r42-root .sk-r40r42-btn,#sk-r40r42-root .sk-r40r42-quickbar button{position:relative!important;z-index:2147483647!important;pointer-events:auto!important;touch-action:manipulation!important;min-height:48px}
#sk-r40r42-root .sk-r40r42-panel{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}


/* R40R53_MOBILE_LANDSCAPE_TUTORIAL_QUICKBAR_SAFE
   WebView/fullscreen landscape-safe first-run tutorial. UI-only. */
@media (orientation:landscape) and (max-height:520px){
  #sk-r40r42-root .sk-r40r42-modal{align-items:stretch;justify-content:center;padding:8px calc(10px + env(safe-area-inset-right)) 8px calc(10px + env(safe-area-inset-left));}
  #sk-r40r42-root .sk-r40r42-panel{width:min(980px,calc(100vw - 20px));max-height:calc(100dvh - 16px);display:flex;flex-direction:column;overflow-y:auto;border-radius:14px;padding:10px 12px 8px;}
  #sk-r40r42-root .sk-r40r42-title{margin-bottom:4px;font-size:clamp(17px,5.2vh,25px);line-height:1.0;}
  #sk-r40r42-root .sk-r40r42-subtitle{margin-bottom:7px;font-size:clamp(11px,3.2vh,15px);line-height:1.22;max-width:820px;}
  #sk-r40r42-root .sk-r40r42-list{gap:5px;margin:5px auto 7px;max-width:900px;grid-template-columns:repeat(3,minmax(0,1fr));}
  #sk-r40r42-root .sk-r40r42-list li{padding:7px 8px;border-radius:10px;font-size:clamp(10px,2.65vh,13px);line-height:1.18;}
  #sk-r40r42-root .sk-r40r42-actions{position:sticky;bottom:0;z-index:2147483647;margin-top:7px;padding-top:7px;background:linear-gradient(180deg,rgba(2,6,23,0),rgba(2,6,23,.97) 34%,rgba(2,6,23,.99));}
  #sk-r40r42-root .sk-r40r42-btn{min-height:48px;min-width:132px;padding:8px 11px;border-radius:12px;font-size:clamp(11px,3vh,14px);}
  #sk-r40r42-root .sk-r40r42-coach{left:calc(10px + env(safe-area-inset-left));right:calc(10px + env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom));transform:none;width:auto;max-height:38dvh;overflow:auto;padding:10px 12px;border-radius:14px;}
  #sk-r40r42-root .sk-r40r42-coach-title{font-size:clamp(13px,3.6vh,18px);}
  #sk-r40r42-root .sk-r40r42-coach-text{font-size:clamp(11px,3vh,14px);line-height:1.18;}
  #sk-r40r42-root .sk-r40r42-small{font-size:10px;line-height:1.15;}
}
#sk-r40r42-emergency-skip{
  position:fixed;
  right:calc(10px + env(safe-area-inset-right));
  bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:2147483647!important;
  min-height:48px;
  min-width:118px;
  border:2px solid rgba(255,255,255,.78);
  border-radius:14px;
  background:linear-gradient(180deg,#475569,#0f172a);
  color:#f8fafc;
  font:1000 13px Arial,Helvetica,sans-serif;
  letter-spacing:.02em;
  box-shadow:0 10px 30px rgba(0,0,0,.62),0 0 18px rgba(96,165,250,.22);
  pointer-events:auto!important;
  touch-action:manipulation!important;
}
#sk-r40r42-emergency-skip.sk-r40r42-hidden{display:none!important}
@media (orientation:landscape) and (max-height:520px){
  #sk-r40r42-emergency-skip{right:calc(8px + env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));min-height:48px;min-width:104px;border-radius:12px;font-size:12px;}
  #sk-r40r42-root .sk-r40r42-coach .sk-r40r42-actions{padding-right:112px;}
}
@supports not (height: 100dvh){
  @media (orientation:landscape) and (max-height:520px){
    #sk-r40r42-root .sk-r40r42-panel{max-height:calc(100vh - 16px);}
    #sk-r40r42-root .sk-r40r42-coach{max-height:38vh;}
  }
}


/* R40R53_MOBILE_LANDSCAPE_TUTORIAL_QUICKBAR_SAFE
   The help/tutorial quickbar was covering mobile landscape UI tiles such as combo/TAB and SELECT back.
   In compact landscape it is hidden by JS/CSS; help remains available via F1/H on desktop and via the first-run modal/tutorial flow.
   The emergency tutorial skip button is moved away from the bottom controls in compact landscape. */
#sk-r40r42-root .sk-r40r53-hide-compact-quickbar{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;}
@media (orientation:landscape) and (max-height:560px){
  #sk-r40r42-root .sk-r40r42-quickbar{left:auto;right:auto;bottom:auto;}
  #sk-r40r42-root .sk-r40r42-quickbar.sk-r40r53-hide-compact-quickbar{display:none!important;}
  #sk-r40r42-emergency-skip{
    left:50%;right:auto;top:calc(8px + env(safe-area-inset-top));bottom:auto;
    transform:translateX(-50%);
    min-height:48px;min-width:102px;border-radius:12px;font-size:12px;
  }
  #sk-r40r42-root .sk-r40r42-coach .sk-r40r42-actions{padding-right:0;padding-top:4px;}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:620px){
  #sk-r40r42-root .sk-r40r42-quickbar.sk-r40r53-hide-compact-quickbar{display:none!important;}
}

/* R40R67B55: every interactive tutorial target keeps a 48 x 48 CSS-pixel
   hit area in short landscape, including browser landscape without fullscreen. */
@media (orientation:landscape) and (max-height:620px){
  #sk-r40r42-root button,
  #sk-r40r42-emergency-skip{
    min-width:48px!important;
    min-height:48px!important;
  }
}


/* R40R54_MOBILE_LANDSCAPE_TUTORIAL_HINT_LAYER_AND_FIGHT_INTRO_IDENTITY_FIX
   Fight-training tutorial hints must never own the top layer over Android/WebView landscape controls.
   Modals and emergency skip stay topmost; passive hints/coaches are smaller and below #mobileControls. */
#sk-r40r42-root{z-index:auto!important;}
#sk-r40r42-root .sk-r40r42-modal{z-index:2147483647!important;}
#sk-r40r42-emergency-skip{z-index:2147483647!important;}
#sk-r40r42-root .sk-r40r42-toast{z-index:29900!important;}
#sk-r40r42-root .sk-r40r42-coach,
#sk-r40r42-root .sk-r40r42-fighttip{z-index:25000!important;}
@media (pointer:coarse) and (orientation:landscape) and (max-height:620px){
  #sk-r40r42-root .sk-r40r42-coach,
  #sk-r40r42-root .sk-r40r42-fighttip{
    pointer-events:none!important;
    opacity:.86;
    border-width:1px!important;
    box-shadow:0 8px 28px rgba(0,0,0,.48),0 0 14px rgba(96,165,250,.14)!important;
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
  }
  #sk-r40r42-root .sk-r40r42-coach{
    left:50%!important;
    right:auto!important;
    bottom:calc(10px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:min(430px,42vw)!important;
    max-height:26dvh!important;
    overflow:hidden!important;
    padding:7px 10px!important;
    border-radius:12px!important;
  }
  #sk-r40r42-root .sk-r40r42-coach-title{font-size:clamp(11px,3.0vh,14px)!important;margin-bottom:2px!important;}
  #sk-r40r42-root .sk-r40r42-coach-text{font-size:clamp(10px,2.55vh,12px)!important;line-height:1.12!important;}
  #sk-r40r42-root .sk-r40r42-progress{height:4px!important;margin-top:5px!important;}
  #sk-r40r42-root .sk-r40r42-small{display:none!important;}
  #sk-r40r42-root .sk-r40r42-coach .sk-r40r42-actions{display:none!important;}
  #sk-r40r42-root .sk-r40r42-fighttip{
    left:50%!important;
    right:auto!important;
    top:calc(78px + env(safe-area-inset-top))!important;
    transform:translateX(-50%)!important;
    width:min(390px,42vw)!important;
    padding:7px 10px!important;
    border-radius:11px!important;
    font-size:clamp(10px,2.55vh,12px)!important;
    line-height:1.12!important;
  }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:430px){
  #sk-r40r42-root .sk-r40r42-coach{width:min(360px,36vw)!important;padding:6px 8px!important;}
  #sk-r40r42-root .sk-r40r42-coach-title{font-size:11px!important;}
  #sk-r40r42-root .sk-r40r42-coach-text{font-size:10px!important;}
  #sk-r40r42-root .sk-r40r42-fighttip{width:min(340px,36vw)!important;font-size:10px!important;}
}


/* R40R57_FIRST_RUN_MODAL_TOP_TRAINING_HINTS_UNDER_TOUCH_UI_FIX
   Regression fix: R40R54 lowered the whole tutorial root, which put the first-run modal behind main menu.
   Correct layering: first-run/help modal is topmost; passive fight-training hints stay below mobile touch controls. */
#sk-r40r42-root{position:fixed!important;inset:0!important;z-index:45!important;pointer-events:none!important;}
body.sk-r40r42-modal-open #sk-r40r42-root{z-index:2147483647!important;}
body.sk-r40r42-modal-open #sk-r40r42-root .sk-r40r42-modal{z-index:2147483647!important;pointer-events:auto!important;}
body.sk-r40r42-modal-open #sk-r40r42-root .sk-r40r42-panel{pointer-events:auto!important;}
#sk-r40r42-root .sk-r40r42-quickbar{z-index:46!important;}
#sk-r40r42-root .sk-r40r42-toast{z-index:47!important;}
#sk-r40r42-root .sk-r40r42-coach,
#sk-r40r42-root .sk-r40r42-fighttip{z-index:45!important;}
body.touch-ui-enabled #mobileControls{z-index:50!important;}
body.sk-r40r42-modal-open.touch-ui-enabled #mobileControls{z-index:50!important;}
body.sk-r40r42-modal-open #sk-r40r42-emergency-skip{z-index:2147483647!important;}
body:not(.sk-r40r42-modal-open) #sk-r40r42-emergency-skip{z-index:48!important;}
@media (pointer:coarse) and (orientation:landscape) and (max-height:620px){
  body:not(.sk-r40r42-modal-open) #sk-r40r42-root{z-index:45!important;}
  body:not(.sk-r40r42-modal-open) #sk-r40r42-root .sk-r40r42-coach,
  body:not(.sk-r40r42-modal-open) #sk-r40r42-root .sk-r40r42-fighttip{z-index:45!important;pointer-events:none!important;}
  body.touch-ui-enabled #mobileControls{z-index:50!important;}
}


/* R40R67B22 tutorial modal neon restyle */
#sk-r40r42-emergency-skip{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;}
#sk-r40r42-root .sk-r40r42-modal{background:radial-gradient(circle at 50% 14%,rgba(0,229,255,.12),rgba(8,13,27,.86) 46%,rgba(2,4,12,.95))!important;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#sk-r40r42-root .sk-r40r42-panel{border:2px solid rgba(0,229,255,.52)!important;border-radius:24px!important;background:linear-gradient(180deg,rgba(8,16,34,.985),rgba(4,8,20,.985))!important;box-shadow:0 24px 90px rgba(0,0,0,.78),0 0 28px rgba(0,229,255,.16),inset 0 0 0 1px rgba(255,47,143,.12)!important;position:relative;overflow:auto}
#sk-r40r42-root .sk-r40r42-panel::before{content:'';position:absolute;inset:12px;border:1px solid rgba(96,165,250,.18);border-radius:18px;pointer-events:none}
#sk-r40r42-root .sk-r40r42-title{color:#f8fbff!important;text-shadow:0 0 22px rgba(0,229,255,.30)!important}
#sk-r40r42-root .sk-r40r42-subtitle{color:#dbeafe!important}
#sk-r40r42-root .sk-r40r42-list li{border-color:rgba(96,165,250,.22)!important;background:linear-gradient(180deg,rgba(13,22,42,.92),rgba(7,12,26,.92))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 0 0 1px rgba(255,47,143,.05)}
#sk-r40r42-root .sk-r40r42-btn{border:1px solid rgba(255,255,255,.12)!important;border-radius:16px!important;box-shadow:0 10px 28px rgba(0,0,0,.46)!important}
#sk-r40r42-root .sk-r40r42-btn.green{background:linear-gradient(180deg,#22c55e,#15803d)!important}
#sk-r40r42-root .sk-r40r42-btn.gray{background:linear-gradient(180deg,#334155,#0f172a)!important}
#sk-r40r42-root .sk-r40r42-btn.gold{background:linear-gradient(180deg,#fbbf24,#d97706)!important;color:#111827!important;box-shadow:0 0 20px rgba(251,191,36,.18),0 10px 28px rgba(0,0,0,.46)!important}
#sk-r40r42-root .sk-r40r42-actions{padding-top:10px!important}


/* R40R67B24: do not expose MAIN MENU before first-run decision after sprite preload. */
html.r40r67b24-first-run-pending body #pack185UiCanvas,
body.r40r67b24-first-run-pending #pack185UiCanvas,
body.r40r67b24-first-run-pending #pack185MenuSurface,
body.r40r67b24-first-run-pending #pack185QaCanvas{opacity:0!important;visibility:hidden!important;pointer-events:none!important;}
