/* Shared mobile / phone viewport hardening for Moshpit Elite public pages.
   Keeps desktop layouts; activates under ~768px. Dark/metal aesthetic unchanged. */

/* Escape hatch on deep docs / magazine pages — thumb-sized, sticky, links to /hub */
nav.to-hub {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 160, 23, 0.4);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
nav.to-hub a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #f5f0e8;
  border: 1px solid rgba(245, 240, 232, 0.4);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
}
nav.to-hub a.home {
  border-color: rgba(57, 255, 20, 0.55);
  color: #39ff14;
  background: rgba(57, 255, 20, 0.08);
}
nav.to-hub a:hover,
nav.to-hub a:focus-visible {
  color: #fff;
  border-color: #ffd700;
  outline: none;
}
nav.to-hub .brand {
  border-color: transparent;
  background: transparent;
  color: #8a929c;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding-left: 8px;
  padding-right: 8px;
}
nav.to-hub .brand:hover,
nav.to-hub .brand:focus-visible {
  color: #ffd700;
  border-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}
pre,
code {
  overflow-x: auto;
  max-width: 100%;
  word-break: break-word;
}
table {
  max-width: 100%;
}
.table-scroll,
.table-box {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

@media (max-width: 768px) {
  body {
    font-size: max(14px, 1rem);
  }
  a,
  button,
  .btn,
  .btn-action,
  .btn-primary,
  .btn-secondary,
  .btn-play-header,
  .nav a,
  .links a,
  .tag-pill,
  .btn-filter,
  input,
  select,
  summary {
    min-height: 44px;
    min-width: 44px;
  }
  .nav-cat-links a,
  .nav a,
  .links a,
  .footer-nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    box-sizing: border-box;
  }
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-action,
  .btn-play-header,
  a.btn,
  a.btn-primary {
    padding: 12px 16px;
    font-size: max(13px, 0.85rem);
  }
}

@media (max-width: 480px) {
  .nav-divider {
    display: none !important;
  }
}
