/* One mobile navigation system across home, finder, create, ranking and account pages. */
@media (max-width: 800px) {
  .mobile-bottom-nav {
    position: fixed !important;
    z-index: 90 !important;
    inset: auto 0 0 !important;
    display: grid !important;
    width: 100% !important;
    height: var(--mobile-nav-total-height, 70px) !important;
    min-height: var(--mobile-nav-total-height, 70px) !important;
    padding: 0 0 env(safe-area-inset-bottom) !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    border-top: 1px solid #e6ebf2 !important;
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > a:hover,
  .mobile-bottom-nav > a:active,
  .mobile-bottom-nav > a:focus,
  .mobile-bottom-nav > a:focus-visible,
  .mobile-bottom-nav > a.on {
    position: relative;
    display: grid !important;
    min-width: 0 !important;
    min-height: 70px !important;
    padding: 6px 2px 5px !important;
    place-items: center;
    align-content: center;
    gap: 2px;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #7b8492 !important;
    font-family: Pretendard, "Noto Sans KR", Arial, sans-serif !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: -.025em !important;
    white-space: nowrap !important;
    transform: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav > a > b {
    display: grid !important;
    width: 31px;
    height: 27px;
    min-height: 27px !important;
    margin: 0 auto 1px !important;
    padding: 0 !important;
    transform: none !important;
    place-items: center;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .mobile-bottom-nav > a.on {
    color: #339cff !important;
    font-weight: 800;
  }

  .mobile-bottom-nav > a:first-child.on,
  .mobile-bottom-nav > a:first-child.on > b,
  .mobile-bottom-nav #mobile-profile-link.on,
  .mobile-bottom-nav #mobile-profile-link.on > b {
    color: #339cff !important;
  }

  .mobile-bottom-nav > a.on::before {
    position: absolute;
    top: 0;
    left: 50%;
    display: block !important;
    width: 26px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: #339cff;
    content: "";
    transform: translateX(-50%);
  }

  .mobile-bottom-nav > a:first-child > b {
    font-size: 24px !important;
  }

  .mobile-bottom-nav > a.mobile-party-find,
  .mobile-bottom-nav > a.mobile-party-find:hover,
  .mobile-bottom-nav > a.mobile-party-find:active,
  .mobile-bottom-nav > a.mobile-party-find:focus,
  .mobile-bottom-nav > a.mobile-party-find.on {
    color: #1a1c1f !important;
    font-weight: 850 !important;
  }

  .mobile-bottom-nav > a.mobile-party-find > b,
  .mobile-bottom-nav > a.mobile-party-find.on > b {
    border-radius: 9px;
    background: #ffc94a !important;
    color: #1a1c1f !important;
    font-size: 20px !important;
  }

  .mobile-bottom-nav > a.mobile-party-create,
  .mobile-bottom-nav > a.mobile-party-create:hover,
  .mobile-bottom-nav > a.mobile-party-create:active,
  .mobile-bottom-nav > a.mobile-party-create:focus,
  .mobile-bottom-nav > a.mobile-party-create.on {
    color: #1a1c1f !important;
    font-weight: 850;
  }

  .mobile-bottom-nav > a.mobile-party-create > b,
  .mobile-bottom-nav > a.mobile-party-create.on > b {
    border-radius: 9px;
    background: #339cff !important;
    color: #fff !important;
    font-size: 23px !important;
    font-weight: 500 !important;
  }

  .mobile-bottom-nav #mobile-profile-link > b,
  .mobile-bottom-nav #mobile-profile-link.on > b,
  .mobile-bottom-nav > a:nth-child(4) > b {
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-bottom-nav .mobile-nav-icon {
    display: block;
    width: 25px !important;
    height: 25px !important;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  .mobile-bottom-nav .mobile-nav-home-icon {
    width: 22.5px !important;
    height: 22.5px !important;
    -webkit-mask-image: url("/assets/icons/bottom-home-v1.png?v=3");
    mask-image: url("/assets/icons/bottom-home-v1.png?v=3");
  }

  .mobile-bottom-nav .mobile-nav-mypage-icon {
    width: 17.5px !important;
    height: 17.5px !important;
    -webkit-mask-image: url("/assets/icons/bottom-mypage-v1.png?v=3");
    mask-image: url("/assets/icons/bottom-mypage-v1.png?v=3");
  }

  .mobile-bottom-nav > a > span {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    white-space: nowrap;
  }
}

/* The persistent My Page badge had no actionable notification source. */
.mobile-bottom-nav #mobile-notification-count {
  display: none !important;
}

/* The legacy floating CS bubble is no longer part of the navigation. */
body a.chat,
body .chat,
body .mg-support-launcher {
  display: none !important;
}

/* Desktop uses the same five-action navigation as mobile. Keeping this in
   the shared, render-blocking stylesheet prevents a flash of an unstyled bar
   while the React enhancement bundle is loading. */
@media (min-width: 801px) {
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav {
    position: fixed !important;
    z-index: 900 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    display: grid !important;
    width: 100% !important;
    height: 76px !important;
    min-height: 76px !important;
    padding: 0 !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    border-top: 1px solid #e6ebf2 !important;
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 -12px 35px rgba(32,84,128,.1) !important;
    backdrop-filter: blur(18px);
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a:hover,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a:focus-visible {
    position: relative;
    display: grid !important;
    min-width: 0;
    min-height: 76px;
    place-items: center;
    align-content: center;
    gap: 4px;
    padding: 7px 12px 6px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    color: #7b8492;
    font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.on {
    color: #339cff !important;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.on::before {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: 42px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: #339cff;
    content: "";
    transform: translateX(-50%);
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a > b {
    display: grid !important;
    width: 38px;
    height: 30px;
    margin: 0 auto 1px;
    place-items: center;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 23px;
    line-height: 1;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-find,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-find:hover,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-find:focus-visible {
    color: #1a1c1f !important;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-find > b {
    background: #ffc94a !important;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-create,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-create:hover,
  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-create:focus-visible {
    color: #1a1c1f !important;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav > a.mobile-party-create > b {
    background: #339cff !important;
    color: #fff !important;
  }

  html:not(.auth-root-open) body:not(.auth-page-open):not(.host-app) .mobile-bottom-nav .mobile-nav-icon {
    width: 25px !important;
    height: 25px !important;
  }
}

/* Shared header/profile controls: the home header is the canonical size. */
.site-head .header-actions {
  min-height: 44px !important;
  align-items: center !important;
}

html body .site-head .header-actions #account-link,
html body .site-head .header-actions #account-link:hover,
html body .site-head .header-actions #account-link:active,
html body .site-head .header-actions #account-link:focus {
  display: inline-flex !important;
  width: auto !important;
  min-width: 72px !important;
  height: 42px !important;
  min-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  padding: 0 14px !important;
  border: 1px solid #339cff !important;
  border-radius: 11px !important;
  background: #339cff !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent;
}

html body .site-head .header-actions #admin-link,
html body .site-head .header-actions #admin-link:hover,
html body .site-head .header-actions #admin-link:active,
html body .site-head .header-actions #admin-link:focus {
  display: inline-flex !important;
  width: auto !important;
  min-width: 96px !important;
  height: 42px !important;
  min-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: #edf7ff !important;
  box-shadow: none !important;
  color: #1684e5 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  transform: none !important;
  -webkit-tap-highlight-color: transparent;
}

html body .site-head .header-actions #admin-link[hidden] {
  display: none !important;
}

.profile-head-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

.profile-head-actions > a {
  display: inline-flex !important;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  border: 1px solid #cbe4fb !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #1684e5 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  white-space: nowrap;
}

@media (max-width: 800px) {
  html body .site-head .header-actions #account-link,
  html body .site-head .header-actions #account-link:hover,
  html body .site-head .header-actions #account-link:active,
  html body .site-head .header-actions #account-link:focus {
    min-width: 68px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }

  html body .site-head .header-actions #admin-link,
  html body .site-head .header-actions #admin-link:hover,
  html body .site-head .header-actions #admin-link:active,
  html body .site-head .header-actions #admin-link:focus {
    min-width: 96px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }

  html body .site-head .header-actions #admin-link[hidden] {
    display: none !important;
  }
}
