.han-mcm-root,
.han-mcm-root * {
  box-sizing: border-box;
}

.han-mcm-root {
  position: relative;
  z-index: 999999;
  font-family: inherit;
}

.han-mcm-bottom {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  align-items: stretch;
  justify-content: space-between;
  background: var(--han-mcm-button-bg);
  border: 1px solid var(--han-mcm-border);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.12);
}

.han-mcm-item,
.han-mcm-item:visited,
.han-mcm-item:hover {
  flex: 1 1 0;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--han-mcm-button-icon);
  text-decoration: none;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.han-mcm-item i {
  font-size: 18px;
  line-height: 1;
}

.han-mcm-item:hover,
.han-mcm-item:focus-visible {
  background: rgba(47, 52, 59, .06);
  transform: translateY(-1px);
  outline: none;
}

.han-mcm-overlay {
  position: fixed;
  inset: 0;
  background: var(--han-mcm-overlay);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

.han-mcm-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(calc(100vw - 28px), var(--han-mcm-panel-width));
  max-width: 100%;
  height: 100dvh;
  background: var(--han-mcm-panel-bg);
  color: var(--han-mcm-panel-text);
  transform: translateX(-104%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--han-mcm-border);
  box-shadow: 12px 0 35px rgba(17,24,39,.12);
  overflow: hidden;
}

.han-mcm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--han-mcm-border);
}

.han-mcm-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.han-mcm-brand strong {
  font-size: 18px;
  line-height: 1.3;
  color: var(--han-mcm-panel-text);
}

.han-mcm-brand span {
  font-size: 13px;
  color: var(--han-mcm-panel-muted);
}

.han-mcm-brand.is-logo img {
  display: block;
  width: auto;
  height: var(--han-mcm-logo-size);
  max-width: 100%;
  object-fit: contain;
}

.han-mcm-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--han-mcm-border);
  background: #fff;
  color: var(--han-mcm-panel-text);
  cursor: pointer;
}

.han-mcm-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--han-mcm-border);
}

.han-mcm-quick-action {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--han-mcm-border);
  background: #fff;
  color: var(--han-mcm-panel-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}

.han-mcm-quick-action:hover,
.han-mcm-quick-action:focus-visible {
  background: rgba(47,52,59,.04);
  transform: translateY(-1px);
  outline: none;
}

.han-mcm-nav-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 100px;
}

.han-mcm-menu-list,
.han-mcm-menu-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.han-mcm-menu-list > li {
  border-top: 1px solid var(--han-mcm-border);
}

.han-mcm-menu-list > li:last-child {
  border-bottom: 1px solid var(--han-mcm-border);
}

.han-mcm-menu-list li {
  position: relative;
}

.han-mcm-menu-list a {
  display: block;
  text-decoration: none;
  color: var(--han-mcm-panel-text);
  padding: 15px 18px;
  padding-right: 58px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.han-mcm-menu-list .sub-menu {
  display: none;
  background: rgba(47,52,59,.025);
}

.han-mcm-menu-list .sub-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--han-mcm-panel-text);
  padding-left: 30px;
}

.han-mcm-menu-list .sub-menu .sub-menu a {
  padding-left: 42px;
}

.han-mcm-toggle {
  position: absolute;
  right: 12px;
  top: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--han-mcm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--han-mcm-panel-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease;
}

.han-mcm-has-children.is-open > .han-mcm-toggle i {
  transform: rotate(180deg);
}

.han-mcm-empty {
  padding: 18px;
  color: var(--han-mcm-panel-muted);
  font-size: 14px;
}

body.han-mcm-opened {
  overflow: hidden;
}

body.han-mcm-opened .han-mcm-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.han-mcm-opened .han-mcm-panel {
  transform: translateX(0);
}

@media (min-width: 992px) {
  .han-mcm-bottom,
  .han-mcm-overlay,
  .han-mcm-panel {
    display: none;
  }
}

@media (max-width: 480px) {
  .han-mcm-bottom {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    border-radius: 18px;
  }

  .han-mcm-item {
    min-height: 54px;
    font-size: 11px;
  }

  .han-mcm-panel-head,
  .han-mcm-quick-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .han-mcm-quick-actions {
    grid-template-columns: 1fr;
  }
}
