/* Small screens and touch. Every target is at least 44 px; nothing scrolls sideways. */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 900px) {
  .room-titles { top: calc(72px + var(--safe-t)); padding: 8px 14px; max-width: calc(100vw - 28px); }
  .room-titles h1 { font-size: clamp(22px, 6vw, 30px); }
  .room-exit { left: calc(10px + var(--safe-l)); top: calc(10px + var(--safe-t)); }
  .room-tools { right: calc(10px + var(--safe-r)); top: calc(10px + var(--safe-t)); gap: 6px; }
  .room-tools .pill, .room-exit { padding: 10px 13px; font-size: 12.5px; }
  .room-caption { display: none; }
  .world-nav { bottom: calc(10px + var(--safe-b)); max-width: calc(100vw - 16px); }
  .world-nav button { padding: 0 11px; font-size: 12.5px; }
  .room-guide { left: 50%; transform: translateX(-50%); bottom: calc(68px + var(--safe-b)); }
  .room-guide-menu { left: 50%; transform: translateX(-50%); }
  .hotspot-card { min-width: 0; padding: 10px 14px 11px; }
  .hotspot-card strong { font-size: 19px; } .hotspot-card small { font-size: 12px; }
  .episode { grid-template-columns: 1fr; } .episode-art { width: 64px; height: 64px; }
  .book-card { grid-template-columns: 1fr; } .book-cover { max-width: 180px; margin: 0 auto; }
  .agenda li { grid-template-columns: 58px 1fr; gap: 12px; padding: 12px; }
  .cal-ev { display: none; } .cal-day { min-height: 46px; align-items: center; padding: 6px 2px; }
  button.cal-day::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
  .cal-head h2 { min-width: 0; font-size: 24px; }
  .section-crumbs > :not(.section-back) { display: none; }
  .setting { flex-wrap: wrap; }
  .player time { min-width: 0; }
}
/* portrait phones: hotspots that fall outside the cropped photograph are still reachable from "Explore this space" */
@media (max-aspect-ratio: 3/4) {
  .room-photo-box { transform: translate(-50%, -50%) scale(1); }
  .hotspot { transform: translate(-50%, -100%) scale(.92); }
}
@media (max-height: 480px) and (min-aspect-ratio: 1/1) {
  .room-titles { display: none; } .room-caption { display: none; }
  .world-nav { bottom: calc(6px + var(--safe-b)); } .room-guide { bottom: calc(6px + var(--safe-b)); }
  .hotspot-card { padding: 8px 12px; min-width: 0; } .hotspot-card strong { font-size: 17px; } .hotspot-stem { height: 12px; }
  .section-body > header { padding-bottom: 14px; } .section-body > header h1 { font-size: 34px; }
}
@media (max-width: 520px) {
  .world-nav { left: 8px; right: 8px; transform: none; max-width: none; justify-content: space-between; }
  .world-nav button { flex: 1 1 auto; padding: 0 4px; font-size: 12px; letter-spacing: 0; }
  .room-tools .pill, .room-exit { padding: 10px 10px; font-size: 12px; }
}
