.header-language-link,
.mobile-nav-strip {
  display: none;
}

@media (max-width: 991px) {
  .menu-toggle,
  .mobile-menu-overlay,
  .nav-wrap {
    display: none !important;
  }

  .nav-wrap.active {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
  }

  .mobile-menu-overlay.active {
    display: none !important;
  }

  body.mobile-menu-open {
    overflow: auto;
  }

  .header-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
  }

  .header-search-shortcut {
    display: none !important;
  }

  .header-actions {
    grid-column: 2 / 4;
    justify-self: end;
    margin-left: 0;
    gap: 10px;
  }

  .header-favorite,
  .header-user-dropdown,
  .header-divider {
    display: none !important;
  }

  .header-user-dropdown {
    position: relative;
    display: block !important;
  }

  .header-user-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 !important;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(20, 33, 61, 0.07);
    box-shadow: var(--app-shadow-sm);
  }

  .header-user-toggle .header-user-name,
  .header-user-toggle .header-user-arrow {
    display: none !important;
  }

  .header-user-avatar,
  .header-user-initial {
    width: 32px;
    height: 32px;
  }

  .header-user-menu {
    position: fixed;
    top: 70px;
    right: 10px;
    width: min(320px, calc(100vw - 20px));
    max-height: calc(100vh - 86px);
    max-height: calc(100dvh - 86px);
    overflow: auto;
    z-index: 1600;
  }

  .header-link-auth {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0 !important;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(20, 33, 61, 0.07);
    box-shadow: var(--app-shadow-sm);
  }

  .header-link-auth .header-link-text {
    display: none;
  }

  .header-link-auth .header-link-icon {
    margin: 0;
    color: var(--app-ink);
  }

  .header-language-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0 !important;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(20, 33, 61, 0.07);
    box-shadow: var(--app-shadow-sm);
  }

  .header-language-text {
    display: none;
  }

  .header-post-link {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 16px;
    white-space: nowrap;
  }

  .mobile-nav-strip {
    position: relative;
    display: block;
    border-top: 1px solid rgba(20, 33, 61, 0.06);
    background: rgba(255, 255, 255, 0.92);
  }

  .mobile-nav-strip::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 52px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 58%);
    pointer-events: none;
    z-index: 1;
  }

  .mobile-nav-strip::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 52px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 58%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
  }

  .mobile-nav-strip.is-scrollable:not(.is-at-start)::before {
    opacity: 1;
  }

  .mobile-nav-strip:not(.is-scrollable)::after,
  .mobile-nav-strip.is-at-end::after {
    opacity: 0;
  }

  .mobile-nav-strip-inner {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-nav-hint {
    position: absolute;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 91, 0, 0.08);
    border: 1px solid rgba(255, 91, 0, 0.14);
    color: rgba(255, 91, 0, 0.6);
    box-shadow: 0 8px 18px rgba(255, 91, 0, 0.12);
    padding: 0;
    pointer-events: auto;
    z-index: 2;
    cursor: pointer;
    animation: mobileNavHintPulse 1.75s ease-in-out infinite;
  }

  .mobile-nav-hint-prev {
    left: 10px;
  }

  .mobile-nav-hint-next {
    right: 10px;
  }

  .mobile-nav-strip.is-at-start .mobile-nav-hint-prev,
  .mobile-nav-strip:not(.is-scrollable) .mobile-nav-hint-prev {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-strip:not(.is-scrollable) .mobile-nav-hint,
  .mobile-nav-strip.is-at-end .mobile-nav-hint {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-strip.is-scrollable.is-at-end .mobile-nav-hint-prev {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-hint:active {
    animation-play-state: paused;
    transform: scale(1);
  }

  .mobile-nav-hint i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
    line-height: 1;
  }

  .mobile-nav-strip-inner::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    padding: 10px 62px 12px 0;
  }

  .mobile-nav-scroll > li {
    flex: 0 0 auto;
  }

  .mobile-nav-scroll > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(246, 248, 251, 0.96);
    border: 1px solid rgba(20, 33, 61, 0.07);
    color: var(--app-ink);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
  }

  .mobile-nav-scroll .current-menu-item > a,
  .mobile-nav-scroll .current-menu-ancestor > a,
  .mobile-nav-scroll .current_page_item > a,
  .mobile-nav-scroll .current_page_ancestor > a {
    background: rgba(255, 91, 0, 0.12);
    border-color: rgba(255, 91, 0, 0.18);
    color: var(--app-primary);
  }

  /* Register/Login/Forgot popup: compact + safe scroll on mobile */
  .register-modal {
    align-items: flex-start;
    overflow-y: auto;
    padding: 10px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .register-modal-dialog,
  .register-modal-dialog-compact {
    width: 100%;
    min-height: auto;
    max-height: calc(100vh - 20px);
    margin: 0;
    border-radius: 16px;
  }

  .register-modal-form-wrap {
    padding: 14px 12px 12px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .register-form-grid {
    gap: 8px;
  }

  .register-field {
    gap: 6px;
  }

  .register-field span {
    font-size: 11px;
  }

  .register-field input[type="text"],
  .register-field input[type="email"],
  .register-field input[type="tel"],
  .register-field input[type="password"] {
    height: 40px;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
  }

  .register-field-full {
    grid-column: 1 / -1;
  }

  .register-upload {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
  }

  .register-check-grid {
    gap: 8px;
  }
}

@keyframes mobileNavHintPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}
