:root {
  --game-scale: 1;
}

html,
body,
#root,
.game-page {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.game-page {
  position: fixed;
  inset: 0;
  display: block;
  overflow: hidden;
}

.yt-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: #292b2e;
  font: 900 20px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.game-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 482px;
  height: 800px;
  max-width: none;
  transform: translate(-50%, -50%) scale(var(--game-scale));
  transform-origin: center;
  contain: layout paint;
}

.game-shell button {
  touch-action: manipulation;
}

.game-shell button:focus-visible {
  outline: 4px solid #2d7dff;
  outline-offset: 3px;
}

.round-button.hint {
  position: relative;
}

.round-button.hint::after {
  content: "AD";
  position: absolute;
  right: -4px;
  bottom: -3px;
  padding: 2px 4px;
  border: 2px solid #111;
  border-radius: 6px;
  background: #ffd238;
  font: 900 9px/1 Arial, sans-serif;
}

.ad-pause {
  display: none !important;
}

.yt-runtime-paused .game-shell {
  pointer-events: none;
}

.yt-runtime-paused .game-shell *,
.yt-runtime-paused .game-shell *::before,
.yt-runtime-paused .game-shell *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

.panel {
  overflow: hidden;
}

.panel-head {
  position: absolute;
  width: 100%;
}

.map-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 78px 12px 14px;
}

.map-panel .world {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 9px;
}

.map-panel .world h3 {
  margin-bottom: 7px;
  font-size: 14px;
}

.map-panel .level-grid {
  gap: 7px;
}

.map-panel .level-grid button {
  height: 52px;
  font-size: 15px;
}

.map-panel .level-grid button.boss-node {
  font-size: 11px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
