                                           
                                                                              

:root {
  --z-app: 105;
                                                                          
  --mh-z-settings: 220;
  --mh-z-island: 300;
  --mh-z-p2-sheet: 350;
  --mh-z-theme: 400;
  --mh-z-i18n: 500;                                                       
  --mh-app-bg:
    radial-gradient(120% 55% at 50% -8%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 70%),
    var(--theme-bg);
}
                                     
.mh-island { z-index: var(--mh-z-island, 300); }

                                                           
.mh-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 22px 6px;
  justify-items: center;
  padding: 10px 0 0;
}
.mh-appcell { display: flex; justify-content: center; width: 100%; }

.mh-appicon {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  width: 76px; padding: 0;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.mh-appicon-tile {
  position: relative; display: block;
  width: 60px; height: 60px;
  border-radius: 22.37%;
  overflow: hidden;
  background: var(--mh-icon-bg, #101a17);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14), 0 6px 14px rgb(0 0 0 / .34);
}
.mh-appicon-tile > svg { display: block; width: 100%; height: 100%; }
.mh-appicon-label {
  max-width: 100%;
  font-size: 11px; line-height: 1.2; font-weight: 500;
  color: var(--theme-text);
  text-shadow: 0 1px 3px rgb(0 0 0 / .5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: var(--mh-lab, 1);
}
                                    
.mh-appicon[data-live="true"] .mh-appicon-tile { opacity: 0; }
.mh-appicon:focus-visible .mh-appicon-tile { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.mh-appicon[data-badge="1"] .mh-appicon-tile::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--color-danger); box-shadow: 0 0 0 2px rgb(0 0 0 / .55);
}

.mh-appicon[data-pressed="1"] .mh-appicon-tile { transform: scale(.92); transition: transform .18s cubic-bezier(.22,1,.36,1); filter: brightness(.85); }
.mh-appicon-tile { transition: transform .18s cubic-bezier(.22,1,.36,1), filter .18s ease; }

                                             
.mh-cm-scrim {
  position: fixed; inset: 0; z-index: 9000;
  background: rgb(0 0 0 / 0); opacity: 0; pointer-events: none;
  transition: opacity .22s ease, background-color .22s ease;
}
.mh-cm-scrim[data-open="true"] { opacity: 1; background: rgb(0 0 0 / .18); pointer-events: auto; }

.mh-cm {
  position: fixed; left: var(--mh-cm-x, 50%); top: var(--mh-cm-y, 50%);
  z-index: 9001;
  width: min(220px, calc(100vw - 40px));
  transform: translate3d(-50%, calc(-100% - 14px), 0) scale(.82);
  transform-origin: 50% 100%;
  border-radius: 20px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  align-items: stretch; justify-content: stretch;
  opacity: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .10), rgb(255 255 255 / .025) 48%, rgb(0 0 0 / .08)),
    color-mix(in srgb, #08130f 66%, transparent);
  backdrop-filter: blur(24px) saturate(1.55) brightness(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.55) brightness(1.08);
  border: 1px solid rgb(255 255 255 / .24);
  box-shadow: 0 18px 48px rgb(0 0 0 / .28), 0 2px 12px rgb(0 0 0 / .16),
    inset 0 1px 0 rgb(255 255 255 / .20), inset 0 -1px 0 rgb(0 0 0 / .22);
  transition: transform .32s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.mh-cm[data-open="true"] {
  opacity: 1; pointer-events: auto;
  transform: translate3d(-50%, calc(-100% - 14px), 0) scale(1);
}
.mh-cm-item {
  appearance: none; border: 0; background: transparent; color: var(--theme-text);
  font-size: 15px; font-weight: 500; text-align: left;
  padding: 11px 14px; border-radius: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mh-cm-item:active { background: rgb(255 255 255 / .12); }
.mh-cm-item + .mh-cm-item { position: relative; }
.mh-cm-item + .mh-cm-item::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: rgb(255 255 255 / .12);
}
.mh-cm-item--danger { color: var(--color-danger, #ff453a); }
.mh-cm-item:disabled { opacity: .38; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mh-cm { transition-duration: 1ms !important; } }

                                             
.mh-apps-layer {
  position: absolute; inset: 0;
  z-index: var(--z-app);
  pointer-events: none;
  isolation: isolate;
  overflow: hidden;
}
.mh-apps-scrim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }

.mh-app-win {
  position: absolute; left: 0; top: 0;
  width: 0; height: 0;
  overflow: hidden;
  contain: layout paint style;
  transform-origin: 0 0;
  background: var(--mh-app-bg);
  color: var(--theme-text);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgb(0 0 0 / .42), 0 3px 10px rgb(0 0 0 / .24);
  visibility: hidden;
  pointer-events: none;
  outline: none;
  will-change: transform, width, height;
}
.mh-app-win[data-state="opening"],
.mh-app-win[data-state="open"],
.mh-app-win[data-state="dragging"] { visibility: visible; pointer-events: auto; }
.mh-app-win[data-state="closing"] { visibility: visible; pointer-events: none; }                           

                                         
.mh-app-win[data-docked="true"] {
  width: 100%; height: 100%;
  border-radius: 0; box-shadow: none; transform: none;
  will-change: auto;
}

                                     
.mh-app-face { position: absolute; inset: 0; background: var(--mh-icon-bg, #101a17); pointer-events: none; overflow: hidden; }
.mh-app-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.mh-app-glyph { position: absolute; left: 50%; top: 50%; width: 100px; height: 100px; transform-origin: 50% 50%; }
.mh-app-glyph > svg { display: block; width: 100%; height: 100%; }
.mh-app-win[data-docked="true"] .mh-app-face { display: none; }

                                                   
.mh-app-content {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  transform-origin: 0 0;
  pointer-events: none;
}
.mh-app-win[data-interactive="true"] .mh-app-content { pointer-events: auto; }
.mh-app-body { position: absolute; inset: 0; overflow: hidden; }

                            
.mh-app-x {
                                                                                           
  display: none !important;
  position: absolute; z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: max(14px, env(safe-area-inset-left, 0px));
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(255 255 255 / .12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 0 0 1px rgb(255 255 255 / .07);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.mh-app-x svg { width: 16px; height: 16px; }
                                                                                                   
.mh-app-edge-close {
  position: absolute;
  z-index: 8;
  bottom: 0;
  width: 64px;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent;
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  cursor: pointer;
}
.mh-app-edge-close--left { left: 0; }
.mh-app-edge-close--right { right: 0; }
.mh-app-edge-close:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) { .mh-app-win { will-change: auto; } }
