/* Shared game-to-website control. Keep the destination distinct from game Menu/Home. */
a.jellykid-games-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  padding: 10px 14px;
  border: 2px solid #ffe496;
  border-radius: 6px;
  background: #ffd05a;
  color: #101827;
  box-shadow: 0 3px 0 #050918;
  font: 700 14px/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: nowrap;
  transform: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a.jellykid-games-button:hover { background: #ffe496; color: #101827; transform: none; }
a.jellykid-games-button:focus-visible { outline: 3px solid #61ddff; outline-offset: 3px; }
a.jellykid-games-button .jellykid-games-button__arrow { flex: 0 0 auto; color: inherit; font-size: 20px; line-height: 1; }
a.jellykid-games-button .games-home-label { display: inline; }
a.jellykid-games-button small { color: inherit; }
.back-link.jellykid-games-button > span:last-child { display: grid; }
.back-link.jellykid-games-button strong,
.back-link.jellykid-games-button small { color: #101827; }
a.games-home-button.jellykid-games-button { width: max-content; min-width: 0; }
.jellykid-return-bar {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  background: #101827;
}
body:has(> .jellykid-return-bar) { padding-top: 64px; }
.game-home-context { margin-left: 14px; color: #fff0c1; font: 700 14px/1.2 "Segoe UI", Arial, sans-serif; }
/* Beat Lab's old top-hud contains only the duplicate website-brand link. */
body[data-home-return="beat-lab"] .top-hud { display: none; }
body[data-home-return="beat-lab"] .game-root { min-height: calc(100dvh - 64px); }
body[data-home-return="beat-lab"] .game-root:not(.menu-root) { grid-template-rows: minmax(0, 1fr); }
@media (min-width: 1101px) {
  body[data-home-return="beat-lab"] .game-root:not(.menu-root) { height: calc(100dvh - 64px); }
}
@media (max-width: 720px) {
  .game-header:has(.jellykid-games-button) { grid-template-columns: minmax(0, 1fr); }
  .game-header:has(.jellykid-games-button) .header-actions { grid-column: 1; grid-row: 2; flex-wrap: wrap; justify-content: flex-start; }
}
