/* Pixel Pet Studio – mobile + fullscreen tweaks v1 */

/* Always let the map consume touch gestures (we handle scrolling/pan ourselves). */
canvas#game {
  touch-action: none;
}

/* Full-map layout (desktop + mobile) */
body.pps-fullmap {
  overflow: hidden;
}

body.pps-fullmap .topbar,
body.pps-fullmap .sidebar,
body.pps-fullmap #minimap {
  display: none !important;
}

body.pps-fullmap .layout {
  padding: 0;
  margin: 0;
  max-width: none;
}

body.pps-fullmap .stage-wrap {
  flex: 1 1 auto;
}

body.pps-fullmap .stage-frame {
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  width: 100vw;
  height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--pps-bottom-toolbar-h, 0px));
}

body.pps-fullmap #game {
  width: 100%;
  height: 100%;
  display: block;
}

/* Basic small-screen softenings */
@media (max-width: 960px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.pps-shell {
    overscroll-behavior-y: contain;
  }

  .topbar {
    padding: 0.45rem 0.7rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .topbar-center {
    margin-left: 0;
    order: 3;
    width: 100%;
    display: inline-flex;
    justify-content: flex-start;
    margin-top: 0.15rem;
  }

  .topbar-actions {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .layout {
    padding: 0.5rem 0.6rem 1rem;
    gap: 0.6rem;
  }

  .stage-frame {
    padding: 0.35rem;
    border-radius: 18px;
  }

  #game {
    border-radius: 14px;
  }

  .panel {
    border-radius: 16px;
    padding: 0.65rem 0.75rem;
  }

  .minimap {
    width: 180px;
    height: 110px;
    right: 10px;
    bottom: 10px;
  }
}

/* Very small phones: hide some chrome, keep core sim visible */
@media (max-width: 600px) {
  /* Hide Photo + Achievements on extra-small screens */
  .topbar-actions button:nth-child(1),
  .topbar-actions button:nth-child(2) {
    display: none;
  }

  .version-pill {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout {
    padding: 0.45rem 0.5rem 0.9rem;
  }

  .minimap {
    display: none;
  }
}

/* PPS hide minimap on mobile v1 */
/* Pointer-coarse (touch) OR narrow screens => no minimap */
@media (pointer: coarse), (max-width: 960px) {
  .minimap,
  #minimap,
  .minimap-shell,
  .minimap-container {
    display: none !important;
    visibility: hidden !important;
  }
}