html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: Manrope, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.14), transparent 30%),
    var(--mm-page-bg);
  color: var(--mm-text);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.mm-shell {
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.1), transparent 30%),
    var(--mm-page-bg);
}

.mm-header {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  align-items: center;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  border-bottom: 0;
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  backdrop-filter: none;
  pointer-events: none;
}

.mm-header > * {
  pointer-events: auto;
}

.mm-header-brand {
  display: none;
}

.mm-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 196, 180, 0.18), rgba(61, 142, 255, 0.18)),
    var(--mm-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mm-brand-meta {
  min-width: 0;
}

.mm-brand-level {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mm-accent);
}

.mm-brand-title {
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-brand-user {
  font-size: 12px;
  color: var(--mm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-main {
  padding: 12px 5.6vw;
  padding-bottom: 28px;
  display: grid;
  gap: 14px;
  align-content: start;
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.mm-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mm-app-section {
  display: grid;
  gap: 12px;
}

.mm-app-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mm-app-section-head h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.mm-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9vw 9vw;
  align-items: start;
}

.mm-launcher-screen {
  display: grid;
  gap: 12px;
  padding-top: 15vw;
}

.mm-launcher-pages {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  gap: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 6px;
}

.mm-launcher-pages::-webkit-scrollbar {
  display: none;
}

.mm-launcher-page {
  scroll-snap-align: start;
  min-width: 0;
}

.mm-launcher-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mm-launcher-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
}

.mm-launcher-dot.active {
  background: rgba(255, 255, 255, 0.88);
  transform: scale(1.2);
}

.mm-app-grid-empty {
  grid-column: 1 / -1;
  padding: 18px 14px;
  border-radius: 18px;
  border: 1px dashed var(--mm-border);
  color: var(--mm-text-muted);
  font-size: 13px;
}

.mm-app-icon-card {
  position: relative;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.mm-app-icon-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.96);
}

.mm-app-icon-card.is-dragging .mm-app-icon-glyph {
  animation: mm-icon-jiggle 0.18s ease-in-out infinite alternate;
}

.mm-app-icon-card.is-drop-target .mm-app-icon-glyph {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

.mm-app-icon-card.mm-animate {
  animation: mm-pop 0.18s ease both;
  animation-delay: var(--mm-pop-delay, 0ms);
}

.mm-app-icon-card.has-tools {
  padding-top: 2px;
}

.mm-app-icon-hit {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--mm-text);
  display: grid;
  grid-template-rows: 15vw auto;
  justify-items: center;
  align-items: center;
  align-content: start;
  gap: 4px;
  padding: 0;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
}

.mm-app-icon-hit:active {
  transform: scale(0.96);
}

.mm-app-icon-glyph {
  width: 15vw;
  height: 15vw;
  min-width: 15vw;
  min-height: 15vw;
  aspect-ratio: 1 / 1;
  flex: 0 0 15vw;
  border-radius: 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.mm-app-glyph-art {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: inherit;
  display: inline-flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 8px 7px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mm-app-glyph-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 46%);
  pointer-events: none;
}

.mm-app-glyph-art__mono,
.mm-app-glyph-art__badge {
  position: relative;
  z-index: 1;
}

.mm-app-glyph-art__mono {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.mm-app-glyph-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.mm-app-glyph-emoji {
  font-size: 26px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.mm-app-glyph-art__badge {
  font-size: 15px;
  line-height: 1;
}

.mm-app-glyph-art-blue { background: linear-gradient(145deg, #10355b, #3d8eff); }
.mm-app-glyph-art-teal { background: linear-gradient(145deg, #0a474f, #00c4b4); }
.mm-app-glyph-art-green { background: linear-gradient(145deg, #103b21, #27ae60); }
.mm-app-glyph-art-orange { background: linear-gradient(145deg, #4a2412, #e67e22); }
.mm-app-glyph-art-purple { background: linear-gradient(145deg, #34154c, #9b59b6); }
.mm-app-glyph-art-gold { background: linear-gradient(145deg, #4a3610, #c9971a); }
.mm-app-glyph-art-red { background: linear-gradient(145deg, #4a1414, #e74c3c); }
.mm-app-glyph-art-dark { background: linear-gradient(145deg, #1b2538, #31425f); }

.mm-app-icon-name,
.mm-app-icon-meta {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-app-icon-name {
  display: block;
  font-size: clamp(9px, 2.8vw, 13px);
  font-weight: 400;
  line-height: 1.15;
  text-shadow: none;
  color: rgba(255, 255, 255, 0.96);
}

.mm-launcher-screen .mm-app-icon-hit {
  grid-template-rows: 15vw;
}

.mm-launcher-screen .mm-app-icon-name {
  display: none;
}

.mm-app-icon-meta {
  display: none;
}

.mm-app-icon-tools {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 4px;
}

.mm-mini-action {
  appearance: none;
  border: 1px solid var(--mm-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mm-text);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}

.mm-mini-action-primary {
  background: linear-gradient(135deg, #00c4b4, #31a8ff);
  border-color: transparent;
  color: #fff;
}

.mm-mini-action-danger {
  color: #ffb7b7;
  border-color: rgba(214, 69, 69, 0.35);
  background: rgba(214, 69, 69, 0.14);
}

.mm-marketplace-admin-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mm-messenger-shell {
  display: grid;
  gap: 12px;
  min-height: 100%;
}

.mm-messenger-shell__tabs {
  position: sticky;
  top: -14px;
  z-index: 2;
  padding-top: 2px;
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.98), rgba(10, 15, 26, 0.92) 76%, rgba(10, 15, 26, 0));
}

.mm-messenger-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-messenger-tabs::-webkit-scrollbar,
.mm-messenger-filter-row::-webkit-scrollbar {
  display: none;
}

.mm-messenger-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mm-text-muted);
  padding: 10px 2px 12px;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  position: relative;
}

.mm-messenger-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00c4b4, #31a8ff);
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
}

.mm-messenger-tab.is-active {
  color: var(--mm-text);
}

.mm-messenger-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.mm-messenger-tab__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(49, 168, 255, 0.16);
  color: var(--mm-text);
  font-size: 10px;
  font-weight: 800;
}

.mm-messenger-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-messenger-toolbar--stacked {
  display: grid;
  gap: 8px;
}

.mm-messenger-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-messenger-shell__panel {
  display: grid;
  gap: 10px;
}

.mm-messenger-list {
  display: grid;
  gap: 10px;
}

.mm-messenger-item,
.mm-messenger-access-card,
.mm-messenger-empty {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 22px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mm-messenger-item__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.mm-messenger-item__title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.mm-messenger-item__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.mm-messenger-item__meta,
.mm-messenger-item__time,
.mm-messenger-item__body,
.mm-messenger-access-card__meta-item {
  color: var(--mm-text-muted);
}

.mm-messenger-item__meta,
.mm-messenger-item__time {
  font-size: 11px;
}

.mm-messenger-item__time {
  text-align: right;
  line-height: 1.35;
  flex: 0 0 auto;
  max-width: 96px;
}

.mm-messenger-item__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.mm-messenger-item__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-messenger-item__actions .mm-button,
.mm-messenger-item__actions .mm-button-secondary {
  flex: 1 1 120px;
  min-height: 38px;
}

.mm-messenger-access-card__meta {
  display: grid;
  gap: 8px;
}

.mm-messenger-access-card__meta-item {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.mm-messenger-access-card__note {
  display: grid;
  gap: 6px;
}

.mm-messenger-access-card__note textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 92px;
  resize: vertical;
  padding: 13px 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
  font: inherit;
}

.mm-messenger-empty {
  min-height: 220px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.mm-messenger-empty__orb {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(145deg, #0b4a55, #00c4b4);
}

.mm-messenger-empty p {
  max-width: 28ch;
  margin: 0;
  color: var(--mm-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.mm-screen-messenger {
  margin: -14px -16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.98), rgba(10, 15, 26, 0.96));
}

.mm-messenger-neo {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
}

.mm-messenger-neo__top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 6px 16px 8px;
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.98), rgba(10, 15, 26, 0.92) 72%, rgba(10, 15, 26, 0.72));
  backdrop-filter: blur(18px);
}

.mm-messenger-neo__tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-messenger-neo__tabs::-webkit-scrollbar,
.mm-messenger-neo__chips::-webkit-scrollbar {
  display: none;
}

.mm-messenger-neo__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(240, 244, 255, 0.58);
  padding: 6px 0 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.mm-messenger-neo__tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00c4b4, #31a8ff);
  opacity: 0;
  transform: scaleX(0.58);
  transition: transform 180ms ease, opacity 180ms ease;
}

.mm-messenger-neo__tab.is-active {
  color: var(--mm-text);
}

.mm-messenger-neo__tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.mm-messenger-neo__tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(214, 69, 69, 0.2);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.mm-messenger-neo__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mm-messenger-neo__toolbar--stacked {
  display: grid;
  gap: 8px;
}

.mm-messenger-neo__chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-messenger-neo__chips .mm-mini-action {
  padding: 7px 11px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(240, 244, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.mm-messenger-neo__chips .mm-mini-action.mm-mini-action-primary {
  color: var(--mm-text);
  background: rgba(0, 196, 180, 0.14);
  border-color: rgba(0, 196, 180, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 196, 180, 0.14);
}

.mm-messenger-neo__body {
  min-height: 0;
  overflow: hidden;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom));
}

.mm-messenger-neo__body.is-chats {
  padding-bottom: 0;
}

.mm-messenger-neo__chat-layout {
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.mm-messenger-neo__scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-messenger-neo__scroll::-webkit-scrollbar {
  display: none;
}

.mm-messenger-neo__scroll--chats {
  padding-bottom: 12px;
}

.mm-messenger-neo__dock {
  position: relative;
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0), rgba(10, 15, 26, 0.84) 20%, rgba(10, 15, 26, 0.98) 44%);
}

.mm-messenger-neo__row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mm-messenger-neo__row.is-expanded {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 22px;
  border-bottom-color: transparent;
  margin-bottom: 10px;
  padding: 14px 12px;
}

.mm-messenger-neo__row.is-selected {
  background: rgba(0, 196, 180, 0.08);
  border-radius: 22px;
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 196, 180, 0.22);
}

.mm-messenger-neo__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.mm-messenger-neo__avatar--teal { background: linear-gradient(145deg, #0b4a55, #00c4b4); }
.mm-messenger-neo__avatar--blue { background: linear-gradient(145deg, #17345a, #3d8eff); }
.mm-messenger-neo__avatar--purple { background: linear-gradient(145deg, #34154c, #9b59b6); }
.mm-messenger-neo__avatar--orange { background: linear-gradient(145deg, #4a2210, #e8580c); }
.mm-messenger-neo__avatar--gold { background: linear-gradient(145deg, #4a3610, #c9971a); }

.mm-messenger-neo__content {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.mm-messenger-neo__row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.mm-messenger-neo__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.mm-messenger-neo__time,
.mm-messenger-neo__meta,
.mm-messenger-neo__preview,
.mm-messenger-neo__detail-block,
.mm-messenger-neo__note-block {
  color: var(--mm-text-muted);
}

.mm-messenger-neo__time {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.35;
}

.mm-messenger-neo__preview {
  font-size: 12px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mm-messenger-neo__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-messenger-neo__meta,
.mm-messenger-neo__badge {
  font-size: 10px;
  line-height: 1.2;
}

.mm-messenger-neo__badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.mm-messenger-neo__counter {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00c4b4, #31a8ff);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.mm-messenger-neo__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.mm-messenger-neo__actions .mm-button,
.mm-messenger-neo__actions .mm-button-secondary {
  flex: 1 1 120px;
  min-height: 38px;
}

.mm-messenger-neo__details {
  display: none;
}

.mm-messenger-neo__details.is-open {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.mm-messenger-neo__detail-grid {
  display: grid;
  gap: 8px;
}

.mm-messenger-neo__detail-block,
.mm-messenger-neo__note-block {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.mm-messenger-neo__note-block textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 92px;
  resize: vertical;
  padding: 13px 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
  font: inherit;
}

.mm-messenger-neo__empty {
  min-height: 100%;
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--mm-text-muted);
}

.mm-messenger-neo__empty-orb {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0b4a55, #00c4b4);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mm-messenger-neo__empty p {
  max-width: 30ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.mm-messenger-neo__composer {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mm-messenger-neo__composer textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 58px;
  max-height: 160px;
  resize: none;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 11, 18, 0.64);
  color: var(--mm-text);
  font: inherit;
}

.mm-messenger-neo__composer textarea:focus {
  outline: none;
  border-color: rgba(0, 196, 180, 0.4);
}

.mm-messenger-neo__composer-context {
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--mm-accent);
  letter-spacing: 0.04em;
}

.mm-messenger-neo__composer-actions {
  display: flex;
  justify-content: flex-end;
}

.mm-messenger-neo__submit {
  min-width: 112px;
  min-height: 44px;
  border-radius: 16px;
}

.mm-messenger-neo__composer--disabled {
  color: var(--mm-text-muted);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.mm-marketplace-root {
  display: grid;
  gap: 12px;
}

.mm-marketplace-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.48);
  z-index: 20;
}

.mm-marketplace-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(10, 14, 24, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.34);
  display: grid;
  gap: 12px;
  max-height: min(76vh, 680px);
  overflow-y: auto;
}

.mm-marketplace-sheet-grabber {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 4px;
}

.mm-marketplace-sheet-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.mm-marketplace-sheet-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.mm-marketplace-sheet-meta h3,
.mm-marketplace-sheet-meta p {
  margin: 0;
}

.mm-marketplace-sheet-meta h3 {
  font-size: 16px;
}

.mm-marketplace-sheet-meta p {
  margin-top: 4px;
  color: var(--mm-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.mm-marketplace-sheet-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.mm-marketplace-sheet-actions .mm-mini-action {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 10px 12px;
}

.mm-install-module-form .mm-button,
.mm-install-module-form .mm-button-secondary {
  width: 100%;
  min-height: 44px;
}

.mm-screen {
  display: grid;
  gap: 14px;
}

.mm-card,
.mm-form-card {
  background: rgba(255, 255, 255, 0.025);
  border: 0;
  border-radius: 24px;
  box-shadow: none;
  padding: 12px 4px;
}

.mm-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mm-section-head h2,
.mm-card h2 {
  margin: 0;
  font-size: 18px;
}

.mm-card-grid {
  display: grid;
  gap: 10px;
}

.mm-card-item {
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 8px;
  transition: transform 160ms ease, background 160ms ease;
}

.mm-card-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.055);
}

.mm-card-item[data-static="true"] {
  cursor: default;
}

.mm-card-item[data-static="true"]:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
}

.mm-card-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.mm-card-item p,
.mm-muted {
  margin: 0;
  color: var(--mm-text-muted);
  line-height: 1.5;
  font-size: 14px;
}

.mm-card-item textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 84px;
  resize: vertical;
  padding: 13px 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
  font: inherit;
}

.mm-entry-card {
  cursor: pointer;
}

.mm-entry-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mm-entry-card:focus-visible {
  outline: 2px solid rgba(49, 168, 255, 0.55);
  outline-offset: 2px;
}

.mm-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mm-button,
.mm-button-secondary,
.mm-button-danger {
  border: 0;
  border-radius: 11px;
  padding: 7px 10px;
  font-weight: 800;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
}

.mm-button {
  background: linear-gradient(135deg, #00c4b4, #31a8ff);
  color: #ffffff;
}

.mm-button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
  border: 0;
}

.mm-button-danger {
  background: rgba(214, 69, 69, 0.18);
  color: #ffb7b7;
  border: 1px solid rgba(214, 69, 69, 0.35);
}

.mm-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.mm-icon-button-danger {
  color: #ffb7b7;
  border-color: rgba(214, 69, 69, 0.35);
  background: rgba(214, 69, 69, 0.14);
}

.landing-screen {
  gap: 16px;
}

.landing-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(0, 196, 180, 0.26), transparent 34%),
    radial-gradient(circle at bottom left, rgba(61, 142, 255, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  min-height: 320px;
}

.landing-hero-copy {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 100%;
}

.landing-hero h1 {
  margin: 0;
  font-size: 36px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 10ch;
}

.landing-badge {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(0, 196, 180, 0.12);
  color: var(--mm-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-card {
  min-height: 84px;
  align-content: start;
}

.landing-list {
  display: grid;
  gap: 8px;
}

.landing-list-item {
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--mm-surface);
  border: 1px solid var(--mm-border);
  color: var(--mm-text);
  font-weight: 700;
}

.landing-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.landing-cta {
  text-align: center;
}

.landing-seo {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.landing-seo-text {
  font-size: 12px;
  line-height: 1.6;
}

.mm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mm-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 196, 180, 0.12);
  color: var(--mm-text);
  font-size: 12px;
  font-weight: 700;
}

.mm-empty {
  padding: 18px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  color: var(--mm-text-muted);
  text-align: center;
}

.mm-form-card form {
  display: grid;
  gap: 10px;
}

.mm-form-card label {
  display: grid;
  gap: 6px;
  color: var(--mm-text-muted);
  font-size: 14px;
}

.mm-form-card input,
.mm-form-card select,
.mm-form-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 16px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
}

.mm-status {
  min-height: 20px;
  color: var(--mm-text-muted);
  font-size: 14px;
}

.mm-status.error {
  color: #ff9d9d;
}

.mm-bottom-nav {
  display: none;
}

.mm-fab {
  display: none !important;
}

.mm-nav-button {
  border: 0;
  background: transparent;
  color: var(--mm-text-muted);
  border-radius: 18px;
  padding: 8px 6px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  min-height: 54px;
  text-align: center;
}

.mm-nav-button.is-empty {
  opacity: 0.24;
}

.mm-nav-button.is-empty .mm-nav-label {
  visibility: hidden;
}

.mm-nav-icon {
  font-size: 18px;
  line-height: 1;
}

.mm-nav-label {
  font-size: 11px;
  line-height: 1.1;
}

.mm-nav-button.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mm-text);
}

html[data-office-theme="phone-home-theme"] body {
  background:
    radial-gradient(circle at top center, rgba(88, 130, 255, 0.24), transparent 30%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.16), transparent 26%),
    linear-gradient(180deg, #081019 0%, #0c1624 100%);
}

html[data-office-theme="phone-home-theme"] .mm-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(5, 11, 19, 0.82);
}

html[data-office-theme="phone-home-theme"] .mm-logo {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

html[data-office-theme="phone-home-theme"] .mm-bottom-nav {
  background: rgba(10, 16, 25, 0.92);
  backdrop-filter: blur(24px);
}

html[data-office-theme="phone-home-theme"] .mm-nav-button {
  border-radius: 18px;
}

.mm-phone-home-screen {
  gap: 18px;
}

.mm-phone-hero {
  padding: 22px 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.28), transparent 32%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.20), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22);
}

.mm-phone-hero-badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--mm-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mm-phone-hero h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.mm-phone-hero p {
  margin: 10px 0 0;
  color: var(--mm-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.mm-phone-section {
  display: grid;
  gap: 12px;
}

.mm-phone-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.mm-phone-section-head h3 {
  margin: 0;
  font-size: 17px;
}

.mm-phone-section-head p {
  margin: 0;
  color: var(--mm-text-muted);
  font-size: 12px;
}

.mm-phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 12px;
}

.mm-phone-grid-secondary {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mm-phone-app {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(11, 20, 30, 0.88);
  color: var(--mm-text);
  border-radius: 24px;
  padding: 14px 12px;
  min-height: 126px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mm-phone-app:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 196, 180, 0.32);
}

.mm-phone-app-accent {
  background:
    radial-gradient(circle at top center, rgba(0, 196, 180, 0.16), transparent 54%),
    rgba(11, 20, 30, 0.92);
}

.mm-phone-app-static {
  cursor: default;
}

.mm-phone-app-static:hover {
  transform: none;
}

.mm-phone-app-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(135deg, rgba(61, 142, 255, 0.28), rgba(0, 196, 180, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.mm-phone-app-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.mm-phone-app-meta {
  color: var(--mm-text-muted);
  font-size: 11px;
  line-height: 1.2;
}

@media (min-width: 900px) {
  .mm-main {
    max-width: 1080px;
    margin: 0 auto;
    width: 100%;
    padding-top: 22px;
  }

  .mm-card-grid.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-card-grid.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-hero h1 {
    font-size: 58px;
    max-width: 11ch;
  }

  .landing-hero {
    min-height: 380px;
  }
}

@media (max-width: 720px) {
  .mm-phone-hero h2 {
    font-size: 24px;
  }

  .mm-phone-grid,
  .mm-phone-grid-secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mm-phone-app {
    min-height: 112px;
    border-radius: 22px;
    padding: 12px 10px;
  }

  .mm-phone-app-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* ── Phone home: page dots ───────────────────────────────────── */
.mm-phone-pages-wrap {
  overflow: hidden;
}

.mm-phone-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 2px;
}

.mm-phone-dot {
  appearance: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  padding: 0;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.mm-phone-dot.active {
  background: var(--mm-accent, #00c4b4);
  transform: scale(1.3);
}

/* ── mobile-launch-theme ─────────────────────────────────────── */
html[data-office-theme="mobile-launch-theme"],
html[data-office-theme="mobile-launch-theme"] body {
  height: 100dvh;
  overflow: hidden;
}

html[data-office-theme="mobile-launch-theme"] body {
  background: #0a0f1a;
  max-width: 430px;
  margin: 0 auto;
}

html[data-office-theme="mobile-launch-theme"] .mm-shell {
  min-height: 100dvh;
  display: block;
}

html[data-office-theme="mobile-launch-theme"] .mm-header {
  display: none !important;
}

html[data-office-theme="mobile-launch-theme"] .mm-main {
  min-height: 100dvh;
  padding: 0;
  display: block;
}

html[data-office-theme="mobile-launch-theme"] .mm-fab {
  display: none !important;
}

html[data-office-theme="mobile-launch-theme"] .mm-bottom-nav {
  display: none !important;
}

html[data-office-theme="mobile-launch-theme"] .mm-status {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 402px;
  z-index: 500;
}

.mm-launch-shell {
  position: relative;
  min-height: 100dvh;
  background: #0a0f1a;
  color: #f0f4ff;
  overflow: hidden;
}

.mm-launch-shell,
.mm-launch-shell * {
  box-sizing: border-box;
}

.mm-launch-topbar {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  position: relative;
  z-index: 4;
  transition: transform 0.3s;
}

.mm-launch-topbar.hidden {
  transform: translateY(-100%);
}

.mm-launch-topbar-av {
  appearance: none;
  border: 0;
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d3d4a, #00c4b4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
}

.mm-launch-topbar-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mm-launch-topbar-name {
  font-size: 13px;
  font-weight: 700;
}

.mm-launch-topbar-dept {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.mm-launch-topbar-dept.show {
  opacity: 1;
  transform: none;
}

.mm-launch-topbar-sep {
  font-size: 11px;
  color: #5a6a88;
  flex-shrink: 0;
}

.mm-launch-topbar-dname {
  font-size: 12px;
  font-weight: 700;
  color: #00c4b4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-launch-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mm-launch-topbar-lang {
  font-size: 11px;
  font-weight: 600;
  color: #5a6a88;
}

.mm-launch-topbar-user {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 196, 180, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.mm-launch-pages-track {
  position: absolute;
  inset: 44px 0 0 0;
  overflow: hidden;
}

.mm-launch-pages-inner {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.mm-launch-page {
  width: 100%;
  flex: 0 0 100%;
  height: 100%;
  overflow-y: auto;
  padding: 10px 14px 30px;
  display: block;
  scrollbar-width: none;
}

.mm-launch-page::-webkit-scrollbar {
  display: none;
}

.mm-launch-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-launch-profile-name {
  font-size: 16px;
  font-weight: 800;
  flex: 1;
}

.mm-launch-profile-role {
  font-size: 10px;
  font-weight: 700;
  color: #00c4b4;
  background: rgba(0, 196, 180, 0.1);
  border-radius: 6px;
  padding: 3px 8px;
}

.mm-launch-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 9px 12px;
  margin: 0 0 18px;
  color: #5a6a88;
}

.mm-launch-search-icon {
  font-size: 14px;
}

.mm-launch-search-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #5a6a88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-launch-search-cmd {
  font-size: 10px;
  color: #5a6a88;
  background: #1a2235;
  border-radius: 5px;
  padding: 2px 6px;
}

.mm-launch-block,
.mm-launch-record-wrap {
  margin-bottom: 20px;
}

.mm-launch-block-title,
.mm-launch-page-kicker,
.mm-launch-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a6a88;
  margin-bottom: 10px;
}

.mm-launch-record-wrap .mm-launch-section-label {
  margin-bottom: 10px;
}

.mm-launch-doors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mm-launch-door {
  appearance: none;
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #111827;
  color: #f0f4ff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 140ms ease, border-color 140ms ease;
}

.mm-launch-door:active,
.mm-launch-tool:active,
.mm-launch-market-card:active,
.mm-launch-inline:active {
  transform: scale(0.98);
}

.mm-launch-door-stripe {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: #00c4b4;
}

.mm-launch-door-orange .mm-launch-door-stripe { background: #e8580c; }
.mm-launch-door-blue .mm-launch-door-stripe { background: #3d8eff; }
.mm-launch-door-green .mm-launch-door-stripe { background: #27ae60; }
.mm-launch-door-purple .mm-launch-door-stripe { background: #9b59b6; }
.mm-launch-door-gold .mm-launch-door-stripe { background: #c9971a; }
.mm-launch-door-slate .mm-launch-door-stripe { background: #64748b; }
.mm-launch-door-teal .mm-launch-door-stripe { background: #00c4b4; }

.mm-launch-door-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mm-launch-door-icon {
  font-size: 24px;
}

.mm-launch-door-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 800;
  color: #5a6a88;
}

.mm-launch-door-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.mm-launch-door-sub {
  font-size: 10px;
  color: #5a6a88;
  line-height: 1.3;
}

.mm-launch-tools-grid,
.mm-launch-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
}

.mm-launch-tools-grid.is-department {
  margin-bottom: 20px;
}

.mm-launch-tool {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f0f4ff;
  border-radius: 12px;
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.mm-launch-tool:active,
.mm-launch-market-card:active {
  background: #1a2235;
}

.mm-launch-tool[data-static="true"] {
  cursor: default;
}

.mm-launch-tool.is-accent {
  color: #f0f4ff;
}

.mm-launch-tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  position: relative;
}

.mm-launch-tool-label {
  width: 100%;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-launch-tool-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  border: 1.5px solid #0a0f1a;
  background: #e8580c;
  color: #f0f4ff;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mm-launch-tone-teal {
  background: linear-gradient(145deg, #0b4a55, #00c4b4);
}

.mm-launch-tone-blue {
  background: linear-gradient(145deg, #0d2a4a, #3d8eff);
}

.mm-launch-tone-orange {
  background: linear-gradient(145deg, #3d1a0d, #e8580c);
}

.mm-launch-tone-purple {
  background: linear-gradient(145deg, #2a0d3d, #9b59b6);
}

.mm-launch-tone-green {
  background: linear-gradient(145deg, #0d3d1a, #27ae60);
}

.mm-launch-tone-gold {
  background: linear-gradient(145deg, #3d2e0d, #c9971a);
}

.mm-launch-tone-dark {
  background: #1a2235;
}

.mm-launch-tone-red {
  background: linear-gradient(145deg, #3d0d0d, #e74c3c);
}

.mm-launch-record-list {
  display: flex;
  flex-direction: column;
}

.mm-launch-record {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mm-launch-record:last-child {
  border-bottom: none;
}

.mm-launch-record-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.mm-launch-record-info {
  flex: 1;
  min-width: 0;
}

.mm-launch-record-title {
  font-size: 13px;
  font-weight: 600;
}

.mm-launch-record-sub {
  font-size: 11px;
  color: #5a6a88;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-launch-record-time {
  font-size: 10px;
  color: #5a6a88;
  flex-shrink: 0;
}

.mm-launch-record-arrow {
  font-size: 16px;
  color: #5a6a88;
  flex-shrink: 0;
}

.mm-launch-market-card {
  appearance: none;
  min-width: 0;
  background: transparent;
  color: #f0f4ff;
  border-radius: 12px;
  border: 0;
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
}

.mm-launch-market-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
}

.mm-launch-market-name {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.mm-launch-market-meta {
  font-size: 9px;
  color: #5a6a88;
}

.mm-launch-market-check {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #0a0f1a;
  background: #00c4b4;
  color: #0a0f1a;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mm-launch-dots {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.3s;
}

.mm-launch-dots.show {
  opacity: 1;
}

.mm-launch-dot {
  appearance: none;
  border: 0;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: #5a6a88;
  cursor: pointer;
  opacity: 0.3;
  transition: all 0.3s;
}

.mm-launch-dot.active {
  width: 22px;
  background: #00c4b4;
  opacity: 1;
}

.mm-launch-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #5a6a88;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .mm-app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mm-launch-page {
    padding-bottom: 28px;
  }

  .mm-launch-tool-icon,
  .mm-launch-market-icon {
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .mm-app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── iPhone-style desktop shell ── */

.mm-main {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* Dock — iPhone floating pill */
.mm-desktop-dock {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  /* iPhone dark dock glass */
  background: rgba(28, 28, 34, 0.82);
  backdrop-filter: blur(44px) saturate(1.9);
  -webkit-backdrop-filter: blur(44px) saturate(1.9);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  /* Не растягивать на всю ширину */
  width: auto;
  min-width: 0;
  pointer-events: auto;
}

.mm-dock-slot {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--mm-text);
  transition: opacity 0.15s, transform 0.12s;
  padding: 4px 6px;
  overflow: visible;
  position: relative;
  z-index: 81;
  touch-action: manipulation;
}

.mm-dock-slot:active {
  transform: scale(0.88);
  opacity: 0.8;
}

.mm-dock-slot.is-empty {
  border: 0;
  background: transparent;
  opacity: 0.28;
}

.mm-dock-slot.is-empty:active {
  opacity: 0.42;
}

.mm-dock-slot.is-active .mm-dock-icon {
  filter: brightness(1.25) drop-shadow(0 0 6px rgba(61, 142, 255, 0.55));
}

.mm-dock-icon {
  font-size: 28px;
  line-height: 1;
  width: 14vw;
  height: 14vw;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mm-dock-icon .mm-app-glyph-art {
  width: 14vw;
  height: 14vw;
  padding: 8px 8px 7px;
  border-radius: 3.7vw;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.mm-dock-icon .mm-app-glyph-art__mono {
  font-size: 18px;
}

.mm-dock-icon .mm-app-glyph-art__badge {
  font-size: 15px;
}

.mm-market-card-list {
  display: grid;
  gap: 12px;
}

.mm-market-card {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 22px;
  color: var(--mm-text);
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.mm-market-card:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.06);
}

.mm-market-card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mm-market-card__icon .mm-app-glyph-art {
  width: 56px;
  height: 56px;
}

.mm-market-card__body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mm-market-card__title,
.mm-market-card__meta,
.mm-market-card__desc {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-market-card__title {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.mm-market-card__meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--mm-accent);
  white-space: nowrap;
}

.mm-market-card__desc {
  font-size: 11px;
  line-height: 1.35;
  color: var(--mm-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.mm-market-card__cta {
  align-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(61, 142, 255, 0.18);
  color: var(--mm-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mm-dock-label {
  font-size: 9px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 58px;
  color: var(--mm-text-muted);
}

/* App overlay — iPhone zoom open */
.mm-app-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.1), transparent 28%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.09), transparent 30%),
    var(--mm-page-bg);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform, opacity;
  pointer-events: none;
}

.mm-app-overlay[hidden] {
  display: flex !important;
}

.mm-app-overlay:not([hidden]) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Messenger не масштабируем — у него своя логика */
.mm-app-overlay[data-app="messenger-v2"] {
  transform: scale(1) !important;
  opacity: 1 !important;
}

.mm-app-overlay:not([hidden]) .mm-app-overlay-body {
  animation: mm-overlay-fade 0.22s ease;
}

.mm-app-overlay-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
  padding-top: calc(12px + env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  min-height: 52px;
}

.mm-app-overlay-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mm-accent);
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  padding: 2px 10px 2px 0;
  line-height: 1;
  flex-shrink: 0;
}

.mm-app-overlay-title {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-app-overlay-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 14px 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
  align-content: start;
}

#mm-app-overlay[data-app="marketplace"] .mm-app-overlay-body {
  touch-action: pan-x pan-y;
}

.mm-app-overlay-body[data-app-type="messenger-v2"] {
  overflow: hidden;
  padding: 0;
  display: flex;
  gap: 0;
  align-content: unset;
}

.mm-app-overlay-body[data-app-type="messenger-v2"] > .mm-screen-messenger {
  flex: 1;
  min-height: 0;
}

.mm-fullscreen-app {
  position: fixed;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(circle at top right, rgba(61, 142, 255, 0.1), transparent 28%),
    radial-gradient(circle at bottom left, rgba(0, 196, 180, 0.09), transparent 30%),
    var(--mm-page-bg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform, opacity;
  pointer-events: none;
}

.mm-fullscreen-app:not([hidden]) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.mm-fullscreen-app[hidden] {
  display: none !important;
}

.mm-fullscreen-app-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mm-fullscreen-app-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  gap: 0;
}

.mm-fullscreen-app-body > .mm-screen-messenger {
  margin: 0;
  flex: 1;
  min-height: 0;
}

.mm-fullscreen-app-body > .mm-screen-personal-browser {
  margin: 0;
  flex: 1;
  min-height: 0;
}

.mm-browser-shell {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at top left, rgba(61, 142, 255, 0.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(0, 196, 180, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.mm-browser-shell__chrome,
.mm-browser-shell__bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mm-browser-shell__profiles,
.mm-browser-shell__toolbar,
.mm-browser-shell__composer-actions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mm-browser-shell__profiles::-webkit-scrollbar,
.mm-browser-shell__toolbar::-webkit-scrollbar,
.mm-browser-shell__composer-actions::-webkit-scrollbar {
  display: none;
}

.mm-browser-shell__profile {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  color: #f6fbff;
  border-radius: 999px;
  padding: 8px 12px;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mm-browser-shell__profile.is-active {
  border-color: rgba(0, 196, 180, 0.5);
  background: linear-gradient(145deg, rgba(0, 196, 180, 0.18), rgba(61, 142, 255, 0.14));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.mm-browser-shell__profile--new {
  border-style: dashed;
  border-color: rgba(255,255,255,0.16);
}

.mm-browser-shell__profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #f6fbff;
}

.mm-browser-shell__profile-meta {
  display: none;
}

.mm-browser-shell__create,
.mm-browser-shell__address,
.mm-browser-shell__composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.mm-browser-shell__create-actions {
  display: flex;
  gap: 8px;
}

.mm-browser-shell__input,
.mm-browser-shell__textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8, 13, 20, 0.72);
  color: #f6fbff;
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.mm-browser-shell__input::placeholder,
.mm-browser-shell__textarea::placeholder {
  color: rgba(255,255,255,0.34);
}

.mm-browser-shell__input:focus,
.mm-browser-shell__textarea:focus {
  border-color: rgba(61, 142, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(61, 142, 255, 0.16);
}

.mm-browser-shell__address {
  flex-direction: row;
  align-items: center;
}

.mm-browser-shell__input--url {
  flex: 1;
  min-width: 0;
}

.mm-browser-shell__viewport-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.mm-browser-shell__viewport {
  appearance: none;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.28);
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 18px 42px rgba(0,0,0,0.26);
}

.mm-browser-shell__viewport-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mm-browser-shell__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mm-browser-shell__meta--overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.5), rgba(7, 11, 18, 0.88));
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.mm-browser-shell__meta-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.mm-browser-shell__meta-name {
  font-size: 12px;
  font-weight: 800;
  color: #f6fbff;
}

.mm-browser-shell__meta-title {
  font-size: 12px;
  color: rgba(255,255,255,0.74);
}

.mm-browser-shell__meta-url,
.mm-browser-shell__hint {
  font-size: 11px;
  line-height: 1.3;
}

.mm-browser-shell__meta-url {
  color: rgba(255,255,255,0.46);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mm-browser-shell__hint {
  color: #ffd27a;
}

.mm-browser-shell__textarea {
  min-height: 52px;
  max-height: 76px;
  resize: none;
}

.mm-browser-shell__empty {
  flex: 1;
  min-height: 0;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: rgba(255,255,255,0.68);
}

.mm-browser-shell__toolbar .mm-mini-action,
.mm-browser-shell__composer-actions .mm-button-secondary {
  padding: 8px 10px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.mm-browser-shell__address .mm-button {
  min-width: 44px;
  padding-inline: 12px;
}

.mm-browser-shell__empty strong {
  color: #f6fbff;
  font-size: 16px;
}

.mm-browser-shell__empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  max-width: 280px;
}

.mm-browser-shell__empty-orb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(61, 142, 255, 0.26), rgba(0, 196, 180, 0.22));
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.mm-marketplace-grid .mm-launcher-pages {
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

@keyframes mm-icon-jiggle {
  from { transform: rotate(-2deg) scale(0.98); }
  to { transform: rotate(2deg) scale(1.02); }
}

@keyframes mm-pop {
  from { transform: scale(0.94); opacity: 0.2; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes mm-overlay-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hide old elements */
.mm-bottom-nav,
.mm-fab {
  display: none !important;
}

/* ── Full-screen desktop grid ── */

.mm-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.mm-main {
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  align-content: unset;
  gap: 0;
  /* Отступ под fixed header (≈56px) + safe-area для notch/Dynamic Island */
  padding-top: calc(env(safe-area-inset-top) + 56px);
  padding-left: 0;
  padding-right: 0;
  /* Dock pill: 10px bottom + 92px height + 18px запас */
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
}

.mm-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px;
}

.mm-launcher-screen {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}


.mm-launcher-pages {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

/* Samsung Fold 7 inner + large displays: 2 pages side by side, iPhone proportions preserved */
/* Fold 7 inner screen = ~720px CSS width (1440px / DPR 2.0), outer = ~412px */
@media (min-width: 600px) and (max-width: 1400px) {
  .mm-launcher-pages {
    grid-auto-columns: 50%;
  }
  .mm-launcher-page {
    padding: 0 8px;
  }
}

.mm-launcher-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.mm-app-grid-full {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 9vw 9vw;
  padding: 0 5.6vw 0;
  align-content: start;
  align-items: start;
}

@media (max-height: 760px) {
  .mm-app-icon-glyph {
    width: 15vw;
    height: 15vw;
    border-radius: 4vw;
  }
  .mm-app-grid-full {
    padding: 0 5.6vw 0;
    gap: 9vw 9vw;
  }
}

/* Empty droppable cell */
.mm-empty-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  min-height: 72px;
  transition: background 0.15s;
}

.mm-empty-slot.is-drop-target {
  background: rgba(61, 142, 255, 0.15);
  outline: 1.5px dashed rgba(61, 142, 255, 0.5);
  outline-offset: -2px;
}

/* Dock drag-over state */
.mm-dock-slot.is-drag-over {
  background: rgba(61, 142, 255, 0.28);
  transform: scale(1.1);
  transition: background 0.1s, transform 0.1s;
}

.mm-launcher-dots {
  flex-shrink: 0;
  padding: 8px 0 6px;
}

/* ============================================================
   Superadmin Platform Mode — edge-to-edge, iOS-style
   ============================================================ */

html.is-superadmin-platform .mm-shell {
  /* Нейтральный тёмно-серый — ближе к Samsung/iOS */
  background: #1c1c1e;
}

html.is-superadmin-platform .mm-header {
  /* Transparent floating header — only profile button lives here */
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}

html.is-superadmin-platform .mm-header > * {
  pointer-events: auto;
}

/* Hide the heavy MM logo + level/title/user block */
html.is-superadmin-platform .mm-header-brand {
  display: none;
}

/* ── Gate controls: унифицируем язык + профиль ── */
html.is-superadmin-platform #mm-gate-root {
  margin-left: auto;
}

/* Обе кнопки — одинаковые круглые, 42×42 */
html.is-superadmin-platform #mm-gate-root .mm-gate-button {
  width: 42px;
  height: 42px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  /* Показываем только первый символ (флаг-эмодзи), остальное обрезаем */
  font-size: 22px;
  line-height: 42px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  /* Двигаем текст так чтобы флаг был по центру, "RU" уходит за край */
  text-indent: -0.05em;
  word-spacing: 999px;
  /* Frosted glass */
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html.is-superadmin-platform #mm-gate-root .mm-gate-button.primary {
  background: rgba(61, 142, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 14px rgba(61, 142, 255, 0.4);
  word-spacing: normal;
  text-indent: 0;
}

/* Выпадающее меню — стекло с blur */
html.is-superadmin-platform #mm-gate-root .mm-gate-menu {
  background: rgba(18, 26, 42, 0.82);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 10px;
  min-width: 200px;
}

html.is-superadmin-platform #mm-gate-root .mm-gate-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  padding: 4px 8px 8px;
}

html.is-superadmin-platform #mm-gate-root .mm-gate-menu-item {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  border: 0;
  background: transparent;
  color: #f0f4ff;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

html.is-superadmin-platform #mm-gate-root .mm-gate-menu-item:active {
  background: rgba(255,255,255,0.1);
}

html.is-superadmin-platform #mm-gate-root .mm-gate-menu-item.danger {
  color: #ff6b6b;
}

/* Сама полоска gate-controls — горизонтальный ряд */
html.is-superadmin-platform #mm-gate-root .mm-gate {
  display: flex;
  gap: 10px;
  align-items: center;
}

html.is-superadmin-platform #mm-gate-root .mm-gate-group {
  position: relative;
}

html.is-superadmin-platform .mm-app-icon-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Убираем подпись "Platform" / "Тенанты" — чисто как в Samsung */
html.is-superadmin-platform .mm-app-icon-meta {
  display: none;
}

/* ── Dock: скрыт — в Command Center он не нужен ── */
html.is-superadmin-platform .mm-desktop-dock {
  display: none;
}

html.is-superadmin-platform .mm-main {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* ============================================================
   iPhone UI Round 2 — Gate, Dock, Icons
   Цель: ~85% сходства с iPhone home screen
   НЕ ТРОГАТЬ: html.is-superadmin-platform секцию выше
   ============================================================ */

/* ── ШАГ 1: Gate кнопки — круглые, маленькие, не перекрывают иконки ── */
#mm-gate-root .mm-gate-button {
  width: 36px;
  height: 36px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-indent: -0.05em;
  word-spacing: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

#mm-gate-root .mm-gate-button.primary {
  background: rgba(61, 142, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
  font-size: 15px;
  word-spacing: normal;
  text-indent: 0;
}

#mm-gate-root .mm-gate {
  display: flex;
  gap: 8px;
  align-items: center;
}

#mm-gate-root .mm-gate-group {
  position: relative;
}

/* ── ШАГ 3: Доко — pill стили перенесены в базовый .mm-desktop-dock (Round 3) ── */

/* ── ШАГ 4: Dock label — лёгкий шрифт как iPhone ── */
.mm-dock-label {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* ── Версионная метка — маленький бейдж в углу для проверки что CSS загружен ── */
html:not(.is-superadmin-platform) .mm-shell::after {
  content: "CSS 20260403f";
  position: fixed;
  bottom: 6px;
  left: 6px;
  font-size: 9px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 9999;
  pointer-events: none;
  font-family: monospace;
}

/* ============================================================
   Round 4 — Иконки 100% как iPhone: единый squircle стандарт
   ============================================================ */

/* Все иконки теперь через squircle (mm-app-glyph-art).
   mm-app-icon-glyph — просто контейнер, не рисует собственный фон */
.mm-app-icon-glyph {
  background: none !important;
  box-shadow: none !important;
  font-size: 0;
}

/* mm-app-glyph-art растягивается на весь контейнер, эмодзи по центру */
.mm-app-icon-glyph > .mm-app-glyph-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* Эмодзи по центру — увеличен до иконочного размера */
.mm-app-icon-glyph > .mm-app-glyph-art > .mm-app-glyph-emoji {
  font-size: 32px;
  line-height: 1;
  position: relative;
  z-index: 1;
  align-self: center;
}

/* Dock: squircle тоже по центру */
.mm-dock-icon > .mm-app-glyph-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-dock-icon > .mm-app-glyph-art > .mm-app-glyph-emoji {
  font-size: 34px;
  line-height: 1;
  position: relative;
  z-index: 1;
  align-self: center;
}

/* ============================================================
   Round 5 — iPhone визуальное сходство: обои + dock + детали
   ============================================================ */

/* 1. Обои — главное отличие от iPhone. Тёмный градиент как iPhone Dark wallpaper */
html:not(.is-superadmin-platform) body {
  background:
    radial-gradient(ellipse at 15% 10%, rgba(120, 60, 220, 0.55) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 5%,  rgba(30, 100, 200, 0.45) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(180, 50, 100, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 20% 85%, rgba(20, 80, 160, 0.4)  0%, transparent 45%),
    #06070f;
}

html:not(.is-superadmin-platform) .mm-shell {
  background: transparent;
}

html:not(.is-superadmin-platform) .mm-launcher-screen {
  background: transparent;
}

/* 2. Dock — убрать подписи (на iPhone в доке НЕТ текста под иконками) */
html:not(.is-superadmin-platform) .mm-dock-label {
  display: none;
}

/* 3. Dock pill — убрать лишние отступы слота чтобы pill был компактным */
html:not(.is-superadmin-platform) .mm-dock-slot {
  padding: 2px 4px;
}

/* 4. Иконки на тёмном фоне — чуть светлее тень для глубины */
html:not(.is-superadmin-platform) .mm-app-icon-glyph > .mm-app-glyph-art {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 5. Имена иконок — по ТЗ пропорций */
html:not(.is-superadmin-platform) .mm-app-icon-name {
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(9px, 2.8vw, 13px);
  font-weight: 400;
  text-shadow: none;
}
