/* One shared button treatment, independent of each game's button defaults. */
body .arcade-howto-button.arcade-howto-button {
  box-sizing: border-box !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto;
  min-width: 44px !important;
  max-width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 14px !important;
  border: 1px solid #8298b780 !important;
  border-radius: 10px !important;
  background: #13243b !important;
  color: #f3f7ff !important;
  font: 700 12px/1.25 system-ui, sans-serif !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  cursor: pointer;
  touch-action: manipulation;
}
body .arcade-howto-button.arcade-howto-button:hover { background: #203d5b !important; border-color: #97d9ff !important; }
.arcade-howto-button:focus-visible { outline: 3px solid #85d6ff; outline-offset: 3px; }
.arcade-howto-button > .arcade-howto-icon { display: inline-grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 13px/1 system-ui, sans-serif; }
.arcade-howto-button > .arcade-howto-label { font: inherit; }
.arcade-howto-compact { margin-inline-start: 6px; flex: 0 0 auto; align-self: center; }
body .arcade-howto-intro.arcade-howto-button { width: 100%; margin-top: 10px; }
body .card-howto-button.arcade-howto-button { width: 100%; margin-top: 8px; }

@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) {
  body .arcade-howto-compact.arcade-howto-button { width: 44px !important; height: 44px !important; padding: 0 !important; margin-inline-start: 0; }
  .arcade-howto-compact > .arcade-howto-label { display: none !important; }
  .mobile-game-info-badge:has(.arcade-howto-button) .mobile-header-left { flex: 1 1 auto; min-width: 0; }
  .mobile-game-info-badge:has(.arcade-howto-button) .mobile-header-right { flex: 0 0 auto; }
  .mobile-game-info-badge:has(.arcade-howto-button) .badge-title { max-width: min(25vw, 140px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body[data-game="pool"] .arcade-howto-floating { position: fixed !important; right: max(8px, env(safe-area-inset-right)) !important; bottom: max(8px, env(safe-area-inset-bottom)) !important; z-index: 2000 !important; }
}
@media (max-width: 380px) {
  .mobile-game-info-badge:has(.arcade-howto-button) .badge-thumb { display: none !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Keep one reachable help action without pushing the launch options below
     the viewport on short phones. */
  .game-shell:has(#mobile-game-info-badge .arcade-howto-compact) .game-intro-overlay .arcade-howto-intro { display: none !important; }
}
.arcade-video-dialog{position:fixed;inset:0;margin:auto;width:min(1200px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:12px;background:#000;color:#fff;overflow:hidden;box-shadow:0 30px 110px #000b}
.arcade-video-dialog::backdrop{background:#03070eea;backdrop-filter:blur(5px)}
.arcade-video-frame{position:relative;display:flex;align-items:center;justify-content:center;background:#000;aspect-ratio:16/9;max-height:calc(100dvh - 24px)}
.arcade-video-frame video{display:block;width:100%;height:100%;max-height:calc(100dvh - 24px);object-fit:contain;background:#000}
.arcade-video-close{position:absolute;right:9px;top:9px;z-index:2;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #ffffff50;border-radius:50%;background:#09111bd9;color:#fff;font:26px/1 system-ui,sans-serif;cursor:pointer}
.arcade-video-close:focus-visible{outline:3px solid #8edcff;outline-offset:2px}.arcade-video-open{overflow:hidden!important}
@media(max-width:650px){.arcade-video-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:8px}.arcade-video-close{width:32px;height:32px;font-size:23px}}
@media(prefers-reduced-motion:reduce){.arcade-video-dialog::backdrop{backdrop-filter:none}}
