* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  background-color: #f5f0d6;
  min-height: 100vh;
  overflow-x: hidden;
}

.game-one-page {
  position: fixed;
  top: 0;
  left: 100vw;
  width: 100vw;
  height: 100svh;
  z-index: 30;
  background-color: #f5f0d6;
  overflow: hidden;
  transform: translateX(0);
  transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.18, 1);
}

.game-two-page {
  position: fixed;
  top: 0;
  left: 100vw;
  width: 100vw;
  height: 100svh;
  z-index: 31;
  background-color: #f5f0d6;
  overflow: hidden;
  transform: translateX(0);
  transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.18, 1);
}

.game-two-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.game-two-stage {
  width: 200vw;
  height: 100%;
  display: flex;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.18, 1);
}

.game-two-panel {
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  position: relative;
}

.game-two-home-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0 1rem;
}

.game-two-home-heading {
  width: clamp(320px, 66vw, 980px);
  aspect-ratio: 900 / 300;
  background-image: url('../gamesImages/Colouring/ColouringTitle.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.game-two-home-grid {
  display: grid;
  grid-template-columns: minmax(180px, 420px);
  width: min(92vw, 420px);
}

.game-two-thumb {
  border: 4px solid #272727;
  border-radius: 20px;
  padding: 0;
  background: #fff5cf;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-two-thumb::after {
  content: 'MR SHH WITH HIS PETS';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.7rem;
    color: #000000;
    font-family: monospace;
    font-size: clamp(0.9rem, 1vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
    opacity: 0;
    transition: opacity 0.24s ease;
    pointer-events: none;
}

.game-two-thumb img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  transition: opacity 0.24s ease;
}

.game-two-thumb:hover,
.game-two-thumb:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.game-two-thumb:hover::after,
.game-two-thumb:focus-visible::after {
  opacity: 1;
}

.game-two-thumb:hover img,
.game-two-thumb:focus-visible img {
  opacity: 0.75;
}

.game-two-color-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-two-back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 40;
  border: 0;
  border-radius: 999px;
  background: #4a4a4a;
  color: #f5d578;
  font-size: 1rem;
  font-weight: 700;
  font-family: monospace;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
}

.game-two-panel-back {
  position: absolute;
  bottom: 65px;
  left: 110px;
  z-index: 33;
  width: clamp(180px, 20vw, 320px);
  aspect-ratio: 900 /300;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  appearance: none;
  opacity: 0.75;
  transform: scale(1);
  transform-origin: center center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-two-panel-back::before {
  content: '';
  position: absolute;
  left: 1.8rem;
  top: 50%;
  width: clamp(18px, 2.2vw, 28px);
  height: clamp(20px, 2.6vw, 34px);
  background-color: #000000;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  opacity: 0;
  transform: translateY(-50%) translateX(8px);
  pointer-events: none;
}

.game-two-panel-back:hover,
.game-two-panel-back:focus-visible {
  opacity: 1;
  transform: scale(1.04);
}

.game-two-panel-back:hover::before,
.game-two-panel-back:focus-visible::before {
  animation: game-one-puzzle-back-arrow 1.1s ease-out 1 forwards;
}

#gameTwoColorBackHome {
  background-image: url('../gamesImages/Colouring/ColouringTitle.png');
}

