/* Mobile header ticker + menu. Desktop nav is unchanged. */

@media (min-width: 769px) {
  .m-ticker {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header .myPhone1 {
    display: none !important;
  }

  .m-ticker {
    display: block;
    position: absolute;
    left: 112px;
    right: 50px;
    top: 50%;
    height: 28px;
    margin-top: -14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    z-index: 3;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  }

  .m-ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    height: 100%;
    animation: m-ticker 16s linear infinite;
  }

  .m-ticker span {
    display: block;
    padding-right: 48px;
    color: #14161c;
    font-size: 13px;
    font-weight: 500;
    line-height: 28px;
    white-space: nowrap;
    letter-spacing: 0;
  }

  .neirong {
    top: 60px !important;
    left: 0 !important;
    width: 100% !important;
    height: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    z-index: 1050 !important;
  }

  .neirong.neirong-show {
    height: calc(100vh - 60px) !important;
    height: calc(100dvh - 60px) !important;
    overflow-y: auto !important;
    background: #fff !important;
    -webkit-overflow-scrolling: touch;
  }

  .neirong .neirong-bd {
    visibility: visible !important;
    padding: 4px 0 calc(28px + env(safe-area-inset-bottom)) !important;
  }

  .neirong .neirong-close {
    display: none !important;
  }

  .neirong a,
  .neirong.neirong-hide a,
  .neirong.neirong-show a {
    opacity: 1 !important;
    transform: none !important;
    transition: background-color .2s ease, color .2s ease !important;
    border: 0 !important;
    color: #14161c;
    text-decoration: none;
  }

  .m-row {
    display: flex;
    align-items: center;
    min-height: 54px;
    margin: 0;
    padding: 0 8px 0 20px;
    border-bottom: 1px solid #f0eeea;
    background: #fff;
  }

  .m-row .m-link {
    flex: 1;
    min-width: 0;
    padding: 14px 8px 14px 0 !important;
    font-size: 16px !important;
    font-weight: 500;
    line-height: 1.4 !important;
    color: #14161c !important;
  }

  .m-link.neirong-on,
  .m-link.is-on {
    color: #fc4a0a !important;
  }

  .m-acc {
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    position: relative;
  }

  .m-acc::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #14161c;
    border-bottom: 1.5px solid #14161c;
    transform: rotate(45deg);
    transition: transform .2s ease;
  }

  .m-group.is-open .m-acc::before {
    top: 18px;
    transform: rotate(225deg);
  }

  .m-group.is-open .m-row {
    background: #fff;
  }

  .m-sub {
    display: none;
    margin: 0;
    padding: 6px 0 8px;
    list-style: none;
    background: #f6f5f3;
  }

  .m-group.is-open .m-sub {
    display: block;
  }

  .m-sub li {
    list-style: none;
  }

  .m-sub a {
    display: block;
    padding: 12px 20px 12px 32px !important;
    font-size: 15px !important;
    font-weight: 400;
    line-height: 1.45 !important;
    color: #3a3a3a !important;
  }

  .m-sub .LiLevel2 a {
    padding-left: 46px !important;
    font-size: 14px !important;
    color: #666 !important;
  }

  .m-more {
    margin: 18px 16px 8px;
    padding: 6px 0;
    background: #f6f5f3;
    border-radius: 16px;
  }

  .m-more a {
    display: block;
    padding: 12px 18px !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.4 !important;
    color: #3a3a3a !important;
  }

  body.m-nav-open {
    overflow: hidden;
  }
}

@keyframes m-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .m-ticker-track {
    animation: none;
  }
}
