/* Munmi mobile service foundation · v2.0
   Shared only by public surfaces that do not already own an app-specific dock. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

:where(h1, h2, h3, h4, p, li, td, th, a, button) {
  overflow-wrap: anywhere;
}

.munmi-mobile-dock {
  display: none;
}

@media (max-width: 760px) {
  html.munmi-mobile-shell-enabled body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  html.munmi-mobile-shell-enabled {
    scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  :where(button, input, textarea, select) {
    touch-action: manipulation;
  }

  :where(input, textarea, select) {
    font-size: 16px !important;
  }

  :where(
    button,
    .button,
    .btn,
    .small-button,
    .icon-button,
    .iconbtn,
    .ghostbtn,
    .filter,
    .tab,
    .studio-tab,
    .interaction-action
  ) {
    min-height: 44px;
  }

  :where(.wrap, main, section, article, header, footer, nav, div) {
    min-width: 0;
  }

  :where(pre, table) {
    max-width: 100%;
  }

  pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  dialog {
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }

  .munmi-mobile-dock {
    position: fixed;
    z-index: 45;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    min-height: 62px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    background: rgba(15, 12, 23, .94);
    color: #f8f4fb;
    box-shadow: 0 18px 54px rgba(0, 0, 0, .34);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
  }

  .munmi-mobile-dock a {
    min-width: 0;
    min-height: 50px;
    display: grid;
    grid-template-rows: 21px auto;
    place-items: center;
    align-content: center;
    gap: 3px;
    padding: 5px 2px;
    border-radius: 15px;
    color: rgba(248, 244, 251, .64);
    text-align: center;
    text-decoration: none;
    font: 680 10px/1.1 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
  }

  .munmi-mobile-dock a i {
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    color: rgba(248, 244, 251, .78);
    font: 750 13px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-style: normal;
  }

  .munmi-mobile-dock a[aria-current="page"] {
    color: #fff;
    background: linear-gradient(135deg, rgba(151, 101, 255, .34), rgba(255, 73, 161, .22));
  }

  .munmi-mobile-dock a[aria-current="page"] i {
    color: #cbb8ff;
  }

  /* Legacy artifact docks repeat the same destinations and compete for the
     phone's thumb zone. The service dock becomes the single mobile control. */
  .munmi-project-dock {
    display: none !important;
  }

  @media (prefers-reduced-transparency: reduce) {
    .munmi-mobile-dock {
      background: #110e19;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}