.game-two-back-button {
  top: 24px;
  left: 24px;
  width: clamp(180px, 24vw, 320px);
  aspect-ratio: 629 / 160;
  padding: 0;
  background-color: transparent;
  background-image: url('../homeImages/games_sprite.png');
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  appearance: none;
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.game-two-back-button:hover,
.game-two-back-button:focus-visible {
  animation: game-one-nav-idle-float 2.8s ease-in-out infinite, game-one-nav-hover-frames 0.25s linear forwards;
}

.game-two-title {
  margin: 0;
  width: min(70vw, 450px);
  aspect-ratio: 900 / 300;
  background-image: url('../gamesImages/Colouring/ColouringOneTitle.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.game-two-wrap {
  width: min(96vw, 1080px);
  height: 100%;
  max-height: 100svh;
  margin: 0 auto;
  padding: 70px 0 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: 0.45rem;
}

.game-two-status {
  margin: 0;
  color: #3f3f3f;
  font-size: clamp(0.9rem, 1.7vw, 1.05rem);
  font-weight: 700;
  text-align: center;
}

.game-two-play-area {
  width: min(96vw, 1080px);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: clamp(0.25rem, 0.8vw, 0.65rem);
}

.game-two-canvas-shell {
  width: auto;
  height: 100%;
  min-height: 0;
  max-height: calc(100svh - 240px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameTwoColorCanvas {
  width: auto;
  height: 100%;
  max-width: min(78vw, 860px);
  max-height: 100%;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  touch-action: manipulation;
}

.game-two-controls {
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-self: end;
  align-items: center;
  justify-content: center;
}

.game-two-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.game-two-color-swatch {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #272727;
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
}

.game-two-color-swatch.is-selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #272727;
}

.game-two-action {
  width: clamp(88px, 8vw, 108px);
  height: clamp(88px, 8vw, 108px);
  border: 3px solid #000000;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  font-size: clamp(0.82rem, 0.95vw, 0.98rem);
  font-weight: 700;
  font-family: monospace;
  line-height: 1.1;
  text-align: center;
  padding: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.game-two-action:hover,
.game-two-action:focus-visible {
  background: #2f2f2f;
  color: #ffffff;
}

.game-one-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.game-one-stage {
  width: 300vw;
  height: 100%;
  display: flex;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.18, 1);
}

.game-one-panel {
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  position: relative;
}

.game-one-home-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3%;
  padding: 0 1rem;
}

.game-one-home-heading {
  width: clamp(400px, 65vw, 980px);
  aspect-ratio: 900 / 300;
  background-image: url('../gamesImages/Puzzles/PuzzleTitle.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.game-one-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 420px));
  gap: clamp(1rem, 2vw, 2rem);
  width: min(92vw, 920px);
}

.game-one-thumb {
  border: 4px solid #272727;
  border-radius: 20px;
  padding: 0;
  background: #fff5cf;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-one-thumb:hover,
.game-one-thumb:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.game-one-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.game-one-thumb::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 1rem;
  color: #ffffff;
  font-family: monospace;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#gameOneThumbPuzzle1::after {
  content: 'PUZZLE ONE KING SHH';
}

#gameOneThumbPuzzle2::after {
  content: 'PUZZLE TWO AT THE ZOO';
}

.game-one-thumb:hover img,
.game-one-thumb:focus-visible img {
  opacity: 0.75;
}

.game-one-thumb:hover::after,
.game-one-thumb:focus-visible::after {
  opacity: 1;
}

.game-one-panel-puzzle {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.game-one-puzzle-wrap {
  width: min(96vw, 1400px);
  height: min(88svh, 900px);
  margin-top: clamp(90px, 11svh, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

#gameOnePuzzleCanvas,
#gameTwoPuzzleCanvas {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f2d8 0%, #efe2ba 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  touch-action: none;
}

.game-one-puzzle-title {
  position: absolute;
  top: 2.5%;
  left: 50%;
  width: min(72vw, 980px);
  aspect-ratio: 981 / 68;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 32;
  pointer-events: none;
}

.game-one-puzzle-title-one {
  background-image: url('../gamesImages/Puzzles/puzzle1/PuzzleOneTitle.png');
}

.game-one-puzzle-title-two {
  background-image: url('../gamesImages/Puzzles/puzzle2/PuzzleTwoTitle.png');
}

.game-one-puzzle-controls {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4.65rem;
  position: absolute;
  left: max(10px, calc((95vw - min(96vw, 1400px)) / 2 - 120px));
  top: calc(clamp(90px, 11svh, 120px) + (min(88svh, 900px) / 2));
  transform: translateY(-50%);
  z-index: 32;
}

.game-one-puzzle-status {
  display: none;
}

.game-one-puzzle-reset {
  border: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  font-family: monospace;
}

.game-puzzle-reset-main {
  background-color: #80dc65;
  color: #000000;
}

.game-puzzle-reset-main:hover,
.game-puzzle-reset-main:focus-visible {
  background-color: #32b60a;
  color: #ffffff;
}

.game-one-puzzle-ghost-toggle {
  background-color: #ffa366;
  color: #000000;
}

.game-one-puzzle-ghost-toggle:hover,
.game-one-puzzle-ghost-toggle:focus-visible {
  background-color: #f26507;
  color: #ffffff;
}

.game-one-puzzle-reset:focus-visible {
  outline: 2px solid #f5d578;
  outline-offset: 2px;
}

.game-puzzle-reset-main,
.game-one-puzzle-ghost-toggle {
  width: clamp(88px, 8vw, 108px);
  height: clamp(88px, 8vw, 108px);
  padding: 0.45rem;
  border-radius: 50%;
  text-align: center;
  line-height: 1.1;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.game-one-next-link {
  position: absolute;
  right: max(12px, calc((82vw - min(96vw, 1400px)) / 2 - 90px));
    top: calc(clamp(90px, 110svh, 550px) + (min(88svh, 900px) / 2));
  transform: translateY(-50%);
  border: 0;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem 0.5rem 1.2rem;
  border-radius: 999px;
  background-color: #9fd3f8;
  font-size: 0;
  font-family: monospace;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 34;
  transition: background-color 0.2s ease;
}

.game-one-next-link::before {
  content: 'NEXT PUZZLE';
  color: #000000;
  font-size: clamp(0.85rem, 1vw, 1.1rem);
  line-height: 1;
  transition: color 0.2s ease;
}

.game-one-next-link::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 12px;
  background-color: #000000;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.game-one-next-link:hover,
.game-one-next-link:focus-visible {
  background-color: #3f87c7;
}

.game-one-next-link:hover::before,
.game-one-next-link:focus-visible::before {
  color: #ffffff;
}

.game-one-next-link:hover::after,
.game-one-next-link:focus-visible::after {
  background-color: #ffffff;
}

.game-one-puzzle-nav-button {
  position: absolute;
  left: max(12px, calc((82vw - min(96vw, 1400px)) / 2 - 90px));
    bottom: 100px;
  border: 0;
  width: auto;
  height: auto;
  padding: 0.5rem 1.2rem 0.5rem 1rem;
  border-radius: 999px;
  background-color: #9fd3f8;
  font-family: monospace;
  font-weight: 700;
  font-size: clamp(0.85rem, 1vw, 1.1rem);
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 34;
  transition: background-color 0.2s ease;
}

.game-one-puzzle-nav-button::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 12px;
  background-color: #000000;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.game-one-puzzle-nav-button:hover,
.game-one-puzzle-nav-button:focus-visible {
  background-color: #3f87c7;
  color: #ffffff;
}

.game-one-puzzle-nav-button:hover::before,
.game-one-puzzle-nav-button:focus-visible::before {
  background-color: #ffffff;
}

.game-one-puzzle-back-button {
  position: absolute;
      top: 180px;
  left: 24px;
  z-index: 33;
  width: clamp(180px, 20vw, 320px);
  aspect-ratio: 900 /300;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
  appearance: none;
  opacity: 0.75;
  transform: scale(1);
  transform-origin: center center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.game-one-puzzle-back-button::before {
  content: '';
  position: absolute;
  left: 2.8rem;
  top: 50%;
  width: clamp(18px, 2.2vw, 28px);
  height: clamp(20px, 2.6vw, 34px);
  background-color: #000000;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  opacity: 0;
  transform: translateY(-50%) translateX(8px);
  pointer-events: none;
}

.game-one-puzzle-back-button:hover,
.game-one-puzzle-back-button:focus-visible {
  opacity: 1;
  transform: scale(1.04);
}

.game-one-puzzle-back-button:hover::before,
.game-one-puzzle-back-button:focus-visible::before {
  animation: game-one-puzzle-back-arrow 1.1s ease-out 1 forwards;
}

#gameOnePuzzle1BackButton,
#gameOnePuzzle2BackButton {
  background-image: url('../gamesImages/Puzzles/PuzzleTitle.png');
}

.game-one-calibration-tools {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 35;
}

.game-one-calibration-button {
  width: auto;
  height: auto;
  padding: 0.46rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  color: #f5d578;
  background-color: #4a4a4a;
}

.game-one-calibration-button:hover,
.game-one-calibration-button:focus-visible {
  background-color: #2f2f2f;
  color: #ffffff;
}

.game-one-calibration-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.game-one-title {
  margin: 0;
  color: #4a4a4a;
  font-size: clamp(1.4rem, 4.4vw, 3rem);
  letter-spacing: 0.03em;
}

.game-one-back-button {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 31;
  width: clamp(180px, 24vw, 320px);
  aspect-ratio: 629 / 160;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-image: url('../homeImages/games_sprite.png');
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  cursor: pointer;
  appearance: none;
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.game-one-back-button:hover {
  animation: game-one-nav-idle-float 2.8s ease-in-out infinite, game-one-nav-hover-frames 0.25s linear forwards;
}

body.is-game-one-open .game-one-page {
  transform: translateX(-100vw);
}

body.is-game-two-open .game-two-page {
  transform: translateX(-100vw);
}

.games-page {
  --game-sprite-w: clamp(160px, 16vw, 280px);
  width: 100%;
  height: 100svh;
  background-color: #f5f0d6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.games-page-nav,
.books-page-nav,
.shop-page-nav {
  position: absolute;
  z-index: 1;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  appearance: none;
}

.games-page-nav.is-visible,
.books-page-nav.is-visible,
.shop-page-nav.is-visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  animation: menu-button-idle-float 3.4s ease-in-out infinite;
}

.games-page-nav.is-entering,
.books-page-nav.is-entering,
.shop-page-nav.is-entering {
  animation: menu-button-zoom-bounce 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards;
}

.games-page-nav.is-visible.is-exiting,
.books-page-nav.is-visible.is-exiting,
.shop-page-nav.is-visible.is-exiting {
  pointer-events: none;
  animation: menu-button-zoom-bounce 0.5s cubic-bezier(0.2, 0.85, 0.3, 1.25) reverse forwards;
}

.menu-button.is-mrshh-exiting,
.games-page-nav.is-mrshh-exiting {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
  animation: menu-button-collapse-out 0.55s cubic-bezier(0.22, 0.75, 0.3, 1) forwards;
}

.gp-books-button {
  top: 10%;
  left: 36%;
  width: clamp(160px, 18vw, 366px);
  aspect-ratio: 967 / 248;
  background-size: 300% 100%;
  background-image: url('../homeImages/new_books_sprite.png');
}

.gp-shop-button {
  top: 4%;
  left: 64%;
  width: clamp(220px, 34vw, 300px);
  aspect-ratio: 2000 / 2407;
  background-size: 400% 100%;
  background-image: url('../homeImages/shop_sprite2.png');
}

.games-page-nav.gp-books-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, books-button-hover-frames 0.24s steps(2, end) forwards;
}

.games-page-nav.gp-shop-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, shop-button-hover-frames 0.4s linear forwards;
}

.books-page {
  width: 100%;
  height: 100svh;
  margin-top: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.books-book-sprite {
  position: absolute;
  top: 39%;
  z-index: 0;
  width: clamp(160px, 20vw, 260px);
  aspect-ratio: 13 / 18;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 0% 0%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
  cursor: pointer;
}

.books-book1-sprite {
  left: 20%;
  background-image: url('../homeImages/book1.png');
}

.books-book1-read-aloud,
.books-book2-read-aloud {
  position: absolute;
  top: calc(37% + clamp(138px, 17vw, 205px));
  transform: translateX(-50%);
  z-index: 3;
  border: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background-color: #4a4a4a;
  color: #f5d578;
  font-size: clamp(0.78rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.books-book1-read-aloud {
  left: 20%;
}

.books-book2-read-aloud {
  left: 42%;
}

.books-book-description {
  display: none;
}

.books-youtube-text {
  color: #ffffff;
}

.books-youtube-icon {
  width: clamp(12px, 1vw, 18px);
  height: auto;
  display: block;
}

.books-book1-read-aloud:hover,
.books-book1-read-aloud:focus-visible,
.books-book2-read-aloud:hover,
.books-book2-read-aloud:focus-visible {
  background-color: #303030;
  transform: translateX(-50%) translateY(-2px);
}

.books-book1-read-aloud:focus-visible,
.books-book2-read-aloud:focus-visible {
  outline: 2px solid #f5d578;
  outline-offset: 3px;
}

.books-book1-sprite::before,
.books-book1-sprite::after {
  position: absolute;
  top: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.books-book1-sprite::before {
  content: '';
  left: calc(93% + 12px);
  z-index: 1;
  width: 22px;
  height: 28px;
  background-color: #4a4a4a;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  transform: translateY(-50%) translateX(12px);
}

.books-book1-sprite::after {
  content: 'STOP!\A\A Don\2019t open this book, please.\A\AUnless... You consider stopping, about halfway through.\A\A\A A heartwarming, comical and poignant children\2019s book that will separate the compassionate from the curious.\A\A\A Available on AMAZON!';
  left: calc(94% + 30px);
  z-index: 2;
  width: clamp(125px, 14vw, 190px);
  padding: 0.95rem 0.9rem;
  border-radius: 22px;
  background-color: #4a4a4a;
  color: #f5d578ff;
  font-size: clamp(0.66rem, 0.78vw, 0.82rem);
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-line;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.24);
  transform: translateY(-50%) translateX(12px);
}

.books-book1-sprite:hover::before,
.books-book1-sprite:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.books-book2-sprite {
  left: 42%;
  background-image: url('../homeImages/book2.png');
}

.books-book2-sprite::before,
.books-book2-sprite::after {
  position: absolute;
  top: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.books-book2-sprite::before {
  content: '';
  left: calc(93% + 12px);
  z-index: 1;
  width: 22px;
  height: 28px;
  background-color: #4a4a4a;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  transform: translateY(-50%) translateX(12px);
}

.books-book2-sprite::after {
  content: 'STOP!\A\A I\2019m not going through this again...\A\AThe second book in the series following the first book "STOP!".\A\A\A Another heartwarming, comical and poignant children\2019s book that promotes the message to be whoever you want to be!\A\A\A Available on AMAZON!';
  left: calc(94% + 30px);
  z-index: 2;
  width: clamp(125px, 14vw, 190px);
  padding: 0.95rem 0.9rem;
  border-radius: 22px;
  background-color: #4a4a4a;
  color: #f5d578ff;
  font-size: clamp(0.66rem, 0.78vw, 0.82rem);
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-line;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.24);
  transform: translateY(-50%) translateX(12px);
}

.books-book2-sprite:hover::before,
.books-book2-sprite:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.books-book-sprite.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.books-book-sprite.is-visible.books-book1-sprite ~ .books-book1-read-aloud {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.books-book-sprite.is-visible.books-book2-sprite ~ .books-book2-read-aloud {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.books-book-sprite.is-entering.books-book1-sprite ~ .books-book1-read-aloud,
.books-book-sprite.is-entering.books-book2-sprite ~ .books-book2-read-aloud {
  animation: read-aloud-zoom-bounce 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards;
}

.books-book-sprite.is-entering {
  animation: menu-button-zoom-bounce 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards;
}

.books-book-sprite:hover {
  background-position: 100% 0%;
}

.shop-page {
  width: 100%;
  height: 100svh;
  position: relative;
  background-image: url('../homeImages/shopHomeImage.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.bp-games-button,
.sp-games-button {
  top: 10%;
  left: 36%;
  width: clamp(220px, 34vw, 420px);
  aspect-ratio: 629 / 160;
  background-image: url('../homeImages/games_sprite.png');
}

.bp-shop-button {
  top: 4%;
  left: 64%;
  width: clamp(220px, 34vw, 300px);
  aspect-ratio: 2000 / 2407;
  background-size: 400% 100%;
  background-image: url('../homeImages/shop_sprite2.png');
}

.sp-books-button {
  top: 10%;
  left: 64%;
  width: clamp(160px, 18vw, 366px);
  aspect-ratio: 967 / 248;
  background-size: 300% 100%;
  background-image: url('../homeImages/new_books_sprite.png');
}

.books-page-nav.bp-games-button:hover,
.shop-page-nav.sp-games-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, menu-button-hover-frames 0.25s linear forwards;
}

.books-page-nav.bp-shop-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, shop-button-hover-frames 0.4s linear forwards;
}

.shop-page-nav.sp-books-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, books-button-hover-frames 0.2s steps(2, end) forwards;
}

.shop-banner {
  position: absolute;
  top: 4%;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: auto;
  aspect-ratio: 16 / 3;
  transform: translateX(-50%);
  background-image: url('../homeImages/shopBanner.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.shop-items-grid {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 0;
  width: min(96vw, 1400px);
  height: auto;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, max-content);
  justify-content: center;
  align-items: center;
  justify-items: center;
  row-gap: clamp(10px, 2vh, 24px);
  column-gap: clamp(8px, 1.4vw, 24px);
}

.shop-item-sprite {
  width: clamp(110px, 15vw, 240px);
  aspect-ratio: 9 / 14;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 0% 0%;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  will-change: transform;
  contain: paint;
  transition: transform 0.25s ease;
  cursor: pointer;
}

.shop-item-sprite:hover {
  background-position: 100% 0%;
  transform: scale(1.04);
}



.shop-item-colouringbook {
  background-image: url('../homeImages/colouringBook3_carousel.png');
}

.shop-item-hoddie {
  background-image: url('../homeImages/hoddie_carousel.png');
}

.shop-item-puzzle {
  background-image: url('../homeImages/puzzle_carousel.png');
}

.shop-item-stickers {
  background-image: url('../homeImages/stickers_carousel.png');
}

.shop-item-pencilcase {
  background-image: url('../homeImages/pencilCase_carousel.png');
}

.shop-item-allmerch-container {
      position: absolute;
    top: 52%;
    left: unset;
    right: 7%;
    bottom: unset;
  /* ...other styles... */
}

.shop-item-allmerch {
  aspect-ratio: 647 / 651;
  background-image: url('../homeImages/allMerch.png');
}


.games-sprite-group {
  display: none;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-sprite-group {
  position: absolute;
    inset: 0;
    width: 50%;
    height: 43%;
    display: block;
    pointer-events: none;
   top: 6%;
    left: 4%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game1-sprite,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game2-sprite,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game3-sprite,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game4-sprite,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game5-sprite {
  position: absolute;
  width: 80%;
  aspect-ratio: 10 / 13;
  z-index: 2;
  pointer-events: none;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game1-sprite {
  left: 0%;
  top: 39%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game2-sprite {
  left: 26%;
  top: 15%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game3-sprite {
  left: 50%;
  top: 0%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game4-sprite {
  left: 76%;
  top: 15%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game5-sprite {
  left: 99%;
  top: 39%;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  transform-origin: 50% 100%;
  animation: games-game1-sway 3.6s ease-in-out infinite;
  pointer-events: none;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game-hitbox {
  position: absolute;
  inset: 0;
  display: block;
  width: 20%;
  top: 28%;
  left: 37%;
  height: 18%;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game1-sprite .games-game-visual {
  background-image: url('../homeImages/g_games_game1.png');
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game2-sprite .games-game-visual {
  background-image: url('../homeImages/a_games_game2.png');
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game3-sprite .games-game-visual {
  background-image: url('../homeImages/m_games_game3.png');
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game4-sprite .games-game-visual {
  background-image: url('../homeImages/e_games_game4.png');
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game5-sprite .games-game-visual {
  background-image: url('../homeImages/s_games_game5.png');
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game1-sprite:has(.games-game-hitbox:hover),
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game2-sprite:has(.games-game-hitbox:hover),
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game3-sprite:has(.games-game-hitbox:hover),
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game4-sprite:has(.games-game-hitbox:hover),
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game5-sprite:has(.games-game-hitbox:hover) {
  z-index: 10;
}

html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game1-sprite:has(.games-game-hitbox:hover) .games-game-visual,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game2-sprite:has(.games-game-hitbox:hover) .games-game-visual,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game3-sprite:has(.games-game-hitbox:hover) .games-game-visual,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game4-sprite:has(.games-game-hitbox:hover) .games-game-visual,
html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-game5-sprite:has(.games-game-hitbox:hover) .games-game-visual {
  animation: games-game1-sway 3.6s ease-in-out infinite, games-game1-hover-frames 0.24s linear forwards;
  animation-delay: var(--game-sway-delay, 0s), 0s;
}

@keyframes games-game1-hover-frames {
  0%,
  33.333% {
    background-position: 33.333% 0%;
  }
  33.334%,
  66.666% {
    background-position: 66.666% 0%;
  }
  66.667%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes games-game1-sway {
  0% {
    transform: rotate(-2.2deg);
  }
  50% {
    transform: rotate(2.2deg);
  }
  100% {
    transform: rotate(-2.2deg);
  }
}

.home-main {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem 1rem;
}

.home-youtube-link-sprite {
  position: absolute;
  top: unset;
  bottom: 0%;
  left: 0;
  z-index: 2;
  width: 32%;
  aspect-ratio: 3/ 1;
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-image: url('../homeImages/youTube_link.png');
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 0% 0%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.home-youtube-link-sprite.is-visible {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-youtube-link-sprite.is-entering {
  animation: home-youtube-link-zoom-bounce 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards;
}

.home-youtube-link-sprite:hover,
.home-youtube-link-sprite:focus-visible,
.home-youtube-link-sprite:active {
  background-position: 100% 0%;
  transform: scale(1.02);
}

.home-youtube-link-sprite:focus-visible {
  outline: 2px solid #f5d578;
  outline-offset: 2px;
}

@keyframes home-youtube-link-zoom-bounce {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  62% {
    opacity: 1;
    transform: scale(1.12);
  }
  78% {
    transform: scale(0.94);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.home-video {
  display: block;
  width: 100%;
  height: 100%;
}

.home-video-stack {
  position: relative;
  width: min(92vw, calc(80svh * 16 / 9), 720px);
  max-height: 80svh;
  aspect-ratio: 16 / 9;
}

.home-video-intro {
  opacity: 1;
  transition: opacity 0.22s ease;
}

.home-video-intro.is-fading-out {
  opacity: 0;
}

.home-video-stack .home-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-video-loop {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-video-loop.is-active {
  opacity: 1;
  visibility: visible;
}

.balloons {
  position: fixed;
  --balloon-scale: 1;
  transform: translateY(-50%) translateX(0) rotate(0deg) scale(var(--balloon-scale));
  transform-origin: 50% 92%;
  width: 14%;
  aspect-ratio: 734 / 959;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  cursor: url('../homeImages/pinSprite-frame1.png'), auto;
  transition: transform 0.2s ease;
  animation: balloon-breeze 3.2s ease-in-out infinite;
  will-change: transform;
}

.balloons:hover {
  --balloon-scale: 1.05;
}

.balloons.cursor-pressed {
  cursor: url('../homeImages/pinSprite-frame2.png'), auto;
}

.balloons-pop {
  animation: balloon-pop-frames-2-to-4 0.3s linear forwards;
}

.balloons:not(.balloons-pop):nth-of-type(odd) {
  animation-duration: 2.8s;
}

.balloons:not(.balloons-pop):nth-of-type(3n) {
  animation-delay: -0.9s;
}

.balloons:not(.balloons-pop):nth-of-type(4n) {
  animation-delay: -1.6s;
}

@keyframes balloon-breeze {
  0% {
    transform: translateY(-50%) translateX(-5px) rotate(-1.2deg) scale(var(--balloon-scale));
  }
  50% {
    transform: translateY(-50%) translateX(5px) rotate(1.2deg) scale(var(--balloon-scale));
  }
  100% {
    transform: translateY(-50%) translateX(-5px) rotate(-1.2deg) scale(var(--balloon-scale));
  }
}

.balloons-red {
  left: 22%;
  top: 60%;
  background-image: url('../homeImages/redPopSprite.png');
}

.balloons-yellow {
  left: 70%;
  top: 32%;
  background-image: url('../homeImages/yellowPopSprite.png');
}

.balloons-blue {
  left: 78%;
  top: 68%;
  background-image: url('../homeImages/bluePopSprite.png');
}

.balloons-green {
  left: 36%;
  top: 30%;
  background-image: url('../homeImages/greenPopSprite.png');
}

.menu-button {
  position: absolute;
  z-index: 1;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% 0%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  appearance: none;
  will-change: transform, opacity;
}

.games-button {
  top: 39%;
  left: 38%;
  width: clamp(220px, 34vw, 420px);
  aspect-ratio: 629 / 160;
  background-image: url('../homeImages/games_sprite.png');
}

.books-button {
  top: 65%;
  left: 50%;
  width: clamp(160px, 18vw, 366px);
  aspect-ratio: 967 / 248;
  background-size: 300% 100%;
  background-image: url('../homeImages/new_books_sprite.png');
}

.menu-button.books-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, books-button-hover-frames 0.24s steps(2, end) forwards;
}

.shop-button {
  top: 32%;
  left: 64%;
  width: clamp(220px, 34vw, 300px);
  aspect-ratio: 2000 / 2407;
  background-size: 400% 100%;
  background-image: url('../homeImages/shop_sprite2.png');
}

.menu-button.shop-button:hover {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, shop-button-hover-frames 0.4s linear forwards;
}

.menu-button.is-visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  animation: menu-button-idle-float 3.4s ease-in-out infinite;
}

.menu-button.is-entering {
  animation: menu-button-zoom-bounce 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.25) forwards;
}

.menu-button:hover:not(.shop-button):not(.books-button) {
  animation: menu-button-idle-float 3.4s ease-in-out infinite, menu-button-hover-frames 0.25s linear forwards;
}

.skip-button {
  position: fixed;
    left: 94px;
    bottom: 44px;
    z-index: 20;
    width: clamp(84px, 8vw, 108px);
    height: clamp(84px, 8vw, 108px);
    border: 0;
    border-radius: 50%;
    padding: 0.45rem;
    background-color: #ffc76e;
    color: #000000;
    font-size: clamp(0.86rem, 0.95vw, 2rem);
    font-weight: 700;
    font-family: sans-serif;
    line-height: 1;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.skip-button:hover {
  background-color: #e18700;
  color: #ffffff;
}

.mute-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
  width: clamp(76px, 7vw, 98px);
  height: clamp(76px, 7vw, 98px);
  border: 0;
  border-radius: 50%;
  padding: 0.45rem;
  background-color: #ffd88e;
  color: #000000;
  font-size: clamp(0.72rem, 0.82vw, 1rem);
  font-weight: 800;
  font-family: sans-serif;
  line-height: 1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mute-button:hover {
  background-color: #d98b00;
  color: #ffffff;
  transform: scale(1.03);
}

@keyframes balloon-pop-frames-2-to-4 {
  0%,
  33.333% {
    background-position: 33.333% 0%;
  }
  33.334%,
  66.666% {
    background-position: 66.666% 0%;
  }
  66.667%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes menu-button-hover-frames {
  0%,
  33.333% {
    background-position: 33.333% 0%;
  }
  33.334%,
  66.666% {
    background-position: 66.666% 0%;
  }
  66.667%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes game-one-nav-hover-frames {
  0%,
  33.333% {
    background-position: 33.333% 0%;
  }
  33.334%,
  66.666% {
    background-position: 66.666% 0%;
  }
  66.667%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes game-one-nav-idle-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes game-one-puzzle-back-arrow {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(-6px);
  }
}


@keyframes books-button-hover-frames {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 0%;
  }
}

@keyframes shop-button-hover-frames {
  0%,
  33.333% {
    background-position: 33.333% 0%;
  }
  33.334%,
  66.666% {
    background-position: 66.667% 0%;
  }
  66.667%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes menu-button-idle-float {
  0% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-8px);
  }
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
}

@keyframes menu-button-zoom-bounce {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  78% {
    transform: translate(-50%, -50%) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes read-aloud-zoom-bounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.2);
  }
  62% {
    opacity: 1;
    transform: translateX(-50%) scale(1.12);
  }
  78% {
    transform: translateX(-50%) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes menu-button-collapse-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  72% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.64);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.16);
  }
}

.site-copyright {
  position: fixed;
  right: 12px;
  bottom: 10px;
  margin: 0;
  font-size: 0.75rem;
  color: #000;
}

.mrshh-character {
  position: fixed;
  top: 12px;
  left: 40px;
  z-index: 29;
  width: clamp(60px, 10vw, 94px);
  aspect-ratio: 250 / 415;
  background-image: url('../homeImages/mrshh_home_state1.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top left;
  cursor: pointer;
}

.mrshh-character:hover {
  background-image: url('../homeImages/mrshh_home_state2.png');
}

@media (min-width: 1536px) and (max-width: 1919px) and (hover: hover) and (pointer: fine) {
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .home-main,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-page,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-page,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .shop-page {
    margin-inline: auto;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .home-video-stack {
    width: min(86vw, 640px);
    max-height: 84svh;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-button {
  
    left: 34%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-button {
    top: 72%;
    left: 50%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .shop-button {
   
    left: 67%;
  }

   .books-page {
    margin-top: 130px;
  }

  .books-book-sprite {
    top: 48%;
    width: clamp(130px, 14vw, 220px);
  }

  

  .books-book1-sprite,
  .books-book1-read-aloud {
    left: 24%;
  }

  .books-book2-sprite,
  .books-book2-read-aloud {
    left: 46%;
  }

  .books-book1-read-aloud,
  .books-book2-read-aloud {
    top: 64%;
    font-size: clamp(0.68rem, 0.86vw, 0.9rem);
  }

  .shop-items-grid {
    top: 49%;
    width: min(96vw, 1100px);
    column-gap: clamp(8px, 1vw, 14px);
  }

  .shop-item-sprite {
    width: clamp(92px, 14vw, 970px);
  }

  .shop-item-allmerch-container {
    right: 2%;
    top: 27%;
  }

  .game-one-home-heading {
    width: clamp(400px, 65vw, 580px);
  }

  .game-one-puzzle-wrap {
    width: min(96vw, 1455px);
        height: min(75svh, 641px);
        margin-top: clamp(66px, 18svh, 180px);
  }

  .game-one-puzzle-title {
  
    top: 5.5%;
  }

  .game-one-puzzle-controls {
   top: 9%;
        position: absolute;
        left: 76%;
        display: block;
  }

  .game-one-puzzle-back-button {
    top: unset;
        bottom: 1%;
        width: clamp(160px, 17vw, 230px);
  }

  .game-one-next-link {
    top: auto;
    right: 22px;
    bottom: 18px;
    transform: none;
  }

  .game-one-puzzle-nav-button {
    left: 15%;
    bottom: 18px;
  }

  .game-two-wrap {
    padding-top: 58px;
    max-height: 100svh;
  }

  .game-two-canvas-shell {
    max-height: calc(100svh - 190px);
  }

  .game-two-controls {
    display: flow;  
  }

  .game-two-title {
   
    width: min(70vw, 300px);
   position: absolute;
    top: 1%;
    left: 51%;
}

.game-two-home-heading {
    width: clamp(320px, 66vw, 580px);

}

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book1-sprite,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book1-read-aloud {
    left: 19%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book2-sprite,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book2-read-aloud {
    left: 48%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .shop-items-grid {
    width: min(100%, 1160px);
    column-gap: clamp(12px, 1.5vw, 22px);
  }
}

@media (min-width: 1920px) and (max-width: 1920px) and (min-height: 934px) and (max-height: 1080px) and (hover: hover) and (pointer: fine) {
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .games-button {
  
    left: 34%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-button {
    top: 72%;
    left: 50%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .shop-button {
   
    left: 67%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .gp-books-button,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .bp-games-button,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .sp-games-button {
    left: 34%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .gp-shop-button,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .bp-shop-button,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .sp-books-button {
    left: 66%;
  }

  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .shop-items-grid {
    width: min(100%, 1220px);
    column-gap: clamp(14px, 1.6vw, 24px);
  }

  .game-one-home-heading {
    width: clamp(400px, 65vw, 700px);
  }

  .game-one-next-link {
  
    right: 2%;
    top: 94%;
}

.game-one-puzzle-back-button {
   
    left: 0.5%;
    width: 15%;
}

.game-one-puzzle-nav-button {
left: max(44px, calc((82vw - min(96vw, 1400px)) / 2 - 90px));
    bottom: 35px;
}

.game-two-wrap {
    padding: 1%;
}

.game-two-play-area {
   
    gap: clamp(0.25rem, 1.8vw, 1.65rem);
}

.books-book1-sprite {
    left: 17%;
}

.books-book1-read-aloud {
    left: 17%;
}

.books-book1-sprite, .books-book2-sprite {
    top: 46%;
}

.books-book1-read-aloud, .books-book2-read-aloud {
    top: 64%;
}

.shop-item-allmerch-container {
    right: 3%;
}

}

@media (min-width: 1100px) and (max-width: 1535px) and (max-height: 700px) {


  .home-video-stack {
    width: min(88vw, 560px);
    max-height: 68svh;
  }

  .games-button {
   
      left: 32%;
        width: clamp(220px, 34vw, 350px);
   
  }

  .books-button {
    top: 71%;
    left: 50%;
    width: clamp(150px, 20vw, 260px);
  }

  .shop-button {
    top: 27%;
        left: 69%;
    width: clamp(170px, 22vw, 250px);
  }

  .skip-button {
    left: 28px;
    bottom: 20px;
    width: clamp(66px, 5.6vw, 86px);
    height: clamp(66px, 5.6vw, 86px);
  }

  .mrshh-character {
    top: 8px;
    left: 16px;
  }

  .books-page {
    margin-top: 130px;
  }

  .books-book-sprite {
    top: 48%;
    width: clamp(130px, 14vw, 220px);
  }

  

  .books-book1-sprite,
  .books-book1-read-aloud {
    left: 24%;
  }

  .books-book2-sprite,
  .books-book2-read-aloud {
    left: 52%;
  }

  .books-book1-read-aloud,
  .books-book2-read-aloud {
    top: 67%;
    font-size: clamp(0.68rem, 0.86vw, 0.9rem);
  }

  .shop-items-grid {
    top: 49%;
    width: min(96vw, 1100px);
    column-gap: clamp(8px, 1vw, 14px);
  }

  .shop-item-sprite {
    width: clamp(92px, 14vw, 970px);
  }

  .shop-item-allmerch-container {
    right: 2%;
    top: 27%;
  }

  .game-one-home-heading {
    width: clamp(400px, 65vw, 580px);
  }

  .game-one-puzzle-wrap {
    width: min(96vw, 1455px);
        height: min(75svh, 641px);
        margin-top: clamp(66px, 18svh, 180px);
  }

  .game-one-puzzle-title {
  
    top: 5.5%;
  }

  .game-one-puzzle-controls {
   top: 9%;
        position: absolute;
        left: 76%;
        display: block;
  }

  .game-one-puzzle-back-button {
    top: unset;
        bottom: 1%;
        width: clamp(160px, 17vw, 230px);
  }

  .game-one-next-link {
    top: auto;
    right: 22px;
    bottom: 18px;
    transform: none;
  }

  .game-one-puzzle-nav-button {
    left: 15%;
    bottom: 18px;
  }

  .game-two-wrap {
    padding-top: 78px;
        max-height: 100svh;
        margin-left: 29%;
  }

  .game-two-canvas-shell {
    max-height: calc(100svh - 116px);
  }

  .game-two-controls {
            display: block;
        width: 18%;
        position: absolute;
        left: 30%;
  }

  .game-two-color-swatch {
    width: 75px;
    height: 75px;

  }

  .game-two-title {
   
    width: min(70vw, 200px);
   position: absolute;
    top: 1%;
    left: 51%;
}

.game-two-home-heading {
    width: clamp(120px, 66vw, 280px);

}

.bp-games-button, .sp-games-button {
   
    width: clamp(220px, 34vw, 320px);
  
}

.bp-shop-button {
    width: clamp(120px, 34vw, 200px);;
}



  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book1-sprite,
  html:not([data-device-profiles*='iphone-']):not([data-device-profiles*='ipad-']) .books-book1-read-aloud {
    left: 19%;
  }


  .game-one-home-grid {
 
    width: min(92vw, 520px);
}

.game-two-home-grid {
   
    width: min(92vw, 320px);
}

}




