/* Arcade navigation stays outside the game's React tree and input surface. */
.rabbit-hole-return {
  position: fixed;
  z-index: 80;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #b3aea0;
  border-radius: 5px;
  background: linear-gradient(#f5f2e7, #dfdbce);
  box-shadow: inset 0 1px 0 #fffdf5, 0 2px 0 #a6a192, 0 3px 12px #0003;
  color: #494d46;
  font: 600 10px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  touch-action: manipulation;
}

.rabbit-hole-return span {
  font-size: 15px;
  line-height: 1;
}

.rabbit-hole-return:hover { background: #f5f2e7; }
.rabbit-hole-return:focus-visible { outline: 2px solid #f3cf66; outline-offset: 4px; }
.rabbit-hole-return:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px #9e998740, 0 1px 0 #a6a192;
}

/* Exploring and lessons retain the entire viewport, including touch controls. */
body:has(#game-surface):not(:has(.screen)) .rabbit-hole-return { display: none; }

@media (max-width: 480px), (max-height: 500px) {
  .rabbit-hole-return {
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    min-height: 34px;
    padding: 7px 10px;
    font-size: 9px;
  }
}
