/* Final mobile overrides: keep essential play controls within the scene. */
.mobile-actions,
.mobile-return {
  display: none;
}
@media (max-width: 900px) {
  .world { overflow: clip; }
  .mobile-return {
    display: block;
    min-height: 44px;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #e9f0fc;
    color: #234b87;
  }
  .scene-tools button,
  .inventory button {
    min-width: 44px;
    min-height: 44px;
  }
  .mobile-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    z-index: 42;
    right: max(16px, env(safe-area-inset-right));
    bottom: 80px;
  }
  .mobile-actions button {
    min-height: 48px;
    min-width: 64px;
    padding: 12px;
    border: 1px solid #ffffffb8;
    border-radius: 16px;
    background: #fff;
    color: #233d36;
    font-size: 14px;
    box-shadow: 0 4px 16px #253e2820;
    touch-action: manipulation;
  }
  .mobile-actions button:first-child {
    background: #2761c5;
    color: white;
  }
  .watching-show .mobile-actions {
    display: none;
  }
  .emote-buttons { position: static; flex-wrap: wrap; margin-top: 16px; }
  .walking-title { max-width: 100%; }
  .walking-hud {
    scroll-margin-top: 12px;
  }
  dialog {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  dialog input,
  dialog select,
  dialog textarea {
    font-size: 16px;
  }
  dialog button,
  dialog select,
  .online-status button,
  .festival-status #panel-toggle,
  .scene-tools button {
    min-height: 44px;
  }
  dialog .close,
  .water-close {
    min-width: 44px;
    min-height: 44px;
  }
  dialog h2 {
    padding-right: 32px;
  }
  .movement-stick,
  .touch-pad {
    touch-action: none;
    user-select: none;
  }
  .scene-tools {
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 600px) {
  .arrival-art {
    display: none;
  }
  .arrival-identity {
    min-height: 0;
  }
  .arrival-identity form {
    padding: 24px 20px;
  }
  .arrival-bottom {
    position: sticky;
    bottom: 0;
    background: #fffdf5;
    padding-block: 12px;
  }
  .guide-gift-button {
    max-width: 120px;
  }
}
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .sky-caption {
    display: none;
  }
  .mobile-actions {
    bottom: 78px;
  }
  .arrival-dialog {
    max-height: calc(100dvh - 16px);
  }
  .arrival-art {
    display: none;
  }
  .arrival-identity {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}
