.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.tutorialBody {
  width: 100%;
  height: 100%;
  display: flex;
}

.guidedOverlay {
  position: fixed;
  inset: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 2.4vh, 24px);
  padding: clamp(14px, 3vh, 32px);
  box-sizing: border-box;
  overflow: auto;
  pointer-events: none;
}

.softDim {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(19, 60, 70, 0.28), rgba(242, 248, 247, 0.72) 42%, rgba(19, 60, 70, 0.2)),
    rgba(237, 246, 244, 0.7);
  backdrop-filter: blur(3px) saturate(0.72);
  -webkit-backdrop-filter: blur(3px) saturate(0.72);
}

.guidePanel {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: min(480px, calc(100vw - 28px));
  box-sizing: border-box;
  padding: 18px 20px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(19, 60, 70, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(19, 60, 70, 0.24);
  pointer-events: auto;
}

.guidePanel h2 {
  margin: 8px 0 4px;
  color: #133c46;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.guidePanel p {
  margin: 0;
  color: #315861;
  font-size: clamp(0.94rem, 1.6vw, 1.12rem);
  line-height: 1.35;
}

.stepPips {
  display: flex;
  gap: 7px;
}

.stepPip {
  width: 30px;
  height: 7px;
  border-radius: 99px;
  background: rgba(19, 60, 70, 0.18);
}

.stepPipActive {
  background: rgb(55, 171, 200);
}

.guideControls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.fallbackButton {
  min-width: 96px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #133c46;
  color: white;
  font-family: "Lato Bold", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(19, 60, 70, 0.24);
}

.fallbackButton:disabled {
  cursor: default;
  opacity: 0.55;
}

.commandPair {
  display: grid;
  grid-template-columns: min-content 28px min-content;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(55, 171, 200, 0.12);
  border: 1px solid rgba(55, 171, 200, 0.35);
}

.commandIcon {
  width: 48px;
  height: 48px;
}

.commandArrow {
  color: #133c46;
  font-family: "Lato Bold", sans-serif;
  font-size: 1.35rem;
  text-align: center;
}

.practiceDock {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  width: min(1280px, calc(100vw - 28px));
  min-height: 0;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.successDock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.successBadge {
  width: clamp(150px, 18vw, 240px);
  height: clamp(150px, 18vw, 240px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 5px solid rgba(244, 218, 97, 0.94);
  box-shadow: 0 18px 48px rgba(19, 60, 70, 0.24);
  animation: badgePop 0.75s ease-out forwards;
}

.successIcon {
  width: 66%;
  height: 66%;
}

.singleColumnContainer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doubleColumnContainer {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(0, max-content);
  grid-template-areas: "selector game";
  align-items: center;
  justify-content: center;
  column-gap: clamp(18px, 3vw, 36px);
  row-gap: clamp(10px, 2vh, 16px);
  position: relative;
  box-sizing: border-box;
  padding: clamp(12px, 2vh, 18px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(55, 171, 200, 0.22);
  box-shadow: 0 18px 44px rgba(19, 60, 70, 0.18);
  overflow: hidden;
}

.tiltPracticeContainer {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(180px, 260px);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 40px);
  padding: clamp(16px, 3vw, 28px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(55, 171, 200, 0.22);
  box-shadow: 0 18px 44px rgba(19, 60, 70, 0.18);
}

.tiltVisualFocus {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 4px solid rgba(244, 218, 97, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 8px rgba(244, 218, 97, 0.08), 0 0 30px rgba(244, 218, 97, 0.52);
  animation: focusPulse 1.6s ease-in-out infinite;
}

.blocksGif {
  width: min(190px, 34vw);
  max-height: 190px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gaugeContainer {
  display: grid;
  place-items: center;
}

.doubleBlockSelectorContainer {
  grid-area: selector;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, max-content));
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 28px);
}

.gameContainer {
  grid-area: game;
  overflow: hidden;
  border: 3px solid rgba(244, 218, 97, 0.86);
  border-radius: 8px;
  background-color: #94cddc;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.gameContainer :global(#skiing-game-tutorial-container) {
  width: 100%;
  height: 100%;
}

.gameContainer canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.chooseSteeringContainer {
  width: min(1280px, calc(100vw - 40px));
  max-height: calc(100vh - 250px);
  grid-template-columns: minmax(320px, max-content) minmax(420px, 1fr);
  align-items: center;
  overflow: visible;
}

.chooseSteeringGame {
  width: 100% !important;
  height: min(52vh, 560px) !important;
  min-width: 0;
  max-height: 560px;
}

.selectorFocusAnchor,
.targetFocusAnchor {
  border: 4px solid rgba(244, 218, 97, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 8px rgba(244, 218, 97, 0.08), 0 0 30px rgba(244, 218, 97, 0.52);
  animation: focusPulse 1.6s ease-in-out infinite;
}

.selectorFocusAnchor {
  padding: 10px;
}

.targetFocusAnchor {
  width: clamp(260px, 32vw, 420px);
  min-height: clamp(118px, 14vw, 170px);
  display: grid;
  place-items: center;
  padding: 18px 24px;
}

.bareBlockIconFullScreen {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tickIconFullScreen {
  width: clamp(150px, 22vw, 280px);
  height: clamp(150px, 22vw, 280px);
  display: grid;
  grid-template-columns: min-content 1fr;
  justify-content: center;
  align-items: center;
}

.fadeOutAnimation {
  animation: fadeOut 0.72s ease-out forwards;
}

.fadeInAnimation {
  animation: fadeIn 1.5s forwards;
}

.hide {
  display: none;
}

.show {
  display: block;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  10% {
    opacity: 1;
    transform: scale(1.3);
  }
  20% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 1;
  }
}

@keyframes focusPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes badgePop {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1160px) {
  .chooseSteeringContainer {
    width: 100%;
    grid-template-columns: minmax(410px, max-content) minmax(0, 1fr);
    column-gap: 12px;
    padding: 12px;
  }

  .chooseSteeringContainer .doubleBlockSelectorContainer {
    gap: 12px;
  }

  .chooseSteeringGame {
    width: 100% !important;
    height: min(42vh, 420px) !important;
  }
}

@media (max-width: 880px) {
  .guidedOverlay {
    gap: 10px;
    padding: 10px;
  }

  .practiceDock,
  .guidePanel {
    width: 100%;
  }

  .guidePanel {
    padding: 14px 16px 16px;
  }

  .doubleColumnContainer,
  .tiltPracticeContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .doubleBlockSelectorContainer {
    grid-template-columns: repeat(2, minmax(100px, max-content));
    transform: scale(0.86);
    transform-origin: center;
  }

  .gameContainer {
    max-width: 100%;
  }

  .chooseSteeringContainer {
    width: 100%;
    max-height: none;
  }

  .chooseSteeringGame {
    width: min(100%, 520px) !important;
    height: min(34vh, 360px) !important;
  }
}
